openc3-cosmos-tool-admin 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 (111) hide show
  1. checksums.yaml +4 -4
  2. data/tools/admin/{ArrayWidget-D1PArcGr-3885b67514afe732ba36.js → ArrayWidget-DMSm_P6c-efc7746a4ba953cd6808.js} +2 -2
  3. data/tools/admin/{ArrayplotWidget-DPUPy0qM-b6a1c019189be84e4589.js → ArrayplotWidget-fdXLhGAl-bb78ab3e4fdecdfebd67.js} +1 -1
  4. data/tools/admin/{BarColumn-BpdscDQf-e551f56c95340d26cda4.js → BarColumn-Bb305iCi-1d14dd1f021f8d8d5f6a.js} +1 -1
  5. data/tools/admin/{BlockWidget-_VUsK5T9-59058beda215f65a7b09.js → BlockWidget-Do3W6tZh-30b366b735726d3e884d.js} +2 -2
  6. data/tools/admin/{ButtonWidget-DE41o-cg-d0d862704f2cedf509f5.js → ButtonWidget-DukCQt0F-c8a88a1d238108f85fc0.js} +2 -2
  7. data/tools/admin/CanvasWidget-BRdVWln5-68610c4a029476073178.js +1 -0
  8. data/tools/admin/CanvasdotWidget-DV8PeDWz-da21bd87f779b9139269.js +1 -0
  9. data/tools/admin/{CanvasimageWidget-COv_Qnc8-0a502afa265efe2f25ad.js → CanvasimageWidget-Czbq1GuF-5f841f468351c7d6bdbf.js} +1 -1
  10. data/tools/admin/{CanvasimagevalueWidget-BhuUqLOo-53322c8fb2f548104d57.js → CanvasimagevalueWidget-DKt5JgEt-c79bbec74e5403f7b6ec.js} +1 -1
  11. data/tools/admin/CanvaslabelWidget-DW2I1ra1-bf0c322f7c308654cfc2.js +1 -0
  12. data/tools/admin/CanvaslabelvalueWidget-BhzvZVfD-ba39d0f36fbf3db6cd9c.js +1 -0
  13. data/tools/admin/{CanvaslineWidget-D1K_6mAY-986d4445d6db8f24c1b0.js → CanvaslineWidget-DsjY37tp-97707caf9ea6147f085e.js} +1 -1
  14. data/tools/admin/{CanvaslinevalueWidget-D4eaxWhR-443b0d3f93af5d0faf5a.js → CanvaslinevalueWidget-ihI97G8T-a7ccb7b7ca2d2628fdd5.js} +1 -1
  15. data/tools/admin/CheckbuttonWidget-B778Z-Zo-9dbaeff7a2a74130539a.js +1 -0
  16. data/tools/admin/ComboboxWidget-CuuvOL9K-838f18b5b010cb3d71ae.js +1 -0
  17. data/tools/admin/{DateWidget-DkNWx28s-bb439088467e3b1af3aa.js → DateWidget-COvQTAeo-fdab60f30b292f493736.js} +1 -1
  18. data/tools/admin/{DetailsDialog-F4KgYM6m-8435a552f5c10d2191bc.js → DetailsDialog-DE7lK17G-434a9ce6dcc8e6636a47.js} +1 -1
  19. data/tools/admin/{DynamicWidget-BuSbQVhf-6a5228328dcebb177ef8.js → DynamicWidget-BuSbQVhf-f880988884028652fefc.js} +1 -1
  20. data/tools/admin/{FilechecksumWidget-DSfNEnDJ-531bbb7d456d380a62d9.js → FilechecksumWidget-DRnOt_UE-b118998ed499ab04e025.js} +1 -1
  21. data/tools/admin/{FiledisplayWidget-D2cxMmrP-812eb21e2f71f0bd32d6.js → FiledisplayWidget-26R46EjS-312ad25b3132af381df5.js} +1 -1
  22. data/tools/admin/{FormatvalueWidget-6-bj_PJO-4c9daa001cba89fb9103.js → FormatvalueWidget-BxyscMJc-9965b0bd2806cfbe79cb.js} +1 -1
  23. data/tools/admin/Graph-BKw7xw1a-947d95e03148698e323f.js +1 -0
  24. data/tools/admin/{GraphWidget-COXK3Dab-18ccb71d08b630c3446f.js → GraphWidget-Cs9mvqUu-f9a29adafa014c1e26e4.js} +1 -1
  25. data/tools/admin/{HorizontalWidget-C9UFBPsk-91bd1e11d87736b8c758.js → HorizontalWidget-fWLFj7Kg-46768f166783e7c59c1c.js} +1 -1
  26. data/tools/admin/{HorizontalboxWidget-CWLfmRtr-13d452adc9e1100f23c4.js → HorizontalboxWidget-DEaXhKEz-b0ba376ca37ee17a7d70.js} +1 -1
  27. data/tools/admin/HorizontallineWidget-Bvu1QP3S-2ef01995448de3e2d6b7.js +1 -0
  28. data/tools/admin/{IframeWidget-Bn9eGzrq-d71752e23ce712e81e26.js → IframeWidget-B143k4lo-47d90846ad305990fd45.js} +1 -1
  29. data/tools/admin/{ImageLoader-_gAudhVo-23300d0d0133307fb169.js → ImageLoader-BCpmQHIl-90267960b7246cba4d23.js} +1 -1
  30. data/tools/admin/{ImageviewerWidget-BUWhF32Z-0799a243569a53e640e9.js → ImageviewerWidget-CLrvr6dw-6adafd871908af16336a.js} +1 -1
  31. data/tools/admin/InterfacesTab-zhl06TGR-269bf95691e1ca1133d0.js +1 -0
  32. data/tools/admin/{LabelWidget-BhzkN06D-2d7a7f95582b783e18d0.js → LabelWidget-CA1bTX2B-cf65a81edc2678cf21d0.js} +1 -1
  33. data/tools/admin/{LabelledWidget-vx8NvW1b-0d3f99aa750f0631fdc2.js → LabelledWidget-BDhvr03J-d661081e5e66658337e8.js} +1 -1
  34. data/tools/admin/{LabelprogressbarWidget-t5PvKuS4-18438f7d1f021d5247e5.js → LabelprogressbarWidget-g7A5CE8S-3e6d2543cbb4356e663b.js} +1 -1
  35. data/tools/admin/LabelsparklineWidget-B27xXxWg-46ed8faac17cc5e23e2c.js +1 -0
  36. data/tools/admin/{LabelvalueWidget-Cbs1DBK2-8bc763b903941db678a2.js → LabelvalueWidget-DFn8o6LC-83776b27319b83d8f0db.js} +1 -1
  37. data/tools/admin/{LabelvaluedescWidget-B7OIOGc0-21ac0d9663cf49396a58.js → LabelvaluedescWidget-BQpaxFaB-577f3f571587fc3e28a8.js} +1 -1
  38. data/tools/admin/{LabelvaluelimitsbarWidget-C57kf-oQ-8929b2b56023fd39369a.js → LabelvaluelimitsbarWidget-C-z96q8z-05aedeebb4882527347a.js} +1 -1
  39. data/tools/admin/LabelvaluelimitscolumnWidget-D2TMEv9O-8f2ba12f3d8541a80f4f.js +1 -0
  40. data/tools/admin/{LabelvaluerangebarWidget-Pt_evm3v-2f296e2b660ae23cd7e2.js → LabelvaluerangebarWidget-D99dZCjz-f2a7ecfb05831ee9ece6.js} +1 -1
  41. data/tools/admin/{Layout-CKmC50QZ-a4e41facce8302b08009.js → Layout--_zNJWnw-a75e57affb59e71889ad.js} +1 -1
  42. data/tools/admin/{LedWidget-D1lmNXpi-c70ab085a7e75d99db2a.js → LedWidget-D2uxHxe3-b432e645d6f5ac424a50.js} +1 -1
  43. data/tools/admin/{LimitsBar-D5IZu7eX-eed22332c6603ee4301a.js → LimitsBar-DN1s8-MS-5fcc0dd234e18f768e31.js} +1 -1
  44. data/tools/admin/{LimitsbarWidget-VpxQXE-e-48cfee552a9c695bf8f1.js → LimitsbarWidget-Cqhh7LKU-68bbd725e553a8fbb473.js} +1 -1
  45. data/tools/admin/{LimitscolorWidget-79P41CX7-f2eea333aec5c48967e0.js → LimitscolorWidget-haGB4RbY-2bbe52d1c80aded0cc12.js} +1 -1
  46. data/tools/admin/{LimitscolumnWidget-BFDXhJeZ-4eba19b9d6c713c13db1.js → LimitscolumnWidget-B1GdmlR_-ea359135deab006453c1.js} +1 -1
  47. data/tools/admin/{LinegraphWidget-VqkpOlws-f72604545ff9d950311b.js → LinegraphWidget-COSOQ0uM-d51c56629154333d44e4.js} +1 -1
  48. data/tools/admin/{MatrixbycolumnsWidget--ihvirDP-0c6d1476cb4af73ce4ec.js → MatrixbycolumnsWidget-coHlLETG-860f23fb48426b9fd387.js} +1 -1
  49. data/tools/admin/{MicroservicesTab-CQPpb7j1-7daf01af280d2c44c370.js → MicroservicesTab-eR0hpoO1-90e70bfd68ca8cece876.js} +2 -2
  50. data/tools/admin/{OpenC3TimePicker-B0lAIU91-6e7843b535d6cb333926.js → OpenC3TimePicker-B8Vu9GBz-c1433e91ea28dd0e883e.js} +1 -1
  51. data/tools/admin/{OutputDialog-DtrpwjGL-73ebd3c55e7ffbc15652.js → OutputDialog-B0DR879Y-1fe936426c84cb442ac4.js} +1 -1
  52. data/tools/admin/{PackagesTab-DQ5s3nfh-dfdd8bd24af88c946d9d.js → PackagesTab-aA0fmiQh-fb563fc6f35c8b0be850.js} +1 -1
  53. data/tools/admin/{PluginsTab-1tlTx4k1-496335d424694bd25d9a.js → PluginsTab-C-ItW862-32d7ee9164d04691765d.js} +2 -2
  54. data/tools/admin/{ProgressbarWidget-BIB3r9SL-2b2e5705da4fe267fc08.js → ProgressbarWidget-D_yFssIZ-d10aa4e57145b3259669.js} +1 -1
  55. data/tools/admin/{RadiobuttonWidget-C5rxLM7K-9bdffd0ee597d4386ad7.js → RadiobuttonWidget-DL0jVTcb-3c465bd94a1d1501b9aa.js} +1 -1
  56. data/tools/admin/RadiogroupWidget-2-td69IA-a20b41e0ee16fca8216f.js +1 -0
  57. data/tools/admin/{RangebarWidget-MPQYi2Km-b85a235f8e43da24f3ae.js → RangebarWidget-i2mlnxys-4eec6df5412c7c011047.js} +1 -1
  58. data/tools/admin/RedisTab-WR7ODfau-47151697811af67bb310.js +1 -0
  59. data/tools/admin/{RollupWidget-CfjGAhzg-f9d66fe1e702f376333e.js → RollupWidget-BEJ2Icg1-e244836ce5d601a70583.js} +1 -1
  60. data/tools/admin/RoutersTab-DUvEd6IA-b95f4c2224cc6903fd12.js +1 -0
  61. data/tools/admin/{ScrollwindowWidget-CupaygNN-a397b20ae8a40b64a487.js → ScrollwindowWidget-BU1cRpL8-db955ba3d4a28aa695c0.js} +1 -1
  62. data/tools/admin/{SecretsTab-C9xAxuwO-89d69d126612c7b64f6d.js → SecretsTab-CkjjSxCg-e1665e5ecea3aed8dad6.js} +1 -1
  63. data/tools/admin/SettingsTab-CJp0hFpx-bae27f27a99072352713.js +6 -0
  64. data/tools/admin/{SignalWidget-C-qecoTO-c71ca67fb48f421af75e.js → SignalWidget-hiTkeem9-803814029a9fe6a17581.js} +1 -1
  65. data/tools/admin/{SimpleTextDialog-C-0ZC2bs-48d950cb04fe0c899bab.js → SimpleTextDialog-tGqcHHCx-aac1d333cbb9a93606d6.js} +1 -1
  66. data/tools/admin/SpacerWidget-CBmzzS_X-207fd991cbf6a40fe4b0.js +1 -0
  67. data/tools/admin/SparklineWidget-CizRh6QR-125aeb303d4965c33db7.js +1 -0
  68. data/tools/admin/{TabbookWidget-CXklff-l-46b8ed5b3d3fc3f6ff22.js → TabbookWidget-CvL3Ozmx-392ae93cab5b7cbb9764.js} +1 -1
  69. data/tools/admin/{TargetsTab-Ci4cOsIa-d2957154b9bf46fa9617.js → TargetsTab-KTV_gfLE-3a9c157196f584e54664.js} +1 -1
  70. data/tools/admin/TextboxWidget-BtEwXzDO-e4893abb472b9a687d25.js +1 -0
  71. data/tools/admin/{TextfieldWidget-CdANAW-6-82179a958f191dffd85c.js → TextfieldWidget-BDbb57HP-51b0d1e6a5aa914e5ac8.js} +1 -1
  72. data/tools/admin/TimeWidget-DzD8U8l8-2591897a5196cb54b68d.js +1 -0
  73. data/tools/admin/{TitleWidget-68NWCcXB-218c5743097602c7a5d8.js → TitleWidget-CL53vf14-6e11a61576950ccd39fd.js} +1 -1
  74. data/tools/admin/{ToolsTab-BCvmMDIZ-4b33c7b7aab46b7d4119.js → ToolsTab-yFxYcJ-o-7c21c60dd470d658fe4d.js} +1 -1
  75. data/tools/admin/TsdbTab-B0BR-V6A-ab626c8be8b9836c1c78.js +4 -0
  76. data/tools/admin/{VWidget-oMbywhLA-ae9ee9bde0636cb9c9e1.js → VWidget-5qOYva88-4db083a6475508bbf7ce.js} +1 -1
  77. data/tools/admin/ValueWidget-CAkuc_w_-6037c5f1b4e7c0e9c790.js +1 -0
  78. data/tools/admin/ValuelimitsbarWidget-Y8sO05E1-c51344904eca186c081f.js +1 -0
  79. data/tools/admin/{ValuelimitscolumnWidget-BVt6nLXq-08cf4c90f589d1d23b70.js → ValuelimitscolumnWidget-iOjB_fCj-c8c67d58522b7f505b4f.js} +1 -1
  80. data/tools/admin/ValuerangebarWidget-DsCoeAm6-a486168810aca7f0e206.js +1 -0
  81. data/tools/admin/{VerticalWidget-DlftYBjH-ae7352937173846f56d9.js → VerticalWidget-C6O0dhRU-7511fd89efa71860286e.js} +1 -1
  82. data/tools/admin/{VerticalboxWidget-C7RrkfY0-a5135be854d46c8d2871.js → VerticalboxWidget-B-CoqRJG-29951e73bb5144b9ca2c.js} +1 -1
  83. data/tools/admin/{Widget-D_HaosJK-c49796f3af3288426d03.js → Widget-CtYQauzA-ae8839a2e4146c799aec.js} +1 -1
  84. data/tools/admin/main-040488697a5f3eed5115.js +1502 -0
  85. data/tools/admin/main.js +1 -1
  86. data/tools/admin/{settings-DZ910lLo-06b2e35cd3b4b6b6686c.js → settings-BrhbKDEv-791c3f57ac7979ee13b6.js} +1 -1
  87. metadata +85 -85
  88. data/tools/admin/CanvasWidget-BEi8h3Mq-e74743c293400ba5a929.js +0 -1
  89. data/tools/admin/CanvasdotWidget-eZuMgkhL-069ce51cfaf9b6705d69.js +0 -1
  90. data/tools/admin/CanvaslabelWidget-DtvbgeYH-0bb6f6c1d49c8d123129.js +0 -1
  91. data/tools/admin/CanvaslabelvalueWidget-C_FRIeNb-3b5c9903ad9d379fc52a.js +0 -1
  92. data/tools/admin/CheckbuttonWidget-ByxMDkiS-6939f416d1a7977f37fb.js +0 -1
  93. data/tools/admin/ComboboxWidget-CAGxGv2r-28b0f6b63d807a2f3217.js +0 -1
  94. data/tools/admin/Graph-Cz0Ns1FD-9251aa7b63944e24104e.js +0 -1
  95. data/tools/admin/HorizontallineWidget-DeFkOaYO-816f7a06f03f7222e67e.js +0 -1
  96. data/tools/admin/InterfacesTab-CZsnR6xB-abec32626a92ea91aa87.js +0 -1
  97. data/tools/admin/LabelsparklineWidget-CebbEH-j-9c683841d069f9e5b25c.js +0 -1
  98. data/tools/admin/LabelvaluelimitscolumnWidget-BRlNDEqp-d0a4f3d8ee015080c0a8.js +0 -1
  99. data/tools/admin/RadiogroupWidget-CciTCv1U-f9b9584110d84fad120b.js +0 -1
  100. data/tools/admin/RedisTab-DAeGow_e-aad9acabdf7d1943559b.js +0 -1
  101. data/tools/admin/RoutersTab-G4WKtUOo-8f69fb20843fdf62fa85.js +0 -1
  102. data/tools/admin/SettingsTab-BUdeAh4o-f1b85c2ee59d2f206af1.js +0 -5
  103. data/tools/admin/SpacerWidget-VVkOCb6N-356dcf21185ada59e84f.js +0 -1
  104. data/tools/admin/SparklineWidget-Dsmn38z_-2bd86ac75cf900848cd0.js +0 -1
  105. data/tools/admin/TextboxWidget-CHs2VYIv-55be6bce7cab19177b56.js +0 -1
  106. data/tools/admin/TimeWidget-D0xT1wXR-52493dd27717545a87bd.js +0 -1
  107. data/tools/admin/TsdbTab-BytqwnkN-ddc61c1fffc41912b8cb.js +0 -4
  108. data/tools/admin/ValueWidget-B1aGUBP7-320f2f1feb3886640deb.js +0 -1
  109. data/tools/admin/ValuelimitsbarWidget-B7KcRjLS-70f46b11dcb2a83a3562.js +0 -1
  110. data/tools/admin/ValuerangebarWidget-uVZEI32U-ded0715685adaffdaca5.js +0 -1
  111. data/tools/admin/main-320f7a52ead0c027f3e7.js +0 -1502
@@ -0,0 +1,1502 @@
1
+ System.register(["vue","vue-router","pinia","single-spa","vuetify"],(function(Nn,st){"use strict";var Ke,ct,jt,Be,Ge,an,er,tg,ng,rg,Cn,fi,To,ig,Nt,Ja,Nu,Cs,ti,aa,ql,la,og,sg,ag,lg,Du,cg,ug,hg,dg,fg,Pu,pg,gg,mg,vg,yg,bg,Fu,wg;return{setters:[St=>{Ke=St.resolveComponent,ct=St.openBlock,jt=St.createBlock,Be=St.withCtx,Ge=St.createVNode,an=St.createElementBlock,er=St.createElementVNode,tg=St.useCssVars,ng=St.defineAsyncComponent,rg=St.Teleport,Cn=St.toDisplayString,fi=St.Fragment,To=St.renderList,ig=St.ref,Nt=St.createTextVNode,Ja=St.mergeProps,Nu=St.createSlots,Cs=St.normalizeStyle,ti=St.createCommentVNode,aa=St.h,ql=St.withKeys,la=St.withModifiers,og=St.toRaw,sg=St.defineComponent,ag=St.warn,lg=St.inject,Du=St.computed,cg=St.shallowRef,ug=St.watchEffect,hg=St.normalizeClass,dg=St.getCurrentInstance,fg=St.provide,Pu=St.createApp,pg=St.withDirectives,gg=St.vShow},St=>{mg=St.createRouter,vg=St.createWebHistory},St=>{yg=St.defineStore,bg=St.createPinia},St=>{Fu=St.getMountedApps},St=>{wg=St.createVuetify}],execute:(function(){Nn({A:ma,H:ni,J:ll,X:dh,b:ga,c:Fm,d:Vm,f:Pm,i:Gm,l:uh,o:db,q:Hr,s:Ro,t:zm,u:qm});var St=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function xg(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter((function(d){return Object.getOwnPropertyDescriptor(n,d).enumerable}))),e.push.apply(e,r)}return e}function _s(n){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?xg(Object(e),!0).forEach((function(r){fC(n,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):xg(Object(e)).forEach((function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(e,r))}))}return n}function fC(n,t,e){return(t=(function(r){var d=(function(u,f){if(As(u)!=="object"||u===null)return u;var v=u[Symbol.toPrimitive];if(v!==void 0){var a=v.call(u,f);if(As(a)!=="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(f==="string"?String:Number)(u)})(r,"string");return As(d)==="symbol"?d:String(d)})(t))in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function As(n){return As=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},As(n)}(function(n){if(n.CSS&&n.CSS.escape)return n.CSS.escape;var t=function(e){if(arguments.length==0)throw new TypeError("`CSS.escape` requires an argument.");for(var r,d=String(e),u=d.length,f=-1,v="",a=d.charCodeAt(0);++f<u;)(r=d.charCodeAt(f))!=0?v+=r>=1&&r<=31||r==127||f==0&&r>=48&&r<=57||f==1&&r>=48&&r<=57&&a==45?"\\"+r.toString(16)+" ":f==0&&u==1&&r==45||!(r>=128||r==45||r==95||r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122)?"\\"+d.charAt(f):d.charAt(f):v+="�";return v};n.CSS||(n.CSS={}),n.CSS.escape=t})(St);var pC={appOptions:null,template:null,Vue:null,createApp:null,handleInstance:null};function gC(n){if(As(n)!=="object")throw new Error("single-spa-vue requires a configuration object");var t=_s(_s({},pC),n);if(!t.Vue&&!t.createApp)throw Error("single-spa-vue must be passed opts.Vue or opts.createApp");if(!t.appOptions)throw Error("single-spa-vue must be passed opts.appOptions");if(t.appOptions.el&&typeof t.appOptions.el!="string"&&!(t.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(As(t.appOptions.el)));t.createApp=t.createApp||t.Vue&&t.Vue.createApp;var e={};return{bootstrap:mC.bind(null,t,e),mount:vC.bind(null,t,e),unmount:bC.bind(null,t,e),update:yC.bind(null,t,e)}}function mC(n){return n.loadRootComponent?n.loadRootComponent().then((function(t){return n.rootComponent=t})):Promise.resolve()}function vC(n,t,e){var r={};return Promise.resolve().then((function(){return(function(d,u){return typeof d.appOptions=="function"?d.appOptions(u):Promise.resolve(_s({},d.appOptions))})(n,e).then((function(d){var u;if(e.domElement&&!d.el&&(d.el=e.domElement),d.el)if(typeof d.el=="string"){if(!(u=document.querySelector(d.el)))throw Error("If appOptions.el is provided to single-spa-vue, the dom element must exist in the dom. Was provided as ".concat(d.el))}else(u=d.el).id||(u.id="single-spa-application:".concat(e.name)),d.el="#".concat(CSS.escape(u.id));else{var f="single-spa-application:".concat(e.name);d.el="#".concat(CSS.escape(f)),(u=document.getElementById(f))||((u=document.createElement("div")).id=f,document.body.appendChild(u))}if(!n.replaceMode&&(d.el=d.el+" .single-spa-container",!u.querySelector(".single-spa-container"))){var v=document.createElement("div");v.className="single-spa-container",u.appendChild(v)}r.domEl=u,d.render||d.template||!n.rootComponent||(d.render=function(g){return g(n.rootComponent)}),d.data||(d.data={});var a=d.data;if(d.data=function(){return _s(_s({},typeof a=="function"?a.call(this,this):a),e)},n.createApp){if(r.vueInstance=n.createApp(d),n.handleInstance)return Promise.resolve(n.handleInstance(r.vueInstance,e)).then((function(){return r.root=r.vueInstance.mount(d.el),t[e.name]=r,r.vueInstance}));r.root=r.vueInstance.mount(d.el)}else if(r.vueInstance=new n.Vue(d),r.vueInstance.bind&&(r.vueInstance=r.vueInstance.bind(r.vueInstance)),n.handleInstance)return Promise.resolve(n.handleInstance(r.vueInstance,e)).then((function(){return t[e.name]=r,r.vueInstance}));return t[e.name]=r,r.vueInstance}))}))}function yC(n,t,e){return Promise.resolve().then((function(){var r=t[e.name],d=_s(_s({},n.appOptions.data||{}),e),u=r.root||r.vueInstance;for(var f in d)u[f]=d[f]}))}function bC(n,t,e){return Promise.resolve().then((function(){var r=t[e.name];n.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 wC=(n,t)=>{const e=n.__vccOpts||n;for(const[r,d]of t)e[r]=d;return e},xC={};function CC(n,t){const e=Ke("router-view"),r=Ke("v-app");return ct(),jt(r,{id:"innerapp"},{default:Be(()=>[Ge(e)]),_:1})}const _C=wC(xC,[["render",CC]]),Cg=function(n){!n.name!=="NotFound"&&(n.path=`/tools/admin/${n.path.replace(/^\//,"")}`),n.children?.forEach(Cg)},$j="modulepreload",Ej=function(n){return"/"+n},Tj={},at=function(t,e,r){let d=Promise.resolve();function u(f){const v=new Event("vite:preloadError",{cancelable:!0});if(v.payload=f,window.dispatchEvent(v),!v.defaultPrevented)throw f}return d.then(f=>{for(const v of f||[])v.status==="rejected"&&u(v.reason);return t().catch(u)})},co=Nn("k",(n,t)=>{const e=n.__vccOpts||n;for(const[r,d]of t)e[r]=d;return e}),AC="/icons/customIcons.svg",zu={props:{icon:{type:String,default:null},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{iconSrc:function(){return AC+"#"+this.icon}}},_g=()=>{tg(n=>({v4ccb3d08:n.color}))},Ag=zu.setup;zu.setup=Ag?(n,t)=>(_g(),Ag(n,t)):_g;const kC={class:"cosmos-custom-icon"},SC={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",preserveAspectRatio:"xMidYMid meet",focusable:"false"},$C=["href"];function EC(n,t,e,r,d,u){return ct(),an("span",kC,[(ct(),an("svg",SC,[er("use",{href:u.iconSrc},null,8,$C)]))])}const TC=co(zu,[["render",EC],["__scopeId","data-v-54b83b01"]]);function kg(n,t){return function(){return n.apply(t,arguments)}}const{toString:RC}=Object.prototype,{getPrototypeOf:ca}=Object,{iterator:Za,toStringTag:Sg}=Symbol,Kl=(({hasOwnProperty:n})=>(t,e)=>n.call(t,e))(Object.prototype),Qa=(n,t)=>{let e=n;const r=[];for(;e!=null&&e!==Object.prototype;){if(r.indexOf(e)!==-1)return!1;if(r.push(e),Kl(e,t))return!0;e=ca(e)}return!1},IC=(n,t)=>n!=null&&Qa(n,t)?n[t]:void 0,ju=(n=>t=>{const e=RC.call(t);return n[e]||(n[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),uo=n=>(n=n.toLowerCase(),t=>ju(t)===n),Yl=n=>t=>typeof t===n,{isArray:ks}=Array,ua=Yl("undefined");function ha(n){return n!==null&&!ua(n)&&n.constructor!==null&&!ua(n.constructor)&&pi(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const $g=uo("ArrayBuffer");function MC(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&$g(n.buffer),t}const LC=Yl("string"),pi=Yl("function"),Eg=Yl("number"),da=n=>n!==null&&typeof n=="object",OC=n=>n===!0||n===!1,Xl=n=>{if(!da(n))return!1;const t=ca(n);return(t===null||t===Object.prototype||ca(t)===null)&&!Qa(n,Sg)&&!Qa(n,Za)},NC=n=>{if(!da(n)||ha(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},DC=uo("Date"),PC=uo("File"),FC=n=>!!(n&&typeof n.uri<"u"),zC=n=>n&&typeof n.getParts<"u",jC=uo("Blob"),BC=uo("FileList"),WC=n=>da(n)&&pi(n.pipe);function HC(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Tg=HC(),Rg=typeof Tg.FormData<"u"?Tg.FormData:void 0,UC=n=>{if(!n)return!1;if(Rg&&n instanceof Rg)return!0;const t=ca(n);if(!t||t===Object.prototype||!pi(n.append))return!1;const e=ju(n);return e==="formdata"||e==="object"&&pi(n.toString)&&n.toString()==="[object FormData]"},VC=uo("URLSearchParams"),[GC,qC,KC,YC]=["ReadableStream","Request","Response","Headers"].map(uo),XC=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function el(n,t,{allOwnKeys:e=!1}={}){if(n===null||typeof n>"u")return;let r,d;if(typeof n!="object"&&(n=[n]),ks(n))for(r=0,d=n.length;r<d;r++)t.call(null,n[r],r,n);else{if(ha(n))return;const u=e?Object.getOwnPropertyNames(n):Object.keys(n),f=u.length;let v;for(r=0;r<f;r++)v=u[r],t.call(null,n[v],v,n)}}function Ig(n,t){if(ha(n))return null;t=t.toLowerCase();const e=Object.keys(n);let r=e.length,d;for(;r-- >0;)if(d=e[r],t===d.toLowerCase())return d;return null}const Ss=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Mg=n=>!ua(n)&&n!==Ss;function Bu(...n){const{caseless:t,skipUndefined:e}=Mg(this)&&this||{},r={},d=(u,f)=>{if(f==="__proto__"||f==="constructor"||f==="prototype")return;const v=t&&typeof f=="string"&&Ig(r,f)||f,a=Kl(r,v)?r[v]:void 0;Xl(a)&&Xl(u)?r[v]=Bu(a,u):Xl(u)?r[v]=Bu({},u):ks(u)?r[v]=u.slice():(!e||!ua(u))&&(r[v]=u)};for(let u=0,f=n.length;u<f;u++){const v=n[u];if(!v||ha(v)||(el(v,d),typeof v!="object"||ks(v)))continue;const a=Object.getOwnPropertySymbols(v);for(let g=0;g<a.length;g++){const i=a[g];l_.call(v,i)&&d(v[i],i)}}return r}const JC=(n,t,e,{allOwnKeys:r}={})=>(el(t,(d,u)=>{e&&pi(d)?Object.defineProperty(n,u,{__proto__:null,value:kg(d,e),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(n,u,{__proto__:null,value:d,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),n),ZC=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),QC=(n,t,e,r)=>{n.prototype=Object.create(t.prototype,r),Object.defineProperty(n.prototype,"constructor",{__proto__:null,value:n,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(n,"super",{__proto__:null,value:t.prototype}),e&&Object.assign(n.prototype,e)},e_=(n,t,e,r)=>{let d,u,f;const v={};if(t=t||{},n==null)return t;do{for(d=Object.getOwnPropertyNames(n),u=d.length;u-- >0;)f=d[u],(!r||r(f,n,t))&&!v[f]&&(t[f]=n[f],v[f]=!0);n=e!==!1&&ca(n)}while(n&&(!e||e(n,t))&&n!==Object.prototype);return t},t_=(n,t,e)=>{n=String(n),(e===void 0||e>n.length)&&(e=n.length),e-=t.length;const r=n.indexOf(t,e);return r!==-1&&r===e},n_=n=>{if(!n)return null;if(ks(n))return n;let t=n.length;if(!Eg(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=n[t];return e},r_=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&ca(Uint8Array)),i_=(n,t)=>{const e=(n&&n[Za]).call(n);let r;for(;(r=e.next())&&!r.done;){const d=r.value;t.call(n,d[0],d[1])}},o_=(n,t)=>{let e;const r=[];for(;(e=n.exec(t))!==null;)r.push(e);return r},s_=uo("HTMLFormElement"),a_=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,e,r){return e.toUpperCase()+r}),{propertyIsEnumerable:l_}=Object.prototype,c_=uo("RegExp"),Lg=(n,t)=>{const e=Object.getOwnPropertyDescriptors(n),r={};el(e,(d,u)=>{let f;(f=t(d,u,n))!==!1&&(r[u]=f||d)}),Object.defineProperties(n,r)},u_=n=>{Lg(n,(t,e)=>{if(pi(n)&&["arguments","caller","callee"].includes(e))return!1;const r=n[e];if(pi(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},h_=(n,t)=>{const e={},r=d=>{d.forEach(u=>{e[u]=!0})};return ks(n)?r(n):r(String(n).split(t)),e},d_=()=>{},f_=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function p_(n){return!!(n&&pi(n.append)&&n[Sg]==="FormData"&&n[Za])}const g_=n=>{const t=new WeakSet,e=r=>{if(da(r)){if(t.has(r))return;if(ha(r))return r;if(!("toJSON"in r)){t.add(r);const d=ks(r)?[]:{};return el(r,(u,f)=>{const v=e(u);!ua(v)&&(d[f]=v)}),t.delete(r),d}}return r};return e(n)},m_=uo("AsyncFunction"),v_=n=>n&&(da(n)||pi(n))&&pi(n.then)&&pi(n.catch),Og=((n,t)=>n?setImmediate:t?((e,r)=>(Ss.addEventListener("message",({source:d,data:u})=>{d===Ss&&u===e&&r.length&&r.shift()()},!1),d=>{r.push(d),Ss.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",pi(Ss.postMessage)),y_=typeof queueMicrotask<"u"?queueMicrotask.bind(Ss):typeof process<"u"&&process.nextTick||Og,Ng=n=>n!=null&&pi(n[Za]),b_=n=>n!=null&&Qa(n,Za)&&Ng(n),ve={isArray:ks,isArrayBuffer:$g,isBuffer:ha,isFormData:UC,isArrayBufferView:MC,isString:LC,isNumber:Eg,isBoolean:OC,isObject:da,isPlainObject:Xl,isEmptyObject:NC,isReadableStream:GC,isRequest:qC,isResponse:KC,isHeaders:YC,isUndefined:ua,isDate:DC,isFile:PC,isReactNativeBlob:FC,isReactNative:zC,isBlob:jC,isRegExp:c_,isFunction:pi,isStream:WC,isURLSearchParams:VC,isTypedArray:r_,isFileList:BC,forEach:el,merge:Bu,extend:JC,trim:XC,stripBOM:ZC,inherits:QC,toFlatObject:e_,kindOf:ju,kindOfTest:uo,endsWith:t_,toArray:n_,forEachEntry:i_,matchAll:o_,isHTMLForm:s_,hasOwnProperty:Kl,hasOwnProp:Kl,hasOwnInPrototypeChain:Qa,getSafeProp:IC,reduceDescriptors:Lg,freezeMethods:u_,toObjectSet:h_,toCamelCase:a_,noop:d_,toFiniteNumber:f_,findKey:Ig,global:Ss,isContextDefined:Mg,isSpecCompliantForm:p_,toJSONObject:g_,isAsyncFn:m_,isThenable:v_,setImmediate:Og,asap:y_,isIterable:Ng,isSafeIterable:b_},w_=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_=n=>{const t={};let e,r,d;return n&&n.split(`
2
+ `).forEach(function(u){d=u.indexOf(":"),e=u.substring(0,d).trim().toLowerCase(),r=u.substring(d+1).trim(),!(!e||t[e]&&w_[e])&&(e==="set-cookie"?t[e]?t[e].push(r):t[e]=[r]:t[e]=t[e]?t[e]+", "+r:r)}),t};function C_(n){let t=0,e=n.length;for(;t<e;){const r=n.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;e>t;){const r=n.charCodeAt(e-1);if(r!==9&&r!==32)break;e-=1}return t===0&&e===n.length?n:n.slice(t,e)}const __=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),A_=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Wu(n,t){return ve.isArray(n)?n.map(e=>Wu(e,t)):C_(String(n).replace(t,""))}const k_=n=>Wu(n,__),S_=n=>Wu(n,A_);function Dg(n){const t=Object.create(null);return ve.forEach(n.toJSON(),(e,r)=>{t[r]=S_(e)}),t}const Pg=Symbol("internals");function tl(n){return n&&String(n).trim().toLowerCase()}function Jl(n){return n===!1||n==null?n:ve.isArray(n)?n.map(Jl):k_(String(n))}function $_(n){const t=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=e.exec(n);)t[r[1]]=r[2];return t}const E_=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function Hu(n,t,e,r,d){if(ve.isFunction(r))return r.call(this,t,e);if(d&&(t=e),!!ve.isString(t)){if(ve.isString(r))return t.indexOf(r)!==-1;if(ve.isRegExp(r))return r.test(t)}}function T_(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,r)=>e.toUpperCase()+r)}function R_(n,t){const e=ve.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(n,r+e,{__proto__:null,value:function(d,u,f){return this[r].call(this,t,d,u,f)},configurable:!0})})}let Br=class{constructor(t){t&&this.set(t)}set(t,e,r){const d=this;function u(v,a,g){const i=tl(a);if(!i)return;const o=ve.findKey(d,i);(!o||d[o]===void 0||g===!0||g===void 0&&d[o]!==!1)&&(d[o||a]=Jl(v))}const f=(v,a)=>ve.forEach(v,(g,i)=>u(g,i,a));if(ve.isPlainObject(t)||t instanceof this.constructor)f(t,e);else if(ve.isString(t)&&(t=t.trim())&&!E_(t))f(x_(t),e);else if(ve.isObject(t)&&ve.isSafeIterable(t)){let v=Object.create(null),a,g;for(const i of t){if(!ve.isArray(i))throw new TypeError("Object iterator must return a key-value pair");g=i[0],ve.hasOwnProp(v,g)?(a=v[g],v[g]=ve.isArray(a)?[...a,i[1]]:[a,i[1]]):v[g]=i[1]}f(v,e)}else t!=null&&u(e,t,r);return this}get(t,e){if(t=tl(t),t){const r=ve.findKey(this,t);if(r){const d=this[r];if(!e)return d;if(e===!0)return $_(d);if(ve.isFunction(e))return e.call(this,d,r);if(ve.isRegExp(e))return e.exec(d);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=tl(t),t){const r=ve.findKey(this,t);return!!(r&&this[r]!==void 0&&(!e||Hu(this,this[r],r,e)))}return!1}delete(t,e){const r=this;let d=!1;function u(f){if(f=tl(f),f){const v=ve.findKey(r,f);v&&(!e||Hu(r,r[v],v,e))&&(delete r[v],d=!0)}}return ve.isArray(t)?t.forEach(u):u(t),d}clear(t){const e=Object.keys(this);let r=e.length,d=!1;for(;r--;){const u=e[r];(!t||Hu(this,this[u],u,t,!0))&&(delete this[u],d=!0)}return d}normalize(t){const e=this,r={};return ve.forEach(this,(d,u)=>{const f=ve.findKey(r,u);if(f){e[f]=Jl(d),delete e[u];return}const v=t?T_(u):String(u).trim();v!==u&&delete e[u],e[v]=Jl(d),r[v]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return ve.forEach(this,(r,d)=>{r!=null&&r!==!1&&(e[d]=t&&ve.isArray(r)?r.join(", "):r)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
3
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const r=new this(t);return e.forEach(d=>r.set(d)),r}static accessor(t){const e=(this[Pg]=this[Pg]={accessors:{}}).accessors,r=this.prototype;function d(u){const f=tl(u);e[f]||(R_(r,u),e[f]=!0)}return ve.isArray(t)?t.forEach(d):d(t),this}};Br.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ve.reduceDescriptors(Br.prototype,({value:n},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(r){this[e]=r}}}),ve.freezeMethods(Br);const I_="[REDACTED ****]";function M_(n){if(ve.hasOwnProp(n,"toJSON"))return!0;let t=Object.getPrototypeOf(n);for(;t&&t!==Object.prototype;){if(ve.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function L_(n,t){const e=new Set(t.map(u=>String(u).toLowerCase())),r=[],d=u=>{if(u===null||typeof u!="object"||ve.isBuffer(u))return u;if(r.indexOf(u)!==-1)return;u instanceof Br&&(u=u.toJSON()),r.push(u);let f;if(ve.isArray(u))f=[],u.forEach((v,a)=>{const g=d(v);ve.isUndefined(g)||(f[a]=g)});else{if(!ve.isPlainObject(u)&&M_(u))return r.pop(),u;f=Object.create(null);for(const[v,a]of Object.entries(u)){const g=e.has(v.toLowerCase())?I_:d(a);ve.isUndefined(g)||(f[v]=g)}}return r.pop(),f};return d(n)}let tt=class cC extends Error{static from(t,e,r,d,u,f){const v=new cC(t.message,e||t.code,r,d,u);return Object.defineProperty(v,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),v.name=t.name,t.status!=null&&v.status==null&&(v.status=t.status),f&&Object.assign(v,f),v}constructor(t,e,r,d,u){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,e&&(this.code=e),r&&(this.config=r),d&&(this.request=d),u&&(this.response=u,this.status=u.status)}toJSON(){const t=this.config,e=t&&ve.hasOwnProp(t,"redact")?t.redact:void 0,r=ve.isArray(e)&&e.length>0?L_(t,e):ve.toJSONObject(t);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}}};tt.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",tt.ERR_BAD_OPTION="ERR_BAD_OPTION",tt.ECONNABORTED="ECONNABORTED",tt.ETIMEDOUT="ETIMEDOUT",tt.ECONNREFUSED="ECONNREFUSED",tt.ERR_NETWORK="ERR_NETWORK",tt.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",tt.ERR_DEPRECATED="ERR_DEPRECATED",tt.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",tt.ERR_BAD_REQUEST="ERR_BAD_REQUEST",tt.ERR_CANCELED="ERR_CANCELED",tt.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",tt.ERR_INVALID_URL="ERR_INVALID_URL",tt.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const O_=null,Fg=100;function Uu(n){return ve.isPlainObject(n)||ve.isArray(n)}function zg(n){return ve.endsWith(n,"[]")?n.slice(0,-2):n}function Vu(n,t,e){return n?n.concat(t).map(function(r,d){return r=zg(r),!e&&d?"["+r+"]":r}).join(e?".":""):t}function N_(n){return ve.isArray(n)&&!n.some(Uu)}const D_=ve.toFlatObject(ve,{},null,function(n){return/^is[A-Z]/.test(n)});function Zl(n,t,e){if(!ve.isObject(n))throw new TypeError("target must be an object");t=t||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,d=e.visitor||s,u=e.dots,f=e.indexes,v=e.Blob||typeof Blob<"u"&&Blob,a=e.maxDepth===void 0?Fg:e.maxDepth,g=v&&ve.isSpecCompliantForm(t),i=[];if(!ve.isFunction(d))throw new TypeError("visitor must be a function");function o(y){if(y===null)return"";if(ve.isDate(y))return y.toISOString();if(ve.isBoolean(y))return y.toString();if(!g&&ve.isBlob(y))throw new tt("Blob is not supported. Use a Buffer instead.");if(ve.isArrayBuffer(y)||ve.isTypedArray(y)){if(g&&typeof v=="function")return new v([y]);if(typeof Buffer<"u")return Buffer.from(y);throw new tt("Blob is not supported. Use a Buffer instead.",tt.ERR_NOT_SUPPORT)}return y}function c(y){if(y>a)throw new tt("Object is too deeply nested ("+y+" levels). Max depth: "+a,tt.ERR_FORM_DATA_DEPTH_EXCEEDED)}function p(y,x){if(a===1/0)return JSON.stringify(y);const T=[];return JSON.stringify(y,function(S,_){if(!ve.isObject(_))return _;for(;T.length&&T[T.length-1]!==this;)T.pop();return T.push(_),c(x+T.length-1),_})}function s(y,x,T){let S=y;if(ve.isReactNative(t)&&ve.isReactNativeBlob(y))return t.append(Vu(T,x,u),o(y)),!1;if(y&&!T&&typeof y=="object"){if(ve.endsWith(x,"{}"))x=r?x:x.slice(0,-2),y=p(y,1);else if(ve.isArray(y)&&N_(y)||(ve.isFileList(y)||ve.endsWith(x,"[]"))&&(S=ve.toArray(y)))return x=zg(x),S.forEach(function(_,C){!(ve.isUndefined(_)||_===null)&&t.append(f===!0?Vu([x],C,u):f===null?x:x+"[]",o(_))}),!1}return Uu(y)?!0:(t.append(Vu(T,x,u),o(y)),!1)}const h=Object.assign(D_,{defaultVisitor:s,convertValue:o,isVisitable:Uu});function m(y,x,T=0){if(!ve.isUndefined(y)){if(c(T),i.indexOf(y)!==-1)throw new Error("Circular reference detected in "+x.join("."));i.push(y),ve.forEach(y,function(S,_){(!(ve.isUndefined(S)||S===null)&&d.call(t,S,ve.isString(_)?_.trim():_,x,h))===!0&&m(S,x?x.concat(_):[_],T+1)}),i.pop()}}if(!ve.isObject(n))throw new TypeError("data must be an object");return m(n),t}function jg(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(n).replace(/[!'()~]|%20/g,function(e){return t[e]})}function Gu(n,t){this._pairs=[],n&&Zl(n,this,t)}const Bg=Gu.prototype;Bg.append=function(n,t){this._pairs.push([n,t])},Bg.toString=function(n){const t=n?e=>n.call(this,e,jg):jg;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};function P_(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Wg(n,t,e){if(!t)return n;n=n||"";const r=ve.isFunction(e)?{serialize:e}:e,d=ve.getSafeProp(r,"encode")||P_,u=ve.getSafeProp(r,"serialize");let f;if(u?f=u(t,r):f=ve.isURLSearchParams(t)?t.toString():new Gu(t,r).toString(d),f){const v=n.indexOf("#");v!==-1&&(n=n.slice(0,v)),n+=(n.indexOf("?")===-1?"?":"&")+f}return n}let Hg=class{constructor(){this.handlers=[]}use(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){ve.forEach(this.handlers,function(e){e!==null&&t(e)})}};const qu={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},F_=typeof URLSearchParams<"u"?URLSearchParams:Gu,z_=typeof FormData<"u"?FormData:null,j_=typeof Blob<"u"?Blob:null,B_={isBrowser:!0,classes:{URLSearchParams:F_,FormData:z_,Blob:j_},protocols:["http","https","file","blob","url","data"]},Ku=typeof window<"u"&&typeof document<"u",Yu=typeof navigator=="object"&&navigator||void 0,W_=Ku&&(!Yu||["ReactNative","NativeScript","NS"].indexOf(Yu.product)<0),H_=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",U_=Ku&&window.location.href||"http://localhost",V_=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ku,hasStandardBrowserEnv:W_,hasStandardBrowserWebWorkerEnv:H_,navigator:Yu,origin:U_},Symbol.toStringTag,{value:"Module"})),Tr={...V_,...B_};function G_(n,t){return Zl(n,new Tr.classes.URLSearchParams,{visitor:function(e,r,d,u){return Tr.isNode&&ve.isBuffer(e)?(this.append(r,e.toString("base64")),!1):u.defaultVisitor.apply(this,arguments)},...t})}const Ug=Fg;function Vg(n){if(n>Ug)throw new tt("FormData field is too deeply nested ("+n+" levels). Max depth: "+Ug,tt.ERR_FORM_DATA_DEPTH_EXCEEDED)}function q_(n){const t=[],e=/\w+|\[(\w*)]/g;let r;for(;(r=e.exec(n))!==null;)Vg(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function K_(n){const t={},e=Object.keys(n);let r;const d=e.length;let u;for(r=0;r<d;r++)u=e[r],t[u]=n[u];return t}function Gg(n){function t(e,r,d,u){Vg(u);let f=e[u++];if(f==="__proto__")return!0;const v=Number.isFinite(+f),a=u>=e.length;return f=!f&&ve.isArray(d)?d.length:f,a?(ve.hasOwnProp(d,f)?d[f]=ve.isArray(d[f])?d[f].concat(r):[d[f],r]:d[f]=r,!v):((!ve.hasOwnProp(d,f)||!ve.isObject(d[f]))&&(d[f]=[]),t(e,r,d[f],u)&&ve.isArray(d[f])&&(d[f]=K_(d[f])),!v)}if(ve.isFormData(n)&&ve.isFunction(n.entries)){const e={};return ve.forEachEntry(n,(r,d)=>{t(q_(r),d,e,0)}),e}return null}const fa=(n,t)=>n!=null&&ve.hasOwnProp(n,t)?n[t]:void 0;function Y_(n,t,e){if(ve.isString(n))try{return(t||JSON.parse)(n),ve.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(e||JSON.stringify)(n)}const nl={transitional:qu,adapter:["xhr","http","fetch"],transformRequest:[function(n,t){const e=t.getContentType()||"",r=e.indexOf("application/json")>-1,d=ve.isObject(n);if(d&&ve.isHTMLForm(n)&&(n=new FormData(n)),ve.isFormData(n))return r?JSON.stringify(Gg(n)):n;if(ve.isArrayBuffer(n)||ve.isBuffer(n)||ve.isStream(n)||ve.isFile(n)||ve.isBlob(n)||ve.isReadableStream(n))return n;if(ve.isArrayBufferView(n))return n.buffer;if(ve.isURLSearchParams(n))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let u;if(d){const f=fa(this,"formSerializer");if(e.indexOf("application/x-www-form-urlencoded")>-1)return G_(n,f).toString();if((u=ve.isFileList(n))||e.indexOf("multipart/form-data")>-1){const v=fa(this,"env"),a=v&&v.FormData;return Zl(u?{"files[]":n}:n,a&&new a,f)}}return d||r?(t.setContentType("application/json",!1),Y_(n)):n}],transformResponse:[function(n){const t=fa(this,"transitional")||nl.transitional,e=t&&t.forcedJSONParsing,r=fa(this,"responseType"),d=r==="json";if(ve.isResponse(n)||ve.isReadableStream(n))return n;if(n&&ve.isString(n)&&(e&&!r||d)){const u=!(t&&t.silentJSONParsing)&&d;try{return JSON.parse(n,fa(this,"parseReviver"))}catch(f){if(u)throw f.name==="SyntaxError"?tt.from(f,tt.ERR_BAD_RESPONSE,this,null,fa(this,"response")):f}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Tr.classes.FormData,Blob:Tr.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ve.forEach(["delete","get","head","post","put","patch","query"],n=>{nl.headers[n]={}});function Xu(n,t){const e=this||nl,r=t||e,d=Br.from(r.headers);let u=r.data;return ve.forEach(n,function(f){u=f.call(e,u,d.normalize(),t?t.status:void 0)}),d.normalize(),u}function qg(n){return!!(n&&n.__CANCEL__)}let rl=class extends tt{constructor(t,e,r){super(t??"canceled",tt.ERR_CANCELED,e,r),this.name="CanceledError",this.__CANCEL__=!0}};function Kg(n,t,e){const r=e.config.validateStatus;!e.status||!r||r(e.status)?n(e):t(new tt("Request failed with status code "+e.status,e.status>=400&&e.status<500?tt.ERR_BAD_REQUEST:tt.ERR_BAD_RESPONSE,e.config,e.request,e))}function X_(n){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(n);return t&&t[1]||""}function J_(n,t){n=n||10;const e=new Array(n),r=new Array(n);let d=0,u=0,f;return t=t!==void 0?t:1e3,function(v){const a=Date.now(),g=r[u];f||(f=a),e[d]=v,r[d]=a;let i=u,o=0;for(;i!==d;)o+=e[i++],i=i%n;if(d=(d+1)%n,d===u&&(u=(u+1)%n),a-f<t)return;const c=g&&a-g;return c?Math.round(o*1e3/c):void 0}}function Z_(n,t){let e=0,r=1e3/t,d,u;const f=(v,a=Date.now())=>{e=a,d=null,u&&(clearTimeout(u),u=null),n(...v)};return[(...v)=>{const a=Date.now(),g=a-e;g>=r?f(v,a):(d=v,u||(u=setTimeout(()=>{u=null,f(d)},r-g)))},()=>d&&f(d)]}const Ql=(n,t,e=3)=>{let r=0;const d=J_(50,250);return Z_(u=>{if(!u||typeof u.loaded!="number")return;const f=u.loaded,v=u.lengthComputable?u.total:void 0,a=v!=null?Math.min(f,v):f,g=Math.max(0,a-r),i=d(g);r=Math.max(r,a);const o={loaded:a,total:v,progress:v?a/v:void 0,bytes:g,rate:i||void 0,estimated:i&&v?(v-a)/i:void 0,event:u,lengthComputable:v!=null,[t?"download":"upload"]:!0};n(o)},e)},Yg=(n,t)=>{const e=n!=null;return[r=>t[0]({lengthComputable:e,total:n,loaded:r}),t[1]]},Xg=n=>(...t)=>ve.asap(()=>n(...t)),Q_=Tr.hasStandardBrowserEnv?((n,t)=>e=>(e=new URL(e,Tr.origin),n.protocol===e.protocol&&n.host===e.host&&(t||n.port===e.port)))(new URL(Tr.origin),Tr.navigator&&/(msie|trident)/i.test(Tr.navigator.userAgent)):()=>!0,eA=Tr.hasStandardBrowserEnv?{write(n,t,e,r,d,u,f){if(typeof document>"u")return;const v=[`${n}=${encodeURIComponent(t)}`];ve.isNumber(e)&&v.push(`expires=${new Date(e).toUTCString()}`),ve.isString(r)&&v.push(`path=${r}`),ve.isString(d)&&v.push(`domain=${d}`),u===!0&&v.push("secure"),ve.isString(f)&&v.push(`SameSite=${f}`),document.cookie=v.join("; ")},read(n){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let e=0;e<t.length;e++){const r=t[e].replace(/^\s+/,""),d=r.indexOf("=");if(d!==-1&&r.slice(0,d)===n)try{return decodeURIComponent(r.slice(d+1))}catch{return r.slice(d+1)}}return null},remove(n){this.write(n,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function tA(n){return typeof n!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function nA(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}const rA=/^https?:(?!\/\/)/i,iA=/[\t\n\r]/g;function oA(n){let t=0;for(;t<n.length&&n.charCodeAt(t)<=32;)t++;return n.slice(t)}function sA(n){return oA(n).replace(iA,"")}function Jg(n,t){if(typeof n=="string"&&rA.test(sA(n)))throw new tt('Invalid URL: missing "//" after protocol',tt.ERR_INVALID_URL,t)}function Zg(n,t,e,r){Jg(t,r);let d=!tA(t);return n&&(d||e===!1)?(Jg(n,r),nA(n,t)):t}const Qg=n=>n instanceof Br?{...n}:n;function $s(n,t){n=n||{},t=t||{};const e=Object.create(null);Object.defineProperty(e,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(i,o,c,p){return ve.isPlainObject(i)&&ve.isPlainObject(o)?ve.merge.call({caseless:p},i,o):ve.isPlainObject(o)?ve.merge({},o):ve.isArray(o)?o.slice():o}function d(i,o,c,p){if(ve.isUndefined(o)){if(!ve.isUndefined(i))return r(void 0,i,c,p)}else return r(i,o,c,p)}function u(i,o){if(!ve.isUndefined(o))return r(void 0,o)}function f(i,o){if(ve.isUndefined(o)){if(!ve.isUndefined(i))return r(void 0,i)}else return r(void 0,o)}function v(i){const o=ve.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!ve.isUndefined(o))if(ve.isPlainObject(o)){if(ve.hasOwnProp(o,i))return o[i]}else return;const c=ve.hasOwnProp(n,"transitional")?n.transitional:void 0;if(ve.isPlainObject(c)&&ve.hasOwnProp(c,i))return c[i]}function a(i,o,c){if(ve.hasOwnProp(t,c))return r(i,o);if(ve.hasOwnProp(n,c))return r(void 0,i)}const g={url:u,method:u,data:u,baseURL:f,transformRequest:f,transformResponse:f,paramsSerializer:f,timeout:f,timeoutMessage:f,withCredentials:f,withXSRFToken:f,adapter:f,responseType:f,xsrfCookieName:f,xsrfHeaderName:f,onUploadProgress:f,onDownloadProgress:f,decompress:f,maxContentLength:f,maxBodyLength:f,beforeRedirect:f,transport:f,httpAgent:f,httpsAgent:f,cancelToken:f,socketPath:f,allowedSocketPaths:f,responseEncoding:f,validateStatus:a,headers:(i,o,c)=>d(Qg(i),Qg(o),c,!0)};return ve.forEach(Object.keys({...n,...t}),function(i){if(i==="__proto__"||i==="constructor"||i==="prototype")return;const o=ve.hasOwnProp(g,i)?g[i]:d,c=ve.hasOwnProp(n,i)?n[i]:void 0,p=ve.hasOwnProp(t,i)?t[i]:void 0,s=o(c,p,i);ve.isUndefined(s)&&o!==a||(e[i]=s)}),ve.hasOwnProp(t,"validateStatus")&&ve.isUndefined(t.validateStatus)&&v("validateStatusUndefinedResolves")===!1&&(ve.hasOwnProp(n,"validateStatus")?e.validateStatus=r(void 0,n.validateStatus):delete e.validateStatus),e}const aA=["content-type","content-length"];function lA(n,t,e){if(e!=="content-only"){n.set(t);return}Object.entries(t||{}).forEach(([r,d])=>{aA.includes(r.toLowerCase())&&n.set(r,d)})}const cA=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,e)=>String.fromCharCode(parseInt(e,16)));function em(n){const t=$s({},n),e=c=>ve.hasOwnProp(t,c)?t[c]:void 0,r=e("data");let d=e("withXSRFToken");const u=e("xsrfHeaderName"),f=e("xsrfCookieName");let v=e("headers");const a=e("auth"),g=e("baseURL"),i=e("allowAbsoluteUrls"),o=e("url");if(t.headers=v=Br.from(v),t.url=Wg(Zg(g,o,i,t),e("params"),e("paramsSerializer")),a){const c=ve.getSafeProp(a,"username")||"",p=ve.getSafeProp(a,"password")||"";try{v.set("Authorization","Basic "+btoa(c+":"+(p?cA(p):"")))}catch(s){throw tt.from(s,tt.ERR_BAD_OPTION_VALUE,n)}}if(ve.isFormData(r)&&(Tr.hasStandardBrowserEnv||Tr.hasStandardBrowserWebWorkerEnv||ve.isReactNative(r)?v.setContentType(void 0):ve.isFunction(r.getHeaders)&&lA(v,r.getHeaders(),e("formDataHeaderPolicy"))),Tr.hasStandardBrowserEnv&&(ve.isFunction(d)&&(d=d(t)),d===!0||d==null&&Q_(t.url))){const c=u&&f&&eA.read(f);c&&v.set(u,c)}return t}const uA=typeof XMLHttpRequest<"u",hA=uA&&function(n){return new Promise(function(t,e){const r=em(n);let d=r.data;const u=Br.from(r.headers).normalize();let{responseType:f,onUploadProgress:v,onDownloadProgress:a}=r,g,i,o,c,p;function s(){c&&c(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(g),r.signal&&r.signal.removeEventListener("abort",g)}let h=new XMLHttpRequest;h.open(r.method.toUpperCase(),r.url,!0),h.timeout=r.timeout;function m(){if(!h)return;const x=Br.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),T={data:!f||f==="text"||f==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:x,config:n,request:h};Kg(function(S){t(S),s()},function(S){e(S),s()},T),h=null}"onloadend"in h?h.onloadend=m:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.startsWith("file:"))||setTimeout(m)},h.onabort=function(){h&&(e(new tt("Request aborted",tt.ECONNABORTED,n,h)),s(),h=null)},h.onerror=function(x){const T=x&&x.message?x.message:"Network Error",S=new tt(T,tt.ERR_NETWORK,n,h);S.event=x||null,e(S),s(),h=null},h.ontimeout=function(){let x=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const T=r.transitional||qu;r.timeoutErrorMessage&&(x=r.timeoutErrorMessage),e(new tt(x,T.clarifyTimeoutError?tt.ETIMEDOUT:tt.ECONNABORTED,n,h)),s(),h=null},d===void 0&&u.setContentType(null),"setRequestHeader"in h&&ve.forEach(Dg(u),function(x,T){h.setRequestHeader(T,x)}),ve.isUndefined(r.withCredentials)||(h.withCredentials=!!r.withCredentials),f&&f!=="json"&&(h.responseType=r.responseType),a&&([o,p]=Ql(a,!0),h.addEventListener("progress",o)),v&&h.upload&&([i,c]=Ql(v),h.upload.addEventListener("progress",i),h.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(g=x=>{h&&(e(!x||x.type?new rl(null,n,h):x),h.abort(),s(),h=null)},r.cancelToken&&r.cancelToken.subscribe(g),r.signal&&(r.signal.aborted?g():r.signal.addEventListener("abort",g)));const y=X_(r.url);if(y&&!Tr.protocols.includes(y)){e(new tt("Unsupported protocol "+y+":",tt.ERR_BAD_REQUEST,n)),s();return}h.send(d||null)})},dA=(n,t)=>{if(n=n?n.filter(Boolean):[],!t&&!n.length)return;const e=new AbortController;let r=!1;const d=function(a){if(!r){r=!0,f();const g=a instanceof Error?a:this.reason;e.abort(g instanceof tt?g:new rl(g instanceof Error?g.message:g))}};let u=t&&setTimeout(()=>{u=null,d(new tt(`timeout of ${t}ms exceeded`,tt.ETIMEDOUT))},t);const f=()=>{n&&(u&&clearTimeout(u),u=null,n.forEach(a=>{a.unsubscribe?a.unsubscribe(d):a.removeEventListener("abort",d)}),n=null)};n.forEach(a=>a.addEventListener("abort",d,{once:!0}));const{signal:v}=e;return v.unsubscribe=()=>ve.asap(f),v},fA=function*(n,t){let e=n.byteLength;if(e<t){yield n;return}let r=0,d;for(;r<e;)d=r+t,yield n.slice(r,d),r=d},pA=async function*(n,t){for await(const e of gA(n))yield*fA(e,t)},gA=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const t=n.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},tm=(n,t,e,r)=>{const d=pA(n,t);let u=0,f,v=a=>{f||(f=!0,r&&r(a))};return new ReadableStream({async pull(a){try{const{done:g,value:i}=await d.next();if(g){v(),a.close();return}let o=i.byteLength;if(e){let c=u+=o;e(c)}a.enqueue(new Uint8Array(i))}catch(g){throw v(g),g}},cancel(a){return v(a),d.return()}},{highWaterMark:2})},ec=n=>n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102,mA=(n,t,e)=>t+2<e&&ec(n.charCodeAt(t+1))&&ec(n.charCodeAt(t+2));function vA(n){if(!n||typeof n!="string"||!n.startsWith("data:"))return 0;const t=n.indexOf(",");if(t<0)return 0;const e=n.slice(5,t),r=n.slice(t+1);if(/;base64/i.test(e)){let u=r.length;const f=r.length;for(let o=0;o<f;o++)if(r.charCodeAt(o)===37&&o+2<f){const c=r.charCodeAt(o+1),p=r.charCodeAt(o+2);ec(c)&&ec(p)&&(u-=2,o+=2)}let v=0,a=f-1;const g=o=>o>=2&&r.charCodeAt(o-2)===37&&r.charCodeAt(o-1)===51&&(r.charCodeAt(o)===68||r.charCodeAt(o)===100);a>=0&&(r.charCodeAt(a)===61?(v++,a--):g(a)&&(v++,a-=3)),v===1&&a>=0&&(r.charCodeAt(a)===61||g(a))&&v++;const i=Math.floor(u/4)*3-(v||0);return i>0?i:0}let d=0;for(let u=0,f=r.length;u<f;u++){const v=r.charCodeAt(u);if(v===37&&mA(r,u,f))d+=1,u+=2;else if(v<128)d+=1;else if(v<2048)d+=2;else if(v>=55296&&v<=56319&&u+1<f){const a=r.charCodeAt(u+1);a>=56320&&a<=57343?(d+=4,u++):d+=3}else d+=3}return d}const Ju="1.18.1",nm=64*1024,{isFunction:tc}=ve,yA=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,e)=>String.fromCharCode(parseInt(e,16))),rm=n=>{if(!ve.isString(n))return n;try{return decodeURIComponent(n)}catch{return n}},im=(n,...t)=>{try{return!!n(...t)}catch{return!1}},bA=n=>{const t=n.indexOf("://");let e=n;return t!==-1&&(e=e.slice(t+3)),e.includes("@")||e.includes(":")},wA=n=>{const t=ve.global!==void 0&&ve.global!==null?ve.global:globalThis,{ReadableStream:e,TextEncoder:r}=t;n=ve.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},n);const{fetch:d,Request:u,Response:f}=n,v=d?tc(d):typeof fetch=="function",a=tc(u),g=tc(f);if(!v)return!1;const i=v&&tc(e),o=v&&(typeof r=="function"?(y=>x=>y.encode(x))(new r):async y=>new Uint8Array(await new u(y).arrayBuffer())),c=a&&i&&im(()=>{let y=!1;const x=new u(Tr.origin,{body:new e,method:"POST",get duplex(){return y=!0,"half"}}),T=x.headers.has("Content-Type");return x.body!=null&&x.body.cancel(),y&&!T}),p=g&&i&&im(()=>ve.isReadableStream(new f("").body)),s={stream:p&&(y=>y.body)};v&&["text","arrayBuffer","blob","formData","stream"].forEach(y=>{!s[y]&&(s[y]=(x,T)=>{let S=x&&x[y];if(S)return S.call(x);throw new tt(`Response type '${y}' is not supported`,tt.ERR_NOT_SUPPORT,T)})});const h=async y=>{if(y==null)return 0;if(ve.isBlob(y))return y.size;if(ve.isSpecCompliantForm(y))return(await new u(Tr.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 o(y)).byteLength},m=async(y,x)=>ve.toFiniteNumber(y.getContentLength())??h(x);return async y=>{let{url:x,method:T,data:S,signal:_,cancelToken:C,timeout:L,onDownloadProgress:O,onUploadProgress:M,responseType:I,headers:B,withCredentials:F="same-origin",fetchOptions:N,maxContentLength:E,maxBodyLength:A}=em(y);const D=ve.isNumber(E)&&E>-1,j=ve.isNumber(A)&&A>-1,W=ne=>ve.hasOwnProp(y,ne)?y[ne]:void 0;let V=d||fetch;I=I?(I+"").toLowerCase():"text";let K=dA([_,C&&C.toAbortSignal()],L),X=null;const oe=K&&K.unsubscribe&&(()=>{K.unsubscribe()});let ee,le=null;const ue=()=>new tt("Request body larger than maxBodyLength limit",tt.ERR_BAD_REQUEST,y,X);try{let ne;const fe=W("auth");if(fe){const Ie=ve.getSafeProp(fe,"username")||"",Mt=ve.getSafeProp(fe,"password")||"";ne={username:Ie,password:Mt}}if(bA(x)){const Ie=new URL(x,Tr.origin);if(!ne&&(Ie.username||Ie.password)){const Mt=rm(Ie.username),dt=rm(Ie.password);ne={username:Mt,password:dt}}(Ie.username||Ie.password)&&(Ie.username="",Ie.password="",x=Ie.href)}if(ne&&(B.delete("authorization"),B.set("Authorization","Basic "+btoa(yA((ne.username||"")+":"+(ne.password||""))))),D&&typeof x=="string"&&x.startsWith("data:")&&vA(x)>E)throw new tt("maxContentLength size of "+E+" exceeded",tt.ERR_BAD_RESPONSE,y,X);if(j&&T!=="get"&&T!=="head"){const Ie=await h(S);if(typeof Ie=="number"&&isFinite(Ie)&&(ee=Ie,Ie>A))throw ue()}const Se=j&&(ve.isReadableStream(S)||ve.isStream(S)),Te=(Ie,Mt,dt)=>tm(Ie,nm,tn=>{if(j&&tn>A)throw le=ue();Mt&&Mt(tn)},dt);if(c&&T!=="get"&&T!=="head"&&(M||Se)){if(ee=ee??await m(B,S),ee!==0||Se){let Ie=new u(x,{method:"POST",body:S,duplex:"half"}),Mt;if(ve.isFormData(S)&&(Mt=Ie.headers.get("content-type"))&&B.setContentType(Mt),Ie.body){const[dt,tn]=M&&Yg(ee,Ql(Xg(M)))||[];S=Te(Ie.body,dt,tn)}}}else if(Se&&!a&&i&&T!=="get"&&T!=="head")S=Te(S);else if(Se&&a&&!c&&T!=="get"&&T!=="head")throw new tt("Stream request bodies are not supported by the current fetch implementation",tt.ERR_NOT_SUPPORT,y,X);ve.isString(F)||(F=F?"include":"omit");const Re=a&&"credentials"in u.prototype;if(ve.isFormData(S)){const Ie=B.getContentType();Ie&&/^multipart\/form-data/i.test(Ie)&&!/boundary=/i.test(Ie)&&B.delete("content-type")}B.set("User-Agent","axios/"+Ju,!1);const Ve={...N,signal:K,method:T.toUpperCase(),headers:Dg(B.normalize()),body:S,duplex:"half",credentials:Re?F:void 0};X=a&&new u(x,Ve);let Ue=await(a?V(X,N):V(x,Ve));const Xe=Br.from(Ue.headers);if(D){const Ie=ve.toFiniteNumber(Xe.getContentLength());if(Ie!=null&&Ie>E)throw new tt("maxContentLength size of "+E+" exceeded",tt.ERR_BAD_RESPONSE,y,X)}const ft=p&&(I==="stream"||I==="response");if(p&&Ue.body&&(O||D||ft&&oe)){const Ie={};["status","statusText","headers"].forEach(Bt=>{Ie[Bt]=Ue[Bt]});const Mt=ve.toFiniteNumber(Xe.getContentLength()),[dt,tn]=O&&Yg(Mt,Ql(Xg(O),!0))||[];let mn=0;const rr=Bt=>{if(D&&(mn=Bt,mn>E))throw new tt("maxContentLength size of "+E+" exceeded",tt.ERR_BAD_RESPONSE,y,X);dt&&dt(Bt)};Ue=new f(tm(Ue.body,nm,rr,()=>{tn&&tn(),oe&&oe()}),Ie)}I=I||"text";let We=await s[ve.findKey(s,I)||"text"](Ue,y);if(D&&!p&&!ft){let Ie;if(We!=null&&(typeof We.byteLength=="number"?Ie=We.byteLength:typeof We.size=="number"?Ie=We.size:typeof We=="string"&&(Ie=typeof r=="function"?new r().encode(We).byteLength:We.length)),typeof Ie=="number"&&Ie>E)throw new tt("maxContentLength size of "+E+" exceeded",tt.ERR_BAD_RESPONSE,y,X)}return!ft&&oe&&oe(),await new Promise((Ie,Mt)=>{Kg(Ie,Mt,{data:We,headers:Br.from(Ue.headers),status:Ue.status,statusText:Ue.statusText,config:y,request:X})})}catch(ne){if(oe&&oe(),K&&K.aborted&&K.reason instanceof tt){const fe=K.reason;throw fe.config=y,X&&(fe.request=X),ne!==fe&&Object.defineProperty(fe,"cause",{__proto__:null,value:ne,writable:!0,enumerable:!1,configurable:!0}),fe}if(le)throw X&&!le.request&&(le.request=X),le;if(ne instanceof tt)throw X&&!ne.request&&(ne.request=X),ne;if(ne&&ne.name==="TypeError"&&/Load failed|fetch/i.test(ne.message)){const fe=new tt("Network Error",tt.ERR_NETWORK,y,X,ne&&ne.response);throw Object.defineProperty(fe,"cause",{__proto__:null,value:ne.cause||ne,writable:!0,enumerable:!1,configurable:!0}),fe}throw tt.from(ne,ne&&ne.code,y,X,ne&&ne.response)}}},xA=new Map,om=n=>{let t=n&&n.env||{};const{fetch:e,Request:r,Response:d}=t,u=[r,d,e];let f=u.length,v=f,a,g,i=xA;for(;v--;)a=u[v],g=i.get(a),g===void 0&&i.set(a,g=v?new Map:wA(t)),i=g;return g};om();const Zu={http:O_,xhr:hA,fetch:{get:om}};ve.forEach(Zu,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(n,"adapterName",{__proto__:null,value:t})}});const sm=n=>`- ${n}`,CA=n=>ve.isFunction(n)||n===null||n===!1;function _A(n,t){n=ve.isArray(n)?n:[n];const{length:e}=n;let r,d;const u={};for(let f=0;f<e;f++){r=n[f];let v;if(d=r,!CA(r)&&(d=Zu[(v=String(r)).toLowerCase()],d===void 0))throw new tt(`Unknown adapter '${v}'`);if(d&&(ve.isFunction(d)||(d=d.get(t))))break;u[v||"#"+f]=d}if(!d){const f=Object.entries(u).map(([a,g])=>`adapter ${a} `+(g===!1?"is not supported by the environment":"is not available in the build"));let v=e?f.length>1?`since :
4
+ `+f.map(sm).join(`
5
+ `):" "+sm(f[0]):"as no adapter specified";throw new tt("There is no suitable adapter to dispatch the request "+v,tt.ERR_NOT_SUPPORT)}return d}const am={getAdapter:_A,adapters:Zu};function Qu(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new rl(null,n)}function lm(n){return Qu(n),n.headers=Br.from(n.headers),n.data=Xu.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),am.getAdapter(n.adapter||nl.adapter,n)(n).then(function(t){Qu(n),n.response=t;try{t.data=Xu.call(n,n.transformResponse,t)}finally{delete n.response}return t.headers=Br.from(t.headers),t},function(t){if(!qg(t)&&(Qu(n),t&&t.response)){n.response=t.response;try{t.response.data=Xu.call(n,n.transformResponse,t.response)}finally{delete n.response}t.response.headers=Br.from(t.response.headers)}return Promise.reject(t)})}const nc={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{nc[n]=function(e){return typeof e===n||"a"+(t<1?"n ":" ")+n}});const cm={};nc.transitional=function(n,t,e){function r(d,u){return"[Axios v"+Ju+"] Transitional option '"+d+"'"+u+(e?". "+e:"")}return(d,u,f)=>{if(n===!1)throw new tt(r(u," has been removed"+(t?" in "+t:"")),tt.ERR_DEPRECATED);return t&&!cm[u]&&(cm[u]=!0,console.warn(r(u," has been deprecated since v"+t+" and will be removed in the near future"))),n?n(d,u,f):!0}},nc.spelling=function(n){return(t,e)=>(console.warn(`${e} is likely a misspelling of ${n}`),!0)};function AA(n,t,e){if(typeof n!="object"||n===null)throw new tt("options must be an object",tt.ERR_BAD_OPTION_VALUE);const r=Object.keys(n);let d=r.length;for(;d-- >0;){const u=r[d],f=Object.prototype.hasOwnProperty.call(t,u)?t[u]:void 0;if(f){const v=n[u],a=v===void 0||f(v,u,n);if(a!==!0)throw new tt("option "+u+" must be "+a,tt.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new tt("Unknown option "+u,tt.ERR_BAD_OPTION)}}const rc={assertOptions:AA,validators:nc},Wr=rc.validators;let Es=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Hg,response:new Hg}}async request(t,e){try{return await this._request(t,e)}catch(r){if(r instanceof Error){let d={};Error.captureStackTrace?Error.captureStackTrace(d):d=new Error;const u=(()=>{if(!d.stack)return"";const f=d.stack.indexOf(`
6
+ `);return f===-1?"":d.stack.slice(f+1)})();try{if(!r.stack)r.stack=u;else if(u){const f=u.indexOf(`
7
+ `),v=f===-1?-1:u.indexOf(`
8
+ `,f+1),a=v===-1?"":u.slice(v+1);String(r.stack).endsWith(a)||(r.stack+=`
9
+ `+u)}}catch{}}throw r}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=$s(this.defaults,e);const{transitional:r,paramsSerializer:d,headers:u}=e;r!==void 0&&rc.assertOptions(r,{silentJSONParsing:Wr.transitional(Wr.boolean),forcedJSONParsing:Wr.transitional(Wr.boolean),clarifyTimeoutError:Wr.transitional(Wr.boolean),legacyInterceptorReqResOrdering:Wr.transitional(Wr.boolean),advertiseZstdAcceptEncoding:Wr.transitional(Wr.boolean),validateStatusUndefinedResolves:Wr.transitional(Wr.boolean)},!1),d!=null&&(ve.isFunction(d)?e.paramsSerializer={serialize:d}:rc.assertOptions(d,{encode:Wr.function,serialize:Wr.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),rc.assertOptions(e,{baseUrl:Wr.spelling("baseURL"),withXsrfToken:Wr.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let f=u&&ve.merge(u.common,u[e.method]);u&&ve.forEach(["delete","get","head","post","put","patch","query","common"],s=>{delete u[s]}),e.headers=Br.concat(f,u);const v=[];let a=!0;this.interceptors.request.forEach(function(s){if(typeof s.runWhen=="function"&&s.runWhen(e)===!1)return;a=a&&s.synchronous;const h=e.transitional||qu;h&&h.legacyInterceptorReqResOrdering?v.unshift(s.fulfilled,s.rejected):v.push(s.fulfilled,s.rejected)});const g=[];this.interceptors.response.forEach(function(s){g.push(s.fulfilled,s.rejected)});let i,o=0,c;if(!a){const s=[lm.bind(this),void 0];for(s.unshift(...v),s.push(...g),c=s.length,i=Promise.resolve(e);o<c;)i=i.then(s[o++],s[o++]);return i}c=v.length;let p=e;for(;o<c;){const s=v[o++],h=v[o++];try{p=s(p)}catch(m){h.call(this,m);break}}try{i=lm.call(this,p)}catch(s){return Promise.reject(s)}for(o=0,c=g.length;o<c;)i=i.then(g[o++],g[o++]);return i}getUri(t){t=$s(this.defaults,t);const e=Zg(t.baseURL,t.url,t.allowAbsoluteUrls,t);return Wg(e,t.params,t.paramsSerializer)}};ve.forEach(["delete","get","head","options"],function(n){Es.prototype[n]=function(t,e){return this.request($s(e||{},{method:n,url:t,data:e&&ve.hasOwnProp(e,"data")?e.data:void 0}))}}),ve.forEach(["post","put","patch","query"],function(n){function t(e){return function(r,d,u){return this.request($s(u||{},{method:n,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:d}))}}Es.prototype[n]=t(),n!=="query"&&(Es.prototype[n+"Form"]=t(!0))});let kA=class uC{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(d){e=d});const r=this;this.promise.then(d=>{if(!r._listeners)return;let u=r._listeners.length;for(;u-- >0;)r._listeners[u](d);r._listeners=null}),this.promise.then=d=>{let u;const f=new Promise(v=>{r.subscribe(v),u=v}).then(d);return f.cancel=function(){r.unsubscribe(u)},f},t(function(d,u,f){r.reason||(r.reason=new rl(d,u,f),e(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=r=>{t.abort(r)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new uC(function(e){t=e}),cancel:t}}};function SA(n){return function(t){return n.apply(null,t)}}function $A(n){return ve.isObject(n)&&n.isAxiosError===!0}const eh={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(eh).forEach(([n,t])=>{eh[t]=n});function um(n){const t=new Es(n),e=kg(Es.prototype.request,t);return ve.extend(e,Es.prototype,t,{allOwnKeys:!0}),ve.extend(e,t,null,{allOwnKeys:!0}),e.create=function(r){return um($s(n,r))},e}const tr=um(nl);tr.Axios=Es,tr.CanceledError=rl,tr.CancelToken=kA,tr.isCancel=qg,tr.VERSION=Ju,tr.toFormData=Zl,tr.AxiosError=tt,tr.Cancel=tr.CanceledError,tr.all=function(n){return Promise.all(n)},tr.spread=SA,tr.isAxiosError=$A,tr.mergeConfig=$s,tr.AxiosHeaders=Br,tr.formToJSON=n=>Gg(ve.isHTMLForm(n)?new FormData(n):n),tr.getAdapter=am.getAdapter,tr.HttpStatusCode=eh,tr.default=tr;const{Axios:Rj,AxiosError:Ij,CanceledError:Mj,isCancel:Lj,CancelToken:Oj,VERSION:Nj,all:Dj,Cancel:Pj,isAxiosError:Fj,spread:zj,toFormData:jj,AxiosHeaders:Bj,HttpStatusCode:Wj,formToJSON:Hj,getAdapter:Uj,mergeConfig:Vj,create:Gj}=tr,th=tr.create({baseURL:location.origin,timeout:6e4,params:{}});th.interceptors.response.use(n=>n,n=>{if(n.response){if(n.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(r){r&&OpenC3Auth.setTokens()}),n.response.config.headers["Ignore-Errors"]&&n.response.config.headers["Ignore-Errors"].includes(n.response.status.toString()))return Promise.reject(n);let t=`HTTP ${n.response.status} - `;n.response?.statusText&&(t+=`${n.response.statusText} `),n.response?.config?.data&&(t+=`${n.response.config.data} `),n.response?.data?.message?t+=`${n.response.data.message}`:n.response?.data?.exception?t+=`${n.response.data.exception}`:n.response?.data?.error?.message?(n.response.data.error.class&&(t+=`${n.response.data.error.class} `),t+=`${n.response.data.error.message}`):t+=`${n.response?.data}`;const{$cosmosNotify:e}=window;throw e&&e.serious({title:"Network error",body:t}),n}else throw n});const ic=async function(n,t,{data:e,params:r={},headers:d,noAuth:u=!1,noScope:f=!1,onUploadProgress:v=!1}={}){if(!u){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}d.Authorization=localStorage.openc3Token}return d.manual=!0,!f&&!r.scope&&(r.scope=window.openc3Scope),th({method:n,url:t,data:e,params:r,headers:d,onUploadProgress:v})},nh={Accept:"application/json"},hm={...nh,"Content-Type":"application/json"},dm=Nn("D",{get:function(n,{params:t,headers:e=nh,noScope:r,noAuth:d,onUploadProgress:u}={}){return ic("get",n,{params:t,headers:e,noScope:r,noAuth:d,onUploadProgress:u})},put:function(n,{data:t,params:e,headers:r=hm,noScope:d,noAuth:u,onUploadProgress:f}={}){return ic("put",n,{data:t,params:e,headers:r,noScope:d,noAuth:u,onUploadProgress:f})},post:function(n,{data:t,params:e,headers:r=hm,noScope:d,noAuth:u,onUploadProgress:f}={}){return ic("post",n,{data:t,params:e,headers:r,noScope:d,noAuth:u,onUploadProgress:f})},delete:function(n,{params:t,headers:e=nh,noScope:r,noAuth:d,onUploadProgress:u}={}){return ic("delete",n,{params:t,headers:e,noScope:r,noAuth:d,onUploadProgress:u})}});let oc=()=>({emit(n,...t){for(let e=this.events[n]||[],r=0,d=e.length;r<d;r++)e[r](...t)},events:{},on(n,t){return(this.events[n]||=[]).push(t),()=>{this.events[n]=this.events[n]?.filter(e=>t!==e)}}}),il=class extends Error{constructor(t,e){t instanceof Error?(super(t.message),this.cause=t):super(t),this.reason=e,this.name="ReasonError"}},rh=class extends il{constructor(t){super("Rejected",t),this.name="SubscriptionRejectedError"}};class EA extends il{constructor(t){super(t||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}let ho=class extends il{constructor(t,e){e?super(t,e):super("Disconnected",t),this.name="DisconnectedError"}};class TA extends ho{constructor(t){super(t,"stale_connection"),this.name="StaleConnectionError"}}function fm(n){return n?`{${Object.keys(n).sort().filter(t=>n[t]!==void 0).map(t=>{let e=JSON.stringify(n[t]);return`${JSON.stringify(t)}:${e}`}).join(",")}}`:""}let RA=class{constructor(t){this.channel=t,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",t=>{if(t.type==="info"){this._state||(this._state=this.stateFromInfo(t));return}this._state&&(t.type==="join"?this._state[t.id]=t.info:t.type==="leave"&&delete this._state[t.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(t=>t()),this.listeners.length=0}async join(t,e){if(!this._info)return this._info={id:String(t),info:e},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let t=await this.channel.perform("$presence:leave");return delete this._info,t}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let t=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(t),this._state}finally{delete this._promise}}stateFromInfo(t){return t.records.reduce((e,{id:r,info:d})=>(e[r]=d,e),{})}};const Ts=Symbol("state");let pm=class{constructor(t={}){this.emitter=oc(),this.params=Object.freeze(t),this.presence=new RA(this),this.initialConnect=!0,this[Ts]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=fm({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[Ts]}attached(t){if(this.receiver){if(this.receiver!==t)throw Error("Already connected to a different receiver");return!1}return this.receiver=t,!0}connecting(){this[Ts]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[Ts]="connected";let t=!1;this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:t})):this.emit("connect",{reconnect:!0,restored:t})}restored(){if(this.state==="connected")throw Error("Already connected");this[Ts]="connected";let t=!0,e=!0;this.initialConnect=!1,this.emit("connect",{reconnect:e,restored:t})}disconnected(t){this.state==="disconnected"||this.state==="closed"||(this[Ts]="disconnected",this.presence.reset(),this.emit("disconnect",t))}closed(t){this.state!=="closed"&&(this[Ts]="closed",delete this.receiver,this.initialConnect=!0,this.presence.dispose(),this.emit("close",t))}disconnect(){this.state==="idle"||this.state==="closed"||this.receiver.unsubscribe(this)}async perform(t,e){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,t,e)}async send(t){return this.perform(void 0,t)}async whisper(t){try{await this.perform("$whisper",t)}catch(e){let r=this.receiver?this.receiver.logger:null;r&&r.warn("whisper failed: ",e)}}receive(t,e){this.emit("message",t,e)}on(t,e){return this.emitter.on(t,e)}once(t,e){let r=this.emitter.on(t,(...d)=>{r(),e(...d)});return r}emit(t,...e){return this.emitter.emit(t,...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((t,e)=>{let r=[()=>delete this._pendingSubscribe];r.push(this.on("connect",()=>{r.forEach(d=>d()),t()})),r.push(this.on("close",d=>{r.forEach(u=>u()),e(d||new il("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}},IA=class{constructor(t){this.id=t,this.intent="unsubscribed",this.state="idle",this.channels=[],this.disposed=!1,this._pendings=[]}add(t){this.channels.includes(t)||this.channels.push(t)}remove(t){let e=this.channels.indexOf(t);e>-1&&this.channels.splice(e,1)}notify(t,...e){this.state=t==="restored"?"connected":t,e.length===1?this.channels.forEach(r=>r[t](e[0])):this.channels.forEach(r=>r[t]())}pending(t){this._checkIntent(t);let e=this._pendings[0];return!e||e.intent!==t?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(t){this._checkIntent(t);let e,r={promise:new Promise(u=>{e=u}),intent:t,release:()=>{this._pendings.splice(this._pendings.indexOf(r),1),e(r)},canceled:!1,acquired:!1},d=this._pendingTop;return this._pendings.push(r),d&&await d.promise,this.gvl&&await this.gvl.acquire(r,t),r.acquired=!0,r}close(t){this.disposed=!0,this.intent=void 0,this.notify("closed",t)}_checkIntent(t){if(!(t==="unsubscribed"||t==="subscribed"))throw Error(`Unknown subscription intent: ${t}`)}get _pendingTop(){return this._pendings.length?this._pendings[this._pendings.length-1]:void 0}_mergeWithPending(t){let e=this._pendingTop;return!e||e.acquired||e.intent!==t?!1:(this._pendings.pop(),e.canceled=!0,!0)}},MA=class{constructor(){this.queue=[]}async acquire(t,e){e==="subscribed"&&(this.queue.push(t.promise.then(()=>{this.queue.splice(this.queue.indexOf(t),1)})),this.queue.length>1&&await this.queue[this.queue.length-2])}},LA=class{constructor(t){t.concurrentSubscribes===!1&&(this.glv=new MA),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(t){return this._subscriptions[t]}create(t,{subscribe:e,unsubscribe:r}){let d=this._subscriptions[t]=new IA(t);return d.remoteId=this._localToRemote[t],d.subscriber=e,d.unsubscriber=r,d.gvl=this.glv,d}remove(t){delete this._subscriptions[t],delete this._localToRemote[t]}storeRemoteId(t,e){this._localToRemote[t]=e;let r=this.get(t);r&&(r.remoteId=e)}},OA=class{constructor(t={}){this.subscriptions=new LA(t),this._pendingMessages=[],this._remoteToLocal={}}subscribe(t,e){this._remoteToLocal[e]=t,this.subscriptions.storeRemoteId(t,e),this.flush(e)}unsubscribe(t){let e=this.subscriptions.get(t);if(!e)return;let r=e.remoteId;r&&delete this._remoteToLocal[r],this.subscriptions.remove(t)}transmit(t,e,r){let d=this._remoteToLocal[t];if(!d){this._pendingMessages.push([t,e,r]);return}let u=this.subscriptions.get(d);u&&u.channels.forEach(f=>{f.receive(e,r)})}notify(t,e,r){let d=this._remoteToLocal[t];if(!d)return;let u=this.subscriptions.get(d);u&&u.channels.forEach(f=>f.emit(e,r))}close(){this._pendingMessages.length=0}get size(){return this.channels.length}get channels(){return this.subscriptions.all().flatMap(t=>t.channels)}flush(t){let e=[];for(let r of this._pendingMessages)r[0]===t?this.transmit(r[0],r[1],r[2]):e.push(r);this._pendingMessages=e}};const gm={debug:0,info:1,warn:2,error:3};let mm=class{constructor(t){this.level=t||"warn"}log(t,e,r){gm[t]<gm[this.level]||this.writeLogEntry(t,e,r)}writeLogEntry(){throw Error("Not implemented")}debug(t,e){this.log("debug",t,e)}info(t,e){this.log("info",t,e)}warn(t,e){this.log("warn",t,e)}error(t,e){this.log("error",t,e)}},ol=class extends mm{writeLogEntry(){}},NA=class{encode(t){return JSON.stringify(t)}decode(t){try{return JSON.parse(t)}catch{}}},DA=0,vm=class{constructor(t={}){let{logger:e}=t;this.logger=e||new ol,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=t.subscribeCooldownInterval||250,this.subscribeRetryInterval=t.subscribeRetryInterval||5e3}attached(t){this.cable=t}subscribe(t,e){let r={channel:t};e&&Object.assign(r,e);let d=fm(r);if(this.pendingUnsubscriptions[d]){let f=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${f}`,d),new Promise(v=>{setTimeout(()=>{v(this.subscribe(t,e))},f)})}if(this.pendingSubscriptions[d])return this.logger.warn("subscription is already pending, skipping",d),Promise.reject(Error("Already subscribing"));let u=this.subscribeRetryInterval;return new Promise((f,v)=>{let a=++DA;this.pendingSubscriptions[d]={resolve:f,reject:v,id:a},this.cable.send(this.buildSubscribeRequest(d)),this.maybeRetrySubscribe(a,d,u)})}buildSubscribeRequest(t){return{command:"subscribe",identifier:t}}maybeRetrySubscribe(t,e,r){setTimeout(()=>{let d=this.pendingSubscriptions[e];d&&d.id===t&&(this.logger.warn(`no subscription ack received in ${r}ms, retrying subscribe`,e),this.cable.send(this.buildSubscribeRequest(e)),this.maybeExpireSubscribe(t,e,r))},r)}maybeExpireSubscribe(t,e,r){setTimeout(()=>{let d=this.pendingSubscriptions[e];d&&d.id===t&&(delete this.pendingSubscriptions[e],d.reject(new EA(`Haven't received subscription ack in ${r*2}ms for ${e}`)))},r)}unsubscribe(t){return this.cable.send({command:"unsubscribe",identifier:t}),this.pendingUnsubscriptions[t]=!0,setTimeout(()=>{delete this.pendingUnsubscriptions[t]},this.subscribeCooldownInterval),Promise.resolve()}perform(t,e,r){return e==="$whisper"?this.whisper(t,r):(r||(r={}),r.action||=e,this.cable.send({command:"message",identifier:t,data:JSON.stringify(r)}),Promise.resolve())}whisper(t,e){return this.cable.send({command:"whisper",identifier:t,data:e}),Promise.resolve()}receive(t){if(typeof t!="object"){this.logger.error("unsupported message format",{message:t});return}let{type:e,identifier:r,message:d,reason:u,reconnect:f}=t;if(e==="ping")return this.cable.keepalive(t.message);if(this.cable.keepalive(),e==="welcome"){let v=t.sid;return v&&this.cable.setSessionId(v),this.cable.connected()}if(e==="disconnect"){let v=new ho(u);this.reset(v),f===!1?this.cable.closed(v):this.cable.disconnected(v);return}if(e==="confirm_subscription"){let v=this.pendingSubscriptions[r];if(!v){this.logger.error("subscription not found, unsubscribing",{type:e,identifier:r}),this.unsubscribe(r);return}return delete this.pendingSubscriptions[r],v.resolve(r)}if(e==="reject_subscription"){let v=this.pendingSubscriptions[r];return v?(delete this.pendingSubscriptions[r],v.reject(new rh)):this.logger.error("subscription not found",{type:e,identifier:r})}if(d)return{identifier:r,message:d};this.logger.warn(`unknown message type: ${e}`,{message:t})}reset(t){for(let e in this.pendingSubscriptions)this.pendingSubscriptions[e].reject(t);this.pendingSubscriptions={}}recoverableClosure(){return!1}};const ym=()=>Date.now()/1e3|0;let PA=class extends vm{constructor(t={}){super(t),this.streamsPositions={},this.subscriptionStreams={},this.pendingHistory={},this.pendingPresence={},this.presenceInfo={},this.restoreSince=t.historyTimestamp,this.disableSessionRecovery=t.disableSessionRecovery,this.restoreSince===void 0&&(this.restoreSince=ym()),this.sessionId=void 0,this.sendPongs=t.pongs}reset(t){for(let e in this.pendingPresence)this.pendingPresence[e].reject(t);return this.pendingPresence={},super.reset()}receive(t){if(typeof t!="object"){this.logger.error("unsupported message format",{message:t});return}let{type:e,identifier:r,message:d}=t;if(e==="disconnect")return delete this.sessionId,this.cable.setSessionId(""),super.receive(t);if(e==="reject_subscription")return super.receive(t);if(e==="confirm_subscription")return this.subscriptionStreams[r]||(this.subscriptionStreams[r]=new Set),super.receive(t);if(e==="ping")return this.restoreSince&&(this.restoreSince=ym()),this.sendPongs&&this.sendPong(),this.cable.keepalive(t.message);if(this.cable.keepalive(),e==="confirm_history"){this.logger.debug("history result received",t),this.cable.notify("history_received",r);return}if(e==="reject_history"){this.logger.warn("failed to retrieve history",t),this.cable.notify("history_not_found",r);return}if(e==="welcome"){if(this.disableSessionRecovery||(this.sessionId=t.sid,this.sessionId&&this.cable.setSessionId(this.sessionId)),t.restored){let u=t.restored_ids||Object.keys(this.subscriptionStreams);for(let f of u)this.cable.send({identifier:f,command:"history",history:this.historyRequestFor(f)}),this.presenceInfo[f]&&this.cable.send({identifier:f,command:"join",presence:this.presenceInfo[f]});return this.cable.restored(u)}return this.cable.connected(this.sessionId)}if(e==="presence"){let u=d.type;if(u==="info"){let f=this.pendingPresence[r];f&&(delete this.pendingPresence[r],f.resolve(d))}else if(u==="error"){let f=this.pendingPresence[r];f&&(delete this.pendingPresence[r],f.reject(new Error("failed to retrieve presence")))}return{type:e,identifier:r,message:d}}if(d){let u=this.trackStreamPosition(r,t.stream_id,t.epoch,t.offset);return{identifier:r,message:d,meta:u}}this.logger.warn(`unknown message type: ${e}`,{message:t})}perform(t,e,r){switch(e){case"$presence:join":return this.join(t,r);case"$presence:leave":return this.leave(t,r);case"$presence:info":return this.presence(t,r)}return super.perform(t,e,r)}unsubscribe(t){return delete this.presenceInfo[t],super.unsubscribe(t)}buildSubscribeRequest(t){let e=super.buildSubscribeRequest(t),r=this.historyRequestFor(t);r&&(e.history=r,this.pendingHistory[t]=!0);let d=this.presenceInfo[t];return d&&(e.presence=d),e}recoverableClosure(){return!!this.sessionId}historyRequestFor(t){let e={},r=!1;if(this.subscriptionStreams[t])for(let d of this.subscriptionStreams[t]){let u=this.streamsPositions[d];u&&(r=!0,e[d]=u)}if(!(!r&&!this.restoreSince))return{since:this.restoreSince,streams:e}}trackStreamPosition(t,e,r,d){if(!(!e||!r))return this.subscriptionStreams[t]||(this.subscriptionStreams[t]=new Set),this.subscriptionStreams[t].add(e),this.streamsPositions[e]={epoch:r,offset:d},{stream:e,epoch:r,offset:d}}async sendPong(){await new Promise(t=>setTimeout(t,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(t,e){return this.presenceInfo[t]=e,this.cable.send({command:"join",identifier:t,presence:e}),Promise.resolve()}async leave(t,e){return delete this.presenceInfo[t],this.cable.send({command:"leave",identifier:t,presence:e}),Promise.resolve()}presence(t,e){return this.pendingPresence[t]?(this.logger.warn("presence is already pending, skipping",t),Promise.reject(Error("presence request is already pending"))):new Promise((r,d)=>{this.pendingPresence[t]={resolve:r,reject:d},this.cable.send({command:"presence",identifier:t,data:e})})}},FA=class extends il{constructor(){super("No connection","closed"),this.name="NoConnectionError"}},bm=class extends pm{static identifier="__ghost__";constructor(t,e){super(e),this.channelId=t}set channelId(t){this._channelId=t}get channelId(){return this._channelId}};const zA="$pubsub";let wm=class extends pm{static identifier=zA;async perform(t,e){if(t.startsWith("$"))return super.perform(t,e);throw Error("not implemented")}};const Rs=Symbol("state");let jA=class{constructor({transport:t,protocol:e,encoder:r,logger:d,lazy:u,hubOptions:f,performFailures:v,transportConfigurator:a}){this.emitter=oc(),this.transport=t,this.encoder=r,this.logger=d||new ol,this.protocol=e,this.performFailures=v||"throw",this.protocol.attached(this),this.hub=new OA(f||{}),this[Rs]="idle",this.handleClose=this.handleClose.bind(this),this.handleIncoming=this.handleIncoming.bind(this),this.transportConfigurator=a,this.transport.on("close",this.handleClose),this.transport.on("data",this.handleIncoming),this.initialConnect=!0,this.recovering=!1,u===!1&&this.connect().catch(()=>{})}get state(){return this[Rs]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let t=this.state==="idle";this[Rs]="connecting";let e=this.pendingConnect();this.logger.debug("connecting");try{this.transportConfigurator&&await this.transportConfigurator(this.transport,{initial:t}),await this.transport.open()}catch(r){this.handleClose(r)}return e}setSessionId(t){this.sessionId=t,this.transport.setParam("sid",t)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[Rs]="connected",this.recovering&&this.hub.subscriptions.all().forEach(e=>e.notify("disconnected",new ho("recovery_failed"))),this.hub.subscriptions.all().forEach(e=>this._resubscribe(e));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[Rs]="connected",this.hub.subscriptions.all().forEach(d=>{t&&d.remoteId&&t.includes(d.remoteId)?d.notify("restored"):(d.notify("disconnected",new ho("recovery_failed")),this._resubscribe(d))});let e=!this.initialConnect,r=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:e,restored:r})}notify(t,e,r){e&&typeof e!="string"&&(r=e,e=void 0),e?this.hub.notify(e,"info",{type:t,data:r}):this.emit("info",{type:t,data:r})}handleClose(t){this.logger.debug("transport closed",{error:t}),this.disconnected(new ho(t,"transport_closed"))}disconnected(t){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:t}),this[Rs]="disconnected",this.recovering=this.protocol.recoverableClosure(t),this.recovering?this.hub.subscriptions.all().forEach(e=>e.notify("connecting")):this.hub.subscriptions.all().forEach(e=>{e.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 e;t&&(e=t instanceof ho?t:new ho(t,void 0)),this.logger.info("closed",{reason:t||"user"}),this[Rs]="closed";let r=e||new ho("cable_closed");this.hub.subscriptions.all().forEach(d=>d.notify("disconnected",r)),this.hub.close(),this.protocol.reset(),this.transport.close(),this.initialConnect=!0,this.emit("close",e)}disconnect(){this.closed()}handleIncoming(t){if(this.state==="closed"||this.state==="idle")return;let e=this.encoder.decode(t);if(e===void 0){this.logger.error("failed to decode message",{message:t});return}this.logger.debug("incoming data",e);let r=this.protocol.receive(e);if(r){this.logger.debug("processed incoming message",r);let{type:d,identifier:u,message:f,meta:v}=r;d?this.hub.notify(u,d,f):this.hub.transmit(u,f,v)}}send(t){if(this.state==="closed")throw Error("Cable is closed");let e=this.encoder.encode(t);if(e===void 0){this.logger.error("failed to encode message",{message:t});return}this.logger.debug("outgoing message",t),this.transport.send(e)}keepalive(t){this.emit("keepalive",t)}streamFrom(t){let e=new wm({stream_name:t});return this.subscribe(e)}streamFromSigned(t){let e=new wm({signed_stream_name:t});return this.subscribe(e)}subscribeTo(t,e){let r,d;return typeof t=="string"&&(d=t,t=bm),r=d?new t(d,e):new t(e),this.subscribe(r)}subscribe(t){if(!t.attached(this))return t;let e=t.identifier;t.connecting();let r=this.hub.subscriptions.get(e)||this.hub.subscriptions.create(e,{subscribe:d=>this._subscribe(d,t.channelId,t.params),unsubscribe:d=>this._unsubscribe(d)});return r.add(t),r.intent==="subscribed"&&r.state==="connected"&&t.connected(),r.ensureSubscribed(),t}async _resubscribe(t){t.intent!=="subscribed"||!t.channels[0]||(t.notify("connecting"),t.ensureResubscribed())}async _subscribe(t,e,r){let d=t.id;if(this.state==="idle"&&this.connect().catch(()=>{}),this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:d});return}this.logger.debug("acquiring subscribe lock",{identifier:d});let u=await t.acquire("subscribed");if(u.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:d}),u.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:d}),t.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),u.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:d}),u.release();return}if(t.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:d}),t.notify("connected"),u.release();return}let f={identifier:e,params:r};this.logger.debug("subscribing",f);try{let v=await this.protocol.subscribe(e,r);this.hub.subscribe(d,v),this.logger.debug("subscribed",{...f,remoteId:v}),t.notify("connected")}catch(v){if(v){if(v instanceof rh&&this.logger.warn("rejected",f),v instanceof ho){this.logger.debug("disconnected during subscription; will retry on connect",f),u.release();return}this.logger.error("failed to subscribe",{error:v,...f})}t.close(v),this.hub.unsubscribe(d)}u.release()}unsubscribe(t){let e=t.identifier,r=this.hub.subscriptions.get(e);if(!r)throw Error(`Subscription not found: ${e}`);r.remove(t),t.closed(),r.maybeUnsubscribe()}async _unsubscribe(t){let e=t.id;this.logger.debug("acquiring unsubscribe lock",{identifier:e});let r=await t.acquire("unsubscribed");if(r.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:e}),r.release();return}if(this.logger.debug("unsubscribe lock has been acquired",{identifier:e}),t.intent!=="unsubscribed"){this.logger.debug("cancel unsubscribe, no longer needed",{identifier:e,intent:t.intent}),r.release();return}if(t.state==="disconnected"||t.state==="closed"){this.logger.debug(`already ${t.state} connected, skip unsubscribe command`,{identifier:e}),r.release();return}let d=t.remoteId;if(this.logger.debug("unsubscribing...",{remoteId:d}),this.state!=="connected"){this.logger.debug("unsubscribe skipped (cable is not connected)",{id:e}),t.close(),this.hub.unsubscribe(e),r.release();return}try{await this.protocol.unsubscribe(d),this.logger.debug("unsubscribed remotely",{id:e})}catch(u){u&&(u instanceof ho?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:e,error:u}):this.logger.error("unsubscribe failed",{id:e,error:u}))}t.intent==="unsubscribed"?(t.close(),this.hub.unsubscribe(e)):t.state="closed",r.release()}async perform(t,e,r){if(this.performFailures==="throw")return this._perform(t,e,r);try{return await this._perform(t,e,r)}catch(d){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:d});return}}async _perform(t,e,r){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new FA;let d=this.hub.subscriptions.get(t);if(!d)throw Error(`Subscription not found: ${t}`);if(await d.pending("subscribed"),d.intent!=="subscribed")throw Error(`Subscription is closed: ${t}`);let u=d.remoteId,f={id:u,action:e,payload:r};this.logger.debug("perform",f);try{let v=await this.protocol.perform(u,e,r);return v&&this.logger.debug("perform result",{message:v,request:f}),v}catch(v){throw this.logger.error("perform failed",{error:v,request:f}),v}}on(t,e){return this.emitter.on(t,e)}once(t,e){let r=this.emitter.on(t,(...d)=>{r(),e(...d)});return r}emit(t,...e){return this.emitter.emit(t,...e)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((t,e)=>{let r=[()=>delete this._pendingConnect];r.push(this.on("connect",()=>{r.forEach(d=>d()),t()})),r.push(this.on("close",d=>{r.forEach(u=>u()),e(d)})),r.push(this.on("disconnect",d=>{r.forEach(u=>u()),e(d)}))}),this._pendingConnect)}};const BA={maxMissingPings:2,maxReconnectAttempts:1/0},pa=()=>Date.now(),xm=(n,t)=>{t=t||{};let{backoffRate:e,jitterRatio:r,maxInterval:d}=t;return e=e||2,r===void 0&&(r=.5),u=>{let f=n*e**u,v=f*e,a=f+(v-f)*Math.random(),g=2*(Math.random()-.5)*r;return a=a*(1+g),d&&d<a&&(a=d),a}};let Cm=class{constructor({pingInterval:t,...e}){if(this.pingInterval=t,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${t}`);if(e=Object.assign({},BA,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 ol,this.state="pending_connect",this.attempts=0,this.disconnectedAt=pa()}watch(t){this.target=t,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(t=>{this.logger.info("Failed at reconnecting: "+t)}),!0)}initListeners(){this.unbind=[],this.unbind.push(this.target.on("connect",()=>{this.attempts=0,this.pingedAt=pa(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=pa(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=pa(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=pa()})),this.unbind.push(()=>{this.cancelReconnect(),this.stopPolling()})}dispose(){delete this.target,this.unbind&&this.unbind.forEach(t=>t()),delete this.unbind}startPolling(){this.pollId&&clearTimeout(this.pollId);let t=this.pingInterval+(Math.random()-.5)*this.pingInterval*.5;this.pollId=setTimeout(()=>{this.checkStale(),this.state==="connected"&&this.startPolling()},t)}stopPolling(){this.pollId&&clearTimeout(this.pollId)}checkStale(){let t=pa()-this.pingedAt;t>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${t}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new TA))}scheduleReconnect(){if(this.attempts>=this.maxReconnectAttempts){this.target.close();return}let t=this.strategy(this.attempts);this.attempts++,this.logger.info(`Reconnecting in ${t}ms (${this.attempts} attempt)`),this.state="pending_reconnect",this.reconnnectId=setTimeout(()=>this.reconnectNow(),t)}cancelReconnect(){this.reconnnectId&&(clearTimeout(this.reconnnectId),delete this.reconnnectId)}},WA=class{constructor(t,e={}){this.transports=t,this.transport=null,this.emitter=oc(),this.unbind=[],this.logger=e.logger||new ol}displayName(){return"fallbacked transport"}async open(){for(let t=0;t<this.transports.length;t++){let e=this.transports[t];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(t){if(!this.transport)throw new Error("No transport is open");this.transport.send(t)}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(t,e){this.transports.forEach(r=>{r.setParam(t,e)})}setToken(t,e){this.transports.forEach(r=>{r.setToken(t,e)})}on(t,e){return this.emitter.on(t,e)}once(t,e){let r=this.emitter.on(t,(...d)=>{r(),e(...d)});return r}get url(){return this.transport?this.transport.url:""}resetListeners(){this.unbind.forEach(t=>t()),this.unbind.length=0,this.transport&&this.unbind.push(this.transport.on("open",()=>{this.emitter.emit("open")}),this.transport.on("data",t=>{this.emitter.emit("data",t)}),this.transport.on("close",t=>{this.emitter.emit("close",t)}),this.transport.on("error",t=>{this.emitter.emit("error",t)}))}},HA=class{constructor(t,e={}){this.url=t;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=oc();let{format:d,subprotocol:u,authStrategy:f}=e;this.format=d||"text",this.connectionOptions=e.websocketOptions,this.authStrategy=f||"param",this.authProtocol="",this.subprotocol=u}displayName(){return"WebSocket("+this.url+")"}open(){let t=this.subprotocol;return this.authStrategy==="sub-protocol"&&(t=[this.subprotocol,this.authProtocol]),this.connectionOptions?this.ws=new this.Impl(this.url,t,this.connectionOptions):this.ws=new this.Impl(this.url,t),this.ws.binaryType="arraybuffer",this.initListeners(),new Promise((e,r)=>{let d=[];d.push(this.once("open",()=>{d.forEach(u=>u()),e()})),d.push(this.once("close",()=>{d.forEach(u=>u()),r(Error("WS connection closed"))}))})}setURL(t){this.url=t}setParam(t,e){let r=new URL(this.url);r.searchParams.set(t,e);let d=`${r.protocol}//${r.host}${r.pathname}?${r.searchParams}`;this.setURL(d)}setToken(t,e="jid"){if(this.authStrategy==="param")this.setParam(e,t);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(d=>d.toLowerCase()===r)||r,this.connectionOptions.headers[r]=t}else if(this.authStrategy==="sub-protocol")this.authProtocol=`anycable-token.${t}`;else throw new Error("Unknown auth strategy: "+this.authStrategy)}send(t){if(!this.ws||!this.connected)throw Error("WebSocket is not connected");this.ws.send(t)}close(){this.ws?this.onclose():this.connected=!1}on(t,e){return this.emitter.on(t,e)}once(t,e){let r=this.emitter.on(t,(...d)=>{r(),e(...d)});return r}initListeners(){this.ws.onerror=t=>{this.connected&&this.emitter.emit("error",t.error||new Error("WS Error"))},this.ws.onclose=()=>{this.onclose()},this.ws.onmessage=t=>{let e=t.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")}},UA=class{constructor(t){this.channel=t}notify(t,...e){typeof this[t]=="function"&&this[t](...e)}perform(t,e={}){this.channel.perform(t,e)}send(t){this.channel.send(t)}whisper(t){return this.channel.whisper(t)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}},VA=class extends bm{constructor(t,e,r){super(t,e),this.subscription=new UA(this),Object.assign(this.subscription,r),this.on("connect",({reconnect:d})=>this.subscription.notify("connected",{reconnected:d})),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",d=>this.subscription.notify("received",d)),this.on("close",d=>{d&&d instanceof rh?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}},GA=class{constructor(t){this.cable=t}create(t,e){let r,d;typeof t=="object"?(r=t.channel,delete t.channel,d=t):(r=t,d={});let u=new VA(r,d,e);return u.subscription.notify("initialized"),this.cable.subscribe(u),u.subscription}findAll(t){return this.cable.hub.channels.filter(e=>e.identifier===t).map(e=>e.subscription)}},qA=class{constructor(t){this.cable=t,this.subscriptions=new GA(t)}send(t){return this.cable.send(t)}connect(){return this.cable.connect()}disconnect(){return this.cable.disconnect()}ensureActiveConnection(){return this.cable.connect()}};const _m={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function KA(n,t){if(typeof n=="object"&&typeof t>"u"&&(t=n,n=void 0),t=t||{},!n&&!t.transport)throw Error("URL or transport must be specified");t=Object.assign({},_m,t);let{protocol:e,websocketImplementation:r,websocketFormat:d,websocketOptions:u,websocketAuthStrategy:f,fallbacks:v,logLevel:a,logger:g,transport:i,encoder:o,lazy:c,monitor:p,pingInterval:s,reconnectStrategy:h,maxMissingPings:m,maxReconnectAttempts:y,subprotocol:x,tokenRefresher:T,historyTimestamp:S,protocolOptions:_,concurrentSubscribes:C,performFailures:L,transportConfigurator:O,auth:M}=t;if(g=g||new ol(a),typeof e=="string"){x=x||e;let F=e.substring(0,e.lastIndexOf("-")),N=e.substring(e.lastIndexOf("-")+1);if(_=_||{},F==="actioncable-v1")e=new vm({logger:g,..._});else if(F==="actioncable-v1-ext")e=new PA({logger:g,historyTimestamp:S,..._});else throw Error(`Protocol is not supported yet: ${e}`);if(N==="json")o=o||new NA,d=d||"text";else if(N==="msgpack"){if(d="binary",!o)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(N==="protobuf"){if(d=d||"binary",!o)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");i=i||new HA(n,{websocketImplementation:r,websocketOptions:u,subprotocol:x,authStrategy:f,format:d}),v&&(i=new WA([i,...v],{logger:g})),M&&M.token&&i.setToken(M.token,M.param||"jid"),h=h||xm(s),p!==!1&&(p=p||new Cm({pingInterval:s,reconnectStrategy:h,maxMissingPings:m,maxReconnectAttempts:y,logger:g}));let I={concurrentSubscribes:C},B=new jA({protocol:e,transport:i,encoder:o,logger:g,lazy:c,hubOptions:I,performFailures:L,transportConfigurator:O});return p&&(p.watch(B),B.monitor=p),T&&YA(B,async()=>{try{await T(i)}catch(F){return g.error("Failed to refresh authentication token: "+F),!1}return B.connect().catch(()=>{}),!0}),B}function YA(n,t){let e=!1;n.on("connect",()=>e=!1),n.on("close",async r=>{if(r){if(e){n.logger.warn("Token auto-refresh is disabled",r);return}r.reason==="token_expired"&&(e=!0,await t())}})}let XA=class extends mm{writeLogEntry(t,e,r){r?console[t](e,r):console[t](e)}},JA=class extends Cm{watch(t){super.watch(t),this.initActivityListeners()}initActivityListeners(){if(typeof document<"u"&&typeof window<"u"&&document.addEventListener&&window.addEventListener){let t=()=>{document.hidden||this.reconnectNow()&&this.logger.debug("Trigger reconnect due to visibility change")},e=d=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:d})},r=()=>this.disconnect(new ho("page_frozen"));document.addEventListener("visibilitychange",t,!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",t,!1),window.removeEventListener("focus",e,!1),window.removeEventListener("online",e,!1),window.removeEventListener("resume",e,!1),window.removeEventListener("freeze",r,!1)})}}disconnect(t){this.state==="disconnected"||this.state==="closed"||(this.logger.info("Disconnecting",{reason:t.message}),this.cancelReconnect(),this.stopPolling(),this.state="pending_disconnect",this.target.disconnected(t))}};const ZA=["cable","action-cable"],QA="/cable",sc=(n,t)=>{for(let e of ZA){let r=n.head.querySelector(`meta[name='${e}-${t}']`);if(r)return r.getAttribute("content")}},Am=n=>n.match(/wss?:\/\//)?n:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${n}`:n,ek=()=>{if(typeof document<"u"&&document.head){let n=sc(document,"url");if(n)return Am(n)}return Am(QA)},tk=()=>{if(typeof document<"u"&&document.head){let n=sc(document,"history-timestamp");if(n)return n|0}},nk=()=>{if(typeof document<"u"&&document.head)return sc(document,"token")},rk=()=>{if(typeof document<"u"&&document.head)return sc(document,"token-param")};function ik(n,t){typeof n=="object"&&typeof t>"u"&&(t=n,n=void 0),n=n||ek(),t=t||{},t.historyTimestamp||=tk();let e=nk();if(e){let g=rk();t.auth=Object.assign({token:e,param:g},t.auth||{})}t=Object.assign({},_m,t);let{logLevel:r,logger:d,pingInterval:u,reconnectStrategy:f,maxMissingPings:v,maxReconnectAttempts:a}=t;return d=t.logger=t.logger||new XA(r),f=t.reconnectStrategy=t.reconnectStrategy||xm(u),t.monitor!==!1&&(t.monitor=t.monitor||new JA({pingInterval:u,reconnectStrategy:f,maxMissingPings:v,maxReconnectAttempts:a,logger:d})),KA(n,t)}function ok(n,t){let e=ik(n,t);return new qA(e)}class sk{constructor(t="/openc3-api/cable"){this._cable=null,this._url=t}disconnect(){this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(t,e,r={},d={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(u=>{if(u&&OpenC3Auth.setTokens(),this._cable==null){const f=new URL(this._url,document.baseURI);f.searchParams.set("scope",e),this._cable=ok(f.href)}return this._cable.subscriptions.create({channel:t,token:localStorage.openc3Token,...d},r)})}recordPing(){}}Nn("I",sk),Nn("K",class{constructor(t,e,r="",d=""){this.keyword=t.keyword,this.parameters=t.parameters,this.filename=t.filename,this.line=t.line,this.lineNumber=t.lineNumber,this.message=e,this.usage=r,this.url=d}});function sl(n){return ak.test(n)}const ak=/^-?[0-9]+$/;function km(n){return lk.test(n)}const lk=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function Sm(n,t){if(sl(n))return Number.isSafeInteger(Number.parseInt(n,10));const e=Number.parseFloat(n),r=String(e);if(n===r)return!0;const d=$m(n),u=$m(r);return!!(d===u||t?.approx===!0&&!sl(n)&&u.length>=14&&d.startsWith(u.substring(0,14)))}let al=(function(n){return n.underflow="underflow",n.overflow="overflow",n.truncate_integer="truncate_integer",n.truncate_float="truncate_float",n})({});function ck(n){if(Sm(n,{approx:!1}))return;if(sl(n))return al.truncate_integer;const t=Number.parseFloat(n);return Number.isFinite(t)?t===0?al.underflow:al.truncate_float:al.overflow}function $m(n){const{start:t,end:e}=uk(n),r=n.substring(t,e),d=r.indexOf(".");return d===-1?r:r.substring(0,d)+r.substring(d+1)}function uk(n){let t=0;for(n[0]==="-"&&t++;n[t]==="0"||n[t]===".";)t++;let e=n.lastIndexOf("e");for(e===-1&&(e=n.lastIndexOf("E")),e===-1&&(e=n.length);(n[e-1]==="0"||n[e-1]===".")&&e>t;)e--;return{start:t,end:e}}let hk=class{isLosslessNumber=!0;constructor(t){if(!km(t))throw new Error(`Invalid number (value: "${t}")`);this.value=t}valueOf(){const t=ck(this.value);if(t===void 0||t===al.truncate_float)return Number.parseFloat(this.value);if(sl(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${t} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}};function dk(n){return n&&typeof n=="object"&&n.isLosslessNumber||!1}function fk(n){return new hk(n)}function pk(n,t){return ih({"":n},"",n,t)}function ih(n,t,e,r){return Array.isArray(e)?r.call(n,t,mk(e,r)):e&&typeof e=="object"&&!dk(e)?r.call(n,t,gk(e,r)):r.call(n,t,e)}function gk(n,t){for(const e of Object.keys(n)){const r=ih(n,e,n[e],t);r!==void 0?n[e]=r:delete n[e]}return n}function mk(n,t){for(let e=0;e<n.length;e++)n[e]=ih(n,String(e),n[e],t);return n}function vk(n,t,e){const r=typeof e=="function"?{parseNumber:e}:e,d=r?.parseNumber??fk,u=r?.onDuplicateKey??L;let f=0;const v=i();return y(v),T(),t?pk(v,t):v;function a(){if(n.charCodeAt(f)===_k){f++,c();const j={};let W=!0;for(;f<n.length&&n.charCodeAt(f)!==Tm;){W?W=!1:(h(),c());const V=f,K=p();if(K===void 0){C();return}c(),m();const X=i();if(X===void 0){F();return}if(Object.prototype.hasOwnProperty.call(j,K)&&!oh(X,j[K])){const oe=u({key:K,position:V+1,oldValue:j[K],newValue:X});oe!==void 0&&(j[K]=oe)}else j[K]=X}return n.charCodeAt(f)!==Tm&&O(),f++,j}}function g(){if(n.charCodeAt(f)===Ak){f++,c();const j=[];let W=!0;for(;f<n.length&&n.charCodeAt(f)!==Rm;){W?W=!1:h();const V=i();x(V),j.push(V)}return n.charCodeAt(f)!==Rm&&M(),f++,j}}function i(){c();const j=p()??s()??a()??g()??o("true",!0)??o("false",!1)??o("null",null);return c(),j}function o(j,W){if(n.slice(f,f+j.length)===j)return f+=j.length,W}function c(){for(;yk(n.charCodeAt(f));)f++}function p(){if(n.charCodeAt(f)===sh){f++;let j="";for(;f<n.length&&n.charCodeAt(f)!==sh;){if(n.charCodeAt(f)===Ck){const W=n[f+1],V=xk[W];V!==void 0?(j+=V,f++):W==="u"?ac(n.charCodeAt(f+2))&&ac(n.charCodeAt(f+3))&&ac(n.charCodeAt(f+4))&&ac(n.charCodeAt(f+5))?(j+=String.fromCharCode(Number.parseInt(n.slice(f+2,f+6),16)),f+=5):N(f):B(f)}else wk(n.charCodeAt(f))?j+=n[f]:I(n[f]);f++}return _(),f++,j}}function s(){const j=f;if(n.charCodeAt(f)===Im&&(f++,S(j)),n.charCodeAt(f)===ah)f++;else if(bk(n.charCodeAt(f)))for(f++;lc(n.charCodeAt(f));)f++;if(n.charCodeAt(f)===Mk)for(f++,S(j);lc(n.charCodeAt(f));)f++;if(n.charCodeAt(f)===Pk||n.charCodeAt(f)===Dk)for(f++,(n.charCodeAt(f)===Im||n.charCodeAt(f)===Tk)&&f++,S(j);lc(n.charCodeAt(f));)f++;if(f>j)return d(n.slice(j,f))}function h(){if(n.charCodeAt(f)!==Ik)throw new SyntaxError(`Comma ',' expected after value ${D()}`);f++}function m(){if(n.charCodeAt(f)!==Lk)throw new SyntaxError(`Colon ':' expected after property name ${D()}`);f++}function y(j){if(j===void 0)throw new SyntaxError(`JSON value expected ${D()}`)}function x(j){if(j===void 0)throw new SyntaxError(`Array item expected ${D()}`)}function T(){if(f<n.length)throw new SyntaxError(`Expected end of input ${D()}`)}function S(j){if(!lc(n.charCodeAt(f))){const W=n.slice(j,f);throw new SyntaxError(`Invalid number '${W}', expecting a digit ${D()}`)}}function _(){if(n.charCodeAt(f)!==sh)throw new SyntaxError(`End of string '"' expected ${D()}`)}function C(){throw new SyntaxError(`Quoted object key expected ${D()}`)}function L(j){let{key:W,position:V}=j;throw new SyntaxError(`Duplicate key '${W}' encountered at position ${V}`)}function O(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${D()}`)}function M(){throw new SyntaxError(`Array item or end of array ']' expected ${D()}`)}function I(j){throw new SyntaxError(`Invalid character '${j}' ${E()}`)}function B(j){const W=n.slice(j,j+2);throw new SyntaxError(`Invalid escape character '${W}' ${E()}`)}function F(){throw new SyntaxError(`Object value expected after ':' ${E()}`)}function N(j){const W=n.slice(j,j+6);throw new SyntaxError(`Invalid unicode character '${W}' ${E()}`)}function E(){return`at position ${f}`}function A(){return f<n.length?`but got '${n[f]}'`:"but reached end of input"}function D(){return`${A()} ${E()}`}}function yk(n){return n===kk||n===Sk||n===$k||n===Ek}function ac(n){return n>=ah&&n<=lh||n>=Ok&&n<=Fk||n>=Nk&&n<=zk}function lc(n){return n>=ah&&n<=lh}function bk(n){return n>=Rk&&n<=lh}function wk(n){return n>=32&&n<=1114111}function oh(n,t){return n===t?!0:Array.isArray(n)&&Array.isArray(t)?n.length===t.length&&n.every((e,r)=>oh(e,t[r])):Em(n)&&Em(t)?[...new Set([...Object.keys(n),...Object.keys(t)])].every(e=>oh(n[e],t[e])):!1}function Em(n){return typeof n=="object"&&n!==null}const xk={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
10
+ `,r:"\r",t:" "},Ck=92,_k=123,Tm=125,Ak=91,Rm=93,kk=32,Sk=10,$k=9,Ek=13,sh=34,Tk=43,Im=45,ah=48,Rk=49,lh=57,Ik=44,Mk=46,Lk=58,Ok=65,Nk=97,Dk=69,Pk=101,Fk=70,zk=102;function Mm(n,t,e,r){return d(n);function d(a,g){if(Array.isArray(r)){const i=r.find(o=>o.test(a));if(i){const o=i.stringify(a);if(typeof o!="string"||!km(o))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${o})`);return o}}if(typeof a=="boolean"||typeof a=="number"||typeof a=="string"||a===null||a instanceof Date||a instanceof Boolean||a instanceof Number||a instanceof String)return JSON.stringify(a);if(a?.isLosslessNumber||typeof a=="bigint")return a.toString();if(Array.isArray(a))return u(a);if(a&&typeof a=="object")return f(a)}function u(a,g){if(a.length===0)return"[]";let i="[";for(let o=0;o<a.length;o++){const c=a[o];typeof c<"u"&&typeof c!="function"?i+=d(c):i+="null",o<a.length-1&&(i+=",")}return i+="]",i}function f(a,g){if(typeof a.toJSON=="function")return Mm(a.toJSON(),t,e,void 0);const i=Array.isArray(t)?t.map(String):Object.keys(a);if(i.length===0)return"{}";let o=!0,c="{";for(const p of i){const s=a[p];if(v(p,s)){o?o=!1:c+=",";const h=JSON.stringify(p);c+=`${h}:`,c+=d(s)}}return c+="}",c}function v(a,g){return typeof g<"u"&&typeof g!="function"&&typeof g!="symbol"}}function jk(n){return sl(n)&&!Sm(n)?BigInt(n):parseFloat(n)}class Bk{id=1;constructor(){}async exec(t,e,r={},d={},u=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return r.scope=window.openc3Scope,d.manual=!0,(await th.post("/openc3-api/api",{jsonrpc:"2.0",method:t,params:e,id:this.id,keyword_params:r},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...d},timeout:u,transformRequest:[(f,v)=>Mm(f)],transformResponse:[f=>{try{return vk(f,void 0,jk)}catch{const v=typeof f=="string"?f.substring(0,200):String(f),a=new Error(`Server returned non-JSON response: ${v}`);throw a.name="ServerError",a}}]})).data.result}catch(f){let v=new Error;throw f.response?(v.name=f.response.data.error.data.class,v.message=f.response.data.error.data.message,v.object=f.response.data.error):f.request?(v.name="Request error",v.message="Request error, no response received"):v=f,v}}decode_openc3_type(t){if(t!==null&&typeof t=="object"&&t.json_class=="Float"&&t.raw){if(t.raw=="NaN")return NaN;if(t.raw=="Infinity")return 1/0;if(t.raw=="-Infinity")return-1/0}return null}encode_openc3_type(t){return Number.isNaN(t)?{json_class:"Float",raw:"NaN"}:t==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:t==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(t=>{t&&(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(t){return this.exec("set_offline_access",[t])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(t,e,r,d,u){return this.exec("map_target_to_interface",[t,e],{cmd_only:r,tlm_only:d,unmap_old:u})}unmap_target_from_interface(t,e,r,d){return this.exec("unmap_target_from_interface",[t,e],{cmd_only:r,tlm_only:d})}connect_interface(t,...e){return e.length>0?this.exec("connect_interface",[t,...e]):this.exec("connect_interface",[t])}disconnect_interface(t){return this.exec("disconnect_interface",[t])}interface_cmd(t,e,...r){return this.exec("interface_cmd",[t,e,...r])}interface_target_enable(t,e,r=!1,d=!1){return this.exec("interface_target_enable",[t,e],{cmd_only:r,tlm_only:d})}interface_target_disable(t,e,r=!1,d=!1){return this.exec("interface_target_disable",[t,e],{cmd_only:r,tlm_only:d})}interface_details(t){return this.exec("interface_details",[t])}get_all_router_info(){return this.exec("get_all_router_info",[])}map_target_to_router(t,e,r,d,u){return this.exec("map_target_to_router",[t,e],{cmd_only:r,tlm_only:d,unmap_old:u})}unmap_target_from_router(t,e,r,d){return this.exec("unmap_target_from_router",[t,e],{cmd_only:r,tlm_only:d})}connect_router(t){return this.exec("connect_router",[t])}disconnect_router(t){return this.exec("disconnect_router",[t])}router_target_enable(t,e,r=!1,d=!1){return this.exec("router_target_enable",[t,e],{cmd_only:r,tlm_only:d})}router_target_disable(t,e,r=!1,d=!1){return this.exec("router_target_disable",[t,e],{cmd_only:r,tlm_only:d})}router_details(t){return this.exec("router_details",[t])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(t){return this.exec("get_tlm_cnts",[t])}get_item(t,e,r){return this.exec("get_item",[t,e,r])}get_param(t,e,r){return this.exec("get_param",[t,e,r])}get_parameter(t,e,r){return this.exec("get_param",[t,e,r])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(t){return this.exec("set_limits_set",[t])}delete_limits_set(t){return this.exec("delete_limits_set",[t])}get_target(t){return this.exec("get_target",[t])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(t,e){return this.exec("get_tlm",[t,e])}get_telemetry(t,e){return this.exec("get_tlm",[t,e])}get_all_tlm(t){return this.exec("get_all_tlm",[t])}get_all_telemetry(t){return this.exec("get_all_tlm",[t])}get_all_tlm_names(t,e=!1){return this.exec("get_all_tlm_names",[t],{hidden:e})}get_all_telemetry_names(t){return this.exec("get_all_tlm_names",[t])}get_all_tlm_item_names(t){return this.exec("get_all_tlm_item_names",[t])}async get_tlm_packet(t,e,r,d=30){const u=await this.exec("get_tlm_packet",[t,e],{type:r,stale_time:d});if(u!=null){let f=u.length,v=null;for(let a=0;a<f;a++)v=this.decode_openc3_type(u[a][1]),v!==null&&(u[a][1]=v)}return u}get_packet_derived_items(t,e){return this.exec("get_packet_derived_items",[t,e])}get_tlm_buffer(t,e){return this.exec("get_tlm_buffer",[t,e])}get_tlm_available(t){return this.exec("get_tlm_available",[t])}async get_tlm_values(t,e=30,r=null,d=null,u=null){let f={stale_time:e};r!==null&&(f.cache_timeout=r),d!==null&&(f.start_time=d.toISOString()),u!==null&&(f.end_time=u.toISOString());const v=await this.exec("get_tlm_values",[t],f,{},1e4);if(v&&v.length>0){let a=v.length,g=null;for(let i=0;i<a;i++)g=this.decode_openc3_type(v[i][0]),g!==null&&(v[i][0]=g)}return v}get_limits(t,e,r){return this.exec("get_limits",[t,e,r])}async tlm(t,e,r,d="CONVERTED"){let u=null;if(e===void 0)u=await this.exec("tlm",[t]);else if(r===void 0)if(["RAW","CONVERTED","FORMATTED"].includes(e))u=await this.exec("tlm",[t],{type:e});else{let v=new Error;throw v.name="TypeError",v.message=`Invalid data type ${e}. Valid options are RAW, CONVERTED or FORMATTED.`,v}else u=await this.exec("tlm",[t,e,r],{type:d});let f=this.decode_openc3_type(u);return f!==null&&(u=f),u}async inject_tlm(t,e,r=null,d="CONVERTED",u=!1){await this.exec("inject_tlm",[t,e,r],{type:d,stored:u})}set_tlm(t,e,r,d){return this.exec("set_tlm",[t,e,r],{type:d})}override_tlm(t,e,r,d){return this.exec("override_tlm",[t,e,r],{type:d})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(t,e,r,d){return this.exec("normalize_tlm",[t,e,r],{type:d})}get_all_cmds(t){return this.exec("get_all_cmds",[t])}get_all_commands(t){return this.exec("get_all_cmds",[t])}get_all_cmd_names(t,e=!1){return this.exec("get_all_cmd_names",[t],{hidden:e})}get_all_command_names(t){return this.exec("get_all_cmd_names",[t])}get_cmd(t,e){return this.exec("get_cmd",[t,e])}get_command(t,e){return this.exec("get_cmd",[t,e])}get_cmd_cnts(t){return this.exec("get_cmd_cnts",[t])}get_cmd_value(t,e,r,d="CONVERTED"){return this.exec("get_cmd_value",[t,e,r,d])}get_cmd_buffer(t,e){return this.exec("get_cmd_buffer",[t,e])}_cmd(t,e,r,d,u,f={}){let v=null;for(let a in d)Object.prototype.hasOwnProperty.call(d,a)&&(v=this.encode_openc3_type(d[a]),v!==null&&(d[a]=v));return this.exec(t,[e,r,d],f,u)}get_cmd_hazardous(t,e,r,d={}){return e===void 0?this.exec("get_cmd_hazardous",t,{},d):this._cmd("get_cmd_hazardous",t,e,r,d)}cmd(t,e,r,d={},u={}){return e===void 0?this.exec("cmd",t,u,d):this._cmd("cmd",t,e,r,d,u)}cmd_no_range_check(t,e,r,d={},u={}){return e===void 0?this.exec("cmd_no_range_check",t,u,d):this._cmd("cmd_no_range_check",t,e,r,d,u)}cmd_raw(t,e,r,d={},u={}){return e===void 0?this.exec("cmd_raw",t,u,d):this._cmd("cmd_raw",t,e,r,d,u)}cmd_raw_no_range_check(t,e,r,d={},u={}){return e===void 0?this.exec("cmd_raw_no_range_check",t,u,d):this._cmd("cmd_raw_no_range_check",t,e,r,d,u)}cmd_no_hazardous_check(t,e,r,d={},u={}){return e===void 0?this.exec("cmd_no_hazardous_check",t,u,d):this._cmd("cmd_no_hazardous_check",t,e,r,d,u)}cmd_no_checks(t,e,r,d={},u={}){return e===void 0?this.exec("cmd_no_checks",t,u,d):this._cmd("cmd_no_checks",t,e,r,d,u)}cmd_raw_no_hazardous_check(t,e,r,d={},u={}){return e===void 0?this.exec("cmd_raw_no_hazardous_check",t,u,d):this._cmd("cmd_raw_no_hazardous_check",t,e,r,d,u)}cmd_raw_no_checks(t,e,r,d={},u={}){return e===void 0?this.exec("cmd_raw_no_checks",t,u,d):this._cmd("cmd_raw_no_checks",t,e,r,d,u)}build_cmd(t,e,r,d={},u={}){return e===void 0?this.exec("build_cmd",t,u,d):this._cmd("build_cmd",t,e,r,d,u)}build_command(t,e,r,d={},u={}){return e===void 0?this.exec("build_cmd",t,u,d):this._cmd("build_cmd",t,e,r,d,u)}get_interface_names(){return this.exec("get_interface_names",[])}get_router_names(){return this.exec("get_router_names",[])}send_raw(t,e){return this.exec("send_raw",[t,e])}list_configs(t){return this.exec("list_configs",[t])}load_config(t,e){return this.exec("load_config",[t,e])}save_config(t,e,r){return this.exec("save_config",[t,e,r])}delete_config(t,e){return this.exec("delete_config",[t,e])}enable_limits(t,e,r){return this.exec("enable_limits",[t,e,r])}disable_limits(t,e,r){return this.exec("disable_limits",[t,e,r])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(t){return this.exec("get_overall_limits_state",[t])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(t,e){return this.exec("get_setting",[t],e)}get_settings(t,e){return this.exec("get_settings",t,e)}set_setting(t,e){return this.exec("set_setting",[t,e])}update_news(){return this.exec("update_news",[])}update_plugin_store(){return this.exec("update_plugin_store",[])}save_setting(t,e){return this.exec("set_setting",[t,e])}get_metrics(){return this.exec("get_metrics",[])}open_tab(t){window.open(t,"_blank")}async hashString(t){if(window.isSecureContext){const e=new TextEncoder().encode(t),r=await crypto.subtle.digest("SHA-256",e),d=new Uint8Array(r);return Array.from(d).map(u=>u.toString(16).padStart(2,"0")).join("")}}}Nn("F",Bk);const Lm=6048e5,Wk=864e5,cc=6e4,ch=36e5,Hk=1e3,Om=Symbol.for("constructDateFrom");Nn({L:cc,U:ch,r:Hk});function Ro(n,t){return typeof n=="function"?n(t):n&&typeof n=="object"&&Om in n?n[Om](t):n instanceof Date?new n.constructor(t):new Date(t)}function ni(n,t){return Ro(t||n,n)}let Uk={};function ga(){return Uk}function ma(n,t){const e=ga(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??e.weekStartsOn??e.locale?.options?.weekStartsOn??0,d=ni(n,t?.in),u=d.getDay(),f=(u<r?7:0)+u-r;return d.setDate(d.getDate()-f),d.setHours(0,0,0,0),d}function ll(n,t){return ma(n,{...t,weekStartsOn:1})}function Nm(n,t){const e=ni(n,t?.in),r=e.getFullYear(),d=Ro(e,0);d.setFullYear(r+1,0,4),d.setHours(0,0,0,0);const u=ll(d),f=Ro(e,0);f.setFullYear(r,0,4),f.setHours(0,0,0,0);const v=ll(f);return e.getTime()>=u.getTime()?r+1:e.getTime()>=v.getTime()?r:r-1}function uh(n){const t=ni(n),e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),+n-+e}function Vk(n,...t){const e=Ro.bind(null,t.find(r=>typeof r=="object"));return t.map(e)}function Dm(n,t){const e=ni(n,t?.in);return e.setHours(0,0,0,0),e}function Gk(n,t,e){const[r,d]=Vk(e?.in,n,t),u=Dm(r),f=Dm(d),v=+u-uh(u),a=+f-uh(f);return Math.round((v-a)/Wk)}function qk(n,t){const e=Nm(n,t),r=Ro(n,0);return r.setFullYear(e,0,4),r.setHours(0,0,0,0),ll(r)}function Kk(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function Pm(n){return!(!Kk(n)&&typeof n!="number"||isNaN(+ni(n)))}function Yk(n,t){const e=ni(n,t?.in);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}const Xk={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"}},Jk=(n,t,e)=>{let r;const d=Xk[n];return typeof d=="string"?r=d:t===1?r=d.one:r=d.other.replace("{{count}}",t.toString()),e?.addSuffix?e.comparison&&e.comparison>0?"in "+r:r+" ago":r};function hh(n){return(t={})=>{const e=t.width?String(t.width):n.defaultWidth;return n.formats[e]||n.formats[n.defaultWidth]}}const Zk={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Qk={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},eS={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},tS={date:hh({formats:Zk,defaultWidth:"full"}),time:hh({formats:Qk,defaultWidth:"full"}),dateTime:hh({formats:eS,defaultWidth:"full"})},nS={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},rS=(n,t,e,r)=>nS[n];function cl(n){return(t,e)=>{const r=e?.context?String(e.context):"standalone";let d;if(r==="formatting"&&n.formattingValues){const f=n.defaultFormattingWidth||n.defaultWidth,v=e?.width?String(e.width):f;d=n.formattingValues[v]||n.formattingValues[f]}else{const f=n.defaultWidth,v=e?.width?String(e.width):n.defaultWidth;d=n.values[v]||n.values[f]}const u=n.argumentCallback?n.argumentCallback(t):t;return d[u]}}const iS={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},oS={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},sS={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"]},aS={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"]},lS={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"}},cS={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"}},uS=(n,t)=>{const e=Number(n),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"},hS={ordinalNumber:uS,era:cl({values:iS,defaultWidth:"wide"}),quarter:cl({values:oS,defaultWidth:"wide",argumentCallback:n=>n-1}),month:cl({values:sS,defaultWidth:"wide"}),day:cl({values:aS,defaultWidth:"wide"}),dayPeriod:cl({values:lS,defaultWidth:"wide",formattingValues:cS,defaultFormattingWidth:"wide"})};function ul(n){return(t,e={})=>{const r=e.width,d=r&&n.matchPatterns[r]||n.matchPatterns[n.defaultMatchWidth],u=t.match(d);if(!u)return null;const f=u[0],v=r&&n.parsePatterns[r]||n.parsePatterns[n.defaultParseWidth],a=Array.isArray(v)?fS(v,o=>o.test(f)):dS(v,o=>o.test(f));let g;g=n.valueCallback?n.valueCallback(a):a,g=e.valueCallback?e.valueCallback(g):g;const i=t.slice(f.length);return{value:g,rest:i}}}function dS(n,t){for(const e in n)if(Object.prototype.hasOwnProperty.call(n,e)&&t(n[e]))return e}function fS(n,t){for(let e=0;e<n.length;e++)if(t(n[e]))return e}function pS(n){return(t,e={})=>{const r=t.match(n.matchPattern);if(!r)return null;const d=r[0],u=t.match(n.parsePattern);if(!u)return null;let f=n.valueCallback?n.valueCallback(u[0]):u[0];f=e.valueCallback?e.valueCallback(f):f;const v=t.slice(d.length);return{value:f,rest:v}}}const gS=/^(\d+)(th|st|nd|rd)?/i,mS=/\d+/i,vS={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},yS={any:[/^b/i,/^(a|c)/i]},bS={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},wS={any:[/1/i,/2/i,/3/i,/4/i]},xS={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},CS={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]},_S={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},AS={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]},kS={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},SS={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}},$S={ordinalNumber:pS({matchPattern:gS,parsePattern:mS,valueCallback:n=>parseInt(n,10)}),era:ul({matchPatterns:vS,defaultMatchWidth:"wide",parsePatterns:yS,defaultParseWidth:"any"}),quarter:ul({matchPatterns:bS,defaultMatchWidth:"wide",parsePatterns:wS,defaultParseWidth:"any",valueCallback:n=>n+1}),month:ul({matchPatterns:xS,defaultMatchWidth:"wide",parsePatterns:CS,defaultParseWidth:"any"}),day:ul({matchPatterns:_S,defaultMatchWidth:"wide",parsePatterns:AS,defaultParseWidth:"any"}),dayPeriod:ul({matchPatterns:kS,defaultMatchWidth:"any",parsePatterns:SS,defaultParseWidth:"any"})},ES=Nn("G",{code:"en-US",formatDistance:Jk,formatLong:tS,formatRelative:rS,localize:hS,match:$S,options:{weekStartsOn:0,firstWeekContainsDate:1}});function TS(n,t){const e=ni(n,t?.in);return Gk(e,Yk(e))+1}function Fm(n,t){const e=ni(n,t?.in),r=+ll(e)-+qk(e);return Math.round(r/Lm)+1}function dh(n,t){const e=ni(n,t?.in),r=e.getFullYear(),d=ga(),u=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??d.firstWeekContainsDate??d.locale?.options?.firstWeekContainsDate??1,f=Ro(t?.in||n,0);f.setFullYear(r+1,0,u),f.setHours(0,0,0,0);const v=ma(f,t),a=Ro(t?.in||n,0);a.setFullYear(r,0,u),a.setHours(0,0,0,0);const g=ma(a,t);return+e>=+v?r+1:+e>=+g?r:r-1}function RS(n,t){const e=ga(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??e.firstWeekContainsDate??e.locale?.options?.firstWeekContainsDate??1,d=dh(n,t),u=Ro(t?.in||n,0);return u.setFullYear(d,0,r),u.setHours(0,0,0,0),ma(u,t)}function zm(n,t){const e=ni(n,t?.in),r=+ma(e,t)-+RS(e,t);return Math.round(r/Lm)+1}function gn(n,t){const e=n<0?"-":"",r=Math.abs(n).toString().padStart(t,"0");return e+r}const as={y(n,t){const e=n.getFullYear(),r=e>0?e:1-e;return gn(t==="yy"?r%100:r,t.length)},M(n,t){const e=n.getMonth();return t==="M"?String(e+1):gn(e+1,2)},d(n,t){return gn(n.getDate(),t.length)},a(n,t){const e=n.getHours()/12>=1?"pm":"am";switch(t){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(n,t){return gn(n.getHours()%12||12,t.length)},H(n,t){return gn(n.getHours(),t.length)},m(n,t){return gn(n.getMinutes(),t.length)},s(n,t){return gn(n.getSeconds(),t.length)},S(n,t){const e=t.length,r=n.getMilliseconds(),d=Math.trunc(r*Math.pow(10,e-3));return gn(d,t.length)}},va={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},jm={G:function(n,t,e){const r=n.getFullYear()>0?1:0;switch(t){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(n,t,e){if(t==="yo"){const r=n.getFullYear(),d=r>0?r:1-r;return e.ordinalNumber(d,{unit:"year"})}return as.y(n,t)},Y:function(n,t,e,r){const d=dh(n,r),u=d>0?d:1-d;if(t==="YY"){const f=u%100;return gn(f,2)}return t==="Yo"?e.ordinalNumber(u,{unit:"year"}):gn(u,t.length)},R:function(n,t){const e=Nm(n);return gn(e,t.length)},u:function(n,t){const e=n.getFullYear();return gn(e,t.length)},Q:function(n,t,e){const r=Math.ceil((n.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return gn(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(n,t,e){const r=Math.ceil((n.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return gn(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(n,t,e){const r=n.getMonth();switch(t){case"M":case"MM":return as.M(n,t);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(n,t,e){const r=n.getMonth();switch(t){case"L":return String(r+1);case"LL":return gn(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(n,t,e,r){const d=zm(n,r);return t==="wo"?e.ordinalNumber(d,{unit:"week"}):gn(d,t.length)},I:function(n,t,e){const r=Fm(n);return t==="Io"?e.ordinalNumber(r,{unit:"week"}):gn(r,t.length)},d:function(n,t,e){return t==="do"?e.ordinalNumber(n.getDate(),{unit:"date"}):as.d(n,t)},D:function(n,t,e){const r=TS(n);return t==="Do"?e.ordinalNumber(r,{unit:"dayOfYear"}):gn(r,t.length)},E:function(n,t,e){const r=n.getDay();switch(t){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(n,t,e,r){const d=n.getDay(),u=(d-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(u);case"ee":return gn(u,2);case"eo":return e.ordinalNumber(u,{unit:"day"});case"eee":return e.day(d,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(d,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(d,{width:"short",context:"formatting"});default:return e.day(d,{width:"wide",context:"formatting"})}},c:function(n,t,e,r){const d=n.getDay(),u=(d-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(u);case"cc":return gn(u,t.length);case"co":return e.ordinalNumber(u,{unit:"day"});case"ccc":return e.day(d,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(d,{width:"narrow",context:"standalone"});case"cccccc":return e.day(d,{width:"short",context:"standalone"});default:return e.day(d,{width:"wide",context:"standalone"})}},i:function(n,t,e){const r=n.getDay(),d=r===0?7:r;switch(t){case"i":return String(d);case"ii":return gn(d,t.length);case"io":return e.ordinalNumber(d,{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(n,t,e){const r=n.getHours()/12>=1?"pm":"am";switch(t){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(n,t,e){const r=n.getHours();let d;switch(r===12?d=va.noon:r===0?d=va.midnight:d=r/12>=1?"pm":"am",t){case"b":case"bb":return e.dayPeriod(d,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(d,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(d,{width:"narrow",context:"formatting"});default:return e.dayPeriod(d,{width:"wide",context:"formatting"})}},B:function(n,t,e){const r=n.getHours();let d;switch(r>=17?d=va.evening:r>=12?d=va.afternoon:r>=4?d=va.morning:d=va.night,t){case"B":case"BB":case"BBB":return e.dayPeriod(d,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(d,{width:"narrow",context:"formatting"});default:return e.dayPeriod(d,{width:"wide",context:"formatting"})}},h:function(n,t,e){if(t==="ho"){let r=n.getHours()%12;return r===0&&(r=12),e.ordinalNumber(r,{unit:"hour"})}return as.h(n,t)},H:function(n,t,e){return t==="Ho"?e.ordinalNumber(n.getHours(),{unit:"hour"}):as.H(n,t)},K:function(n,t,e){const r=n.getHours()%12;return t==="Ko"?e.ordinalNumber(r,{unit:"hour"}):gn(r,t.length)},k:function(n,t,e){let r=n.getHours();return r===0&&(r=24),t==="ko"?e.ordinalNumber(r,{unit:"hour"}):gn(r,t.length)},m:function(n,t,e){return t==="mo"?e.ordinalNumber(n.getMinutes(),{unit:"minute"}):as.m(n,t)},s:function(n,t,e){return t==="so"?e.ordinalNumber(n.getSeconds(),{unit:"second"}):as.s(n,t)},S:function(n,t){return as.S(n,t)},X:function(n,t,e){const r=n.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Wm(r);case"XXXX":case"XX":return Is(r);default:return Is(r,":")}},x:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"x":return Wm(r);case"xxxx":case"xx":return Is(r);default:return Is(r,":")}},O:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Bm(r,":");default:return"GMT"+Is(r,":")}},z:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Bm(r,":");default:return"GMT"+Is(r,":")}},t:function(n,t,e){const r=Math.trunc(+n/1e3);return gn(r,t.length)},T:function(n,t,e){return gn(+n,t.length)}};function Bm(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),d=Math.trunc(r/60),u=r%60;return u===0?e+String(d):e+String(d)+t+gn(u,2)}function Wm(n,t){return n%60===0?(n>0?"-":"+")+gn(Math.abs(n)/60,2):Is(n,t)}function Is(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),d=gn(Math.trunc(r/60),2),u=gn(r%60,2);return e+d+t+u}const Hm=(n,t)=>{switch(n){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},Um=(n,t)=>{switch(n){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},IS=(n,t)=>{const e=n.match(/(P+)(p+)?/)||[],r=e[1],d=e[2];if(!d)return Hm(n,t);let u;switch(r){case"P":u=t.dateTime({width:"short"});break;case"PP":u=t.dateTime({width:"medium"});break;case"PPP":u=t.dateTime({width:"long"});break;default:u=t.dateTime({width:"full"});break}return u.replace("{{date}}",Hm(r,t)).replace("{{time}}",Um(d,t))},MS=Nn("p",{p:Um,P:IS}),LS=/^D+$/,OS=/^Y+$/,NS=["D","DD","YY","YYYY"];function Vm(n){return LS.test(n)}function Gm(n){return OS.test(n)}function qm(n,t,e){const r=DS(n,t,e);if(console.warn(r),NS.includes(n))throw new RangeError(r)}function DS(n,t,e){const r=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${t}\`) for formatting ${r} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const PS=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,FS=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,zS=/^'([^]*?)'?$/,jS=/''/g,BS=/[a-zA-Z]/;function Ms(n,t,e){const r=ga(),d=e?.locale??r.locale??ES,u=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,f=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,v=ni(n,e?.in);if(!Pm(v))throw new RangeError("Invalid time value");let a=t.match(FS).map(i=>{const o=i[0];if(o==="p"||o==="P"){const c=MS[o];return c(i,d.formatLong)}return i}).join("").match(PS).map(i=>{if(i==="''")return{isToken:!1,value:"'"};const o=i[0];if(o==="'")return{isToken:!1,value:WS(i)};if(jm[o])return{isToken:!0,value:i};if(o.match(BS))throw new RangeError("Format string contains an unescaped latin alphabet character `"+o+"`");return{isToken:!1,value:i}});d.localize.preprocessor&&(a=d.localize.preprocessor(v,a));const g={firstWeekContainsDate:u,weekStartsOn:f,locale:d};return a.map(i=>{if(!i.isToken)return i.value;const o=i.value;(!e?.useAdditionalWeekYearTokens&&Gm(o)||!e?.useAdditionalDayOfYearTokens&&Vm(o))&&qm(o,t,String(n));const c=jm[o[0]];return c(v,o,d.localize,g)}).join("")}function WS(n){const t=n.match(zS);return t?t[1].replace(jS,"'"):n}var ls=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function uc(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Km={exports:{}},Ym;function HS(){return Ym||(Ym=1,(function(n,t){(function(){var e="ace",r=(function(){return this})();!r&&typeof window<"u"&&(r=window);var d=function(i,o,c){if(typeof i!="string"){d.original?d.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(c=o),d.modules[i]||(d.payloads[i]=c,d.modules[i]=null)};d.modules={},d.payloads={};var u=function(i,o,c){if(typeof o=="string"){var p=a(i,o);if(p!=null)return c&&c(),p}else if(Object.prototype.toString.call(o)==="[object Array]"){for(var s=[],h=0,m=o.length;h<m;++h){var y=a(i,o[h]);if(y==null&&f.original)return;s.push(y)}return c&&c.apply(null,s)||!0}},f=function(i,o){var c=u("",i,o);return c==null&&f.original?f.original.apply(this,arguments):c},v=function(i,o){if(o.indexOf("!")!==-1){var c=o.split("!");return v(i,c[0])+"!"+v(i,c[1])}if(o.charAt(0)=="."){var p=i.split("/").slice(0,-1).join("/");for(o=p+"/"+o;o.indexOf(".")!==-1&&s!=o;){var s=o;o=o.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return o},a=function(i,o){o=v(i,o);var c=d.modules[o];if(!c){if(c=d.payloads[o],typeof c=="function"){var p={},s={id:o,uri:"",exports:p,packaged:!0},h=function(y,x){return u(o,y,x)},m=c(h,p,s);p=m||s.exports,d.modules[o]=p,delete d.payloads[o]}c=d.modules[o]=p||c}return c};function g(i){var o=r;r[i]||(r[i]={}),o=r[i],(!o.define||!o.define.packaged)&&(d.original=o.define,o.define=d,o.define.packaged=!0),(!o.require||!o.require.packaged)&&(f.original=o.require,o.require=f,o.require.packaged=!0)}g(e)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(e,r,d){function u(f,v,a){Object.defineProperty(f,v,{value:a,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||u(String.prototype,"startsWith",function(f,v){return v=v||0,this.lastIndexOf(f,v)===v}),String.prototype.endsWith||u(String.prototype,"endsWith",function(f,v){var a=this;(v===void 0||v>a.length)&&(v=a.length),v-=f.length;var g=a.indexOf(f,v);return g!==-1&&g===v}),String.prototype.repeat||u(String.prototype,"repeat",function(f){for(var v="",a=this;f>0;)f&1&&(v+=a),(f>>=1)&&(a+=a);return v}),String.prototype.includes||u(String.prototype,"includes",function(f,v){return this.indexOf(f,v)!=-1}),Object.assign||(Object.assign=function(f){if(f==null)throw new TypeError("Cannot convert undefined or null to object");for(var v=Object(f),a=1;a<arguments.length;a++){var g=arguments[a];g!=null&&Object.keys(g).forEach(function(i){v[i]=g[i]})}return v}),Object.values||(Object.values=function(f){return Object.keys(f).map(function(v){return f[v]})}),Array.prototype.find||u(Array.prototype,"find",function(f){for(var v=this.length,a=arguments[1],g=0;g<v;g++){var i=this[g];if(f.call(a,i,g,this))return i}}),Array.prototype.findIndex||u(Array.prototype,"findIndex",function(f){for(var v=this.length,a=arguments[1],g=0;g<v;g++){var i=this[g];if(f.call(a,i,g,this))return g}}),Array.prototype.includes||u(Array.prototype,"includes",function(f,v){return this.indexOf(f,v)!=-1}),Array.prototype.fill||u(Array.prototype,"fill",function(f){for(var v=this,a=v.length>>>0,g=arguments[1],i=g>>0,o=i<0?Math.max(a+i,0):Math.min(i,a),c=arguments[2],p=c===void 0?a:c>>0,s=p<0?Math.max(a+p,0):Math.min(p,a);o<s;)v[o]=f,o++;return v}),Array.of||u(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(e,r,d){e("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(e,r,d){r.deepCopy=function u(f){if(typeof f!="object"||!f)return f;var v;if(Array.isArray(f)){v=[];for(var a=0;a<f.length;a++)v[a]=u(f[a]);return v}if(Object.prototype.toString.call(f)!=="[object Object]")return f;v={};for(var a in f)v[a]=u(f[a]);return v}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(e,r,d){r.last=function(v){return v[v.length-1]},r.stringReverse=function(v){return v.split("").reverse().join("")},r.stringRepeat=function(v,a){for(var g="";a>0;)a&1&&(g+=v),(a>>=1)&&(v+=v);return g};var u=/^\s\s*/,f=/\s\s*$/;r.stringTrimLeft=function(v){return v.replace(u,"")},r.stringTrimRight=function(v){return v.replace(f,"")},r.copyObject=function(v){var a={};for(var g in v)a[g]=v[g];return a},r.copyArray=function(v){for(var a=[],g=0,i=v.length;g<i;g++)v[g]&&typeof v[g]=="object"?a[g]=this.copyObject(v[g]):a[g]=v[g];return a},r.deepCopy=e("./deep_copy").deepCopy,r.arrayToMap=function(v){for(var a={},g=0;g<v.length;g++)a[v[g]]=1;return a},r.createMap=function(v){var a=Object.create(null);for(var g in v)a[g]=v[g];return a},r.arrayRemove=function(v,a){for(var g=0;g<=v.length;g++)a===v[g]&&v.splice(g,1)},r.escapeRegExp=function(v){return v.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},r.escapeHTML=function(v){return(""+v).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},r.getMatchOffsets=function(v,a){var g=[];return v.replace(a,function(i){g.push({offset:arguments[arguments.length-2],length:i.length})}),g},r.deferredCall=function(v){var a=null,g=function(){a=null,v()},i=function(o){return i.cancel(),a=setTimeout(g,o||0),i};return i.schedule=i,i.call=function(){return this.cancel(),v(),i},i.cancel=function(){return clearTimeout(a),a=null,i},i.isPending=function(){return a},i},r.delayedCall=function(v,a){var g=null,i=function(){g=null,v()},o=function(c){g==null&&(g=setTimeout(i,c||a))};return o.delay=function(c){g&&clearTimeout(g),g=setTimeout(i,c||a)},o.schedule=o,o.call=function(){this.cancel(),v()},o.cancel=function(){g&&clearTimeout(g),g=null},o.isPending=function(){return g},o},r.sleep=function(v){return new Promise(function(a){setTimeout(a,v)})},r.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},r.skipEmptyMatch=function(v,a,g){return g&&v.codePointAt(a)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(e,r,d){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 u=typeof navigator=="object"?navigator:{},f=(/mac|win|linux/i.exec(u.platform)||["other"])[0].toLowerCase(),v=u.userAgent||"",a=u.appName||"";r.isWin=f=="win",r.isMac=f=="mac",r.isLinux=f=="linux",r.isIE=a=="Microsoft Internet Explorer"||a.indexOf("MSAppHost")>=0?parseFloat((v.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((v.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),r.isOldIE=r.isIE&&r.isIE<9,r.isGecko=r.isMozilla=v.match(/ Gecko\/\d+/),r.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",r.isWebKit=parseFloat(v.split("WebKit/")[1])||void 0,r.isChrome=parseFloat(v.split(" Chrome/")[1])||void 0,r.isSafari=parseFloat(v.split(" Safari/")[1])&&!r.isChrome||void 0,r.isEdge=parseFloat(v.split(" Edge/")[1])||void 0,r.isAIR=v.indexOf("AdobeAIR")>=0,r.isAndroid=v.indexOf("Android")>=0,r.isChromeOS=v.indexOf(" CrOS ")>=0,r.isIOS=/iPad|iPhone|iPod/.test(v)&&!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,d){var u=e("./useragent"),f="http://www.w3.org/1999/xhtml";r.buildDom=function c(p,s,h){if(typeof p=="string"&&p){var m=document.createTextNode(p);return s&&s.appendChild(m),m}if(!Array.isArray(p))return p&&p.appendChild&&s&&s.appendChild(p),p;if(typeof p[0]!="string"||!p[0]){for(var y=[],x=0;x<p.length;x++){var T=c(p[x],s,h);T&&y.push(T)}return y}var S=document.createElement(p[0]),_=p[1],C=1;_&&typeof _=="object"&&!Array.isArray(_)&&(C=2);for(var x=C;x<p.length;x++)c(p[x],S,h);return C==2&&Object.keys(_).forEach(function(L){var O=_[L];L==="class"?S.className=Array.isArray(O)?O.join(" "):O:typeof O=="function"||L=="value"||L[0]=="$"?S[L]=O:L==="ref"?h&&(h[O]=S):L==="style"?typeof O=="string"&&(S.style.cssText=O):O!=null&&S.setAttribute(L,O)}),s&&s.appendChild(S),S},r.getDocumentHead=function(c){return c||(c=document),c.head||c.getElementsByTagName("head")[0]||c.documentElement},r.createElement=function(c,p){return document.createElementNS?document.createElementNS(p||f,c):document.createElement(c)},r.removeChildren=function(c){c.innerHTML=""},r.createTextNode=function(c,p){var s=p?p.ownerDocument:document;return s.createTextNode(c)},r.createFragment=function(c){var p=c?c.ownerDocument:document;return p.createDocumentFragment()},r.hasCssClass=function(c,p){var s=(c.className+"").split(/\s+/g);return s.indexOf(p)!==-1},r.addCssClass=function(c,p){r.hasCssClass(c,p)||(c.className+=" "+p)},r.removeCssClass=function(c,p){for(var s=c.className.split(/\s+/g);;){var h=s.indexOf(p);if(h==-1)break;s.splice(h,1)}c.className=s.join(" ")},r.toggleCssClass=function(c,p){for(var s=c.className.split(/\s+/g),h=!0;;){var m=s.indexOf(p);if(m==-1)break;h=!1,s.splice(m,1)}return h&&s.push(p),c.className=s.join(" "),h},r.setCssClass=function(c,p,s){s?r.addCssClass(c,p):r.removeCssClass(c,p)},r.hasCssString=function(c,p){var s=0,h;if(p=p||document,h=p.querySelectorAll("style")){for(;s<h.length;)if(h[s++].id===c)return!0}},r.removeElementById=function(c,p){p=p||document,p.getElementById(c)&&p.getElementById(c).remove()};var v,a=[];r.useStrictCSP=function(c){v=c,c==!1?g():a||(a=[])};function g(){var c=a;a=null,c&&c.forEach(function(p){i(p[0],p[1])})}function i(c,p,s){if(!(typeof document>"u")){if(a){if(s)g();else if(s===!1)return a.push([c,p])}if(!v){var h=s;!s||!s.getRootNode?h=document:(h=s.getRootNode(),(!h||h==s)&&(h=document));var m=h.ownerDocument||h;if(p&&r.hasCssString(p,h))return null;p&&(c+=`
11
+ /*# sourceURL=ace/css/`+p+" */");var y=r.createElement("style");y.appendChild(m.createTextNode(c)),p&&(y.id=p),h==m&&(h=r.getDocumentHead(m)),h.insertBefore(y,h.firstChild)}}}if(r.importCssString=i,r.importCssStylsheet=function(c,p){r.buildDom(["link",{rel:"stylesheet",href:c}],r.getDocumentHead(p))},r.$fixPositionBug=function(c){var p=c.getBoundingClientRect();if(c.style.left){var s=parseFloat(c.style.left),h=+p.left;Math.abs(s-h)>1&&(c.style.left=2*s-h+"px")}if(c.style.right){var s=parseFloat(c.style.right),h=window.innerWidth-p.right;Math.abs(s-h)>1&&(c.style.right=2*s-h+"px")}if(c.style.top){var s=parseFloat(c.style.top),h=+p.top;Math.abs(s-h)>1&&(c.style.top=2*s-h+"px")}if(c.style.bottom){var s=parseFloat(c.style.bottom),h=window.innerHeight-p.bottom;Math.abs(s-h)>1&&(c.style.bottom=2*s-h+"px")}},r.scrollbarWidth=function(c){var p=r.createElement("ace_inner");p.style.width="100%",p.style.minWidth="0px",p.style.height="200px",p.style.display="block";var s=r.createElement("ace_outer"),h=s.style;h.position="absolute",h.left="-10000px",h.overflow="hidden",h.width="200px",h.minWidth="0px",h.height="150px",h.display="block",s.appendChild(p);var m=c&&c.documentElement||document&&document.documentElement;if(!m)return 0;m.appendChild(s);var y=p.offsetWidth;h.overflow="scroll";var x=p.offsetWidth;return y===x&&(x=s.clientWidth),m.removeChild(s),y-x},r.computedStyle=function(c,p){return window.getComputedStyle(c,"")||{}},r.setStyle=function(c,p,s){c[p]!==s&&(c[p]=s)},r.HAS_CSS_ANIMATION=!1,r.HAS_CSS_TRANSFORMS=!1,r.HI_DPI=u.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,u.isChromeOS&&(r.HI_DPI=!1),typeof document<"u"){var o=document.createElement("div");r.HI_DPI&&o.style.transform!==void 0&&(r.HAS_CSS_TRANSFORMS=!0),!u.isEdge&&typeof o.style.animationName<"u"&&(r.HAS_CSS_ANIMATION=!0),o=null}r.HAS_CSS_TRANSFORMS?r.translate=function(c,p,s){c.style.transform="translate("+Math.round(p)+"px, "+Math.round(s)+"px)"}:r.translate=function(c,p,s){c.style.top=Math.round(s)+"px",c.style.left=Math.round(p)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,r,d){var u=e("./dom");r.get=function(f,v){var a=new XMLHttpRequest;a.open("GET",f,!0),a.onreadystatechange=function(){a.readyState===4&&v(a.responseText)},a.send(null)},r.loadScript=function(f,v){var a=u.getDocumentHead(),g=document.createElement("script");g.src=f,a.appendChild(g),g.onload=g.onreadystatechange=function(i,o){(o||!g.readyState||g.readyState=="loaded"||g.readyState=="complete")&&(g=g.onload=g.onreadystatechange=null,o||v())}},r.qualifyURL=function(f){var v=document.createElement("a");return v.href=f,v.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(e,r,d){r.inherits=function(u,f){u.super_=f,u.prototype=Object.create(f.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}})},r.mixin=function(u,f){for(var v in f)u[v]=f[v];return u},r.implement=function(u,f){r.mixin(u,f)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,r,d){var u={},f=function(){this.propagationStopped=!0},v=function(){this.defaultPrevented=!0};u._emit=u._dispatchEvent=function(a,g){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var i=this._eventRegistry[a]||[],o=this._defaultHandlers[a];if(!(!i.length&&!o)){(typeof g!="object"||!g)&&(g={}),g.type||(g.type=a),g.stopPropagation||(g.stopPropagation=f),g.preventDefault||(g.preventDefault=v),i=i.slice();for(var c=0;c<i.length&&(i[c](g,this),!g.propagationStopped);c++);if(o&&!g.defaultPrevented)return o(g,this)}},u._signal=function(a,g){var i=(this._eventRegistry||{})[a];if(i){i=i.slice();for(var o=0;o<i.length;o++)i[o](g,this)}},u.once=function(a,g){var i=this;if(this.on(a,function o(){i.off(a,o),g.apply(null,arguments)}),!g)return new Promise(function(o){g=o})},u.setDefaultHandler=function(a,g){var i=this._defaultHandlers;if(i||(i=this._defaultHandlers={_disabled_:{}}),i[a]){var o=i[a],c=i._disabled_[a];c||(i._disabled_[a]=c=[]),c.push(o);var p=c.indexOf(g);p!=-1&&c.splice(p,1)}i[a]=g},u.removeDefaultHandler=function(a,g){var i=this._defaultHandlers;if(i){var o=i._disabled_[a];if(i[a]==g)o&&this.setDefaultHandler(a,o.pop());else if(o){var c=o.indexOf(g);c!=-1&&o.splice(c,1)}}},u.on=u.addEventListener=function(a,g,i){this._eventRegistry=this._eventRegistry||{};var o=this._eventRegistry[a];return o||(o=this._eventRegistry[a]=[]),o.indexOf(g)==-1&&o[i?"unshift":"push"](g),g},u.off=u.removeListener=u.removeEventListener=function(a,g){this._eventRegistry=this._eventRegistry||{};var i=this._eventRegistry[a];if(i){var o=i.indexOf(g);o!==-1&&i.splice(o,1)}},u.removeAllListeners=function(a){a||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[a]=void 0),this._defaultHandlers&&(this._defaultHandlers[a]=void 0)},r.EventEmitter=u}),ace.define("ace/lib/report_error",["require","exports","module"],function(e,r,d){r.reportError=function(u,f){var v=new Error(u);v.data=f,typeof console=="object"&&console.error&&console.error(v),setTimeout(function(){throw v})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(e,r,d){var u={"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=u}),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,d){"no use strict";var u=e("./oop"),f=e("./event_emitter").EventEmitter,v=e("./report_error").reportError,a=e("./default_english_messages").defaultEnglishMessages,g={setOptions:function(s){Object.keys(s).forEach(function(h){this.setOption(h,s[h])},this)},getOptions:function(s){var h={};if(s)Array.isArray(s)||(s=Object.keys(s));else{var m=this.$options;s=Object.keys(m).filter(function(y){return!m[y].hidden})}return s.forEach(function(y){h[y]=this.getOption(y)},this),h},setOption:function(s,h){if(this["$"+s]!==h){var m=this.$options[s];if(!m)return i('misspelled option "'+s+'"');if(m.forwardTo)return this[m.forwardTo]&&this[m.forwardTo].setOption(s,h);m.handlesSet||(this["$"+s]=h),m&&m.set&&m.set.call(this,h)}},getOption:function(s){var h=this.$options[s];return h?h.forwardTo?this[h.forwardTo]&&this[h.forwardTo].getOption(s):h&&h.get?h.get.call(this):this["$"+s]:i('misspelled option "'+s+'"')}};function i(s){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var o,c,p=(function(){function s(){this.$defaultOptions={},o=a,c="dollarSigns"}return s.prototype.defineOptions=function(h,m,y){return h.$options||(this.$defaultOptions[m]=h.$options={}),Object.keys(y).forEach(function(x){var T=y[x];typeof T=="string"&&(T={forwardTo:T}),T.name||(T.name=x),h.$options[T.name]=T,"initialValue"in T&&(h["$"+T.name]=T.initialValue)}),u.implement(h,g),this},s.prototype.resetOptions=function(h){Object.keys(h.$options).forEach(function(m){var y=h.$options[m];"value"in y&&h.setOption(m,y.value)})},s.prototype.setDefaultValue=function(h,m,y){if(!h){for(h in this.$defaultOptions)if(this.$defaultOptions[h][m])break;if(!this.$defaultOptions[h][m])return!1}var x=this.$defaultOptions[h]||(this.$defaultOptions[h]={});x[m]&&(x.forwardTo?this.setDefaultValue(x.forwardTo,m,y):x[m].value=y)},s.prototype.setDefaultValues=function(h,m){Object.keys(m).forEach(function(y){this.setDefaultValue(h,y,m[y])},this)},s.prototype.setMessages=function(h,m){o=h,m&&m.placeholders&&(c=m.placeholders)},s.prototype.nls=function(h,m,y){o[h]||(i("No message found for the key '"+h+"' in messages with id "+o.$id+", trying to find a translation for the default string '"+m+"'."),o[m]||i("No message found for the default string '"+m+"' in the provided messages. Falling back to the default English message."));var x=o[h]||o[m]||m;return y&&(c==="dollarSigns"&&(x=x.replace(/\$(\$|[\d]+)/g,function(T,S){return S=="$"?"$":y[S]})),c==="curlyBrackets"&&(x=x.replace(/\{([^\}]+)\}/g,function(T,S){return y[S]}))),x},s})();p.prototype.warn=i,p.prototype.reportError=v,u.implement(p.prototype,f),r.AppConfig=p}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(e,r,d){d.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,d){r.isDark=!1,r.cssClass="ace-tm",r.cssText=e("./textmate-css"),r.$id="ace/theme/textmate";var u=e("../lib/dom");u.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,d){"no use strict";var u=e("./lib/lang"),f=e("./lib/net"),v=e("./lib/dom"),a=e("./lib/app_config").AppConfig;d.exports=r=new a;var g={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};r.get=function(p){if(!g.hasOwnProperty(p))throw new Error("Unknown config key: "+p);return g[p]},r.set=function(p,s){if(g.hasOwnProperty(p))g[p]=s;else if(this.setDefaultValue("",p,s)==!1)throw new Error("Unknown config key: "+p);p=="useStrictCSP"&&v.useStrictCSP(s)},r.all=function(){return u.copyObject(g)},r.$modes={},r.moduleUrl=function(p,s){if(g.$moduleUrls[p])return g.$moduleUrls[p];var h=p.split("/");s=s||h[h.length-2]||"";var m=s=="snippets"?"/":"-",y=h[h.length-1];if(s=="worker"&&m=="-"){var x=new RegExp("^"+s+"[\\-_]|[\\-_]"+s+"$","g");y=y.replace(x,"")}(!y||y==s)&&h.length>1&&(y=h[h.length-2]);var T=g[s+"Path"];return T==null?T=g.basePath:m=="/"&&(s=m=""),T&&T.slice(-1)!="/"&&(T+="/"),T+s+m+y+this.get("suffix")},r.setModuleUrl=function(p,s){return g.$moduleUrls[p]=s};var i=function(p,s){if(p==="ace/theme/textmate"||p==="./theme/textmate")return s(null,e("./theme/textmate"));if(o)return o(p,s);console.error("loader is not configured")},o;r.setLoader=function(p){o=p},r.dynamicModules=Object.create(null),r.$loading={},r.$loaded={},r.loadModule=function(p,s){var h;if(Array.isArray(p))var m=p[0],y=p[1];else if(typeof p=="string")var y=p;var x=function(T){if(T&&!r.$loading[y])return s&&s(T);if(r.$loading[y]||(r.$loading[y]=[]),r.$loading[y].push(s),!(r.$loading[y].length>1)){var S=function(){i(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(O){O&&O(C)})})};if(!r.get("packaged"))return S();f.loadScript(r.moduleUrl(y,m),S),c()}};if(r.dynamicModules[y])r.dynamicModules[y]().then(function(T){T.default?x(T.default):x(T)});else{try{h=this.$require(y)}catch{}x(h||r.$loaded[y])}},r.$require=function(p){if(typeof d.require=="function"){var s="require";return d[s](p)}},r.setModuleLoader=function(p,s){r.dynamicModules[p]=s};var c=function(){!g.basePath&&!g.workerPath&&!g.modePath&&!g.themePath&&!Object.keys(g.$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,d){e("./lib/fixoldbrowsers");var u=e("./config");u.setLoader(function(g,i){e([g],function(o){i(null,o)})});var f=(function(){return this||typeof window<"u"&&window})();d.exports=function(g){u.init=v,u.$require=e,g.require=e},v(!0);function v(g){if(!(!f||!f.document)){u.set("packaged",g||e.packaged||d.packaged||f.define&&(void 0).packaged);var i={},o="",c=document.currentScript||document._currentScript,p=c&&c.ownerDocument||document;c&&c.src&&(o=c.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var s=p.getElementsByTagName("script"),h=0;h<s.length;h++){var m=s[h],y=m.src||m.getAttribute("src");if(y){for(var x=m.attributes,T=0,S=x.length;T<S;T++){var _=x[T];_.name.indexOf("data-ace-")===0&&(i[a(_.name.replace(/^data-ace-/,""))]=_.value)}var C=y.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);C&&(o=C[1])}}o&&(i.base=i.base||o,i.packaged=!0),i.basePath=i.base,i.workerPath=i.workerPath||i.base,i.modePath=i.modePath||i.base,i.themePath=i.themePath||i.base,delete i.base;for(var L in i)typeof i[L]<"u"&&u.set(L,i[L])}}function a(g){return g.replace(/-(.)/g,function(i,o){return o.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(e,r,d){var u=(function(){function f(v,a,g,i){this.start={row:v,column:a},this.end={row:g,column:i}}return f.prototype.isEqual=function(v){return this.start.row===v.start.row&&this.end.row===v.end.row&&this.start.column===v.start.column&&this.end.column===v.end.column},f.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},f.prototype.contains=function(v,a){return this.compare(v,a)==0},f.prototype.compareRange=function(v){var a,g=v.end,i=v.start;return a=this.compare(g.row,g.column),a==1?(a=this.compare(i.row,i.column),a==1?2:a==0?1:0):a==-1?-2:(a=this.compare(i.row,i.column),a==-1?-1:a==1?42:0)},f.prototype.comparePoint=function(v){return this.compare(v.row,v.column)},f.prototype.containsRange=function(v){return this.comparePoint(v.start)==0&&this.comparePoint(v.end)==0},f.prototype.intersects=function(v){var a=this.compareRange(v);return a==-1||a==0||a==1},f.prototype.isEnd=function(v,a){return this.end.row==v&&this.end.column==a},f.prototype.isStart=function(v,a){return this.start.row==v&&this.start.column==a},f.prototype.setStart=function(v,a){typeof v=="object"?(this.start.column=v.column,this.start.row=v.row):(this.start.row=v,this.start.column=a)},f.prototype.setEnd=function(v,a){typeof v=="object"?(this.end.column=v.column,this.end.row=v.row):(this.end.row=v,this.end.column=a)},f.prototype.inside=function(v,a){return this.compare(v,a)==0?!(this.isEnd(v,a)||this.isStart(v,a)):!1},f.prototype.insideStart=function(v,a){return this.compare(v,a)==0?!this.isEnd(v,a):!1},f.prototype.insideEnd=function(v,a){return this.compare(v,a)==0?!this.isStart(v,a):!1},f.prototype.compare=function(v,a){return!this.isMultiLine()&&v===this.start.row?a<this.start.column?-1:a>this.end.column?1:0:v<this.start.row?-1:v>this.end.row?1:this.start.row===v?a>=this.start.column?0:-1:this.end.row===v?a<=this.end.column?0:1:0},f.prototype.compareStart=function(v,a){return this.start.row==v&&this.start.column==a?-1:this.compare(v,a)},f.prototype.compareEnd=function(v,a){return this.end.row==v&&this.end.column==a?1:this.compare(v,a)},f.prototype.compareInside=function(v,a){return this.end.row==v&&this.end.column==a?1:this.start.row==v&&this.start.column==a?-1:this.compare(v,a)},f.prototype.clipRows=function(v,a){if(this.end.row>a)var g={row:a+1,column:0};else if(this.end.row<v)var g={row:v,column:0};if(this.start.row>a)var i={row:a+1,column:0};else if(this.start.row<v)var i={row:v,column:0};return f.fromPoints(i||this.start,g||this.end)},f.prototype.extend=function(v,a){var g=this.compare(v,a);if(g==0)return this;if(g==-1)var i={row:v,column:a};else var o={row:v,column:a};return f.fromPoints(i||this.start,o||this.end)},f.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},f.prototype.isMultiLine=function(){return this.start.row!==this.end.row},f.prototype.clone=function(){return f.fromPoints(this.start,this.end)},f.prototype.collapseRows=function(){return this.end.column==0?new f(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new f(this.start.row,0,this.end.row,0)},f.prototype.toScreenRange=function(v){var a=v.documentToScreenPosition(this.start),g=v.documentToScreenPosition(this.end);return new f(a.row,a.column,g.row,g.column)},f.prototype.moveBy=function(v,a){this.start.row+=v,this.start.column+=a,this.end.row+=v,this.end.column+=a},f})();u.fromPoints=function(f,v){return new u(f.row,f.column,v.row,v.column)},u.comparePoints=function(f,v){return f.row-v.row||f.column-v.column},r.Range=u}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(e,r,d){for(var u=e("./oop"),f={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:"*"}},v={Command:224,Backspace:8,Tab:9,Return:13,Enter:13,Pause:19,Escape:27,PageUp:33,PageDown:34,End:35,Home:36,Insert:45,Delete:46,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Backquote:192,Minus:189,Equal:187,BracketLeft:219,Backslash:220,BracketRight:221,Semicolon:186,Quote:222,Comma:188,Period:190,Slash:191,Space:32,NumpadAdd:107,NumpadDecimal:110,NumpadSubtract:109,NumpadDivide:111,NumpadMultiply:106},a=0;a<10;a++)v["Digit"+a]=48+a,v["Numpad"+a]=96+a,f.PRINTABLE_KEYS[48+a]=""+a,f.FUNCTION_KEYS[96+a]="Numpad"+a;for(var a=65;a<91;a++){var g=String.fromCharCode(a+32);v["Key"+g.toUpperCase()]=a,f.PRINTABLE_KEYS[a]=g}for(var a=1;a<13;a++)v["F"+a]=111+a,f.FUNCTION_KEYS[111+a]="F"+a;var i={Shift:16,Control:17,Alt:18,Meta:224};for(var o in i)v[o]=v[o+"Left"]=v[o+"Right"]=i[o];r.$codeToKeyCode=v,f.PRINTABLE_KEYS[173]="-";for(var c in f.FUNCTION_KEYS){var p=f.FUNCTION_KEYS[c].toLowerCase();f[p]=parseInt(c,10)}for(var c in f.PRINTABLE_KEYS){var p=f.PRINTABLE_KEYS[c].toLowerCase();f[p]=parseInt(c,10)}u.mixin(f,f.MODIFIER_KEYS),u.mixin(f,f.PRINTABLE_KEYS),u.mixin(f,f.FUNCTION_KEYS),f.enter=f.return,f.escape=f.esc,f.del=f.delete,(function(){for(var s=["cmd","ctrl","alt","shift"],h=Math.pow(2,s.length);h--;)f.KEY_MODS[h]=s.filter(function(m){return h&f.KEY_MODS[m]}).join("-")+"-"})(),f.KEY_MODS[0]="",f.KEY_MODS[-1]="input-",u.mixin(r,f),r.default=r,r.keyCodeToString=function(s){var h=f[s];return typeof h!="string"&&(h=String.fromCharCode(s)),h.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,r,d){var u=e("./keys"),f=e("./useragent"),v=null,a=0,g;function i(){g=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return g={passive:!1},!0}})}catch{}}function o(){return g==null&&i(),g}function c(T,S,_){this.elem=T,this.type=S,this.callback=_}c.prototype.destroy=function(){s(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var p=r.addListener=function(T,S,_,C){T.addEventListener(S,_,o()),C&&C.$toDestroy.push(new c(T,S,_))},s=r.removeListener=function(T,S,_){T.removeEventListener(S,_,o())};r.stopEvent=function(T){return r.stopPropagation(T),r.preventDefault(T),!1},r.stopPropagation=function(T){T.stopPropagation&&T.stopPropagation()},r.preventDefault=function(T){T.preventDefault&&T.preventDefault()},r.getButton=function(T){return T.type=="dblclick"?0:T.type=="contextmenu"||f.isMac&&T.ctrlKey&&!T.altKey&&!T.shiftKey?2:T.button},r.capture=function(T,S,_){var C=T&&T.ownerDocument||document;function L(O){S&&S(O),_&&_(O),s(C,"mousemove",S),s(C,"mouseup",L),s(C,"dragstart",L)}return p(C,"mousemove",S),p(C,"mouseup",L),p(C,"dragstart",L),L},r.addMouseWheelListener=function(T,S,_){p(T,"wheel",function(C){var L=.15,O=C.deltaX||0,M=C.deltaY||0;switch(C.deltaMode){case C.DOM_DELTA_PIXEL:C.wheelX=O*L,C.wheelY=M*L;break;case C.DOM_DELTA_LINE:var I=15;C.wheelX=O*I,C.wheelY=M*I;break;case C.DOM_DELTA_PAGE:var B=150;C.wheelX=O*B,C.wheelY=M*B;break}S(C)},_)},r.addMultiMouseDownListener=function(T,S,_,C,L){var O=0,M,I,B,F={2:"dblclick",3:"tripleclick",4:"quadclick"};function N(E){if(r.getButton(E)!==0?O=0:E.detail>1?(O++,O>4&&(O=1)):O=1,f.isIE){var A=Math.abs(E.clientX-M)>5||Math.abs(E.clientY-I)>5;(!B||A)&&(O=1),B&&clearTimeout(B),B=setTimeout(function(){B=null},S[O-1]||600),O==1&&(M=E.clientX,I=E.clientY)}if(E._clicks=O,_[C]("mousedown",E),O>4)O=0;else if(O>1)return _[C](F[O],E)}Array.isArray(T)||(T=[T]),T.forEach(function(E){p(E,"mousedown",N,L)})};function h(T){return 0|(T.ctrlKey?1:0)|(T.altKey?2:0)|(T.shiftKey?4:0)|(T.metaKey?8:0)}r.getModifierString=function(T){return u.KEY_MODS[h(T)]};function m(T,S,_){var C=h(S);if(!_&&S.code&&(_=u.$codeToKeyCode[S.code]||_),!f.isMac&&v){if(S.getModifierState&&(S.getModifierState("OS")||S.getModifierState("Win"))&&(C|=8),v.altGr)if((3&C)!=3)v.altGr=0;else return;if(_===18||_===17){var L=S.location;if(_===17&&L===1)v[_]==1&&(a=S.timeStamp);else if(_===18&&C===3&&L===2){var O=S.timeStamp-a;O<50&&(v.altGr=!0)}}}if(_ in u.MODIFIER_KEYS&&(_=-1),!(!C&&_===13&&S.location===3&&(T(S,C,-_),S.defaultPrevented))){if(f.isChromeOS&&C&8){if(T(S,C,_),S.defaultPrevented)return;C&=-9}return!C&&!(_ in u.FUNCTION_KEYS)&&!(_ in u.PRINTABLE_KEYS)?!1:T(S,C,_)}}r.addCommandKeyListener=function(T,S,_){var C=null;p(T,"keydown",function(L){v[L.keyCode]=(v[L.keyCode]||0)+1;var O=m(S,L,L.keyCode);return C=L.defaultPrevented,O},_),p(T,"keypress",function(L){C&&(L.ctrlKey||L.altKey||L.shiftKey||L.metaKey)&&(r.stopEvent(L),C=null)},_),p(T,"keyup",function(L){v[L.keyCode]=null},_),v||(y(),p(window,"focus",y))};function y(){v=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!f.isOldIE){var x=1;r.nextTick=function(T,S){S=S||window;var _="zero-timeout-message-"+x++,C=function(L){L.data==_&&(r.stopPropagation(L),s(S,"message",C),T())};p(S,"message",C),S.postMessage(_,"*")}}r.$idleBlocked=!1,r.onIdle=function(T,S){return setTimeout(function _(){r.$idleBlocked?setTimeout(_,100):T()},S)},r.$idleBlockId=null,r.blockIdle=function(T){r.$idleBlockId&&clearTimeout(r.$idleBlockId),r.$idleBlocked=!0,r.$idleBlockId=setTimeout(function(){r.$idleBlocked=!1},T||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(T){setTimeout(T,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(e,r,d){var u;d.exports={lineMode:!1,pasteCancelled:function(){return u&&u>Date.now()-50?!0:u=!1},cancel:function(){u=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,d){var u=e("../lib/event"),f=e("../config").nls,v=e("../lib/useragent"),a=e("../lib/dom"),g=e("../lib/lang"),i=e("../clipboard"),o=v.isChrome<18,c=v.isIE,p=v.isChrome>63,s=400,h=e("../lib/keys"),m=h.KEY_MODS,y=v.isIOS,x=y?/\s/:/\n/,T=v.isMobile,S=(function(){function _(C,L){var O=this;this.host=L,this.text=a.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="",T||(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"}),u.addListener(this.text,"blur",function(M){O.ignoreFocusEvents||(L.onBlur(M),O.$isFocused=!1)},L),u.addListener(this.text,"focus",function(M){if(!O.ignoreFocusEvents){if(O.$isFocused=!0,v.isEdge)try{if(!document.hasFocus())return}catch{}L.onFocus(M),v.isEdge?setTimeout(O.resetSelection.bind(O)):O.resetSelection()}},L),this.$focusScroll=!1,L.on("beforeEndOperation",function(){var M=L.curOp,I=M&&M.command&&M.command.name;if(I!="insertstring"){var B=I&&(M.docChanged||M.selectionChanged);O.inComposition&&B&&(O.lastValue=O.text.value="",O.onCompositionEnd()),O.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,u.addCommandKeyListener(this.text,function(M,I,B){if(!O.inComposition)return L.onCommandKey(M,I,B)},L),u.addListener(this.text,"select",this.onSelect.bind(this),L),u.addListener(this.text,"input",this.onInput.bind(this),L),u.addListener(this.text,"cut",this.onCut.bind(this),L),u.addListener(this.text,"copy",this.onCopy.bind(this),L),u.addListener(this.text,"paste",this.onPaste.bind(this),L),(!("oncut"in this.text)||!("oncopy"in this.text)||!("onpaste"in this.text))&&u.addListener(C,"keydown",function(M){if(!(v.isMac&&!M.metaKey||!M.ctrlKey))switch(M.keyCode){case 67:O.onCopy(M);break;case 86:O.onPaste(M);break;case 88:O.onCut(M);break}},L),this.syncComposition=g.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),u.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),L),u.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),L),u.addListener(this.text,"keyup",this.onKeyup.bind(this),L),u.addListener(this.text,"keydown",this.syncComposition.bind(this),L),u.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),L),this.closeTimeout,u.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),L),u.addListener(this.text,"mousedown",function(M){M.preventDefault(),O.onContextMenuClose()},L),u.addListener(L.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),L),u.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),L),y&&this.addIosSelectionHandler(C,L,this.text)}return _.prototype.addIosSelectionHandler=function(C,L,O){var M=this,I=null,B=!1;O.addEventListener("keydown",function(N){I&&clearTimeout(I),B=!0},!0),O.addEventListener("keyup",function(N){I=setTimeout(function(){B=!1},100)},!0);var F=function(N){if(document.activeElement===O&&!(B||M.inComposition||L.$mouseHandler.isMousePressed)&&!M.copied){var E=O.selectionStart,A=O.selectionEnd,D=null,j=0;if(E==0?D=h.up:E==1?D=h.home:A>M.lastSelectionEnd&&M.lastValue[A]==`
170
+ `?D=h.end:E<M.lastSelectionStart&&M.lastValue[E-1]==" "?(D=h.left,j=m.option):E<M.lastSelectionStart||E==M.lastSelectionStart&&M.lastSelectionEnd!=M.lastSelectionStart&&E==A?D=h.left:A>M.lastSelectionEnd&&M.lastValue.slice(0,A).split(`
171
+ `).length>2?D=h.down:A>M.lastSelectionEnd&&M.lastValue[A-1]==" "?(D=h.right,j=m.option):(A>M.lastSelectionEnd||A==M.lastSelectionEnd&&M.lastSelectionEnd!=M.lastSelectionStart&&E==A)&&(D=h.right),E!==A&&(j|=m.shift),D){var W=L.onCommandKey({},j,D);if(!W&&L.commands){D=h.keyCodeToString(D);var V=L.commands.findKeyCommand(j,D);V&&L.execCommand(V)}M.lastSelectionStart=E,M.lastSelectionEnd=A,M.resetSelection("")}}};document.addEventListener("selectionchange",F),L.on("destroy",function(){document.removeEventListener("selectionchange",F)})},_.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);i.pasteCancelled()||(typeof L=="string"?(L&&this.host.onPaste(L,C),v.isIE&&setTimeout(this.resetSelection),u.preventDefault(C)):(this.text.value="",this.pasted=!0))},_.prototype.doCopy=function(C,L){var O=this,M=this.host.getCopyText();if(!M)return u.preventDefault(C);this.handleClipboardData(C,M)?(y&&(this.resetSelection(M),this.copied=M,setTimeout(function(){O.copied=!1},10)),L?this.host.onCut():this.host.onCopy(),u.preventDefault(C)):(this.copied=!0,this.text.value=M,this.text.select(),setTimeout(function(){O.copied=!1,O.resetSelection(),L?O.host.onCut():O.host.onCopy()}))},_.prototype.handleClipboardData=function(C,L,O){var M=C.clipboardData||window.clipboardData;if(!(!M||o)){var I=c||O?"Text":"text/plain";try{return L?M.setData(I,L)!==!1:M.getData(I)}catch(B){if(!O)return this.handleClipboardData(B,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,O=this.sendText(L,!0);(L.length>s+100||x.test(O)||T&&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 O=this.text.selectionStart,M=this.text.selectionEnd,I=this.lastSelectionStart,B=this.lastValue.length-this.lastSelectionEnd,F=C,N=C.length-O,E=C.length-M,A=0;I>0&&this.lastValue[A]==C[A];)A++,I--;for(F=F.slice(A),A=1;B>0&&this.lastValue.length-A>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-A]==C[C.length-A];)A++,B--;N-=A-1,E-=A-1;var D=F.length-A+1;if(D<0&&(I=-D,D=0),F=F.slice(0,D),!L&&!F&&!N&&!I&&!B&&!E)return"";this.sendingText=!0;var j=!1;return v.isAndroid&&F==". "&&(F=" ",j=!0),F&&!I&&!B&&!N&&!E||this.commandMode?this.host.onTextInput(F):this.host.onTextInput(F,{extendLeft:I,extendRight:B,restoreStart:N,restoreEnd:E}),this.sendingText=!1,this.lastValue=C,this.lastSelectionStart=O,this.lastSelectionEnd=M,this.lastRestoreEnd=E,j?`
172
+ `:F},_.prototype.onSelect=function(C){var L=this;if(!this.inComposition){var O=function(M){return M.selectionStart===0&&M.selectionEnd>=L.lastValue.length&&M.value===L.lastValue&&L.lastValue&&M.selectionEnd!==L.lastSelectionEnd};this.copied?this.copied=!1:O(this.text)?(this.host.selectAll(),this.resetSelection()):T&&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 O=4,M=4+(C.length||(this.host.selection.isEmpty()?0:1));(this.lastSelectionStart!=O||this.lastSelectionEnd!=M)&&this.text.setSelectionRange(O,M),this.lastSelectionStart=O,this.lastSelectionEnd=M}},_.prototype.$resetSelection=function(){var C=this;if(!(this.inComposition||this.sendingText)&&!(!this.$isFocused&&!this.afterContextMenu)){this.inComposition=!0;var L=0,O=0,M="",I=function(V,K){for(var X=K,oe=1;oe<=V-C.rowStart&&oe<2*C.numberOfExtraLines+1;oe++)X+=C.host.session.getLine(V-oe).length+1;return X};if(this.host.session){var B=this.host.selection,F=B.getRange(),N=B.cursor.row;N===this.rowEnd+1?(this.rowStart=this.rowEnd+1,this.rowEnd=this.rowStart+2*this.numberOfExtraLines):N===this.rowStart-1?(this.rowEnd=this.rowStart-1,this.rowStart=this.rowEnd-2*this.numberOfExtraLines):(N<this.rowStart-1||N>this.rowEnd+1)&&(this.rowStart=N>this.numberOfExtraLines?N-this.numberOfExtraLines:0,this.rowEnd=N>this.numberOfExtraLines?N+this.numberOfExtraLines:2*this.numberOfExtraLines);for(var E=[],A=this.rowStart;A<=this.rowEnd;A++)E.push(this.host.session.getLine(A));if(M=E.join(`
175
+ `),L=I(F.start.row,F.start.column),O=I(F.end.row,F.end.column),F.start.row<this.rowStart){var D=this.host.session.getLine(this.rowStart-1);L=F.start.row<this.rowStart-1?0:L,O+=D.length+1,M=D+`
176
+ `+M}else if(F.end.row>this.rowEnd){var j=this.host.session.getLine(this.rowEnd+1);O=F.end.row>this.rowEnd+1?j.length:F.end.column,O+=M.length+1,M=M+`
177
+ `+j}else T&&N>0&&(M=`
178
+ `+M,O+=1,L+=1);M.length>s&&(L<s&&O<s?M=M.slice(0,s):(M=`
179
+ `,L==O?L=O=0:(L=0,O=1)));var W=M+`
180
+
181
+ `;W!=this.lastValue&&(this.text.value=this.lastValue=W,this.lastSelectionStart=this.lastSelectionEnd=W.length)}if(this.afterContextMenu&&(this.lastSelectionStart=this.text.selectionStart,this.lastSelectionEnd=this.text.selectionEnd),this.lastSelectionEnd!=O||this.lastSelectionStart!=L||this.text.selectionEnd!=this.lastSelectionEnd)try{this.text.setSelectionRange(L,O),this.lastSelectionStart=L,this.lastSelectionEnd=O}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+=f("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",f("text-input.aria-roledescription","editor")),this.setAriaLabel())},_.prototype.focus=function(){var C=this;if(this.setAriaOptions({setLabel:this.host.renderer.enableKeyboardAccessibility}),this.tempStyle||p||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 O=this.text.getBoundingClientRect().top!=0}catch{return}var M=[];if(O)for(var I=this.text.parentElement;I&&I.nodeType==1;)M.push(I),I.setAttribute("ace_nocontext","true"),!I.parentElement&&I.getRootNode?I=I.getRootNode().host:I=I.parentElement;this.text.focus({preventScroll:!0}),O&&M.forEach(function(B){B.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 O=this;this.tempStyle||(this.tempStyle=this.text.style.cssText),this.text.style.cssText=(L?"z-index:100000;":"")+(v.isIE?"opacity:0.1;":"")+"text-indent: -"+(this.lastSelectionStart+this.lastSelectionEnd)*this.host.renderer.characterWidth*.5+"px;";var M=this.host.container.getBoundingClientRect(),I=a.computedStyle(this.host.container),B=M.top+(parseInt(I.borderTopWidth)||0),F=M.left+(parseInt(I.borderLeftWidth)||0),N=M.bottom-B-this.text.clientHeight-2,E=function(A){a.translate(O.text,A.clientX-F-2,Math.min(A.clientY-B-2,N))};E(C),C.type=="mousedown"&&(this.host.renderer.$isMousePressed=!0,clearTimeout(this.closeTimeout),v.isWin&&u.capture(this.host.container,E,this.onContextMenuClose.bind(this)))},_.prototype.destroy=function(){this.text.parentElement&&this.text.parentElement.removeChild(this.text)},_})();r.TextInput=S,r.$setUserAgentForTests=function(_,C){T=_,y=C}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(e,r,d){var u=e("../lib/useragent"),f=0,v=550,a=(function(){function o(c){c.$clickSelection=null;var p=c.editor;p.setDefaultHandler("mousedown",this.onMouseDown.bind(c)),p.setDefaultHandler("dblclick",this.onDoubleClick.bind(c)),p.setDefaultHandler("tripleclick",this.onTripleClick.bind(c)),p.setDefaultHandler("quadclick",this.onQuadClick.bind(c)),p.setDefaultHandler("mousewheel",this.onMouseWheel.bind(c));var s=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];s.forEach(function(h){c[h]=this[h]},this),c.selectByLines=this.extendSelectionBy.bind(c,"getLineRange"),c.selectByWords=this.extendSelectionBy.bind(c,"getWordRange")}return o.prototype.onMouseDown=function(c){var p=c.inSelection(),s=c.getDocumentPosition();this.mousedownEvent=c;var h=this.editor,m=c.getButton();if(m!==0){var y=h.getSelectionRange(),x=y.isEmpty();(x||m==1)&&h.selection.moveToPosition(s),m==2&&(h.textInput.onContextMenu(c.domEvent),u.isMozilla||c.preventDefault());return}if(this.mousedownEvent.time=Date.now(),p&&!h.isFocused()&&(h.focus(),this.$focusTimeout&&!this.$clickSelection&&!h.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(c);return}return this.captureMouse(c),this.startSelect(s,c.domEvent._clicks>1),c.preventDefault()},o.prototype.startSelect=function(c,p){c=c||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var s=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?s.selection.selectToPosition(c):p||s.selection.moveToPosition(c),p||this.select(),s.setStyle("ace_selecting"),this.setState("select"))},o.prototype.select=function(){var c,p=this.editor,s=p.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var h=this.$clickSelection.comparePoint(s);if(h==-1)c=this.$clickSelection.end;else if(h==1)c=this.$clickSelection.start;else{var m=i(this.$clickSelection,s,p.session);s=m.cursor,c=m.anchor}p.selection.setSelectionAnchor(c.row,c.column)}p.selection.selectToPosition(s),p.renderer.scrollCursorIntoView()},o.prototype.extendSelectionBy=function(c){var p,s=this.editor,h=s.renderer.screenToTextCoordinates(this.x,this.y),m=s.selection[c](h.row,h.column);if(this.$clickSelection){var y=this.$clickSelection.comparePoint(m.start),x=this.$clickSelection.comparePoint(m.end);if(y==-1&&x<=0)p=this.$clickSelection.end,(m.end.row!=h.row||m.end.column!=h.column)&&(h=m.start);else if(x==1&&y>=0)p=this.$clickSelection.start,(m.start.row!=h.row||m.start.column!=h.column)&&(h=m.end);else if(y==-1&&x==1)h=m.end,p=m.start;else{var T=i(this.$clickSelection,h,s.session);h=T.cursor,p=T.anchor}s.selection.setSelectionAnchor(p.row,p.column)}s.selection.selectToPosition(h),s.renderer.scrollCursorIntoView()},o.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},o.prototype.focusWait=function(){var c=g(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),p=Date.now();(c>f||p-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},o.prototype.onDoubleClick=function(c){var p=c.getDocumentPosition(),s=this.editor,h=s.session,m=h.getBracketRange(p);m?(m.isEmpty()&&(m.start.column--,m.end.column++),this.setState("select")):(m=s.selection.getWordRange(p.row,p.column),this.setState("selectByWords")),this.$clickSelection=m,this.select()},o.prototype.onTripleClick=function(c){var p=c.getDocumentPosition(),s=this.editor;this.setState("selectByLines");var h=s.getSelectionRange();h.isMultiLine()&&h.contains(p.row,p.column)?(this.$clickSelection=s.selection.getLineRange(h.start.row),this.$clickSelection.end=s.selection.getLineRange(h.end.row).end):this.$clickSelection=s.selection.getLineRange(p.row),this.select()},o.prototype.onQuadClick=function(c){var p=this.editor;p.selectAll(),this.$clickSelection=p.getSelectionRange(),this.setState("selectAll")},o.prototype.onMouseWheel=function(c){if(!c.getAccelKey()){c.getShiftKey()&&c.wheelY&&!c.wheelX&&(c.wheelX=c.wheelY,c.wheelY=0);var p=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var s=this.$lastScroll,h=c.domEvent.timeStamp,m=h-s.t,y=m?c.wheelX/m:s.vx,x=m?c.wheelY/m:s.vy;m<v&&(y=(y+s.vx)/2,x=(x+s.vy)/2);var T=Math.abs(y/x),S=!1;if(T>=1&&p.renderer.isScrollableBy(c.wheelX*c.speed,0)&&(S=!0),T<=1&&p.renderer.isScrollableBy(0,c.wheelY*c.speed)&&(S=!0),S)s.allowed=h;else if(h-s.allowed<v){var _=Math.abs(y)<=1.5*Math.abs(s.vx)&&Math.abs(x)<=1.5*Math.abs(s.vy);_?(S=!0,s.allowed=h):s.allowed=0}if(s.t=h,s.vx=y,s.vy=x,S)return p.renderer.scrollBy(c.wheelX*c.speed,c.wheelY*c.speed),c.stop()}},o})();a.prototype.selectEnd=a.prototype.selectByLinesEnd,a.prototype.selectAllEnd=a.prototype.selectByLinesEnd,a.prototype.selectByWordsEnd=a.prototype.selectByLinesEnd,r.DefaultHandlers=a;function g(o,c,p,s){return Math.sqrt(Math.pow(p-o,2)+Math.pow(s-c,2))}function i(o,c,p){if(o.start.row==o.end.row)var s=2*c.column-o.start.column-o.end.column;else if(o.start.row==o.end.row-1&&!o.start.column&&!o.end.column)var s=3*c.column-2*p.getLine(o.start.row).length;else var s=2*c.row-o.start.row-o.end.row;return s<0?{cursor:o.start,anchor:o.end}:{cursor:o.end,anchor:o.start}}}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,r,d){var u=e("../lib/event"),f=e("../lib/useragent"),v=(function(){function a(g,i){this.speed,this.wheelX,this.wheelY,this.domEvent=g,this.editor=i,this.x=this.clientX=g.clientX,this.y=this.clientY=g.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return a.prototype.stopPropagation=function(){u.stopPropagation(this.domEvent),this.propagationStopped=!0},a.prototype.preventDefault=function(){u.preventDefault(this.domEvent),this.defaultPrevented=!0},a.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},a.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},a.prototype.getGutterRow=function(){var g=this.getDocumentPosition().row,i=this.editor.session.documentToScreenRow(g,0),o=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return i-o},a.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var g=this.editor,i=g.getSelectionRange();if(i.isEmpty())this.$inSelection=!1;else{var o=this.getDocumentPosition();this.$inSelection=i.contains(o.row,o.column)}return this.$inSelection},a.prototype.getButton=function(){return u.getButton(this.domEvent)},a.prototype.getShiftKey=function(){return this.domEvent.shiftKey},a.prototype.getAccelKey=function(){return f.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},a})();r.MouseEvent=v}),ace.define("ace/lib/scroll",["require","exports","module"],function(e,r,d){r.preventParentScroll=function(u){u.stopPropagation();var f=u.currentTarget,v=f.scrollHeight>f.clientHeight;v||u.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(e,r,d){var u=this&&this.__extends||(function(){var h=function(m,y){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,T){x.__proto__=T}||function(x,T){for(var S in T)Object.prototype.hasOwnProperty.call(T,S)&&(x[S]=T[S])},h(m,y)};return function(m,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");h(m,y);function x(){this.constructor=m}m.prototype=y===null?Object.create(y):(x.prototype=y.prototype,new x)}})(),f=this&&this.__values||function(h){var m=typeof Symbol=="function"&&Symbol.iterator,y=m&&h[m],x=0;if(y)return y.call(h);if(h&&typeof h.length=="number")return{next:function(){return h&&x>=h.length&&(h=void 0),{value:h&&h[x++],done:!h}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")},v=e("./lib/dom");e("./lib/event");var a=e("./range").Range,g=e("./lib/scroll").preventParentScroll,i="ace_tooltip",o=(function(){function h(m){this.isOpen=!1,this.$element=null,this.$parentNode=m}return h.prototype.$init=function(){return this.$element=v.createElement("div"),this.$element.className=i,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},h.prototype.getElement=function(){return this.$element||this.$init()},h.prototype.setText=function(m){this.getElement().textContent=m},h.prototype.setHtml=function(m){this.getElement().innerHTML=m},h.prototype.setPosition=function(m,y){this.getElement().style.left=m+"px",this.getElement().style.top=y+"px"},h.prototype.setClassName=function(m){v.addCssClass(this.getElement(),m)},h.prototype.setTheme=function(m){this.theme&&(this.theme.isDark&&v.removeCssClass(this.getElement(),"ace_dark"),this.theme.cssClass&&v.removeCssClass(this.getElement(),this.theme.cssClass)),m.isDark&&v.addCssClass(this.getElement(),"ace_dark"),m.cssClass&&v.addCssClass(this.getElement(),m.cssClass),this.theme={isDark:m.isDark,cssClass:m.cssClass}},h.prototype.show=function(m,y,x){m!=null&&this.setText(m),y!=null&&x!=null&&this.setPosition(y,x),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},h.prototype.hide=function(m){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=i,this.isOpen=!1)},h.prototype.getHeight=function(){return this.getElement().offsetHeight},h.prototype.getWidth=function(){return this.getElement().offsetWidth},h.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},h})(),c=(function(){function h(){this.popups=[]}return h.prototype.addPopup=function(m){this.popups.push(m),this.updatePopups()},h.prototype.removePopup=function(m){var y=this.popups.indexOf(m);y!==-1&&(this.popups.splice(y,1),this.updatePopups())},h.prototype.updatePopups=function(){var m,y,x,T;this.popups.sort(function(F,N){return N.priority-F.priority});var S=[];try{for(var _=f(this.popups),C=_.next();!C.done;C=_.next()){var L=C.value,O=!0;try{for(var M=(x=void 0,f(S)),I=M.next();!I.done;I=M.next()){var B=I.value;if(this.doPopupsOverlap(B,L)){O=!1;break}}}catch(F){x={error:F}}finally{try{I&&!I.done&&(T=M.return)&&T.call(M)}finally{if(x)throw x.error}}O?S.push(L):L.hide()}}catch(F){m={error:F}}finally{try{C&&!C.done&&(y=_.return)&&y.call(_)}finally{if(m)throw m.error}}},h.prototype.doPopupsOverlap=function(m,y){var x=m.getElement().getBoundingClientRect(),T=y.getElement().getBoundingClientRect();return x.left<T.right&&x.right>T.left&&x.top<T.bottom&&x.bottom>T.top},h})(),p=new c;r.popupManager=p,r.Tooltip=o;var s=(function(h){u(m,h);function m(y){y===void 0&&(y=document.body);var x=h.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 T=x.getElement();return T.style.whiteSpace="pre-wrap",T.style.pointerEvents="auto",T.addEventListener("mouseout",x.onMouseOut),T.tabIndex=-1,T.addEventListener("blur",(function(){T.contains(document.activeElement)||this.hide()}).bind(x)),T.addEventListener("wheel",g),x}return m.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)},m.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)},m.prototype.onMouseMove=function(y,x){this.lastEvent=y,this.lastT=Date.now();var T=x.$mouseHandler.isMousePressed;if(this.isOpen){var S=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(S.row,S.column)||T||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||T||(this.lastEvent=y,this.timeout=setTimeout(this.waitForHover,this.idleTime))},m.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)},m.prototype.isOutsideOfText=function(y){var x=y.editor,T=y.getDocumentPosition(),S=x.session.getLine(T.row);if(T.column==S.length){var _=x.renderer.pixelToScreenCoordinates(y.clientX,y.clientY),C=x.session.documentToScreenPosition(T.row,T.column);if(C.column!=_.column||C.row!=_.row)return!0}return!1},m.prototype.setDataProvider=function(y){this.$gatherData=y},m.prototype.showForRange=function(y,x,T,S){if(!(S&&S!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var _=y.renderer;this.isOpen||(p.addPopup(this),this.$registerCloseEvents(),this.setTheme(_.theme)),this.isOpen=!0,this.range=a.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 O=this.getElement();O.innerHTML="",O.appendChild(T),O.style.maxHeight="",O.style.display="block",this.$setPosition(y,C,!0,x),v.$fixPositionBug(O)}},m.prototype.$setPosition=function(y,x,T,S){var _=10;T&&this.addMarker(S,y.session);var C=y.renderer,L=this.getElement(),O=L.offsetHeight,M=L.offsetWidth,I=x.pageY,B=x.pageX,F=window.innerHeight-I-C.lineHeight,N=this.$shouldPlaceAbove(O,I,F-_);L.style.maxHeight=(N?I:F)-_+"px",L.style.top=N?"":I+C.lineHeight+"px",L.style.bottom=N?window.innerHeight-I+"px":"",L.style.left=Math.min(B,window.innerWidth-M-_)+"px"},m.prototype.$shouldPlaceAbove=function(y,x,T){return!(x-y<0&&x<T)},m.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")},m.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,p.removePopup(this)))},m.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},m.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},m.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())},m})(o);r.HoverTooltip=s}),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,d){var u=this&&this.__extends||(function(){var s=function(h,m){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,x){y.__proto__=x}||function(y,x){for(var T in x)Object.prototype.hasOwnProperty.call(x,T)&&(y[T]=x[T])},s(h,m)};return function(h,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");s(h,m);function y(){this.constructor=h}h.prototype=m===null?Object.create(m):(y.prototype=m.prototype,new y)}})(),f=this&&this.__values||function(s){var h=typeof Symbol=="function"&&Symbol.iterator,m=h&&s[h],y=0;if(m)return m.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&y>=s.length&&(s=void 0),{value:s&&s[y++],done:!s}}};throw new TypeError(h?"Object is not iterable.":"Symbol.iterator is not defined.")},v=e("../lib/dom"),a=e("./mouse_event").MouseEvent,g=e("../tooltip").HoverTooltip,i=e("../config").nls,o=e("../range").Range;function c(s){var h=s.editor,m=h.renderer.$gutterLayer;s.$tooltip=new p(h),s.$tooltip.addToEditor(h),s.$tooltip.setDataProvider(function(y,x){var T=y.getDocumentPosition().row;s.$tooltip.showTooltip(T)}),s.editor.setDefaultHandler("guttermousedown",function(y){if(!(!h.isFocused()||y.getButton()!=0)){var x=m.getRegion(y);if(x!="foldWidgets"){var T=y.getDocumentPosition().row,S=h.session.selection;if(y.getShiftKey())S.selectTo(T,0);else{if(y.domEvent.detail==2)return h.selectAll(),y.preventDefault();s.$clickSelection=h.selection.getLineRange(T)}return s.setState("selectByLines"),s.captureMouse(y),y.preventDefault()}}})}r.GutterHandler=c;var p=(function(s){u(h,s);function h(m){var y=s.call(this,m.container)||this;y.id="gt"+ ++h.$uid,y.editor=m,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 h.prototype.onDomMouseMove=function(m){var y=new a(m,this.editor);this.onMouseMove(y,this.editor)},h.prototype.onDomMouseOut=function(m){var y=new a(m,this.editor);this.onMouseOut(y)},h.prototype.addToEditor=function(m){var y=m.renderer.$gutter;y.addEventListener("mousemove",this.onDomMouseMove),y.addEventListener("mouseout",this.onDomMouseOut),s.prototype.addToEditor.call(this,m)},h.prototype.removeFromEditor=function(m){var y=m.renderer.$gutter;y.removeEventListener("mousemove",this.onDomMouseMove),y.removeEventListener("mouseout",this.onDomMouseOut),s.prototype.removeFromEditor.call(this,m)},h.prototype.destroy=function(){this.editor&&this.removeFromEditor(this.editor),s.prototype.destroy.call(this)},Object.defineProperty(h,"annotationLabels",{get:function(){return{error:{singular:i("gutter-tooltip.aria-label.error.singular","error"),plural:i("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:i("gutter-tooltip.aria-label.security.singular","security finding"),plural:i("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:i("gutter-tooltip.aria-label.warning.singular","warning"),plural:i("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:i("gutter-tooltip.aria-label.info.singular","information message"),plural:i("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:i("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:i("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),h.prototype.showTooltip=function(m){var y,x=this.editor.renderer.$gutterLayer,T=x.$annotations[m],S;T?S={displayText:Array.from(T.displayText),type:Array.from(T.type)}:S={displayText:[],type:[]};var _=x.session.getFoldLine(m);if(_&&x.$showFoldedAnnotations){for(var C={error:[],security:[],warning:[],info:[],hint:[]},L={error:1,security:2,warning:3,info:4,hint:5},O,M=m+1;M<=_.end.row;M++)if(x.$annotations[M])for(var I=0;I<x.$annotations[M].text.length;I++){var B=x.$annotations[M].type[I];C[B].push(x.$annotations[M].text[I]),(!O||L[B]<L[O])&&(O=B)}if(["error","security","warning"].includes(O)){var F="".concat(h.annotationsToSummaryString(C)," in folded code.");S.displayText.push(F),S.type.push(O+"_fold")}}if(S.displayText.length===0)return this.hide();for(var N={error:[],security:[],warning:[],info:[],hint:[]},E=x.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",M=0;M<S.displayText.length;M++){var A=v.createElement("span"),D=v.createElement("span");(y=D.classList).add.apply(y,["ace_".concat(S.type[M]),E]),D.setAttribute("aria-label","".concat(h.annotationLabels[S.type[M].replace("_fold","")].singular)),D.setAttribute("role","img"),D.appendChild(v.createTextNode(" ")),A.appendChild(D),A.appendChild(v.createTextNode(S.displayText[M])),A.appendChild(v.createElement("br")),N[S.type[M].replace("_fold","")].push(A)}var j=v.createElement("span");N.error.forEach(function(K){return j.appendChild(K)}),N.security.forEach(function(K){return j.appendChild(K)}),N.warning.forEach(function(K){return j.appendChild(K)}),N.info.forEach(function(K){return j.appendChild(K)}),N.hint.forEach(function(K){return j.appendChild(K)}),j.setAttribute("aria-live","polite");var W=this.$findLinkedAnnotationNode(m);W&&W.setAttribute("aria-describedby",this.id);var V=o.fromPoints({row:m,column:0},{row:m,column:0});this.showForRange(this.editor,V,j),this.visibleTooltipRow=m,this.editor._signal("showGutterTooltip",this)},h.prototype.$setPosition=function(m,y,x,T){var S=this.$findCellByRow(T.start.row);if(S){var _=S&&S.element,C=_&&_.querySelector(".ace_gutter_annotation");if(C){var L=C.getBoundingClientRect();if(L){var O={pageX:L.right,pageY:L.top};return s.prototype.$setPosition.call(this,m,O,!1,T)}}}},h.prototype.$shouldPlaceAbove=function(m,y,x){return x<m},h.prototype.$findLinkedAnnotationNode=function(m){var y=this.$findCellByRow(m);if(y){var x=y.element;if(x.childNodes.length>2)return x.childNodes[2]}},h.prototype.$findCellByRow=function(m){return this.editor.renderer.$gutterLayer.$lines.cells.find(function(y){return y.row===m})},h.prototype.hide=function(m){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),s.prototype.hide.call(this,m)}},h.annotationsToSummaryString=function(m){var y,x,T=[],S=["error","security","warning","info","hint"];try{for(var _=f(S),C=_.next();!C.done;C=_.next()){var L=C.value;if(m[L].length){var O=m[L].length===1?h.annotationLabels[L].singular:h.annotationLabels[L].plural;T.push("".concat(m[L].length," ").concat(O))}}}catch(M){y={error:M}}finally{try{C&&!C.done&&(x=_.return)&&x.call(_)}finally{if(y)throw y.error}}return T.join(", ")},h.prototype.isOutsideOfText=function(m){var y=m.editor,x=y.renderer.$gutter.getBoundingClientRect();return!(m.clientX>=x.left&&m.clientX<=x.right&&m.clientY>=x.top&&m.clientY<=x.bottom)},h})(g);p.$uid=0,r.GutterTooltip=p}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,r,d){var u=e("../lib/dom"),f=e("../lib/event"),v=e("../lib/useragent"),a=200,g=200,i=5;function o(p){var s=p.editor,h=u.createElement("div");h.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",h.textContent=" ";var m=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];m.forEach(function(ee){p[ee]=this[ee]},this),s.on("mousedown",this.onMouseDown.bind(p));var y=s.container,x,T,S,_,C,L,O=0,M,I,B,F,N;this.onDragStart=function(ee){if(this.cancelDrag||!y.draggable){var le=this;return setTimeout(function(){le.startSelect(),le.captureMouse(ee)},0),ee.preventDefault()}C=s.getSelectionRange();var ue=ee.dataTransfer;ue.effectAllowed=s.getReadOnly()?"copy":"copyMove",s.container.appendChild(h),ue.setDragImage&&ue.setDragImage(h,0,0),setTimeout(function(){s.container.removeChild(h)}),ue.clearData(),ue.setData("Text",s.session.getTextRange()),I=!0,this.setState("drag")},this.onDragEnd=function(ee){if(y.draggable=!1,I=!1,this.setState(null),!s.getReadOnly()){var le=ee.dataTransfer.dropEffect;!M&&le=="move"&&s.session.remove(s.getSelectionRange()),s.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(ee){if(!(s.getReadOnly()||!X(ee.dataTransfer)))return T=ee.clientX,S=ee.clientY,x||j(),O++,ee.dataTransfer.dropEffect=M=oe(ee),f.preventDefault(ee)},this.onDragOver=function(ee){if(!(s.getReadOnly()||!X(ee.dataTransfer)))return T=ee.clientX,S=ee.clientY,x||(j(),O++),V!==null&&(V=null),ee.dataTransfer.dropEffect=M=oe(ee),f.preventDefault(ee)},this.onDragLeave=function(ee){if(O--,O<=0&&x)return W(),M=null,f.preventDefault(ee)},this.onDrop=function(ee){if(L){var le=ee.dataTransfer;if(I)switch(M){case"move":C.contains(L.row,L.column)?C={start:L,end:L}:C=s.moveText(C,L);break;case"copy":C=s.moveText(C,L,!0);break}else{var ue=le.getData("Text");C={start:L,end:s.session.insert(L,ue)},s.focus(),M=null}return W(),f.preventDefault(ee)}},f.addListener(y,"dragstart",this.onDragStart.bind(p),s),f.addListener(y,"dragend",this.onDragEnd.bind(p),s),f.addListener(y,"dragenter",this.onDragEnter.bind(p),s),f.addListener(y,"dragover",this.onDragOver.bind(p),s),f.addListener(y,"dragleave",this.onDragLeave.bind(p),s),f.addListener(y,"drop",this.onDrop.bind(p),s);function E(ee,le){var ue=Date.now(),ne=!le||ee.row!=le.row,fe=!le||ee.column!=le.column;if(!F||ne||fe)s.moveCursorToPosition(ee),F=ue,N={x:T,y:S};else{var Se=c(N.x,N.y,T,S);Se>i?F=null:ue-F>=g&&(s.renderer.scrollCursorIntoView(),F=null)}}function A(ee,le){var ue=Date.now(),ne=s.renderer.layerConfig.lineHeight,fe=s.renderer.layerConfig.characterWidth,Se=s.renderer.scroller.getBoundingClientRect(),Te={x:{left:T-Se.left,right:Se.right-T},y:{top:S-Se.top,bottom:Se.bottom-S}},Re=Math.min(Te.x.left,Te.x.right),Ve=Math.min(Te.y.top,Te.y.bottom),Ue={row:ee.row,column:ee.column};Re/fe<=2&&(Ue.column+=Te.x.left<Te.x.right?-3:2),Ve/ne<=1&&(Ue.row+=Te.y.top<Te.y.bottom?-1:1);var Xe=ee.row!=Ue.row,ft=ee.column!=Ue.column,We=!le||ee.row!=le.row;Xe||ft&&!We?B?ue-B>=a&&s.renderer.scrollCursorIntoView(Ue):B=ue:B=null}function D(){var ee=L;L=s.renderer.screenToTextCoordinates(T,S),E(L,ee),A(L,ee)}function j(){C=s.selection.toOrientedRange(),x=s.session.addMarker(C,"ace_selection",s.getSelectionStyle()),s.clearSelection(),s.isFocused()&&s.renderer.$cursorLayer.setBlinking(!1),clearInterval(_),D(),_=setInterval(D,20),O=0,f.addListener(document,"mousemove",K)}function W(){clearInterval(_),s.session.removeMarker(x),x=null,s.selection.fromOrientedRange(C),s.isFocused()&&!I&&s.$resetCursorStyle(),C=null,L=null,O=0,B=null,F=null,f.removeListener(document,"mousemove",K)}var V=null;function K(){V==null&&(V=setTimeout(function(){V!=null&&x&&W()},20))}function X(ee){var le=ee.types;return!le||Array.prototype.some.call(le,function(ue){return ue=="text/plain"||ue=="Text"})}function oe(ee){var le=["copy","copymove","all","uninitialized"],ue=["move","copymove","linkmove","all","uninitialized"],ne=v.isMac?ee.altKey:ee.ctrlKey,fe="uninitialized";try{fe=ee.dataTransfer.effectAllowed.toLowerCase()}catch{}var Se="none";return ne&&le.indexOf(fe)>=0?Se="copy":ue.indexOf(fe)>=0?Se="move":le.indexOf(fe)>=0&&(Se="copy"),Se}}(function(){this.dragWait=function(){var p=Date.now()-this.mousedownEvent.time;p>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var p=this.editor.container;p.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(p){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var p=this.editor,s=p.container;s.draggable=!0,p.renderer.$cursorLayer.setBlinking(!1),p.setStyle("ace_dragging");var h=v.isWin?"default":"move";p.renderer.setCursorStyle(h),this.setState("dragReady")},this.onMouseDrag=function(p){var s=this.editor.container;if(v.isIE&&this.state=="dragReady"){var h=c(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);h>3&&s.dragDrop()}if(this.state==="dragWait"){var h=c(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);h>0&&(s.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(p){if(this.$dragEnabled){this.mousedownEvent=p;var s=this.editor,h=p.inSelection(),m=p.getButton(),y=p.domEvent.detail||1;if(y===1&&m===0&&h){if(p.editor.inMultiSelectMode&&(p.getAccelKey()||p.getShiftKey()))return;this.mousedownEvent.time=Date.now();var x=p.domEvent.target||p.domEvent.srcElement;if("unselectable"in x&&(x.unselectable="on"),s.getDragDelay()){if(v.isWebKit){this.cancelDrag=!0;var T=s.container;T.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(p,this.onMouseDrag.bind(this)),p.defaultPrevented=!0}}}}).call(o.prototype);function c(p,s,h,m){return Math.sqrt(Math.pow(h-p,2)+Math.pow(m-s,2))}r.DragdropHandler=o}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(e,r,d){var u=e("./mouse_event").MouseEvent,f=e("../lib/event"),v=e("../lib/dom");r.addTouchListeners=function(a,g){var i="scroll",o,c,p,s,h,m,y=0,x,T=0,S=0,_=0,C,L;function O(){var E=window.navigator&&window.navigator.clipboard,A=!1,D=function(){var V=g.getCopyText(),K=g.session.getUndoManager().hasUndo();L.replaceChild(v.buildDom(A?["span",!V&&j("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],V&&j("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],V&&j("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],E&&j("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],K&&j("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],j("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],j("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),L.firstChild)},j=function(V){return g.commands.canExecute(V,g)},W=function(V){var K=V.target.getAttribute("action");if(K=="more"||!A)return A=!A,D();K=="paste"?E.readText().then(function(X){g.execCommand(K,X)}):K&&((K=="cut"||K=="copy")&&(E?E.writeText(g.getCopyText()):document.execCommand("copy")),g.execCommand(K)),L.firstChild.style.display="none",A=!1,K!="openCommandPalette"&&g.focus()};L=v.buildDom(["div",{class:"ace_mobile-menu",onclick:W},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],g.container),L.addEventListener("touchstart",function(V){i="menu",V.stopPropagation(),V.preventDefault(),g.textInput.focus()}),L.addEventListener("touchend",function(V){V.stopPropagation(),V.preventDefault(),W(V)})}function M(){if(!g.getOption("enableMobileMenu")){L&&I();return}L||O();var E=g.selection.cursor,A=g.renderer.textToScreenCoordinates(E.row,E.column),D=g.renderer.textToScreenCoordinates(0,0).pageX,j=g.renderer.scrollLeft,W=g.container.getBoundingClientRect();L.style.top=A.pageY-W.top-3+"px",A.pageX-W.left<W.width-70?(L.style.left="",L.style.right="10px"):(L.style.right="",L.style.left=D+j-W.left+"px"),L.style.display="",L.firstChild.style.display="none",g.on("input",I)}function I(E){L&&(L.style.display="none"),g.off("input",I)}function B(){h=null,clearTimeout(h);var E=g.selection.getRange(),A=E.contains(x.row,x.column);(E.isEmpty()||!A)&&(g.selection.moveToPosition(x),g.selection.selectWord()),i="wait",M()}function F(){h=null,clearTimeout(h),g.selection.moveToPosition(x);var E=T>=2?g.selection.getLineRange(x.row):g.session.getBracketRange(x);E&&!E.isEmpty()?g.selection.setRange(E):g.selection.selectWord(),i="wait"}f.addListener(a,"contextmenu",function(E){if(C){var A=g.textInput.getElement();A.focus()}},g),f.addListener(a,"touchstart",function(E){var A=E.touches;if(h||A.length>1){clearTimeout(h),h=null,p=-1,i="zoom";return}C=g.$mouseHandler.isMousePressed=!0;var D=g.renderer.layerConfig.lineHeight,j=g.renderer.layerConfig.lineHeight,W=E.timeStamp;s=W;var V=A[0],K=V.clientX,X=V.clientY;Math.abs(o-K)+Math.abs(c-X)>D&&(p=-1),o=E.clientX=K,c=E.clientY=X,S=_=0;var oe=new u(E,g);if(x=oe.getDocumentPosition(),W-p<500&&A.length==1&&!y)T++,E.preventDefault(),E.button=0,F();else{T=0;var ee=g.selection.cursor,le=g.selection.isEmpty()?ee:g.selection.anchor,ue=g.renderer.$cursorLayer.getPixelPosition(ee,!0),ne=g.renderer.$cursorLayer.getPixelPosition(le,!0),fe=g.renderer.scroller.getBoundingClientRect(),Se=g.renderer.layerConfig.offset,Te=g.renderer.scrollLeft,Re=function(Xe,ft){return Xe=Xe/j,ft=ft/D-.75,Xe*Xe+ft*ft};if(E.clientX<fe.left){i="zoom";return}var Ve=Re(E.clientX-fe.left-ue.left+Te,E.clientY-fe.top-ue.top+Se),Ue=Re(E.clientX-fe.left-ne.left+Te,E.clientY-fe.top-ne.top+Se);Ve<3.5&&Ue<3.5&&(i=Ve>Ue?"cursor":"anchor"),Ue<3.5?i="anchor":Ve<3.5?i="cursor":i="scroll",h=setTimeout(B,450)}p=W},g),f.addListener(a,"touchend",function(E){C=g.$mouseHandler.isMousePressed=!1,m&&clearInterval(m),i=="zoom"?(i="",y=0):h?(g.selection.moveToPosition(x),y=0,M()):i=="scroll"?(N(),I()):M(),clearTimeout(h),h=null},g),f.addListener(a,"touchmove",function(E){h&&(clearTimeout(h),h=null);var A=E.touches;if(!(A.length>1||i=="zoom")){var D=A[0],j=o-D.clientX,W=c-D.clientY;if(i=="wait")if(j*j+W*W>4)i="cursor";else return E.preventDefault();o=D.clientX,c=D.clientY,E.clientX=D.clientX,E.clientY=D.clientY;var V=E.timeStamp,K=V-s;if(s=V,i=="scroll"){var X=new u(E,g);X.speed=1,X.wheelX=j,X.wheelY=W,10*Math.abs(j)<Math.abs(W)&&(j=0),10*Math.abs(W)<Math.abs(j)&&(W=0),K!=0&&(S=j/K,_=W/K),g._emit("mousewheel",X),X.propagationStopped||(S=_=0)}else{var oe=new u(E,g),ee=oe.getDocumentPosition();i=="cursor"?g.selection.moveCursorToPosition(ee):i=="anchor"&&g.selection.setSelectionAnchor(ee.row,ee.column),g.renderer.scrollCursorIntoView(ee),E.preventDefault()}}},g);function N(){y+=60,m=setInterval(function(){y--<=0&&(clearInterval(m),m=null),Math.abs(S)<.01&&(S=0),Math.abs(_)<.01&&(_=0),y<20&&(S=.9*S),y<20&&(_=.9*_);var E=g.session.getScrollTop();g.renderer.scrollBy(10*S,10*_),E==g.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,d){var u=e("../lib/event"),f=e("../lib/useragent"),v=e("./default_handlers").DefaultHandlers,a=e("./default_gutter_handler").GutterHandler,g=e("./mouse_event").MouseEvent,i=e("./dragdrop_handler").DragdropHandler,o=e("./touch_handler").addTouchListeners,c=e("../config"),p=(function(){function s(h){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var m=this;this.editor=h,new v(this),new a(this),new i(this);var y=function(S){var _=!document.hasFocus||!document.hasFocus()||!h.isFocused()&&document.activeElement==(h.textInput&&h.textInput.getElement());_&&window.focus(),h.focus(),setTimeout(function(){h.isFocused()||h.focus()})},x=h.renderer.getMouseEventTarget();u.addListener(x,"click",this.onMouseEvent.bind(this,"click"),h),u.addListener(x,"mousemove",this.onMouseMove.bind(this,"mousemove"),h),u.addMultiMouseDownListener([x,h.renderer.scrollBarV&&h.renderer.scrollBarV.inner,h.renderer.scrollBarH&&h.renderer.scrollBarH.inner,h.textInput&&h.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",h),u.addMouseWheelListener(h.container,this.onMouseWheel.bind(this,"mousewheel"),h),o(h.container,h);var T=h.renderer.$gutter;u.addListener(T,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),h),u.addListener(T,"click",this.onMouseEvent.bind(this,"gutterclick"),h),u.addListener(T,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),h),u.addListener(T,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),h),u.addListener(x,"mousedown",y,h),u.addListener(T,"mousedown",y,h),f.isIE&&h.renderer.scrollBarV&&(u.addListener(h.renderer.scrollBarV.element,"mousedown",y,h),u.addListener(h.renderer.scrollBarH.element,"mousedown",y,h)),h.on("mousemove",function(S){if(!(m.state||m.$dragDelay||!m.$dragEnabled)){var _=h.renderer.screenToTextCoordinates(S.x,S.y),C=h.session.selection.getRange(),L=h.renderer;!C.isEmpty()&&C.insideStart(_.row,_.column)?L.setCursorStyle("default"):L.setCursorStyle("")}},h)}return s.prototype.onMouseEvent=function(h,m){this.editor.session&&this.editor._emit(h,new g(m,this.editor))},s.prototype.onMouseMove=function(h,m){var y=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!y||!y.length||this.editor._emit(h,new g(m,this.editor))},s.prototype.onMouseWheel=function(h,m){var y=new g(m,this.editor);y.speed=this.$scrollSpeed*2,y.wheelX=m.wheelX,y.wheelY=m.wheelY,this.editor._emit(h,y)},s.prototype.setState=function(h){this.state=h},s.prototype.captureMouse=function(h,m){this.x=h.x,this.y=h.y,this.isMousePressed=!0;var y=this.editor,x=this.editor.renderer;x.$isMousePressed=!0;var T=this,S=!0,_=function(I){if(I){if(f.isWebKit&&!I.which&&T.releaseMouse)return T.releaseMouse();T.x=I.clientX,T.y=I.clientY,m&&m(I),T.mouseEvent=new g(I,T.editor),T.$mouseMoved=!0}},C=function(I){y.off("beforeEndOperation",M),S=!1,y.session&&L(),T[T.state+"End"]&&T[T.state+"End"](I),T.state="",T.isMousePressed=x.$isMousePressed=!1,x.$keepTextAreaAtCursor&&x.$moveTextAreaToCursor(),T.$onCaptureMouseMove=T.releaseMouse=null,I&&T.onMouseEvent("mouseup",I),y.endOperation()},L=function(){T[T.state]&&T[T.state](),T.$mouseMoved=!1},O=function(){S&&(L(),u.nextFrame(O))};if(f.isOldIE&&h.domEvent.type=="dblclick")return setTimeout(function(){C(h)});var M=function(I){T.releaseMouse&&y.curOp.command.name&&y.curOp.selectionChanged&&(T[T.state+"End"]&&T[T.state+"End"](),T.state="",T.releaseMouse())};y.on("beforeEndOperation",M),y.startOperation({command:{name:"mouse"}}),T.$onCaptureMouseMove=_,T.releaseMouse=u.capture(this.editor.container,_,C),O()},s.prototype.cancelContextMenu=function(){var h=(function(m){m&&m.domEvent&&m.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",h),m&&m.domEvent&&u.stopEvent(m.domEvent))}).bind(this);setTimeout(h,10),this.editor.on("nativecontextmenu",h)},s.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse(),this.$tooltip&&this.$tooltip.destroy()},s})();p.prototype.releaseMouse=null,c.defineOptions(p.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:f.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0}}),r.MouseHandler=p}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(e,r,d){var u=e("../lib/dom"),f=(function(){function v(a){a.on("click",function(g){var i=g.getDocumentPosition(),o=a.session,c=o.getFoldAt(i.row,i.column,1);c&&(g.getAccelKey()?o.removeFold(c):o.expandFold(c),g.stop());var p=g.domEvent&&g.domEvent.target;p&&u.hasCssClass(p,"ace_inline_button")&&u.hasCssClass(p,"ace_toggle_wrap")&&(o.setOption("wrap",!o.getUseWrapMode()),a.renderer.scrollCursorIntoView())}),a.on("gutterclick",function(g){var i=a.renderer.$gutterLayer.getRegion(g);if(i=="foldWidgets"){var o=g.getDocumentPosition().row,c=a.session;c.foldWidgets&&c.foldWidgets[o]&&a.session.onFoldWidgetClick(o,g),a.isFocused()||a.focus(),g.stop()}}),a.on("gutterdblclick",function(g){var i=a.renderer.$gutterLayer.getRegion(g);if(i=="foldWidgets"){var o=g.getDocumentPosition().row,c=a.session,p=c.getParentFoldRangeData(o,!0),s=p.range||p.firstRange;if(s){o=s.start.row;var h=c.getFoldAt(o,c.getLine(o).length,1);h?c.removeFold(h):(c.addFold("...",s),a.renderer.scrollCursorIntoView({row:s.start.row,column:0}))}g.stop()}})}return v})();r.FoldHandler=f}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,r,d){var u=e("../lib/keys"),f=e("../lib/event"),v=(function(){function a(g){this.$editor=g,this.$data={editor:g},this.$handlers=[],this.setDefaultHandler(g.commands)}return a.prototype.setDefaultHandler=function(g){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=g,this.addKeyboardHandler(g,0)},a.prototype.setKeyboardHandler=function(g){var i=this.$handlers;if(i[i.length-1]!=g){for(;i[i.length-1]&&i[i.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(i[i.length-1]);this.addKeyboardHandler(g,1)}},a.prototype.addKeyboardHandler=function(g,i){if(g){typeof g=="function"&&!g.handleKeyboard&&(g.handleKeyboard=g);var o=this.$handlers.indexOf(g);o!=-1&&this.$handlers.splice(o,1),i==null?this.$handlers.push(g):this.$handlers.splice(i,0,g),o==-1&&g.attach&&g.attach(this.$editor)}},a.prototype.removeKeyboardHandler=function(g){var i=this.$handlers.indexOf(g);return i==-1?!1:(this.$handlers.splice(i,1),g.detach&&g.detach(this.$editor),!0)},a.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},a.prototype.getStatusText=function(){var g=this.$data,i=g.editor;return this.$handlers.map(function(o){return o.getStatusText&&o.getStatusText(i,g)||""}).filter(Boolean).join(" ")},a.prototype.$callKeyboardHandlers=function(g,i,o,c){for(var p,s=!1,h=this.$editor.commands,m=this.$handlers.length;m--&&(p=this.$handlers[m].handleKeyboard(this.$data,g,i,o,c),!(!(!p||!p.command)&&(p.command=="null"?s=!0:s=h.exec(p.command,this.$editor,p.args,c),s&&c&&g!=-1&&p.passEvent!=!0&&p.command.passEvent!=!0&&f.stopEvent(c),s))););return!s&&g==-1&&(p={command:"insertstring"},s=h.exec("insertstring",this.$editor,i)),s&&this.$editor._signal&&this.$editor._signal("keyboardActivity",p),s},a.prototype.onCommandKey=function(g,i,o){var c=u.keyCodeToString(o);return this.$callKeyboardHandlers(i,c,o,g)},a.prototype.onTextInput=function(g){return this.$callKeyboardHandlers(-1,g)},a})();r.KeyBinding=v}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(e,r,d){var u=0,f=0,v=!1,a=!1,g=!1,i=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],o=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],c=0,p=1,s=0,h=1,m=2,y=3,x=4,T=5,S=6,_=7,C=8,L=9,O=10,M=11,I=12,B=13,F=14,N=15,E=16,A=17,D=18,j=[D,D,D,D,D,D,D,D,D,S,T,S,C,T,D,D,D,D,D,D,D,D,D,D,D,D,D,D,T,T,T,S,C,x,x,M,M,M,x,x,x,x,x,O,L,O,L,L,m,m,m,m,m,m,m,m,m,m,L,x,x,x,x,x,x,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,x,x,x,x,x,x,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,x,x,x,x,D,D,D,D,D,D,T,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,L,x,M,M,M,M,x,x,x,x,s,x,x,D,x,x,M,M,m,m,x,s,x,x,x,m,s,x,x,x,x,x],W=[C,C,C,C,C,C,C,C,C,C,C,D,D,D,s,h,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,T,B,F,N,E,A,L,M,M,M,M,M,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 V(ee,le,ue,ne){var fe=u?o:i,Se=null,Te=null,Re=null,Ve=0,Ue=null,Xe=null,ft=-1,We=null,Ie=null,Mt=[];if(!ne)for(We=0,ne=[];We<ue;We++)ne[We]=oe(ee[We]);for(f=u,v=!1,a=!1,g=!1,Ie=0;Ie<ue;Ie++){if(Se=Ve,Mt[Ie]=Te=X(ee,ne,Mt,Ie),Ve=fe[Se][Te],Ue=Ve&240,Ve&=15,le[Ie]=Re=fe[Ve][5],Ue>0)if(Ue==16){for(We=ft;We<Ie;We++)le[We]=1;ft=-1}else ft=-1;if(Xe=fe[Ve][6],Xe)ft==-1&&(ft=Ie);else if(ft>-1){for(We=ft;We<Ie;We++)le[We]=Re;ft=-1}ne[Ie]==T&&(le[Ie]=0),f|=Re}if(g){for(We=0;We<ue;We++)if(ne[We]==S){le[We]=u;for(var dt=We-1;dt>=0&&ne[dt]==C;dt--)le[dt]=u}}}function K(ee,le,ue){if(!(f<ee)){if(ee==1&&u==p&&!a){ue.reverse();return}for(var ne=ue.length,fe=0,Se,Te,Re,Ve;fe<ne;){if(le[fe]>=ee){for(Se=fe+1;Se<ne&&le[Se]>=ee;)Se++;for(Te=fe,Re=Se-1;Te<Re;Te++,Re--)Ve=ue[Te],ue[Te]=ue[Re],ue[Re]=Ve;fe=Se}fe++}}}function X(ee,le,ue,ne){var fe=le[ne],Se,Te,Re,Ve;switch(fe){case s:case h:v=!1;case x:case y:return fe;case m:return v?y:m;case _:return v=!0,h;case C:return x;case L:return ne<1||ne+1>=le.length||(Se=ue[ne-1])!=m&&Se!=y||(Te=le[ne+1])!=m&&Te!=y?x:(v&&(Te=y),Te==Se?Te:x);case O:return Se=ne>0?ue[ne-1]:T,Se==m&&ne+1<le.length&&le[ne+1]==m?m:x;case M:if(ne>0&&ue[ne-1]==m)return m;if(v)return x;for(Ve=ne+1,Re=le.length;Ve<Re&&le[Ve]==M;)Ve++;return Ve<Re&&le[Ve]==m?m:x;case I:for(Re=le.length,Ve=ne+1;Ve<Re&&le[Ve]==I;)Ve++;if(Ve<Re){var Ue=ee[ne],Xe=Ue>=1425&&Ue<=2303||Ue==64286;if(Se=le[Ve],Xe&&(Se==h||Se==_))return h}return ne<1||(Se=le[ne-1])==T?x:ue[ne-1];case T:return v=!1,a=!0,u;case S:return g=!0,x;case B:case F:case E:case A:case N:v=!1;case D:return x}}function oe(ee){var le=ee.charCodeAt(0),ue=le>>8;return ue==0?le>191?s:j[le]:ue==5?/[\u0591-\u05f4]/.test(ee)?h:s:ue==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(ee)?I:/[\u0660-\u0669\u066b-\u066c]/.test(ee)?y:le==1642?M:/[\u06f0-\u06f9]/.test(ee)?m:_:ue==32&&le<=8287?W[le&255]:ue==254&&le>=65136?_:x}r.L=s,r.R=h,r.EN=m,r.ON_R=3,r.AN=4,r.R_H=5,r.B=6,r.RLE=7,r.DOT="·",r.doBidiReorder=function(ee,le,ue){if(ee.length<2)return{};var ne=ee.split(""),fe=new Array(ne.length),Se=new Array(ne.length),Te=[];u=ue?p:c,V(ne,Te,ne.length,le);for(var Re=0;Re<fe.length;fe[Re]=Re,Re++);K(2,Te,fe),K(1,Te,fe);for(var Re=0;Re<fe.length-1;Re++)le[Re]===y?Te[Re]=r.AN:Te[Re]===h&&(le[Re]>_&&le[Re]<B||le[Re]===x||le[Re]===D)?Te[Re]=r.ON_R:Re>0&&ne[Re-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(ne[Re])&&(Te[Re-1]=Te[Re]=r.R_H,Re++);ne[ne.length-1]===r.DOT&&(Te[ne.length-1]=r.B),ne[0]==="‫"&&(Te[0]=r.RLE);for(var Re=0;Re<fe.length;Re++)Se[Re]=Te[fe[Re]];return{logicalFromVisual:fe,bidiLevels:Se}},r.hasBidiCharacters=function(ee,le){for(var ue=!1,ne=0;ne<ee.length;ne++)le[ne]=oe(ee.charAt(ne)),!ue&&(le[ne]==h||le[ne]==_||le[ne]==y)&&(ue=!0);return ue},r.getVisualFromLogicalIdx=function(ee,le){for(var ue=0;ue<le.logicalFromVisual.length;ue++)if(le.logicalFromVisual[ue]==ee)return ue;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(e,r,d){var u=e("./lib/bidiutil"),f=e("./lib/lang"),v=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,a=(function(){function g(i){this.session=i,this.bidiMap={},this.currentRow=null,this.bidiUtil=u,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=v.test(i.getValue())}return g.prototype.isBidiRow=function(i,o,c){return this.seenBidi?(i!==this.currentRow&&(this.currentRow=i,this.updateRowLine(o,c),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},g.prototype.onChange=function(i){this.seenBidi?this.currentRow=null:i.action=="insert"&&v.test(i.lines.join(`
182
+ `))&&(this.seenBidi=!0,this.currentRow=null)},g.prototype.getDocumentRow=function(){var i=0,o=this.session.$screenRowCache;if(o.length){var c=this.session.$getRowCacheIndex(o,this.currentRow);c>=0&&(i=this.session.$docRowCache[c])}return i},g.prototype.getSplitIndex=function(){var i=0,o=this.session.$screenRowCache;if(o.length)for(var c,p=this.session.$getRowCacheIndex(o,this.currentRow);this.currentRow-i>0&&(c=this.session.$getRowCacheIndex(o,this.currentRow-i-1),c===p);)p=c,i++;else i=this.currentRow;return i},g.prototype.updateRowLine=function(i,o){i===void 0&&(i=this.getDocumentRow());var c=i===this.session.getLength()-1,p=c?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(i),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var s=this.session.$wrapData[i];s&&(o===void 0&&(o=this.getSplitIndex()),o>0&&s.length?(this.wrapIndent=s.indent,this.wrapOffset=this.wrapIndent*this.charWidths[u.L],this.line=o<s.length?this.line.substring(s[o-1],s[o]):this.line.substring(s[s.length-1])):this.line=this.line.substring(0,s[o]),o==s.length&&(this.line+=this.showInvisibles?p:u.DOT))}else this.line+=this.showInvisibles?p:u.DOT;var h=this.session,m=0,y;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(x,T){return x===" "||h.isFullWidth(x.charCodeAt(0))?(y=x===" "?h.getScreenTabSize(T+m):2,m+=y-1,f.stringRepeat(u.DOT,y)):x}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==u.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},g.prototype.updateBidiMap=function(){var i=[];u.hasBidiCharacters(this.line,i)||this.isRtlDir?this.bidiMap=u.doBidiReorder(this.line,i,this.isRtlDir):this.bidiMap={}},g.prototype.markAsDirty=function(){this.currentRow=null},g.prototype.updateCharacterWidths=function(i){if(this.characterWidth!==i.$characterSize.width){this.fontMetrics=i;var o=this.characterWidth=i.$characterSize.width,c=i.$measureCharWidth("ה");this.charWidths[u.L]=this.charWidths[u.EN]=this.charWidths[u.ON_R]=o,this.charWidths[u.R]=this.charWidths[u.AN]=c,this.charWidths[u.R_H]=c*.45,this.charWidths[u.B]=this.charWidths[u.RLE]=0,this.currentRow=null}},g.prototype.setShowInvisibles=function(i){this.showInvisibles=i,this.currentRow=null},g.prototype.setEolChar=function(i){this.EOL=i},g.prototype.setContentWidth=function(i){this.contentWidth=i},g.prototype.isRtlLine=function(i){return this.$isRtl?!0:i!=null?this.session.getLine(i).charAt(0)==this.RLE:this.isRtlDir},g.prototype.setRtlDirection=function(i,o){for(var c=i.getCursorPosition(),p=i.selection.getSelectionAnchor().row;p<=c.row;p++)!o&&i.session.getLine(p).charAt(0)===i.session.$bidiHandler.RLE?i.session.doc.removeInLine(p,0,1):o&&i.session.getLine(p).charAt(0)!==i.session.$bidiHandler.RLE&&i.session.doc.insert({column:0,row:p},i.session.$bidiHandler.RLE)},g.prototype.getPosLeft=function(i){i-=this.wrapIndent;var o=this.line.charAt(0)===this.RLE?1:0,c=i>o?this.session.getOverwrite()?i:i-1:o,p=u.getVisualFromLogicalIdx(c,this.bidiMap),s=this.bidiMap.bidiLevels,h=0;!this.session.getOverwrite()&&i<=o&&s[p]%2!==0&&p++;for(var m=0;m<p;m++)h+=this.charWidths[s[m]];return!this.session.getOverwrite()&&i>o&&s[p]%2===0&&(h+=this.charWidths[s[p]]),this.wrapIndent&&(h+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(h+=this.rtlLineOffset),h},g.prototype.getSelections=function(i,o){var c=this.bidiMap,p=c.bidiLevels,s,h=[],m=0,y=Math.min(i,o)-this.wrapIndent,x=Math.max(i,o)-this.wrapIndent,T=!1,S=!1,_=0;this.wrapIndent&&(m+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var C,L=0;L<p.length;L++)C=c.logicalFromVisual[L],s=p[L],T=C>=y&&C<x,T&&!S?_=m:!T&&S&&h.push({left:_,width:m-_}),m+=this.charWidths[s],S=T;if(T&&L===p.length&&h.push({left:_,width:m-_}),this.isRtlDir)for(var O=0;O<h.length;O++)h[O].left+=this.rtlLineOffset;return h},g.prototype.offsetToCol=function(c){this.isRtlDir&&(c-=this.rtlLineOffset);var o=0,c=Math.max(c,0),p=0,s=0,h=this.bidiMap.bidiLevels,m=this.charWidths[h[s]];for(this.wrapIndent&&(c-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);c>p+m/2;){if(p+=m,s===h.length-1){m=0;break}m=this.charWidths[h[++s]]}return s>0&&h[s-1]%2!==0&&h[s]%2===0?(c<p&&s--,o=this.bidiMap.logicalFromVisual[s]):s>0&&h[s-1]%2===0&&h[s]%2!==0?o=1+(c>p?this.bidiMap.logicalFromVisual[s]:this.bidiMap.logicalFromVisual[s-1]):this.isRtlDir&&s===h.length-1&&m===0&&h[s-1]%2===0||!this.isRtlDir&&s===0&&h[s]%2!==0?o=1+this.bidiMap.logicalFromVisual[s]:(s>0&&h[s-1]%2!==0&&m!==0&&s--,o=this.bidiMap.logicalFromVisual[s]),o===0&&this.isRtlDir&&o++,o+this.wrapIndent},g})();r.BidiHandler=a}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(e,r,d){var u=e("./lib/oop"),f=e("./lib/lang"),v=e("./lib/event_emitter").EventEmitter,a=e("./range").Range,g=(function(){function i(o){this.session=o,this.doc=o.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var c=this;this.cursor.on("change",function(p){c.$cursorChanged=!0,c.$silent||c._emit("changeCursor"),!c.$isEmpty&&!c.$silent&&c._emit("changeSelection"),!c.$keepDesiredColumnOnChange&&p.old.column!=p.value.column&&(c.$desiredColumn=null)}),this.anchor.on("change",function(){c.$anchorChanged=!0,!c.$isEmpty&&!c.$silent&&c._emit("changeSelection")})}return i.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},i.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},i.prototype.getCursor=function(){return this.lead.getPosition()},i.prototype.setAnchor=function(o,c){this.$isEmpty=!1,this.anchor.setPosition(o,c)},i.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},i.prototype.getSelectionLead=function(){return this.lead.getPosition()},i.prototype.isBackwards=function(){var o=this.anchor,c=this.lead;return o.row>c.row||o.row==c.row&&o.column>c.column},i.prototype.getRange=function(){var o=this.anchor,c=this.lead;return this.$isEmpty?a.fromPoints(c,c):this.isBackwards()?a.fromPoints(c,o):a.fromPoints(o,c)},i.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},i.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},i.prototype.setRange=function(o,c){var p=c?o.end:o.start,s=c?o.start:o.end;this.$setSelection(p.row,p.column,s.row,s.column)},i.prototype.$setSelection=function(o,c,p,s){if(!this.$silent){var h=this.$isEmpty,m=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(o,c),this.cursor.setPosition(p,s),this.$isEmpty=!a.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||h!=this.$isEmpty||m)&&this._emit("changeSelection")}},i.prototype.$moveSelection=function(o){var c=this.lead;this.$isEmpty&&this.setSelectionAnchor(c.row,c.column),o.call(this)},i.prototype.selectTo=function(o,c){this.$moveSelection(function(){this.moveCursorTo(o,c)})},i.prototype.selectToPosition=function(o){this.$moveSelection(function(){this.moveCursorToPosition(o)})},i.prototype.moveTo=function(o,c){this.clearSelection(),this.moveCursorTo(o,c)},i.prototype.moveToPosition=function(o){this.clearSelection(),this.moveCursorToPosition(o)},i.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},i.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},i.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},i.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},i.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},i.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},i.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},i.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},i.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},i.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},i.prototype.getWordRange=function(o,c){if(typeof c>"u"){var p=o||this.lead;o=p.row,c=p.column}return this.session.getWordRange(o,c)},i.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},i.prototype.selectAWord=function(){var o=this.getCursor(),c=this.session.getAWordRange(o.row,o.column);this.setSelectionRange(c)},i.prototype.getLineRange=function(o,c){var p=typeof o=="number"?o:this.lead.row,s,h=this.session.getFoldLine(p);return h?(p=h.start.row,s=h.end.row):s=p,c===!0?new a(p,0,s,this.session.getLine(s).length):new a(p,0,s+1,0)},i.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},i.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},i.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},i.prototype.wouldMoveIntoSoftTab=function(o,c,p){var s=o.column,h=o.column+c;return p<0&&(s=o.column-c,h=o.column),this.session.isTabStop(o)&&this.doc.getLine(o.row).slice(s,h).split(" ").length-1==c},i.prototype.moveCursorLeft=function(){var o=this.lead.getPosition(),c;if(c=this.session.getFoldAt(o.row,o.column,-1))this.moveCursorTo(c.start.row,c.start.column);else if(o.column===0)o.row>0&&this.moveCursorTo(o.row-1,this.doc.getLine(o.row-1).length);else{var p=this.session.getTabSize();this.wouldMoveIntoSoftTab(o,p,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-p):this.moveCursorBy(0,-1)}},i.prototype.moveCursorRight=function(){var o=this.lead.getPosition(),c;if(c=this.session.getFoldAt(o.row,o.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 p=this.session.getTabSize(),o=this.lead;this.wouldMoveIntoSoftTab(o,p,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,p):this.moveCursorBy(0,1)}},i.prototype.moveCursorLineStart=function(){var o=this.lead.row,c=this.lead.column,p=this.session.documentToScreenRow(o,c),s=this.session.screenToDocumentPosition(p,0),h=this.session.getDisplayLine(o,null,s.row,s.column),m=h.match(/^\s*/);m[0].length!=c&&!this.session.$useEmacsStyleLineStart&&(s.column+=m[0].length),this.moveCursorToPosition(s)},i.prototype.moveCursorLineEnd=function(){var o=this.lead,c=this.session.getDocumentLastRowColumnPosition(o.row,o.column);if(this.lead.column==c.column){var p=this.session.getLine(c.row);if(c.column==p.length){var s=p.search(/\s+$/);s>0&&(c.column=s)}}this.moveCursorTo(c.row,c.column)},i.prototype.moveCursorFileEnd=function(){var o=this.doc.getLength()-1,c=this.doc.getLine(o).length;this.moveCursorTo(o,c)},i.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},i.prototype.moveCursorLongWordRight=function(){var o=this.lead.row,c=this.lead.column,p=this.doc.getLine(o),s=p.substring(c);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var h=this.session.getFoldAt(o,c,1);if(h){this.moveCursorTo(h.end.row,h.end.column);return}if(this.session.nonTokenRe.exec(s)&&(c+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,s=p.substring(c)),c>=p.length){this.moveCursorTo(o,p.length),this.moveCursorRight(),o<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(s)&&(c+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(o,c)},i.prototype.moveCursorLongWordLeft=function(){var o=this.lead.row,c=this.lead.column,p;if(p=this.session.getFoldAt(o,c,-1)){this.moveCursorTo(p.start.row,p.start.column);return}var s=this.session.getFoldStringAt(o,c,-1);s==null&&(s=this.doc.getLine(o).substring(0,c));var h=f.stringReverse(s);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(h)&&(c-=this.session.nonTokenRe.lastIndex,h=h.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),c<=0){this.moveCursorTo(o,0),this.moveCursorLeft(),o>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(h)&&(c-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(o,c)},i.prototype.$shortWordEndIndex=function(o){var c=0,p,s=/\s/,h=this.session.tokenRe;if(h.lastIndex=0,this.session.tokenRe.exec(o))c=this.session.tokenRe.lastIndex;else{for(;(p=o[c])&&s.test(p);)c++;if(c<1){for(h.lastIndex=0;(p=o[c])&&!h.test(p);)if(h.lastIndex=0,c++,s.test(p))if(c>2){c--;break}else{for(;(p=o[c])&&s.test(p);)c++;if(c>2)break}}}return h.lastIndex=0,c},i.prototype.moveCursorShortWordRight=function(){var o=this.lead.row,c=this.lead.column,p=this.doc.getLine(o),s=p.substring(c),h=this.session.getFoldAt(o,c,1);if(h)return this.moveCursorTo(h.end.row,h.end.column);if(c==p.length){var m=this.doc.getLength();do o++,s=this.doc.getLine(o);while(o<m&&/^\s*$/.test(s));/^\s+/.test(s)||(s=""),c=0}var y=this.$shortWordEndIndex(s);this.moveCursorTo(o,c+y)},i.prototype.moveCursorShortWordLeft=function(){var o=this.lead.row,c=this.lead.column,p;if(p=this.session.getFoldAt(o,c,-1))return this.moveCursorTo(p.start.row,p.start.column);var s=this.session.getLine(o).substring(0,c);if(c===0){do o--,s=this.doc.getLine(o);while(o>0&&/^\s*$/.test(s));c=s.length,/\s+$/.test(s)||(s="")}var h=f.stringReverse(s),m=this.$shortWordEndIndex(h);return this.moveCursorTo(o,c-m)},i.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},i.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},i.prototype.moveCursorBy=function(o,c){var p=this.session.documentToScreenPosition(this.lead.row,this.lead.column),s;if(c===0&&(o!==0&&(this.session.$bidiHandler.isBidiRow(p.row,this.lead.row)?(s=this.session.$bidiHandler.getPosLeft(p.column),p.column=Math.round(s/this.session.$bidiHandler.charWidths[0])):s=p.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?p.column=this.$desiredColumn:this.$desiredColumn=p.column),o!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var h=this.session.lineWidgets[this.lead.row];o<0?o-=h.rowsAbove||0:o>0&&(o+=h.rowCount-(h.rowsAbove||0))}var m=this.session.screenToDocumentPosition(p.row+o,p.column,s);o!==0&&c===0&&m.row===this.lead.row&&(m.column,this.lead.column),this.moveCursorTo(m.row,m.column+c,c===0)},i.prototype.moveCursorToPosition=function(o){this.moveCursorTo(o.row,o.column)},i.prototype.moveCursorTo=function(o,c,p){var s=this.session.getFoldAt(o,c,1);s&&(o=s.start.row,c=s.start.column),this.$keepDesiredColumnOnChange=!0;var h=this.session.getLine(o);/[\uDC00-\uDFFF]/.test(h.charAt(c))&&h.charAt(c-1)&&(this.lead.row==o&&this.lead.column==c+1?c=c-1:c=c+1),this.lead.setPosition(o,c),this.$keepDesiredColumnOnChange=!1,p||(this.$desiredColumn=null)},i.prototype.moveCursorToScreen=function(o,c,p){var s=this.session.screenToDocumentPosition(o,c);this.moveCursorTo(s.row,s.column,p)},i.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},i.prototype.fromOrientedRange=function(o){this.setSelectionRange(o,o.cursor==o.start),this.$desiredColumn=o.desiredColumn||this.$desiredColumn},i.prototype.toOrientedRange=function(o){var c=this.getRange();return o?(o.start.column=c.start.column,o.start.row=c.start.row,o.end.column=c.end.column,o.end.row=c.end.row):o=c,o.cursor=this.isBackwards()?o.start:o.end,o.desiredColumn=this.$desiredColumn,o},i.prototype.getRangeOfMovements=function(o){var c=this.getCursor();try{o(this);var p=this.getCursor();return a.fromPoints(c,p)}catch{return a.fromPoints(c,c)}finally{this.moveCursorToPosition(c)}},i.prototype.toJSON=function(){if(this.rangeCount)var o=this.ranges.map(function(c){var p=c.clone();return p.isBackwards=c.cursor==c.start,p});else{var o=this.getRange();o.isBackwards=this.isBackwards()}return o},i.prototype.fromJSON=function(o){if(o.start==null)if(this.rangeList&&o.length>1){this.toSingleRange(o[0]);for(var c=o.length;c--;){var p=a.fromPoints(o[c].start,o[c].end);o[c].isBackwards&&(p.cursor=p.start),this.addRange(p,!0)}return}else o=o[0];this.rangeList&&this.toSingleRange(o),this.setSelectionRange(o,o.isBackwards)},i.prototype.isEqual=function(o){if((o.length||this.rangeCount)&&o.length!=this.rangeCount)return!1;if(!o.length||!this.ranges)return this.getRange().isEqual(o);for(var c=this.ranges.length;c--;)if(!this.ranges[c].isEqual(o[c]))return!1;return!0},i})();g.prototype.setSelectionAnchor=g.prototype.setAnchor,g.prototype.getSelectionAnchor=g.prototype.getAnchor,g.prototype.setSelectionRange=g.prototype.setRange,u.implement(g.prototype,v),r.Selection=g}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(e,r,d){var u=e("./lib/report_error").reportError,f=2e3,v=(function(){function a(g){this.splitRegex,this.states=g,this.regExps={},this.matchMappings={};for(var i in this.states){for(var o=this.states[i],c=[],p=0,s=this.matchMappings[i]={defaultToken:"text"},h="g",m=[],y=0;y<o.length;y++){var x=o[y];if(x.defaultToken&&(s.defaultToken=x.defaultToken),x.caseInsensitive&&h.indexOf("i")===-1&&(h+="i"),x.unicode&&h.indexOf("u")===-1&&(h+="u"),x.regex!=null){x.regex instanceof RegExp&&(x.regex=x.regex.toString().slice(1,-1));var T=x.regex,S=new RegExp("(?:("+T+")|(.))").exec("a").length-2;Array.isArray(x.token)?x.token.length==1||S==1?x.token=x.token[0]:S-1!=x.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:x,groupCount:S-1}),x.token=x.token[0]):(x.tokenArray=x.token,x.token=null,x.onMatch=this.$arrayTokens):typeof x.token=="function"&&!x.onMatch&&(S>1?x.onMatch=this.$applyToken:x.onMatch=x.token),S>1&&(/\\\d/.test(x.regex)?T=x.regex.replace(/\\([0-9]+)/g,function(_,C){return"\\"+(parseInt(C,10)+p+1)}):(S=1,T=this.removeCapturingGroups(x.regex)),!x.splitRegex&&typeof x.token!="string"&&m.push(x)),s[p]=y,p+=S,c.push(T),x.onMatch||(x.onMatch=null)}}c.length||(s[0]=0,c.push("$")),m.forEach(function(_){_.splitRegex=this.createSplitterRegexp(_.regex,h)},this),this.regExps[i]=new RegExp("("+c.join(")|(")+")|($)",h)}}return a.prototype.$setMaxTokenCount=function(g){f=g|0},a.prototype.$applyToken=function(g){var i=this.splitRegex.exec(g).slice(1),o=this.token.apply(this,i);if(typeof o=="string")return[{type:o,value:g}];for(var c=[],p=0,s=o.length;p<s;p++)i[p]&&(c[c.length]={type:o[p],value:i[p]});return c},a.prototype.$arrayTokens=function(g){if(!g)return[];var i=this.splitRegex.exec(g);if(!i)return"text";for(var o=[],c=this.tokenArray,p=0,s=c.length;p<s;p++)i[p+1]&&(o[o.length]={type:c[p],value:i[p+1]});return o},a.prototype.removeCapturingGroups=function(g){var i=g.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(o,c){return c?"(?:":o});return i},a.prototype.createSplitterRegexp=function(g,i){if(g.indexOf("(?=")!=-1){var o=0,c=!1,p={};g.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(s,h,m,y,x,T){return c?c=x!="]":x?c=!0:y?(o==p.stack&&(p.end=T+1,p.stack=-1),o--):m&&(o++,m.length!=1&&(p.stack=o,p.start=T)),s}),p.end!=null&&/^\)*$/.test(g.substr(p.end))&&(g=g.substring(0,p.start)+g.substr(p.end))}return g.charAt(0)!="^"&&(g="^"+g),g.charAt(g.length-1)!="$"&&(g+="$"),new RegExp(g,(i||"").replace("g",""))},a.prototype.getLineTokens=function(g,i){if(i&&typeof i!="string"){var o=i.slice(0);i=o[0],i==="#tmp"&&(o.shift(),i=o.shift())}else var o=[];var c=i||"start",p=this.states[c];p||(c="start",p=this.states[c]);var s=this.matchMappings[c],h=this.regExps[c];h.lastIndex=0;for(var m,y=[],x=0,T=0,S={type:null,value:""};m=h.exec(g);){var _=s.defaultToken,C=null,L=m[0],O=h.lastIndex;if(O-L.length>x){var M=g.substring(x,O-L.length);S.type==_?S.value+=M:(S.type&&y.push(S),S={type:_,value:M})}for(var I=0;I<m.length-2;I++)if(m[I+1]!==void 0){C=p[s[I]],C.onMatch?_=C.onMatch(L,c,o,g):_=C.token,C.next&&(typeof C.next=="string"?c=C.next:c=C.next(c,o),p=this.states[c],p||(this.reportError("state doesn't exist",c),c="start",p=this.states[c]),s=this.matchMappings[c],x=O,h=this.regExps[c],h.lastIndex=O),C.consumeLineEnd&&(x=O);break}if(L){if(typeof _=="string")(!C||C.merge!==!1)&&S.type===_?S.value+=L:(S.type&&y.push(S),S={type:_,value:L});else if(_){S.type&&y.push(S),S={type:null,value:""};for(var I=0;I<_.length;I++)y.push(_[I])}}if(x==g.length)break;if(x=O,T++>f){for(T>2*g.length&&this.reportError("infinite loop with in ace tokenizer",{startState:i,line:g});x<g.length;)S.type&&y.push(S),S={value:g.substring(x,x+=500),type:"overflow"};c="start",o=[];break}}return S.type&&y.push(S),o.length>1&&o[0]!==c&&o.unshift("#tmp",c),{tokens:y,state:o.length?o:c}},a})();v.prototype.reportError=u,r.Tokenizer=v}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(e,r,d){var u=e("../lib/deep_copy").deepCopy,f;f=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(g,i){if(!i){for(var o in g)this.$rules[o]=g[o];return}for(var o in g){for(var c=g[o],p=0;p<c.length;p++){var s=c[p];(s.next||s.onMatch)&&(typeof s.next=="string"&&s.next.indexOf(i)!==0&&(s.next=i+s.next),s.nextState&&s.nextState.indexOf(i)!==0&&(s.nextState=i+s.nextState))}this.$rules[i+o]=c}},this.getRules=function(){return this.$rules},this.embedRules=function(g,i,o,c,p){var s=typeof g=="function"?new g().getRules():g;if(c)for(var h=0;h<c.length;h++)c[h]=i+c[h];else{c=[];for(var m in s)c.push(i+m)}if(this.addRules(s,i),o)for(var y=Array.prototype[p?"push":"unshift"],h=0;h<c.length;h++)y.apply(this.$rules[c[h]],u(o));this.$embeds||(this.$embeds=[]),this.$embeds.push(i)},this.getEmbeds=function(){return this.$embeds};var v=function(g,i){return(g!="start"||i.length)&&i.unshift(this.nextState,g),this.nextState},a=function(g,i){return i.shift(),i.shift()||"start"};this.normalizeRules=function(){var g=0,i=this.$rules;function o(c){var p=i[c];p.processed=!0;for(var s=0;s<p.length;s++){var h=p[s],m=null;Array.isArray(h)&&(m=h,h={}),!h.regex&&h.start&&(h.regex=h.start,h.next||(h.next=[]),h.next.push({defaultToken:h.token},{token:h.token+".end",regex:h.end||h.start,next:"pop"}),h.token=h.token+".start",h.push=!0);var y=h.next||h.push;if(y&&Array.isArray(y)){var x=h.stateName;x||(x=h.token,typeof x!="string"&&(x=x[0]||""),i[x]&&(x+=g++)),i[x]=y,h.next=x,o(x)}else y=="pop"&&(h.next=a);if(h.push&&(h.nextState=h.next||h.push,h.next=v,delete h.push),h.rules)for(var T in h.rules)i[T]?i[T].push&&i[T].push.apply(i[T],h.rules[T]):i[T]=h.rules[T];var S=typeof h=="string"?h:h.include;if(S&&(S==="$self"&&(S="start"),Array.isArray(S)?m=S.map(function(C){return i[C]}):m=i[S]),m){var _=[s,1].concat(m);h.noEscape&&(_=_.filter(function(C){return!C.next})),p.splice.apply(p,_),s--}h.keywordMap&&(h.token=this.createKeywordMapper(h.keywordMap,h.defaultToken||"text",h.caseInsensitive),delete h.defaultToken)}}Object.keys(i).forEach(o,this)},this.createKeywordMapper=function(g,i,o,c){var p=Object.create(null);return this.$keywordList=[],Object.keys(g).forEach(function(s){for(var h=g[s],m=h.split(c||"|"),y=m.length;y--;){var x=m[y];this.$keywordList.push(x),o&&(x=x.toLowerCase()),p[x]=s}},this),g=null,o?function(s){return p[s.toLowerCase()]||i}:function(s){return p[s]||i}},this.getKeywords=function(){return this.$keywords}}).call(f.prototype),r.TextHighlightRules=f}),ace.define("ace/mode/behaviour",["require","exports","module"],function(e,r,d){var u;u=function(){this.$behaviours={}},(function(){this.add=function(f,v,a){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[f]:this.$behaviours[f]={}}this.$behaviours[f][v]=a},this.addBehaviours=function(f){for(var v in f)for(var a in f[v])this.add(v,a,f[v][a])},this.remove=function(f){this.$behaviours&&this.$behaviours[f]&&delete this.$behaviours[f]},this.inherit=function(f,v){if(typeof f=="function")var a=new f().getBehaviours(v);else var a=f.getBehaviours(v);this.addBehaviours(a)},this.getBehaviours=function(f){if(f){for(var v={},a=0;a<f.length;a++)this.$behaviours[f[a]]&&(v[f[a]]=this.$behaviours[f[a]]);return v}else return this.$behaviours}}).call(u.prototype),r.Behaviour=u}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(e,r,d){var u=e("./range").Range,f=(function(){function v(a,g,i){this.$session=a,this.$row=g,this.$rowTokens=a.getTokens(g);var o=a.getTokenAt(g,i);this.$tokenIndex=o?o.index:-1}return v.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]},v.prototype.stepForward=function(){this.$tokenIndex+=1;for(var a;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,a||(a=this.$session.getLength()),this.$row>=a)return this.$row=a-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},v.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},v.prototype.getCurrentTokenRow=function(){return this.$row},v.prototype.getCurrentTokenColumn=function(){var a=this.$rowTokens,g=this.$tokenIndex,i=a[g].start;if(i!==void 0)return i;for(i=0;g>0;)g-=1,i+=a[g].value.length;return i},v.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},v.prototype.getCurrentTokenRange=function(){var a=this.$rowTokens[this.$tokenIndex],g=this.getCurrentTokenColumn();return new u(this.$row,g,this.$row,g+a.value.length)},v})();r.TokenIterator=f}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,r,d){var u=e("../../lib/oop"),f=e("../behaviour").Behaviour,v=e("../../token_iterator").TokenIterator,a=e("../../lib/lang"),g=["text","paren.rparen","rparen","paren","punctuation.operator"],i=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],o,c={},p={'"':'"',"'":"'"},s=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 o=c[x];o=c[x]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},h=function(y,x,T,S){var _=y.end.row-y.start.row;return{text:T+x+S,selection:[0,y.start.column+1,_,y.end.column+(_?0:1)]}},m;m=function(y){y=y||{},this.add("braces","insertion",function(x,T,S,_,C){var L=S.getCursorPosition(),O=_.doc.getLine(L.row);if(C=="{"){s(S);var M=S.getSelectionRange(),I=_.doc.getTextRange(M),B=_.getTokenAt(L.row,L.column);if(I!==""&&I!=="{"&&S.getWrapBehavioursEnabled())return h(M,I,"{","}");if(B&&/(?:string)\.quasi|\.xml/.test(B.type)){var F=[/tag\-(?:open|name)/,/attribute\-name/];return F.some(function(V){return V.test(B.type)})||/(string)\.quasi/.test(B.type)&&B.value[L.column-B.start-1]!=="$"?void 0:(m.recordAutoInsert(S,_,"}"),{text:"{}",selection:[1,1]})}else if(m.isSaneInsertion(S,_))return/[\]\}\)]/.test(O[L.column])||S.inMultiSelectMode||y.braces?(m.recordAutoInsert(S,_,"}"),{text:"{}",selection:[1,1]}):(m.recordMaybeInsert(S,_,"{"),{text:"{",selection:[1,1]})}else if(C=="}"){s(S);var N=O.substring(L.column,L.column+1);if(N=="}"){var E=_.$findOpeningBracket("}",{column:L.column+1,row:L.row});if(E!==null&&m.isAutoInsertedClosing(L,O,C))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(C==`
183
+ `||C==`\r
184
+ `){s(S);var A="";m.isMaybeInsertedClosing(L,O)&&(A=a.stringRepeat("}",o.maybeInsertedBrackets),m.clearMaybeInsertedClosing());var N=O.substring(L.column,L.column+1);if(N==="}"){var D=_.findMatchingBracket({row:L.row,column:L.column+1},"}");if(!D)return null;var j=this.$getIndent(_.getLine(D.row))}else if(A)var j=this.$getIndent(O);else{m.clearMaybeInsertedClosing();return}var W=j+_.getTabString();return{text:`
185
+ `+W+`
186
+ `+j+A,selection:[1,W.length,1,W.length]}}else m.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(x,T,S,_,C){var L=_.doc.getTextRange(C);if(!C.isMultiLine()&&L=="{"){s(S);var O=_.doc.getLine(C.start.row),M=O.substring(C.end.column,C.end.column+1);if(M=="}")return C.end.column++,C;o.maybeInsertedBrackets--}}),this.add("parens","insertion",function(x,T,S,_,C){if(C=="("){s(S);var L=S.getSelectionRange(),O=_.doc.getTextRange(L);if(O!==""&&S.getWrapBehavioursEnabled())return h(L,O,"(",")");if(m.isSaneInsertion(S,_))return m.recordAutoInsert(S,_,")"),{text:"()",selection:[1,1]}}else if(C==")"){s(S);var M=S.getCursorPosition(),I=_.doc.getLine(M.row),B=I.substring(M.column,M.column+1);if(B==")"){var F=_.$findOpeningBracket(")",{column:M.column+1,row:M.row});if(F!==null&&m.isAutoInsertedClosing(M,I,C))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(x,T,S,_,C){var L=_.doc.getTextRange(C);if(!C.isMultiLine()&&L=="("){s(S);var O=_.doc.getLine(C.start.row),M=O.substring(C.start.column+1,C.start.column+2);if(M==")")return C.end.column++,C}}),this.add("brackets","insertion",function(x,T,S,_,C){if(C=="["){s(S);var L=S.getSelectionRange(),O=_.doc.getTextRange(L);if(O!==""&&S.getWrapBehavioursEnabled())return h(L,O,"[","]");if(m.isSaneInsertion(S,_))return m.recordAutoInsert(S,_,"]"),{text:"[]",selection:[1,1]}}else if(C=="]"){s(S);var M=S.getCursorPosition(),I=_.doc.getLine(M.row),B=I.substring(M.column,M.column+1);if(B=="]"){var F=_.$findOpeningBracket("]",{column:M.column+1,row:M.row});if(F!==null&&m.isAutoInsertedClosing(M,I,C))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(x,T,S,_,C){var L=_.doc.getTextRange(C);if(!C.isMultiLine()&&L=="["){s(S);var O=_.doc.getLine(C.start.row),M=O.substring(C.start.column+1,C.start.column+2);if(M=="]")return C.end.column++,C}}),this.add("string_dquotes","insertion",function(x,T,S,_,C){var L=_.$mode.$quotes||p;if(C.length==1&&L[C]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(C)!=-1)return;s(S);var O=C,M=S.getSelectionRange(),I=_.doc.getTextRange(M);if(I!==""&&(I.length!=1||!L[I])&&S.getWrapBehavioursEnabled())return h(M,I,O,O);if(!I){var B=S.getCursorPosition(),F=_.doc.getLine(B.row),N=F.substring(B.column-1,B.column),E=F.substring(B.column,B.column+1),A=_.getTokenAt(B.row,B.column),D=_.getTokenAt(B.row,B.column+1);if(N=="\\"&&A&&/escape/.test(A.type))return null;var j=A&&/string|escape/.test(A.type),W=!D||/string|escape/.test(D.type),V;if(E==O)V=j!==W,V&&/string\.end/.test(D.type)&&(V=!1);else{if(j&&!W||j&&W)return null;var K=_.$mode.tokenRe;K.lastIndex=0;var X=K.test(N);K.lastIndex=0;var oe=K.test(E),ee=_.$mode.$pairQuotesAfter,le=ee&&ee[O]&&ee[O].test(N);if(!le&&X||oe||E&&!/[\s;,.})\]\\]/.test(E))return null;var ue=F[B.column-2];if(N==O&&(ue==O||K.test(ue)))return null;V=!0}return{text:V?O+O:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(x,T,S,_,C){var L=_.$mode.$quotes||p,O=_.doc.getTextRange(C);if(!C.isMultiLine()&&L.hasOwnProperty(O)){s(S);var M=_.doc.getLine(C.start.row),I=M.substring(C.start.column+1,C.start.column+2);if(I==O)return C.end.column++,C}}),y.closeDocComment!==!1&&this.add("doc comment end","insertion",function(x,T,S,_,C){if(x==="doc-start"&&(C===`
187
+ `||C===`\r
188
+ `)&&S.selection.isEmpty()){var L=S.getCursorPosition();if(L.column===0)return;for(var O=_.doc.getLine(L.row),M=_.doc.getLine(L.row+1),I=_.getTokens(L.row),B=0,F=0;F<I.length;F++){B+=I[F].value.length;var N=I[F];if(B>=L.column){if(B===L.column){if(!/\.doc/.test(N.type))return;if(/\*\//.test(N.value)){var E=I[F+1];if(!E||!/\.doc/.test(E.type))return}}var A=L.column-(B-N.value.length),D=N.value.indexOf("*/"),j=N.value.indexOf("/**",D>-1?D+2:0);if(j!==-1&&A>j&&A<j+3||D!==-1&&j!==-1&&A>=D&&A<=j||!/\.doc/.test(N.type))return;break}}var W=this.$getIndent(O);if(/\s*\*/.test(M))return/^\s*\*/.test(O)?{text:C+W+"* ",selection:[1,2+W.length,1,2+W.length]}:{text:C+W+" * ",selection:[1,3+W.length,1,3+W.length]};if(/\/\*\*/.test(O.substring(0,L.column)))return{text:C+W+" * "+C+" "+W+"*/",selection:[1,4+W.length,1,4+W.length]}}})},m.isSaneInsertion=function(y,x){var T=y.getCursorPosition(),S=new v(x,T.row,T.column);if(!this.$matchTokenType(S.getCurrentToken()||"text",g)){if(/[)}\]]/.test(y.session.getLine(T.row)[T.column]))return!0;var _=new v(x,T.row,T.column+1);if(!this.$matchTokenType(_.getCurrentToken()||"text",g))return!1}return S.stepForward(),S.getCurrentTokenRow()!==T.row||this.$matchTokenType(S.getCurrentToken()||"text",i)},m.$matchTokenType=function(y,x){return x.indexOf(y.type||y)>-1},m.recordAutoInsert=function(y,x,T){var S=y.getCursorPosition(),_=x.doc.getLine(S.row);this.isAutoInsertedClosing(S,_,o.autoInsertedLineEnd[0])||(o.autoInsertedBrackets=0),o.autoInsertedRow=S.row,o.autoInsertedLineEnd=T+_.substr(S.column),o.autoInsertedBrackets++},m.recordMaybeInsert=function(y,x,T){var S=y.getCursorPosition(),_=x.doc.getLine(S.row);this.isMaybeInsertedClosing(S,_)||(o.maybeInsertedBrackets=0),o.maybeInsertedRow=S.row,o.maybeInsertedLineStart=_.substr(0,S.column)+T,o.maybeInsertedLineEnd=_.substr(S.column),o.maybeInsertedBrackets++},m.isAutoInsertedClosing=function(y,x,T){return o.autoInsertedBrackets>0&&y.row===o.autoInsertedRow&&T===o.autoInsertedLineEnd[0]&&x.substr(y.column)===o.autoInsertedLineEnd},m.isMaybeInsertedClosing=function(y,x){return o.maybeInsertedBrackets>0&&y.row===o.maybeInsertedRow&&x.substr(y.column)===o.maybeInsertedLineEnd&&x.substr(0,y.column)==o.maybeInsertedLineStart},m.popAutoInsertedClosing=function(){o.autoInsertedLineEnd=o.autoInsertedLineEnd.substr(1),o.autoInsertedBrackets--},m.clearMaybeInsertedClosing=function(){o&&(o.maybeInsertedBrackets=0,o.maybeInsertedRow=-1)},u.inherits(m,f),r.CstyleBehaviour=m}),ace.define("ace/unicode",["require","exports","module"],function(e,r,d){for(var u=[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],f=0,v=[],a=0;a<u.length;a+=2)v.push(f+=u[a]),u[a+1]&&v.push(45,f+=u[a+1]);r.wordChars=String.fromCharCode.apply(null,v)}),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,d){var u=e("../config"),f=e("../tokenizer").Tokenizer,v=e("./text_highlight_rules").TextHighlightRules,a=e("./behaviour/cstyle").CstyleBehaviour,g=e("../unicode"),i=e("../lib/lang"),o=e("../token_iterator").TokenIterator,c=e("../range").Range,p;p=function(){this.HighlightRules=v},(function(){this.$defaultBehaviour=new a,this.tokenRe=new RegExp("^["+g.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+g.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new f(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(s,h,m,y){var x=h.doc,T=!0,S=!0,_=1/0,C=h.getTabSize(),L=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var O=this.lineCommentStart.map(i.escapeRegExp).join("|"),M=this.lineCommentStart[0];else var O=i.escapeRegExp(this.lineCommentStart),M=this.lineCommentStart;O=new RegExp("^(\\s*)(?:"+O+") ?"),L=h.getUseSoftTabs();var I=function(V,K){var X=V.match(O);if(X){var oe=X[1].length,ee=X[0].length;!E(V,oe,ee)&&X[0][ee-1]==" "&&ee--,x.removeInLine(K,oe,ee)}},B=M+" ",F=function(V,K){(!T||/\S/.test(V))&&(E(V,_,_)?x.insertInLine({row:K,column:_},B):x.insertInLine({row:K,column:_},M))},N=function(V,K){return O.test(V)},E=function(V,K,X){for(var oe=0;K--&&V.charAt(K)==" ";)oe++;if(oe%C!=0)return!1;for(var oe=0;V.charAt(X++)==" ";)oe++;return C>2?oe%C!=C-1:oe%C==0}}else{if(!this.blockComment)return!1;var M=this.blockComment.start,A=this.blockComment.end,O=new RegExp("^(\\s*)(?:"+i.escapeRegExp(M)+")"),D=new RegExp("(?:"+i.escapeRegExp(A)+")\\s*$"),F=function(le,ue){N(le,ue)||(!T||/\S/.test(le))&&(x.insertInLine({row:ue,column:le.length},A),x.insertInLine({row:ue,column:_},M))},I=function(le,ue){var ne;(ne=le.match(D))&&x.removeInLine(ue,le.length-ne[0].length,le.length),(ne=le.match(O))&&x.removeInLine(ue,ne[1].length,ne[0].length)},N=function(le,ue){if(O.test(le))return!0;for(var ne=h.getTokens(ue),fe=0;fe<ne.length;fe++)if(ne[fe].type==="comment")return!0}}function j(V){for(var K=m;K<=y;K++)V(x.getLine(K),K)}var W=1/0;j(function(V,K){var X=V.search(/\S/);X!==-1?(X<_&&(_=X),S&&!N(V,K)&&(S=!1)):W>V.length&&(W=V.length)}),_==1/0&&(_=W,T=!1,S=!1),L&&_%C!=0&&(_=Math.floor(_/C)*C),j(S?I:F)},this.toggleBlockComment=function(s,h,m,y){var x=this.blockComment;if(x){!x.start&&x[0]&&(x=x[0]);var T=new o(h,y.row,y.column),S=T.getCurrentToken();h.selection;var _=h.selection.toOrientedRange(),C,L;if(S&&/comment/.test(S.type)){for(var O,M;S&&/comment/.test(S.type);){var I=S.value.indexOf(x.start);if(I!=-1){var B=T.getCurrentTokenRow(),F=T.getCurrentTokenColumn()+I;O=new c(B,F,B,F+x.start.length);break}S=T.stepBackward()}for(var T=new o(h,y.row,y.column),S=T.getCurrentToken();S&&/comment/.test(S.type);){var I=S.value.indexOf(x.end);if(I!=-1){var B=T.getCurrentTokenRow(),F=T.getCurrentTokenColumn()+I;M=new c(B,F,B,F+x.end.length);break}S=T.stepForward()}M&&h.remove(M),O&&(h.remove(O),C=O.start.row,L=-x.start.length)}else L=x.start.length,C=m.start.row,h.insert(m.end,x.end),h.insert(m.start,x.start);_.start.row==C&&(_.start.column+=L),_.end.row==C&&(_.end.column+=L),h.selection.fromOrientedRange(_)}},this.getNextLineIndent=function(s,h,m){return this.$getIndent(h)},this.checkOutdent=function(s,h,m){return!1},this.autoOutdent=function(s,h,m){},this.$getIndent=function(s){return s.match(/^\s*/)[0]},this.createWorker=function(s){return null},this.createModeDelegates=function(s){this.$embeds=[],this.$modes={};for(var h in s)if(s[h]){var m=s[h],y=m.prototype.$id,x=u.$modes[y];x||(u.$modes[y]=x=new m),u.$modes[h]||(u.$modes[h]=x),this.$embeds.push(h),this.$modes[h]=x}for(var T=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],S=function(L){(function(O){var M=T[L],I=O[M];O[T[L]]=function(){return this.$delegator(M,arguments,I)}})(_)},_=this,h=0;h<T.length;h++)S(h)},this.$delegator=function(s,h,m){var y=h[0]||"start";if(typeof y!="string"){if(Array.isArray(y[2])){var x=y[2][y[2].length-1],T=this.$modes[x];if(T)return T[s].apply(T,[y[1]].concat([].slice.call(h,1)))}y=y[0]||"start"}for(var S=0;S<this.$embeds.length;S++)if(this.$modes[this.$embeds[S]]){var _=y.split(this.$embeds[S]);if(!_[0]&&_[1]){h[0]=_[1];var T=this.$modes[this.$embeds[S]];return T[s].apply(T,h)}}var C=m.apply(this,h);return m?C:void 0},this.transformAction=function(s,h,m,y,x){if(this.$behaviour){var T=this.$behaviour.getBehaviours();for(var S in T)if(T[S][h]){var _=T[S][h].apply(this,arguments);if(_)return _}}},this.getKeywords=function(s){if(!this.completionKeywords){var h=this.$tokenizer.rules,m=[];for(var y in h)for(var x=h[y],T=0,S=x.length;T<S;T++)if(typeof x[T].token=="string")/keyword|support|storage/.test(x[T].token)&&m.push(x[T].regex);else if(typeof x[T].token=="object"){for(var _=0,C=x[T].token.length;_<C;_++)if(/keyword|support|storage/.test(x[T].token[_])){var y=x[T].regex.match(/\(.+?\)/g)[_];m.push(y.substr(1,y.length-2))}}this.completionKeywords=m}return s?m.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(s,h,m,y){var x=this.$keywordList||this.$createKeywordList();return x.map(function(T){return{name:T,value:T,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(p.prototype),r.Mode=p}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(e,r,d){var u=e("./lib/dom"),f=(function(){function v(a){this.session=a,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}return v.prototype.getRowLength=function(a){var g;return this.lineWidgets?g=this.lineWidgets[a]&&this.lineWidgets[a].rowCount||0:g=0,!this.$useWrapMode||!this.$wrapData[a]?1+g:this.$wrapData[a].length+1+g},v.prototype.$getWidgetScreenLength=function(){var a=0;return this.lineWidgets.forEach(function(g){g&&g.rowCount&&!g.hidden&&(a+=g.rowCount)}),a},v.prototype.$onChangeEditor=function(a){this.attach(a.editor)},v.prototype.attach=function(a){a&&a.widgetManager&&a.widgetManager!=this&&a.widgetManager.detach(),this.editor!=a&&(this.detach(),this.editor=a,a&&(a.widgetManager=this,a.renderer.on("beforeRender",this.measureWidgets),a.renderer.on("afterRender",this.renderWidgets)))},v.prototype.detach=function(a){var g=this.editor;if(g){this.editor=null,g.widgetManager=null,g.renderer.off("beforeRender",this.measureWidgets),g.renderer.off("afterRender",this.renderWidgets);var i=this.session.lineWidgets;i&&i.forEach(function(o){o&&o.el&&o.el.parentNode&&(o._inDocument=!1,o.el.parentNode.removeChild(o.el))})}},v.prototype.updateOnFold=function(a,g){var i=g.lineWidgets;if(!(!i||!a.action)){for(var o=a.data,c=o.start.row,p=o.end.row,s=a.action=="add",h=c+1;h<p;h++)i[h]&&(i[h].hidden=s);i[p]&&(s?i[c]?i[p].hidden=s:i[c]=i[p]:(i[c]==i[p]&&(i[c]=void 0),i[p].hidden=s))}},v.prototype.updateOnChange=function(a){var g=this.session.lineWidgets;if(g){var i=a.start.row,o=a.end.row-i;if(o!==0)if(a.action=="remove"){var c=g.splice(i+1,o);!g[i]&&c[c.length-1]&&(g[i]=c.pop()),c.forEach(function(s){s&&this.removeLineWidget(s)},this),this.$updateRows()}else{var p=new Array(o);g[i]&&g[i].column!=null&&a.start.column>g[i].column&&i++,p.unshift(i,0),g.splice.apply(g,p),this.$updateRows()}}},v.prototype.$updateRows=function(){var a=this.session.lineWidgets;if(a){var g=!0;a.forEach(function(i,o){if(i)for(g=!1,i.row=o;i.$oldWidget;)i.$oldWidget.row=o,i=i.$oldWidget}),g&&(this.session.lineWidgets=null)}},v.prototype.$registerLineWidget=function(a){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var g=this.session.lineWidgets[a.row];return g&&(a.$oldWidget=g,g.el&&g.el.parentNode&&(g.el.parentNode.removeChild(g.el),g._inDocument=!1)),this.session.lineWidgets[a.row]=a,a},v.prototype.addLineWidget=function(a){if(this.$registerLineWidget(a),a.session=this.session,!this.editor)return a;var g=this.editor.renderer;a.html&&!a.el&&(a.el=u.createElement("div"),a.el.innerHTML=a.html),a.text&&!a.el&&(a.el=u.createElement("div"),a.el.textContent=a.text),a.el&&(u.addCssClass(a.el,"ace_lineWidgetContainer"),a.className&&u.addCssClass(a.el,a.className),a.el.style.position="absolute",a.el.style.zIndex="5",g.container.appendChild(a.el),a._inDocument=!0,a.coverGutter||(a.el.style.zIndex="3"),a.pixelHeight==null&&(a.pixelHeight=a.el.offsetHeight)),a.rowCount==null&&(a.rowCount=a.pixelHeight/g.layerConfig.lineHeight);var i=this.session.getFoldAt(a.row,0);if(a.$fold=i,i){var o=this.session.lineWidgets;a.row==i.end.row&&!o[i.start.row]?o[i.start.row]=a:a.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows(),this.renderWidgets(null,g),this.onWidgetChanged(a),a},v.prototype.removeLineWidget=function(a){if(a._inDocument=!1,a.session=null,a.el&&a.el.parentNode&&a.el.parentNode.removeChild(a.el),a.editor&&a.editor.destroy)try{a.editor.destroy()}catch{}if(this.session.lineWidgets){var g=this.session.lineWidgets[a.row];if(g==a)this.session.lineWidgets[a.row]=a.$oldWidget,a.$oldWidget&&this.onWidgetChanged(a.$oldWidget);else for(;g;){if(g.$oldWidget==a){g.$oldWidget=a.$oldWidget;break}g=g.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows()},v.prototype.getWidgetsAtRow=function(a){for(var g=this.session.lineWidgets,i=g&&g[a],o=[];i;)o.push(i),i=i.$oldWidget;return o},v.prototype.onWidgetChanged=function(a){this.session._changedWidgets.push(a),this.editor&&this.editor.renderer.updateFull()},v.prototype.measureWidgets=function(a,g){var i=this.session._changedWidgets,o=g.layerConfig;if(!(!i||!i.length)){for(var c=1/0,p=0;p<i.length;p++){var s=i[p];if(!(!s||!s.el)&&s.session==this.session){if(!s._inDocument){if(this.session.lineWidgets[s.row]!=s)continue;s._inDocument=!0,g.container.appendChild(s.el)}s.h=s.el.offsetHeight,s.fixedWidth||(s.w=s.el.offsetWidth,s.screenWidth=Math.ceil(s.w/o.characterWidth));var h=s.h/o.lineHeight;s.coverLine&&(h-=this.session.getRowLineCount(s.row),h<0&&(h=0)),s.rowCount!=h&&(s.rowCount=h,s.row<c&&(c=s.row))}}c!=1/0&&(this.session._emit("changeFold",{data:{start:{row:c}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},v.prototype.renderWidgets=function(a,g){var i=g.layerConfig,o=this.session.lineWidgets;if(o){for(var c=Math.min(this.firstRow,i.firstRow),p=Math.max(this.lastRow,i.lastRow,o.length);c>0&&!o[c];)c--;this.firstRow=i.firstRow,this.lastRow=i.lastRow,g.$cursorLayer.config=i;for(var s=c;s<=p;s++){var h=o[s];if(!(!h||!h.el)){if(h.hidden){h.el.style.top=-100-(h.pixelHeight||0)+"px";continue}h._inDocument||(h._inDocument=!0,g.container.appendChild(h.el));var m=g.$cursorLayer.getPixelPosition({row:s,column:0},!0).top;h.coverLine||(m+=i.lineHeight*this.session.getRowLineCount(h.row)),h.el.style.top=m-i.offset+"px";var y=h.coverGutter?0:g.gutterWidth;h.fixedWidth||(y-=g.scrollLeft),h.el.style.left=y+"px",h.fullWidth&&h.screenWidth&&(h.el.style.minWidth=i.width+2*i.padding+"px"),h.fixedWidth?h.el.style.right=g.scrollBar.getWidth()+"px":h.el.style.right=""}}}},v})();r.LineWidgets=f}),ace.define("ace/apply_delta",["require","exports","module"],function(e,r,d){r.applyDelta=function(u,f,v){var a=f.start.row,g=f.start.column,i=u[a]||"";switch(f.action){case"insert":var o=f.lines;if(o.length===1)u[a]=i.substring(0,g)+f.lines[0]+i.substring(g);else{var c=[a,1].concat(f.lines);u.splice.apply(u,c),u[a]=i.substring(0,g)+u[a],u[a+f.lines.length-1]+=i.substring(g)}break;case"remove":var p=f.end.column,s=f.end.row;a===s?u[a]=i.substring(0,g)+i.substring(p):u.splice(a,s-a+1,i.substring(0,g)+u[s].substring(p));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,r,d){var u=e("./lib/oop"),f=e("./lib/event_emitter").EventEmitter,v=(function(){function i(o,c,p){this.$onChange=this.onChange.bind(this),this.attach(o),typeof c!="number"?this.setPosition(c.row,c.column):this.setPosition(c,p)}return i.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},i.prototype.getDocument=function(){return this.document},i.prototype.onChange=function(o){if(!(o.start.row==o.end.row&&o.start.row!=this.row)&&!(o.start.row>this.row)){var c=g(o,{row:this.row,column:this.column},this.$insertRight);this.setPosition(c.row,c.column,!0)}},i.prototype.setPosition=function(o,c,p){var s;if(p?s={row:o,column:c}:s=this.$clipPositionToDocument(o,c),!(this.row==s.row&&this.column==s.column)){var h={row:this.row,column:this.column};this.row=s.row,this.column=s.column,this._signal("change",{old:h,value:s})}},i.prototype.detach=function(){this.document.off("change",this.$onChange)},i.prototype.attach=function(o){this.document=o||this.document,this.document.on("change",this.$onChange)},i.prototype.$clipPositionToDocument=function(o,c){var p={};return o>=this.document.getLength()?(p.row=Math.max(0,this.document.getLength()-1),p.column=this.document.getLine(p.row).length):o<0?(p.row=0,p.column=0):(p.row=o,p.column=Math.min(this.document.getLine(p.row).length,Math.max(0,c))),c<0&&(p.column=0),p},i})();v.prototype.$insertRight=!1,u.implement(v.prototype,f);function a(i,o,c){var p=c?i.column<=o.column:i.column<o.column;return i.row<o.row||i.row==o.row&&p}function g(i,o,c){var p=i.action=="insert",s=(p?1:-1)*(i.end.row-i.start.row),h=(p?1:-1)*(i.end.column-i.start.column),m=i.start,y=p?m:i.end;return a(o,m,c)?{row:o.row,column:o.column}:a(y,o,!c)?{row:o.row+s,column:o.column+(o.row==y.row?h:0)}:{row:m.row,column:m.column}}r.Anchor=v}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,r,d){var u=e("./lib/oop"),f=e("./apply_delta").applyDelta,v=e("./lib/event_emitter").EventEmitter,a=e("./range").Range,g=e("./anchor").Anchor,i=(function(){function o(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 o.prototype.setValue=function(c){var p=this.getLength()-1;this.remove(new a(0,0,p,this.getLine(p).length)),this.insert({row:0,column:0},c||"")},o.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},o.prototype.createAnchor=function(c,p){return new g(this,c,p)},o.prototype.$detectNewLine=function(c){var p=c.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=p?p[1]:`
189
+ `,this._signal("changeNewLineMode")},o.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
190
+ `;case"unix":return`
191
+ `;default:return this.$autoNewLine||`
192
+ `}},o.prototype.setNewLineMode=function(c){this.$newLineMode!==c&&(this.$newLineMode=c,this._signal("changeNewLineMode"))},o.prototype.getNewLineMode=function(){return this.$newLineMode},o.prototype.isNewLine=function(c){return c==`\r
193
+ `||c=="\r"||c==`
194
+ `},o.prototype.getLine=function(c){return this.$lines[c]||""},o.prototype.getLines=function(c,p){return this.$lines.slice(c,p+1)},o.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},o.prototype.getLength=function(){return this.$lines.length},o.prototype.getTextRange=function(c){return this.getLinesForRange(c).join(this.getNewLineCharacter())},o.prototype.getLinesForRange=function(c){var p;if(c.start.row===c.end.row)p=[this.getLine(c.start.row).substring(c.start.column,c.end.column)];else{p=this.getLines(c.start.row,c.end.row),p[0]=(p[0]||"").substring(c.start.column);var s=p.length-1;c.end.row-c.start.row==s&&(p[s]=p[s].substring(0,c.end.column))}return p},o.prototype.insertLines=function(c,p){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(c,p)},o.prototype.removeLines=function(c,p){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(c,p)},o.prototype.insertNewLine=function(c){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(c,["",""])},o.prototype.insert=function(c,p){return this.getLength()<=1&&this.$detectNewLine(p),this.insertMergedLines(c,this.$split(p))},o.prototype.insertInLine=function(c,p){var s=this.clippedPos(c.row,c.column),h=this.pos(c.row,c.column+p.length);return this.applyDelta({start:s,end:h,action:"insert",lines:[p]},!0),this.clonePos(h)},o.prototype.clippedPos=function(c,p){var s=this.getLength();c===void 0?c=s:c<0?c=0:c>=s&&(c=s-1,p=void 0);var h=this.getLine(c);return p==null&&(p=h.length),p=Math.min(Math.max(p,0),h.length),{row:c,column:p}},o.prototype.clonePos=function(c){return{row:c.row,column:c.column}},o.prototype.pos=function(c,p){return{row:c,column:p}},o.prototype.$clipPosition=function(c){var p=this.getLength();return c.row>=p?(c.row=Math.max(0,p-1),c.column=this.getLine(p-1).length):(c.row=Math.max(0,c.row),c.column=Math.min(Math.max(c.column,0),this.getLine(c.row).length)),c},o.prototype.insertFullLines=function(c,p){c=Math.min(Math.max(c,0),this.getLength());var s=0;c<this.getLength()?(p=p.concat([""]),s=0):(p=[""].concat(p),c--,s=this.$lines[c].length),this.insertMergedLines({row:c,column:s},p)},o.prototype.insertMergedLines=function(c,p){var s=this.clippedPos(c.row,c.column),h={row:s.row+p.length-1,column:(p.length==1?s.column:0)+p[p.length-1].length};return this.applyDelta({start:s,end:h,action:"insert",lines:p}),this.clonePos(h)},o.prototype.remove=function(c){var p=this.clippedPos(c.start.row,c.start.column),s=this.clippedPos(c.end.row,c.end.column);return this.applyDelta({start:p,end:s,action:"remove",lines:this.getLinesForRange({start:p,end:s})}),this.clonePos(p)},o.prototype.removeInLine=function(c,p,s){var h=this.clippedPos(c,p),m=this.clippedPos(c,s);return this.applyDelta({start:h,end:m,action:"remove",lines:this.getLinesForRange({start:h,end:m})},!0),this.clonePos(h)},o.prototype.removeFullLines=function(c,p){c=Math.min(Math.max(0,c),this.getLength()-1),p=Math.min(Math.max(0,p),this.getLength()-1);var s=p==this.getLength()-1&&c>0,h=p<this.getLength()-1,m=s?c-1:c,y=s?this.getLine(m).length:0,x=h?p+1:p,T=h?0:this.getLine(x).length,S=new a(m,y,x,T),_=this.$lines.slice(c,p+1);return this.applyDelta({start:S.start,end:S.end,action:"remove",lines:this.getLinesForRange(S)}),_},o.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:["",""]})},o.prototype.replace=function(c,p){if(c instanceof a||(c=a.fromPoints(c.start,c.end)),p.length===0&&c.isEmpty())return c.start;if(p==this.getTextRange(c))return c.end;this.remove(c);var s;return p?s=this.insert(c.start,p):s=c.start,s},o.prototype.applyDeltas=function(c){for(var p=0;p<c.length;p++)this.applyDelta(c[p])},o.prototype.revertDeltas=function(c){for(var p=c.length-1;p>=0;p--)this.revertDelta(c[p])},o.prototype.applyDelta=function(c,p){var s=c.action=="insert";(s?c.lines.length<=1&&!c.lines[0]:!a.comparePoints(c.start,c.end))||(s&&c.lines.length>2e4?this.$splitAndapplyLargeDelta(c,2e4):(f(this.$lines,c,p),this._signal("change",c)))},o.prototype.$safeApplyDelta=function(c){var p=this.$lines.length;(c.action=="remove"&&c.start.row<p&&c.end.row<p||c.action=="insert"&&c.start.row<=p)&&this.applyDelta(c)},o.prototype.$splitAndapplyLargeDelta=function(c,p){for(var s=c.lines,h=s.length-p+1,m=c.start.row,y=c.start.column,x=0,T=0;x<h;x=T){T+=p-1;var S=s.slice(x,T);S.push(""),this.applyDelta({start:this.pos(m+x,y),end:this.pos(m+T,y=0),action:c.action,lines:S},!0)}c.lines=s.slice(x),c.start.row=m+x,c.start.column=y,this.applyDelta(c,!0)},o.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()})},o.prototype.indexToPosition=function(c,p){for(var s=this.$lines||this.getAllLines(),h=this.getNewLineCharacter().length,m=p||0,y=s.length;m<y;m++)if(c-=s[m].length+h,c<0)return{row:m,column:c+s[m].length+h};return{row:y-1,column:c+s[y-1].length+h}},o.prototype.positionToIndex=function(c,p){for(var s=this.$lines||this.getAllLines(),h=this.getNewLineCharacter().length,m=0,y=Math.min(c.row,s.length),x=p||0;x<y;++x)m+=s[x].length+h;return m+c.column},o.prototype.$split=function(c){return c.split(/\r\n|\r|\n/)},o})();i.prototype.$autoNewLine="",i.prototype.$newLineMode="auto",u.implement(i.prototype,v),r.Document=i}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,r,d){var u=e("./lib/oop"),f=e("./lib/event_emitter").EventEmitter,v=(function(){function a(g,i){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=g;var o=this;this.$worker=function(){if(o.running){for(var c=new Date,p=o.currentLine,s=-1,h=o.doc,m=p;o.lines[p];)p++;var y=h.getLength(),x=0;for(o.running=!1;p<y;){o.$tokenizeRow(p),s=p;do p++;while(o.lines[p]);if(x++,x%5===0&&new Date-c>20){o.running=setTimeout(o.$worker,20);break}}o.currentLine=p,s==-1&&(s=p),m<=s&&o.fireUpdateEvent(m,s)}}}return a.prototype.setTokenizer=function(g){this.tokenizer=g,this.lines=[],this.states=[],this.start(0)},a.prototype.setDocument=function(g){this.doc=g,this.lines=[],this.states=[],this.stop()},a.prototype.fireUpdateEvent=function(g,i){var o={first:g,last:i};this._signal("update",{data:o})},a.prototype.start=function(g){this.currentLine=Math.min(g||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},a.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},a.prototype.$updateOnChange=function(g){var i=g.start.row,o=g.end.row-i;if(o===0)this.lines[i]=null;else if(g.action=="remove")this.lines.splice(i,o+1,null),this.states.splice(i,o+1,null);else{var c=Array(o+1);c.unshift(i,1),this.lines.splice.apply(this.lines,c),this.states.splice.apply(this.states,c)}this.currentLine=Math.min(i,this.currentLine,this.doc.getLength()),this.stop()},a.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},a.prototype.getTokens=function(g){return this.lines[g]||this.$tokenizeRow(g)},a.prototype.getState=function(g){return this.currentLine==g&&this.$tokenizeRow(g),this.states[g]||"start"},a.prototype.$tokenizeRow=function(g){var i=this.doc.getLine(g),o=this.states[g-1],c=this.tokenizer.getLineTokens(i,o,g);return this.states[g]+""!=c.state+""?(this.states[g]=c.state,this.lines[g+1]=null,this.currentLine>g+1&&(this.currentLine=g+1)):this.currentLine==g&&(this.currentLine=g+1),this.lines[g]=c.tokens},a.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},a})();u.implement(v.prototype,f),r.BackgroundTokenizer=v}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(e,r,d){var u=e("./lib/lang"),f=e("./range").Range,v=(function(){function a(g,i,o){o===void 0&&(o="text"),this.setRegexp(g),this.clazz=i,this.type=o,this.docLen=0}return a.prototype.setRegexp=function(g){this.regExp+""!=g+""&&(this.regExp=g,this.cache=[])},a.prototype.update=function(g,i,o,c){if(this.regExp){for(var p=c.firstRow,s=c.lastRow,h={},m=o.$editor&&o.$editor.$search,y=m&&m.$isMultilineSearch(o.$editor.getLastSearchOptions()),x=p;x<=s;x++){var T=this.cache[x];if(T==null||o.getValue().length!=this.docLen){if(y){T=[];var S=m.$multiLineForward(o,this.regExp,x,s);if(S){var _=S.endRow<=s?S.endRow-1:s;_>x&&(x=_),T.push(new f(S.startRow,S.startCol,S.endRow,S.endCol))}T.length>this.MAX_RANGES&&(T=T.slice(0,this.MAX_RANGES))}else T=u.getMatchOffsets(o.getLine(x),this.regExp),T.length>this.MAX_RANGES&&(T=T.slice(0,this.MAX_RANGES)),T=T.map(function(M){return new f(x,M.offset,x,M.offset+M.length)});this.cache[x]=T.length?T:""}if(T.length!==0)for(var C=T.length;C--;){var L=T[C].toScreenRange(o),O=L.toString();h[O]||(h[O]=!0,i.drawSingleLineMarker(g,L,this.clazz,c))}}this.docLen=o.getValue().length}},a})();v.prototype.MAX_RANGES=500,r.SearchHighlight=v}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(e,r,d){var u=(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,O){if(!this.$fromUndo&&C!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),L===!1||!this.lastDeltas){this.lastDeltas=[];var M=this.$undoStack.length;M>this.$undoDepth-1&&this.$undoStack.splice(0,M-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 O=this.$undoStack,M=O.length;M--;){var I=O[M][0];if(I.id<=C)break;I.id<L&&(I.ignore=!0)}this.lastDeltas=null},_.prototype.getSelection=function(C,L){for(var O=this.selections,M=O.length;M--;){var I=O[M];if(I.rev<C)return L&&(I=O[M+1]),I}},_.prototype.getRevision=function(){return this.$rev},_.prototype.getDeltas=function(C,L){L==null&&(L=this.$rev+1);for(var O=this.$undoStack,M=null,I=0,B=O.length;B--;){var F=O[B][0];if(F.id<L&&!M&&(M=B+1),F.id<=C){I=B+1;break}}return O.slice(I,M)},_.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 O=this.$undoStack;if(f(O,O.length)){C||(C=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var M=O.pop(),I=null;return M&&(I=C.undoChanges(M,L),this.$redoStack.push(M),this.$syncRev()),this.$fromUndo=!1,I}},_.prototype.redo=function(C,L){if(this.lastDeltas=null,C||(C=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var O=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);S(this.$redoStack,O),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(B){B[0].id=++this.$maxRev},this)}var M=this.$redoStack.pop(),I=null;return M&&(I=C.redoChanges(M,L),this.$undoStack.push(M),this.$syncRev()),this.$fromUndo=!1,I},_.prototype.$syncRev=function(){var C=this.$undoStack,L=C[C.length-1],O=L&&L[0].id||0;this.$redoStackBaseRev=O,this.$rev=O},_.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?o(C):o(this.$undoStack)+`
195
+ ---
196
+ `+o(this.$redoStack)},_})();u.prototype.hasUndo=u.prototype.canUndo,u.prototype.hasRedo=u.prototype.canRedo,u.prototype.isClean=u.prototype.isAtBookmark,u.prototype.markClean=u.prototype.bookmark;function f(_,C){for(var L=C;L--;){var O=_[L];if(O&&!O[0].ignore){for(;L<C-1;){var M=s(_[L],_[L+1]);_[L]=M[0],_[L+1]=M[1],L++}return!0}}}var v=e("./range").Range,a=v.comparePoints;v.comparePoints;function g(_){return{row:_.row,column:_.column}}function i(_){return{start:g(_.start),end:g(_.end),action:_.action,lines:_.lines.slice()}}function o(_){if(_=_||this,Array.isArray(_))return _.map(o).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 p(_,C){var L=_.action=="insert",O=C.action=="insert";if(L&&O)if(a(C.start,_.end)>=0)m(C,_,-1);else if(a(C.start,_.start)<=0)m(_,C,1);else return null;else if(L&&!O)if(a(C.start,_.end)>=0)m(C,_,-1);else if(a(C.end,_.start)<=0)m(_,C,-1);else return null;else if(!L&&O)if(a(C.start,_.start)>=0)m(C,_,1);else if(a(C.start,_.start)<=0)m(_,C,1);else return null;else if(!L&&!O)if(a(C.start,_.start)>=0)m(C,_,1);else if(a(C.end,_.start)<=0)m(_,C,-1);else return null;return[C,_]}function s(_,C){for(var L=_.length;L--;)for(var O=0;O<C.length;O++)if(!p(_[L],C[O])){for(;L<_.length;){for(;O--;)p(C[O],_[L]);O=C.length,L++}return[_,C]}return _.selectionBefore=C.selectionBefore=_.selectionAfter=C.selectionAfter=null,[C,_]}function h(_,C){var L=_.action=="insert",O=C.action=="insert";if(L&&O)a(_.start,C.start)<0?m(C,_,1):m(_,C,1);else if(L&&!O)a(_.start,C.end)>=0?m(_,C,-1):(a(_.start,C.start)<=0||m(_,v.fromPoints(C.start,_.start),-1),m(C,_,1));else if(!L&&O)a(C.start,_.end)>=0?m(C,_,-1):(a(C.start,_.start)<=0||m(C,v.fromPoints(_.start,C.start),-1),m(_,C,1));else if(!L&&!O)if(a(C.start,_.end)>=0)m(C,_,-1);else if(a(C.end,_.start)<=0)m(_,C,-1);else{var M,I;return a(_.start,C.start)<0&&(M=_,_=x(_,C.start)),a(_.end,C.end)>0&&(I=x(_,C.end)),y(C.end,_.start,_.end,-1),I&&!M&&(_.lines=I.lines,_.start=I.start,_.end=I.end,I=_),[C,M,I].filter(Boolean)}return[C,_]}function m(_,C,L){y(_.start,C.start,C.end,L),y(_.end,C.start,C.end,L)}function y(_,C,L,O){_.row==(O==1?C:L).row&&(_.column+=O*(L.column-C.column)),_.row+=O*(L.row-C.row)}function x(_,C){var L=_.lines,O=_.end;_.end=g(C);var M=_.end.row-_.start.row,I=L.splice(M,L.length),B=M?C.column:C.column-_.start.column;L.push(I[0].substring(0,B)),I[0]=I[0].substr(B);var F={start:g(C),end:O,lines:I,action:_.action};return F}function T(_,C){C=i(C);for(var L=_.length;L--;){for(var O=_[L],M=0;M<O.length;M++){var I=O[M],B=h(I,C);C=B[0],B.length!=2&&(B[2]?(O.splice(M+1,1,B[1],B[2]),M++):B[1]||(O.splice(M,1),M--))}O.length||_.splice(L,1)}return _}function S(_,C){for(var L=0;L<C.length;L++)for(var O=C[L],M=0;M<O.length;M++)T(_,O[M])}r.UndoManager=u}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,r,d){var u=e("../range").Range,f=(function(){function v(a,g){this.foldData=a,Array.isArray(g)?this.folds=g:g=this.folds=[g];var i=g[g.length-1];this.range=new u(g[0].start.row,g[0].start.column,i.end.row,i.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(o){o.setFoldLine(this)},this)}return v.prototype.shiftRow=function(a){this.start.row+=a,this.end.row+=a,this.folds.forEach(function(g){g.start.row+=a,g.end.row+=a})},v.prototype.addFold=function(a){if(a.sameRow){if(a.start.row<this.startRow||a.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(a),this.folds.sort(function(g,i){return-g.range.compareEnd(i.start.row,i.start.column)}),this.range.compareEnd(a.start.row,a.start.column)>0?(this.end.row=a.end.row,this.end.column=a.end.column):this.range.compareStart(a.end.row,a.end.column)<0&&(this.start.row=a.start.row,this.start.column=a.start.column)}else if(a.start.row==this.end.row)this.folds.push(a),this.end.row=a.end.row,this.end.column=a.end.column;else if(a.end.row==this.start.row)this.folds.unshift(a),this.start.row=a.start.row,this.start.column=a.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");a.foldLine=this},v.prototype.containsRow=function(a){return a>=this.start.row&&a<=this.end.row},v.prototype.walk=function(a,g,i){var o=0,c=this.folds,p,s,h,m=!0;g==null&&(g=this.end.row,i=this.end.column);for(var y=0;y<c.length;y++){if(p=c[y],s=p.range.compareStart(g,i),s==-1){a(null,g,i,o,m);return}if(h=a(null,p.start.row,p.start.column,o,m),h=!h&&a(p.placeholder,p.start.row,p.start.column,o),h||s===0)return;m=!p.sameRow,o=p.end.column}a(null,g,i,o,m)},v.prototype.getNextFoldTo=function(a,g){for(var i,o,c=0;c<this.folds.length;c++){if(i=this.folds[c],o=i.range.compareEnd(a,g),o==-1)return{fold:i,kind:"after"};if(o===0)return{fold:i,kind:"inside"}}return null},v.prototype.addRemoveChars=function(a,g,i){var o=this.getNextFoldTo(a,g),c,p;if(o){if(c=o.fold,o.kind=="inside"&&c.start.column!=g&&c.start.row!=a)window.console&&window.console.log(a,g,c);else if(c.start.row==a){p=this.folds;var s=p.indexOf(c);for(s===0&&(this.start.column+=i),s;s<p.length;s++){if(c=p[s],c.start.column+=i,!c.sameRow)return;c.end.column+=i}this.end.column+=i}}},v.prototype.split=function(a,g){var i=this.getNextFoldTo(a,g);if(!i||i.kind=="inside")return null;var o=i.fold,c=this.folds,p=this.foldData,s=c.indexOf(o),h=c[s-1];this.end.row=h.end.row,this.end.column=h.end.column,c=c.splice(s,c.length-s);var m=new v(p,c);return p.splice(p.indexOf(this)+1,0,m),m},v.prototype.merge=function(a){for(var g=a.folds,i=0;i<g.length;i++)this.addFold(g[i]);var o=this.foldData;o.splice(o.indexOf(a),1)},v.prototype.toString=function(){var a=[this.range.toString()+": ["];return this.folds.forEach(function(g){a.push(" "+g.toString())}),a.push("]"),a.join(`
199
+ `)},v.prototype.idxToPosition=function(a){for(var g=0,i=0;i<this.folds.length;i++){var o=this.folds[i];if(a-=o.start.column-g,a<0)return{row:o.start.row,column:o.start.column+a};if(a-=o.placeholder.length,a<0)return o.start;g=o.end.column}return{row:this.end.row,column:this.end.column+a}},v})();r.FoldLine=f}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(e,r,d){var u=e("./range").Range,f=u.comparePoints,v=(function(){function a(){this.ranges=[],this.$bias=1}return a.prototype.pointIndex=function(g,i,o){for(var c=this.ranges,p=o||0;p<c.length;p++){var s=c[p],h=f(g,s.end);if(!(h>0)){var m=f(g,s.start);return h===0?i&&m!==0?-p-2:p:m>0||m===0&&!i?p:-p-1}}return-p-1},a.prototype.add=function(g){var i=!g.isEmpty(),o=this.pointIndex(g.start,i);o<0&&(o=-o-1);var c=this.pointIndex(g.end,i,o);return c<0?c=-c-1:c++,this.ranges.splice(o,c-o,g)},a.prototype.addList=function(g){for(var i=[],o=g.length;o--;)i.push.apply(i,this.add(g[o]));return i},a.prototype.substractPoint=function(g){var i=this.pointIndex(g);if(i>=0)return this.ranges.splice(i,1)},a.prototype.merge=function(){var g=[],i=this.ranges;i=i.sort(function(h,m){return f(h.start,m.start)});for(var o=i[0],c,p=1;p<i.length;p++){c=o,o=i[p];var s=f(c.end,o.start);s<0||s==0&&!c.isEmpty()&&!o.isEmpty()||(f(c.end,o.end)<0&&(c.end.row=o.end.row,c.end.column=o.end.column),i.splice(p,1),g.push(o),o=c,p--)}return this.ranges=i,g},a.prototype.contains=function(g,i){return this.pointIndex({row:g,column:i})>=0},a.prototype.containsPoint=function(g){return this.pointIndex(g)>=0},a.prototype.rangeAtPoint=function(g){var i=this.pointIndex(g);if(i>=0)return this.ranges[i]},a.prototype.clipRows=function(g,i){var o=this.ranges;if(o[0].start.row>i||o[o.length-1].start.row<g)return[];var c=this.pointIndex({row:g,column:0});c<0&&(c=-c-1);var p=this.pointIndex({row:i,column:0},c);p<0&&(p=-p-1);for(var s=[],h=c;h<p;h++)s.push(o[h]);return s},a.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},a.prototype.attach=function(g){this.session&&this.detach(),this.session=g,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},a.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},a.prototype.$onChange=function(g){for(var i=g.start,o=g.end,c=i.row,p=o.row,s=this.ranges,h=0,m=s.length;h<m;h++){var y=s[h];if(y.end.row>=c)break}if(g.action=="insert")for(var x=p-c,T=-i.column+o.column;h<m;h++){var y=s[h];if(y.start.row>c)break;if(y.start.row==c&&y.start.column>=i.column&&(y.start.column==i.column&&this.$bias<=0||(y.start.column+=T,y.start.row+=x)),y.end.row==c&&y.end.column>=i.column){if(y.end.column==i.column&&this.$bias<0)continue;y.end.column==i.column&&T>0&&h<m-1&&y.end.column>y.start.column&&y.end.column==s[h+1].start.column&&(y.end.column-=T),y.end.column+=T,y.end.row+=x}}else for(var x=c-p,T=i.column-o.column;h<m;h++){var y=s[h];if(y.start.row>p)break;y.end.row<p&&(c<y.end.row||c==y.end.row&&i.column<y.end.column)?(y.end.row=c,y.end.column=i.column):y.end.row==p?y.end.column<=o.column?(x||y.end.column>i.column)&&(y.end.column=i.column,y.end.row=i.row):(y.end.column+=T,y.end.row+=x):y.end.row>p&&(y.end.row+=x),y.start.row<p&&(c<y.start.row||c==y.start.row&&i.column<y.start.column)?(y.start.row=c,y.start.column=i.column):y.start.row==p?y.start.column<=o.column?(x||y.start.column>i.column)&&(y.start.column=i.column,y.start.row=i.row):(y.start.column+=T,y.start.row+=x):y.start.row>p&&(y.start.row+=x)}if(x!=0&&h<m)for(;h<m;h++){var y=s[h];y.start.row+=x,y.end.row+=x}},a})();v.prototype.comparePoints=f,r.RangeList=v}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(e,r,d){var u=this&&this.__extends||(function(){var c=function(p,s){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,m){h.__proto__=m}||function(h,m){for(var y in m)Object.prototype.hasOwnProperty.call(m,y)&&(h[y]=m[y])},c(p,s)};return function(p,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");c(p,s);function h(){this.constructor=p}p.prototype=s===null?Object.create(s):(h.prototype=s.prototype,new h)}})(),f=e("../range_list").RangeList,v=(function(c){u(p,c);function p(s,h){var m=c.call(this)||this;return m.foldLine=null,m.placeholder=h,m.range=s,m.start=s.start,m.end=s.end,m.sameRow=s.start.row==s.end.row,m.subFolds=m.ranges=[],m}return p.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},p.prototype.setFoldLine=function(s){this.foldLine=s,this.subFolds.forEach(function(h){h.setFoldLine(s)})},p.prototype.clone=function(){var s=this.range.clone(),h=new p(s,this.placeholder);return this.subFolds.forEach(function(m){h.subFolds.push(m.clone())}),h.collapseChildren=this.collapseChildren,h},p.prototype.addSubFold=function(s){if(!this.range.isEqual(s)){g(s,this.start);for(var h=s.start.row,m=s.start.column,y=0,x=-1;y<this.subFolds.length&&(x=this.subFolds[y].range.compare(h,m),x==1);y++);var T=this.subFolds[y],S=0;if(x==0){if(T.range.containsRange(s))return T.addSubFold(s);S=1}for(var h=s.range.end.row,m=s.range.end.column,_=y,x=-1;_<this.subFolds.length&&(x=this.subFolds[_].range.compare(h,m),x==1);_++);x==0&&_++;for(var C=this.subFolds.splice(y,_-y,s),L=x==0?C.length-1:C.length,O=S;O<L;O++)s.addSubFold(C[O]);return s.setFoldLine(this.foldLine),s}},p.prototype.restoreRange=function(s){return o(s,this.start)},p})(f);function a(c,p){c.row-=p.row,c.row==0&&(c.column-=p.column)}function g(c,p){a(c.start,p),a(c.end,p)}function i(c,p){c.row==0&&(c.column+=p.column),c.row+=p.row}function o(c,p){i(c.start,p),i(c.end,p)}r.Fold=v}),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,d){var u=e("../range").Range,f=e("./fold_line").FoldLine,v=e("./fold").Fold,a=e("../token_iterator").TokenIterator,g=e("../mouse/mouse_event").MouseEvent;function i(){this.getFoldAt=function(o,c,p){var s=this.getFoldLine(o);if(!s)return null;for(var h=s.folds,m=0;m<h.length;m++){var y=h[m].range;if(y.contains(o,c)){if(p==1&&y.isEnd(o,c)&&!y.isEmpty()||p==-1&&y.isStart(o,c)&&!y.isEmpty())continue;return h[m]}}},this.getFoldsInRange=function(o){var c=o.start,p=o.end,s=this.$foldData,h=[];c.column+=1,p.column-=1;for(var m=0;m<s.length;m++){var y=s[m].range.compareRange(o);if(y!=2){if(y==-2)break;for(var x=s[m].folds,T=0;T<x.length;T++){var S=x[T];if(y=S.range.compareRange(o),y==-2)break;if(y!=2){if(y==42)break;h.push(S)}}}}return c.column-=1,p.column+=1,h},this.getFoldsInRangeList=function(o){if(Array.isArray(o)){var c=[];o.forEach(function(s){c=c.concat(this.getFoldsInRange(s))},this)}else var c=this.getFoldsInRange(o);return c},this.getAllFolds=function(){for(var o=[],c=this.$foldData,p=0;p<c.length;p++)for(var s=0;s<c[p].folds.length;s++)o.push(c[p].folds[s]);return o},this.getFoldStringAt=function(o,c,p,s){if(s=s||this.getFoldLine(o),!s)return null;for(var h={end:{column:0}},m,y,x=0;x<s.folds.length;x++){y=s.folds[x];var T=y.range.compareEnd(o,c);if(T==-1){m=this.getLine(y.start.row).substring(h.end.column,y.start.column);break}else if(T===0)return null;h=y}return m||(m=this.getLine(y.start.row).substring(h.end.column)),p==-1?m.substring(0,c-h.end.column):p==1?m.substring(c-h.end.column):m},this.getFoldLine=function(o,c){var p=this.$foldData,s=0;for(c&&(s=p.indexOf(c)),s==-1&&(s=0),s;s<p.length;s++){var h=p[s];if(h.start.row<=o&&h.end.row>=o)return h;if(h.end.row>o)return null}return null},this.getNextFoldLine=function(o,c){var p=this.$foldData,s=0;for(c&&(s=p.indexOf(c)),s==-1&&(s=0),s;s<p.length;s++){var h=p[s];if(h.end.row>=o)return h}return null},this.getFoldedRowCount=function(o,c){for(var p=this.$foldData,s=c-o+1,h=0;h<p.length;h++){var m=p[h],y=m.end.row,x=m.start.row;if(y>=c){x<c&&(x>=o?s-=c-x:s=0);break}else y>=o&&(x>=o?s-=y-x:s-=y-o+1)}return s},this.$addFoldLine=function(o){return this.$foldData.push(o),this.$foldData.sort(function(c,p){return c.start.row-p.start.row}),o},this.addFold=function(o,c){var p=this.$foldData,s=!1,h;o instanceof v?h=o:(h=new v(c,o),h.collapseChildren=c.collapseChildren),this.$clipRangeToDocument(h.range);var m=h.start.row,y=h.start.column,x=h.end.row,T=h.end.column,S=this.getFoldAt(m,y,1),_=this.getFoldAt(x,T,-1);if(S&&_==S)return S.addSubFold(h);S&&!S.range.isStart(m,y)&&this.removeFold(S),_&&!_.range.isEnd(x,T)&&this.removeFold(_);var C=this.getFoldsInRange(h.range);C.length>0&&(this.removeFolds(C),h.collapseChildren||C.forEach(function(I){h.addSubFold(I)}));for(var L=0;L<p.length;L++){var O=p[L];if(x==O.start.row){O.addFold(h),s=!0;break}else if(m==O.end.row){if(O.addFold(h),s=!0,!h.sameRow){var M=p[L+1];if(M&&M.start.row==x){O.merge(M);break}}break}else if(x<=O.start.row)break}return s||(O=this.$addFoldLine(new f(this.$foldData,h))),this.$useWrapMode?this.$updateWrapData(O.start.row,O.start.row):this.$updateRowLengthCache(O.start.row,O.start.row),this.$modified=!0,this._signal("changeFold",{data:h,action:"add"}),h},this.addFolds=function(o){o.forEach(function(c){this.addFold(c)},this)},this.removeFold=function(o){var c=o.foldLine,p=c.start.row,s=c.end.row,h=this.$foldData,m=c.folds;if(m.length==1)h.splice(h.indexOf(c),1);else if(c.range.isEnd(o.end.row,o.end.column))m.pop(),c.end.row=m[m.length-1].end.row,c.end.column=m[m.length-1].end.column;else if(c.range.isStart(o.start.row,o.start.column))m.shift(),c.start.row=m[0].start.row,c.start.column=m[0].start.column;else if(o.sameRow)m.splice(m.indexOf(o),1);else{var y=c.split(o.start.row,o.start.column);m=y.folds,m.shift(),y.start.row=m[0].start.row,y.start.column=m[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(p,s):this.$updateRowLengthCache(p,s)),this.$modified=!0,this._signal("changeFold",{data:o,action:"remove"})},this.removeFolds=function(o){for(var c=[],p=0;p<o.length;p++)c.push(o[p]);c.forEach(function(s){this.removeFold(s)},this),this.$modified=!0},this.expandFold=function(o){this.removeFold(o),o.subFolds.forEach(function(c){o.restoreRange(c),this.addFold(c)},this),o.collapseChildren>0&&this.foldAll(o.start.row+1,o.end.row,o.collapseChildren-1),o.subFolds=[]},this.expandFolds=function(o){o.forEach(function(c){this.expandFold(c)},this)},this.unfold=function(o,c){var p,s;if(o==null)p=new u(0,0,this.getLength(),0),c==null&&(c=!0);else if(typeof o=="number")p=new u(o,0,o,this.getLine(o).length);else if("row"in o)p=u.fromPoints(o,o);else{if(Array.isArray(o))return s=[],o.forEach(function(m){s=s.concat(this.unfold(m))},this),s;p=o}s=this.getFoldsInRangeList(p);for(var h=s;s.length==1&&u.comparePoints(s[0].start,p.start)<0&&u.comparePoints(s[0].end,p.end)>0;)this.expandFolds(s),s=this.getFoldsInRangeList(p);if(c!=!1?this.removeFolds(s):this.expandFolds(s),h.length)return h},this.isRowFolded=function(o,c){return!!this.getFoldLine(o,c)},this.getRowFoldEnd=function(o,c){var p=this.getFoldLine(o,c);return p?p.end.row:o},this.getRowFoldStart=function(o,c){var p=this.getFoldLine(o,c);return p?p.start.row:o},this.getFoldDisplayLine=function(o,c,p,s,h){s==null&&(s=o.start.row),h==null&&(h=0),c==null&&(c=o.end.row),p==null&&(p=this.getLine(c).length);var m=this.doc,y="";return o.walk(function(x,T,S,_){if(!(T<s)){if(T==s){if(S<h)return;_=Math.max(h,_)}x!=null?y+=x:y+=m.getLine(T).substring(_,S)}},c,p),y},this.getDisplayLine=function(o,c,p,s){var h=this.getFoldLine(o);if(h)return this.getFoldDisplayLine(h,o,c,p,s);var m;return m=this.doc.getLine(o),m.substring(s||0,c||m.length)},this.$cloneFoldData=function(){var o=[];return o=this.$foldData.map(function(c){var p=c.folds.map(function(s){return s.clone()});return new f(o,p)}),o},this.toggleFold=function(o){var c=this.selection,p=c.getRange(),s,h;if(p.isEmpty()){var m=p.start;if(s=this.getFoldAt(m.row,m.column),s){this.expandFold(s);return}else if(o){var y=this.getFoldLine(m.row);y&&this.expandFolds(y.folds);return}else(h=this.findMatchingBracket(m))?p.comparePoint(h)==1?p.end=h:(p.start=h,p.start.column++,p.end.column--):(h=this.findMatchingBracket({row:m.row,column:m.column+1}))?(p.comparePoint(h)==1?p.end=h:p.start=h,p.start.column++):p=this.getCommentFoldRange(m.row,m.column)||p}else{var x=this.getFoldsInRange(p);if(o&&x.length){this.expandFolds(x);return}else x.length==1&&(s=x[0])}if(s||(s=this.getFoldAt(p.start.row,p.start.column)),s&&s.range.toString()==p.toString()){this.expandFold(s);return}var T="...";if(!p.isMultiLine()){if(T=this.getTextRange(p),T.length<4)return;T=T.trim().substring(0,2)+".."}this.addFold(T,p)},this.getCommentFoldRange=function(o,c,p){var s=new a(this,o,c),h=s.getCurrentToken(),m=h&&h.type;if(h&&/^comment|string/.test(m)){m=m.match(/comment|string/)[0],m=="comment"&&(m+="|doc-start|\\.doc");var y=new RegExp(m),x=new u;if(p!=1){do h=s.stepBackward();while(h&&y.test(h.type));h=s.stepForward()}x.start.row=s.getCurrentTokenRow(),x.start.column=s.getCurrentTokenColumn()+h.value.length,s=new a(this,o,c);var T=this.getState(s.$row);if(p!=-1){var S=-1;do if(h=s.stepForward(),S==-1){var _=this.getState(s.$row);T.toString()!==_.toString()&&(S=s.$row)}else if(s.$row>S)break;while(h&&y.test(h.type));h=s.stepBackward()}else h=s.getCurrentToken();return x.end.row=s.getCurrentTokenRow(),x.end.column=s.getCurrentTokenColumn(),x.start.row==x.end.row&&x.start.column>x.end.column?void 0:x}},this.foldAll=function(o,c,p,s){p==null&&(p=1e5);var h=this.foldWidgets;if(h){c=c||this.getLength(),o=o||0;for(var m=o;m<c;m++)if(h[m]==null&&(h[m]=this.getFoldWidget(m)),h[m]=="start"&&!(s&&!s(m))){var y=this.getFoldWidgetRange(m);y&&y.isMultiLine()&&y.end.row<=c&&y.start.row>=o&&(m=y.end.row,y.collapseChildren=p,this.addFold("...",y))}}},this.foldToLevel=function(o){for(this.foldAll();o-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var o=this;this.foldAll(null,null,null,function(c){for(var p=o.getTokens(c),s=0;s<p.length;s++){var h=p[s];if(!(h.type=="text"&&/^\s+$/.test(h.value)))return!!/comment/.test(h.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(o){if(!this.$foldStyles[o])throw new Error("invalid fold style: "+o+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=o){this.$foldStyle=o,o=="manual"&&this.unfold();var c=this.$foldMode;this.$setFolding(null),this.$setFolding(c)}},this.$setFolding=function(o){if(this.$foldMode!=o){if(this.$foldMode=o,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!o||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=o.getFoldWidget.bind(o,this,this.$foldStyle),this.getFoldWidgetRange=o.getFoldWidgetRange.bind(o,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)}},this.getParentFoldRangeData=function(o,c){var p=this.foldWidgets;if(!p||c&&p[o])return{};for(var s=o-1,h;s>=0;){var m=p[s];if(m==null&&(m=p[s]=this.getFoldWidget(s)),m=="start"){var y=this.getFoldWidgetRange(s);if(h||(h=y),y&&y.end.row>=o)break}s--}return{range:s!==-1&&y,firstRange:h}},this.onFoldWidgetClick=function(o,c){c instanceof g&&(c=c.domEvent);var p={children:c.shiftKey,all:c.ctrlKey||c.metaKey,siblings:c.altKey},s=this.$toggleFoldWidget(o,p);if(!s){var h=c.target||c.srcElement;h&&/ace_fold-widget/.test(h.className)&&(h.className+=" ace_invalid")}},this.$toggleFoldWidget=function(o,c){if(this.getFoldWidget){var p=this.getFoldWidget(o),s=this.getLine(o),h=p==="end"?-1:1,m=this.getFoldAt(o,h===-1?0:s.length,h);if(m)return c.children||c.all?this.removeFold(m):this.expandFold(m),m;var y=this.getFoldWidgetRange(o,!0);if(y&&!y.isMultiLine()&&(m=this.getFoldAt(y.start.row,y.start.column,1),m&&y.isEqual(m.range)))return this.removeFold(m),m;if(c.siblings){var x=this.getParentFoldRangeData(o);if(x.range)var T=x.range.start.row+1,S=x.range.end.row;this.foldAll(T,S,c.all?1e4:0)}else c.children?(S=y?y.end.row:this.getLength(),this.foldAll(o+1,S,c.all?1e4:0)):y&&(c.all&&(y.collapseChildren=1e4),this.addFold("...",y));return y}},this.toggleFoldWidget=function(o){var c=this.selection.getCursor().row;c=this.getRowFoldStart(c);var p=this.$toggleFoldWidget(c,{});if(!p){var s=this.getParentFoldRangeData(c,!0);if(p=s.range||s.firstRange,p){c=p.start.row;var h=this.getFoldAt(c,this.getLine(c).length,1);h?this.removeFold(h):this.addFold("...",p)}}},this.updateFoldWidgets=function(o){var c=o.start.row,p=o.end.row-c;if(p===0)this.foldWidgets[c]=null;else if(o.action=="remove")this.foldWidgets.splice(c,p+1,null);else{var s=Array(p+1);s.unshift(c,1),this.foldWidgets.splice.apply(this.foldWidgets,s)}},this.tokenizerUpdateFoldWidgets=function(o){var c=o.data;c.first!=c.last&&this.foldWidgets.length>c.first&&this.foldWidgets.splice(c.first,this.foldWidgets.length)}}r.Folding=i}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,r,d){var u=e("../token_iterator").TokenIterator,f=e("../range").Range;function v(){this.findMatchingBracket=function(a,g){if(a.column==0)return null;var i=g||this.getLine(a.row).charAt(a.column-1);if(i=="")return null;var o=i.match(/([\(\[\{])|([\)\]\}])/);return o?o[1]?this.$findClosingBracket(o[1],a):this.$findOpeningBracket(o[2],a):null},this.getBracketRange=function(a){var g=this.getLine(a.row),i=!0,o,c=g.charAt(a.column-1),p=c&&c.match(/([\(\[\{])|([\)\]\}])/);if(p||(c=g.charAt(a.column),a={row:a.row,column:a.column+1},p=c&&c.match(/([\(\[\{])|([\)\]\}])/),i=!1),!p)return null;if(p[1]){var s=this.$findClosingBracket(p[1],a);if(!s)return null;o=f.fromPoints(a,s),i||(o.end.column++,o.start.column--),o.cursor=o.end}else{var s=this.$findOpeningBracket(p[2],a);if(!s)return null;o=f.fromPoints(s,a),i||(o.start.column++,o.end.column--),o.cursor=o.start}return o},this.getMatchingBracketRanges=function(a,g){var i=this.getLine(a.row),o=/([\(\[\{])|([\)\]\}])/,c=!g&&i.charAt(a.column-1),p=c&&c.match(o);if(p||(c=(g===void 0||g)&&i.charAt(a.column),a={row:a.row,column:a.column+1},p=c&&c.match(o)),!p)return null;var s=new f(a.row,a.column-1,a.row,a.column),h=p[1]?this.$findClosingBracket(p[1],a):this.$findOpeningBracket(p[2],a);if(!h)return[s];var m=new f(h.row,h.column,h.row,h.column+1);return[s,m]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(a,g,i){var o=this.$brackets[a],c=1,p=new u(this,g.row,g.column),s=p.getCurrentToken();if(s||(s=p.stepForward()),!!s){i||(i=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var h=g.column-p.getCurrentTokenColumn()-2,m=s.value;;){for(;h>=0;){var y=m.charAt(h);if(y==o){if(c-=1,c==0)return{row:p.getCurrentTokenRow(),column:h+p.getCurrentTokenColumn()}}else y==a&&(c+=1);h-=1}do s=p.stepBackward();while(s&&!i.test(s.type));if(s==null)break;m=s.value,h=m.length-1}return null}},this.$findClosingBracket=function(a,g,i){var o=this.$brackets[a],c=1,p=new u(this,g.row,g.column),s=p.getCurrentToken();if(s||(s=p.stepForward()),!!s){i||(i=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var h=g.column-p.getCurrentTokenColumn();;){for(var m=s.value,y=m.length;h<y;){var x=m.charAt(h);if(x==o){if(c-=1,c==0)return{row:p.getCurrentTokenRow(),column:h+p.getCurrentTokenColumn()}}else x==a&&(c+=1);h+=1}do s=p.stepForward();while(s&&!i.test(s.type));if(s==null)break;h=0}return null}},this.getMatchingTags=function(a){var g=new u(this,a.row,a.column),i=this.$findTagName(g);if(i){var o=g.stepBackward();return o.value==="<"?this.$findClosingTag(g,i):this.$findOpeningTag(g,i)}},this.$findTagName=function(a){var g=a.getCurrentToken(),i=!1,o=!1;if(g&&g.type.indexOf("tag-name")===-1)do o?g=a.stepBackward():g=a.stepForward(),g&&(g.value==="/>"?o=!0:g.type.indexOf("tag-name")!==-1&&(i=!0));while(g&&!i);return g},this.$findClosingTag=function(a,g){var i,o=g.value,c=g.value,p=0,s=new f(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);g=a.stepForward();var h=new f(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+g.value.length),m=!1;do{if(i=g,i.type.indexOf("tag-close")!==-1&&!m){var y=new f(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);m=!0}if(g=a.stepForward(),g){if(g.value===">"&&!m){var y=new f(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);m=!0}if(g.type.indexOf("tag-name")!==-1){if(o=g.value,c===o){if(i.value==="<")p++;else if(i.value==="</"&&(p--,p<0)){a.stepBackward();var x=new f(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+2);g=a.stepForward();var T=new f(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+g.value.length);if(g.type.indexOf("tag-close")===-1&&(g=a.stepForward()),g&&g.value===">")var S=new f(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);else return}}}else if(c===o&&g.value==="/>"&&(p--,p<0))var x=new f(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+2),T=x,S=T,y=new f(h.end.row,h.end.column,h.end.row,h.end.column+1)}}while(g&&p>=0);if(s&&y&&x&&S&&h&&T)return{openTag:new f(s.start.row,s.start.column,y.end.row,y.end.column),closeTag:new f(x.start.row,x.start.column,S.end.row,S.end.column),openTagName:h,closeTagName:T}},this.$findOpeningTag=function(a,g){var i=a.getCurrentToken(),o=g.value,c=0,p=a.getCurrentTokenRow(),s=a.getCurrentTokenColumn(),h=s+2,m=new f(p,s,p,h);a.stepForward();var y=new f(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+g.value.length);if(g.type.indexOf("tag-close")===-1&&(g=a.stepForward()),!(!g||g.value!==">")){var x=new f(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);a.stepBackward(),a.stepBackward();do if(g=i,p=a.getCurrentTokenRow(),s=a.getCurrentTokenColumn(),h=s+g.value.length,i=a.stepBackward(),g){if(g.type.indexOf("tag-name")!==-1){if(o===g.value)if(i.value==="<"){if(c++,c>0){var T=new f(p,s,p,h),S=new f(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);do g=a.stepForward();while(g&&g.value!==">");var _=new f(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1)}}else i.value==="</"&&c--}else if(g.value==="/>"){for(var C=0,L=i;L;){if(L.type.indexOf("tag-name")!==-1&&L.value===o){c--;break}else if(L.value==="<")break;L=a.stepBackward(),C++}for(var O=0;O<C;O++)a.stepForward()}}while(i&&c<=0);if(S&&_&&m&&x&&T&&y)return{openTag:new f(S.start.row,S.start.column,_.end.row,_.end.column),closeTag:new f(m.start.row,m.start.column,x.end.row,x.end.column),openTagName:T,closeTagName:y}}}}r.BracketMatch=v}),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,d){var u=e("./lib/oop"),f=e("./lib/lang"),v=e("./bidihandler").BidiHandler,a=e("./config"),g=e("./lib/event_emitter").EventEmitter,i=e("./selection").Selection,o=e("./mode/text").Mode,c=e("./range").Range,p=e("./line_widgets").LineWidgets,s=e("./document").Document,h=e("./background_tokenizer").BackgroundTokenizer,m=e("./search_highlight").SearchHighlight,y=e("./undomanager").UndoManager,x=(function(){function F(N,E){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"+ ++F.$uid,this.$foldData.toString=function(){return this.join(`
200
+ `)},this.$gutterCustomWidgets={},this.bgTokenizer=new h(new o().getTokenizer(),this);var A=this;this.bgTokenizer.on("update",function(D){A._signal("tokenizerUpdate",D)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof N!="object"||!N.getLine)&&(N=new s(N)),this.setDocument(N),this.selection=new i(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new v(this),a.resetOptions(this),this.setMode(E),a._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return F.prototype.$initOperationListeners=function(){var N=this;this.curOp=null,this.on("change",function(){N.curOp||(N.startOperation(),N.curOp.selectionBefore=N.$lastSel),N.curOp.docChanged=!0},!0),this.on("changeSelection",function(){N.curOp||(N.startOperation(),N.curOp.selectionBefore=N.$lastSel),N.curOp.selectionChanged=!0},!0),this.$operationResetTimer=f.delayedCall(this.endOperation.bind(this,!0))},F.prototype.startOperation=function(N){if(this.curOp){if(!N||this.curOp.command)return;this.prevOp=this.curOp}N||(N={}),this.$operationResetTimer.schedule(),this.curOp={command:N.command||{},args:N.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",N)},F.prototype.endOperation=function(N){if(this.curOp){if(N&&N.returnValue===!1){this.curOp=null,this._signal("endOperation",N);return}if(N==!0&&this.curOp.command&&this.curOp.command.name=="mouse")return;var E=this.selection.toJSON();this.curOp.selectionAfter=E,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(E),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",N)}},F.prototype.setDocument=function(N){this.doc&&this.doc.off("change",this.$onChange),this.doc=N,N.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},F.prototype.getDocument=function(){return this.doc},Object.defineProperty(F.prototype,"widgetManager",{get:function(){var N=new p(this);return this.widgetManager=N,this.$editor&&N.attach(this.$editor),N},set:function(N){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:N})},enumerable:!1,configurable:!0}),F.prototype.$resetRowCache=function(N){if(!N){this.$docRowCache=[],this.$screenRowCache=[];return}var E=this.$docRowCache.length,A=this.$getRowCacheIndex(this.$docRowCache,N)+1;E>A&&(this.$docRowCache.splice(A,E),this.$screenRowCache.splice(A,E))},F.prototype.$getRowCacheIndex=function(N,E){for(var A=0,D=N.length-1;A<=D;){var j=A+D>>1,W=N[j];if(E>W)A=j+1;else if(E<W)D=j-1;else return j}return A-1},F.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},F.prototype.onChangeFold=function(N){var E=N.data;this.$resetRowCache(E.start.row)},F.prototype.onChange=function(N){this.$modified=!0,this.$bidiHandler.onChange(N),this.$resetRowCache(N.start.row);var E=this.$updateInternalDataOnChange(N);!this.$fromUndo&&this.$undoManager&&(E&&E.length&&(this.$undoManager.add({action:"removeFolds",folds:E},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(N,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(N),this._signal("change",N)},F.prototype.onSelectionChange=function(){this._signal("changeSelection")},F.prototype.setValue=function(N){this.doc.setValue(N),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},F.fromJSON=function(N){typeof N=="string"&&(N=JSON.parse(N));var E=new y;E.$undoStack=N.history.$undoStack,E.$redoStack=N.history.$redoStack,E.mark=N.history.mark,E.$rev=N.history.rev;var A=new F(N.value);return N.folds.forEach(function(D){A.addFold("...",c.fromPoints(D.start,D.end))}),A.setAnnotations(N.annotations),A.setBreakpoints(N.breakpoints),A.setMode(N.mode),A.setScrollLeft(N.scrollLeft),A.setScrollTop(N.scrollTop),A.setUndoManager(E),A.selection.fromJSON(N.selection),A},F.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(N){return N.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},F.prototype.toString=function(){return this.doc.getValue()},F.prototype.getSelection=function(){return this.selection},F.prototype.getState=function(N){return this.bgTokenizer.getState(N)},F.prototype.getTokens=function(N){return this.bgTokenizer.getTokens(N)},F.prototype.getTokenAt=function(N,E){var A=this.bgTokenizer.getTokens(N),D,j=0;if(E==null){var W=A.length-1;j=this.getLine(N).length}else for(var W=0;W<A.length&&(j+=A[W].value.length,!(j>=E));W++);return D=A[W],D?(D.index=W,D.start=j-D.value.length,D):null},F.prototype.setUndoManager=function(N){if(this.$undoManager=N,this.$informUndoManager&&this.$informUndoManager.cancel(),N){var E=this;N.addSession(this),this.$syncInformUndoManager=function(){E.$informUndoManager.cancel(),E.mergeUndoDeltas=!1},this.$informUndoManager=f.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},F.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},F.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},F.prototype.getTabString=function(){return this.getUseSoftTabs()?f.stringRepeat(" ",this.getTabSize()):" "},F.prototype.setUseSoftTabs=function(N){this.setOption("useSoftTabs",N)},F.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},F.prototype.setTabSize=function(N){this.setOption("tabSize",N)},F.prototype.getTabSize=function(){return this.$tabSize},F.prototype.isTabStop=function(N){return this.$useSoftTabs&&N.column%this.$tabSize===0},F.prototype.setNavigateWithinSoftTabs=function(N){this.setOption("navigateWithinSoftTabs",N)},F.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},F.prototype.setOverwrite=function(N){this.setOption("overwrite",N)},F.prototype.getOverwrite=function(){return this.$overwrite},F.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},F.prototype.addGutterDecoration=function(N,E){this.$decorations[N]||(this.$decorations[N]=""),this.$decorations[N]+=" "+E,this._signal("changeBreakpoint",{})},F.prototype.removeGutterCustomWidget=function(N){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(N)},F.prototype.addGutterCustomWidget=function(N,E){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(N,E)},F.prototype.removeGutterDecoration=function(N,E){this.$decorations[N]=(this.$decorations[N]||"").replace(" "+E,""),this._signal("changeBreakpoint",{})},F.prototype.getBreakpoints=function(){return this.$breakpoints},F.prototype.setBreakpoints=function(N){this.$breakpoints=[];for(var E=0;E<N.length;E++)this.$breakpoints[N[E]]="ace_breakpoint";this._signal("changeBreakpoint",{})},F.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},F.prototype.setBreakpoint=function(N,E){E===void 0&&(E="ace_breakpoint"),E?this.$breakpoints[N]=E:delete this.$breakpoints[N],this._signal("changeBreakpoint",{})},F.prototype.clearBreakpoint=function(N){delete this.$breakpoints[N],this._signal("changeBreakpoint",{})},F.prototype.addMarker=function(N,E,A,D){var j=this.$markerId++,W={range:N,type:A||"line",renderer:typeof A=="function"?A:null,clazz:E,inFront:!!D,id:j};return D?(this.$frontMarkers[j]=W,this._signal("changeFrontMarker")):(this.$backMarkers[j]=W,this._signal("changeBackMarker")),j},F.prototype.addDynamicMarker=function(N,E){if(N.update){var A=this.$markerId++;return N.id=A,N.inFront=!!E,E?(this.$frontMarkers[A]=N,this._signal("changeFrontMarker")):(this.$backMarkers[A]=N,this._signal("changeBackMarker")),N}},F.prototype.removeMarker=function(N){var E=this.$frontMarkers[N]||this.$backMarkers[N];if(E){var A=E.inFront?this.$frontMarkers:this.$backMarkers;delete A[N],this._signal(E.inFront?"changeFrontMarker":"changeBackMarker")}},F.prototype.getMarkers=function(N){return N?this.$frontMarkers:this.$backMarkers},F.prototype.highlight=function(N){if(!this.$searchHighlight){var E=new m(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(E)}this.$searchHighlight.setRegexp(N)},F.prototype.highlightLines=function(N,E,A,D){typeof E!="number"&&(A=E,E=N),A||(A="ace_step");var j=new c(N,0,E,1/0);return j.id=this.addMarker(j,A,"fullLine",D),j},F.prototype.setAnnotations=function(N){this.$annotations=N,this._signal("changeAnnotation",{})},F.prototype.getAnnotations=function(){return this.$annotations||[]},F.prototype.clearAnnotations=function(){this.setAnnotations([])},F.prototype.$detectNewLine=function(N){var E=N.match(/^.*?(\r?\n)/m);E?this.$autoNewLine=E[1]:this.$autoNewLine=`
201
+ `},F.prototype.getWordRange=function(N,E){var A=this.getLine(N),D=!1;if(E>0&&(D=!!A.charAt(E-1).match(this.tokenRe)),D||(D=!!A.charAt(E).match(this.tokenRe)),D)var j=this.tokenRe;else if(/^\s+$/.test(A.slice(E-1,E+1)))var j=/\s/;else var j=this.nonTokenRe;var W=E;if(W>0){do W--;while(W>=0&&A.charAt(W).match(j));W++}for(var V=E;V<A.length&&A.charAt(V).match(j);)V++;return new c(N,W,N,V)},F.prototype.getAWordRange=function(N,E){for(var A=this.getWordRange(N,E),D=this.getLine(A.end.row);D.charAt(A.end.column).match(/[ \t]/);)A.end.column+=1;return A},F.prototype.setNewLineMode=function(N){this.doc.setNewLineMode(N)},F.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},F.prototype.setUseWorker=function(N){this.setOption("useWorker",N)},F.prototype.getUseWorker=function(){return this.$useWorker},F.prototype.onReloadTokenizer=function(N){var E=N.data;this.bgTokenizer.start(E.first),this._signal("tokenizerUpdate",N)},F.prototype.setMode=function(N,E){if(N&&typeof N=="object"){if(N.getTokenizer)return this.$onChangeMode(N);var A=N,D=A.path}else D=N||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new o),this.$modes[D]&&!A){this.$onChangeMode(this.$modes[D]),E&&E();return}this.$modeId=D,a.loadModule(["mode",D],(function(j){if(!this.destroyed){if(this.$modeId!==D)return E&&E();this.$modes[D]&&!A?this.$onChangeMode(this.$modes[D]):j&&j.Mode&&(j=new j.Mode(A),A||(this.$modes[D]=j,j.$id=D),this.$onChangeMode(j)),E&&E()}}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},F.prototype.$onChangeMode=function(N,E){if(E||(this.$modeId=N.$id),this.$mode!==N){var A=this.$mode;this.$mode=N,this.$stopWorker(),this.$useWorker&&this.$startWorker();var D=N.getTokenizer();if(D.on!==void 0){var j=this.onReloadTokenizer.bind(this);D.on("update",j)}this.bgTokenizer.setTokenizer(D),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=N.tokenRe,this.nonTokenRe=N.nonTokenRe,E||(N.attachToSession&&N.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(N.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:A,mode:N}))}},F.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},F.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(N){a.warn("Could not load worker",N),this.$worker=null}},F.prototype.getMode=function(){return this.$mode},F.prototype.setScrollTop=function(N){this.$scrollTop===N||isNaN(N)||(this.$scrollTop=N,this._signal("changeScrollTop",N))},F.prototype.getScrollTop=function(){return this.$scrollTop},F.prototype.setScrollLeft=function(N){this.$scrollLeft===N||isNaN(N)||(this.$scrollLeft=N,this._signal("changeScrollLeft",N))},F.prototype.getScrollLeft=function(){return this.$scrollLeft},F.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},F.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var N=0;return this.lineWidgets.forEach(function(E){E&&E.screenWidth>N&&(N=E.screenWidth)}),this.lineWidgetWidth=N},F.prototype.$computeWidth=function(N){if(this.$modified||N){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var E=this.doc.getAllLines(),A=this.$rowLengthCache,D=0,j=0,W=this.$foldData[j],V=W?W.start.row:1/0,K=E.length,X=0;X<K;X++){if(X>V){if(X=W.end.row+1,X>=K)break;W=this.$foldData[j++],V=W?W.start.row:1/0}A[X]==null&&(A[X]=this.$getStringScreenWidth(E[X])[0]),A[X]>D&&(D=A[X])}this.screenWidth=D}},F.prototype.getLine=function(N){return this.doc.getLine(N)},F.prototype.getLines=function(N,E){return this.doc.getLines(N,E)},F.prototype.getLength=function(){return this.doc.getLength()},F.prototype.getTextRange=function(N){return this.doc.getTextRange(N||this.selection.getRange())},F.prototype.insert=function(N,E){return this.doc.insert(N,E)},F.prototype.remove=function(N){return this.doc.remove(N)},F.prototype.removeFullLines=function(N,E){return this.doc.removeFullLines(N,E)},F.prototype.undoChanges=function(N,E){if(N.length){this.$fromUndo=!0;for(var A=N.length-1;A!=-1;A--){var D=N[A];D.action=="insert"||D.action=="remove"?this.doc.revertDelta(D):D.folds&&this.addFolds(D.folds)}!E&&this.$undoSelect&&(N.selectionBefore?this.selection.fromJSON(N.selectionBefore):this.selection.setRange(this.$getUndoSelection(N,!0))),this.$fromUndo=!1}},F.prototype.redoChanges=function(N,E){if(N.length){this.$fromUndo=!0;for(var A=0;A<N.length;A++){var D=N[A];(D.action=="insert"||D.action=="remove")&&this.doc.$safeApplyDelta(D)}!E&&this.$undoSelect&&(N.selectionAfter?this.selection.fromJSON(N.selectionAfter):this.selection.setRange(this.$getUndoSelection(N,!1))),this.$fromUndo=!1}},F.prototype.setUndoSelect=function(N){this.$undoSelect=N},F.prototype.$getUndoSelection=function(N,E){function A(K){return E?K.action!=="insert":K.action==="insert"}for(var D,j,W=0;W<N.length;W++){var V=N[W];if(V.start){if(!D){A(V)?D=c.fromPoints(V.start,V.end):D=c.fromPoints(V.start,V.start);continue}A(V)?(j=V.start,D.compare(j.row,j.column)==-1&&D.setStart(j),j=V.end,D.compare(j.row,j.column)==1&&D.setEnd(j)):(j=V.start,D.compare(j.row,j.column)==-1&&(D=c.fromPoints(V.start,V.start)))}}return D},F.prototype.replace=function(N,E){return this.doc.replace(N,E)},F.prototype.moveText=function(N,E,A){var D=this.getTextRange(N),j=this.getFoldsInRange(N),W=c.fromPoints(E,E);if(!A){this.remove(N);var V=N.start.row-N.end.row,K=V?-N.end.column:N.start.column-N.end.column;K&&(W.start.row==N.end.row&&W.start.column>N.end.column&&(W.start.column+=K),W.end.row==N.end.row&&W.end.column>N.end.column&&(W.end.column+=K)),V&&W.start.row>=N.end.row&&(W.start.row+=V,W.end.row+=V)}if(W.end=this.insert(W.start,D),j.length){var X=N.start,oe=W.start,V=oe.row-X.row,K=oe.column-X.column;this.addFolds(j.map(function(ue){return ue=ue.clone(),ue.start.row==X.row&&(ue.start.column+=K),ue.end.row==X.row&&(ue.end.column+=K),ue.start.row+=V,ue.end.row+=V,ue}))}return W},F.prototype.indentRows=function(N,E,A){A=A.replace(/\t/g,this.getTabString());for(var D=N;D<=E;D++)this.doc.insertInLine({row:D,column:0},A)},F.prototype.outdentRows=function(N){for(var E=N.collapseRows(),A=new c(0,0,0,0),D=this.getTabSize(),j=E.start.row;j<=E.end.row;++j){var W=this.getLine(j);A.start.row=j,A.end.row=j;for(var V=0;V<D&&W.charAt(V)==" ";++V);V<D&&W.charAt(V)==" "?(A.start.column=V,A.end.column=V+1):(A.start.column=0,A.end.column=V),this.remove(A)}},F.prototype.$moveLines=function(N,E,A){if(N=this.getRowFoldStart(N),E=this.getRowFoldEnd(E),A<0){var D=this.getRowFoldStart(N+A);if(D<0)return 0;var j=D-N}else if(A>0){var D=this.getRowFoldEnd(E+A);if(D>this.doc.getLength()-1)return 0;var j=D-E}else{N=this.$clipRowToDocument(N),E=this.$clipRowToDocument(E);var j=E-N+1}var W=new c(N,0,E,Number.MAX_VALUE),V=this.getFoldsInRange(W).map(function(X){return X=X.clone(),X.start.row+=j,X.end.row+=j,X}),K=A==0?this.doc.getLines(N,E):this.doc.removeFullLines(N,E);return this.doc.insertFullLines(N+j,K),V.length&&this.addFolds(V),j},F.prototype.moveLinesUp=function(N,E){return this.$moveLines(N,E,-1)},F.prototype.moveLinesDown=function(N,E){return this.$moveLines(N,E,1)},F.prototype.duplicateLines=function(N,E){return this.$moveLines(N,E,0)},F.prototype.$clipRowToDocument=function(N){return Math.max(0,Math.min(N,this.doc.getLength()-1))},F.prototype.$clipColumnToRow=function(N,E){return E<0?0:Math.min(this.doc.getLine(N).length,E)},F.prototype.$clipPositionToDocument=function(N,E){if(E=Math.max(0,E),N<0)N=0,E=0;else{var A=this.doc.getLength();N>=A?(N=A-1,E=this.doc.getLine(A-1).length):E=Math.min(this.doc.getLine(N).length,E)}return{row:N,column:E}},F.prototype.$clipRangeToDocument=function(N){N.start.row<0?(N.start.row=0,N.start.column=0):N.start.column=this.$clipColumnToRow(N.start.row,N.start.column);var E=this.doc.getLength()-1;return N.end.row>E?(N.end.row=E,N.end.column=this.doc.getLine(E).length):N.end.column=this.$clipColumnToRow(N.end.row,N.end.column),N},F.prototype.setUseWrapMode=function(N){if(N!=this.$useWrapMode){if(this.$useWrapMode=N,this.$modified=!0,this.$resetRowCache(0),N){var E=this.getLength();this.$wrapData=Array(E),this.$updateWrapData(0,E-1)}this._signal("changeWrapMode")}},F.prototype.getUseWrapMode=function(){return this.$useWrapMode},F.prototype.setWrapLimitRange=function(N,E){(this.$wrapLimitRange.min!==N||this.$wrapLimitRange.max!==E)&&(this.$wrapLimitRange={min:N,max:E},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},F.prototype.adjustWrapLimit=function(N,E){var A=this.$wrapLimitRange;A.max<0&&(A={min:E,max:E});var D=this.$constrainWrapLimit(N,A.min,A.max);return D!=this.$wrapLimit&&D>1?(this.$wrapLimit=D,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},F.prototype.$constrainWrapLimit=function(N,E,A){return E&&(N=Math.max(E,N)),A&&(N=Math.min(A,N)),N},F.prototype.getWrapLimit=function(){return this.$wrapLimit},F.prototype.setWrapLimit=function(N){this.setWrapLimitRange(N,N)},F.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},F.prototype.$updateInternalDataOnChange=function(N){var E=this.$useWrapMode,A=N.action,D=N.start,j=N.end,W=D.row,V=j.row,K=V-W,X=null;if(this.$updating=!0,K!=0)if(A==="remove"){this[E?"$wrapData":"$rowLengthCache"].splice(W,K);var oe=this.$foldData;X=this.getFoldsInRange(N),this.removeFolds(X);var ee=this.getFoldLine(j.row),le=0;if(ee){ee.addRemoveChars(j.row,j.column,D.column-j.column),ee.shiftRow(-K);var ue=this.getFoldLine(W);ue&&ue!==ee&&(ue.merge(ee),ee=ue),le=oe.indexOf(ee)+1}for(le;le<oe.length;le++){var ee=oe[le];ee.start.row>=j.row&&ee.shiftRow(-K)}V=W}else{var ne=Array(K);ne.unshift(W,0);var fe=E?this.$wrapData:this.$rowLengthCache;fe.splice.apply(fe,ne);var oe=this.$foldData,ee=this.getFoldLine(W),le=0;if(ee){var Se=ee.range.compareInside(D.row,D.column);Se==0?(ee=ee.split(D.row,D.column),ee&&(ee.shiftRow(K),ee.addRemoveChars(V,0,j.column-D.column))):Se==-1&&(ee.addRemoveChars(W,0,j.column-D.column),ee.shiftRow(K)),le=oe.indexOf(ee)+1}for(le;le<oe.length;le++){var ee=oe[le];ee.start.row>=W&&ee.shiftRow(K)}}else{K=Math.abs(N.start.column-N.end.column),A==="remove"&&(X=this.getFoldsInRange(N),this.removeFolds(X),K=-K);var ee=this.getFoldLine(W);ee&&ee.addRemoveChars(W,D.column,K)}return E&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,E?this.$updateWrapData(W,V):this.$updateRowLengthCache(W,V),X},F.prototype.$updateRowLengthCache=function(N,E){this.$rowLengthCache[N]=null,this.$rowLengthCache[E]=null},F.prototype.$updateWrapData=function(N,E){var A=this.doc.getAllLines(),D=this.getTabSize(),j=this.$wrapData,W=this.$wrapLimit,V,K,X=N;for(E=Math.min(E,A.length-1);X<=E;)K=this.getFoldLine(X,K),K?(V=[],K.walk((function(oe,ee,le,ue){var ne;if(oe!=null){ne=this.$getDisplayTokens(oe,V.length),ne[0]=_;for(var fe=1;fe<ne.length;fe++)ne[fe]=C}else ne=this.$getDisplayTokens(A[ee].substring(ue,le),V.length);V=V.concat(ne)}).bind(this),K.end.row,A[K.end.row].length+1),j[K.start.row]=this.$computeWrapSplits(V,W,D),X=K.end.row+1):(V=this.$getDisplayTokens(A[X]),j[X]=this.$computeWrapSplits(V,W,D),X++)},F.prototype.$computeWrapSplits=function(N,E,A){if(N.length==0)return[];var D=[],j=N.length,W=0,V=0,K=this.$wrapAsCode,X=this.$indentedSoftWrap,oe=E<=Math.max(2*A,8)||X===!1?0:Math.floor(E/2);function ee(){var Se=0;if(oe===0)return Se;if(X)for(var Te=0;Te<N.length;Te++){var Re=N[Te];if(Re==O)Se+=1;else if(Re==M)Se+=A;else{if(Re==I)continue;break}}return K&&X!==!1&&(Se+=A),Math.min(Se,oe)}function le(Se){for(var Te=Se-W,Re=W;Re<Se;Re++){var Ve=N[Re];(Ve===12||Ve===2)&&(Te-=1)}D.length||(ue=ee(),D.indent=ue),V+=Te,D.push(V),W=Se}for(var ue=0;j-W>E-ue;){var ne=W+E-ue;if(N[ne-1]>=O&&N[ne]>=O){le(ne);continue}if(N[ne]==_||N[ne]==C){for(ne;ne!=W-1&&N[ne]!=_;ne--);if(ne>W){le(ne);continue}for(ne=W+E,ne;ne<N.length&&N[ne]==C;ne++);if(ne==N.length)break;le(ne);continue}for(var fe=Math.max(ne-(E-(E>>2)),W-1);ne>fe&&N[ne]<_;)ne--;if(K){for(;ne>fe&&N[ne]<_;)ne--;for(;ne>fe&&N[ne]==L;)ne--}else for(;ne>fe&&N[ne]<O;)ne--;if(ne>fe){le(++ne);continue}ne=W+E,N[ne]==S&&ne--,le(ne-ue)}return D},F.prototype.$getDisplayTokens=function(N,E){var A=[],D;E=E||0;for(var j=0;j<N.length;j++){var W=N.charCodeAt(j);if(W==9){D=this.getScreenTabSize(A.length+E),A.push(M);for(var V=1;V<D;V++)A.push(I)}else W==32?A.push(O):W>39&&W<48||W>57&&W<64?A.push(L):W>=4352&&B(W)?A.push(T,S):A.push(T)}return A},F.prototype.$getStringScreenWidth=function(N,E,A){if(E==0)return[0,0];E==null&&(E=1/0),A=A||0;var D,j;for(j=0;j<N.length&&(D=N.charCodeAt(j),D==9?A+=this.getScreenTabSize(A):D>=4352&&B(D)?A+=2:A+=1,!(A>E));j++);return[A,j]},F.prototype.getRowLength=function(N){var E=1;return this.lineWidgets&&(E+=this.lineWidgets[N]&&this.lineWidgets[N].rowCount||0),!this.$useWrapMode||!this.$wrapData[N]?E:this.$wrapData[N].length+E},F.prototype.getRowLineCount=function(N){return!this.$useWrapMode||!this.$wrapData[N]?1:this.$wrapData[N].length+1},F.prototype.getRowWrapIndent=function(N){if(this.$useWrapMode){var E=this.screenToDocumentPosition(N,Number.MAX_VALUE),A=this.$wrapData[E.row];return A.length&&A[0]<E.column?A.indent:0}else return 0},F.prototype.getScreenLastRowColumn=function(N){var E=this.screenToDocumentPosition(N,Number.MAX_VALUE);return this.documentToScreenColumn(E.row,E.column)},F.prototype.getDocumentLastRowColumn=function(N,E){var A=this.documentToScreenRow(N,E);return this.getScreenLastRowColumn(A)},F.prototype.getDocumentLastRowColumnPosition=function(N,E){var A=this.documentToScreenRow(N,E);return this.screenToDocumentPosition(A,Number.MAX_VALUE/10)},F.prototype.getRowSplitData=function(N){if(this.$useWrapMode)return this.$wrapData[N]},F.prototype.getScreenTabSize=function(N){return this.$tabSize-(N%this.$tabSize|0)},F.prototype.screenToDocumentRow=function(N,E){return this.screenToDocumentPosition(N,E).row},F.prototype.screenToDocumentColumn=function(N,E){return this.screenToDocumentPosition(N,E).column},F.prototype.screenToDocumentPosition=function(N,E,A){if(N<0)return{row:0,column:0};var D,le=0,j=0,W,ee=0,V=0,K=this.$screenRowCache,X=this.$getRowCacheIndex(K,N),oe=K.length;if(oe&&X>=0)var ee=K[X],le=this.$docRowCache[X],ue=N>K[oe-1];else var ue=!oe;for(var ne=this.getLength()-1,fe=this.getNextFoldLine(le),Se=fe?fe.start.row:1/0;ee<=N&&(V=this.getRowLength(le),!(ee+V>N||le>=ne));)ee+=V,le++,le>Se&&(le=fe.end.row+1,fe=this.getNextFoldLine(le,fe),Se=fe?fe.start.row:1/0),ue&&(this.$docRowCache.push(le),this.$screenRowCache.push(ee));if(fe&&fe.start.row<=le)D=this.getFoldDisplayLine(fe),le=fe.start.row;else{if(ee+V<=N||le>ne)return{row:ne,column:this.getLine(ne).length};D=this.getLine(le),fe=null}var Te=0,Re=Math.floor(N-ee);if(this.$useWrapMode){var Ve=this.$wrapData[le];Ve&&(W=Ve[Re],Re>0&&Ve.length&&(Te=Ve.indent,j=Ve[Re-1]||Ve[Ve.length-1],D=D.substring(j)))}return A!==void 0&&this.$bidiHandler.isBidiRow(ee+Re,le,Re)&&(E=this.$bidiHandler.offsetToCol(A)),j+=this.$getStringScreenWidth(D,E-Te)[1],this.$useWrapMode&&j>=W&&(j=W-1),fe?fe.idxToPosition(j):{row:le,column:j}},F.prototype.documentToScreenPosition=function(N,E){if(typeof E>"u")var A=this.$clipPositionToDocument(N.row,N.column);else A=this.$clipPositionToDocument(N,E);N=A.row,E=A.column;var ee=0,D=null,j=null;j=this.getFoldAt(N,E,1),j&&(N=j.start.row,E=j.start.column);var W,oe=0,V=this.$docRowCache,K=this.$getRowCacheIndex(V,N),X=V.length;if(X&&K>=0)var oe=V[K],ee=this.$screenRowCache[K],le=N>V[X-1];else var le=!X;for(var ue=this.getNextFoldLine(oe),ne=ue?ue.start.row:1/0;oe<N;){if(oe>=ne){if(W=ue.end.row+1,W>N)break;ue=this.getNextFoldLine(W,ue),ne=ue?ue.start.row:1/0}else W=oe+1;ee+=this.getRowLength(oe),oe=W,le&&(this.$docRowCache.push(oe),this.$screenRowCache.push(ee))}var fe="";ue&&oe>=ne?(fe=this.getFoldDisplayLine(ue,N,E),D=ue.start.row):(fe=this.getLine(N).substring(0,E),D=N);var Se=0;if(this.$useWrapMode){var Te=this.$wrapData[D];if(Te){for(var Re=0;fe.length>=Te[Re];)ee++,Re++;fe=fe.substring(Te[Re-1]||0,fe.length),Se=Re>0?Te.indent:0}}return this.lineWidgets&&this.lineWidgets[oe]&&this.lineWidgets[oe].rowsAbove&&(ee+=this.lineWidgets[oe].rowsAbove),{row:ee,column:Se+this.$getStringScreenWidth(fe)[0]}},F.prototype.documentToScreenColumn=function(N,E){return this.documentToScreenPosition(N,E).column},F.prototype.documentToScreenRow=function(N,E){return this.documentToScreenPosition(N,E).row},F.prototype.getScreenLength=function(){var N=0,E=null;if(this.$useWrapMode)for(var A=this.$wrapData.length,D=0,j=0,E=this.$foldData[j++],W=E?E.start.row:1/0;D<A;){var V=this.$wrapData[D];N+=V?V.length+1:1,D++,D>W&&(D=E.end.row+1,E=this.$foldData[j++],W=E?E.start.row:1/0)}else{N=this.getLength();for(var K=this.$foldData,j=0;j<K.length;j++)E=K[j],N-=E.end.row-E.start.row}return this.lineWidgets&&(N+=this.$getWidgetScreenLength()),N},F.prototype.$setFontMetrics=function(N){this.$enableVarChar&&(this.$getStringScreenWidth=function(E,A,D){if(A===0)return[0,0];A||(A=1/0),D=D||0;var j,W;for(W=0;W<E.length&&(j=E.charAt(W),j===" "?D+=this.getScreenTabSize(D):D+=N.getCharacterWidth(j),!(D>A));W++);return[D,W]})},F.prototype.getPrecedingCharacter=function(){var N=this.selection.getCursor();if(N.column===0)return N.row===0?"":this.doc.getNewLineCharacter();var E=this.getLine(N.row);return E[N.column-1]},F.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()},F})();x.$uid=0,x.prototype.$modes=a.$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=B,u.implement(x.prototype,g);var T=1,S=2,_=3,C=4,L=9,O=10,M=11,I=12;function B(F){return F<4352?!1:F>=4352&&F<=4447||F>=4515&&F<=4519||F>=4602&&F<=4607||F>=9001&&F<=9002||F>=11904&&F<=11929||F>=11931&&F<=12019||F>=12032&&F<=12245||F>=12272&&F<=12283||F>=12288&&F<=12350||F>=12353&&F<=12438||F>=12441&&F<=12543||F>=12549&&F<=12589||F>=12593&&F<=12686||F>=12688&&F<=12730||F>=12736&&F<=12771||F>=12784&&F<=12830||F>=12832&&F<=12871||F>=12880&&F<=13054||F>=13056&&F<=19903||F>=19968&&F<=42124||F>=42128&&F<=42182||F>=43360&&F<=43388||F>=44032&&F<=55203||F>=55216&&F<=55238||F>=55243&&F<=55291||F>=63744&&F<=64255||F>=65040&&F<=65049||F>=65072&&F<=65106||F>=65108&&F<=65126||F>=65128&&F<=65131||F>=65281&&F<=65376||F>=65504&&F<=65510}e("./edit_session/folding").Folding.call(x.prototype),e("./edit_session/bracket_match").BracketMatch.call(x.prototype),a.defineOptions(x.prototype,"session",{wrap:{set:function(F){if(!F||F=="off"?F=!1:F=="free"?F=!0:F=="printMargin"?F=-1:typeof F=="string"&&(F=parseInt(F,10)||!1),this.$wrap!=F)if(this.$wrap=F,!F)this.setUseWrapMode(!1);else{var N=typeof F=="number"?F:null;this.setWrapLimitRange(N,N),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(F){F=F=="auto"?this.$mode.type!="text":F!="text",F!=this.$wrapAsCode&&(this.$wrapAsCode=F,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(F){this.$useWorker=F,this.$stopWorker(),F&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(F){F=parseInt(F),F>0&&this.$tabSize!==F&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=F,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(F){this.setFoldStyle(F)},handlesSet:!0},overwrite:{set:function(F){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(F){this.doc.setNewLineMode(F)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(F){this.setMode(F)},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,d){var u=e("./lib/lang"),f=e("./lib/oop"),v=e("./range").Range,a=(function(){function c(){this.$options={}}return c.prototype.set=function(p){return f.mixin(this.$options,p),this},c.prototype.getOptions=function(){return u.copyObject(this.$options)},c.prototype.setOptions=function(p){this.$options=p},c.prototype.find=function(p){var s=this.$options,h=this.$matchIterator(p,s);if(!h)return!1;var m=null;return h.forEach(function(y,x,T,S){return m=new v(y,x,T,S),x==S&&s.start&&s.start.start&&s.skipCurrent!=!1&&m.isEqual(s.start)?(m=null,!1):!0}),m},c.prototype.findAll=function(p){var s=this.$options;if(!s.needle)return[];this.$assembleRegExp(s);var h=s.range,m=h?p.getLines(h.start.row,h.end.row):p.doc.getAllLines(),y=[],x=s.re;if(s.$isMultiLine){var T=x.length,S=m.length-T,_;e:for(var C=x.offset||0;C<=S;C++){for(var L=0;L<T;L++)if(m[C+L].search(x[L])==-1)continue e;var O=m[C],M=m[C+T-1],I=O.length-O.match(x[0])[0].length,B=M.match(x[T-1])[0].length;_&&_.end.row===C&&_.end.column>I||(y.push(_=new v(C,I,C+T-1,B)),T>2&&(C=C+T-2))}}else for(var F,N=0;N<m.length;N++)if(this.$isMultilineSearch(s)){var E=m.length-1;if(F=this.$multiLineForward(p,x,N,E),F){var A=F.endRow<=E?F.endRow-1:E;A>N&&(N=A),y.push(new v(F.startRow,F.startCol,F.endRow,F.endCol))}}else{F=u.getMatchOffsets(m[N],x);for(var L=0;L<F.length;L++){var D=F[L];y.push(new v(N,D.offset,N,D.offset+D.length))}}if(h){for(var j=h.start.column,W=h.end.column,N=0,L=y.length-1;N<L&&y[N].start.column<j&&y[N].start.row==0;)N++;for(var V=h.end.row-h.start.row;N<L&&y[L].end.column>W&&y[L].end.row==V;)L--;for(y=y.slice(N,L+1),N=0,L=y.length;N<L;N++)y[N].start.row+=h.start.row,y[N].end.row+=h.start.row}return y},c.prototype.parseReplaceString=function(p){for(var s={DollarSign:36,Ampersand:38,Digit0:48,Digit1:49,Digit9:57,Backslash:92,n:110,t:116},h="",m=0,y=p.length;m<y;m++){var x=p.charCodeAt(m);if(x===s.Backslash){if(m++,m>=y){h+="\\";break}var T=p.charCodeAt(m);switch(T){case s.Backslash:h+="\\";break;case s.n:h+=`
202
+ `;break;case s.t:h+=" ";break}continue}if(x===s.DollarSign){if(m++,m>=y){h+="$";break}var S=p.charCodeAt(m);if(S===s.DollarSign){h+="$$";continue}if(S===s.Digit0||S===s.Ampersand){h+="$&";continue}if(s.Digit1<=S&&S<=s.Digit9){h+="$"+p[m];continue}}h+=p[m]}return h||p},c.prototype.replace=function(p,s){var h=this.$options,m=this.$assembleRegExp(h);if(h.$isMultiLine)return s;if(m){var y=this.$isMultilineSearch(h);y&&(p=p.replace(/\r\n|\r|\n/g,`
203
+ `));var x=m.exec(p);if(!x||!y&&x[0].length!=p.length)return null;if(s=h.regExp?this.parseReplaceString(s):s.replace(/\$/g,"$$$$"),s=p.replace(m,s),h.preserveCase){s=s.split("");for(var T=Math.min(p.length,p.length);T--;){var S=p[T];S&&S.toLowerCase()!=S?s[T]=s[T].toUpperCase():s[T]=s[T].toLowerCase()}s=s.join("")}return s}},c.prototype.$assembleRegExp=function(p,s){if(p.needle instanceof RegExp)return p.re=p.needle;var h=p.needle;if(!p.needle)return p.re=!1;p.regExp||(h=u.escapeRegExp(h));var m=p.caseSensitive?"gm":"gmi";try{new RegExp(h,"u"),p.$supportsUnicodeFlag=!0,m+="u"}catch{p.$supportsUnicodeFlag=!1}if(p.wholeWord&&(h=g(h,p)),p.$isMultiLine=!s&&/[\n\r]/.test(h),p.$isMultiLine)return p.re=this.$assembleMultilineRegExp(h,m);try{var y=new RegExp(h,m)}catch{y=!1}return p.re=y},c.prototype.$assembleMultilineRegExp=function(p,s){for(var h=p.replace(/\r\n|\r|\n/g,`$
204
+ ^`).split(`
205
+ `),m=[],y=0;y<h.length;y++)try{m.push(new RegExp(h[y],s))}catch{return!1}return m},c.prototype.$isMultilineSearch=function(p){return p.re&&/\\r\\n|\\r|\\n/.test(p.re.source)&&p.regExp&&!p.$isMultiLine},c.prototype.$multiLineForward=function(p,s,h,m){for(var y,x=o(p,h),T=h;T<=m;){for(var S=0;S<x&&!(T>m);S++){var _=p.getLine(T++);y=y==null?_:y+`
206
+ `+_}var C=s.exec(y);if(s.lastIndex=0,C){var L=y.slice(0,C.index).split(`
207
+ `),O=C[0].split(`
208
+ `),M=h+L.length-1,I=L[L.length-1].length,B=M+O.length-1,F=O.length==1?I+O[0].length:O[O.length-1].length;return{startRow:M,startCol:I,endRow:B,endCol:F}}}return null},c.prototype.$multiLineBackward=function(p,s,h,m,y){for(var x,T=o(p,m),S=p.getLine(m).length-h,_=m;_>=y;){for(var C=0;C<T&&_>=y;C++){var L=p.getLine(_--);x=x==null?L:L+`
209
+ `+x}var O=i(x,s,S);if(O){var M=x.slice(0,O.index).split(`
210
+ `),I=O[0].split(`
211
+ `),B=_+M.length,F=M[M.length-1].length,N=B+I.length-1,E=I.length==1?F+I[0].length:I[I.length-1].length;return{startRow:B,startCol:F,endRow:N,endCol:E}}}return null},c.prototype.$matchIterator=function(p,s){var h=this.$assembleRegExp(s);if(!h)return!1;var m=this.$isMultilineSearch(s),y=this.$multiLineForward,x=this.$multiLineBackward,T=s.backwards==!0,S=s.skipCurrent!=!1,_=h.unicode,C=s.range,L=s.start;L||(L=C?C[T?"end":"start"]:p.selection.getRange()),L.start&&(L=L[S!=T?"end":"start"]);var O=C?C.start.row:0,M=C?C.end.row:p.getLength()-1;if(T)var I=function(N){var E=L.row;if(!F(E,L.column,N)){for(E--;E>=O;E--)if(F(E,Number.MAX_VALUE,N))return;if(s.wrap!=!1){for(E=M,O=L.row;E>=O;E--)if(F(E,Number.MAX_VALUE,N))return}}};else var I=function(N){var E=L.row;if(!F(E,L.column,N)){for(E=E+1;E<=M;E++)if(F(E,0,N))return;if(s.wrap!=!1){for(E=O,M=L.row;E<=M;E++)if(F(E,0,N))return}}};if(s.$isMultiLine)var B=h.length,F=function(N,E,A){var D=T?N-B+1:N;if(!(D<0||D+B>p.getLength())){var j=p.getLine(D),W=j.search(h[0]);if(!(!T&&W<E||W===-1)){for(var V=1;V<B;V++)if(j=p.getLine(D+V),j.search(h[V])==-1)return;var K=j.match(h[B-1])[0].length;if(!(T&&K>E)&&A(D,W,D+B-1,K))return!0}}};else if(T)var F=function(N,E,A){if(m){var D=x(p,h,E,N,O);if(!D)return!1;if(A(D.startRow,D.startCol,D.endRow,D.endCol))return!0}else{var j=p.getLine(N),W=[],V,K=0;for(h.lastIndex=0;V=h.exec(j);){var X=V[0].length;if(K=V.index,!X){if(K>=j.length)break;h.lastIndex=K+=u.skipEmptyMatch(j,K,_)}if(V.index+X>E)break;W.push(V.index,X)}for(var oe=W.length-1;oe>=0;oe-=2){var ee=W[oe-1],X=W[oe];if(A(N,ee,N,ee+X))return!0}}};else var F=function(N,E,A){if(h.lastIndex=E,m){var D=y(p,h,N,M);if(D){var j=D.endRow<=M?D.endRow-1:M;j>N&&(N=j)}if(!D)return!1;if(A(D.startRow,D.startCol,D.endRow,D.endCol))return!0}else for(var W=p.getLine(N),V,K;K=h.exec(W);){var X=K[0].length;if(V=K.index,A(N,V,N,V+X))return!0;if(!X&&(h.lastIndex=V+=u.skipEmptyMatch(W,V,_),V>=W.length))return!1}};return{forEach:I}},c})();function g(c,p){var s=u.supportsLookbehind();function h(T,S){S===void 0&&(S=!0);var _=s&&p.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return _.test(T)||p.regExp?s&&p.$supportsUnicodeFlag?S?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var m=Array.from(c),y=m[0],x=m[m.length-1];return h(y)+c+h(x,!1)}function i(c,p,s){for(var h=null,m=0;m<=c.length;){p.lastIndex=m;var y=p.exec(c);if(!y)break;var x=y.index+y[0].length;if(x>c.length-s)break;(!h||x>h.index+h[0].length)&&(h=y),m=y.index+1}return h}function o(c,p){var s=5e3,h={row:p,column:0},m=c.doc.positionToIndex(h),y=m+s,x=c.doc.indexToPosition(y),T=x.row;return T+1}r.Search=a}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,r,d){var u=this&&this.__extends||(function(){var c=function(p,s){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,m){h.__proto__=m}||function(h,m){for(var y in m)Object.prototype.hasOwnProperty.call(m,y)&&(h[y]=m[y])},c(p,s)};return function(p,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");c(p,s);function h(){this.constructor=p}p.prototype=s===null?Object.create(s):(h.prototype=s.prototype,new h)}})(),f=e("../lib/keys"),v=e("../lib/useragent"),a=f.KEY_MODS,g=(function(){function c(p,s){this.$init(p,s,!1)}return c.prototype.$init=function(p,s,h){this.platform=s||(v.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(p),this.$singleCommand=h},c.prototype.addCommand=function(p){this.commands[p.name]&&this.removeCommand(p),this.commands[p.name]=p,p.bindKey&&this._buildKeyHash(p)},c.prototype.removeCommand=function(p,s){var h=p&&(typeof p=="string"?p:p.name);p=this.commands[h],s||delete this.commands[h];var m=this.commandKeyBinding;for(var y in m){var x=m[y];if(x==p)delete m[y];else if(Array.isArray(x)){var T=x.indexOf(p);T!=-1&&(x.splice(T,1),x.length==1&&(m[y]=x[0]))}}},c.prototype.bindKey=function(p,s,h){if(typeof p=="object"&&p&&(h==null&&(h=p.position),p=p[this.platform]),!!p){if(typeof s=="function")return this.addCommand({exec:s,bindKey:p,name:s.name||p});p.split("|").forEach(function(m){var y="";if(m.indexOf(" ")!=-1){var x=m.split(/\s+/);m=x.pop(),x.forEach(function(_){var C=this.parseKeys(_),L=a[C.hashId]+C.key;y+=(y?" ":"")+L,this._addCommandToBinding(y,"chainKeys")},this),y+=" "}var T=this.parseKeys(m),S=a[T.hashId]+T.key;this._addCommandToBinding(y+S,s,h)},this)}},c.prototype._addCommandToBinding=function(p,s,h){var m=this.commandKeyBinding,y;if(!s)delete m[p];else if(!m[p]||this.$singleCommand)m[p]=s;else{Array.isArray(m[p])?(y=m[p].indexOf(s))!=-1&&m[p].splice(y,1):m[p]=[m[p]],typeof h!="number"&&(h=i(s));var x=m[p];for(y=0;y<x.length;y++){var T=x[y],S=i(T);if(S>h)break}x.splice(y,0,s)}},c.prototype.addCommands=function(p){p&&Object.keys(p).forEach(function(s){var h=p[s];if(h){if(typeof h=="string")return this.bindKey(h,s);typeof h=="function"&&(h={exec:h}),typeof h=="object"&&(h.name||(h.name=s),this.addCommand(h))}},this)},c.prototype.removeCommands=function(p){Object.keys(p).forEach(function(s){this.removeCommand(p[s])},this)},c.prototype.bindKeys=function(p){Object.keys(p).forEach(function(s){this.bindKey(s,p[s])},this)},c.prototype._buildKeyHash=function(p){this.bindKey(p.bindKey,p)},c.prototype.parseKeys=function(p){var s=p.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(S){return S}),h=s.pop(),m=f[h];if(f.FUNCTION_KEYS[m])h=f.FUNCTION_KEYS[m].toLowerCase();else if(s.length){if(s.length==1&&s[0]=="shift")return{key:h.toUpperCase(),hashId:-1}}else return{key:h,hashId:-1};for(var y=0,x=s.length;x--;){var T=f.KEY_MODS[s[x]];if(T==null)return typeof console<"u"&&console.error("invalid modifier "+s[x]+" in "+p),!1;y|=T}return{key:h,hashId:y}},c.prototype.findKeyCommand=function(p,s){var h=a[p]+s;return this.commandKeyBinding[h]},c.prototype.handleKeyboard=function(p,s,h,m){if(!(m<0)){var y=a[s]+h,x=this.commandKeyBinding[y];return p.$keyChain&&(p.$keyChain+=" "+y,x=this.commandKeyBinding[p.$keyChain]||x),x&&(x=="chainKeys"||x[x.length-1]=="chainKeys")?(p.$keyChain=p.$keyChain||y,{command:"null"}):(p.$keyChain&&((!s||s==4)&&h.length==1?p.$keyChain=p.$keyChain.slice(0,-y.length-1):(s==-1||m>0)&&(p.$keyChain="")),{command:x})}},c.prototype.getStatusText=function(p,s){return s.$keyChain||""},c})();function i(c){return typeof c=="object"&&c.bindKey&&c.bindKey.position||(c.isDefault?-100:0)}var o=(function(c){u(p,c);function p(s,h){var m=c.call(this,s,h)||this;return m.$singleCommand=!0,m}return p})(g);o.call=function(c,p,s){g.prototype.$init.call(c,p,s,!0)},g.call=function(c,p,s){g.prototype.$init.call(c,p,s,!1)},r.HashHandler=o,r.MultiHashHandler=g}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,r,d){var u=this&&this.__extends||(function(){var i=function(o,c){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,s){p.__proto__=s}||function(p,s){for(var h in s)Object.prototype.hasOwnProperty.call(s,h)&&(p[h]=s[h])},i(o,c)};return function(o,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");i(o,c);function p(){this.constructor=o}o.prototype=c===null?Object.create(c):(p.prototype=c.prototype,new p)}})(),f=e("../lib/oop"),v=e("../keyboard/hash_handler").MultiHashHandler,a=e("../lib/event_emitter").EventEmitter,g=(function(i){u(o,i);function o(c,p){var s=i.call(this,p,c)||this;return s.byName=s.commands,s.setDefaultHandler("exec",function(h){return h.args?h.command.exec(h.editor,h.args,h.event,!1):h.command.exec(h.editor,{},h.event,!0)}),s}return o.prototype.exec=function(c,p,s){if(Array.isArray(c)){for(var h=c.length;h--;)if(this.exec(c[h],p,s))return!0;return!1}typeof c=="string"&&(c=this.commands[c]);var m={editor:p,command:c,args:s};return this.canExecute(c,p)?(m.returnValue=this._emit("exec",m),this._signal("afterExec",m),m.returnValue!==!1):(this._signal("commandUnavailable",m),!1)},o.prototype.canExecute=function(c,p){return typeof c=="string"&&(c=this.commands[c]),!(!c||p&&p.$readOnly&&!c.readOnly||this.$checkCommandState!=!1&&c.isAvailable&&!c.isAvailable(p))},o.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(p){this.macro.push([p.command,p.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},o.prototype.replay=function(c){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(c);try{this.$inReplay=!0,this.macro.forEach(function(p){typeof p=="string"?this.exec(p,c):this.exec(p[0],c,p[1])},this)}finally{this.$inReplay=!1}}},o.prototype.trimMacro=function(c){return c.map(function(p){return typeof p[0]!="string"&&(p[0]=p[0].name),p[1]||(p=p[0]),p})},o})(v);f.implement(g.prototype,a),r.CommandManager=g}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,r,d){var u=e("../lib/lang"),f=e("../config"),v=e("../range").Range;function a(i,o){return{win:i,mac:o}}r.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:a("Ctrl-,","Command-,"),exec:function(i){f.loadModule("ace/ext/settings_menu",function(o){o.init(i),i.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:a("Alt-E","F4"),exec:function(i){f.loadModule("ace/ext/error_marker",function(o){o.showErrorMarker(i,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:a("Alt-Shift-E","Shift-F4"),exec:function(i){f.loadModule("ace/ext/error_marker",function(o){o.showErrorMarker(i,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:a("Ctrl-A","Command-A"),exec:function(i){i.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:a(null,"Ctrl-L"),exec:function(i){i.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:a("Ctrl-L","Command-L"),exec:function(i,o){typeof o=="number"&&!isNaN(o)&&i.gotoLine(o),i.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:a("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(i){i.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:a("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(i){i.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:a("F2","F2"),exec:function(i){i.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:a("Alt-F2","Alt-F2"),exec:function(i){i.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(i){i.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(i){i.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:a("Alt-0","Command-Option-0"),exec:function(i){i.session.foldAll(),i.session.unfold(i.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:a("Alt-Shift-0","Command-Option-Shift-0"),exec:function(i){i.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:a("Ctrl-K","Command-G"),exec:function(i){i.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:a("Ctrl-Shift-K","Command-Shift-G"),exec:function(i){i.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:a("Alt-K","Ctrl-G"),exec:function(i){i.selection.isEmpty()?i.selection.selectWord():i.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:a("Alt-Shift-K","Ctrl-Shift-G"),exec:function(i){i.selection.isEmpty()?i.selection.selectWord():i.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:a("Ctrl-F","Command-F"),exec:function(i){f.loadModule("ace/ext/searchbox",function(o){o.Search(i)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(i){i.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:a("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(i){i.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:a("Ctrl-Home","Command-Home|Command-Up"),exec:function(i){i.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:a("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(i){i.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:a("Up","Up|Ctrl-P"),exec:function(i,o){i.navigateUp(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:a("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(i){i.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:a("Ctrl-End","Command-End|Command-Down"),exec:function(i){i.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:a("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(i){i.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:a("Down","Down|Ctrl-N"),exec:function(i,o){i.navigateDown(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:a("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(i){i.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:a("Ctrl-Left","Option-Left"),exec:function(i){i.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:a("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(i){i.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:a("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(i){i.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:a("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(i){i.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:a("Left","Left|Ctrl-B"),exec:function(i,o){i.navigateLeft(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:a("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(i){i.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:a("Ctrl-Right","Option-Right"),exec:function(i){i.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:a("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(i){i.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:a("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(i){i.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:a("Shift-Right","Shift-Right"),exec:function(i){i.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:a("Right","Right|Ctrl-F"),exec:function(i,o){i.navigateRight(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(i){i.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:a(null,"Option-PageDown"),exec:function(i){i.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:a("PageDown","PageDown|Ctrl-V"),exec:function(i){i.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(i){i.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:a(null,"Option-PageUp"),exec:function(i){i.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(i){i.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:a("Ctrl-Up",null),exec:function(i){i.renderer.scrollBy(0,-2*i.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:a("Ctrl-Down",null),exec:function(i){i.renderer.scrollBy(0,2*i.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(i){i.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(i){i.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:a("Ctrl-Alt-E","Command-Option-E"),exec:function(i){i.commands.toggleRecording(i)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:a("Ctrl-Shift-E","Command-Shift-E"),exec:function(i){i.commands.replay(i)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:a("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(i){i.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:a("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(i){i.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:a("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(i){i.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:a(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(i){},readOnly:!0},{name:"cut",description:"Cut",exec:function(i){var o=i.$copyWithEmptySelection&&i.selection.isEmpty(),c=o?i.selection.getLineRange():i.selection.getRange();i._emit("cut",c),c.isEmpty()||i.session.remove(c),i.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(i,o){i.$handlePaste(o)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:a("Ctrl-D","Command-D"),exec:function(i){i.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:a("Ctrl-Shift-D","Command-Shift-D"),exec:function(i){i.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:a("Ctrl-Alt-S","Command-Alt-S"),exec:function(i){i.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:a("Ctrl-/","Command-/"),exec:function(i){i.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:a("Ctrl-Shift-/","Command-Shift-/"),exec:function(i){i.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:a("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(i){i.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:a("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(i){i.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:a("Ctrl-H","Command-Option-F"),exec:function(i){f.loadModule("ace/ext/searchbox",function(o){o.Search(i,!0)})}},{name:"undo",description:"Undo",bindKey:a("Ctrl-Z","Command-Z"),exec:function(i){i.undo()}},{name:"redo",description:"Redo",bindKey:a("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(i){i.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:a("Alt-Shift-Up","Command-Option-Up"),exec:function(i){i.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:a("Alt-Up","Option-Up"),exec:function(i){i.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:a("Alt-Shift-Down","Command-Option-Down"),exec:function(i){i.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:a("Alt-Down","Option-Down"),exec:function(i){i.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:a("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(i){i.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:a("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(i){i.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:a("Shift-Delete",null),exec:function(i){if(i.selection.isEmpty())i.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:a("Alt-Backspace","Command-Backspace"),exec:function(i){i.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:a("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(i){i.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:a("Ctrl-Shift-Backspace",null),exec:function(i){var o=i.selection.getRange();o.start.column=0,i.session.remove(o)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:a("Ctrl-Shift-Delete",null),exec:function(i){var o=i.selection.getRange();o.end.column=Number.MAX_VALUE,i.session.remove(o)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:a("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(i){i.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:a("Ctrl-Delete","Alt-Delete"),exec:function(i){i.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:a("Shift-Tab","Shift-Tab"),exec:function(i){i.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:a("Tab","Tab"),exec:function(i){i.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:a("Ctrl-[","Ctrl-["),exec:function(i){i.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:a("Ctrl-]","Ctrl-]"),exec:function(i){i.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(i,o){i.insert(o)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(i,o){i.insert(u.stringRepeat(o.text||"",o.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:a(null,"Ctrl-O"),exec:function(i){i.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:a("Alt-Shift-X","Ctrl-T"),exec:function(i){i.transposeLetters()},multiSelectAction:function(i){i.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:a("Ctrl-U","Ctrl-U"),exec:function(i){i.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:a("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(i){i.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:a(null,null),exec:function(i){i.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:a("Ctrl-Shift-L","Command-Shift-L"),exec:function(i){var o=i.selection.getRange();o.start.column=o.end.column=0,o.end.row++,i.selection.setRange(o,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:a("Ctrl+F3","F3"),exec:function(i){i.openLink()}},{name:"joinlines",description:"Join lines",bindKey:a(null,null),exec:function(i){for(var o=i.selection.isBackwards(),c=o?i.selection.getSelectionLead():i.selection.getSelectionAnchor(),p=o?i.selection.getSelectionAnchor():i.selection.getSelectionLead(),s=i.session.doc.getLine(c.row).length,h=i.session.doc.getTextRange(i.selection.getRange()),m=h.replace(/\n\s*/," ").length,y=i.session.doc.getLine(c.row),x=c.row+1;x<=p.row+1;x++){var T=u.stringTrimLeft(u.stringTrimRight(i.session.doc.getLine(x)));T.length!==0&&(T=" "+T),y+=T}p.row+1<i.session.doc.getLength()-1&&(y+=i.session.doc.getNewLineCharacter()),i.clearSelection(),i.session.doc.replace(new v(c.row,0,p.row+2,0),y),m>0?(i.selection.moveCursorTo(c.row,c.column),i.selection.selectTo(c.row,c.column+m)):(s=i.session.doc.getLine(c.row).length>s?s+1:s,i.selection.moveCursorTo(c.row,s))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:a(null,null),exec:function(i){var o=i.session.doc.getLength()-1,c=i.session.doc.getLine(o).length,p=i.selection.rangeList.ranges,s=[];p.length<1&&(p=[i.selection.getRange()]);for(var h=0;h<p.length;h++)h==p.length-1&&(p[h].end.row===o&&p[h].end.column===c||s.push(new v(p[h].end.row,p[h].end.column,o,c))),h===0?p[h].start.row===0&&p[h].start.column===0||s.push(new v(0,0,p[h].start.row,p[h].start.column)):s.push(new v(p[h-1].end.row,p[h-1].end.column,p[h].start.row,p[h].start.column));i.exitMultiSelectMode(),i.clearSelection();for(var h=0;h<s.length;h++)i.selection.addRange(s[h],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(i){i.selection.clearSelection(),i.navigateLineEnd(),i.insert(`
212
+ `)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(i){i.selection.clearSelection();var o=i.getCursorPosition();i.selection.moveTo(o.row-1,Number.MAX_VALUE),i.insert(`
213
+ `),o.row===0&&i.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(i){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),i.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:a("F1","F1"),exec:function(i){i.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:a(null,null),exec:function(i){i.prompt({$type:"modes"})},readOnly:!0}];for(var g=1;g<9;g++)r.commands.push({name:"foldToLevel"+g,description:"Fold To Level "+g,level:g,exec:function(i){i.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys"],function(e,r,d){var u=e("../lib/keys"),f=(function(){function a(g){this.editor=g,this.gutterLayer=g.renderer.$gutterLayer,this.element=g.renderer.$gutter,this.lines=g.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=this.editor.$mouseHandler.$tooltip}return a.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))},a.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))},a.prototype.$onGutterKeyDown=function(g){if(this.annotationTooltip.isOpen){g.preventDefault(),g.keyCode===u.escape&&this.annotationTooltip.hide();return}if(g.target===this.element){if(g.keyCode!=u.enter)return;g.preventDefault();var i=this.editor.getCursorPosition().row;this.editor.isRowVisible(i)||this.editor.scrollToLine(i,!0,!0),setTimeout((function(){var o=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),c=this.$findNearestFoldLaneWidget(o),p=this.$findNearestAnnotation(o);if(!(c===null&&p===null)){var s=this.$findClosestNumber(c,p,o);if(s===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=p,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}}}).bind(this),10);return}this.$handleGutterKeyboardInteraction(g),setTimeout((function(){this.editor._signal("gutterkeydown",new v(g,this))}).bind(this),10)},a.prototype.$handleGutterKeyboardInteraction=function(g){if(g.keyCode===u.tab){g.preventDefault();return}if(g.keyCode===u.escape){g.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(g.keyCode===u.up){switch(g.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(g.keyCode===u.down){switch(g.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(g.keyCode===u.left){g.preventDefault(),this.$switchLane("annotation");return}if(g.keyCode===u.right){g.preventDefault(),this.$switchLane("fold");return}if(g.keyCode===u.enter||g.keyCode===u.space){switch(g.preventDefault(),this.activeLane){case"fold":var i=this.$rowIndexToRow(this.activeRowIndex),o=this.editor.session.$gutterCustomWidgets[i];if(o)o.callbacks&&o.callbacks.onClick&&o.callbacks.onClick(g,i);else if(this.gutterLayer.session.foldWidgets[i]==="start"){this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),g),setTimeout((function(){this.$rowIndexToRow(this.activeRowIndex)!==i&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(i),this.$focusFoldWidget(this.activeRowIndex))}).bind(this),10);break}else if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex)),this.annotationTooltip.$fromKeyboard=!0;break}return}},a.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()},a.prototype.$isFoldWidgetVisible=function(g){var i=this.editor.isRowFullyVisible(this.$rowIndexToRow(g)),o=this.$getFoldWidget(g).style.display!=="none";return i&&o},a.prototype.$isCustomWidgetVisible=function(g){var i=this.editor.isRowFullyVisible(this.$rowIndexToRow(g)),o=!!this.$getCustomWidget(g);return i&&o},a.prototype.$isAnnotationVisible=function(g){var i=this.editor.isRowFullyVisible(this.$rowIndexToRow(g)),o=this.$getAnnotation(g).style.display!=="none";return i&&o},a.prototype.$getFoldWidget=function(g){var i=this.lines.get(g),o=i.element;return o.childNodes[1]},a.prototype.$getCustomWidget=function(g){var i=this.lines.get(g),o=i.element;return o.childNodes[3]},a.prototype.$getAnnotation=function(g){var i=this.lines.get(g),o=i.element;return o.childNodes[2]},a.prototype.$findNearestFoldLaneWidget=function(g){if(this.$isCustomWidgetVisible(g)||this.$isFoldWidgetVisible(g))return g;for(var i=0;g-i>0||g+i<this.lines.getLength()-1;){if(i++,g-i>=0&&this.$isCustomWidgetVisible(g-i))return g-i;if(g+i<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(g+i))return g+i;if(g-i>=0&&this.$isFoldWidgetVisible(g-i))return g-i;if(g+i<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(g+i))return g+i}return null},a.prototype.$findNearestAnnotation=function(g){if(this.$isAnnotationVisible(g))return g;for(var i=0;g-i>0||g+i<this.lines.getLength()-1;){if(i++,g-i>=0&&this.$isAnnotationVisible(g-i))return g-i;if(g+i<=this.lines.getLength()-1&&this.$isAnnotationVisible(g+i))return g+i}return null},a.prototype.$focusFoldWidget=function(g){if(g!=null){var i=this.$getFoldWidget(g);i.classList.add(this.editor.renderer.keyboardFocusClassName),i.focus()}},a.prototype.$focusCustomWidget=function(g){if(g!=null){var i=this.$getCustomWidget(g);i&&(i.classList.add(this.editor.renderer.keyboardFocusClassName),i.focus())}},a.prototype.$focusAnnotation=function(g){if(g!=null){var i=this.$getAnnotation(g);i.classList.add(this.editor.renderer.keyboardFocusClassName),i.focus()}},a.prototype.$blurFoldWidget=function(g){var i=this.$getFoldWidget(g);i.classList.remove(this.editor.renderer.keyboardFocusClassName),i.blur()},a.prototype.$blurCustomWidget=function(g){var i=this.$getCustomWidget(g);i&&(i.classList.remove(this.editor.renderer.keyboardFocusClassName),i.blur())},a.prototype.$blurAnnotation=function(g){var i=this.$getAnnotation(g);i.classList.remove(this.editor.renderer.keyboardFocusClassName),i.blur()},a.prototype.$moveFoldWidgetUp=function(){for(var g=this.activeRowIndex;g>0;)if(g--,this.$isFoldWidgetVisible(g)||this.$isCustomWidgetVisible(g)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=g,this.$isFoldWidgetVisible(g)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},a.prototype.$moveFoldWidgetDown=function(){for(var g=this.activeRowIndex;g<this.lines.getLength()-1;)if(g++,this.$isFoldWidgetVisible(g)||this.$isCustomWidgetVisible(g)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=g,this.$isFoldWidgetVisible(g)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},a.prototype.$moveAnnotationUp=function(){for(var g=this.activeRowIndex;g>0;)if(g--,this.$isAnnotationVisible(g)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=g,this.$focusAnnotation(this.activeRowIndex);return}},a.prototype.$moveAnnotationDown=function(){for(var g=this.activeRowIndex;g<this.lines.getLength()-1;)if(g++,this.$isAnnotationVisible(g)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=g,this.$focusAnnotation(this.activeRowIndex);return}},a.prototype.$findClosestNumber=function(g,i,o){return g===null?i:i===null||Math.abs(o-g)<=Math.abs(o-i)?g:i},a.prototype.$switchLane=function(g){switch(g){case"annotation":if(this.activeLane==="annotation")break;var i=this.$findNearestAnnotation(this.activeRowIndex);if(i==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=i,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var o=this.$findNearestFoldLaneWidget(this.activeRowIndex);if(o===null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=o,this.$isCustomWidgetVisible(o)?this.$focusCustomWidget(this.activeRowIndex):this.$focusFoldWidget(this.activeRowIndex);break}},a.prototype.$rowIndexToRow=function(g){var i=this.lines.get(g);return i?i.row:null},a.prototype.$rowToRowIndex=function(g){for(var i=0;i<this.lines.getLength();i++){var o=this.lines.get(i);if(o.row==g)return i}return null},a})();r.GutterKeyboardHandler=f;var v=(function(){function a(g,i){this.gutterKeyboardHandler=i,this.domEvent=g}return a.prototype.getKey=function(){return u.keyCodeToString(this.domEvent.keyCode)},a.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},a.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},a.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},a})();r.GutterKeyboardEvent=v}),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,d){var u=this&&this.__values||function(E){var A=typeof Symbol=="function"&&Symbol.iterator,D=A&&E[A],j=0;if(D)return D.call(E);if(E&&typeof E.length=="number")return{next:function(){return E&&j>=E.length&&(E=void 0),{value:E&&E[j++],done:!E}}};throw new TypeError(A?"Object is not iterable.":"Symbol.iterator is not defined.")},f=e("./lib/oop"),v=e("./lib/dom"),a=e("./lib/lang"),g=e("./lib/useragent"),i=e("./keyboard/textinput").TextInput,o=e("./mouse/mouse_handler").MouseHandler,c=e("./mouse/fold_handler").FoldHandler,p=e("./keyboard/keybinding").KeyBinding,s=e("./edit_session").EditSession,h=e("./search").Search,m=e("./range").Range,y=e("./lib/event_emitter").EventEmitter,x=e("./commands/command_manager").CommandManager,T=e("./commands/default_commands").commands,S=e("./config"),_=e("./token_iterator").TokenIterator,C=e("./keyboard/gutter_handler").GutterKeyboardHandler,L=e("./config").nls,O=e("./clipboard"),M=e("./lib/keys"),I=e("./lib/event"),B=e("./tooltip").HoverTooltip,F=(function(){function E(A,D,j){this.id="editor"+ ++E.$uid,this.session,this.$toDestroy=[];var W=A.getContainerElement();this.container=W,this.renderer=A,this.commands=new x(g.isMac?"mac":"win",T),typeof document=="object"&&(this.textInput=new i(A.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new o(this),new c(this)),this.keyBinding=new p(this),this.$search=new h().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=a.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(V,K){K._$emitInputEvent.schedule(31)}),this.setSession(D||j&&j.session||new s("")),S.resetOptions(this),j&&this.setOptions(j),S._signal("editor",this)}return E.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},E.prototype.startOperation=function(A){this.session.startOperation(A)},E.prototype.endOperation=function(A){this.session.endOperation(A)},E.prototype.onStartOperation=function(A){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,A||(this.previousCommand=null)},E.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 D=this.curOp.command,j=D&&D.scrollIntoView;if(j){switch(j){case"center-animate":j="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var W=this.selection.getRange(),V=this.renderer.layerConfig;(W.start.row>=V.lastRow||W.end.row<=V.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}j=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},E.prototype.$historyTracker=function(A){if(this.$mergeUndoDeltas){var D=this.prevOp,j=this.$mergeableCommands,W=D.command&&A.command.name==D.command.name;if(A.command.name=="insertstring"){var V=A.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),W=W&&this.mergeNextCommand&&(!/\s/.test(V)||/\s/.test(D.args)),this.mergeNextCommand=!0}else W=W&&j.indexOf(A.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(W=!1),W?this.session.mergeUndoDeltas=!0:j.indexOf(A.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},E.prototype.setKeyboardHandler=function(A,D){if(A&&typeof A=="string"&&A!="ace"){this.$keybindingId=A;var j=this;S.loadModule(["keybinding",A],function(W){j.$keybindingId==A&&j.keyBinding.setKeyboardHandler(W&&W.handler),D&&D()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(A),D&&D()},E.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},E.prototype.setSession=function(A){if(this.session!=A){this.curOp&&this.endOperation(),this.curOp={};var D=this.session;if(D){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange),this.session.off("startOperation",this.$onStartOperation),this.session.off("endOperation",this.$onEndOperation);var j=this.session.getSelection();j.off("changeCursor",this.$onCursorChange),j.off("changeSelection",this.$onSelectionChange)}this.session=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:D}),this.curOp=null,D&&D._signal("changeEditor",{oldEditor:this}),D&&(D.$editor=null),A&&A._signal("changeEditor",{editor:this}),A&&(A.$editor=this),A&&!A.destroyed&&A.bgTokenizer.scheduleStart()}},E.prototype.getSession=function(){return this.session},E.prototype.setValue=function(A,D){return this.session.doc.setValue(A),D?D==1?this.navigateFileEnd():D==-1&&this.navigateFileStart():this.selectAll(),A},E.prototype.getValue=function(){return this.session.getValue()},E.prototype.getSelection=function(){return this.selection},E.prototype.resize=function(A){this.renderer.onResize(A)},E.prototype.setTheme=function(A,D){this.renderer.setTheme(A,D)},E.prototype.getTheme=function(){return this.renderer.getTheme()},E.prototype.setStyle=function(A,D){this.renderer.setStyle(A,D)},E.prototype.unsetStyle=function(A){this.renderer.unsetStyle(A)},E.prototype.getFontSize=function(){return this.getOption("fontSize")||v.computedStyle(this.container).fontSize},E.prototype.setFontSize=function(A){this.setOption("fontSize",A)},E.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var A=this;this.$highlightPending=!0,setTimeout(function(){A.$highlightPending=!1;var D=A.session;if(!(!D||D.destroyed)){D.$bracketHighlight&&(D.$bracketHighlight.markerIds.forEach(function(ue){D.removeMarker(ue)}),D.$bracketHighlight=null);var j=A.getCursorPosition(),W=A.getKeyboardHandler(),V=W&&W.$getDirectionForHighlight&&W.$getDirectionForHighlight(A),K=D.getMatchingBracketRanges(j,V);if(!K){var X=new _(D,j.row,j.column),oe=X.getCurrentToken();if(oe&&/\b(?:tag-open|tag-name)/.test(oe.type)){var ee=D.getMatchingTags(j);ee&&(K=[ee.openTagName.isEmpty()?ee.openTag:ee.openTagName,ee.closeTagName.isEmpty()?ee.closeTag:ee.closeTagName])}}if(!K&&D.$mode.getMatching&&(K=D.$mode.getMatching(A.session)),!K){A.getHighlightIndentGuides()&&A.renderer.$textLayer.$highlightIndentGuide();return}var le="ace_bracket";Array.isArray(K)?K.length==1&&(le="ace_error_bracket"):K=[K],K.length==2&&(m.comparePoints(K[0].end,K[1].start)==0?K=[m.fromPoints(K[0].start,K[1].end)]:m.comparePoints(K[0].start,K[1].end)==0&&(K=[m.fromPoints(K[1].start,K[0].end)])),D.$bracketHighlight={ranges:K,markerIds:K.map(function(ue){return D.addMarker(ue,le,"text")})},A.getHighlightIndentGuides()&&A.renderer.$textLayer.$highlightIndentGuide()}},50)}},E.prototype.focus=function(){this.textInput.focus()},E.prototype.isFocused=function(){return this.textInput.isFocused()},E.prototype.blur=function(){this.textInput.blur()},E.prototype.onFocus=function(A){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",A))},E.prototype.onBlur=function(A){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",A))},E.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},E.prototype.onDocumentChange=function(A){var D=this.session.$useWrapMode,j=A.start.row==A.end.row?A.end.row:1/0;this.renderer.updateLines(A.start.row,j,D),this._signal("change",A),this.$cursorChange()},E.prototype.onTokenizerUpdate=function(A){var D=A.data;this.renderer.updateLines(D.first,D.last)},E.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},E.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},E.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},E.prototype.$updateHighlightActiveLine=function(){var A=this.getSession(),D;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(D=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(D=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(D=!1)),A.$highlightLineMarker&&!D)A.removeMarker(A.$highlightLineMarker.id),A.$highlightLineMarker=null;else if(!A.$highlightLineMarker&&D){var j=new m(D.row,D.column,D.row,1/0);j.id=A.addMarker(j,"ace_active-line","screenLine"),A.$highlightLineMarker=j}else D&&(A.$highlightLineMarker.start.row=D.row,A.$highlightLineMarker.end.row=D.row,A.$highlightLineMarker.start.column=D.column,A._signal("changeBackMarker"))},E.prototype.onSelectionChange=function(A){var D=this.session;if(D.$selectionMarker&&D.removeMarker(D.$selectionMarker),D.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var j=this.selection.getRange(),W=this.getSelectionStyle();D.$selectionMarker=D.addMarker(j,"ace_selection",W)}var V=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(V),this._signal("changeSelection")},E.prototype.$getSelectionHighLightRegexp=function(){var A=this.session,D=this.getSelectionRange();if(!(D.isEmpty()||D.isMultiLine())){var j=D.start.column,W=D.end.column,V=A.getLine(D.start.row),K=V.substring(j,W);if(!(K.length>5e3||!/[\w\d]/.test(K))){var X=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:K}),oe=V.substring(j-1,W+1);if(X.test(oe))return X}}},E.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},E.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},E.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},E.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},E.prototype.onChangeMode=function(A){this.renderer.updateText(),this._emit("changeMode",A)},E.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},E.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},E.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},E.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},E.prototype.getCopyText=function(){var A=this.getSelectedText(),D=this.session.doc.getNewLineCharacter(),j=!1;if(!A&&this.$copyWithEmptySelection){j=!0;for(var W=this.selection.getAllRanges(),V=0;V<W.length;V++){var K=W[V];V&&W[V-1].start.row==K.start.row||(A+=this.session.getLine(K.start.row)+D)}}var X={text:A};return this._signal("copy",X),O.lineMode=j?X.text:!1,X.text},E.prototype.onCopy=function(){this.commands.exec("copy",this)},E.prototype.onCut=function(){this.commands.exec("cut",this)},E.prototype.onPaste=function(A,D){var j={text:A,event:D};this.commands.exec("paste",this,j)},E.prototype.$handlePaste=function(A){typeof A=="string"&&(A={text:A}),this._signal("paste",A);var D=A.text,j=D===O.lineMode,W=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)j?W.insert({row:this.selection.lead.row,column:0},D):this.insert(D);else if(j)this.selection.rangeList.ranges.forEach(function(le){W.insert({row:le.start.row,column:0},D)});else{var V=D.split(/\r\n|\r|\n/),K=this.selection.rangeList.ranges,X=V.length==2&&(!V[0]||!V[1]);if(V.length!=K.length||X)return this.commands.exec("insertstring",this,D);for(var oe=K.length;oe--;){var ee=K[oe];ee.isEmpty()||W.remove(ee),W.insert(ee.start,V[oe])}}},E.prototype.execCommand=function(A,D){return this.commands.exec(A,this,D)},E.prototype.insert=function(A,D){var j=this.session,W=j.getMode(),V=this.getCursorPosition();if(this.getBehavioursEnabled()&&!D){var K=W.transformAction(j.getState(V.row),"insertion",this,j,A);K&&(A!==K.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),A=K.text)}if(A==" "&&(A=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&A.indexOf(`
214
+ `)==-1){var X=m.fromPoints(V,V);X.end.column+=A.length,this.session.remove(X)}}else{var X=this.getSelectionRange();V=this.session.remove(X),this.clearSelection()}if(A==`
215
+ `||A==`\r
216
+ `){var ue=j.getLine(V.row);if(V.column>ue.search(/\S|$/)){var oe=ue.substr(V.column).search(/\S|$/);j.doc.removeInLine(V.row,V.column,V.column+oe)}}this.clearSelection();var ee=V.column,le=j.getState(V.row),ue=j.getLine(V.row),ne=W.checkOutdent(le,ue,A);if(j.insert(V,A),K&&K.selection&&(K.selection.length==2?this.selection.setSelectionRange(new m(V.row,ee+K.selection[0],V.row,ee+K.selection[1])):this.selection.setSelectionRange(new m(V.row+K.selection[0],K.selection[1],V.row+K.selection[2],K.selection[3]))),this.$enableAutoIndent){if(j.getDocument().isNewLine(A)){var fe=W.getNextLineIndent(le,ue.slice(0,V.column),j.getTabString());j.insert({row:V.row+1,column:0},fe)}ne&&W.autoOutdent(le,j,V.row)}},E.prototype.autoIndent=function(){for(var A=this.session,D=A.getMode(),j=this.selection.isEmpty()?[new m(0,0,A.doc.getLength()-1,0)]:this.selection.getAllRanges(),W="",V="",K="",X=A.getTabString(),oe=0;oe<j.length;oe++)for(var ee=j[oe].start.row,le=j[oe].end.row,ue=ee;ue<=le;ue++){ue>0&&(W=A.getState(ue-1),V=A.getLine(ue-1),K=D.getNextLineIndent(W,V,X));var ne=A.getLine(ue),fe=D.$getIndent(ne);if(K!==fe){if(fe.length>0){var Se=new m(ue,0,ue,fe.length);A.remove(Se)}K.length>0&&A.insert({row:ue,column:0},K)}D.autoOutdent(W,A,ue)}},E.prototype.onTextInput=function(A,D){if(!D)return this.keyBinding.onTextInput(A);this.startOperation({command:{name:"insertstring"}});var j=this.applyComposition.bind(this,A,D);this.selection.rangeCount?this.forEachSelection(j):j(),this.endOperation()},E.prototype.applyComposition=function(A,D){if(D.extendLeft||D.extendRight){var j=this.selection.getRange();j.start.column-=D.extendLeft,j.end.column+=D.extendRight,j.start.column<0&&(j.start.row--,j.start.column+=this.session.getLine(j.start.row).length+1),this.selection.setRange(j),!A&&!j.isEmpty()&&this.remove()}if((A||!this.selection.isEmpty())&&this.insert(A,!0),D.restoreStart||D.restoreEnd){var j=this.selection.getRange();j.start.column-=D.restoreStart,j.end.column-=D.restoreEnd,this.selection.setRange(j)}},E.prototype.onCommandKey=function(A,D,j){return this.keyBinding.onCommandKey(A,D,j)},E.prototype.setOverwrite=function(A){this.session.setOverwrite(A)},E.prototype.getOverwrite=function(){return this.session.getOverwrite()},E.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},E.prototype.setScrollSpeed=function(A){this.setOption("scrollSpeed",A)},E.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},E.prototype.setDragDelay=function(A){this.setOption("dragDelay",A)},E.prototype.getDragDelay=function(){return this.getOption("dragDelay")},E.prototype.setSelectionStyle=function(A){this.setOption("selectionStyle",A)},E.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},E.prototype.setHighlightActiveLine=function(A){this.setOption("highlightActiveLine",A)},E.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},E.prototype.setHighlightGutterLine=function(A){this.setOption("highlightGutterLine",A)},E.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},E.prototype.setHighlightSelectedWord=function(A){this.setOption("highlightSelectedWord",A)},E.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},E.prototype.setAnimatedScroll=function(A){this.renderer.setAnimatedScroll(A)},E.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},E.prototype.setShowInvisibles=function(A){this.renderer.setShowInvisibles(A)},E.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},E.prototype.setDisplayIndentGuides=function(A){this.renderer.setDisplayIndentGuides(A)},E.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},E.prototype.setHighlightIndentGuides=function(A){this.renderer.setHighlightIndentGuides(A)},E.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},E.prototype.setShowPrintMargin=function(A){this.renderer.setShowPrintMargin(A)},E.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},E.prototype.setPrintMarginColumn=function(A){this.renderer.setPrintMarginColumn(A)},E.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},E.prototype.setReadOnly=function(A){this.setOption("readOnly",A)},E.prototype.getReadOnly=function(){return this.getOption("readOnly")},E.prototype.setBehavioursEnabled=function(A){this.setOption("behavioursEnabled",A)},E.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},E.prototype.setWrapBehavioursEnabled=function(A){this.setOption("wrapBehavioursEnabled",A)},E.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},E.prototype.setShowFoldWidgets=function(A){this.setOption("showFoldWidgets",A)},E.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},E.prototype.setFadeFoldWidgets=function(A){this.setOption("fadeFoldWidgets",A)},E.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},E.prototype.remove=function(A){this.selection.isEmpty()&&(A=="left"?this.selection.selectLeft():this.selection.selectRight());var D=this.getSelectionRange();if(this.getBehavioursEnabled()){var j=this.session,W=j.getState(D.start.row),V=j.getMode().transformAction(W,"deletion",this,j,D);if(D.end.column===0){var K=j.getTextRange(D);if(K[K.length-1]==`
217
+ `){var X=j.getLine(D.end.row);/^\s+$/.test(X)&&(D.end.column=X.length)}}V&&(D=V)}this.session.remove(D),this.clearSelection()},E.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},E.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},E.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},E.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()},E.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var A=this.getCursorPosition();this.insert(`
218
+ `),this.moveCursorToPosition(A)},E.prototype.setGhostText=function(A,D){this.renderer.setGhostText(A,D)},E.prototype.removeGhostText=function(){this.renderer.removeGhostText()},E.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var A=this.getCursorPosition(),D=A.column;if(D!==0){var j=this.session.getLine(A.row),W,V;D<j.length?(W=j.charAt(D)+j.charAt(D-1),V=new m(A.row,D-1,A.row,D+1)):(W=j.charAt(D-1)+j.charAt(D-2),V=new m(A.row,D-2,A.row,D)),this.session.replace(V,W),this.session.selection.moveToPosition(V.end)}}},E.prototype.toLowerCase=function(){var A=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var D=this.getSelectionRange(),j=this.session.getTextRange(D);this.session.replace(D,j.toLowerCase()),this.selection.setSelectionRange(A)},E.prototype.toUpperCase=function(){var A=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var D=this.getSelectionRange(),j=this.session.getTextRange(D);this.session.replace(D,j.toUpperCase()),this.selection.setSelectionRange(A)},E.prototype.indent=function(){var A=this.session,D=this.getSelectionRange();if(D.start.row<D.end.row){var j=this.$getSelectedRows();A.indentRows(j.first,j.last," ");return}else if(D.start.column<D.end.column){var W=A.getTextRange(D);if(!/^\s+$/.test(W)){var j=this.$getSelectedRows();A.indentRows(j.first,j.last," ");return}}var V=A.getLine(D.start.row),K=D.start,X=A.getTabSize(),oe=A.documentToScreenColumn(K.row,K.column);if(this.session.getUseSoftTabs())var ee=X-oe%X,le=a.stringRepeat(" ",ee);else{for(var ee=oe%X;V[D.start.column-1]==" "&&ee;)D.start.column--,ee--;this.selection.setSelectionRange(D),le=" "}return this.insert(le)},E.prototype.blockIndent=function(){var A=this.$getSelectedRows();this.session.indentRows(A.first,A.last," ")},E.prototype.blockOutdent=function(){var A=this.session.getSelection();this.session.outdentRows(A.getRange())},E.prototype.sortLines=function(){for(var A=this.$getSelectedRows(),D=this.session,j=[],W=A.first;W<=A.last;W++)j.push(D.getLine(W));j.sort(function(X,oe){return X.toLowerCase()<oe.toLowerCase()?-1:X.toLowerCase()>oe.toLowerCase()?1:0});for(var V=new m(0,0,0,0),W=A.first;W<=A.last;W++){var K=D.getLine(W);V.start.row=W,V.end.row=W,V.end.column=K.length,D.replace(V,j[W-A.first])}},E.prototype.toggleCommentLines=function(){var A=this.session.getState(this.getCursorPosition().row),D=this.$getSelectedRows();this.session.getMode().toggleCommentLines(A,this.session,D.first,D.last)},E.prototype.toggleBlockComment=function(){var A=this.getCursorPosition(),D=this.session.getState(A.row),j=this.getSelectionRange();this.session.getMode().toggleBlockComment(D,this.session,j,A)},E.prototype.getNumberAt=function(A,D){var j=/[\-]?[0-9]+(?:\.[0-9]+)?/g;j.lastIndex=0;for(var W=this.session.getLine(A);j.lastIndex<D;){var V=j.exec(W);if(V.index<=D&&V.index+V[0].length>=D){var K={value:V[0],start:V.index,end:V.index+V[0].length};return K}}return null},E.prototype.modifyNumber=function(A){var D=this.selection.getCursor().row,j=this.selection.getCursor().column,W=new m(D,j-1,D,j),V=this.session.getTextRange(W);if(!isNaN(parseFloat(V))&&isFinite(V)){var K=this.getNumberAt(D,j);if(K){var X=K.value.indexOf(".")>=0?K.start+K.value.indexOf(".")+1:K.end,oe=K.start+K.value.length-X,ee=parseFloat(K.value);ee*=Math.pow(10,oe),X!==K.end&&j<X?A*=Math.pow(10,K.end-j-1):A*=Math.pow(10,K.end-j),ee+=A,ee/=Math.pow(10,oe);var le=ee.toFixed(oe),ue=new m(D,K.start,D,K.end);this.session.replace(ue,le),this.moveCursorTo(D,Math.max(K.start+1,j+le.length-K.value.length))}}else this.toggleWord()},E.prototype.toggleWord=function(){var A=this.selection.getCursor().row,D=this.selection.getCursor().column;this.selection.selectWord();var j=this.getSelectedText(),W=this.selection.getWordRange().start.column,V=j.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),K=D-W-1;K<0&&(K=0);var X=0,oe=0,ee=this;j.match(/[A-Za-z0-9_]+/)&&V.forEach(function(Ue,Xe){oe=X+Ue.length,K>=X&&K<=oe&&(j=Ue,ee.selection.clearSelection(),ee.moveCursorTo(A,X+W),ee.selection.selectTo(A,oe+W)),X=oe});for(var le=this.$toggleWordPairs,ue,ne=0;ne<le.length;ne++)for(var fe=le[ne],Se=0;Se<=1;Se++){var Te=+!Se,Re=j.match(new RegExp("^\\s?_?("+a.escapeRegExp(fe[Se])+")\\s?$","i"));if(Re){var Ve=j.match(new RegExp("([_]|^|\\s)("+a.escapeRegExp(Re[1])+")($|\\s)","g"));Ve&&(ue=j.replace(new RegExp(a.escapeRegExp(fe[Se]),"i"),function(Ue){var Xe=fe[Te];return Ue.toUpperCase()==Ue?Xe=Xe.toUpperCase():Ue.charAt(0).toUpperCase()==Ue.charAt(0)&&(Xe=Xe.substr(0,0)+fe[Te].charAt(0).toUpperCase()+Xe.substr(1)),Xe}),this.insert(ue),ue="")}}},E.prototype.findLinkAt=function(A,D){var j,W,V=this.session.getLine(A),K=V.split(/((?:https?|ftp):\/\/[\S]+)/),X=D;X<0&&(X=0);var oe=0,ee=0,le;try{for(var ue=u(K),ne=ue.next();!ne.done;ne=ue.next()){var fe=ne.value;if(ee=oe+fe.length,X>=oe&&X<=ee&&fe.match(/((?:https?|ftp):\/\/[\S]+)/)){le=fe.replace(/[\s:.,'";}\]]+$/,"");break}oe=ee}}catch(Se){j={error:Se}}finally{try{ne&&!ne.done&&(W=ue.return)&&W.call(ue)}finally{if(j)throw j.error}}return le},E.prototype.openLink=function(){var A=this.selection.getCursor(),D=this.findLinkAt(A.row,A.column);return D&&window.open(D,"_blank"),D!=null},E.prototype.removeLines=function(){var A=this.$getSelectedRows();this.session.removeFullLines(A.first,A.last),this.clearSelection()},E.prototype.duplicateSelection=function(){var A=this.selection,D=this.session,j=A.getRange(),W=A.isBackwards();if(j.isEmpty()){var V=j.start.row;D.duplicateLines(V,V)}else{var K=W?j.start:j.end,X=D.insert(K,D.getTextRange(j));j.start=K,j.end=X,A.setSelectionRange(j,W)}},E.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},E.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},E.prototype.moveText=function(A,D,j){return this.session.moveText(A,D,j)},E.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},E.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},E.prototype.$moveLines=function(A,D){var j,W,V=this.selection;if(!V.inMultiSelectMode||this.inVirtualSelectionMode){var K=V.toOrientedRange();j=this.$getSelectedRows(K),W=this.session.$moveLines(j.first,j.last,D?0:A),D&&A==-1&&(W=0),K.moveBy(W,0),V.fromOrientedRange(K)}else{var X=V.rangeList.ranges;V.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var oe=0,ee=0,le=X.length,ue=0;ue<le;ue++){var ne=ue;X[ue].moveBy(oe,0),j=this.$getSelectedRows(X[ue]);for(var fe=j.first,Se=j.last;++ue<le;){ee&&X[ue].moveBy(ee,0);var Te=this.$getSelectedRows(X[ue]);if(D&&Te.first!=Se||!D&&Te.first>Se+1)break;Se=Te.last}for(ue--,oe=this.session.$moveLines(fe,Se,D?0:A),D&&A==-1&&(ne=ue+1);ne<=ue;)X[ne].moveBy(oe,0),ne++;D||(oe=0),ee+=oe}V.fromOrientedRange(V.ranges[0]),V.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},E.prototype.$getSelectedRows=function(A){return A=(A||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(A.start.row),last:this.session.getRowFoldEnd(A.end.row)}},E.prototype.onCompositionStart=function(A){this.renderer.showComposition(A)},E.prototype.onCompositionUpdate=function(A){this.renderer.setCompositionText(A)},E.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},E.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},E.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},E.prototype.isRowVisible=function(A){return A>=this.getFirstVisibleRow()&&A<=this.getLastVisibleRow()},E.prototype.isRowFullyVisible=function(A){return A>=this.renderer.getFirstFullyVisibleRow()&&A<=this.renderer.getLastFullyVisibleRow()},E.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},E.prototype.$moveByPage=function(A,D){var j=this.renderer,W=this.renderer.layerConfig,V=A*Math.floor(W.height/W.lineHeight);D===!0?this.selection.$moveSelection(function(){this.moveCursorBy(V,0)}):D===!1&&(this.selection.moveCursorBy(V,0),this.selection.clearSelection());var K=j.scrollTop;j.scrollBy(0,V*W.lineHeight),D!=null&&j.scrollCursorIntoView(null,.5),j.animateScrolling(K)},E.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},E.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},E.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},E.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},E.prototype.scrollPageDown=function(){this.$moveByPage(1)},E.prototype.scrollPageUp=function(){this.$moveByPage(-1)},E.prototype.scrollToRow=function(A){this.renderer.scrollToRow(A)},E.prototype.scrollToLine=function(A,D,j,W){this.renderer.scrollToLine(A,D,j,W)},E.prototype.centerSelection=function(){var A=this.getSelectionRange(),D={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(D,.5)},E.prototype.getCursorPosition=function(){return this.selection.getCursor()},E.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},E.prototype.getSelectionRange=function(){return this.selection.getRange()},E.prototype.selectAll=function(){this.selection.selectAll()},E.prototype.clearSelection=function(){this.selection.clearSelection()},E.prototype.moveCursorTo=function(A,D){this.selection.moveCursorTo(A,D)},E.prototype.moveCursorToPosition=function(A){this.selection.moveCursorToPosition(A)},E.prototype.jumpToMatching=function(A,D){var j=this.getCursorPosition(),W=new _(this.session,j.row,j.column),V=W.getCurrentToken(),K=0;V&&V.type.indexOf("tag-name")!==-1&&(V=W.stepBackward());var X=V||W.stepForward();if(X){var oe,ee=!1,le={},ue=j.column-X.start,ne,fe={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(X.value.match(/[{}()\[\]]/g)){for(;ue<X.value.length&&!ee;ue++)if(fe[X.value[ue]])switch(ne=fe[X.value[ue]]+"."+X.type.replace("rparen","lparen"),isNaN(le[ne])&&(le[ne]=0),X.value[ue]){case"(":case"[":case"{":le[ne]++;break;case")":case"]":case"}":le[ne]--,le[ne]===-1&&(oe="bracket",ee=!0);break}}else X.type.indexOf("tag-name")!==-1&&(isNaN(le[X.value])&&(le[X.value]=0),V.value==="<"&&K>1?le[X.value]++:V.value==="</"&&le[X.value]--,le[X.value]===-1&&(oe="tag",ee=!0));ee||(V=X,K++,X=W.stepForward(),ue=0)}while(X&&!ee);if(oe){var Se,Te;if(oe==="bracket")Se=this.session.getBracketRange(j),Se||(Se=new m(W.getCurrentTokenRow(),W.getCurrentTokenColumn()+ue-1,W.getCurrentTokenRow(),W.getCurrentTokenColumn()+ue-1),Te=Se.start,(D||Te.row===j.row&&Math.abs(Te.column-j.column)<2)&&(Se=this.session.getBracketRange(Te)));else if(oe==="tag"){if(!X||X.type.indexOf("tag-name")===-1)return;if(Se=new m(W.getCurrentTokenRow(),W.getCurrentTokenColumn()-2,W.getCurrentTokenRow(),W.getCurrentTokenColumn()-2),Se.compare(j.row,j.column)===0){var Re=this.session.getMatchingTags(j);Re&&(Re.openTag.contains(j.row,j.column)?(Se=Re.closeTag,Te=Se.start):(Se=Re.openTag,Re.closeTag.start.row===j.row&&Re.closeTag.start.column===j.column?Te=Se.end:Te=Se.start))}Te=Te||Se.start}Te=Se&&Se.cursor||Te,Te&&(A?Se&&D?this.selection.setRange(Se):Se&&Se.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(Te.row,Te.column):this.selection.moveTo(Te.row,Te.column))}}},E.prototype.gotoLine=function(A,D,j){this.selection.clearSelection(),this.session.unfold({row:A-1,column:D||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(A-1,D||0),this.isRowFullyVisible(A-1)||this.scrollToLine(A-1,!0,j)},E.prototype.navigateTo=function(A,D){this.selection.moveTo(A,D)},E.prototype.navigateUp=function(A){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var D=this.selection.anchor.getPosition();return this.moveCursorToPosition(D)}this.selection.clearSelection(),this.selection.moveCursorBy(-A||-1,0)},E.prototype.navigateDown=function(A){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var D=this.selection.anchor.getPosition();return this.moveCursorToPosition(D)}this.selection.clearSelection(),this.selection.moveCursorBy(A||1,0)},E.prototype.navigateLeft=function(A){if(this.selection.isEmpty())for(A=A||1;A--;)this.selection.moveCursorLeft();else{var D=this.getSelectionRange().start;this.moveCursorToPosition(D)}this.clearSelection()},E.prototype.navigateRight=function(A){if(this.selection.isEmpty())for(A=A||1;A--;)this.selection.moveCursorRight();else{var D=this.getSelectionRange().end;this.moveCursorToPosition(D)}this.clearSelection()},E.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},E.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},E.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},E.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},E.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},E.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},E.prototype.replace=function(A,D){D&&this.$search.set(D);var j=this.$search.find(this.session),W=0;return j&&(this.$tryReplace(j,A)&&(W=1),this.selection.setSelectionRange(j),this.renderer.scrollSelectionIntoView(j.start,j.end)),W},E.prototype.replaceAll=function(A,D){D&&this.$search.set(D);var j=this.$search.findAll(this.session),W=0;if(!j.length)return W;var V=this.getSelectionRange();this.selection.moveTo(0,0);for(var K=j.length-1;K>=0;--K)this.$tryReplace(j[K],A)&&W++;return this.selection.setSelectionRange(V),W},E.prototype.$tryReplace=function(A,D){var j=this.session.getTextRange(A);return D=this.$search.replace(j,D),D!==null?(A.end=this.session.replace(A,D),A):null},E.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},E.prototype.find=function(A,D,j){D||(D={}),typeof A=="string"||A instanceof RegExp?D.needle=A:typeof A=="object"&&f.mixin(D,A);var W=this.selection.getRange();D.needle==null&&(A=this.session.getTextRange(W)||this.$search.$options.needle,A||(W=this.session.getWordRange(W.start.row,W.start.column),A=this.session.getTextRange(W)),this.$search.set({needle:A})),this.$search.set(D),D.start||this.$search.set({start:W});var V=this.$search.find(this.session);if(D.preventScroll)return V;if(V)return this.revealRange(V,j),V;D.backwards?W.start=W.end:W.end=W.start,this.selection.setRange(W)},E.prototype.findNext=function(A,D){this.find({skipCurrent:!0,backwards:!1},A,D)},E.prototype.findPrevious=function(A,D){this.find(A,{skipCurrent:!0,backwards:!0},D)},E.prototype.revealRange=function(A,D){this.session.unfold(A),this.selection.setSelectionRange(A);var j=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(A.start,A.end,.5),D!==!1&&this.renderer.animateScrolling(j)},E.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},E.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},E.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()},E.prototype.setAutoScrollEditorIntoView=function(A){if(A){var D,j=this,W=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var V=this.$scrollAnchor;V.style.cssText="position:absolute",this.container.insertBefore(V,this.container.firstChild);var K=this.on("changeSelection",function(){W=!0}),X=this.renderer.on("beforeRender",function(){W&&(D=j.renderer.container.getBoundingClientRect())}),oe=this.renderer.on("afterRender",function(){if(W&&D&&(j.isFocused()||j.searchBox&&j.searchBox.isFocused())){var ee=j.renderer,le=ee.$cursorLayer.$pixelPos,ue=ee.layerConfig,ne=le.top-ue.offset;le.top>=0&&ne+D.top<0?W=!0:le.top<ue.height&&le.top+D.top+ue.lineHeight>window.innerHeight?W=!1:W=null,W!=null&&(V.style.top=ne+"px",V.style.left=le.left+"px",V.style.height=ue.lineHeight+"px",V.scrollIntoView(W)),W=D=null}});this.setAutoScrollEditorIntoView=function(ee){ee||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",K),this.renderer.off("afterRender",oe),this.renderer.off("beforeRender",X))}}},E.prototype.$resetCursorStyle=function(){var A=this.$cursorStyle||"ace",D=this.renderer.$cursorLayer;D&&(D.setSmoothBlinking(/smooth/.test(A)),D.isBlinking=!this.$readOnly&&A!="wide",v.setCssClass(D.element,"ace_slim-cursors",/slim/.test(A)))},E.prototype.prompt=function(A,D,j){var W=this;S.loadModule("ace/ext/prompt",function(V){V.prompt(W,A,D,j)})},Object.defineProperty(E.prototype,"hoverTooltip",{get:function(){return this.$hoverTooltip||(this.$hoverTooltip=new B(this.container))},set:function(A){this.$hoverTooltip&&this.$hoverTooltip.destroy(),this.$hoverTooltip=A},enumerable:!1,configurable:!0}),E})();F.$uid=0,F.prototype.curOp=null,F.prototype.prevOp={},F.prototype.$mergeableCommands=["backspace","del","insertstring"],F.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"],["&&","||"],["==","!="]],f.implement(F.prototype,y),S.defineOptions(F.prototype,"editor",{selectionStyle:{set:function(E){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:E})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(E){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(E){var A=this;if(this.textInput.setReadOnly(E),!this.destroyed){this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(j){var W=!1;if(j&&j.type=="keydown"){if(j&&j.key&&!j.ctrlKey&&!j.metaKey&&(j.key==" "&&j.preventDefault(),W=j.key.length==1),!W)return}else j&&j.type!=="exec"&&(W=!0);if(W){var V=v.createElement("div");V.textContent=L("editor.tooltip.disable-editing","Editing is disabled"),A.hoverTooltip.isOpen||A.hoverTooltip.showForRange(A,A.getSelectionRange(),V)}else A.hoverTooltip&&A.hoverTooltip.isOpen&&A.hoverTooltip.hide()});var D=this.textInput.getElement();E?(I.addListener(D,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(I.removeListener(D,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("commandUnavailable",this.$readOnlyCallback))}},initialValue:!1},copyWithEmptySelection:{set:function(E){this.textInput.setCopyWithEmptySelection(E)},initialValue:!1},cursorStyle:{set:function(E){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(E){this.setAutoScrollEditorIntoView(E)}},keyboardHandler:{set:function(E){this.setKeyboardHandler(E)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(E){this.session.setValue(E)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(E){this.setSession(E)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(E){this.renderer.$gutterLayer.setShowLineNumbers(E),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),E&&this.$relativeLineNumbers?N.attach(this):N.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(E){this.$showLineNumbers&&E?N.attach(this):N.detach(this)}},placeholder:{set:function(E){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),v.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),v.addCssClass(this.container,"ace_hasPlaceholder");var D=v.createElement("div");D.className="ace_placeholder",D.textContent=this.$placeholder||"",this.renderer.placeholderNode=D,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(E){var A={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(W){W.blur(),W.renderer.scroller.focus()},readOnly:!0},D=function(W){if(W.target==this.renderer.scroller&&W.keyCode===M.enter){W.preventDefault();var V=this.getCursorPosition().row;this.isRowVisible(V)||this.scrollToLine(V,!0,!0),this.focus()}},j;E?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(g.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",D.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),j||(j=new C(this)),j.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",D.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),j&&j.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(E){this.$textInputAriaLabel=E},initialValue:""},enableMobileMenu:{set:function(E){this.$enableMobileMenu=E},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 N={getText:function(E,A){return(Math.abs(E.selection.lead.row-A)||A+1+(A<9?"·":""))+""},getWidth:function(E,A,D){return Math.max(A.toString().length,(D.lastRow+1).toString().length,2)*D.characterWidth},update:function(E,A){A.renderer.$loop.schedule(A.renderer.CHANGE_GUTTER)},attach:function(E){E.renderer.$gutterLayer.$renderer=this,E.on("changeSelection",this.update),this.update(null,E)},detach:function(E){E.renderer.$gutterLayer.$renderer==this&&(E.renderer.$gutterLayer.$renderer=null),E.off("changeSelection",this.update),this.update(null,E)}};r.Editor=F}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(e,r,d){var u=e("../lib/dom"),f=(function(){function v(a,g){this.element=a,this.canvasHeight=g||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return v.prototype.moveContainer=function(a){u.translate(this.element,0,-(a.firstRowScreen*a.lineHeight%this.canvasHeight)-a.offset*this.$offsetCoefficient)},v.prototype.pageChanged=function(a,g){return Math.floor(a.firstRowScreen*a.lineHeight/this.canvasHeight)!==Math.floor(g.firstRowScreen*g.lineHeight/this.canvasHeight)},v.prototype.computeLineTop=function(a,g,i){var o=g.firstRowScreen*g.lineHeight,c=Math.floor(o/this.canvasHeight),p=i.documentToScreenRow(a,0)*g.lineHeight;return p-c*this.canvasHeight},v.prototype.computeLineHeight=function(a,g,i){return g.lineHeight*i.getRowLineCount(a)},v.prototype.getLength=function(){return this.cells.length},v.prototype.get=function(a){return this.cells[a]},v.prototype.shift=function(){this.$cacheCell(this.cells.shift())},v.prototype.pop=function(){this.$cacheCell(this.cells.pop())},v.prototype.push=function(a){if(Array.isArray(a)){this.cells.push.apply(this.cells,a);for(var g=u.createFragment(this.element),i=0;i<a.length;i++)g.appendChild(a[i].element);this.element.appendChild(g)}else this.cells.push(a),this.element.appendChild(a.element)},v.prototype.unshift=function(a){if(Array.isArray(a)){this.cells.unshift.apply(this.cells,a);for(var g=u.createFragment(this.element),i=0;i<a.length;i++)g.appendChild(a[i].element);this.element.firstChild?this.element.insertBefore(g,this.element.firstChild):this.element.appendChild(g)}else this.cells.unshift(a),this.element.insertAdjacentElement("afterbegin",a.element)},v.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},v.prototype.$cacheCell=function(a){a&&(a.element.remove(),this.cellCache.push(a))},v.prototype.createCell=function(a,g,i,o){var c=this.cellCache.pop();if(!c){var p=u.createElement("div");o&&o(p),this.element.appendChild(p),c={element:p,text:"",row:a}}return c.row=a,c},v})();r.Lines=f}),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,d){var u=e("../lib/dom"),f=e("../lib/oop"),v=e("../lib/lang"),a=e("../lib/event_emitter").EventEmitter,g=e("./lines").Lines,i=e("../config").nls,o=(function(){function p(s){this.$showCursorMarker=null,this.element=u.createElement("div"),this.element.className="ace_layer ace_gutter-layer",s.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new g(this.element),this.$lines.$offsetCoefficient=1}return p.prototype.setSession=function(s){this.session&&this.session.off("change",this.$updateAnnotations),this.session=s,s&&s.on("change",this.$updateAnnotations)},p.prototype.addGutterDecoration=function(s,h){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(s,h)},p.prototype.removeGutterDecoration=function(s,h){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(s,h)},p.prototype.setAnnotations=function(s){this.$annotations=[];for(var h=0;h<s.length;h++){var m=s[h],y=m.row,x=this.$annotations[y];x||(x=this.$annotations[y]={text:[],type:[],displayText:[]});var T=m.text,S=m.text,_=m.type;T=T?v.escapeHTML(T):m.html||"",S=S||m.html||"",x.text.indexOf(T)===-1&&(x.text.push(T),x.type.push(_),x.displayText.push(S));var C=m.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")}},p.prototype.$updateAnnotations=function(s){if(this.$annotations.length){var h=s.start.row,m=s.end.row-h;if(m!==0)if(s.action=="remove")this.$annotations.splice(h,m+1,null);else{var y=new Array(m+1);y.unshift(h,1),this.$annotations.splice.apply(this.$annotations,y)}}},p.prototype.update=function(s){this.config=s;var h=this.session,m=s.firstRow,y=Math.min(s.lastRow+s.gutterOffset,h.getLength()-1);this.oldLastRow=y,this.config=s,this.$lines.moveContainer(s),this.$updateCursorRow();for(var x=h.getNextFoldLine(m),T=x?x.start.row:1/0,S=null,_=-1,C=m;;){if(C>T&&(C=x.end.row+1,x=h.getNextFoldLine(C,x),T=x?x.start.row:1/0),C>y){for(;this.$lines.getLength()>_+1;)this.$lines.pop();break}S=this.$lines.get(++_),S?S.row=C:(S=this.$lines.createCell(C,s,this.session,c),this.$lines.push(S)),this.$renderCell(S,s,x,C),C++}this._signal("afterRender"),this.$updateGutterWidth(s),this.$showCursorMarker&&this.$highlightGutterLine&&this.$updateCursorMarker()},p.prototype.$updateGutterWidth=function(s){var h=this.session,m=h.gutterRenderer||this.$renderer,y=h.$firstLineNumber,x=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||h.$useWrapMode)&&(x=h.getLength()+y-1);var T=m?m.getWidth(h,x,s):x.toString().length*s.characterWidth,S=this.$padding||this.$computePadding();T+=S.left+S.right,T!==this.gutterWidth&&!isNaN(T)&&(this.gutterWidth=T,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",T))},p.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var s=this.session.selection.getCursor();this.$cursorRow!==s.row&&(this.$cursorRow=s.row)}},p.prototype.updateLineHighlight=function(){if(this.$showCursorMarker&&this.$updateCursorMarker(),!!this.$highlightGutterLine){var s=this.session.selection.cursor.row;if(this.$cursorRow=s,!(this.$cursorCell&&this.$cursorCell.row==s)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var h=this.$lines.cells;this.$cursorCell=null;for(var m=0;m<h.length;m++){var y=h[m];if(y.row>=this.$cursorRow){if(y.row>this.$cursorRow){var x=this.session.getFoldLine(this.$cursorRow);if(m>0&&x&&x.start.row==h[m-1].row)y=h[m-1];else break}y.element.className="ace_gutter-active-line "+y.element.className,this.$cursorCell=y;break}}}}},p.prototype.$updateCursorMarker=function(){if(this.session){var s=this.session;this.$highlightElement||(this.$highlightElement=u.createElement("div"),this.$highlightElement.className="ace_gutter-cursor",this.$highlightElement.style.pointerEvents="none",this.element.appendChild(this.$highlightElement));var h=s.selection.cursor,m=this.config,y=this.$lines,x=m.firstRowScreen*m.lineHeight,T=Math.floor(x/y.canvasHeight),S=s.documentToScreenRow(h)*m.lineHeight,_=S-T*y.canvasHeight;u.setStyle(this.$highlightElement.style,"height",m.lineHeight+"px"),u.setStyle(this.$highlightElement.style,"top",_+"px")}},p.prototype.scrollLines=function(s){var h=this.config;if(this.config=s,this.$updateCursorRow(),this.$lines.pageChanged(h,s))return this.update(s);this.$lines.moveContainer(s);var m=Math.min(s.lastRow+s.gutterOffset,this.session.getLength()-1),y=this.oldLastRow;if(this.oldLastRow=m,!h||y<s.firstRow)return this.update(s);if(m<h.firstRow)return this.update(s);if(h.firstRow<s.firstRow)for(var x=this.session.getFoldedRowCount(h.firstRow,s.firstRow-1);x>0;x--)this.$lines.shift();if(y>m)for(var x=this.session.getFoldedRowCount(m+1,y);x>0;x--)this.$lines.pop();s.firstRow<h.firstRow&&this.$lines.unshift(this.$renderLines(s,s.firstRow,h.firstRow-1)),m>y&&this.$lines.push(this.$renderLines(s,y+1,m)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(s)},p.prototype.$renderLines=function(s,h,m){for(var y=[],x=h,T=this.session.getNextFoldLine(x),S=T?T.start.row:1/0;x>S&&(x=T.end.row+1,T=this.session.getNextFoldLine(x,T),S=T?T.start.row:1/0),!(x>m);){var _=this.$lines.createCell(x,s,this.session,c);this.$renderCell(_,s,T,x),y.push(_),x++}return y},p.prototype.$renderCell=function(s,h,m,y){var x=s.element,T=this.session,S=x.childNodes[0],_=x.childNodes[1],C=x.childNodes[2],L=x.childNodes[3],O=C.firstChild,M=T.$firstLineNumber,I=T.$breakpoints,B=T.$decorations,F=T.gutterRenderer||this.$renderer,N=this.$showFoldWidgets&&T.foldWidgets,E=m?m.start.row:Number.MAX_VALUE,A=h.lineHeight+"px",D=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",j=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",W=(F?F.getText(T,y):y+M).toString();if(this.$highlightGutterLine&&(y==this.$cursorRow||m&&y<this.$cursorRow&&y>=E&&this.$cursorRow<=m.end.row)&&(D+="ace_gutter-active-line ",this.$cursorCell!=s&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=s)),I[y]&&(D+=I[y]),B[y]&&(D+=B[y]),this.$annotations[y]&&y!==E&&(D+=this.$annotations[y].className),N){var V=N[y];V==null&&(V=N[y]=T.getFoldWidget(y))}if(V){var K="ace_fold-widget ace_"+V,X=V=="start"&&y==E&&y<m.end.row;if(X){K+=" ace_closed";for(var oe="",ee=!1,le=y+1;le<=m.end.row;le++)if(this.$annotations[le]){if(this.$annotations[le].className===" ace_error"){ee=!0,oe=" ace_error_fold";break}this.$annotations[le].className===" ace_security"?(ee=!0,oe=" ace_security_fold"):this.$annotations[le].className===" ace_warning"&&oe!==" ace_security_fold"&&(ee=!0,oe=" ace_warning_fold")}D+=oe}else K+=" ace_open";_.className!=K&&(_.className=K),u.setStyle(_.style,"height",A),u.setStyle(_.style,"display","inline-block"),_.setAttribute("role","button"),_.setAttribute("tabindex","-1");var ue=T.getFoldWidgetRange(y);ue?_.setAttribute("aria-label",i("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[ue.start.row+1,ue.end.row+1])):m?_.setAttribute("aria-label",i("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[m.start.row+1,m.end.row+1])):_.setAttribute("aria-label",i("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[y+1])),X?(_.setAttribute("aria-expanded","false"),_.setAttribute("title",i("gutter.code-folding.closed.title","Unfold code"))):(_.setAttribute("aria-expanded","true"),_.setAttribute("title",i("gutter.code-folding.open.title","Fold code")))}else _&&(u.setStyle(_.style,"display","none"),_.setAttribute("tabindex","0"),_.removeAttribute("role"),_.removeAttribute("aria-label"));var ne=this.session.$gutterCustomWidgets[y];if(ne?this.$addCustomWidget(y,ne,s):L&&this.$removeCustomWidget(y,s),ee&&this.$showFoldedAnnotations){C.className="ace_gutter_annotation",O.className=j,O.className+=oe,u.setStyle(O.style,"height",A),u.setStyle(C.style,"display","block"),u.setStyle(C.style,"height",A);var fe;switch(oe){case" ace_error_fold":fe=i("gutter.annotation.aria-label.error","Error, read annotations row $0",[W]);break;case" ace_security_fold":fe=i("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[W]);break;case" ace_warning_fold":fe=i("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[W]);break}C.setAttribute("aria-label",fe),C.setAttribute("tabindex","-1"),C.setAttribute("role","button")}else if(this.$annotations[y]){C.className="ace_gutter_annotation",O.className=j,this.$useSvgGutterIcons?O.className+=this.$annotations[y].className:x.classList.add(this.$annotations[y].className.replace(" ","")),u.setStyle(O.style,"height",A),u.setStyle(C.style,"display","block"),u.setStyle(C.style,"height",A);var fe;switch(this.$annotations[y].className){case" ace_error":fe=i("gutter.annotation.aria-label.error","Error, read annotations row $0",[W]);break;case" ace_security":fe=i("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[W]);break;case" ace_warning":fe=i("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[W]);break;case" ace_info":fe=i("gutter.annotation.aria-label.info","Info, read annotations row $0",[W]);break;case" ace_hint":fe=i("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[W]);break}C.setAttribute("aria-label",fe),C.setAttribute("tabindex","-1"),C.setAttribute("role","button")}else u.setStyle(C.style,"display","none"),C.removeAttribute("aria-label"),C.removeAttribute("role"),C.setAttribute("tabindex","0");return W!==S.data&&(S.data=W),x.className!=D&&(x.className=D),u.setStyle(s.element.style,"height",this.$lines.computeLineHeight(y,h,T)+"px"),u.setStyle(s.element.style,"top",this.$lines.computeLineTop(y,h,T)+"px"),s.text=W,C.style.display==="none"&&_.style.display==="none"&&!ne?s.element.setAttribute("aria-hidden",!0):s.element.setAttribute("aria-hidden",!1),s},p.prototype.setHighlightGutterLine=function(s){this.$highlightGutterLine=s,!s&&this.$highlightElement&&(this.$highlightElement.remove(),this.$highlightElement=null)},p.prototype.setShowLineNumbers=function(s){this.$renderer=!s&&{getWidth:function(){return 0},getText:function(){return""}}},p.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},p.prototype.setShowFoldWidgets=function(s){s?u.addCssClass(this.element,"ace_folding-enabled"):u.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=s,this.$padding=null},p.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},p.prototype.$hideFoldWidget=function(s,h){var m=h||this.$getGutterCell(s);if(m&&m.element){var y=m.element.childNodes[1];y&&u.setStyle(y.style,"display","none")}},p.prototype.$showFoldWidget=function(s,h){var m=h||this.$getGutterCell(s);if(m&&m.element){var y=m.element.childNodes[1];y&&this.session.foldWidgets&&this.session.foldWidgets[m.row]&&u.setStyle(y.style,"display","inline-block")}},p.prototype.$getGutterCell=function(s){var h=this.$lines.cells,m=0,y=h.length-1;if(!(s<h[0].row||s>h[y].row)){for(;m<=y;){var x=Math.floor((m+y)/2),T=h[x];if(T.row>s)y=x-1;else if(T.row<s)m=x+1;else return T}return T}},p.prototype.$addCustomWidget=function(s,h,m){var y=h.className,x=h.label,T=h.title,S=h.callbacks;this.session.$gutterCustomWidgets[s]={className:y,label:x,title:T,callbacks:S},this.$hideFoldWidget(s,m);var _=m||this.$getGutterCell(s);if(_&&_.element){var C=_.element.querySelector(".ace_custom-widget");C&&C.remove(),C=u.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",T),u.setStyle(C.style,"display","inline-block"),u.setStyle(C.style,"height","inherit"),S&&S.onClick&&C.addEventListener("click",function(L){S.onClick(L,s),L.stopPropagation()}),_.element.appendChild(C)}},p.prototype.$removeCustomWidget=function(s,h){delete this.session.$gutterCustomWidgets[s],this.$showFoldWidget(s,h);var m=h||this.$getGutterCell(s);if(m&&m.element){var y=m.element.querySelector(".ace_custom-widget");y&&m.element.removeChild(y)}},p.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var s=u.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(s.borderLeftWidth)||0)+(parseInt(s.paddingLeft)||0)+1,this.$padding.right=(parseInt(s.borderRightWidth)||0)+(parseInt(s.paddingRight)||0),this.$padding},p.prototype.getRegion=function(s){var h=this.$padding||this.$computePadding(),m=this.element.getBoundingClientRect();if(s.x<h.left+m.left)return"markers";if(this.$showFoldWidgets&&s.x>m.right-h.right)return"foldWidgets"},p})();o.prototype.$fixedWidth=!1,o.prototype.$highlightGutterLine=!0,o.prototype.$renderer=void 0,o.prototype.$showLineNumbers=!0,o.prototype.$showFoldWidgets=!0,f.implement(o.prototype,a);function c(p){var s=document.createTextNode("");p.appendChild(s);var h=u.createElement("span");p.appendChild(h);var m=u.createElement("span");p.appendChild(m);var y=u.createElement("span");return m.appendChild(y),p}r.Gutter=o}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,r,d){var u=e("../range").Range,f=e("../lib/dom"),v=(function(){function g(i){this.element=f.createElement("div"),this.element.className="ace_layer ace_marker-layer",i.appendChild(this.element)}return g.prototype.setPadding=function(i){this.$padding=i},g.prototype.setSession=function(i){this.session=i},g.prototype.setMarkers=function(i){this.markers=i},g.prototype.elt=function(i,o){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=o,c.className=i},g.prototype.update=function(i){if(i){this.config=i,this.i=0;var o;for(var c in this.markers){var p=this.markers[c];if(!p.range){p.update(o,this,this.session,i);continue}var s=p.range.clipRows(i.firstRow,i.lastRow);if(!s.isEmpty())if(s=s.toScreenRange(this.session),p.renderer){var h=this.$getTop(s.start.row,i),m=this.$padding+s.start.column*i.characterWidth;p.renderer(o,s,m,h,i)}else p.type=="fullLine"?this.drawFullLineMarker(o,s,p.clazz,i):p.type=="screenLine"?this.drawScreenLineMarker(o,s,p.clazz,i):s.isMultiLine()?p.type=="text"?this.drawTextMarker(o,s,p.clazz,i):this.drawMultiLineMarker(o,s,p.clazz,i):this.drawSingleLineMarker(o,s,p.clazz+" ace_start ace_br15",i)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},g.prototype.$getTop=function(i,o){return(i-o.firstRowScreen)*o.lineHeight},g.prototype.drawTextMarker=function(i,o,c,p,s){for(var h=this.session,m=o.start.row,y=o.end.row,x=m,T=0,S=0,_=h.getScreenLastRowColumn(x),C=new u(x,o.start.column,x,S);x<=y;x++)C.start.row=C.end.row=x,C.start.column=x==m?o.start.column:h.getRowWrapIndent(x),C.end.column=_,T=S,S=_,_=x+1<y?h.getScreenLastRowColumn(x+1):x==y?0:o.end.column,this.drawSingleLineMarker(i,C,c+(x==m?" ace_start":"")+" ace_br"+a(x==m||x==m+1&&o.start.column,T<S,S>_,x==y),p,x==y?0:1,s)},g.prototype.drawMultiLineMarker=function(i,o,c,p,s){var h=this.$padding,m=p.lineHeight,y=this.$getTop(o.start.row,p),x=h+o.start.column*p.characterWidth;if(s=s||"",this.session.$bidiHandler.isBidiRow(o.start.row)){var T=o.clone();T.end.row=T.start.row,T.end.column=this.session.getLine(T.start.row).length,this.drawBidiSingleLineMarker(i,T,c+" ace_br1 ace_start",p,null,s)}else this.elt(c+" ace_br1 ace_start","height:"+m+"px;right:"+h+"px;top:"+y+"px;left:"+x+"px;"+(s||""));if(this.session.$bidiHandler.isBidiRow(o.end.row)){var T=o.clone();T.start.row=T.end.row,T.start.column=0,this.drawBidiSingleLineMarker(i,T,c+" ace_br12",p,null,s)}else{y=this.$getTop(o.end.row,p);var S=o.end.column*p.characterWidth;this.elt(c+" ace_br12","height:"+m+"px;width:"+S+"px;top:"+y+"px;left:"+h+"px;"+(s||""))}if(m=(o.end.row-o.start.row-1)*p.lineHeight,!(m<=0)){y=this.$getTop(o.start.row+1,p);var _=(o.start.column?1:0)|(o.end.column?0:8);this.elt(c+(_?" ace_br"+_:""),"height:"+m+"px;right:"+h+"px;top:"+y+"px;left:"+h+"px;"+(s||""))}},g.prototype.drawSingleLineMarker=function(i,o,c,p,s,h){if(this.session.$bidiHandler.isBidiRow(o.start.row))return this.drawBidiSingleLineMarker(i,o,c,p,s,h);var m=p.lineHeight,y=(o.end.column+(s||0)-o.start.column)*p.characterWidth,x=this.$getTop(o.start.row,p),T=this.$padding+o.start.column*p.characterWidth;this.elt(c,"height:"+m+"px;width:"+y+"px;top:"+x+"px;left:"+T+"px;"+(h||""))},g.prototype.drawBidiSingleLineMarker=function(i,o,c,p,s,h){var m=p.lineHeight,y=this.$getTop(o.start.row,p),x=this.$padding,T=this.session.$bidiHandler.getSelections(o.start.column,o.end.column);T.forEach(function(S){this.elt(c,"height:"+m+"px;width:"+(S.width+(s||0))+"px;top:"+y+"px;left:"+(x+S.left)+"px;"+(h||""))},this)},g.prototype.drawFullLineMarker=function(i,o,c,p,s){var h=this.$getTop(o.start.row,p),m=p.lineHeight;o.start.row!=o.end.row&&(m+=this.$getTop(o.end.row,p)-h),this.elt(c,"height:"+m+"px;top:"+h+"px;left:0;right:0;"+(s||""))},g.prototype.drawScreenLineMarker=function(i,o,c,p,s){var h=this.$getTop(o.start.row,p),m=p.lineHeight;this.elt(c,"height:"+m+"px;top:"+h+"px;left:0;right:0;"+(s||""))},g})();v.prototype.$padding=0;function a(g,i,o,c){return(g?1:0)|(i?2:0)|(o?4:0)|(c?8:0)}r.Marker=v}),ace.define("ace/layer/text_util",["require","exports","module"],function(e,r,d){var u=new Set(["text","rparen","lparen"]);r.isTextToken=function(f){return u.has(f)}}),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,d){var u=e("../lib/oop"),f=e("../lib/dom"),v=e("../lib/lang"),a=e("./lines").Lines,g=e("../lib/event_emitter").EventEmitter,i=e("../config").nls,o=e("./text_util").isTextToken,c=(function(){function p(s){this.dom=f,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",s.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new a(this.element)}return p.prototype.$updateEolChar=function(){var s=this.session.doc,h=s.getNewLineCharacter()==`
219
+ `&&s.getNewLineMode()!="windows",m=h?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=m)return this.EOL_CHAR=m,!0},p.prototype.setPadding=function(s){this.$padding=s,this.element.style.margin="0 "+s+"px"},p.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},p.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},p.prototype.$setFontMetrics=function(s){this.$fontMetrics=s,this.$fontMetrics.on("changeCharacterSize",(function(h){this._signal("changeCharacterSize",h)}).bind(this)),this.$pollSizeChanges()},p.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},p.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},p.prototype.setSession=function(s){this.session=s,s&&this.$computeTabString()},p.prototype.setShowInvisibles=function(s){return this.showInvisibles==s?!1:(this.showInvisibles=s,typeof s=="string"?(this.showSpaces=/tab/i.test(s),this.showTabs=/space/i.test(s),this.showEOL=/eol/i.test(s)):this.showSpaces=this.showTabs=this.showEOL=s,this.$computeTabString(),!0)},p.prototype.setDisplayIndentGuides=function(s){return this.displayIndentGuides==s?!1:(this.displayIndentGuides=s,this.$computeTabString(),!0)},p.prototype.setHighlightIndentGuides=function(s){return this.$highlightIndentGuides===s?!1:(this.$highlightIndentGuides=s,s)},p.prototype.$computeTabString=function(){var s=this.session.getTabSize();this.tabSize=s;for(var h=this.$tabStrings=[0],m=1;m<s+1;m++)if(this.showTabs){var y=this.dom.createElement("span");y.className="ace_invisible ace_invisible_tab",y.textContent=v.stringRepeat(this.TAB_CHAR,m),h.push(y)}else h.push(this.dom.createTextNode(v.stringRepeat(" ",m),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var x="ace_indent-guide",T=this.showSpaces?" ace_invisible ace_invisible_space":"",S=this.showSpaces?v.stringRepeat(this.SPACE_CHAR,this.tabSize):v.stringRepeat(" ",this.tabSize),_=this.showTabs?" ace_invisible ace_invisible_tab":"",C=this.showTabs?v.stringRepeat(this.TAB_CHAR,this.tabSize):S,y=this.dom.createElement("span");y.className=x+T,y.textContent=S,this.$tabStrings[" "]=y;var y=this.dom.createElement("span");y.className=x+_,y.textContent=C,this.$tabStrings[" "]=y}},p.prototype.updateLines=function(s,h,m){if(this.config.lastRow!=s.lastRow||this.config.firstRow!=s.firstRow)return this.update(s);this.config=s;for(var y=Math.max(h,s.firstRow),x=Math.min(m,s.lastRow),T=this.element.childNodes,S=0,_=s.firstRow;_<y;_++){var C=this.session.getFoldLine(_);if(C)if(C.containsRow(y)){y=C.start.row;break}else _=C.end.row;S++}for(var L=!1,_=y,C=this.session.getNextFoldLine(_),O=C?C.start.row:1/0;_>O&&(_=C.end.row+1,C=this.session.getNextFoldLine(_,C),O=C?C.start.row:1/0),!(_>x);){var M=T[S++];if(M){this.dom.removeChildren(M),this.$renderLine(M,_,_==O?C:!1),L&&(M.style.top=this.$lines.computeLineTop(_,s,this.session)+"px");var I=s.lineHeight*this.session.getRowLength(_)+"px";M.style.height!=I&&(L=!0,M.style.height=I)}_++}if(L)for(;S<this.$lines.cells.length;){var B=this.$lines.cells[S++];B.element.style.top=this.$lines.computeLineTop(B.row,s,this.session)+"px"}},p.prototype.scrollLines=function(s){var h=this.config;if(this.config=s,this.$lines.pageChanged(h,s))return this.update(s);this.$lines.moveContainer(s);var m=s.lastRow,y=h?h.lastRow:-1;if(!h||y<s.firstRow)return this.update(s);if(m<h.firstRow)return this.update(s);if(!h||h.lastRow<s.firstRow)return this.update(s);if(s.lastRow<h.firstRow)return this.update(s);if(h.firstRow<s.firstRow)for(var x=this.session.getFoldedRowCount(h.firstRow,s.firstRow-1);x>0;x--)this.$lines.shift();if(h.lastRow>s.lastRow)for(var x=this.session.getFoldedRowCount(s.lastRow+1,h.lastRow);x>0;x--)this.$lines.pop();s.firstRow<h.firstRow&&this.$lines.unshift(this.$renderLinesFragment(s,s.firstRow,h.firstRow-1)),s.lastRow>h.lastRow&&this.$lines.push(this.$renderLinesFragment(s,h.lastRow+1,s.lastRow)),this.$highlightIndentGuide()},p.prototype.$renderLinesFragment=function(s,h,m){for(var y=[],x=h,T=this.session.getNextFoldLine(x),S=T?T.start.row:1/0;x>S&&(x=T.end.row+1,T=this.session.getNextFoldLine(x,T),S=T?T.start.row:1/0),!(x>m);){var _=this.$lines.createCell(x,s,this.session),C=_.element;this.dom.removeChildren(C),f.setStyle(C.style,"height",this.$lines.computeLineHeight(x,s,this.session)+"px"),f.setStyle(C.style,"top",this.$lines.computeLineTop(x,s,this.session)+"px"),this.$renderLine(C,x,x==S?T:!1),this.$useLineGroups()?C.className="ace_line_group":C.className="ace_line",y.push(_),x++}return y},p.prototype.update=function(s){this.$lines.moveContainer(s),this.config=s;for(var h=s.firstRow,m=s.lastRow,y=this.$lines;y.getLength();)y.pop();y.push(this.$renderLinesFragment(s,h,m))},p.prototype.$renderToken=function(s,h,m,y){for(var x=this,T=/(\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,S=this.dom.createFragment(this.element),_,C=0;_=T.exec(y);){var L=_[1],O=_[2],M=_[3],I=_[4],B=_[5];if(!(!x.showSpaces&&O)){var F=C!=_.index?y.slice(C,_.index):"";if(C=_.index+_[0].length,F&&S.appendChild(this.dom.createTextNode(F,this.element)),L){var N=x.session.getScreenTabSize(h+_.index),E=x.$tabStrings[N].cloneNode(!0);E.charCount=1,S.appendChild(E),h+=N-1}else if(O)if(x.showSpaces){var A=this.dom.createElement("span");A.className="ace_invisible ace_invisible_space",A.textContent=v.stringRepeat(x.SPACE_CHAR,O.length),S.appendChild(A)}else S.appendChild(this.dom.createTextNode(O,this.element));else if(M){var A=this.dom.createElement("span");A.className="ace_invisible ace_invisible_space ace_invalid",A.textContent=v.stringRepeat(x.SPACE_CHAR,M.length),S.appendChild(A)}else if(I){h+=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:I,S.appendChild(A)}else if(B){h+=1;var A=this.dom.createElement("span");A.style.width=x.config.characterWidth*2+"px",A.className="ace_cjk",A.textContent=B,S.appendChild(A)}}}if(S.appendChild(this.dom.createTextNode(C?y.slice(C):y,this.element)),o(m.type))s.appendChild(S);else{var D="ace_"+m.type.replace(/\./g," ace_"),A=this.dom.createElement("span");m.type=="fold"&&(A.style.width=m.value.length*this.config.characterWidth+"px",A.setAttribute("title",i("inline-fold.closed.title","Unfold code"))),A.className=D,A.appendChild(S),s.appendChild(A)}return h+y.length},p.prototype.renderIndentGuide=function(s,h,m){var y=h.search(this.$indentGuideRe);if(y<=0||y>=m)return h;if(h[0]==" "){y-=y%this.tabSize;for(var x=y/this.tabSize,T=0;T<x;T++)s.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),h.substr(y)}else if(h[0]==" "){for(var T=0;T<y;T++){var S=this.$tabStrings[" "].cloneNode(!0);S.charCount=1,s.appendChild(S)}return this.$highlightIndentGuide(),h.substr(y)}return this.$highlightIndentGuide(),h},p.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var s=this.session.doc.$lines;if(s){var h=this.session.selection.getCursor(),m=/^\s*/.exec(this.session.doc.getLine(h.row))[0].length,y=Math.floor(m/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:y,start:h.row};var x=this.session.$bracketHighlight;if(x){for(var T=this.session.$bracketHighlight.ranges,S=0;S<T.length;S++)if(h.row!==T[S].start.row){this.$highlightIndentGuideMarker.end=T[S].start.row+1,h.row>T[S].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&s[h.row]!==""&&h.column===s[h.row].length){this.$highlightIndentGuideMarker.dir=1;for(var S=h.row+1;S<s.length;S++){var _=s[S],C=/^\s*/.exec(_)[0].length;if(_!==""&&(this.$highlightIndentGuideMarker.end=S,C<=m))break}}this.$renderHighlightIndentGuide()}}},p.prototype.$clearActiveIndentGuide=function(){for(var s=this.element.querySelectorAll(".ace_indent-guide-active"),h=0;h<s.length;h++)s[h].classList.remove("ace_indent-guide-active")},p.prototype.$setIndentGuideActive=function(s,h){var m=this.session.doc.getLine(s.row);if(m!==""){var y=s.element;if(s.element.classList&&s.element.classList.contains("ace_line_group"))if(s.element.childNodes.length>0)y=s.element.childNodes[0];else return;var x=y.childNodes;if(x){var T=x[h-1];T&&T.classList&&T.classList.contains("ace_indent-guide")&&T.classList.add("ace_indent-guide-active")}}},p.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var s=this.$lines.cells;this.$clearActiveIndentGuide();var h=this.$highlightIndentGuideMarker.indentLevel;if(h!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var m=0;m<s.length;m++){var y=s[m];if(this.$highlightIndentGuideMarker.end&&y.row>=this.$highlightIndentGuideMarker.start+1){if(y.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(y,h)}}else for(var m=s.length-1;m>=0;m--){var y=s[m];if(this.$highlightIndentGuideMarker.end&&y.row<this.$highlightIndentGuideMarker.start){if(y.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(y,h)}}}},p.prototype.$createLineElement=function(s){var h=this.dom.createElement("div");return h.className="ace_line",h.style.height=this.config.lineHeight+"px",h},p.prototype.$renderWrappedLine=function(s,h,m){var y=0,x=0,T=m[0],S=0,_=this.$createLineElement();s.appendChild(_);for(var C=0;C<h.length;C++){var L=h[C],O=L.value;if(C==0&&this.displayIndentGuides){if(y=O.length,O=this.renderIndentGuide(_,O,T),!O)continue;y-=O.length}if(y+O.length<T)S=this.$renderToken(_,S,L,O),y+=O.length;else{for(;y+O.length>=T;){S=this.$renderToken(_,S,L,O.substring(0,T-y)),O=O.substring(T-y),y=T,_=this.$createLineElement(),s.appendChild(_);var M=this.dom.createTextNode(v.stringRepeat(" ",m.indent),this.element);M.charCount=0,_.appendChild(M),x++,S=0,T=m[x]||Number.MAX_VALUE}O.length!=0&&(y+=O.length,S=this.$renderToken(_,S,L,O))}}m[m.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(_,S,null,"",!0)},p.prototype.$renderSimpleLine=function(s,h){for(var m=0,y=0;y<h.length;y++){var x=h[y],T=x.value;if(!(y==0&&this.displayIndentGuides&&(T=this.renderIndentGuide(s,T),!T))){if(m+T.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(s,m,x,T);m=this.$renderToken(s,m,x,T)}}},p.prototype.$renderOverflowMessage=function(s,h,m,y,x){m&&this.$renderToken(s,h,m,y.slice(0,this.MAX_LINE_LENGTH-h));var T=this.dom.createElement("span");T.className="ace_inline_button ace_keyword ace_toggle_wrap",T.textContent=x?"<hide>":"<click to see more...>",s.appendChild(T)},p.prototype.$renderLine=function(s,h,m){if(!m&&m!=!1&&(m=this.session.getFoldLine(h)),m)var y=this.$getFoldLineTokens(h,m);else var y=this.session.getTokens(h);var x=s;if(y.length){var T=this.session.getRowSplitData(h);if(T&&T.length){this.$renderWrappedLine(s,y,T);var x=s.lastChild}else{var x=s;this.$useLineGroups()&&(x=this.$createLineElement(),s.appendChild(x)),this.$renderSimpleLine(x,y)}}else this.$useLineGroups()&&(x=this.$createLineElement(),s.appendChild(x));if(this.showEOL&&x){m&&(h=m.end.row);var S=this.dom.createElement("span");S.className="ace_invisible ace_invisible_eol",S.textContent=h==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,x.appendChild(S)}},p.prototype.$getFoldLineTokens=function(s,h){var m=this.session,y=[];function x(S,_,C){for(var L=0,O=0;O+S[L].value.length<_;)if(O+=S[L].value.length,L++,L==S.length)return;if(O!=_){var M=S[L].value.substring(_-O);M.length>C-_&&(M=M.substring(0,C-_)),y.push({type:S[L].type,value:M}),O=_+M.length,L+=1}for(;O<C&&L<S.length;){var M=S[L].value;M.length+O>C?y.push({type:S[L].type,value:M.substring(0,C-O)}):y.push(S[L]),O+=M.length,L+=1}}var T=m.getTokens(s);return h.walk(function(S,_,C,L,O){S!=null?y.push({type:"fold",value:S}):(O&&(T=m.getTokens(_)),T.length&&x(T,L,C))},h.end.row,this.session.getLine(h.end.row).length),y},p.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},p})();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,u.implement(c.prototype,g),r.Text=c}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,r,d){var u=e("../lib/dom"),f=(function(){function v(a){this.element=u.createElement("div"),this.element.className="ace_layer ace_cursor-layer",a.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),u.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return v.prototype.$updateOpacity=function(a){for(var g=this.cursors,i=g.length;i--;)u.setStyle(g[i].style,"opacity",a?"":"0")},v.prototype.$startCssAnimation=function(){for(var a=this.cursors,g=a.length;g--;)a[g].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&u.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},v.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,u.removeCssClass(this.element,"ace_animate-blinking")},v.prototype.setPadding=function(a){this.$padding=a},v.prototype.setSession=function(a){this.session=a},v.prototype.setBlinking=function(a){a!=this.isBlinking&&(this.isBlinking=a,this.restartTimer())},v.prototype.setBlinkInterval=function(a){a!=this.blinkInterval&&(this.blinkInterval=a,this.restartTimer())},v.prototype.setSmoothBlinking=function(a){a!=this.smoothBlinking&&(this.smoothBlinking=a,u.setCssClass(this.element,"ace_smooth-blinking",a),this.$updateCursors(!0),this.restartTimer())},v.prototype.addCursor=function(){var a=u.createElement("div");return a.className="ace_cursor",this.element.appendChild(a),this.cursors.push(a),a},v.prototype.removeCursor=function(){if(this.cursors.length>1){var a=this.cursors.pop();return a.parentNode.removeChild(a),a}},v.prototype.hideCursor=function(){this.isVisible=!1,u.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},v.prototype.showCursor=function(){this.isVisible=!0,u.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},v.prototype.restartTimer=function(){var a=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,u.removeCssClass(this.element,"ace_smooth-blinking")),a(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&u.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),u.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var g=(function(){this.timeoutId=setTimeout(function(){a(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){a(!0),g()},this.blinkInterval),g()}},v.prototype.getPixelPosition=function(a,g){if(!this.config||!this.session)return{left:0,top:0};a||(a=this.session.selection.getCursor());var i=this.session.documentToScreenPosition(a),o=this.$padding+(this.session.$bidiHandler.isBidiRow(i.row,a.row)?this.session.$bidiHandler.getPosLeft(i.column):i.column*this.config.characterWidth),c=(i.row-(g?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:o,top:c}},v.prototype.isCursorInView=function(a,g){return a.top>=0&&a.top<g.maxHeight},v.prototype.update=function(a){this.config=a;var g=this.session.$selectionMarkers,i=0,o=0;(g===void 0||g.length===0)&&(g=[{cursor:null}]);for(var i=0,c=g.length;i<c;i++){var p=this.getPixelPosition(g[i].cursor,!0);if(!((p.top>a.height+a.offset||p.top<0)&&i>1)){var s=this.cursors[o++]||this.addCursor(),h=s.style;this.drawCursor?this.drawCursor(s,p,a,g[i],this.session):this.isCursorInView(p,a)?(u.setStyle(h,"display","block"),u.translate(s,p.left,p.top),u.setStyle(h,"width",Math.round(a.characterWidth)+"px"),u.setStyle(h,"height",a.lineHeight+"px")):u.setStyle(h,"display","none")}}for(;this.cursors.length>o;)this.removeCursor();var m=this.session.getOverwrite();this.$setOverwrite(m),this.$pixelPos=p,this.restartTimer()},v.prototype.$setOverwrite=function(a){a!=this.overwrite&&(this.overwrite=a,a?u.addCssClass(this.element,"ace_overwrite-cursors"):u.removeCssClass(this.element,"ace_overwrite-cursors"))},v.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},v})();f.prototype.$padding=0,f.prototype.drawCursor=null,r.Cursor=f}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,r,d){var u=this&&this.__extends||(function(){var s=function(h,m){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,x){y.__proto__=x}||function(y,x){for(var T in x)Object.prototype.hasOwnProperty.call(x,T)&&(y[T]=x[T])},s(h,m)};return function(h,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");s(h,m);function y(){this.constructor=h}h.prototype=m===null?Object.create(m):(y.prototype=m.prototype,new y)}})(),f=e("./lib/oop"),v=e("./lib/dom"),a=e("./lib/event"),g=e("./lib/event_emitter").EventEmitter,i=32768,o=(function(){function s(h,m){this.element=v.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+m,this.element.tabIndex=-1,this.inner=v.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),h.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addListener(this.element,"scroll",this.onScroll.bind(this)),a.addListener(this.element,"mousedown",a.preventDefault)}return s.prototype.setVisible=function(h){this.element.style.display=h?"":"none",this.isVisible=h,this.coeff=1},s})();f.implement(o.prototype,g);var c=(function(s){u(h,s);function h(m,y){var x=s.call(this,m,"-v")||this;return x.scrollTop=0,x.scrollHeight=0,y.$scrollbarWidth=x.width=v.scrollbarWidth(m.ownerDocument),x.inner.style.width=x.element.style.width=(x.width||15)+5+"px",x.$minWidth=0,x}return h.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var m=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-m)/(this.coeff-m)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},h.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},h.prototype.setHeight=function(m){this.element.style.height=m+"px"},h.prototype.setScrollHeight=function(m){this.scrollHeight=m,m>i?(this.coeff=i/m,m=i):this.coeff!=1&&(this.coeff=1),this.inner.style.height=m+"px"},h.prototype.setScrollTop=function(m){this.scrollTop!=m&&(this.skipEvent=!0,this.scrollTop=m,this.element.scrollTop=m*this.coeff)},h})(o);c.prototype.setInnerHeight=c.prototype.setScrollHeight;var p=(function(s){u(h,s);function h(m,y){var x=s.call(this,m,"-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 h.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},h.prototype.getHeight=function(){return this.isVisible?this.height:0},h.prototype.setWidth=function(m){this.element.style.width=m+"px"},h.prototype.setInnerWidth=function(m){this.inner.style.width=m+"px"},h.prototype.setScrollWidth=function(m){this.inner.style.width=m+"px"},h.prototype.setScrollLeft=function(m){this.scrollLeft!=m&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=m)},h})(o);r.ScrollBar=c,r.ScrollBarV=c,r.ScrollBarH=p,r.VScrollBar=c,r.HScrollBar=p}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,r,d){var u=this&&this.__extends||(function(){var p=function(s,h){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,y){m.__proto__=y}||function(m,y){for(var x in y)Object.prototype.hasOwnProperty.call(y,x)&&(m[x]=y[x])},p(s,h)};return function(s,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");p(s,h);function m(){this.constructor=s}s.prototype=h===null?Object.create(h):(m.prototype=h.prototype,new m)}})(),f=e("./lib/oop"),v=e("./lib/dom"),a=e("./lib/event"),g=e("./lib/event_emitter").EventEmitter;v.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 i=(function(){function p(s,h){this.element=v.createElement("div"),this.element.className="ace_sb"+h,this.inner=v.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,s.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return p.prototype.setVisible=function(s){this.element.style.display=s?"":"none",this.isVisible=s,this.coeff=1},p})();f.implement(i.prototype,g);var o=(function(p){u(s,p);function s(h,m){var y=p.call(this,h,"-v")||this;return y.scrollTop=0,y.scrollHeight=0,y.parent=h,y.width=y.VScrollWidth,y.renderer=m,y.inner.style.width=y.element.style.width=(y.width||15)+"px",y.$minWidth=0,y}return s.prototype.onMouseDown=function(h,m){if(h==="mousedown"&&!(a.getButton(m)!==0||m.detail===2)){if(m.target===this.inner){var y=this,x=m.clientY,T=function(I){x=I.clientY},S=function(){clearInterval(O)},_=m.clientY,C=this.thumbTop,L=function(){if(x!==void 0){var I=y.scrollTopFromThumbTop(C+x-_);I!==y.scrollTop&&y._emit("scroll",{data:I})}};a.capture(this.inner,T,S);var O=setInterval(L,20);return a.preventDefault(m)}var M=m.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(M)}),a.preventDefault(m)}},s.prototype.getHeight=function(){return this.height},s.prototype.scrollTopFromThumbTop=function(h){var m=h*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return m=m>>0,m<0?m=0:m>this.pageHeight-this.viewHeight&&(m=this.pageHeight-this.viewHeight),m},s.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},s.prototype.setHeight=function(h){this.height=Math.max(0,h),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},s.prototype.setScrollHeight=function(h,m){this.pageHeight===h&&!m||(this.pageHeight=h,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})))},s.prototype.setScrollTop=function(h){this.scrollTop=h,h<0&&(h=0),this.thumbTop=h*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},s})(i);o.prototype.setInnerHeight=o.prototype.setScrollHeight;var c=(function(p){u(s,p);function s(h,m){var y=p.call(this,h,"-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=m,y}return s.prototype.onMouseDown=function(h,m){if(h==="mousedown"&&!(a.getButton(m)!==0||m.detail===2)){if(m.target===this.inner){var y=this,x=m.clientX,T=function(I){x=I.clientX},S=function(){clearInterval(O)},_=m.clientX,C=this.thumbLeft,L=function(){if(x!==void 0){var I=y.scrollLeftFromThumbLeft(C+x-_);I!==y.scrollLeft&&y._emit("scroll",{data:I})}};a.capture(this.inner,T,S);var O=setInterval(L,20);return a.preventDefault(m)}var M=m.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(M)}),a.preventDefault(m)}},s.prototype.getHeight=function(){return this.isVisible?this.height:0},s.prototype.scrollLeftFromThumbLeft=function(h){var m=h*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return m=m>>0,m<0?m=0:m>this.pageWidth-this.viewWidth&&(m=this.pageWidth-this.viewWidth),m},s.prototype.setWidth=function(h){this.width=Math.max(0,h),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},s.prototype.setScrollWidth=function(h,m){this.pageWidth===h&&!m||(this.pageWidth=h,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})))},s.prototype.setScrollLeft=function(h){this.scrollLeft=h,h<0&&(h=0),this.thumbLeft=h*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},s})(i);c.prototype.setInnerWidth=c.prototype.setScrollWidth,r.ScrollBar=o,r.ScrollBarV=o,r.ScrollBarH=c,r.VScrollBar=o,r.HScrollBar=c}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,r,d){var u=e("./lib/event"),f=(function(){function v(a,g){this.onRender=a,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=g||window;var i=this;this._flush=function(o){i.pending=!1;var c=i.changes;if(c&&(u.blockIdle(100),i.changes=0,i.onRender(c)),i.changes){if(i.$recursionLimit--<0)return;i.schedule()}else i.$recursionLimit=2}}return v.prototype.schedule=function(a){this.changes=this.changes|a,this.changes&&!this.pending&&(u.nextFrame(this._flush),this.pending=!0)},v.prototype.clear=function(a){var g=this.changes;return this.changes=0,g},v})();r.RenderLoop=f}),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,d){var u=e("../lib/oop"),f=e("../lib/dom"),v=e("../lib/lang"),a=e("../lib/event"),g=e("../lib/useragent"),i=e("../lib/event_emitter").EventEmitter,o=512,c=typeof ResizeObserver=="function",p=200,s=(function(){function h(m){this.el=f.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=f.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=f.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),m.appendChild(this.el),this.$measureNode.textContent=v.stringRepeat("X",o),this.$characterSize={width:0,height:0},c?this.$addObserver():this.checkForSizeChanges()}return h.prototype.$setMeasureNodeStyles=function(m,y){m.width=m.height="auto",m.left=m.top="0px",m.visibility="hidden",m.position="absolute",m.whiteSpace="pre",g.isIE<8?m["font-family"]="inherit":m.font="inherit",m.overflow=y?"hidden":"visible"},h.prototype.checkForSizeChanges=function(m){if(m===void 0&&(m=this.$measureSizes()),m&&(this.$characterSize.width!==m.width||this.$characterSize.height!==m.height)){this.$measureNode.style.fontWeight="bold";var y=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=m,this.charSizes=Object.create(null),this.allowBoldFonts=y&&y.width===m.width&&y.height===m.height,this._emit("changeCharacterSize",{data:m})}},h.prototype.$addObserver=function(){var m=this;this.$observer=new window.ResizeObserver(function(y){m.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},h.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var m=this;return this.$pollSizeChangesTimer=a.onIdle(function y(){m.checkForSizeChanges(),a.onIdle(y,500)},500)},h.prototype.setPolling=function(m){m?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},h.prototype.$measureSizes=function(m){var y={height:(m||this.$measureNode).clientHeight,width:(m||this.$measureNode).clientWidth/o};return y.width===0||y.height===0?null:y},h.prototype.$measureCharWidth=function(m){this.$main.textContent=v.stringRepeat(m,o);var y=this.$main.getBoundingClientRect();return y.width/o},h.prototype.getCharacterWidth=function(m){var y=this.charSizes[m];return y===void 0&&(y=this.charSizes[m]=this.$measureCharWidth(m)/this.$characterSize.width),y},h.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},h.prototype.$getZoom=function(m){return!m||!m.parentElement?1:(Number(window.getComputedStyle(m).zoom)||1)*this.$getZoom(m.parentElement)},h.prototype.$initTransformMeasureNodes=function(){var m=function(y,x){return["div",{style:"position: absolute;top:"+y+"px;left:"+x+"px;"}]};this.els=f.buildDom([m(0,0),m(p,0),m(0,p),m(p,p)],this.el)},h.prototype.transformCoordinates=function(m,y){if(m){var x=this.$getZoom(this.el);m=C(1/x,m)}function T(K,X,oe){var ee=K[1]*X[0]-K[0]*X[1];return[(-X[1]*oe[0]+X[0]*oe[1])/ee,(+K[1]*oe[0]-K[0]*oe[1])/ee]}function S(K,X){return[K[0]-X[0],K[1]-X[1]]}function _(K,X){return[K[0]+X[0],K[1]+X[1]]}function C(K,X){return[K*X[0],K*X[1]]}this.els||this.$initTransformMeasureNodes();function L(K){var X=K.getBoundingClientRect();return[X.left,X.top]}var O=L(this.els[0]),M=L(this.els[1]),I=L(this.els[2]),B=L(this.els[3]),F=T(S(B,M),S(B,I),S(_(M,I),_(B,O))),N=C(1+F[0],S(M,O)),E=C(1+F[1],S(I,O));if(y){var A=y,D=F[0]*A[0]/p+F[1]*A[1]/p+1,j=_(C(A[0],N),C(A[1],E));return _(C(1/D/p,j),O)}var W=S(m,O),V=T(S(N,C(F[0],W)),S(E,C(F[1],W)),W);return C(p,V)},h})();s.prototype.$characterSize={width:0,height:0},u.implement(s.prototype,i),r.FontMetrics=s}),ace.define("ace/css/editor-css",["require","exports","module"],function(e,r,d){d.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,d){var u=e("../lib/dom"),f=e("../lib/oop"),v=e("../lib/event_emitter").EventEmitter,a=(function(){function g(i,o){this.renderer=o,this.pixelRatio=1,this.maxHeight=o.layerConfig.maxHeight,this.lineHeight=o.layerConfig.lineHeight,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},this.setScrollBarV(i)}return g.prototype.$createCanvas=function(){this.canvas=u.createElement("canvas"),this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7",this.canvas.style.position="absolute"},g.prototype.setScrollBarV=function(i){this.$createCanvas(),this.scrollbarV=i,i.element.appendChild(this.canvas),this.setDimensions()},g.prototype.$updateDecorators=function(i){if(typeof this.canvas.getContext!="function")return;var o=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;this.setDimensions(i);var c=this.canvas.getContext("2d");function p(N,E){return N.priority<E.priority?-1:N.priority>E.priority?1:0}var s=this.renderer.session.$annotations;if(c.clearRect(0,0,this.canvas.width,this.canvas.height),s){var h={info:1,warning:2,error:3};s.forEach(function(N){N.priority=h[N.type]||null}),s=s.sort(p);for(var m=0;m<s.length;m++){var y=s[m].row,x=this.getVerticalOffsetForRow(y),T=x+this.lineHeight,S=Math.round(this.heightRatio*x),_=Math.round(this.heightRatio*T),C=Math.round((S+_)/2),L=_-C;L<this.halfMinDecorationHeight&&(L=this.halfMinDecorationHeight),C-L<0&&(C=L),C+L>this.canvasHeight&&(C=this.canvasHeight-L);var O=C-L,M=C+L,I=M-O;c.fillStyle=o[s[m].type]||null,c.fillRect(0,O,Math.round(this.oneZoneWidth-1),I)}}var B=this.renderer.session.selection.getCursor();if(B){var F=Math.round(this.getVerticalOffsetForRow(B.row)*this.heightRatio);c.fillStyle="rgba(0, 0, 0, 0.5)",c.fillRect(0,F,this.canvasWidth,2)}},g.prototype.getVerticalOffsetForRow=function(i){i=i|0;var o=this.renderer.session.documentToScreenRow(i,0)*this.lineHeight;return o},g.prototype.setDimensions=function(i){i=i||this.renderer.layerConfig,this.maxHeight=i.maxHeight,this.lineHeight=i.lineHeight,this.canvasHeight=i.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},g.prototype.setZoneWidth=function(){this.oneZoneWidth=this.canvasWidth},g.prototype.destroy=function(){this.canvas.parentNode.removeChild(this.canvas)},g})();f.implement(a.prototype,v),r.Decorator=a}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent","ace/layer/text_util"],function(e,r,d){var u=e("./lib/oop"),f=e("./lib/dom"),v=e("./lib/lang"),a=e("./config"),g=e("./layer/gutter").Gutter,i=e("./layer/marker").Marker,o=e("./layer/text").Text,c=e("./layer/cursor").Cursor,p=e("./scrollbar").HScrollBar,s=e("./scrollbar").VScrollBar,h=e("./scrollbar_custom").HScrollBar,m=e("./scrollbar_custom").VScrollBar,y=e("./renderloop").RenderLoop,x=e("./layer/font_metrics").FontMetrics,T=e("./lib/event_emitter").EventEmitter,S=e("./css/editor-css"),_=e("./layer/decorators").Decorator,C=e("./lib/useragent"),L=e("./layer/text_util").isTextToken;f.importCssString(S,"ace_editor.css",!1);var O=(function(){function M(I,B){var F=this;this.container=I||f.createElement("div"),f.addCssClass(this.container,"ace_editor"),f.HI_DPI&&f.addCssClass(this.container,"ace_hidpi"),this.setTheme(B),a.get("useStrictCSP")==null&&a.set("useStrictCSP",!1),this.$gutter=f.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=f.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=f.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new g(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new i(this.content);var N=this.$textLayer=new o(this.content);this.canvas=N.element,this.$markerFront=new i(this.content),this.$cursorLayer=new c(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new s(this.container,this),this.scrollBarH=new p(this.container,this),this.scrollBarV.on("scroll",function(E){F.$scrollAnimation||F.session.setScrollTop(E.data-F.scrollMargin.top)}),this.scrollBarH.on("scroll",function(E){F.$scrollAnimation||F.session.setScrollLeft(E.data-F.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(E){F.updateCharacterSize(),F.onResize(!0,F.gutterWidth,F.$size.width,F.$size.height),F._signal("changeCharacterSize",E)}),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(),a.resetOptions(this),a._signal("renderer",this)}return M.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(),f.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},M.prototype.setSession=function(I){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=I,I&&this.scrollMargin.top&&I.getScrollTop()<=0&&I.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(I),this.$markerBack.setSession(I),this.$markerFront.setSession(I),this.$gutterLayer.setSession(I),this.$textLayer.setSession(I),I&&(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))},M.prototype.updateLines=function(I,B,F){if(B===void 0&&(B=1/0),this.$changedLines?(this.$changedLines.firstRow>I&&(this.$changedLines.firstRow=I),this.$changedLines.lastRow<B&&(this.$changedLines.lastRow=B)):this.$changedLines={firstRow:I,lastRow:B},this.$changedLines.lastRow<this.layerConfig.firstRow)if(F)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},M.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},M.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},M.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},M.prototype.updateFull=function(I){I?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},M.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},M.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},M.prototype.onResize=function(I,B,F,N){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=I?1:0;var E=this.container;N||(N=E.clientHeight||E.scrollHeight),!N&&this.$maxLines&&this.lineHeight>1&&(!E.style.height||E.style.height=="0px")&&(E.style.height="1px",N=E.clientHeight||E.scrollHeight),F||(F=E.clientWidth||E.scrollWidth);var A=this.$updateCachedSize(I,B,F,N);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!F&&!N)return this.resizing=0;I&&(this.$gutterLayer.$padding=null),I?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)}},M.prototype.$updateCachedSize=function(I,B,F,N){N-=this.$extraHeight||0;var E=0,A=this.$size,D={width:A.width,height:A.height,scrollerHeight:A.scrollerHeight,scrollerWidth:A.scrollerWidth};if(N&&(I||A.height!=N)&&(A.height=N,E|=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",E=E|this.CHANGE_SCROLL),F&&(I||A.width!=F)){E|=this.CHANGE_SIZE,A.width=F,B==null&&(B=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=B,f.setStyle(this.scrollBarH.element.style,"left",B+"px"),f.setStyle(this.scroller.style,"left",B+this.margin.left+"px"),A.scrollerWidth=Math.max(0,F-B-this.scrollBarV.getWidth()-this.margin.h),f.setStyle(this.$gutter.style,"left",this.margin.left+"px");var j=this.scrollBarV.getWidth()+"px";f.setStyle(this.scrollBarH.element.style,"right",j),f.setStyle(this.scroller.style,"right",j),f.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(A.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||I)&&(E|=this.CHANGE_FULL)}return A.$dirty=!F||!N,E&&this._signal("resize",D),E},M.prototype.onGutterResize=function(I){var B=this.$showGutter?I:0;B!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,B,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()},M.prototype.adjustWrapLimit=function(){var I=this.$size.scrollerWidth-this.$padding*2,B=Math.floor(I/this.characterWidth);return this.session.adjustWrapLimit(B,this.$showPrintMargin&&this.$printMarginColumn)},M.prototype.setAnimatedScroll=function(I){this.setOption("animatedScroll",I)},M.prototype.getAnimatedScroll=function(){return this.$animatedScroll},M.prototype.setShowInvisibles=function(I){this.setOption("showInvisibles",I),this.session.$bidiHandler.setShowInvisibles(I)},M.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},M.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},M.prototype.setDisplayIndentGuides=function(I){this.setOption("displayIndentGuides",I)},M.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},M.prototype.setHighlightIndentGuides=function(I){this.setOption("highlightIndentGuides",I)},M.prototype.setShowPrintMargin=function(I){this.setOption("showPrintMargin",I)},M.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},M.prototype.setPrintMarginColumn=function(I){this.setOption("printMarginColumn",I)},M.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},M.prototype.getShowGutter=function(){return this.getOption("showGutter")},M.prototype.setShowGutter=function(I){return this.setOption("showGutter",I)},M.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},M.prototype.setFadeFoldWidgets=function(I){this.setOption("fadeFoldWidgets",I)},M.prototype.setHighlightGutterLine=function(I){this.setOption("highlightGutterLine",I)},M.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},M.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var I=f.createElement("div");I.className="ace_layer ace_print-margin-layer",this.$printMarginEl=f.createElement("div"),this.$printMarginEl.className="ace_print-margin",I.appendChild(this.$printMarginEl),this.content.insertBefore(I,this.content.firstChild)}var B=this.$printMarginEl.style;B.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",B.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},M.prototype.getContainerElement=function(){return this.container},M.prototype.getMouseEventTarget=function(){return this.scroller},M.prototype.getTextAreaContainer=function(){return this.container},M.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var I=this.textarea.style,B=this.$composition;if(!this.$keepTextAreaAtCursor&&!B){f.translate(this.textarea,-100,0);return}var F=this.$cursorLayer.$pixelPos;if(F){B&&B.markerRange&&(F=this.$cursorLayer.getPixelPosition(B.markerRange.start,!0));var N=this.layerConfig,E=F.top,A=F.left;E-=N.offset;var D=B&&B.useTextareaForIME||C.isMobile?this.lineHeight:1;if(E<0||E>N.height-D){f.translate(this.textarea,0,0);return}var j=1,W=this.$size.height-D;if(!B)E+=this.lineHeight;else if(B.useTextareaForIME){var V=this.textarea.value;j=this.characterWidth*this.session.$getStringScreenWidth(V)[0]}else E+=this.lineHeight+2;A-=this.scrollLeft,A>this.$size.scrollerWidth-j&&(A=this.$size.scrollerWidth-j),A+=this.gutterWidth+this.margin.left,f.setStyle(I,"height",D+"px"),f.setStyle(I,"width",j+"px"),f.translate(this.textarea,Math.min(A,this.$size.scrollerWidth-j),Math.min(E,W))}}},M.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},M.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},M.prototype.getLastFullyVisibleRow=function(){var I=this.layerConfig,B=I.lastRow,F=this.session.documentToScreenRow(B,0)*I.lineHeight;return F-this.session.getScrollTop()>I.height-I.lineHeight?B-1:B},M.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},M.prototype.setPadding=function(I){this.$padding=I,this.$textLayer.setPadding(I),this.$cursorLayer.setPadding(I),this.$markerFront.setPadding(I),this.$markerBack.setPadding(I),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},M.prototype.setScrollMargin=function(I,B,F,N){var E=this.scrollMargin;E.top=I|0,E.bottom=B|0,E.right=N|0,E.left=F|0,E.v=E.top+E.bottom,E.h=E.left+E.right,E.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-E.top),this.updateFull()},M.prototype.setMargin=function(I,B,F,N){var E=this.margin;E.top=I|0,E.bottom=B|0,E.right=N|0,E.left=F|0,E.v=E.top+E.bottom,E.h=E.left+E.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},M.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},M.prototype.setHScrollBarAlwaysVisible=function(I){this.setOption("hScrollBarAlwaysVisible",I)},M.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},M.prototype.setVScrollBarAlwaysVisible=function(I){this.setOption("vScrollBarAlwaysVisible",I)},M.prototype.$updateScrollBarV=function(){var I=this.layerConfig.maxHeight,B=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(I-=(B-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>I-B&&(I=this.scrollTop+B,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(I+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},M.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},M.prototype.freeze=function(){this.$frozen=!0},M.prototype.unfreeze=function(){this.$frozen=!1},M.prototype.$renderChanges=function(I,B){if(this.$changes&&(I|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!I&&!B){this.$changes|=I;return}if(this.$size.$dirty)return this.$changes|=I,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",I),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var F=this.layerConfig;if(I&this.CHANGE_FULL||I&this.CHANGE_SIZE||I&this.CHANGE_TEXT||I&this.CHANGE_LINES||I&this.CHANGE_SCROLL||I&this.CHANGE_H_SCROLL){if(I|=this.$computeLayerConfig()|this.$loop.clear(),F.firstRow!=this.layerConfig.firstRow&&F.firstRowScreen==this.layerConfig.firstRowScreen){var N=this.scrollTop+(F.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;N>0&&(this.scrollTop=N,I=I|this.CHANGE_SCROLL,I|=this.$computeLayerConfig()|this.$loop.clear())}F=this.layerConfig,this.$updateScrollBarV(),I&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),f.translate(this.content,-this.scrollLeft,-F.offset);var E=F.width+2*this.$padding+"px",A=F.minHeight+"px";f.setStyle(this.content.style,"width",E),f.setStyle(this.content.style,"height",A)}if(I&this.CHANGE_H_SCROLL&&(f.translate(this.content,-this.scrollLeft,-F.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),I&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(F),this.$showGutter&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F),this.$markerBack.update(F),this.$markerFront.update(F),this.$cursorLayer.update(F),this.$moveTextAreaToCursor(),this._signal("afterRender",I);return}if(I&this.CHANGE_SCROLL){this.$changedLines=null,I&this.CHANGE_TEXT||I&this.CHANGE_LINES?this.$textLayer.update(F):this.$textLayer.scrollLines(F),this.$showGutter&&(I&this.CHANGE_GUTTER||I&this.CHANGE_LINES?this.$gutterLayer.update(F):this.$gutterLayer.scrollLines(F)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F),this.$markerBack.update(F),this.$markerFront.update(F),this.$cursorLayer.update(F),this.$moveTextAreaToCursor(),this._signal("afterRender",I);return}I&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(F),this.$showGutter&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)):I&this.CHANGE_LINES?((this.$updateLines()||I&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)):I&this.CHANGE_TEXT||I&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)):I&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)),I&this.CHANGE_CURSOR&&(this.$cursorLayer.update(F),this.$moveTextAreaToCursor()),I&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(F),I&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(F),this._signal("afterRender",I)},M.prototype.$autosize=function(){var I=this.session.getScreenLength()*this.lineHeight,B=this.$maxLines*this.lineHeight,F=Math.min(B,Math.max((this.$minLines||1)*this.lineHeight,I))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(F+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&F>this.$maxPixelHeight&&(F=this.$maxPixelHeight);var N=F<=2*this.lineHeight,E=!N&&I>B;if(F!=this.desiredHeight||this.$size.height!=this.desiredHeight||E!=this.$vScroll){E!=this.$vScroll&&(this.$vScroll=E,this.scrollBarV.setVisible(E));var A=this.container.clientWidth;this.container.style.height=F+"px",this.$updateCachedSize(!0,this.$gutterWidth,A,F),this.desiredHeight=F,this._signal("autosize")}},M.prototype.$computeLayerConfig=function(){var I=this.session,B=this.$size,F=B.height<=2*this.lineHeight,N=this.session.getScreenLength(),E=N*this.lineHeight,A=this.$getLongestLine(),D=!F&&(this.$hScrollBarAlwaysVisible||B.scrollerWidth-A-2*this.$padding<0),j=this.$horizScroll!==D;j&&(this.$horizScroll=D,this.scrollBarH.setVisible(D));var W=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),F=B.height<=2*this.lineHeight);var V=B.scrollerHeight+this.lineHeight,K=!this.$maxLines&&this.$scrollPastEnd?(B.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;E+=K;var X=this.scrollMargin;this.session.setScrollTop(Math.max(-X.top,Math.min(this.scrollTop,E-B.scrollerHeight+X.bottom))),this.session.setScrollLeft(Math.max(-X.left,Math.min(this.scrollLeft,A+2*this.$padding-B.scrollerWidth+X.right)));var oe=!F&&(this.$vScrollBarAlwaysVisible||B.scrollerHeight-E+K<0||this.scrollTop>X.top),ee=W!==oe;ee&&(this.$vScroll=oe,this.scrollBarV.setVisible(oe));var le=this.scrollTop%this.lineHeight,ue=Math.ceil(V/this.lineHeight)-1,ne=Math.max(0,Math.round((this.scrollTop-le)/this.lineHeight)),fe=ne+ue,Se,Te,Re=this.lineHeight;ne=I.screenToDocumentRow(ne,0);var Ve=I.getFoldLine(ne);Ve&&(ne=Ve.start.row),Se=I.documentToScreenRow(ne,0),Te=I.getRowLength(ne)*Re,fe=Math.min(I.screenToDocumentRow(fe,0),I.getLength()-1),V=B.scrollerHeight+I.getRowLength(fe)*Re+Te,le=this.scrollTop-Se*Re,le<0&&Se>0&&(Se=Math.max(0,Se+Math.floor(le/Re)),le=this.scrollTop-Se*Re);var Ue=0;return(this.layerConfig.width!=A||j)&&(Ue=this.CHANGE_H_SCROLL),(j||ee)&&(Ue|=this.$updateCachedSize(!0,this.gutterWidth,B.width,B.height),this._signal("scrollbarVisibilityChanged"),ee&&(A=this.$getLongestLine())),this.layerConfig={width:A,padding:this.$padding,firstRow:ne,firstRowScreen:Se,lastRow:fe,lineHeight:Re,characterWidth:this.characterWidth,minHeight:V,maxHeight:E,offset:le,gutterOffset:Re?Math.max(0,Math.ceil((le+B.height-B.scrollerHeight)/Re)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(A-this.$padding),Ue},M.prototype.$updateLines=function(){if(this.$changedLines){var I=this.$changedLines.firstRow,B=this.$changedLines.lastRow;this.$changedLines=null;var F=this.layerConfig;if(!(I>F.lastRow+1)&&!(B<F.firstRow)){if(B===1/0){this.$showGutter&&this.$gutterLayer.update(F),this.$textLayer.update(F);return}return this.$textLayer.updateLines(F,I,B),!0}}},M.prototype.$getLongestLine=function(){var I=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(I+=1),this.$textLayer&&I>this.$textLayer.MAX_LINE_LENGTH&&(I=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(I*this.characterWidth))},M.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},M.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},M.prototype.addGutterDecoration=function(I,B){this.$gutterLayer.addGutterDecoration(I,B)},M.prototype.removeGutterDecoration=function(I,B){this.$gutterLayer.removeGutterDecoration(I,B)},M.prototype.updateBreakpoints=function(I){this._rows=I,this.$loop.schedule(this.CHANGE_GUTTER)},M.prototype.setAnnotations=function(I){this.$gutterLayer.setAnnotations(I),this.$loop.schedule(this.CHANGE_GUTTER)},M.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},M.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},M.prototype.showCursor=function(){this.$cursorLayer.showCursor()},M.prototype.scrollSelectionIntoView=function(I,B,F){this.scrollCursorIntoView(I,F),this.scrollCursorIntoView(B,F)},M.prototype.scrollCursorIntoView=function(I,B,F){if(this.$size.scrollerHeight!==0){var N=this.$cursorLayer.getPixelPosition(I),E=N.left,A=N.top,D=F&&F.top||0,j=F&&F.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var W=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;W+D>A?(B&&W+D>A+this.lineHeight&&(A-=B*this.$size.scrollerHeight),A===0&&(A=-this.scrollMargin.top),this.session.setScrollTop(A)):W+this.$size.scrollerHeight-j<A+this.lineHeight&&(B&&W+this.$size.scrollerHeight-j<A-this.lineHeight&&(A+=B*this.$size.scrollerHeight),this.session.setScrollTop(A+this.lineHeight+j-this.$size.scrollerHeight));var V=this.scrollLeft,K=2*this.layerConfig.characterWidth;E-K<V?(E-=K,E<this.$padding+K&&(E=-this.scrollMargin.left),this.session.setScrollLeft(E)):(E+=K,V+this.$size.scrollerWidth<E+this.characterWidth?this.session.setScrollLeft(Math.round(E+this.characterWidth-this.$size.scrollerWidth)):V<=this.$padding&&E-V<this.characterWidth&&this.session.setScrollLeft(0))}},M.prototype.getScrollTop=function(){return this.session.getScrollTop()},M.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},M.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},M.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},M.prototype.scrollToRow=function(I){this.session.setScrollTop(I*this.lineHeight)},M.prototype.alignCursor=function(I,B){typeof I=="number"&&(I={row:I,column:0});var F=this.$cursorLayer.getPixelPosition(I),N=this.$size.scrollerHeight-this.lineHeight,E=F.top-N*(B||0);return this.session.setScrollTop(E),E},M.prototype.$calcSteps=function(I,B){var F=0,N=this.STEPS,E=[],A=function(D,j,W){return W*(Math.pow(D-1,3)+1)+j};for(F=0;F<N;++F)E.push(A(F/this.STEPS,I,B-I));return E},M.prototype.scrollToLine=function(I,B,F,N){var E=this.$cursorLayer.getPixelPosition({row:I,column:0}),A=E.top;B&&(A-=this.$size.scrollerHeight/2);var D=this.scrollTop;this.session.setScrollTop(A),F!==!1&&this.animateScrolling(D,N)},M.prototype.animateScrolling=function(I,B){var F=this.scrollTop;if(!this.$animatedScroll)return;var N=this;if(I==F)return;if(this.$scrollAnimation){var E=this.$scrollAnimation.steps;if(E.length&&(I=E[0],I==F))return}var A=N.$calcSteps(I,F);this.$scrollAnimation={from:I,to:F,steps:A},clearInterval(this.$timer),N.session.setScrollTop(A.shift()),N.session.$scrollTop=F;function D(){N.$timer=clearInterval(N.$timer),N.$scrollAnimation=null,N.$stopAnimation=!1,B&&B()}this.$timer=setInterval(function(){if(N.$stopAnimation){D();return}if(!N.session)return clearInterval(N.$timer);A.length?(N.session.setScrollTop(A.shift()),N.session.$scrollTop=F):F!=null?(N.session.$scrollTop=-1,N.session.setScrollTop(F),F=null):D()},10)},M.prototype.scrollToY=function(I){this.scrollTop!==I&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=I)},M.prototype.scrollToX=function(I){this.scrollLeft!==I&&(this.scrollLeft=I),this.$loop.schedule(this.CHANGE_H_SCROLL)},M.prototype.scrollTo=function(I,B){this.session.setScrollTop(B),this.session.setScrollLeft(I)},M.prototype.scrollBy=function(I,B){B&&this.session.setScrollTop(this.session.getScrollTop()+B),I&&this.session.setScrollLeft(this.session.getScrollLeft()+I)},M.prototype.isScrollableBy=function(I,B){if(B<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||B>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||I<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||I>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},M.prototype.pixelToScreenCoordinates=function(I,B){var F;if(this.$hasCssTransforms){F={top:0,left:0};var N=this.$fontMetrics.transformCoordinates([I,B]);I=N[1]-this.gutterWidth-this.margin.left,B=N[0]}else F=this.scroller.getBoundingClientRect();var E=I+this.scrollLeft-F.left-this.$padding,A=E/this.characterWidth,D=Math.floor((B+this.scrollTop-F.top)/this.lineHeight),j=this.$blockCursor?Math.floor(A):Math.round(A);return{row:D,column:j,side:A-j>0?1:-1,offsetX:E}},M.prototype.screenToTextCoordinates=function(I,B){var F;if(this.$hasCssTransforms){F={top:0,left:0};var N=this.$fontMetrics.transformCoordinates([I,B]);I=N[1]-this.gutterWidth-this.margin.left,B=N[0]}else F=this.scroller.getBoundingClientRect();var E=I+this.scrollLeft-F.left-this.$padding,A=E/this.characterWidth,D=this.$blockCursor?Math.floor(A):Math.round(A),j=(B+this.scrollTop-F.top)/this.lineHeight;return this.session.screenToDocumentPosition(j,Math.max(D,0),E)},M.prototype.textToScreenCoordinates=function(I,B){var F=this.scroller.getBoundingClientRect(),N=this.session.documentToScreenPosition(I,B),E=this.$padding+(this.session.$bidiHandler.isBidiRow(N.row,I)?this.session.$bidiHandler.getPosLeft(N.column):Math.round(N.column*this.characterWidth)),A=N.row*this.lineHeight;return{pageX:F.left+E-this.scrollLeft,pageY:F.top+A-this.scrollTop}},M.prototype.visualizeFocus=function(){f.addCssClass(this.container,"ace_focus")},M.prototype.visualizeBlur=function(){f.removeCssClass(this.container,"ace_focus")},M.prototype.showComposition=function(I){this.$composition=I,I.cssText||(I.cssText=this.textarea.style.cssText),I.useTextareaForIME==null&&(I.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(f.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):I.markerId=this.session.addMarker(I.markerRange,"ace_composition_marker","text")},M.prototype.setCompositionText=function(I){var B=this.session.selection.cursor;this.addToken(I,"composition_placeholder",B.row,B.column),this.$moveTextAreaToCursor()},M.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),f.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var I=this.session.selection.cursor;this.removeExtraToken(I.row,I.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},M.prototype.setGhostText=function(I,B){var F=this.session.selection.cursor,N=B||{row:F.row,column:F.column};this.removeGhostText();var E=this.$calculateWrappedTextChunks(I,N);this.addToken(E[0].text,"ghost_text",N.row,N.column),this.$ghostText={text:I,position:{row:N.row,column:N.column}};var A=f.createElement("div");if(E.length>1){var D=this.hideTokensAfterPosition(N.row,N.column),j;E.slice(1).forEach(function(ee){var le=f.createElement("div"),ue=f.createElement("span");ue.className="ace_ghost_text",ee.wrapped&&(le.className="ghost_text_line_wrapped"),ee.text.length===0&&(ee.text=" "),ue.appendChild(f.createTextNode(ee.text)),le.appendChild(ue),A.appendChild(le),j=le}),D.forEach(function(ee){var le=f.createElement("span");L(ee.type)||(le.className="ace_"+ee.type.replace(/\./g," ace_")),le.appendChild(f.createTextNode(ee.value)),j.appendChild(le)}),this.$ghostTextWidget={el:A,row:N.row,column:N.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var W=this.$cursorLayer.getPixelPosition(N,!0),V=this.container,K=V.getBoundingClientRect().height,X=E.length*this.lineHeight,oe=X<K-W.top;if(oe)return;X<K?this.scrollBy(0,(E.length-1)*this.lineHeight):this.scrollToRow(N.row)}},M.prototype.$calculateWrappedTextChunks=function(I,B){var F=this.$size.scrollerWidth-this.$padding*2,N=Math.floor(F/this.characterWidth)-2;N=N<=0?60:N;for(var E=I.split(/\r?\n/),A=[],D=0;D<E.length;D++){var j=this.session.$getDisplayTokens(E[D],B.column),W=this.session.$computeWrapSplits(j,N,this.session.$tabSize);if(W.length>0){var V=0;W.push(E[D].length);for(var K=0;K<W.length;K++){var X=E[D].slice(V,W[K]);A.push({text:X,wrapped:!0}),V=W[K]}}else A.push({text:E[D],wrapped:!1})}return A},M.prototype.removeGhostText=function(){if(this.$ghostText){var I=this.$ghostText.position;this.removeExtraToken(I.row,I.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},M.prototype.addToken=function(I,B,F,N){var E=this.session;E.bgTokenizer.lines[F]=null;var A={type:B,value:I},D=E.getTokens(F);if(N==null||!D.length)D.push(A);else for(var j=0,W=0;W<D.length;W++){var V=D[W];if(j+=V.value.length,N<=j){var K=V.value.length-(j-N),X=V.value.slice(0,K),oe=V.value.slice(K);D.splice(W,1,{type:V.type,value:X},A,{type:V.type,value:oe});break}}this.updateLines(F,F)},M.prototype.hideTokensAfterPosition=function(I,B){for(var F=this.session.getTokens(I),N=0,E=!1,A=[],D=0;D<F.length;D++){var j=F[D];if(N+=j.value.length,j.type!=="ghost_text"){if(E){A.push({type:j.type,value:j.value}),j.type="hidden_token";continue}N===B&&(E=!0)}}return this.updateLines(I,I),A},M.prototype.removeExtraToken=function(I,B){this.session.bgTokenizer.lines[I]=null,this.updateLines(I,I)},M.prototype.setTheme=function(I,B){var F=this;if(this.$themeId=I,F._dispatchEvent("themeChange",{theme:I}),!I||typeof I=="string"){var N=I||this.$options.theme.initialValue;a.loadModule(["theme",N],E)}else E(I);function E(A){if(F.$themeId!=I)return B&&B();if(!A||!A.cssClass)throw new Error("couldn't load module "+I+" or it didn't call define");A.$id&&(F.$themeId=A.$id),f.importCssString(A.cssText,A.cssClass,F.container),F.theme&&f.removeCssClass(F.container,F.theme.cssClass);var D="padding"in A?A.padding:"padding"in(F.theme||{})?4:F.$padding;if(F.$padding&&D!=F.$padding&&F.setPadding(D),F.$gutterLayer){var j=A.$showGutterCursorMarker;j&&!F.$gutterLayer.$showCursorMarker?F.$gutterLayer.$showCursorMarker="theme":!j&&F.$gutterLayer.$showCursorMarker=="theme"&&(F.$gutterLayer.$showCursorMarker=null)}F.$theme=A.cssClass,F.theme=A,f.addCssClass(F.container,A.cssClass),f.setCssClass(F.container,"ace_dark",A.isDark),F.$size&&(F.$size.width=0,F.$updateSizeAsync()),F._dispatchEvent("themeLoaded",{theme:A}),B&&B(),C.isSafari&&F.scroller&&(F.scroller.style.background="red",F.scroller.style.background="")}},M.prototype.getTheme=function(){return this.$themeId},M.prototype.setStyle=function(I,B){f.setCssClass(this.container,I,B!==!1)},M.prototype.unsetStyle=function(I){f.removeCssClass(this.container,I)},M.prototype.setCursorStyle=function(I){f.setStyle(this.scroller.style,"cursor",I)},M.prototype.setMouseCursor=function(I){f.setStyle(this.scroller.style,"cursor",I)},M.prototype.attachToShadowRoot=function(){f.importCssString(S,"ace_editor.css",this.container)},M.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},M.prototype.$updateCustomScrollbar=function(I){var B=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),I===!0?(this.scrollBarV=new m(this.container,this),this.scrollBarH=new h(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(F){B.$scrollAnimation||B.session.setScrollTop(F.data-B.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(F){B.$scrollAnimation||B.session.setScrollLeft(F.data-B.scrollMargin.left)}),this.$scrollDecorator?(this.$scrollDecorator.setScrollBarV(this.scrollBarV),this.$scrollDecorator.$updateDecorators()):(this.$scrollDecorator=new _(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators())):(this.scrollBarV=new s(this.container,this),this.scrollBarH=new p(this.container,this),this.scrollBarV.addEventListener("scroll",function(F){B.$scrollAnimation||B.session.setScrollTop(F.data-B.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(F){B.$scrollAnimation||B.session.setScrollLeft(F.data-B.scrollMargin.left)}))},M.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var I=this;this.$resizeTimer=v.delayedCall(function(){I.destroyed||I.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(B){var F=B[0].contentRect.width,N=B[0].contentRect.height;Math.abs(I.$size.width-F)>1||Math.abs(I.$size.height-N)>1?I.$resizeTimer.delay():I.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},M})();O.prototype.CHANGE_CURSOR=1,O.prototype.CHANGE_MARKER=2,O.prototype.CHANGE_GUTTER=4,O.prototype.CHANGE_SCROLL=8,O.prototype.CHANGE_LINES=16,O.prototype.CHANGE_TEXT=32,O.prototype.CHANGE_SIZE=64,O.prototype.CHANGE_MARKER_BACK=128,O.prototype.CHANGE_MARKER_FRONT=256,O.prototype.CHANGE_FULL=512,O.prototype.CHANGE_H_SCROLL=1024,O.prototype.$changes=0,O.prototype.$padding=null,O.prototype.$frozen=!1,O.prototype.STEPS=8,u.implement(O.prototype,T),a.defineOptions(O.prototype,"renderer",{useResizeObserver:{set:function(M){!M&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):M&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(M){this.$textLayer.setShowInvisibles(M)&&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(M){typeof M=="number"&&(this.$printMarginColumn=M),this.$showPrintMargin=!!M,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(M){this.$gutter.style.display=M?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(M){this.$gutterLayer.$useSvgGutterIcons=M},initialValue:!1},showFoldedAnnotations:{set:function(M){this.$gutterLayer.$showFoldedAnnotations=M},initialValue:!1},fadeFoldWidgets:{set:function(M){f.setCssClass(this.$gutter,"ace_fade-fold-widgets",M)},initialValue:!1},showFoldWidgets:{set:function(M){this.$gutterLayer.setShowFoldWidgets(M),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(M){this.$textLayer.setDisplayIndentGuides(M)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(M){this.$textLayer.setHighlightIndentGuides(M)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(M){this.$gutterLayer.setHighlightGutterLine(M),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(M){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(M){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(M){typeof M=="number"&&(M=M+"px"),this.container.style.fontSize=M,this.updateFontSize()},initialValue:12},fontFamily:{set:function(M){this.container.style.fontFamily=M,this.updateFontSize()}},maxLines:{set:function(M){this.updateFull()}},minLines:{set:function(M){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(M){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(M){M=+M||0,this.$scrollPastEnd!=M&&(this.$scrollPastEnd=M,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(M){this.$gutterLayer.$fixedWidth=!!M,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(M){this.$updateCustomScrollbar(M)},initialValue:!1},theme:{set:function(M){this.setTheme(M)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!C.isMobile&&!C.isIE}}),r.VirtualRenderer=O}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(e,r,d){var u=e("../lib/oop"),f=e("../lib/net"),v=e("../lib/event_emitter").EventEmitter,a=e("../config");function g(p){var s="importScripts('"+f.qualifyURL(p)+"');";try{return new Blob([s],{type:"application/javascript"})}catch{var h=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,m=new h;return m.append(s),m.getBlob("application/javascript")}}function i(p){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(a.get("loadWorkerFromBlob")){var s=g(p),h=window.URL||window.webkitURL,m=h.createObjectURL(s);return new Worker(m)}return new Worker(p)}var o=function(p){p.postMessage||(p=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=p,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(){u.implement(this,v),this.$createWorkerFromOldConfig=function(p,s,h,m,y){if(e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),a.get("packaged")||!e.toUrl)m=m||a.moduleUrl(s,"worker");else{var x=this.$normalizePath;m=m||x(e.toUrl("ace/worker/worker.js",null,"_"));var T={};p.forEach(function(S){T[S]=x(e.toUrl(S,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=i(m),y&&this.send("importScripts",y),this.$worker.postMessage({init:!0,tlns:T,module:s,classname:h}),this.$worker},this.onMessage=function(p){var s=p.data;switch(s.type){case"event":this._signal(s.name,{data:s.data});break;case"call":var h=this.callbacks[s.id];h&&(h(s.data),delete this.callbacks[s.id]);break;case"error":this.reportError(s.data);break;case"log":window.console&&console.log&&console.log.apply(console,s.data);break}},this.reportError=function(p){window.console&&console.error&&console.error(p)},this.$normalizePath=function(p){return f.qualifyURL(p)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(p){p.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(p,s){this.$worker.postMessage({command:p,args:s})},this.call=function(p,s,h){if(h){var m=this.callbackId++;this.callbacks[m]=h,s.push(m)}this.send(p,s)},this.emit=function(p,s){try{s.data&&s.data.err&&(s.data.err={message:s.data.err.message,stack:s.data.err.stack,code:s.data.err.code}),this.$worker&&this.$worker.postMessage({event:p,data:{data:s.data}})}catch(h){console.error(h.stack)}},this.attachToDocument=function(p){this.$doc&&this.terminate(),this.$doc=p,this.call("setValue",[p.getValue()]),p.on("change",this.changeListener,!0)},this.changeListener=function(p){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),p.action=="insert"?this.deltaQueue.push(p.start,p.lines):this.deltaQueue.push(p.start,p.end)},this.$sendDeltaQueue=function(){var p=this.deltaQueue;p&&(this.deltaQueue=null,p.length>50&&p.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:p}))}}).call(o.prototype);var c=function(p,s,h){var m=null,y=!1,x=Object.create(v),T=[],S=new o({messageBuffer:T,terminate:function(){},postMessage:function(C){T.push(C),m&&(y?setTimeout(_):_())}});S.setEmitSync=function(C){y=C};var _=function(){var C=T.shift();C.command?m[C.command].apply(m,C.args):C.event&&x._signal(C.event,C.data)};return x.postMessage=function(C){S.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})},a.loadModule(["worker",s],function(C){for(m=new C[h](x);T.length;)_()}),S};r.UIWorkerClient=c,r.WorkerClient=o,r.createWorker=i}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,r,d){var u=e("./range").Range,f=e("./lib/event_emitter").EventEmitter,v=e("./lib/oop"),a=(function(){function g(i,o,c,p,s,h){var m=this;this.length=o,this.session=i,this.doc=i.getDocument(),this.mainClass=s,this.othersClass=h,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=p,this.$onCursorChange=function(){setTimeout(function(){m.onCursorChange()})},this.$pos=c;var y=i.getUndoManager().$undoStack||i.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=y.length,this.setup(),i.selection.on("changeCursor",this.$onCursorChange)}return g.prototype.setup=function(){var i=this,o=this.doc,c=this.session;this.selectionBefore=c.selection.toJSON(),c.selection.inMultiSelectMode&&c.selection.toSingleRange(),this.pos=o.createAnchor(this.$pos.row,this.$pos.column);var p=this.pos;p.$insertRight=!0,p.detach(),p.markerId=c.addMarker(new u(p.row,p.column,p.row,p.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(s){var h=o.createAnchor(s.row,s.column);h.$insertRight=!0,h.detach(),i.others.push(h)}),c.setUndoSelect(!1)},g.prototype.showOtherMarkers=function(){if(!this.othersActive){var i=this.session,o=this;this.othersActive=!0,this.others.forEach(function(c){c.markerId=i.addMarker(new u(c.row,c.column,c.row,c.column+o.length),o.othersClass,null,!1)})}},g.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var i=0;i<this.others.length;i++)this.session.removeMarker(this.others[i].markerId)}},g.prototype.onUpdate=function(i){if(this.$updating)return this.updateAnchors(i);var o=i;if(o.start.row===o.end.row&&o.start.row===this.pos.row){this.$updating=!0;var c=i.action==="insert"?o.end.column-o.start.column:o.start.column-o.end.column,p=o.start.column>=this.pos.column&&o.start.column<=this.pos.column+this.length+1,s=o.start.column-this.pos.column;if(this.updateAnchors(i),p&&(this.length+=c),p&&!this.session.$fromUndo){if(i.action==="insert")for(var h=this.others.length-1;h>=0;h--){var m=this.others[h],y={row:m.row,column:m.column+s};this.doc.insertMergedLines(y,i.lines)}else if(i.action==="remove")for(var h=this.others.length-1;h>=0;h--){var m=this.others[h],y={row:m.row,column:m.column+s};this.doc.remove(new u(y.row,y.column,y.row,y.column-c))}}this.$updating=!1,this.updateMarkers()}},g.prototype.updateAnchors=function(i){this.pos.onChange(i);for(var o=this.others.length;o--;)this.others[o].onChange(i);this.updateMarkers()},g.prototype.updateMarkers=function(){if(!this.$updating){var i=this,o=this.session,c=function(s,h){o.removeMarker(s.markerId),s.markerId=o.addMarker(new u(s.row,s.column,s.row,s.column+i.length),h,null,!1)};c(this.pos,this.mainClass);for(var p=this.others.length;p--;)c(this.others[p],this.othersClass)}},g.prototype.onCursorChange=function(i){if(!(this.$updating||!this.session)){var o=this.session.selection.getCursor();o.row===this.pos.row&&o.column>=this.pos.column&&o.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",i)):(this.hideOtherMarkers(),this._emit("cursorLeave",i))}},g.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},g.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var i=this.session.getUndoManager(),o=(i.$undoStack||i.$undostack).length-this.$undoStackDepth,c=0;c<o;c++)i.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},g})();v.implement(a.prototype,f),r.PlaceHolder=a}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,r,d){var u=e("../lib/event"),f=e("../lib/useragent");function v(g,i){return g.row==i.row&&g.column==i.column}function a(g){var i=g.domEvent,o=i.altKey,c=i.shiftKey,p=i.ctrlKey,s=g.getAccelKey(),h=g.getButton();if(p&&f.isMac&&(h=i.button),g.editor.inMultiSelectMode&&h==2){g.editor.textInput.onContextMenu(g.domEvent);return}if(!p&&!o&&!s){h===0&&g.editor.inMultiSelectMode&&g.editor.exitMultiSelectMode();return}if(h===0){var m=g.editor,y=m.selection,x=m.inMultiSelectMode,T=g.getDocumentPosition(),S=y.getCursor(),_=g.inSelection()||y.isEmpty()&&v(T,S),C=g.x,L=g.y,O=function(X){C=X.clientX,L=X.clientY},M=m.session,I=m.renderer.pixelToScreenCoordinates(C,L),B=I,F;if(m.$mouseHandler.$enableJumpToDef)p&&o||s&&o?F=c?"block":"add":o&&m.$blockSelectEnabled&&(F="block");else if(s&&!o){if(F="add",!x&&c)return}else o&&m.$blockSelectEnabled&&(F="block");if(F&&f.isMac&&i.ctrlKey&&m.$mouseHandler.cancelContextMenu(),F=="add"){if(!x&&_)return;if(!x){var N=y.toOrientedRange();m.addSelectionMarker(N)}var E=y.rangeList.rangeAtPoint(T);m.inVirtualSelectionMode=!0,c&&(E=null,N=y.ranges[0]||N,m.removeSelectionMarker(N)),m.once("mouseup",function(){var X=y.toOrientedRange();E&&X.isEmpty()&&v(E.cursor,X.cursor)?y.substractPoint(X.cursor):(c?y.substractPoint(N.cursor):N&&(m.removeSelectionMarker(N),y.addRange(N)),y.addRange(X)),m.inVirtualSelectionMode=!1})}else if(F=="block"){g.stop(),m.inVirtualSelectionMode=!0;var A,D=[],j=function(){var X=m.renderer.pixelToScreenCoordinates(C,L),oe=M.screenToDocumentPosition(X.row,X.column,X.offsetX);v(B,X)&&v(oe,y.lead)||(B=X,m.selection.moveToPosition(oe),m.renderer.scrollCursorIntoView(),m.removeSelectionMarkers(D),D=y.rectangularRangeBlock(B,I),m.$mouseHandler.$clickSelection&&D.length==1&&D[0].isEmpty()&&(D[0]=m.$mouseHandler.$clickSelection.clone()),D.forEach(m.addSelectionMarker,m),m.updateSelectionMarkers())};x&&!s?y.toSingleRange():!x&&s&&(A=y.toOrientedRange(),m.addSelectionMarker(A)),c?I=M.documentToScreenPosition(y.lead):y.moveToPosition(T),B={row:-1,column:-1};var W=function(X){j(),clearInterval(K),m.removeSelectionMarkers(D),D.length||(D=[y.toOrientedRange()]),A&&(m.removeSelectionMarker(A),y.toSingleRange(A));for(var oe=0;oe<D.length;oe++)y.addRange(D[oe]);m.inVirtualSelectionMode=!1,m.$mouseHandler.$clickSelection=null},V=j;u.capture(m.container,O,W);var K=setInterval(function(){V()},20);return g.preventDefault()}}}r.onMouseDown=a}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(e,r,d){r.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(f){f.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(f){f.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(f){f.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(f){f.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(f){f.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(f){f.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(f){f.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(f){f.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(f){f.multiSelect.rangeCount>1?f.multiSelect.joinSelections():f.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(f){f.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(f){f.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(f){f.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(f){f.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(f){return f&&f.inMultiSelectMode}}];var u=e("../keyboard/hash_handler").HashHandler;r.keyboardHandler=new u(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,d){var u=e("./range_list").RangeList,f=e("./range").Range,v=e("./selection").Selection,a=e("./mouse/multi_select_handler").onMouseDown,g=e("./lib/event"),i=e("./lib/lang"),o=e("./commands/multi_select_commands");r.commands=o.defaultCommands.concat(o.multiSelectCommands);var c=e("./search").Search,p=new c;function s(S,_,C){return p.$options.wrap=!0,p.$options.needle=_,p.$options.backwards=C==-1,p.find(S)}var h=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(h.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(S,_){if(S){if(!this.inMultiSelectMode&&this.rangeCount===0){var C=this.toOrientedRange();if(this.rangeList.add(C),this.rangeList.add(S),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),_||this.fromOrientedRange(S);this.rangeList.removeAll(),this.rangeList.add(C),this.$onAddRange(C)}S.cursor||(S.cursor=S.end);var L=this.rangeList.add(S);return this.$onAddRange(S),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(S)}},this.toSingleRange=function(S){S=S||this.ranges[0];var _=this.rangeList.removeAll();_.length&&this.$onRemoveRange(_),S&&this.fromOrientedRange(S)},this.substractPoint=function(S){var _=this.rangeList.substractPoint(S);if(_)return this.$onRemoveRange(_),_[0]},this.mergeOverlappingRanges=function(){var S=this.rangeList.merge();S.length&&this.$onRemoveRange(S)},this.$onAddRange=function(S){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(S),this._signal("addRange",{range:S})},this.$onRemoveRange=function(S){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var _=this.rangeList.ranges.pop();S.push(_),this.rangeCount=0}for(var C=S.length;C--;){var L=this.ranges.indexOf(S[C]);this.ranges.splice(L,1)}this._signal("removeRange",{ranges:S}),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 u,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var S=this.ranges.length?this.ranges:[this.getRange()],_=[],C=0;C<S.length;C++){var L=S[C],O=L.start.row,M=L.end.row;if(O===M)_.push(L.clone());else{for(_.push(new f(O,L.start.column,O,this.session.getLine(O).length));++O<M;)_.push(this.getLineRange(O,!0));_.push(new f(M,0,M,L.end.column))}C==0&&!this.isBackwards()&&(_=_.reverse())}this.toSingleRange();for(var C=_.length;C--;)this.addRange(_[C])},this.joinSelections=function(){var S=this.rangeList.ranges,_=S[S.length-1],C=f.fromPoints(S[0].start,_.end);this.toSingleRange(),this.setSelectionRange(C,_.cursor==_.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var S=this.rangeList.ranges,_=S[S.length-1],C=f.fromPoints(S[0].start,_.end);this.toSingleRange(),this.setSelectionRange(C,_.cursor==_.start)}else{var L=this.session.documentToScreenPosition(this.cursor),O=this.session.documentToScreenPosition(this.anchor),M=this.rectangularRangeBlock(L,O);M.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(S,_,C){var L=[],O=S.column<_.column;if(O)var M=S.column,I=_.column,B=S.offsetX,F=_.offsetX;else var M=_.column,I=S.column,B=_.offsetX,F=S.offsetX;var N=S.row<_.row;if(N)var E=S.row,A=_.row;else var E=_.row,A=S.row;M<0&&(M=0),E<0&&(E=0),E==A&&(C=!0);for(var D,j=E;j<=A;j++){var W=f.fromPoints(this.session.screenToDocumentPosition(j,M,B),this.session.screenToDocumentPosition(j,I,F));if(W.isEmpty()){if(D&&y(W.end,D))break;D=W.end}W.cursor=O?W.start:W.end,L.push(W)}if(N&&L.reverse(),!C){for(var V=L.length-1;L[V].isEmpty()&&V>0;)V--;if(V>0)for(var K=0;L[K].isEmpty();)K++;for(var X=V;X>=K;X--)L[X].isEmpty()&&L.splice(X,1)}return L}}).call(v.prototype);var m=e("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(S){S.cursor||(S.cursor=S.end);var _=this.getSelectionStyle();return S.marker=this.session.addMarker(S,"ace_selection",_),this.session.$selectionMarkers.push(S),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,S},this.removeSelectionMarker=function(S){if(S.marker){this.session.removeMarker(S.marker);var _=this.session.$selectionMarkers.indexOf(S);_!=-1&&this.session.$selectionMarkers.splice(_,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(S){for(var _=this.session.$selectionMarkers,C=S.length;C--;){var L=S[C];if(L.marker){this.session.removeMarker(L.marker);var O=_.indexOf(L);O!=-1&&_.splice(O,1)}}this.session.selectionMarkerCount=_.length},this.$onAddRange=function(S){this.addSelectionMarker(S.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(S){this.removeSelectionMarkers(S.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(S){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(o.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(S){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(o.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(S){var _=S.command,C=S.editor;if(C.multiSelect){if(_.multiSelectAction)_.multiSelectAction=="forEach"?L=C.forEachSelection(_,S.args):_.multiSelectAction=="forEachLine"?L=C.forEachSelection(_,S.args,!0):_.multiSelectAction=="single"?(C.exitMultiSelectMode(),L=_.exec(C,S.args||{})):L=_.multiSelectAction(C,S.args||{});else{var L=_.exec(C,S.args||{});C.multiSelect.addRange(C.multiSelect.toOrientedRange()),C.multiSelect.mergeOverlappingRanges()}return L}},this.forEachSelection=function(S,_,C){if(!this.inVirtualSelectionMode){var L=C&&C.keepOrder,O=C==!0||C&&C.$byLines,M=this.session,I=this.selection,B=I.rangeList,F=(L?I:B).ranges,N;if(!F.length)return S.exec?S.exec(this,_||{}):S(this,_||{});var E=I._eventRegistry;I._eventRegistry={};var A=new v(M);this.inVirtualSelectionMode=!0;for(var D=F.length;D--;){if(O)for(;D>0&&F[D].start.row==F[D-1].end.row;)D--;A.fromOrientedRange(F[D]),A.index=D,this.selection=M.selection=A;var j=S.exec?S.exec(this,_||{}):S(this,_||{});!N&&j!==void 0&&(N=j),A.toOrientedRange(F[D])}A.detach(),this.selection=M.selection=I,this.inVirtualSelectionMode=!1,I._eventRegistry=E,I.mergeOverlappingRanges(),I.ranges[0]&&I.fromOrientedRange(I.ranges[0]);var W=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),W&&W.from==W.to&&this.renderer.animateScrolling(W.from),N}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var S="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var _=this.multiSelect.rangeList.ranges,C=[],L=0;L<_.length;L++)C.push(this.session.getTextRange(_[L]));var O=this.session.getDocument().getNewLineCharacter();S=C.join(O),S.length==(C.length-1)*O.length&&(S="")}else this.selection.isEmpty()||(S=this.session.getTextRange(this.getSelectionRange()));return S},this.$checkMultiselectChange=function(S,_){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(S,_,C){if(_=_||{},_.needle=S||_.needle,_.needle==null){var L=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();_.needle=this.session.getTextRange(L)}this.$search.set(_);var O=this.$search.findAll(this.session);if(!O.length)return 0;var M=this.multiSelect;C||M.toSingleRange(O[0]);for(var I=O.length;I--;)M.addRange(O[I],!0);return L&&M.rangeList.rangeAtPoint(L.start)&&M.addRange(L,!0),O.length},this.selectMoreLines=function(S,_){var C=this.selection.toOrientedRange(),L=C.cursor==C.end,O=this.session.documentToScreenPosition(C.cursor);this.selection.$desiredColumn&&(O.column=this.selection.$desiredColumn);var M=this.session.screenToDocumentPosition(O.row+S,O.column);if(C.isEmpty())var B=M;else var I=this.session.documentToScreenPosition(L?C.end:C.start),B=this.session.screenToDocumentPosition(I.row+S,I.column);if(L){var F=f.fromPoints(M,B);F.cursor=F.start}else{var F=f.fromPoints(B,M);F.cursor=F.end}if(F.desiredColumn=O.column,!this.selection.inMultiSelectMode)this.selection.addRange(C);else if(_)var N=C.cursor;this.selection.addRange(F),N&&this.selection.substractPoint(N)},this.transposeSelections=function(S){for(var _=this.session,C=_.multiSelect,L=C.ranges,O=L.length;O--;){var M=L[O];if(M.isEmpty()){var I=_.getWordRange(M.start.row,M.start.column);M.start.row=I.start.row,M.start.column=I.start.column,M.end.row=I.end.row,M.end.column=I.end.column}}C.mergeOverlappingRanges();for(var B=[],O=L.length;O--;){var M=L[O];B.unshift(_.getTextRange(M))}S<0?B.unshift(B.pop()):B.push(B.shift());for(var O=L.length;O--;){var M=L[O],F=M.clone();_.replace(M,B[O]),M.start.row=F.start.row,M.start.column=F.start.column}C.fromOrientedRange(C.ranges[0])},this.selectMore=function(S,_,C){var L=this.session,O=L.multiSelect,M=O.toOrientedRange();if(!(M.isEmpty()&&(M=L.getWordRange(M.start.row,M.start.column),M.cursor=S==-1?M.start:M.end,this.multiSelect.addRange(M),C))){var I=L.getTextRange(M),B=s(L,I,S);B&&(B.cursor=S==-1?B.start:B.end,this.session.unfold(B),this.multiSelect.addRange(B),this.renderer.scrollCursorIntoView(null,.5)),_&&this.multiSelect.substractPoint(M.cursor)}},this.alignCursors=function(){var S=this.session,_=S.multiSelect,C=_.ranges,L=-1,O=C.filter(function(V){if(V.cursor.row==L)return!0;L=V.cursor.row});if(!C.length||O.length==C.length-1){var M=this.selection.getRange(),I=M.start.row,B=M.end.row,F=I==B;if(F){var N=this.session.getLength(),E;do E=this.session.getLine(B);while(/[=:]/.test(E)&&++B<N);do E=this.session.getLine(I);while(/[=:]/.test(E)&&--I>0);I<0&&(I=0),B>=N&&(B=N-1)}var A=this.session.removeFullLines(I,B);A=this.$reAlignText(A,F),this.session.insert({row:I,column:0},A.join(`
954
+ `)+`
955
+ `),F||(M.start.column=0,M.end.column=A[A.length-1].length),this.selection.setRange(M)}else{O.forEach(function(V){_.substractPoint(V.cursor)});var D=0,j=1/0,W=C.map(function(V){var K=V.cursor,X=S.getLine(K.row),oe=X.substr(K.column).search(/\S/g);return oe==-1&&(oe=0),K.column>D&&(D=K.column),oe<j&&(j=oe),oe});C.forEach(function(V,K){var X=V.cursor,oe=D-X.column,ee=W[K]-j;oe>ee?S.insert(X,i.stringRepeat(" ",oe-ee)):S.remove(new f(X.row,X.column,X.row,X.column-oe+ee)),V.start.column=V.end.column=D,V.start.row=V.end.row=X.row,V.cursor=V.end}),_.fromOrientedRange(C[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(S,_){var C=!0,L=!0,O,M,I;return S.map(function(A){var D=A.match(/(\s*)(.*?)(\s*)([=:].*)/);return D?O==null?(O=D[1].length,M=D[2].length,I=D[3].length,D):(O+M+I!=D[1].length+D[2].length+D[3].length&&(L=!1),O!=D[1].length&&(C=!1),O>D[1].length&&(O=D[1].length),M<D[2].length&&(M=D[2].length),I>D[3].length&&(I=D[3].length),D):[A]}).map(_?F:C?L?N:F:E);function B(A){return i.stringRepeat(" ",A)}function F(A){return A[2]?B(O)+A[2]+B(M-A[2].length+I)+A[4].replace(/^([=:])\s+/,"$1 "):A[0]}function N(A){return A[2]?B(O+M-A[2].length)+A[2]+B(I)+A[4].replace(/^([=:])\s+/,"$1 "):A[0]}function E(A){return A[2]?B(O)+A[2]+B(I)+A[4].replace(/^([=:])\s+/,"$1 "):A[0]}}}).call(m.prototype);function y(S,_){return S.row==_.row&&S.column==_.column}r.onSessionChange=function(S){var _=S.session;_&&!_.multiSelect&&(_.$selectionMarkers=[],_.selection.$initRangeList(),_.multiSelect=_.selection),this.multiSelect=_&&_.multiSelect;var C=S.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(S){S.$multiselectOnSessionChange||(S.$onAddRange=S.$onAddRange.bind(S),S.$onRemoveRange=S.$onRemoveRange.bind(S),S.$onMultiSelect=S.$onMultiSelect.bind(S),S.$onSingleSelect=S.$onSingleSelect.bind(S),S.$multiselectOnSessionChange=r.onSessionChange.bind(S),S.$checkMultiselectChange=S.$checkMultiselectChange.bind(S),S.$multiselectOnSessionChange(S),S.on("changeSession",S.$multiselectOnSessionChange),S.on("mousedown",a),S.commands.addCommands(o.defaultCommands),T(S))}function T(S){if(!S.textInput)return;var _=S.textInput.getElement(),C=!1;g.addListener(_,"keydown",function(O){var M=O.keyCode==18&&!(O.ctrlKey||O.shiftKey||O.metaKey);S.$blockSelectEnabled&&M?C||(S.renderer.setMouseCursor("crosshair"),C=!0):C&&L()},S),g.addListener(_,"keyup",L,S),g.addListener(_,"blur",L,S);function L(O){C&&(S.renderer.setMouseCursor(""),C=!1)}}r.MultiSelect=x,e("./config").defineOptions(m.prototype,"editor",{enableMultiselect:{set:function(S){x(this),S?this.on("mousedown",a):this.off("mousedown",a)},value:!0},enableBlockSelect:{set:function(S){this.$blockSelectEnabled=S},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,r,d){var u=e("../../range").Range,f=r.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(v,a,g){var i=v.getLine(g);return this.foldingStartMarker.test(i)?"start":a=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(i)?"end":""},this.getFoldWidgetRange=function(v,a,g){return null},this.indentationBlock=function(v,a,g){var i=/\S/,o=v.getLine(a),c=o.search(i);if(c!=-1){for(var p=g||o.length,s=v.getLength(),h=a,m=a;++a<s;){var y=v.getLine(a).search(i);if(y!=-1){if(y<=c){var x=v.getTokenAt(a,0);if(!x||x.type!=="string")break}m=a}}if(m>h){var T=v.getLine(m).length;return new u(h,p,m,T)}}},this.openingBracketBlock=function(v,a,g,i,o){var c={row:g,column:i+1},p=v.$findClosingBracket(a,c,o);if(p){var s=v.foldWidgets[p.row];return s==null&&(s=v.getFoldWidget(p.row)),s=="start"&&p.row>c.row&&(p.row--,p.column=v.getLine(p.row).length),u.fromPoints(c,p)}},this.closingBracketBlock=function(v,a,g,i,o){var c={row:g,column:i},p=v.$findOpeningBracket(a,c);if(p)return p.column++,c.column--,u.fromPoints(p,c)}}).call(f.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(e,r,d){var u=e("../lib/dom"),f=e("../range").Range,v=e("../config").nls;function a(i,o,c){for(var p=0,s=i.length-1;p<=s;){var h=p+s>>1,m=c(o,i[h]);if(m>0)p=h+1;else if(m<0)s=h-1;else return h}return-(p+1)}function g(i,o,c){var p=i.getAnnotations().sort(f.comparePoints);if(p.length){var s=a(p,{row:o,column:-1},f.comparePoints);s<0&&(s=-s-1),s>=p.length?s=c>0?0:p.length-1:s===0&&c<0&&(s=p.length-1);var h=p[s];if(!(!h||!c)){if(h.row===o){do h=p[s+=c];while(h&&h.row===o);if(!h)return p.slice()}var m=[];o=h.row;do m[c<0?"unshift":"push"](h),h=p[s+=c];while(h&&h.row==o);return m.length&&m}}}r.showErrorMarker=function(i,o){var c=i.session,p=i.getCursorPosition(),s=p.row,h=c.widgetManager.getWidgetsAtRow(s).filter(function(O){return O.type=="errorMarker"})[0];h?h.destroy():s-=o;var m=g(c,s,o),y;if(m){var x=m[0];p.column=(x.pos&&typeof x.column!="number"?x.pos.sc:x.column)||0,p.row=x.row,y=i.renderer.$gutterLayer.$annotations[p.row]}else{if(h)return;y={displayText:[v("error-marker.good-state","Looks good!")],className:"ace_ok"}}i.session.unfold(p.row),i.selection.moveToPosition(p);var T={row:p.row,fixedWidth:!0,coverGutter:!0,el:u.createElement("div"),type:"errorMarker"},S=T.el.appendChild(u.createElement("div")),_=T.el.appendChild(u.createElement("div"));_.className="error_widget_arrow "+y.className;var C=i.renderer.$cursorLayer.getPixelPosition(p).left;_.style.left=C+i.renderer.gutterWidth-5+"px",T.el.className="error_widget_wrapper",S.className="error_widget "+y.className,y.displayText.forEach(function(O,M){S.appendChild(u.createTextNode(O)),M<y.displayText.length-1&&S.appendChild(u.createElement("br"))}),S.appendChild(u.createElement("div"));var L=function(O,M,I){if(M===0&&(I==="esc"||I==="return"))return T.destroy(),{command:"null"}};T.destroy=function(){i.$mouseHandler.isMousePressed||(i.keyBinding.removeKeyboardHandler(L),c.widgetManager.removeLineWidget(T),i.off("changeSelection",T.destroy),i.off("changeSession",T.destroy),i.off("mouseup",T.destroy),i.off("change",T.destroy))},i.keyBinding.addKeyboardHandler(L),i.on("changeSelection",T.destroy),i.on("changeSession",T.destroy),i.on("mouseup",T.destroy),i.on("change",T.destroy),i.session.widgetManager.addLineWidget(T),T.el.onmousedown=i.focus.bind(i),i.renderer.scrollCursorIntoView(null,.5,{bottom:T.el.offsetHeight})},u.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,d){e("./loader_build")(r);var u=e("./lib/dom"),f=e("./range").Range,v=e("./editor").Editor,a=e("./edit_session").EditSession,g=e("./undomanager").UndoManager,i=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,p){if(typeof c=="string"){var s=c;if(c=document.getElementById(s),!c)throw new Error("ace.edit can't find div #"+s)}if(c&&c.env&&c.env.editor instanceof v)return c.env.editor;var h="";if(c&&/input|textarea/i.test(c.tagName)){var m=c;h=m.value,c=u.createElement("pre"),m.parentNode.replaceChild(c,m)}else c&&(h=c.textContent,c.innerHTML="");var y=r.createEditSession(h),x=new v(new i(c),y,p),T={document:y,editor:x,onResize:x.resize.bind(x,null)};return m&&(T.textarea=m),x.on("destroy",function(){T.editor.container.env=null}),x.container.env=x.env=T,x},r.createEditSession=function(c,p){var s=new a(c,p);return s.setUndoManager(new g),s},r.Range=f,r.Editor=v,r.EditSession=a,r.UndoManager=g,r.VirtualRenderer=i;var o=r.config.version;r.version=o}),(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 d in e)e.hasOwnProperty(d)&&(r.ace[d]=e[d]);r.ace.default=r.ace,n&&(n.exports=r.ace)})})()})(Km)),Km.exports}var Ls=Nn("m",HS()),Xm={exports:{}},Jm;function US(){return Jm||(Jm=1,(function(n,t){ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,d){var u=e("../lib/oop"),f=e("./text_highlight_rules").TextHighlightRules,v=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 a=r.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},g=r.constantNumericBinary={token:"constant.numeric",regex:/\b(0[bB][01](?:[01]|_(?=[01]))*)\b/},i=r.constantNumericDecimal={token:"constant.numeric",regex:/\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/},o=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/},p=r.constantNumericComplex={token:"constant.numeric",regex:/\b([\d]i)\b/},s=r.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"},h=r.instanceVariable={token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},m=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",T="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",S="$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":T,"variable.language":S,"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(O,M,I){I.length&&(I=[]);var B=O[O.length-1];return I.unshift(B,M),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(O,M,I){I.length&&(I=[]);var B=O[O.length-1];return I.unshift(B,M),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(O,M,I){I.length&&(I=[]);var B=O[O.length-1];return I.unshift(B,M),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(O,M,I){I.length&&(I=[]);var B=O[O.length-1];return I.unshift(B,M),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(O,M,I){I.length&&(I=[]);var B=O[O.length-1];return I.unshift(B,M),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},h,{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,p,v,a,s,g,i,o,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:_,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(O,M,I){var B=O[2]=="-"||O[2]=="~"?"indentedHeredoc":"heredoc",F=O.split(this.splitRegex);return I.push(B,F[3]),[{type:"constant",value:F[1]},{type:"string",value:F[2]},{type:"support.class",value:F[3]},{type:"string",value:F[4]}]},regex:"(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(O,M,I){return O===I[1]?(I.shift(),I.shift(),this.next=I[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(O,M,I){return O===I[1]?(I.shift(),I.shift(),this.next=I[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(O,M){return M[0]==="heredoc"||M[0]==="indentedHeredoc"?M[0]:O}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(O,M,I){return this.next="",O=="}"&&I.length>1&&I[1]!="start"&&(I.shift(),this.next=I.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(O,M,I){return I.length&&O===I[0]?(I.unshift(O,M),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(O,M,I){return I.length&&O===L[I[0]]?(I.shift(),this.next=I.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(O,M,I){return I.length&&O===I[0]?(I.unshift(O,M),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(O,M,I){return I.length&&O===L[I[0]]?(I.shift(),this.next=I.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(O,M,I){return I.length&&O===I[0]?(I.unshift(O,M),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(O,M,I){return I.length&&O===L[I[0]]?(I.shift(),this.next=I.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],sStateWithInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(O,M,I){return I.length&&O===I[0]?(I.unshift(O,M),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(O,M,I){return I.length&&O===L[I[0]]?(I.shift(),this.next=I.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],rState:[{token:"string.regexp",regex:/[(\[<{]/,onMatch:function(O,M,I){return I.length&&O===I[0]?(I.unshift(O,M),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(O,M,I){return I.length&&O[0]===L[I[0]]?(I.shift(),this.next=I.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()};u.inherits(m,f),r.RubyHighlightRules=m}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,r,d){var u=e("../range").Range,f=function(){};(function(){this.checkOutdent=function(v,a){return/^\s+$/.test(v)?/^\s*\}/.test(a):!1},this.autoOutdent=function(v,a){var g=v.getLine(a),i=g.match(/^(\s*\})/);if(!i)return 0;var o=i[1].length,c=v.findMatchingBracket({row:a,column:o});if(!c||c.row==a)return 0;var p=this.$getIndent(v.getLine(c.row));v.replace(new u(a,0,a,o-1),p)},this.$getIndent=function(v){return v.match(/^\s*/)[0]}}).call(f.prototype),r.MatchingBraceOutdent=f}),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,d){var u=e("../../lib/oop"),f=e("./fold_mode").FoldMode,v=e("../../range").Range,a=e("../../token_iterator").TokenIterator,g=r.FoldMode=function(){};u.inherits(g,f),(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(i,o,c){var p=i.getLine(c),s=this.foldingStartMarker.test(p),h=this.foldingStopMarker.test(p);if(s&&!h){var m=p.match(this.foldingStartMarker);if(m[1]){if((m[1]=="if"||m[1]=="else"||m[1]=="while"||m[1]=="until"||m[1]=="unless")&&(m[1]=="else"&&/^\s*else\s*$/.test(p)===!1||/^\s*(?:if|else|while|until|unless)\s*/.test(p)===!1)||m[1]=="when"&&/\sthen\s/.test(p)===!0)return;if(i.getTokenAt(c,m.index+2).type==="keyword")return"start"}else if(!m[3]||i.getTokenAt(c,m.index+1).type==="comment.multiline")return"start"}if(o!="markbeginend"||!h||s&&h)return"";var m=p.match(this.foldingStopMarker);if(m[3]==="end"){if(i.getTokenAt(c,m.index+1).type==="keyword")return"end"}else if(!m[1]||i.getTokenAt(c,m.index+1).type==="comment.multiline")return"end"},this.getFoldWidgetRange=function(i,o,c){var p=i.doc.getLine(c),s=this.foldingStartMarker.exec(p);if(s)return s[1]||s[3]?this.rubyBlock(i,c,s.index+2):this.openingBracketBlock(i,"{",c,s.index);var s=this.foldingStopMarker.exec(p);if(s)return s[3]==="end"&&i.getTokenAt(c,s.index+1).type==="keyword"?this.rubyBlock(i,c,s.index+1):s[1]==="=end"&&i.getTokenAt(c,s.index+1).type==="comment.multiline"?this.rubyBlock(i,c,s.index+1):this.closingBracketBlock(i,"}",c,s.index+s[0].length)},this.rubyBlock=function(i,o,c,p){var s=new a(i,o,c),h=s.getCurrentToken();if(!(!h||h.type!="keyword"&&h.type!="comment.multiline")){var m=h.value,y=i.getLine(o);switch(h.value){case"if":case"unless":case"while":case"until":var x=new RegExp("^\\s*"+h.value);if(!x.test(y))return;var T=this.indentKeywords[m];break;case"when":if(/\sthen\s/.test(y))return;case"elsif":case"rescue":case"ensure":var T=1;break;case"else":var x=new RegExp("^\\s*"+h.value+"\\s*$");if(!x.test(y))return;var T=1;break;default:var T=this.indentKeywords[m]}var S=[m];if(T){var _=T===-1?i.getLine(o-1).length:i.getLine(o).length,C=o,L=[];if(L.push(s.getCurrentTokenRange()),s.step=T===-1?s.stepBackward:s.stepForward,h.type=="comment.multiline"){for(;h=s.step();)if(h.type==="comment.multiline"){if(T==1){if(_=6,h.value=="=end")break}else if(h.value=="=begin")break}}else for(;h=s.step();){var O=!1;if(h.type==="keyword"){var M=T*this.indentKeywords[h.value];switch(y=i.getLine(s.getCurrentTokenRow()),h.value){case"do":for(var I=s.$tokenIndex-1;I>=0;I--){var B=s.$rowTokens[I];if(B&&(B.value=="while"||B.value=="until"||B.value=="for")){M=0;break}}break;case"else":var x=new RegExp("^\\s*"+h.value+"\\s*$");(!x.test(y)||m=="case")&&(M=0,O=!0);break;case"if":case"unless":case"while":case"until":var x=new RegExp("^\\s*"+h.value);x.test(y)||(M=0,O=!0);break;case"when":(/\sthen\s/.test(y)||m=="case")&&(M=0,O=!0)}if(M>0)S.unshift(h.value);else if(M<=0&&O===!1){if(S.shift(),!S.length&&((m=="while"||m=="until"||m=="for")&&h.value!="do"||h.value=="do"&&T==-1&&M!=0||h.value!="do"))break;M===0&&S.unshift(h.value)}}}if(!h)return null;if(p)return L.push(s.getCurrentTokenRange()),L;var o=s.getCurrentTokenRow();if(T===-1){if(h.type==="comment.multiline")var F=6;else var F=i.getLine(o).length;return new v(o,F,C-1,_)}return new v(C,_,o-1,i.getLine(o-1).length)}}}}).call(g.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,d){var u=e("../lib/oop"),f=e("./text").Mode,v=e("./ruby_highlight_rules").RubyHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,g=e("../range").Range,i=e("./folding/ruby").FoldMode,o=function(){this.HighlightRules=v,this.$outdent=new a,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new i,this.indentKeywords=this.foldingRules.indentKeywords};u.inherits(o,f),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(c,p,s){var h=this.$getIndent(p),m=this.getTokenizer().getLineTokens(p,c),y=m.tokens;if(y.length&&y[y.length-1].type=="comment")return h;if(c=="start"){var x=p.match(/^.*[\{\(\[]\s*$/),T=p.match(/^\s*(class|def|module)\s.*$/),S=p.match(/.*do(\s*|\s+\|.*\|\s*)$/),_=p.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);(x||T||S||_)&&(h+=s)}return h},this.checkOutdent=function(c,p,s){return/^\s+(end|else|rescue|ensure)$/.test(p+s)||this.$outdent.checkOutdent(p,s)},this.autoOutdent=function(c,p,s){var h=p.getLine(s);if(/}/.test(h))return this.$outdent.autoOutdent(p,s);var m=this.$getIndent(h),y=p.getLine(s-1),x=this.$getIndent(y),T=p.getTabString();x.length<=m.length&&m.slice(-T.length)==T&&p.remove(new g(s,m.length-T.length,s,m.length))},this.getMatching=function(c,p,s){if(p==null){var h=c.selection.lead;s=h.column,p=h.row}var m=c.getTokenAt(p,s);if(m&&m.value in this.indentKeywords)return this.foldingRules.rubyBlock(c,p,s,!0)},this.$id="ace/mode/ruby",this.snippetFileId="ace/snippets/ruby"}).call(o.prototype),r.Mode=o}),(function(){ace.require(["ace/mode/ruby"],function(e){n&&(n.exports=e)})})()})(Xm)),Xm.exports}US();var Zm={exports:{}},Qm;function VS(){return Qm||(Qm=1,(function(n,t){ace.define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,d){var u=e("../lib/oop"),f=e("./text_highlight_rules").TextHighlightRules,v=function(){var a="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",g="True|False|None|NotImplemented|Ellipsis|__debug__",i="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",o=this.createKeywordMapper({"invalid.deprecated":"debugger","support.function":i,"variable.language":"self|cls","constant.language":g,keyword:a},"identifier"),c="[uU]?",p="[rR]",s="[fF]",h="(?:[rR][fF]|[fF][rR])",m="(?:(?:[1-9]\\d*)|(?:0))",y="(?:0[oO]?[0-7]+)",x="(?:0[xX][\\dA-Fa-f]+)",T="(?:0[bB][01]+)",S="(?:"+m+"|"+y+"|"+x+"|"+T+")",_="(?:[eE][+-]?\\d+)",C="(?:\\.\\d+)",L="(?:\\d+)",O="(?:(?:"+L+"?"+C+")|(?:"+L+"\\.))",M="(?:(?:"+O+"|"+L+")"+_+")",I="(?:"+M+"|"+O+")",B=`\\\\(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:p+'"{3}',next:"rawqqstring3"},{token:"string",regex:p+'"(?=.)',next:"rawqqstring"},{token:"string",regex:p+"'{3}",next:"rawqstring3"},{token:"string",regex:p+"'(?=.)",next:"rawqstring"},{token:"string",regex:s+'"{3}',next:"fqqstring3"},{token:"string",regex:s+'"(?=.)',next:"fqqstring"},{token:"string",regex:s+"'{3}",next:"fqstring3"},{token:"string",regex:s+"'(?=.)",next:"fqstring"},{token:"string",regex:h+'"{3}',next:"rfqqstring3"},{token:"string",regex:h+'"(?=.)',next:"rfqqstring"},{token:"string",regex:h+"'{3}",next:"rfqstring3"},{token:"string",regex:h+"'(?=.)",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:B},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qstring3:[{token:"constant.language.escape",regex:B},{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:B},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:B},{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:B},{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring3:[{token:"constant.language.escape",regex:B},{token:"string",regex:"'{3}",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqqstring:[{token:"constant.language.escape",regex:B},{token:"string",regex:"\\\\$",next:"fqqstring"},{token:"string",regex:'"|$',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring:[{token:"constant.language.escape",regex:B},{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:"(?:"+I+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:I},{token:"constant.numeric",regex:S+"[lL]\\b"},{token:"constant.numeric",regex:S+"\\b"},{token:["punctuation","function.support"],regex:"(\\.)([a-zA-Z_]+)\\b"},{token:o,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}]},this.normalizeRules()};u.inherits(v,f),r.PythonHighlightRules=v}),ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,r,d){var u=e("../../lib/oop"),f=e("./fold_mode").FoldMode,v=r.FoldMode=function(a){this.foldingStartMarker=new RegExp("([\\[{])(?:\\s*)$|("+a+")(?:\\s*)(?:#.*)?$")};u.inherits(v,f),(function(){this.getFoldWidgetRange=function(a,g,i){var o=a.getLine(i),c=o.match(this.foldingStartMarker);if(c)return c[1]?this.openingBracketBlock(a,c[1],i,c.index):c[2]?this.indentationBlock(a,i,c.index+c[2].length):this.indentationBlock(a,i)}}).call(v.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,d){var u=e("../lib/oop"),f=e("./text").Mode,v=e("./python_highlight_rules").PythonHighlightRules,a=e("./folding/pythonic").FoldMode,g=e("../range").Range,i=function(){this.HighlightRules=v,this.foldingRules=new a("\\:"),this.$behaviour=this.$defaultBehaviour};u.inherits(i,f),(function(){this.lineCommentStart="#",this.$pairQuotesAfter={"'":/[ruf]/i,'"':/[ruf]/i},this.getNextLineIndent=function(c,p,s){var h=this.$getIndent(p),m=this.getTokenizer().getLineTokens(p,c),y=m.tokens;if(y.length&&y[y.length-1].type=="comment")return h;if(c=="start"){var x=p.match(/^.*[\{\(\[:]\s*$/);x&&(h+=s)}return h};var o={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(c,p,s){if(s!==`\r
989
+ `&&s!=="\r"&&s!==`
990
+ `)return!1;var h=this.getTokenizer().getLineTokens(p.trim(),c).tokens;if(!h)return!1;do var m=h.pop();while(m&&(m.type=="comment"||m.type=="text"&&m.value.match(/^\s+$/)));return m?m.type=="keyword"&&o[m.value]:!1},this.autoOutdent=function(c,p,s){s+=1;var h=this.$getIndent(p.getLine(s)),m=p.getTabString();h.slice(-m.length)==m&&p.remove(new g(s,h.length-m.length,s,h.length))},this.$id="ace/mode/python",this.snippetFileId="ace/snippets/python"}).call(i.prototype),r.Mode=i}),(function(){ace.require(["ace/mode/python"],function(e){n&&(n.exports=e)})})()})(Zm)),Zm.exports}VS();var ev={exports:{}},tv;function GS(){return tv||(tv=1,(function(n,t){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,d){var u=e("../lib/oop"),f=e("./text_highlight_rules").TextHighlightRules,v=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"}]}};u.inherits(v,f),r.JsonHighlightRules=v}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,r,d){var u=e("../range").Range,f=function(){};(function(){this.checkOutdent=function(v,a){return/^\s+$/.test(v)?/^\s*\}/.test(a):!1},this.autoOutdent=function(v,a){var g=v.getLine(a),i=g.match(/^(\s*\})/);if(!i)return 0;var o=i[1].length,c=v.findMatchingBracket({row:a,column:o});if(!c||c.row==a)return 0;var p=this.$getIndent(v.getLine(c.row));v.replace(new u(a,0,a,o-1),p)},this.$getIndent=function(v){return v.match(/^\s*/)[0]}}).call(f.prototype),r.MatchingBraceOutdent=f}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,r,d){var u=e("../../lib/oop"),f=e("../../range").Range,v=e("./fold_mode").FoldMode,a=r.FoldMode=function(g){g&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+g.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+g.end)))};u.inherits(a,v),(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(g,i,o){var c=g.getLine(o);if(this.singleLineBlockCommentRe.test(c)&&!this.startRegionRe.test(c)&&!this.tripleStarBlockCommentRe.test(c))return"";var p=this._getFoldWidgetBase(g,i,o);return!p&&this.startRegionRe.test(c)?"start":p},this.getFoldWidgetRange=function(g,i,o,c){var p=g.getLine(o);if(this.startRegionRe.test(p))return this.getCommentRegionBlock(g,p,o);var s=p.match(this.foldingStartMarker);if(s){var h=s.index;if(s[1])return this.openingBracketBlock(g,s[1],o,h);var m=g.getCommentFoldRange(o,h+s[0].length,1);return m&&!m.isMultiLine()&&(c?m=this.getSectionRange(g,o):i!="all"&&(m=null)),m}if(i!=="markbegin"){var s=p.match(this.foldingStopMarker);if(s){var h=s.index+s[0].length;return s[1]?this.closingBracketBlock(g,s[1],o,h):g.getCommentFoldRange(o,h,-1)}}},this.getSectionRange=function(g,i){var o=g.getLine(i),c=o.search(/\S/),p=i,s=o.length;i+=1;for(var h=i,m=g.getLength();++i<m;){o=g.getLine(i);var y=o.search(/\S/);if(y!==-1){if(c>y)break;var x=this.getFoldWidgetRange(g,"all",i);if(x){if(x.start.row<=p)break;if(x.isMultiLine())i=x.end.row;else if(c==y)break}h=i}}return new f(p,s,h,g.getLine(h).length)},this.getCommentRegionBlock=function(g,i,o){for(var c=i.search(/\s*$/),p=g.getLength(),s=o,h=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,m=1;++o<p;){i=g.getLine(o);var y=h.exec(i);if(y&&(y[1]?m--:m++,!m))break}var x=o;if(x>s)return new f(s,c,x,i.length)}}).call(a.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,d){var u=e("../lib/oop"),f=e("./text").Mode,v=e("./json_highlight_rules").JsonHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,g=e("./folding/cstyle").FoldMode,i=e("../worker/worker_client").WorkerClient,o=function(){this.HighlightRules=v,this.$outdent=new a,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new g};u.inherits(o,f),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(c,p,s){var h=this.$getIndent(p);if(c=="start"){var m=p.match(/^.*[\{\(\[]\s*$/);m&&(h+=s)}return h},this.checkOutdent=function(c,p,s){return this.$outdent.checkOutdent(p,s)},this.autoOutdent=function(c,p,s){this.$outdent.autoOutdent(p,s)},this.createWorker=function(c){var p=new i(["ace"],"ace/mode/json_worker","JsonWorker");return p.attachToDocument(c.getDocument()),p.on("annotate",function(s){c.setAnnotations(s.data)}),p.on("terminate",function(){c.clearAnnotations()}),p},this.$id="ace/mode/json"}).call(o.prototype),r.Mode=o}),(function(){ace.require(["ace/mode/json"],function(e){n&&(n.exports=e)})})()})(ev)),ev.exports}GS();var nv={exports:{}},rv;function qS(){return rv||(rv=1,(function(n,t){ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,r,d){var u=e("../lib/oop");e("../lib/lang");var f=e("./text_highlight_rules").TextHighlightRules,v=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",a=r.supportFunction="rgb|rgba|url|attr|counter|counters",g=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",i=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",o=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]+))",p=r.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",s=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",h=function(){var m=this.createKeywordMapper({"support.function":a,"support.constant":g,"support.type":v,"support.constant.color":i,"support.constant.fonts":o},"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:p},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:s},{include:"url"},{token:m,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()};u.inherits(h,f),r.CssHighlightRules=h}),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,d){var u=e("../lib/oop"),f=e("./text_highlight_rules").TextHighlightRules,v=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|$)"},v.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};u.inherits(v,f),v.getTagRule=function(a){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},v.getStartRule=function(a){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:a}},v.getEndRule=function(a){return{token:"comment.doc",regex:"\\*\\/",next:a}},r.JsDocCommentHighlightRules=v}),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,d){function u(){var c=i.replace("\\d","\\d\\-"),p={onMatch:function(h,m,y){var x=h.charAt(1)=="/"?2:1;return x==1?(m!=this.nextState?y.unshift(this.next,this.nextState,0):y.unshift(this.next),y[2]++):x==2&&m==this.nextState&&(y[1]--,(!y[1]||y[1]<0)&&(y.shift(),y.shift())),[{type:"meta.tag.punctuation."+(x==1?"":"end-")+"tag-open.xml",value:h.slice(0,x)},{type:"meta.tag.tag-name.xml",value:h.substr(x)}]},regex:"</?(?:"+c+"|(?=>))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(p);var s={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[s,p,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(h,m,y){return m==y[0]&&y.shift(),h.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:h}]},nextState:"jsx"},s,f("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"}]},p],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(c){return[{token:"comment",regex:/\/\*/,next:[a.getTagRule(),{token:"comment",regex:"\\*\\/",next:c||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[a.getTagRule(),{token:"comment",regex:"$|^",next:c||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var v=e("../lib/oop"),a=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,g=e("./text_highlight_rules").TextHighlightRules,i="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*",o=function(c){var p={"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"},s=this.createKeywordMapper(p,"identifier"),h="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",m="\\\\(?: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(p).join("|")+"\\b)"+i+")(\\s*)(\\()"};this.$rules={no_regex:[a.getStartRule("doc-start"),f("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:"("+i+")(\\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+))("+i+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+i+")(\\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:"(?:"+h+")\\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:s,regex:i},{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:i},{regex:"",token:"empty",next:"no_regex"}],start:[a.getStartRule("doc-start"),f("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:[f("function_arguments"),{token:"variable.parameter",regex:i},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:m},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:m},{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(T,S,_){if(this.next=T=="{"?this.nextState:"",T=="{"&&_.length)_.unshift("start",S);else if(T=="}"&&_.length&&(_.shift(),this.next=_.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return T=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:m},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+i+")(\\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)&&u.call(this)),this.embedRules(a,"doc-",[a.getEndRule("no_regex")]),this.normalizeRules()};v.inherits(o,g),r.JavaScriptHighlightRules=o}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,d){var u=e("../lib/oop"),f=e("./text_highlight_rules").TextHighlightRules,v=function(a){var g="[_: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:"(<\\?)("+g+")",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:g},{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:"(<\\!)("+g+")",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:"(?:(<)|(</))((?:"+g+":)?"+g+")",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:g},{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===v&&this.normalizeRules()};(function(){this.embedTagRules=function(a,g,i){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+i+".tag-name.xml"],regex:"(<)("+i+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:g+"start"}]}),this.$rules[i+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(o,c,p){return p.splice(0),this.token}}],this.embedRules(a,g,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+i+".tag-name.xml"],regex:"(</)("+i+"(?=\\s|>|$))",next:i+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(f.prototype),u.inherits(v,f),r.XmlHighlightRules=v}),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,d){var u=e("../lib/oop"),f=e("../lib/lang"),v=e("./css_highlight_rules").CssHighlightRules,a=e("./javascript_highlight_rules").JavaScriptHighlightRules,g=e("./xml_highlight_rules").XmlHighlightRules,i=f.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"}),o=function(){g.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,p){var s=i[p];return["meta.tag.punctuation."+(c=="<"?"":"end-")+"tag-open.xml","meta.tag"+(s?"."+s:"")+".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(v,"css-","style"),this.embedTagRules(new a({jsx:!1}).getRules(),"js-","script"),this.constructor===o&&this.normalizeRules()};u.inherits(o,g),r.HtmlHighlightRules=o}),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,d){var u=e("../config").$modes,f=e("../lib/oop"),v=e("../lib/lang"),a=e("./text_highlight_rules").TextHighlightRules,g=e("./html_highlight_rules").HtmlHighlightRules,i=function(c){return"(?:[^"+v.escapeRegExp(c)+"\\\\]|\\\\.)*"},o=function(){g.call(this);var c={token:"support.function",regex:/^\s*(```+[^`]*|~~~+[^~]*)$/,onMatch:function(s,h,m,y){var x=s.match(/^(\s*)([`~]+)(.*)/),T=/[\w-]+|$/.exec(x[3])[0];return u[T]||(T=""),m.unshift("githubblock",[],[x[1],x[2],T],h),this.token},next:"githubblock"},p=[{token:"support.function",regex:".*",onMatch:function(s,h,m,y){var x=m[1],T=m[2][0],S=m[2][1],_=m[2][2],C=/^(\s*)(`+|~+)\s*$/.exec(s);if(C&&C[1].length<T.length+3&&C[2].length>=S.length&&C[2][0]==S[0])return m.splice(0,3),this.next=m.shift(),this.token;if(this.next="",_&&u[_]){var L=u[_].getTokenizer().getLineTokens(s,x.slice(0));return m[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(s){return"markup.heading."+s.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:"(\\[)("+i("]")+")(\\]\\s*\\[)("+i("]")+")(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:"(\\!?\\[)("+i("]")+')(\\]\\()((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)(\\s*"'+i('"')+'"\\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:p}),this.normalizeRules()};f.inherits(o,a),r.MarkdownHighlightRules=o}),ace.define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,r,d){var u=e("../../lib/oop"),f=e("./fold_mode").FoldMode,v=e("../../range").Range,a=r.FoldMode=function(){};u.inherits(a,f),(function(){this.foldingStartMarker=/^(?:[=-]+\s*$|#{1,6} |`{3})/,this.getFoldWidget=function(g,i,o){var c=g.getLine(o);return this.foldingStartMarker.test(c)?c[0]=="`"&&g.bgTokenizer.getState(o)=="start"?"end":"start":""},this.getFoldWidgetRange=function(g,i,o){function c(O){return T=g.getTokens(O)[0],T&&T.type.lastIndexOf(S,0)===0}function p(){var O=T.value[0];return O=="="?6:O=="-"?5:7-T.value.search(/[^#]|$/)}var s=g.getLine(o),h=s.length,m=g.getLength(),y=o,x=o;if(s.match(this.foldingStartMarker)){if(s[0]=="`"){if(g.bgTokenizer.getState(o)!=="start"){for(;++o<m&&(s=g.getLine(o),!(s[0]=="`"&s.substring(0,3)=="```")););return new v(y,h,o,0)}for(;o-- >0&&(s=g.getLine(o),!(s[0]=="`"&s.substring(0,3)=="```")););return new v(o,s.length,y,0)}var T,S="markup.heading";if(c(o)){for(var _=p();++o<m;)if(c(o)){var C=p();if(C>=_)break}if(x=o-(!T||["=","-"].indexOf(T.value[0])==-1?1:2),x>y)for(;x>y&&/^\s*$/.test(g.getLine(x));)x--;if(x>y){var L=g.getLine(x).length;return new v(y,h,x,L)}}}}}).call(a.prototype)}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,r,d){var u=e("../range").Range,f=function(){};(function(){this.checkOutdent=function(v,a){return/^\s+$/.test(v)?/^\s*\}/.test(a):!1},this.autoOutdent=function(v,a){var g=v.getLine(a),i=g.match(/^(\s*\})/);if(!i)return 0;var o=i[1].length,c=v.findMatchingBracket({row:a,column:o});if(!c||c.row==a)return 0;var p=this.$getIndent(v.getLine(c.row));v.replace(new u(a,0,a,o-1),p)},this.$getIndent=function(v){return v.match(/^\s*/)[0]}}).call(f.prototype),r.MatchingBraceOutdent=f}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,r,d){function u(i,o){return i&&i.type.lastIndexOf(o+".xml")>-1}var f=e("../../lib/oop"),v=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,g=function(){this.add("string_dquotes","insertion",function(i,o,c,p,s){if(s=='"'||s=="'"){var h=s,m=p.doc.getTextRange(c.getSelectionRange());if(m!==""&&m!=="'"&&m!='"'&&c.getWrapBehavioursEnabled())return{text:h+m+h,selection:!1};var y=c.getCursorPosition(),x=p.doc.getLine(y.row),T=x.substring(y.column,y.column+1),S=new a(p,y.row,y.column),_=S.getCurrentToken();if(T==h&&(u(_,"attribute-value")||u(_,"string")))return{text:"",selection:[1,1]};if(_||(_=S.stepBackward()),!_)return;for(;u(_,"tag-whitespace")||u(_,"whitespace");)_=S.stepBackward();var C=!T||T.match(/\s/);if(u(_,"attribute-equals")&&(C||T==">")||u(_,"decl-attribute-equals")&&(C||T=="?"))return{text:h+h,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(i,o,c,p,s){var h=p.doc.getTextRange(s);if(!s.isMultiLine()&&(h=='"'||h=="'")){var m=p.doc.getLine(s.start.row),y=m.substring(s.start.column+1,s.start.column+2);if(y==h)return s.end.column++,s}}),this.add("autoclosing","insertion",function(i,o,c,p,s){if(s==">"){var h=c.getSelectionRange().start,m=new a(p,h.row,h.column),y=m.getCurrentToken()||m.stepBackward();if(!y||!(u(y,"tag-name")||u(y,"tag-whitespace")||u(y,"attribute-name")||u(y,"attribute-equals")||u(y,"attribute-value"))||u(y,"reference.attribute-value"))return;if(u(y,"attribute-value")){var x=m.getCurrentTokenColumn()+y.value.length;if(h.column<x)return;if(h.column==x){var T=m.stepForward();if(T&&u(T,"attribute-value"))return;m.stepBackward()}}if(/^\s*>/.test(p.getLine(h.row).slice(h.column)))return;for(;!u(y,"tag-name");)if(y=m.stepBackward(),y.value=="<"){y=m.stepForward();break}var S=m.getCurrentTokenRow(),_=m.getCurrentTokenColumn();if(u(m.stepBackward(),"end-tag-open"))return;var C=y.value;return S==h.row&&(C=C.substring(0,h.column-_)),this.voidElements&&this.voidElements.hasOwnProperty(C.toLowerCase())?void 0:{text:"></"+C+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(i,o,c,p,s){if(s==`
991
+ `){var h=c.getCursorPosition(),m=p.getLine(h.row),y=new a(p,h.row,h.column),x=y.getCurrentToken();if(u(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 T=x.value,S=y.getCurrentTokenRow();if(x=y.stepBackward(),!x||x.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[T]||!this.voidElements){var _=p.getTokenAt(h.row,h.column+1),m=p.getLine(S),C=this.$getIndent(m),L=C+p.getTabString();return _&&_.value==="</"?{text:`
992
+ `+L+`
993
+ `+C,selection:[1,L.length,1,L.length]}:{text:`
994
+ `+L}}}}})};f.inherits(g,v),r.XmlBehaviour=g}),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,d){var u=e("../../lib/oop"),f=e("../../token_iterator").TokenIterator,v=e("../behaviour/cstyle").CstyleBehaviour,a=e("../behaviour/xml").XmlBehaviour,g=function(){var i=new a({closeCurlyBraces:!0}).getBehaviours();this.addBehaviours(i),this.inherit(v),this.add("autoclosing-fragment","insertion",function(o,c,p,s,h){if(h==">"){var m=p.getSelectionRange().start,y=new f(s,m.row,m.column),x=y.getCurrentToken()||y.stepBackward();if(!x)return;if(x.value=="<")return{text:"></>",selection:[1,1]}}})};u.inherits(g,v),r.JavaScriptBehaviour=g}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,r,d){function u(o,c){return o&&o.type&&o.type.lastIndexOf(c+".xml")>-1}var f=e("../../lib/oop"),v=e("../../range").Range,a=e("./fold_mode").FoldMode,g=r.FoldMode=function(o,c){a.call(this),this.voidElements=o||{},this.optionalEndTags=f.mixin({},this.voidElements),c&&f.mixin(this.optionalEndTags,c)};f.inherits(g,a);var i=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(o,c,p){var s=this._getFirstTagInLine(o,p);return s?s.closing||!s.tagName&&s.selfClosing?c==="markbeginend"?"end":"":!s.tagName||s.selfClosing||this.voidElements.hasOwnProperty(s.tagName.toLowerCase())||this._findEndTagInLine(o,p,s.tagName,s.end.column)?"":"start":this.getCommentFoldWidget(o,p)},this.getCommentFoldWidget=function(o,c){return/comment/.test(o.getState(c))&&/<!-/.test(o.getLine(c))?"start":""},this._getFirstTagInLine=function(o,c){for(var p=o.getTokens(c),s=new i,h=0;h<p.length;h++){var m=p[h];if(u(m,"tag-open")){if(s.end.column=s.start.column+m.value.length,s.closing=u(m,"end-tag-open"),m=p[++h],!m)return null;if(s.tagName=m.value,m.value===""){if(m=p[++h],!m)return null;s.tagName=m.value}for(s.end.column+=m.value.length,h++;h<p.length;h++)if(m=p[h],s.end.column+=m.value.length,u(m,"tag-close")){s.selfClosing=m.value=="/>";break}return s}if(u(m,"tag-close"))return s.selfClosing=m.value=="/>",s;s.start.column+=m.value.length}return null},this._findEndTagInLine=function(o,c,p,s){for(var h=o.getTokens(c),m=0,y=0;y<h.length;y++){var x=h[y];if(m+=x.value.length,!(m<s-1)&&u(x,"end-tag-open")&&(x=h[y+1],u(x,"tag-name")&&x.value===""&&(x=h[y+2]),x&&x.value==p))return!0}return!1},this.getFoldWidgetRange=function(o,c,p){var s=this._getFirstTagInLine(o,p);if(!s)return this.getCommentFoldWidget(o,p)&&o.getCommentFoldRange(p,o.getLine(p).length);var h=o.getMatchingTags({row:p,column:0});if(h)return new v(h.openTag.end.row,h.openTag.end.column,h.closeTag.start.row,h.closeTag.start.column)}}).call(g.prototype)}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,r,d){var u=e("../../lib/oop"),f=e("../../range").Range,v=e("./fold_mode").FoldMode,a=r.FoldMode=function(g){g&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+g.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+g.end)))};u.inherits(a,v),(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(g,i,o){var c=g.getLine(o);if(this.singleLineBlockCommentRe.test(c)&&!this.startRegionRe.test(c)&&!this.tripleStarBlockCommentRe.test(c))return"";var p=this._getFoldWidgetBase(g,i,o);return!p&&this.startRegionRe.test(c)?"start":p},this.getFoldWidgetRange=function(g,i,o,c){var p=g.getLine(o);if(this.startRegionRe.test(p))return this.getCommentRegionBlock(g,p,o);var s=p.match(this.foldingStartMarker);if(s){var h=s.index;if(s[1])return this.openingBracketBlock(g,s[1],o,h);var m=g.getCommentFoldRange(o,h+s[0].length,1);return m&&!m.isMultiLine()&&(c?m=this.getSectionRange(g,o):i!="all"&&(m=null)),m}if(i!=="markbegin"){var s=p.match(this.foldingStopMarker);if(s){var h=s.index+s[0].length;return s[1]?this.closingBracketBlock(g,s[1],o,h):g.getCommentFoldRange(o,h,-1)}}},this.getSectionRange=function(g,i){var o=g.getLine(i),c=o.search(/\S/),p=i,s=o.length;i+=1;for(var h=i,m=g.getLength();++i<m;){o=g.getLine(i);var y=o.search(/\S/);if(y!==-1){if(c>y)break;var x=this.getFoldWidgetRange(g,"all",i);if(x){if(x.start.row<=p)break;if(x.isMultiLine())i=x.end.row;else if(c==y)break}h=i}}return new f(p,s,h,g.getLine(h).length)},this.getCommentRegionBlock=function(g,i,o){for(var c=i.search(/\s*$/),p=g.getLength(),s=o,h=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,m=1;++o<p;){i=g.getLine(o);var y=h.exec(i);if(y&&(y[1]?m--:m++,!m))break}var x=o;if(x>s)return new f(s,c,x,i.length)}}).call(a.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,r,d){var u=e("../../lib/oop"),f=e("./xml").FoldMode,v=e("./cstyle").FoldMode,a=r.FoldMode=function(g){g&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+g.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+g.end))),this.xmlFoldMode=new f};u.inherits(a,v),(function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(g,i,o){var c=this.getFoldWidgetBase(g,i,o);return c||this.xmlFoldMode.getFoldWidget(g,i,o)},this.getFoldWidgetRange=function(g,i,o,c){var p=this.getFoldWidgetRangeBase(g,i,o,c);return p||this.xmlFoldMode.getFoldWidgetRange(g,i,o)}}).call(a.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,d){var u=e("../lib/oop"),f=e("./text").Mode,v=e("./javascript_highlight_rules").JavaScriptHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,g=e("../worker/worker_client").WorkerClient,i=e("./behaviour/javascript").JavaScriptBehaviour,o=e("./folding/javascript").FoldMode,c=function(){this.HighlightRules=v,this.$outdent=new a,this.$behaviour=new i,this.foldingRules=new o};u.inherits(c,f),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(p,s,h){var m=this.$getIndent(s),y=this.getTokenizer().getLineTokens(s,p),x=y.tokens,T=y.state;if(x.length&&x[x.length-1].type=="comment")return m;if(p=="start"||p=="no_regex"){var S=s.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);S&&(m+=h)}else if(p=="doc-start"&&(T=="start"||T=="no_regex"))return"";return m},this.checkOutdent=function(p,s,h){return this.$outdent.checkOutdent(s,h)},this.autoOutdent=function(p,s,h){this.$outdent.autoOutdent(s,h)},this.createWorker=function(p){var s=new g(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return s.attachToDocument(p.getDocument()),s.on("annotate",function(h){p.setAnnotations(h.data)}),s.on("terminate",function(){p.clearAnnotations()}),s},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,d){var u={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}},f=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var v=document.createElement("c").style;for(var a in v)if(typeof v[a]=="string"){var g=a.replace(/[A-Z]/g,function(i){return"-"+i.toLowerCase()});u.hasOwnProperty(g)||(u[g]=1)}}this.completionsDefined=!0},this.getCompletions=function(v,a,g,i){if(this.completionsDefined||this.defineCompletions(),v==="ruleset"||a.$mode.$id=="ace/mode/scss"){var o=a.getLine(g.row).substr(0,g.column),c=/\([^)]*$/.test(o);return c&&(o=o.substr(o.lastIndexOf("(")+1)),/:[^;]+$/.test(o)?this.getPropertyValueCompletions(v,a,g,i):this.getPropertyCompletions(v,a,g,i,c)}return[]},this.getPropertyCompletions=function(v,a,g,i,o){o=o||!1;var c=Object.keys(u);return c.map(function(p){return{caption:p,snippet:p+": $0"+(o?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(v,a,g,i){var o=a.getLine(g.row).substr(0,g.column),c=(/([\w\-]+):[^:]*$/.exec(o)||{})[1];if(!c)return[];var p=[];return c in u&&typeof u[c]=="object"&&(p=Object.keys(u[c])),p.map(function(s){return{caption:s,snippet:s,meta:"property value",score:1e6}})}}).call(f.prototype),r.CssCompletions=f}),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,d){var u=e("../../lib/oop");e("../behaviour").Behaviour;var f=e("./cstyle").CstyleBehaviour,v=e("../../token_iterator").TokenIterator,a=function(){this.inherit(f),this.add("colon","insertion",function(g,i,o,c,p){if(p===":"&&o.selection.isEmpty()){var s=o.getCursorPosition(),h=new v(c,s.row,s.column),m=h.getCurrentToken();if(m&&m.value.match(/\s+/)&&(m=h.stepBackward()),m&&m.type==="support.type"){var y=c.doc.getLine(s.row),x=y.substring(s.column,s.column+1);if(x===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(y.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(g,i,o,c,p){var s=c.doc.getTextRange(p);if(!p.isMultiLine()&&s===":"){var h=o.getCursorPosition(),m=new v(c,h.row,h.column),y=m.getCurrentToken();if(y&&y.value.match(/\s+/)&&(y=m.stepBackward()),y&&y.type==="support.type"){var x=c.doc.getLine(p.start.row),T=x.substring(p.end.column,p.end.column+1);if(T===";")return p.end.column++,p}}}),this.add("semicolon","insertion",function(g,i,o,c,p){if(p===";"&&o.selection.isEmpty()){var s=o.getCursorPosition(),h=c.doc.getLine(s.row),m=h.substring(s.column,s.column+1);if(m===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(g,i,o,c,p){if(p==="!"&&o.selection.isEmpty()){var s=o.getCursorPosition(),h=c.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(h.substring(s.column)))return{text:"!important",selection:[10,10]}}})};u.inherits(a,f),r.CssBehaviour=a}),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,d){var u=e("../lib/oop"),f=e("./text").Mode,v=e("./css_highlight_rules").CssHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,g=e("../worker/worker_client").WorkerClient,i=e("./css_completions").CssCompletions,o=e("./behaviour/css").CssBehaviour,c=e("./folding/cstyle").FoldMode,p=function(){this.HighlightRules=v,this.$outdent=new a,this.$behaviour=new o,this.$completer=new i,this.foldingRules=new c};u.inherits(p,f),(function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(s,h,m){var y=this.$getIndent(h),x=this.getTokenizer().getLineTokens(h,s).tokens;if(x.length&&x[x.length-1].type=="comment")return y;var T=h.match(/^.*\{\s*$/);return T&&(y+=m),y},this.checkOutdent=function(s,h,m){return this.$outdent.checkOutdent(h,m)},this.autoOutdent=function(s,h,m){this.$outdent.autoOutdent(h,m)},this.getCompletions=function(s,h,m,y){return this.$completer.getCompletions(s,h,m,y)},this.createWorker=function(s){var h=new g(["ace"],"ace/mode/css_worker","Worker");return h.attachToDocument(s.getDocument()),h.on("annotate",function(m){s.setAnnotations(m.data)}),h.on("terminate",function(){s.clearAnnotations()}),h},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}).call(p.prototype),r.Mode=p}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,r,d){var u=e("../../lib/oop"),f=e("./fold_mode").FoldMode,v=r.FoldMode=function(a,g){this.defaultMode=a,this.subModes=g};u.inherits(v,f),(function(){this.$getMode=function(a){typeof a!="string"&&(a=a[0]);for(var g in this.subModes)if(a.indexOf(g)===0)return this.subModes[g];return null},this.$tryMode=function(a,g,i,o){var c=this.$getMode(a);return c?c.getFoldWidget(g,i,o):""},this.getFoldWidget=function(a,g,i){return this.$tryMode(a.getState(i-1),a,g,i)||this.$tryMode(a.getState(i),a,g,i)||this.defaultMode.getFoldWidget(a,g,i)},this.getFoldWidgetRange=function(a,g,i){var o=this.$getMode(a.getState(i-1));return(!o||!o.getFoldWidget(a,g,i))&&(o=this.$getMode(a.getState(i))),(!o||!o.getFoldWidget(a,g,i))&&(o=this.defaultMode),o.getFoldWidgetRange(a,g,i)}}).call(v.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,d){var u=e("../../lib/oop"),f=e("./mixed").FoldMode,v=e("./xml").FoldMode,a=e("./cstyle").FoldMode,g=r.FoldMode=function(i,o){f.call(this,new v(i,o),{"js-":new a,"css-":new a})};u.inherits(g,f)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,r,d){function u(h,m){return h.type.lastIndexOf(m+".xml")>-1}function f(h,m){for(var y=new a(h,m.row,m.column),x=y.getCurrentToken();x&&!u(x,"tag-name");)x=y.stepBackward();if(x)return x.value}function v(h,m){for(var y=new a(h,m.row,m.column),x=y.getCurrentToken();x&&!u(x,"attribute-name");)x=y.stepBackward();if(x)return x.value}var a=e("../token_iterator").TokenIterator,g=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],i=["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"],o=g.concat(i),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:{}},p=Object.keys(c),s=function(){};(function(){this.getCompletions=function(h,m,y,x){var T=m.getTokenAt(y.row,y.column);if(!T)return[];if(u(T,"tag-name")||u(T,"tag-open")||u(T,"end-tag-open"))return this.getTagCompletions(h,m,y,x);if(u(T,"tag-whitespace")||u(T,"attribute-name"))return this.getAttributeCompletions(h,m,y,x);if(u(T,"attribute-value"))return this.getAttributeValueCompletions(h,m,y,x);var S=m.getLine(y.row).substr(0,y.column);return/&[a-z]*$/i.test(S)?this.getHTMLEntityCompletions(h,m,y,x):[]},this.getTagCompletions=function(h,m,y,x){return p.map(function(T){return{value:T,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(h,m,y,x){var T=f(m,y);if(!T)return[];var S=o;return T in c&&(S=S.concat(Object.keys(c[T]))),S.map(function(_){return{caption:_,snippet:_+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(h,m,y,x){var T=f(m,y),S=v(m,y);if(!T)return[];var _=[];return T in c&&S in c[T]&&typeof c[T][S]=="object"&&(_=Object.keys(c[T][S])),_.map(function(C){return{caption:C,snippet:C,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(h,m,y,x){var T=["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 T.map(function(S){return{caption:S,snippet:S,meta:"html entity",score:1e6}})}}).call(s.prototype),r.HtmlCompletions=s}),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,d){var u=e("../lib/oop"),f=e("../lib/lang"),v=e("./text").Mode,a=e("./javascript").Mode,g=e("./css").Mode,i=e("./html_highlight_rules").HtmlHighlightRules,o=e("./behaviour/xml").XmlBehaviour,c=e("./folding/html").FoldMode,p=e("./html_completions").HtmlCompletions,s=e("../worker/worker_client").WorkerClient,h=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],m=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],y=function(x){this.fragmentContext=x&&x.fragmentContext,this.HighlightRules=i,this.$behaviour=new o,this.$completer=new p,this.createModeDelegates({"js-":a,"css-":g}),this.foldingRules=new c(this.voidElements,f.arrayToMap(m))};u.inherits(y,v),(function(){this.blockComment={start:"<!--",end:"-->"},this.voidElements=f.arrayToMap(h),this.getNextLineIndent=function(x,T,S){return this.$getIndent(T)},this.checkOutdent=function(x,T,S){return!1},this.getCompletions=function(x,T,S,_){return this.$completer.getCompletions(x,T,S,_)},this.createWorker=function(x){if(this.constructor==y){var T=new s(["ace"],"ace/mode/html_worker","Worker");return T.attachToDocument(x.getDocument()),this.fragmentContext&&T.call("setOptions",[{context:this.fragmentContext}]),T.on("error",function(S){x.setAnnotations(S.data)}),T.on("terminate",function(){x.clearAnnotations()}),T}},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,d){var u=e("../lib/oop"),f=e("./text_highlight_rules").TextHighlightRules,v=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",a=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",g=function(){var i=this.createKeywordMapper({keyword:v,"support.function.builtin":a,"invalid.deprecated":"debugger"},"identifier"),o="(?:(?:[1-9]\\d*)|(?:0))",c="(?:\\.\\d+)",p="(?:\\d+)",s="(?:(?:"+p+"?"+c+")|(?:"+p+"\\.))",h="(?:(?:"+s+"|"+p+"))",m="(?:"+h+"|"+s+")",y="(?:&"+p+")",x="[a-zA-Z_][a-zA-Z0-9_]*",T="(?:"+x+"(?==))",S="(?:\\$(?: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,O){var M=C[2]=="-"?"indentedHeredoc":"heredoc",I=C.split(this.splitRegex);return O.push(M,I[4]),[{type:"constant",value:I[1]},{type:"text",value:I[2]},{type:"string",value:I[3]},{type:"support.class",value:I[4]},{type:"string",value:I[5]}]},rules:{heredoc:[{onMatch:function(C,L,O){return C===O[1]?(O.shift(),O.shift(),this.next=O[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(C,L,O){return C===O[1]?(O.shift(),O.shift(),this.next=O[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:S},{token:"variable",regex:T},{include:"variables"},{token:"support.function",regex:_},{token:"support.function",regex:y},{token:"string",start:"'",end:"'"},{token:"constant.numeric",regex:m},{token:"constant.numeric",regex:o+"\\b"},{token:i,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()};u.inherits(g,f),r.ShHighlightRules=g}),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,d){var u=e("../lib/oop"),f=e("./text").Mode,v=e("./sh_highlight_rules").ShHighlightRules,a=e("../range").Range,g=e("./folding/cstyle").FoldMode,i=function(){this.HighlightRules=v,this.foldingRules=new g,this.$behaviour=this.$defaultBehaviour};u.inherits(i,f),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(c,p,s){var h=this.$getIndent(p),m=this.getTokenizer().getLineTokens(p,c),y=m.tokens;if(y.length&&y[y.length-1].type=="comment")return h;if(c=="start"){var x=p.match(/^.*[\{\(\[:]\s*$/);x&&(h+=s)}return h};var o={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(c,p,s){if(s!==`\r
995
+ `&&s!=="\r"&&s!==`
996
+ `)return!1;var h=this.getTokenizer().getLineTokens(p.trim(),c).tokens;if(!h)return!1;do var m=h.pop();while(m&&(m.type=="comment"||m.type=="text"&&m.value.match(/^\s+$/)));return m?m.type=="keyword"&&o[m.value]:!1},this.autoOutdent=function(c,p,s){s+=1;var h=this.$getIndent(p.getLine(s)),m=p.getTabString();h.slice(-m.length)==m&&p.remove(new a(s,h.length-m.length,s,h.length))},this.$id="ace/mode/sh",this.snippetFileId="ace/snippets/sh"}).call(i.prototype),r.Mode=i}),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,d){var u=e("../lib/oop"),f=e("../lib/lang"),v=e("./text").Mode,a=e("./xml_highlight_rules").XmlHighlightRules,g=e("./behaviour/xml").XmlBehaviour,i=e("./folding/xml").FoldMode,o=e("../worker/worker_client").WorkerClient,c=function(){this.HighlightRules=a,this.$behaviour=new g,this.foldingRules=new i};u.inherits(c,v),(function(){this.voidElements=f.arrayToMap([]),this.blockComment={start:"<!--",end:"-->"},this.createWorker=function(p){var s=new o(["ace"],"ace/mode/xml_worker","Worker");return s.attachToDocument(p.getDocument()),s.on("error",function(h){p.setAnnotations(h.data)}),s.on("terminate",function(){p.clearAnnotations()}),s},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,d){var u=e("../lib/oop"),f=e("./behaviour/cstyle").CstyleBehaviour,v=e("./text").Mode,a=e("./markdown_highlight_rules").MarkdownHighlightRules,g=e("./folding/markdown").FoldMode,i=function(){this.HighlightRules=a,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 g,this.$behaviour=new f({braces:!0})};u.inherits(i,v),(function(){this.type="text",this.blockComment={start:"<!--",end:"-->"},this.$quotes={'"':'"',"`":"`"},this.getNextLineIndent=function(o,c,p){if(o=="listblock"){var s=/^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(c);if(!s)return"";var h=s[2];return h||(h=parseInt(s[3],10)+1+"."),s[1]+h+s[4]}return this.$getIndent(c)},this.$id="ace/mode/markdown",this.snippetFileId="ace/snippets/markdown"}).call(i.prototype),r.Mode=i}),(function(){ace.require(["ace/mode/markdown"],function(e){n&&(n.exports=e)})})()})(nv)),nv.exports}qS();var iv={exports:{}},ov;function KS(){return ov||(ov=1,(function(n,t){ace.define("ace/theme/twilight-css",["require","exports","module"],function(e,r,d){d.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,d){r.isDark=!0,r.cssClass="ace-twilight",r.cssText=e("./twilight-css");var u=e("../lib/dom");u.importCssString(r.cssText,r.cssClass,!1)}),(function(){ace.require(["ace/theme/twilight"],function(e){n&&(n.exports=e)})})()})(iv)),iv.exports}KS();var sv={exports:{}},av;function YS(){return av||(av=1,(function(n,t){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,d){function u(C){var L=new Date().toLocaleString("en-us",C);return L.length==1?"0"+L:L}var f=e("./lib/dom"),v=e("./lib/oop"),a=e("./lib/event_emitter").EventEmitter,g=e("./lib/lang"),i=e("./range").Range,o=e("./range_list").RangeList,c=e("./keyboard/hash_handler").HashHandler,p=e("./tokenizer").Tokenizer,s=e("./clipboard"),h={CURRENT_WORD:function(C){return C.session.getTextRange(C.session.getWordRange())},SELECTION:function(C,L,O){var M=C.session.getTextRange();return O?M.replace(/\n\r?([ \t]*\S)/g,`
1127
+ `+O+"$1"):M},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 s.getText&&s.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:u.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:u.bind(null,{year:"2-digit"}),CURRENT_MONTH:u.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:u.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:u.bind(null,{month:"short"}),CURRENT_DATE:u.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:u.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:u.bind(null,{weekday:"short"}),CURRENT_HOUR:u.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:u.bind(null,{minute:"2-digit"}),CURRENT_SECOND:u.bind(null,{second:"2-digit"})};h.SELECTED_TEXT=h.SELECTION;var m=(function(){function C(){this.snippetMap={},this.snippetNameMap={},this.variables=h}return C.prototype.getTokenizer=function(){return C.$tokenizer||this.createTokenizer()},C.prototype.createTokenizer=function(){function L(I){return I=I.substr(1),/^\d+$/.test(I)?[{tabstopId:parseInt(I,10)}]:[{text:I}]}function O(I){return"(?:[^\\\\"+I+"]|\\\\.)"}var M={regex:"/("+O("/")+"+)/",onMatch:function(I,B,F){var N=F[0];return N.fmtString=!0,N.guard=I.slice(1,-1),N.flag="",""},next:"formatString"};return C.$tokenizer=new p({start:[{regex:/\\./,onMatch:function(I,B,F){var N=I[1];return(N=="}"&&F.length||"`$\\".indexOf(N)!=-1)&&(I=N),[I]}},{regex:/}/,onMatch:function(I,B,F){return[F.length?F.shift():I]}},{regex:/\$(?:\d+|\w+)/,onMatch:L},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(I,B,F){var N=L(I.substr(1));return F.unshift(N[0]),N},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+O("\\|")+"*\\|",onMatch:function(I,B,F){var N=I.slice(1,-1).replace(/\\[,|\\]|,/g,function(E){return E.length==2?E[1]:"\0"}).split("\0").map(function(E){return{value:E}});return F[0].choices=N,[N[0]]},next:"start"},M,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(I,B,F){return F.length&&F[0].expectElse?(F[0].expectElse=!1,F[0].ifEnd={elseEnd:F[0]},[F[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(I,B,F){var N=I[1];return N=="}"&&F.length||"`$\\".indexOf(N)!=-1?I=N:N=="n"?I=`
1128
+ `:N=="t"?I=" ":"ulULE".indexOf(N)!=-1&&(I={changeCase:N,local:N>"a"}),[I]}},{regex:"/\\w*}",onMatch:function(I,B,F){var N=F.shift();return N&&(N.flag=I.slice(1,-1)),this.next=N&&N.tabstopId?"start":"",[N||I]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(I,B,F){return[{text:I.slice(1)}]}},{regex:/\${\w+/,onMatch:function(I,B,F){var N={text:I.slice(2)};return F.unshift(N),[N]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(I,B,F){var N=F.shift();return this.next=N&&N.tabstopId?"start":"",[N||I]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(I,B,F){var N=F[0];return N.formatFunction=I.slice(2,-1),[F.shift()]},next:"formatString"},M,{regex:/:[\?\-+]?/,onMatch:function(I,B,F){I[1]=="+"&&(F[0].ifEnd=F[0]),I[1]=="?"&&(F[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),C.$tokenizer},C.prototype.tokenizeTmSnippet=function(L,O){return this.getTokenizer().getLineTokens(L,O).tokens.map(function(M){return M.value||M})},C.prototype.getVariableValue=function(L,O,M){if(/^\d+$/.test(O))return(this.variables.__||{})[O]||"";if(/^[A-Z]\d+$/.test(O))return(this.variables[O[0]+"__"]||{})[O.substr(1)]||"";if(O=O.replace(/^TM_/,""),!this.variables.hasOwnProperty(O))return"";var I=this.variables[O];return typeof I=="function"&&(I=this.variables[O](L,O,M)),I??""},C.prototype.tmStrFormat=function(L,O,M){if(!O.fmt)return L;var I=O.flag||"",B=O.guard;B=new RegExp(B,I.replace(/[^gim]/g,""));var F=typeof O.fmt=="string"?this.tokenizeTmSnippet(O.fmt,"formatString"):O.fmt,N=this,E=L.replace(B,function(){var A=N.variables.__;N.variables.__=[].slice.call(arguments);for(var D=N.resolveVariables(F,M),j="E",W=0;W<D.length;W++){var V=D[W];if(typeof V=="object")if(D[W]="",V.changeCase&&V.local){var K=D[W+1];K&&typeof K=="string"&&(V.changeCase=="u"?D[W]=K[0].toUpperCase():D[W]=K[0].toLowerCase(),D[W+1]=K.substr(1))}else V.changeCase&&(j=V.changeCase);else j=="U"?D[W]=V.toUpperCase():j=="L"&&(D[W]=V.toLowerCase())}return N.variables.__=A,D.join("")});return E},C.prototype.tmFormatFunction=function(L,O,M){return O.formatFunction=="upcase"?L.toUpperCase():O.formatFunction=="downcase"?L.toLowerCase():L},C.prototype.resolveVariables=function(L,O){function M(j){var W=L.indexOf(j,N+1);W!=-1&&(N=W)}for(var I=[],B="",F=!0,N=0;N<L.length;N++){var E=L[N];if(typeof E=="string"){I.push(E),E==`
1129
+ `?(F=!0,B=""):F&&(B=/^\t*/.exec(E)[0],F=/\S/.test(E));continue}if(E){if(F=!1,E.fmtString){var A=L.indexOf(E,N+1);A==-1&&(A=L.length),E.fmt=L.slice(N+1,A),N=A}if(E.text){var D=this.getVariableValue(O,E.text,B)+"";E.fmtString&&(D=this.tmStrFormat(D,E,O)),E.formatFunction&&(D=this.tmFormatFunction(D,E,O)),D&&!E.ifEnd?(I.push(D),M(E)):!D&&E.ifEnd&&M(E.ifEnd)}else E.elseEnd?M(E.elseEnd):(E.tabstopId!=null||E.changeCase!=null)&&I.push(E)}}return I},C.prototype.getDisplayTextForSnippet=function(L,O){var M=y.call(this,L,O);return M.text},C.prototype.insertSnippetForSelection=function(L,O,M){M===void 0&&(M={});var I=y.call(this,L,O,M),B=L.getSelectionRange(),F=L.session.replace(B,I.text),N=new x(L),E=L.inVirtualSelectionMode&&L.selection.index;N.addTabstops(I.tabstops,B.start,F,E)},C.prototype.insertSnippet=function(L,O,M){M===void 0&&(M={});var I=this;if(L.inVirtualSelectionMode)return I.insertSnippetForSelection(L,O,M);L.forEachSelection(function(){I.insertSnippetForSelection(L,O,M)},null,{keepOrder:!0}),L.tabstopManager&&L.tabstopManager.tabNext()},C.prototype.$getScope=function(L){var O=L.session.$mode.$id||"";if(O=O.split("/").pop(),O==="html"||O==="php"){O==="php"&&!L.session.$mode.inlinePhp&&(O="html");var M=L.getCursorPosition(),I=L.session.getState(M.row);typeof I=="object"&&(I=I[0]),I.substring&&(I.substring(0,3)=="js-"?O="javascript":I.substring(0,4)=="css-"?O="css":I.substring(0,4)=="php-"&&(O="php"))}return O},C.prototype.getActiveScopes=function(L){var O=this.$getScope(L),M=[O],I=this.snippetMap;return I[O]&&I[O].includeScopes&&M.push.apply(M,I[O].includeScopes),M.push("_"),M},C.prototype.expandWithTab=function(L,O){var M=this,I=L.forEachSelection(function(){return M.expandSnippetForSelection(L,O)},null,{keepOrder:!0});return I&&L.tabstopManager&&L.tabstopManager.tabNext(),I},C.prototype.expandSnippetForSelection=function(L,O){var M=L.getCursorPosition(),I=L.session.getLine(M.row),B=I.substring(0,M.column),F=I.substr(M.column),N=this.snippetMap,E;return this.getActiveScopes(L).some(function(A){var D=N[A];return D&&(E=this.findMatchingSnippet(D,B,F)),!!E},this),E?(O&&O.dryRun||(L.session.doc.removeInLine(M.row,M.column-E.replaceBefore.length,M.column+E.replaceAfter.length),this.variables.M__=E.matchBefore,this.variables.T__=E.matchAfter,this.insertSnippetForSelection(L,E.content),this.variables.M__=this.variables.T__=null),!0):!1},C.prototype.findMatchingSnippet=function(L,O,M){for(var I=L.length;I--;){var B=L[I];if(!(B.startRe&&!B.startRe.test(O))&&!(B.endRe&&!B.endRe.test(M))&&!(!B.startRe&&!B.endRe))return B.matchBefore=B.startRe?B.startRe.exec(O):[""],B.matchAfter=B.endRe?B.endRe.exec(M):[""],B.replaceBefore=B.triggerRe?B.triggerRe.exec(O)[0]:"",B.replaceAfter=B.endTriggerRe?B.endTriggerRe.exec(M)[0]:"",B}},C.prototype.register=function(L,O){function M(A){return A&&!/^\^?\(.*\)\$?$|^\\b$/.test(A)&&(A="(?:"+A+")"),A||""}function I(A,D,j){return A=M(A),D=M(D),A=D+A,A&&A[A.length-1]!="$"&&(A+="$"),new RegExp(A)}function B(A){A.scope||(A.scope=O||"_"),O=A.scope,F[O]||(F[O]=[],N[O]={});var D=N[O];if(A.name){var j=D[A.name];j&&E.unregister(j),D[A.name]=A}F[O].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=g.escapeRegExp(A.tabTrigger)),!(!A.trigger&&!A.guard&&!A.endTrigger&&!A.endGuard)&&(A.startRe=I(A.trigger,A.guard),A.triggerRe=new RegExp(A.trigger),A.endRe=I(A.endTrigger,A.endGuard),A.endTriggerRe=new RegExp(A.endTrigger))}var F=this.snippetMap,N=this.snippetNameMap,E=this;L||(L=[]),Array.isArray(L)?L.forEach(B):Object.keys(L).forEach(function(A){B(L[A])}),this._signal("registerSnippets",{scope:O})},C.prototype.unregister=function(L,O){function M(F){var N=B[F.scope||O];if(N&&N[F.name]){delete N[F.name];var E=I[F.scope||O],A=E&&E.indexOf(F);A>=0&&E.splice(A,1)}}var I=this.snippetMap,B=this.snippetNameMap;L.content?M(L):Array.isArray(L)&&L.forEach(M)},C.prototype.parseSnippetFile=function(L){L=L.replace(/\r/g,"");for(var O=[],M={},I=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,B;B=I.exec(L);){if(B[1])try{M=JSON.parse(B[1]),O.push(M)}catch{}if(B[4])M.content=B[4].replace(/^\t/gm,""),O.push(M),M={};else{var F=B[2],N=B[3];if(F=="regex"){var E=/\/((?:[^\/\\]|\\.)*)|$/g;M.guard=E.exec(N)[1],M.trigger=E.exec(N)[1],M.endTrigger=E.exec(N)[1],M.endGuard=E.exec(N)[1]}else F=="snippet"?(M.tabTrigger=N.match(/^\S*/)[0],M.name||(M.name=N)):F&&(M[F]=N)}}return O},C.prototype.getSnippetByName=function(L,O){var M=this.snippetNameMap,I;return this.getActiveScopes(O).some(function(B){var F=M[B];return F&&(I=F[L]),!!I},this),I},C})();v.implement(m.prototype,a);var y=function(C,L,O){function M(ne){for(var fe=[],Se=0;Se<ne.length;Se++){var Te=ne[Se];if(typeof Te=="object"){if(D[Te.tabstopId])continue;var Re=ne.lastIndexOf(Te,Se-1);Te=fe[Re]||{tabstopId:Te.tabstopId}}fe[Se]=Te}return fe}O===void 0&&(O={});var I=C.getCursorPosition(),B=C.session.getLine(I.row),F=C.session.getTabString(),N=B.match(/^\s*/)[0];I.column<N.length&&(N=N.slice(0,I.column)),L=L.replace(/\r/g,"");var E=this.tokenizeTmSnippet(L);E=this.resolveVariables(E,C),E=E.map(function(ne){return ne==`
1131
+ `&&!O.excludeExtraIndent?ne+N:typeof ne=="string"?ne.replace(/\t/g,F):ne});var A=[];E.forEach(function(ne,fe){if(typeof ne=="object"){var Se=ne.tabstopId,Te=A[Se];if(Te||(Te=A[Se]=[],Te.index=Se,Te.value="",Te.parents={}),Te.indexOf(ne)===-1){ne.choices&&!Te.choices&&(Te.choices=ne.choices),Te.push(ne);var Re=E.indexOf(ne,fe+1);if(Re!==-1){var Ve=E.slice(fe+1,Re),Ue=Ve.some(function(Xe){return typeof Xe=="object"});Ue&&!Te.value?Te.value=Ve:Ve.length&&(!Te.value||typeof Te.value!="string")&&(Te.value=Ve.join(""))}}}}),A.forEach(function(ne){ne.length=0});for(var D={},j=0;j<E.length;j++){var W=E[j];if(typeof W=="object"){var V=W.tabstopId,K=A[V],X=E.indexOf(W,j+1);if(D[V]){D[V]===W&&(delete D[V],Object.keys(D).forEach(function(ne){K.parents[ne]=!0}));continue}D[V]=W;var oe=K.value;typeof oe!="string"?oe=M(oe):W.fmt&&(oe=this.tmStrFormat(oe,W,C)),E.splice.apply(E,[j+1,Math.max(0,X-j)].concat(oe,W)),K.indexOf(W)===-1&&K.push(W)}}var ee=0,le=0,ue="";return E.forEach(function(ne){if(typeof ne=="string"){var fe=ne.split(`
1132
+ `);fe.length>1?(le=fe[fe.length-1].length,ee+=fe.length-1):le+=ne.length,ue+=ne}else ne&&(ne.start?ne.end={row:ee,column:le}:ne.start={row:ee,column:le})}),{text:ue,tabstops:A,tokens:E}},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=g.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 O=L.action[0]=="r",M=this.selectedTabstop||{},I=M.parents||{},B=this.tabstops.slice(),F=0;F<B.length;F++){var N=B[F],E=N==M||I[N.index];if(N.rangeList.$bias=E?0:1,L.action=="remove"&&N!==M){var A=N.parents&&N.parents[M.index],D=N.rangeList.pointIndex(L.start,A);D=D<0?-D-1:D+1;var j=N.rangeList.pointIndex(L.end,A);j=j<0?-j-1:j-1;for(var W=N.rangeList.ranges.slice(D,j),V=0;V<W.length;V++)this.removeRange(W[V])}N.rangeList.$onChange(L)}var K=this.session;!this.$inChange&&O&&K.getLength()==1&&!K.getValue()&&this.detach()},C.prototype.updateLinkedFields=function(){var L=this.selectedTabstop;if(!(!L||!L.hasLinkedRanges||!L.firstNonLinked)){this.$inChange=!0;for(var O=this.session,M=O.getTextRange(L.firstNonLinked),I=0;I<L.length;I++){var B=L[I];if(B.linked){var F=B.original,N=r.snippetManager.tmStrFormat(M,F,this.editor);O.replace(B,N)}}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,O=this.editor.selection.anchor,M=this.editor.selection.isEmpty(),I=0;I<this.ranges.length;I++)if(!this.ranges[I].linked){var B=this.ranges[I].contains(L.row,L.column),F=M||this.ranges[I].contains(O.row,O.column);if(B&&F)return}this.detach()}},C.prototype.onChangeSession=function(){this.detach()},C.prototype.tabNext=function(L){var O=this.tabstops.length,M=this.index+(L||1);M=Math.min(Math.max(M,1),O),M==O&&(M=0),this.selectTabstop(M),this.updateTabstopMarkers(),M===0&&this.detach()},C.prototype.selectTabstop=function(L){this.$openTabstops=null;var O=this.tabstops[this.index];if(O&&this.addTabstopMarkers(O),this.index=L,O=this.tabstops[this.index],!(!O||!O.length)){this.selectedTabstop=O;var M=O.firstNonLinked||O;if(O.choices&&(M.cursor=M.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(M);else{var I=this.editor.multiSelect;I.toSingleRange(M);for(var B=0;B<O.length;B++)O.hasLinkedRanges&&O[B].linked||I.addRange(O[B].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,O,M){var I=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!L[0]){var B=i.fromPoints(M,M);S(B.start,O),S(B.end,O),L[0]=[B],L[0].index=0}var F=this.index,N=[F+1,0],E=this.ranges,A=this.snippetId=(this.snippetId||0)+1;L.forEach(function(D,j){var W=this.$openTabstops[j]||D;W.snippetId=A;for(var V=0;V<D.length;V++){var K=D[V],X=i.fromPoints(K.start,K.end||K.start);T(X.start,O),T(X.end,O),X.original=K,X.tabstop=W,E.push(X),W!=D?W.unshift(X):W[V]=X,K.fmtString||W.firstNonLinked&&I?(X.linked=!0,W.hasLinkedRanges=!0):W.firstNonLinked||(W.firstNonLinked=X)}W.firstNonLinked||(W.hasLinkedRanges=!1),W===D&&(N.push(W),this.$openTabstops[j]=W),this.addTabstopMarkers(W),W.rangeList=W.rangeList||new o,W.rangeList.$bias=0,W.rangeList.addList(W)},this),N.length>2&&(this.tabstops.length&&N.push(N.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,N))},C.prototype.addTabstopMarkers=function(L){var O=this.session;L.forEach(function(M){M.markerId||(M.markerId=O.addMarker(M,"ace_snippet-marker","text"))})},C.prototype.removeTabstopMarkers=function(L){var O=this.session;L.forEach(function(M){O.removeMarker(M.markerId),M.markerId=null})},C.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var L=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&L--,this.tabstops.forEach(function(O){O.snippetId===L?this.addTabstopMarkers(O):this.removeTabstopMarkers(O)},this)}},C.prototype.removeRange=function(L){var O=L.tabstop.indexOf(L);O!=-1&&L.tabstop.splice(O,1),O=this.ranges.indexOf(L),O!=-1&&this.ranges.splice(O,1),O=L.tabstop.rangeList.ranges.indexOf(L),O!=-1&&L.tabstop.splice(O,1),this.session.removeMarker(L.markerId),L.tabstop.length||(O=this.tabstops.indexOf(L.tabstop),O!=-1&&this.tabstops.splice(O,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 T=function(C,L){C.row==0&&(C.column+=L.column),C.row+=L.row},S=function(C,L){C.row==L.row&&(C.column-=L.column),C.row-=L.row};f.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 m;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,d){var u=e("../virtual_renderer").VirtualRenderer,f=e("../editor").Editor,v=e("../range").Range,a=e("../lib/event"),g=e("../lib/lang"),i=e("../lib/dom"),o=e("../config").nls,c=e("./../lib/useragent"),p=function(T){return"suggest-aria-id:".concat(T)},s=c.isSafari?"menu":"listbox",h=c.isSafari?"menuitem":"option",m=c.isSafari?"aria-current":"aria-selected",y=function(T){var S=new u(T);S.$maxLines=4;var _=new f(S);return _.setHighlightActiveLine(!1),_.setShowPrintMargin(!1),_.renderer.setShowGutter(!1),_.renderer.setHighlightGutterLine(!1),_.$mouseHandler.$focusTimeout=0,_.$highlightTagPending=!0,_},x=(function(){function T(S){var _=i.createElement("div"),C=y(_);S&&S.appendChild(_),_.style.display="none",C.renderer.content.style.cursor="default",C.renderer.setStyle("ace_autocomplete"),C.renderer.$textLayer.element.setAttribute("role",s),C.renderer.$textLayer.element.setAttribute("aria-roledescription",o("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),C.renderer.$textLayer.element.setAttribute("aria-label",o("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(E){var A=E.getDocumentPosition();C.selection.moveToPosition(A),I.start.row=I.end.row=A.row,E.stop()});var O,M=new v(-1,0,-1,1/0),I=new v(-1,0,-1,1/0);I.id=C.session.addMarker(I,"ace_active-line","fullLine"),C.setSelectOnHover=function(E){E?M.id&&(C.session.removeMarker(M.id),M.id=null):M.id=C.session.addMarker(M,"ace_line-hover","fullLine")},C.setSelectOnHover(!1),C.on("mousemove",function(E){if(!O){O=E;return}if(!(O.x==E.x&&O.y==E.y)){O=E,O.scrollTop=C.renderer.scrollTop,C.isMouseOver=!0;var A=O.getDocumentPosition().row;M.start.row!=A&&(M.id||C.setRow(A),F(A))}}),C.renderer.on("beforeRender",function(){if(O&&M.start.row!=-1){O.$pos=null;var E=O.getDocumentPosition().row;M.id||C.setRow(E),F(E,!0)}}),C.renderer.on("afterRender",function(){for(var E=C.renderer.$textLayer,A=E.config.firstRow,D=E.config.lastRow;A<=D;A++){var j=E.element.childNodes[A-E.config.firstRow];j.setAttribute("role",h),j.setAttribute("aria-roledescription",o("autocomplete.popup.item.aria-roledescription","item")),j.setAttribute("aria-setsize",C.data.length),j.setAttribute("aria-describedby","doc-tooltip"),j.setAttribute("aria-posinset",A+1);var W=C.getData(A);if(W){var V="".concat(W.caption||W.value).concat(W.meta?", ".concat(W.meta):"");j.setAttribute("aria-label",V)}var K=j.querySelectorAll(".ace_completion-highlight");K.forEach(function(X){X.setAttribute("role","mark")})}}),C.renderer.on("afterRender",function(){var E=C.getRow(),A=C.renderer.$textLayer,D=A.element.childNodes[E-A.config.firstRow],j=document.activeElement;if(D!==C.selectedNode&&C.selectedNode&&(i.removeCssClass(C.selectedNode,"ace_selected"),C.selectedNode.removeAttribute(m),C.selectedNode.removeAttribute("id")),j.removeAttribute("aria-activedescendant"),C.selectedNode=D,D){var W=p(E);i.addCssClass(D,"ace_selected"),D.id=W,A.element.setAttribute("aria-activedescendant",W),j.setAttribute("aria-activedescendant",W),D.setAttribute(m,"true")}});var B=function(){F(-1)},F=function(E,A){E!==M.start.row&&(M.start.row=M.end.row=E,A||C.session._emit("changeBackMarker"),C._emit("changeHoverMarker"))};C.getHoveredRow=function(){return M.start.row},a.addListener(C.container,"mouseout",function(){C.isMouseOver=!1,B()}),C.on("hide",B),C.on("changeSelection",B),C.session.doc.getLength=function(){return C.data.length},C.session.doc.getLine=function(E){var A=C.data[E];return typeof A=="string"?A:A&&A.value||""};var N=C.session.bgTokenizer;return N.$tokenizeRow=function(E){function A(ne,fe){ne&&j.push({type:(D.className||"")+(fe||""),value:ne})}var D=C.data[E],j=[];if(!D)return j;typeof D=="string"&&(D={value:D});for(var W=D.caption||D.value||D.name,V=W.toLowerCase(),K=(C.filterText||"").toLowerCase(),X=0,oe=0,ee=0;ee<=K.length;ee++)if(ee!=oe&&(D.matchMask&1<<ee||ee==K.length)){var le=K.slice(oe,ee);oe=ee;var ue=V.indexOf(le,X);if(ue==-1)continue;A(W.slice(X,ue),""),X=ue+le.length,A(W.slice(ue,X),"completion-highlight")}return A(W.slice(X,W.length),""),j.push({type:"completion-spacer",value:" "}),D.meta&&j.push({type:"completion-meta",value:D.meta}),D.message&&j.push({type:"completion-message",value:D.message}),j},N.$updateOnChange=L,N.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(E,A){C.filterText=A||"",C.setValue(g.stringRepeat(`
1140
+ `,E.length),-1),C.data=E||[],C.setRow(0)},C.getData=function(E){return C.data[E]},C.getRow=function(){return I.start.row},C.setRow=function(E){E=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,E)),I.start.row!=E&&(C.selection.clearSelection(),I.start.row=I.end.row=E||0,C.session._emit("changeBackMarker"),C.moveCursorTo(E||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(E,A,D,j){if(!j&&C.isOpen&&C.anchorPos&&C.anchor&&C.anchorPos.top===E.top&&C.anchorPos.left===E.left&&C.anchor===D)return!0;var W=this.container,V=this.renderer.scrollBar.width||10,K=window.innerHeight-V,X=window.innerWidth-V,oe=this.renderer,ee=oe.$maxLines*A*1.4,le={top:0,bottom:0},ue=K-E.top-3*this.$borderSize-A,ne=E.top-3*this.$borderSize;D||(ne<=ue||ue>=ee?D="bottom":D="top"),D==="top"?(le.bottom=E.top-this.$borderSize,le.top=le.bottom-ee):D==="bottom"&&(le.top=E.top+A+this.$borderSize,le.bottom=le.top+ee);var fe=le.top>=0&&le.bottom<=K;if(!j&&!fe)return!1;fe?oe.$maxPixelHeight=null:D==="top"?oe.$maxPixelHeight=ne:oe.$maxPixelHeight=ue,D==="top"?(W.style.top="",W.style.bottom=K+V-le.bottom+"px",C.isTopdown=!1):(W.style.top=le.top+"px",W.style.bottom="",C.isTopdown=!0),W.style.display="";var Se=E.left;return Se+W.offsetWidth>X&&(Se=X-W.offsetWidth),W.style.left=Se+"px",W.style.right="",i.$fixPositionBug(W),C.isOpen||(C.isOpen=!0,this._signal("show"),O=null),C.anchorPos=E,C.anchor=D,!0},C.show=function(E,A,D){this.tryShow(E,A,D?"bottom":void 0,!0)},C.goTo=function(E){var A=this.getRow(),D=this.session.getLength()-1;switch(E){case"up":A=A<=0?D:A-1;break;case"down":A=A>=D?-1:A+1;break;case"start":A=0;break;case"end":A=D}this.setRow(A)},C.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},C.$imageSize=0,C.$borderSize=1,C}return T})();i.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=p}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(e,r,d){var u=(function(){function f(v){this.editor=v,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return f.prototype.setScreenReaderContent=function(v){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",(function(){var g=this.popup.getRow(),i=this.popup.renderer.$textLayer,o=i.element.childNodes[g-i.config.firstRow];if(o){for(var c="doc-tooltip ",p=0;p<this._lines.length;p++)c+="ace-inline-screenreader-line-".concat(p," ");o.setAttribute("aria-describedby",c)}}).bind(this)));this.screenReaderDiv.firstChild;)this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild);this._lines=v.split(/\r\n|\r|\n/);var a=this.createCodeBlock();this.screenReaderDiv.appendChild(a)},f.prototype.destroy=function(){this.screenReaderDiv.remove()},f.prototype.createCodeBlock=function(){var v=document.createElement("pre");v.setAttribute("id","ace-inline-screenreader");for(var a=0;a<this._lines.length;a++){var g=document.createElement("code");g.setAttribute("id","ace-inline-screenreader-line-".concat(a));var i=document.createTextNode(this._lines[a]);g.appendChild(i),v.appendChild(g)}return v},f})();r.AceInlineScreenReader=u}),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets","ace/autocomplete/inline_screenreader"],function(e,r,d){var u=e("../snippets").snippetManager,f=e("./inline_screenreader").AceInlineScreenReader,v=(function(){function a(){this.editor=null}return a.prototype.show=function(g,i,o){if(o=o||"",g&&this.editor&&this.editor!==g&&(this.hide(),this.editor=null,this.inlineScreenReader=null),!g||!i)return!1;this.inlineScreenReader||(this.inlineScreenReader=new f(g));var c=i.snippet?u.getDisplayTextForSnippet(g,i.snippet):i.value;return i.hideInlinePreview||!c||!c.startsWith(o)?!1:(this.editor=g,this.inlineScreenReader.setScreenReaderContent(c),c=c.slice(o.length),c===""?g.removeGhostText():g.setGhostText(c),!0)},a.prototype.isOpen=function(){return this.editor?!!this.editor.renderer.$ghostText:!1},a.prototype.hide=function(){return this.editor?(this.editor.removeGhostText(),!0):!1},a.prototype.destroy=function(){this.hide(),this.editor=null,this.inlineScreenReader&&(this.inlineScreenReader.destroy(),this.inlineScreenReader=null)},a})();r.AceInline=v}),ace.define("ace/autocomplete/util",["require","exports","module"],function(e,r,d){r.parForEach=function(f,v,a){var g=0,i=f.length;i===0&&a();for(var o=0;o<i;o++)v(f[o],function(c,p){g++,g===i&&a(c,p)})};var u=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;r.retrievePrecedingIdentifier=function(f,v,a){a=a||u;for(var g=[],i=v-1;i>=0&&a.test(f[i]);i--)g.push(f[i]);return g.reverse().join("")},r.retrieveFollowingIdentifier=function(f,v,a){a=a||u;for(var g=[],i=v;i<f.length&&a.test(f[i]);i++)g.push(f[i]);return g},r.getCompletionPrefix=function(f){var v=f.getCursorPosition(),a=f.session.getLine(v.row),g;return f.completers.forEach((function(i){i.identifierRegexps&&i.identifierRegexps.forEach((function(o){!g&&o&&(g=this.retrievePrecedingIdentifier(a,v.column,o))}).bind(this))}).bind(this)),g||this.retrievePrecedingIdentifier(a,v.column)},r.triggerAutocomplete=function(f,a){var a=a??f.session.getPrecedingCharacter();return f.completers.some(function(g){if(g.triggerCharacters&&Array.isArray(g.triggerCharacters))return g.triggerCharacters.includes(a)})}}),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,d){var u=e("./keyboard/hash_handler").HashHandler,f=e("./autocomplete/popup").AcePopup,v=e("./autocomplete/inline").AceInline,a=e("./autocomplete/popup").getAriaId,g=e("./autocomplete/util"),i=e("./lib/lang"),o=e("./lib/dom"),c=e("./snippets").snippetManager,p=e("./config"),s=e("./lib/event"),h=e("./lib/scroll").preventParentScroll,m=function(S,_){_.completer&&_.completer.destroy()},y=(function(){function S(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new u,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=i.delayedCall((function(){this.updateCompletions(!0)}).bind(this)),this.tooltipTimer=i.delayedCall(this.updateDocTooltip.bind(this),50),this.popupTimer=i.delayedCall(this.$updatePopupPosition.bind(this),50),this.stickySelectionTimer=i.delayedCall((function(){this.stickySelection=!0}).bind(this),this.stickySelectionDelay),this.$firstOpenTimer=i.delayedCall((function(){var _=this.completionProvider&&this.completionProvider.initialPosition;this.autoShown||this.popup&&this.popup.isOpen||!_||this.editor.completers.length===0||(this.completions=new T(S.completionsForLoading),this.openPopup(this.editor,_.prefix,!1),this.popup.renderer.setStyle("ace_loading",!0))}).bind(this),this.stickySelectionDelay)}return Object.defineProperty(S,"completionsForLoading",{get:function(){return[{caption:p.nls("autocomplete.loading","Loading..."),value:""}]},enumerable:!1,configurable:!0}),S.prototype.$init=function(){return this.popup=new f(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)),s.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},S.prototype.$initInline=function(){if(!(!this.inlineEnabled||this.inlineRenderer))return this.inlineRenderer=new v,this.inlineRenderer},S.prototype.getPopup=function(){return this.popup||this.$init()},S.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip(),this.stickySelectionTimer.cancel(),this.popupTimer.cancel(),this.stickySelection=!1},S.prototype.$seen=function(_){!this.hasSeen.has(_)&&_&&_.completer&&_.completer.onSeen&&typeof _.completer.onSeen=="function"&&(_.completer.onSeen(this.editor,_),this.hasSeen.add(_))},S.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)},S.prototype.$updateGhostText=function(_){var C=this.base.row,L=this.base.column,O=this.editor.getCursorPosition().column,M=this.editor.session.getLine(C).slice(L,O);this.inlineRenderer.show(this.editor,_,M)?this.$seen(_):this.inlineRenderer.hide()},S.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)}},S.prototype.$onPopupShow=function(_){this.$onPopupChange(_),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},S.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}},S.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},S.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},S.prototype.$updatePopupPosition=function(){var _=this.editor,C=_.renderer,L=C.layerConfig.lineHeight,O=C.$cursorLayer.getPixelPosition(this.base,!0);O.left-=this.popup.getTextLeftOffset();var M=_.container.getBoundingClientRect();O.top+=M.top-C.layerConfig.offset,O.left+=M.left-_.renderer.scrollLeft,O.left+=C.gutterWidth;var I={top:O.top,left:O.left};C.$ghostText&&C.$ghostTextWidget&&this.base.row===C.$ghostText.position.row&&(I.top+=C.$ghostTextWidget.el.offsetHeight);var B=_.container.getBoundingClientRect().bottom-L,F=B<I.top?{top:B,left:I.left}:I;this.popup.tryShow(F,L,"bottom")||this.popup.tryShow(O,L,"top")||this.popup.show(O,L)},S.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 O=this.popup.getRow(),M=this.popup.data[O];this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:a(this.popup.getRow()),inline:this.inlineEnabled}),_.keyBinding.addKeyboardHandler(this.keyboardHandler);var I;this.stickySelection&&(I=this.popup.data.indexOf(M)),(!I||I===-1)&&(I=0),this.popup.setRow(this.autoSelect?I:-1),I===O&&M!==this.completions.filtered[I]&&this.$onPopupChange();var B=this.inlineRenderer&&this.inlineEnabled;if(I===O&&B){var F=this.popup.getData(this.popup.getRow());this.$updateGhostText(F)}L||(this.popup.setTheme(_.getTheme()),this.popup.setFontSize(_.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges()},S.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()},S.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()},S.prototype.blurListener=function(_){var C=document.activeElement,L=this.editor.textInput.getElement(),O=_.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(_.relatedTarget),M=this.popup&&this.popup.container;C!=L&&C.parentNode!=M&&!O&&C!=this.tooltipNode&&_.relatedTarget!=L&&this.detach()},S.prototype.mousedownListener=function(_){this.detach()},S.prototype.mousewheelListener=function(_){this.popup&&!this.popup.isMouseOver&&this.detach()},S.prototype.mouseOutListener=function(_){this.popup.isOpen&&this.$updatePopupPosition()},S.prototype.goTo=function(_){this.popup.goTo(_)},S.prototype.insertMatch=function(_,C){if(_||(_=this.popup.getData(this.popup.getRow())),!_)return!1;if(_.value==="")return this.detach();var L=this.completions,O=this.getCompletionProvider().insertMatch(this.editor,_,L.filterText,C);return this.completions==L&&this.detach(),O},S.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)},S.prototype.getCompletionProvider=function(_){return this.completionProvider||(this.completionProvider=new x(_)),this.completionProvider},S.prototype.gatherCompletions=function(_,C){return this.getCompletionProvider().gatherCompletions(_,C)},S.prototype.updateCompletions=function(_,C){if(_&&this.base&&this.completions){var O=this.editor.getCursorPosition(),M=this.editor.session.getTextRange({start:this.base,end:O});if(M==this.completions.filterText)return;if(this.completions.setFilter(M),!this.completions.filtered.length)return this.detach();if(this.completions.filtered.length==1&&this.completions.filtered[0].value==M&&!this.completions.filtered[0].snippet)return this.detach();this.openPopup(this.editor,M,_);return}if(C&&C.matches){var O=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(O.row,O.column),this.base.$insertRight=!0,this.completions=new T(C.matches),this.getCompletionProvider().completions=this.completions,this.openPopup(this.editor,"",_)}var L=this.editor.getSession(),O=this.editor.getCursorPosition(),M=g.getCompletionPrefix(this.editor);this.base=L.doc.createAnchor(O.row,O.column-M.length),this.base.$insertRight=!0;var I={exactMatch:this.exactMatch,ignoreCaption:this.ignoreCaption};this.getCompletionProvider({prefix:M,pos:O}).provideCompletions(this.editor,I,(function(B,F,N){var E=F.filtered,A=g.getCompletionPrefix(this.editor);if(this.$firstOpenTimer.cancel(),N){if(!E.length){var D=!this.autoShown&&this.emptyMessage;if(typeof D=="function"&&(D=this.emptyMessage(A)),D){var j=[{caption:D,value:""}];this.completions=new T(j),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(E.length==1&&E[0].value==A&&!E[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&E.length==1)return this.insertMatch(E[0])}this.completions=!N&&this.showLoadingState?new T(S.completionsForLoading.concat(E),F.filterText):F,this.openPopup(this.editor,A,_),this.popup.renderer.setStyle("ace_empty-message",!1),this.popup.renderer.setStyle("ace_loading",!N)}).bind(this)),this.showLoadingState&&!this.autoShown&&(!this.popup||!this.popup.isOpen)&&this.$firstOpenTimer.delay(this.stickySelectionDelay/2)},S.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},S.prototype.updateDocTooltip=function(){var _=this.popup,C=this.completions&&this.completions.filtered,L=C&&(C[_.getHoveredRow()]||C[_.getRow()]),O=null;if(!L||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var M=this.editor.completers.length,I=0;I<M;I++){var B=this.editor.completers[I];if(B.getDocTooltip&&L.completerId===B.id){O=B.getDocTooltip(L);break}}if(!O&&typeof L!="string"&&(O=L),typeof O=="string"&&(O={docText:O}),!O||!O.docHTML&&!O.docText)return this.hideDocTooltip();this.showDocTooltip(O)},S.prototype.showDocTooltip=function(_){this.tooltipNode||(this.tooltipNode=o.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",h));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 O=this.popup,M=O.container.getBoundingClientRect(),I=400,B=300,F=O.renderer.scrollBar.width||10,N=M.left,E=window.innerWidth-M.right-F,A=O.isTopdown?window.innerHeight-F-M.bottom:M.top,D=[Math.min(E/I,1),Math.min(N/I,1),Math.min(A/B,1)*.9],j=Math.max.apply(Math,D),W=L.style;W.display="block",j==D[0]||D[0]>=1?(W.left=M.right+1+"px",W.right="",W.maxWidth=I*j+"px",W.top=M.top+"px",W.bottom="",W.maxHeight=Math.min(window.innerHeight-F-M.top,B)+"px"):j==D[1]||D[1]>=1?(W.right=window.innerWidth-M.left+"px",W.left="",W.maxWidth=I*j+"px",W.top=M.top+"px",W.bottom="",W.maxHeight=Math.min(window.innerHeight-F-M.top,B)+"px"):j==D[2]&&(W.left=M.left+"px",W.right="",W.maxWidth=Math.min(I,window.innerWidth-M.left)+"px",O.isTopdown?(W.top=M.bottom+"px",W.bottom="",W.maxHeight=Math.min(window.innerHeight-F-M.bottom,B)+"px"):(W.top="",W.bottom=window.innerHeight-M.top+"px",W.maxHeight=Math.min(M.top,B)+"px")),o.$fixPositionBug(L)},S.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(_)}},S.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}},S.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",m),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},S.for=function(_){return _.completer instanceof S||(_.completer&&(_.completer.destroy(),_.completer=null),p.get("sharedPopups")?(S.$sharedInstance||(S.$sharedInstance=new S),_.completer=S.$sharedInstance):(_.completer=new S,_.once("destroy",m))),_.completer},S})();y.prototype.commands={Up:function(S){S.completer.goTo("up")},Down:function(S){S.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(S){S.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(S){S.completer.goTo("end")},Esc:function(S){S.completer.detach()},Return:function(S){return S.completer.insertMatch()},"Shift-Return":function(S){S.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(S){var _=S.completer.insertMatch();if(_||S.tabstopManager)return _;S.completer.goTo("down")},Backspace:function(S){S.execCommand("backspace");var _=g.getCompletionPrefix(S);!_&&S.completer&&S.completer.detach()},PageUp:function(S){S.completer.popup.gotoPageUp()},PageDown:function(S){S.completer.popup.gotoPageDown()}},y.startCommand={name:"startAutocomplete",exec:function(S,_){var C=y.for(S);C.autoInsert=!1,C.autoSelect=!0,C.autoShown=!1,C.showPopup(S,_),C.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var x=(function(){function S(_){this.initialPosition=_,this.active=!0}return S.prototype.insertByIndex=function(_,C,L){return!this.completions||!this.completions.filtered?!1:this.insertMatch(_,this.completions.filtered[C],L)},S.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 O=this.completions.filterText.length,M=0;if(C.range&&C.range.start.row===C.range.end.row&&(O-=this.initialPosition.prefix.length,O+=this.initialPosition.pos.column-C.range.start.column,M+=C.range.end.column-this.initialPosition.pos.column),O||M){var I;_.selection.getAllRanges?I=_.selection.getAllRanges():I=[_.getSelectionRange()];for(var B=0,F;F=I[B];B++)F.start.column-=O,F.end.column+=M,_.session.remove(F)}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},S.prototype.$insertString=function(_,C){var L=C.value||C;_.execCommand("insertstring",L)},S.prototype.gatherCompletions=function(_,C){var L=_.getSession(),O=_.getCursorPosition(),M=g.getCompletionPrefix(_),I=[];this.completers=_.completers;var B=_.completers.length;return _.completers.forEach(function(F,N){F.getCompletions(_,L,O,M,function(E,A){F.hideInlinePreview&&(A=A.map(function(D){return Object.assign(D,{hideInlinePreview:F.hideInlinePreview})})),!E&&A&&(I=I.concat(A)),C(null,{prefix:g.getCompletionPrefix(_),matches:I,finished:--B===0})})}),!0},S.prototype.provideCompletions=function(_,C,L){var O=(function(F){var N=F.prefix,E=F.matches;this.completions=new T(E),C.exactMatch&&(this.completions.exactMatch=!0),C.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(N),(F.finished||this.completions.filtered.length)&&L(null,this.completions,F.finished)}).bind(this),M=!0,I=null;if(this.gatherCompletions(_,(function(F,N){if(this.active){F&&(L(F,[],!0),this.detach());var E=N.prefix;if(E.indexOf(N.prefix)===0){if(M){I=N;return}O(N)}}}).bind(this)),M=!1,I){var B=I;I=null,O(B)}},S.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach(function(_){typeof _.cancel=="function"&&_.cancel()})},S})(),T=(function(){function S(_,C){this.all=_,this.filtered=_,this.filterText=C||"",this.exactMatch=!1,this.ignoreCaption=!1}return S.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(O,M){return M.exactMatch-O.exactMatch||M.$score-O.$score||(O.caption||O.value).localeCompare(M.caption||M.value)});var L=null;C=C.filter(function(O){var M=O.snippet||O.caption||O.value;return M===L?!1:(L=M,!0)}),this.filtered=C},S.prototype.filterCompletions=function(_,C){var L=[],O=C.toUpperCase(),M=C.toLowerCase();e:for(var I=0,B;B=_[I];I++){if(B.skipFilter){B.$score=B.score,L.push(B);continue}var F=!this.ignoreCaption&&B.caption||B.value||B.snippet;if(F){var N=-1,E=0,A=0,D,j;if(this.exactMatch){if(C!==F.substr(0,C.length))continue e}else{var W=F.toLowerCase().indexOf(M);if(W>-1)A=W;else for(var V=0;V<C.length;V++){var K=F.indexOf(M[V],N+1),X=F.indexOf(O[V],N+1);if(D=K>=0&&(X<0||K<X)?K:X,D<0)continue e;j=D-N-1,j>0&&(N===-1&&(A+=10),A+=j,E|=1<<V),N=D}}B.matchMask=E,B.exactMatch=A?0:1,B.$score=(B.score||0)-A,L.push(B)}}return L},S})();r.Autocomplete=y,r.CompletionProvider=x,r.FilteredList=T}),ace.define("ace/marker_group",["require","exports","module"],function(e,r,d){var u=(function(){function f(v,a){a&&(this.markerType=a.markerType),this.markers=[],this.session=v,v.addDynamicMarker(this)}return f.prototype.getMarkerAtPosition=function(v){return this.markers.find(function(a){return a.range.contains(v.row,v.column)})},f.prototype.markersComparator=function(v,a){return v.range.start.row-a.range.start.row},f.prototype.setMarkers=function(v){this.markers=v.sort(this.markersComparator).slice(0,this.MAX_MARKERS),this.session._signal("changeBackMarker")},f.prototype.update=function(v,a,g,i){if(!(!this.markers||!this.markers.length))for(var o=i.firstRow,c=i.lastRow,p,s=0,h=0,m=0;m<this.markers.length;m++){var y=this.markers[m];if(!(y.range.end.row<o)&&!(y.range.start.row>c)&&(y.range.start.row===h?s++:(h=y.range.start.row,s=0),!(s>200))){var x=y.range.clipRows(o,c);if(!(x.start.row===x.end.row&&x.start.column===x.end.column)){var T=x.toScreenRange(g);if(T.isEmpty()){p=g.getNextFoldLine(x.end.row,p),p&&p.end.row>x.end.row&&(o=p.end.row);continue}this.markerType==="fullLine"?a.drawFullLineMarker(v,T,y.className,i):T.isMultiLine()?this.markerType==="line"?a.drawMultiLineMarker(v,T,y.className,i):a.drawTextMarker(v,T,y.className,i):a.drawSingleLineMarker(v,T,y.className+" ace_br15",i)}}}},f})();u.prototype.MAX_MARKERS=1e4,r.MarkerGroup=u}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(e,r,d){function u(g,i){var o=g.getTextRange(v.fromPoints({row:0,column:0},i));return o.split(a).length-1}function f(g,i){var o=u(g,i),c=g.getValue().split(a),p=Object.create(null),s=c[o];return c.forEach(function(h,m){if(!(!h||h===s)){var y=Math.abs(o-m),x=c.length-y;p[h]?p[h]=Math.max(x,p[h]):p[h]=x}}),p}var v=e("../range").Range,a=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;r.id="textCompleter",r.getCompletions=function(g,i,o,c,p){var s=f(i,o),h=Object.keys(s);p(null,h.map(function(m){return{caption:m,value:m,score:s[m],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,d){var u=e("../snippets").snippetManager,f=e("../autocomplete").Autocomplete,v=e("../config"),a=e("../lib/lang"),g=e("../autocomplete/util"),i=e("../marker_group").MarkerGroup,o=e("../autocomplete/text_completer"),c={getCompletions:function(M,I,B,F,N){if(I.$mode.completer)return I.$mode.completer.getCompletions(M,I,B,F,N);var E=M.session.getState(B.row),A=I.$mode.getCompletions(E,I,B,F);A=A.map(function(D){return D.completerId=c.id,D}),N(null,A)},id:"keywordCompleter"},p=function(M){var I={};return M.replace(/\${(\d+)(:(.*?))?}/g,function(B,F,N,E){return I[F]=E||""}).replace(/\$(\d+?)/g,function(B,F){return I[F]})},s={getCompletions:function(M,I,B,F,N){var E=[],A=I.getTokenAt(B.row,B.column);A&&A.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?E.push("html-tag"):E=u.getActiveScopes(M);var D=u.snippetMap,j=[];E.forEach(function(W){for(var V=D[W]||[],K=V.length;K--;){var X=V[K],oe=X.name||X.tabTrigger;oe&&j.push({caption:oe,snippet:X.content,meta:X.tabTrigger&&!X.name?X.tabTrigger+"⇥ ":"snippet",completerId:s.id})}},this),N(null,j)},getDocTooltip:function(M){M.snippet&&!M.docHTML&&(M.docHTML=["<b>",a.escapeHTML(M.caption),"</b>","<hr></hr>",a.escapeHTML(p(M.snippet))].join(""))},id:"snippetCompleter"},h=[s,o,c];r.setCompleters=function(M){h.length=0,M&&h.push.apply(h,M)},r.addCompleter=function(M){h.push(M)},r.textCompleter=o,r.keyWordCompleter=c,r.snippetCompleter=s;var m={name:"expandSnippet",exec:function(M){return u.expandWithTab(M)},bindKey:"Tab"},y=function(M,I){x(I.session.$mode)},x=function(M){typeof M=="string"&&(M=v.$modes[M]),M&&(u.files||(u.files={}),T(M.$id,M.snippetFileId),M.modes&&M.modes.forEach(x))},T=function(M,I){!I||!M||u.files[M]||(u.files[M]={},v.loadModule(I,function(B){B&&(u.files[M]=B,!B.snippets&&B.snippetText&&(B.snippets=u.parseSnippetFile(B.snippetText)),u.register(B.snippets||[],B.scope),B.includeScopes&&(u.snippetMap[B.scope].includeScopes=B.includeScopes,B.includeScopes.forEach(function(F){x("ace/mode/"+F)})))}))},S=function(M){var I=M.editor,B=I.completer&&I.completer.activated;if(M.command.name==="backspace")B&&!g.getCompletionPrefix(I)&&I.completer.detach();else if(M.command.name==="insertstring"&&!B){_=M;var F=M.editor.$liveAutocompletionDelay;F?C.delay(F):L(M)}},_,C=a.delayedCall(function(){L(_)},0),L=function(M){var I=M.editor,B=g.getCompletionPrefix(I),F=M.args,N=g.triggerAutocomplete(I,F);if(B&&B.length>=I.$liveAutocompletionThreshold||N){var E=f.for(I);E.autoShown=!0,E.showPopup(I)}},O=e("../editor").Editor;e("../config").defineOptions(O.prototype,"editor",{enableBasicAutocompletion:{set:function(M){M?(f.for(this),this.completers||(this.completers=Array.isArray(M)?M:h),this.commands.addCommand(f.startCommand)):this.commands.removeCommand(f.startCommand)},value:!1},enableLiveAutocompletion:{set:function(M){M?(this.completers||(this.completers=Array.isArray(M)?M:h),this.commands.on("afterExec",S)):this.commands.off("afterExec",S)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(M){M?(this.commands.addCommand(m),this.on("changeMode",y),y(null,this)):(this.commands.removeCommand(m),this.off("changeMode",y))},value:!1}}),r.MarkerGroup=i}),(function(){ace.require(["ace/ext/language_tools"],function(e){n&&(n.exports=e)})})()})(sv)),sv.exports}YS();var lv={exports:{}},cv;function XS(){return cv||(cv=1,(function(n,t){ace.define("ace/ext/searchbox-css",["require","exports","module"],function(e,r,d){d.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,d){var u=e("../lib/dom"),f=e("../lib/lang"),v=e("../lib/event"),a=e("./searchbox-css"),g=e("../keyboard/hash_handler").HashHandler,i=e("../lib/keys"),o=e("../config").nls,c=999;u.importCssString(a,"ace_searchbox",!1);var p=(function(){function m(y,x,T){this.activeInput,this.element=u.buildDom(["div",{class:"ace_search right"},["span",{action:"hide",class:"ace_searchbtn_close"}],["div",{class:"ace_search_form"},["input",{class:"ace_search_field",placeholder:o("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"},o("search-box.find-all.text","All")]],["div",{class:"ace_replace_form"},["input",{class:"ace_search_field",placeholder:o("search-box.replace.placeholder","Replace with"),spellcheck:"false"}],["span",{action:"replaceAndFindNext",class:"ace_searchbtn"},o("search-box.replace-next.text","Replace")],["span",{action:"replaceAll",class:"ace_searchbtn"},o("search-box.replace-all.text","All")]],["div",{class:"ace_search_options"},["span",{action:"toggleReplace",class:"ace_button",title:o("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:o("search-box.toggle-regexp.title","RegExp Search")},".*"],["span",{action:"toggleCaseSensitive",class:"ace_button",title:o("search-box.toggle-case.title","CaseSensitive Search")},"Aa"],["span",{action:"toggleWholeWords",class:"ace_button",title:o("search-box.toggle-whole-word.title","Whole Word Search")},"\\b"],["span",{action:"searchInSelection",class:"ace_button",title:o("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),u.importCssString(a,"ace_searchbox",y.container),v.addListener(this.element,"touchstart",function(S){S.stopPropagation()},y)}return m.prototype.setEditor=function(y){y.searchBox=this,y.renderer.scroller.appendChild(this.element),this.editor=y},m.prototype.setSession=function(y){this.searchRange=null,this.$syncOptions(!0)},m.prototype.onEditorInput=function(){this.find(!1,!1,!0)},m.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")},m.prototype.$init=function(){var y=this.element;this.$initElements(y);var x=this;v.addListener(y,"mousedown",function(T){setTimeout(function(){x.activeInput.focus()},0),v.stopPropagation(T)}),v.addListener(y,"click",function(T){var S=T.target||T.srcElement,_=S.getAttribute("action");_&&x[_]?x[_]():x.$searchBarKb.commands[_]&&x.$searchBarKb.commands[_].exec(x),v.stopPropagation(T)}),v.addCommandKeyListener(y,function(T,S,_){var C=i.keyCodeToString(_),L=x.$searchBarKb.findKeyCommand(S,C);L&&L.exec&&(L.exec(x),v.stopEvent(T))}),this.$onChange=f.delayedCall(function(){x.find(!1,!1)}),v.addListener(this.searchInput,"input",function(){x.$onChange.schedule(20)}),v.addListener(this.searchInput,"focus",function(){x.activeInput=x.searchInput,x.searchInput.value&&x.highlight()}),v.addListener(this.replaceInput,"focus",function(){x.activeInput=x.replaceInput,x.searchInput.value&&x.highlight()})},m.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)},m.prototype.$syncOptions=function(y){u.setCssClass(this.replaceOption,"checked",this.searchRange),u.setCssClass(this.searchOption,"checked",this.searchOption.checked),this.replaceOption.textContent=this.replaceOption.checked?"-":"+",u.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),u.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),u.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)},m.prototype.highlight=function(y){this.editor.session.highlight(y||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},m.prototype.find=function(y,x,T){if(this.editor.session){var S=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:T,range:this.searchRange}),_=!S&&this.searchInput.value;u.setCssClass(this.searchBox,"ace_nomatch",_),this.editor._emit("findSearchBox",{match:!_}),this.highlight(),this.updateCounter()}},m.prototype.updateCounter=function(){var y=this.editor,x=y.$search.$options.re,T=x.unicode,S=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 O=x.lastIndex=0,M;(M=x.exec(C))&&(S++,O=M.index,O<=L&&_++,!(S>c||!M[0]&&(x.lastIndex=O+=f.skipEmptyMatch(C,O,T),O>=C.length))););}this.searchCounter.textContent=o("search-box.search-counter","$0 of $1",[_,S>c?c+"+":S])},m.prototype.findNext=function(){this.find(!0,!1)},m.prototype.findPrev=function(){this.find(!0,!0)},m.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;u.setCssClass(this.searchBox,"ace_nomatch",x),this.editor._emit("findSearchBox",{match:!x}),this.highlight(),this.hide()},m.prototype.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},m.prototype.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},m.prototype.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},m.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()},m.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=f.escapeRegExp(y)),y!=null&&(this.searchInput.value=y),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},m.prototype.isFocused=function(){var y=document.activeElement;return y==this.searchInput||y==this.replaceInput},m})(),s=new g;s.bindKeys({"Ctrl-f|Command-f":function(m){var y=m.isReplace=!m.isReplace;m.replaceBox.style.display=y?"":"none",m.replaceOption.checked=!1,m.$syncOptions(),m.searchInput.focus()},"Ctrl-H|Command-Option-F":function(m){m.editor.getReadOnly()||(m.replaceOption.checked=!0,m.$syncOptions(),m.replaceInput.focus())},"Ctrl-G|Command-G":function(m){m.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(m){m.findPrev()},esc:function(m){setTimeout(function(){m.hide()})},Return:function(m){m.activeInput==m.replaceInput&&m.replace(),m.findNext()},"Shift-Return":function(m){m.activeInput==m.replaceInput&&m.replace(),m.findPrev()},"Alt-Return":function(m){m.activeInput==m.replaceInput&&m.replaceAll(),m.findAll()},"Tab|Shift-Tab":function(m){(m.activeInput==m.replaceInput?m.searchInput:m.replaceInput).focus()}}),s.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(m){m.regExpOption.checked=!m.regExpOption.checked,m.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(m){m.caseSensitiveOption.checked=!m.caseSensitiveOption.checked,m.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(m){m.wholeWordOption.checked=!m.wholeWordOption.checked,m.$syncOptions()}},{name:"toggleReplace",exec:function(m){m.replaceOption.checked=!m.replaceOption.checked,m.$syncOptions()}},{name:"searchInSelection",exec:function(m){m.searchOption.checked=!m.searchRange,m.setSearchRange(m.searchOption.checked&&m.editor.getSelectionRange()),m.$syncOptions()}}]);var h=new g([{bindKey:"Esc",name:"closeSearchBar",exec:function(m){m.searchBox.hide()}}]);p.prototype.$searchBarKb=s,p.prototype.$closeSearchBarKb=h,r.SearchBox=p,r.Search=function(m,y){var x=m.searchBox||new p(m),T=m.session.selection.getRange(),S=T.isMultiLine()?"":m.session.getTextRange(T);x.show(S,y)}}),(function(){ace.require(["ace/ext/searchbox"],function(e){n&&(n.exports=e)})})()})(lv)),lv.exports}XS();var uv={exports:{}},hv;function JS(){return hv||(hv=1,(function(n,t){ace.define("ace/ext/hardwrap",["require","exports","module","ace/range","ace/editor","ace/config"],function(e,r,d){function u(g,i){function o(M,I,B){if(!(M.length<I)){var F=M.slice(0,I),N=M.slice(I),E=/^(?:(\s+)|(\S+)(\s+))/.exec(N),A=/(?:(\s+)|(\s+)(\S+))$/.exec(F),D=0,j=0;if(A&&!A[2]&&(D=I-A[1].length,j=I),E&&!E[2]&&(D||(D=I),j=I+E[1].length),D)return{start:D,end:j};if(A&&A[2]&&A.index>B)return{start:A.index,end:A.index+A[2].length};if(E&&E[2])return D=I+E[2].length,{start:D,end:D+E[3].length}}}for(var c=i.column||g.getOption("printMarginColumn"),p=i.allowMerge!=0,s=Math.min(i.startRow,i.endRow),h=Math.max(i.startRow,i.endRow),m=g.session;s<=h;){var y=m.getLine(s);if(y.length>c){var x=o(y,c,5);if(x){var T=/^\s*/.exec(y)[0];m.replace(new v(s,x.start,s,x.end),`
1396
+ `+T)}h++}else if(p&&/\S/.test(y)&&s!=h){var S=m.getLine(s+1);if(S&&/\S/.test(S)){var _=y.replace(/\s+$/,""),C=S.replace(/^\s+/,""),L=_+" "+C,x=o(L,c,5);if(x&&x.start>_.length||L.length<c){var O=new v(s,_.length,s+1,S.length-C.length);m.replace(O," "),s--,h--}else _.length<y.length&&m.remove(new v(s,_.length,s,y.length))}}s++}}function f(g){if(g.command.name=="insertstring"&&/\S/.test(g.args)){var i=g.editor,o=i.selection.cursor;if(o.column<=i.renderer.$printMarginColumn)return;var c=i.session.$undoManager.$lastDelta;u(i,{startRow:o.row,endRow:o.row,allowMerge:!1}),c!=i.session.$undoManager.$lastDelta&&i.session.markUndoGroup()}}var v=e("../range").Range,a=e("../editor").Editor;e("../config").defineOptions(a.prototype,"editor",{hardWrap:{set:function(g){g?this.commands.on("afterExec",f):this.commands.off("afterExec",f)},value:!1}}),r.hardWrap=u}),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,d){function u(w){return{row:w.line,column:w.ch}}function f(w){return new Fe(w.row,w.column)}function v(w,$,k){if($.line===k.line&&$.ch>=k.ch-1){var P=w.getLine($.line),z=P.charCodeAt($.ch);55296<=z&&z<=55551&&(k.ch+=1)}return{start:$,end:k}}function a(w){w.setOption("disableInput",!0),w.setOption("showCursorWhenSelecting",!1),He.signal(w,"vim-mode-change",{mode:"normal"}),w.on("cursorActivity",Pi),L(w),He.on(w.getInputField(),"paste",i(w))}function g(w){w.setOption("disableInput",!1),w.off("cursorActivity",Pi),He.off(w.getInputField(),"paste",i(w)),w.state.vim=null,hn&&clearTimeout(hn)}function i(w){var $=w.state.vim;return $.onPasteFn||($.onPasteFn=function(){$.insertMode||(w.setCursor(fe(w.getCursor(),0,1)),Zn.enterInsertMode(w,{},$))}),$.onPasteFn}function o(w,$){return $>=w.firstLine()&&$<=w.lastLine()}function c(w){return/^[a-z]$/.test(w)}function p(w){return"()[]{}".indexOf(w)!=-1}function s(w){return Ba.test(w)}function h(w){return mt.test(w)}function m(w){return/^\s*$/.test(w)}function y(w){return".?!".indexOf(w)!=-1}function x(w,$){for(var k=0;k<$.length;k++)if($[k]==w)return!0;return!1}function T(w,$,k,P,z){if($===void 0&&!z)throw Error("defaultValue is required unless callback is provided");if(k||(k="string"),Kt[w]={type:k,defaultValue:$,callback:z},P)for(var H=0;H<P.length;H++)Kt[P[H]]=Kt[w];$&&S(w,$)}function S(w,$,k,P){var z=Kt[w];P=P||{};var H=P.scope;if(!z)return new Error("Unknown option: "+w);if(z.type=="boolean"){if($&&$!==!0)return new Error("Invalid argument: "+w+"="+$);$!==!1&&($=!0)}z.callback?(H!=="local"&&z.callback($,void 0),H!=="global"&&k&&z.callback($,k)):(H!=="local"&&(z.value=z.type=="boolean"?!!$:$),H!=="global"&&k&&(k.state.vim.options[w]={value:$}))}function _(w,$,k){var P=Kt[w];k=k||{};var z=k.scope;if(!P)return new Error("Unknown option: "+w);if(P.callback){var H=$&&P.callback(void 0,$);return z!=="global"&&H!==void 0?H:z!=="local"?P.callback():void 0}var H=z!=="global"&&$&&$.state.vim.options[w];return(H||z!=="local"&&P||{}).value}function C(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=Jn()}function L(w){return w.state.vim||(w.state.vim={inputState:new E,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}),w.state.vim}function O(){Ye={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:eo(),macroModeState:new C,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new V({}),searchHistoryController:new K,exCommandHistoryController:new K};for(var w in Kt){var $=Kt[w];$.value=$.defaultValue}}function M(w){function $(J){typeof J=="string"?Wt.value=J:Wt=null}if(w[0]=="<"){var k=w.toLowerCase().slice(1,-1),P=k.split("-");if(k=P.pop()||"",k=="lt")w="<";else if(k=="space")w=" ";else if(k=="cr")w=`
1397
+ `;else if(Ao[k]){var z=Wt.value,H={key:Ao[k],target:{value:z,selectionEnd:z.length,selectionStart:z.length}};Wt.onKeyDown&&Wt.onKeyDown(H,Wt.value,$),Wt&&Wt.onKeyUp&&Wt.onKeyUp(H,Wt.value,$);return}}if(w==`
1398
+ `){var q=Wt;Wt=null,q.onClose&&q.onClose(q.value)}else Wt.value=(Wt.value||"")+w}function I(w,$,k){var P=to;if(k){if(Xr.indexOf(k)!=-1)return;Xr.push(k),to=k.noremap!=0}try{for(var z=L(w),H=/<(?:[CSMA]-)*\w+>|./gi,q;q=H.exec($);){var J=q[0],Q=z.insertMode;if(Wt){M(J);continue}var se=$t.handleKey(w,J,"mapping");if(!se&&Q&&z.insertMode){if(J[0]=="<"){var he=J.toLowerCase().slice(1,-1),we=he.split("-");if(he=we.pop()||"",he=="lt")J="<";else if(he=="space")J=" ";else if(he=="cr")J=`
1399
+ `;else{if(Ao.hasOwnProperty(he)){J=Ao[he],Yo(w,J);continue}J=J[0],H.lastIndex=q.index+1}}w.replaceSelection(J)}}}finally{if(Xr.pop(),to=Xr.length?P:!1,!Xr.length&&Wt){var Ae=Wt;Wt=null,xr(w,Ae)}}}function B(w,$){var k=w.key;if(!pr[k]){k.length>1&&k[0]=="n"&&(k=k.replace("Numpad","")),k=Jr[k]||k;var P="";if(w.ctrlKey&&(P+="C-"),w.altKey&&(P+="A-"),w.metaKey&&(P+="M-"),He.isMac&&w.altKey&&!w.metaKey&&!w.ctrlKey&&(P=P.slice(2)),(P||k.length>1)&&w.shiftKey&&(P+="S-"),$&&!$.expectLiteralNext&&k.length==1){if(Gn.keymap&&k in Gn.keymap)(Gn.remapCtrl!=0||!P)&&(k=Gn.keymap[k]);else if(k.charCodeAt(0)>255){var z=w.code&&w.code.slice(-1)||"";w.shiftKey||(z=z.toLowerCase()),z&&(k=z)}}return P+=k,P.length>1&&(P="<"+P+">"),P}}function F(w,$){Gn.string!==w&&(Gn=N(w)),Gn.remapCtrl=$}function N(w){function $(P){return P.split(/\\?(.)/).filter(Boolean)}var k={};return w?(w.split(/((?:[^\\,]|\\.)+),/).map(function(P){if(P){var z=P.split(/((?:[^\\;]|\\.)+);/);if(z.length==3){var H=$(z[1]),q=$(z[2]);if(H.length!==q.length)return;for(var J=0;J<H.length;++J)k[H[J]]=q[J]}else if(z.length==1){var Q=$(P);if(Q.length%2!==0)return;for(var J=0;J<Q.length;J+=2)k[Q[J]]=Q[J+1]}}}),{keymap:k,string:w}):{keymap:k,string:""}}function E(){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(w,$){w.state.vim.inputState=new E,w.state.vim.expectLiteralNext=!1,He.signal(w,"vim-command-done",$)}function D(){this.removed=[],this.inserted=""}function j(w,$,k){this.clear(),this.keyBuffer=[w||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!$,this.blockwise=!!k}function W(w,$){var k=Ye.registerController.registers;if(!w||w.length!=1)throw Error("Register name must be 1 character");k[w]=$,Js.push(w)}function V(w){this.registers=w,this.unnamedRegister=w['"']=new j,w["."]=new j,w[":"]=new j,w["/"]=new j,w["+"]=new j}function K(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}function X(w,$){jn[w]=$}function oe(w,$){for(var k=[],P=0;P<$;P++)k.push(w);return k}function ee(w,$){gs[w]=$}function le(w,$){Zn[w]=$}function ue(w,$,k){var P=w.state.vim,z=P.insertMode||P.visualMode,H=Math.min(Math.max(w.firstLine(),$.line),w.lastLine()),q=w.getLine(H),J=q.length-1+ +!!z,Q=Math.min(Math.max(0,$.ch),J),se=q.charCodeAt(Q);if(56320<=se&&se<=57343){var he=1;k&&k.line==H&&k.ch>Q&&(he=-1),Q+=he,Q>J&&(Q-=2)}return new Fe(H,Q)}function ne(w){var $={};for(var k in w)w.hasOwnProperty(k)&&($[k]=w[k]);return $}function fe(w,$,k){return typeof $=="object"&&(k=$.ch,$=$.line),new Fe(w.line+$,w.ch+k)}function Se(w,$,k,P){P.operator&&(k="operatorPending");for(var z,H=[],q=[],J=to?$.length-Xo:0,Q=J;Q<$.length;Q++){var se=$[Q];k=="insert"&&se.context!="insert"||se.context&&se.context!=k||P.operator&&se.type=="action"||!(z=Te(w,se.keys))||(z=="partial"&&H.push(se),z=="full"&&q.push(se))}return{partial:H.length&&H,full:q.length&&q}}function Te(w,$){var k=$.slice(-11)=="<character>",P=$.slice(-10)=="<register>";if(k||P){var z=$.length-(k?11:10),H=w.slice(0,z),q=$.slice(0,z);return H==q&&w.length>z?"full":q.indexOf(H)==0?"partial":!1}return w==$?"full":$.indexOf(w)==0?"partial":!1}function Re(w){var $=/^.*(<[^>]+>)$/.exec(w),k=$?$[1]:w.slice(-1);if(k.length>1)switch(k){case"<CR>":k=`
1400
+ `;break;case"<Space>":k=" ";break;default:k=""}return k}function Ve(w,$,k){return function(){for(var P=0;P<k;P++)$(w)}}function Ue(w){return new Fe(w.line,w.ch)}function Xe(w,$){return w.ch==$.ch&&w.line==$.line}function ft(w,$){return w.line<$.line?!0:w.line==$.line&&w.ch<$.ch}function We(w,$){return arguments.length>2&&($=We.apply(void 0,Array.prototype.slice.call(arguments,1))),ft(w,$)?w:$}function Ie(w,$){return arguments.length>2&&($=Ie.apply(void 0,Array.prototype.slice.call(arguments,1))),ft(w,$)?$:w}function Mt(w,$,k){var P=ft(w,$),z=ft($,k);return P&&z}function dt(w,$){return w.getLine($).length}function tn(w){return w.trim?w.trim():w.replace(/^\s+|\s+$/g,"")}function mn(w){return w.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function rr(w,$,k){var P=dt(w,$),z=new Array(k-P+1).join(" ");w.setCursor(new Fe($,P)),w.replaceRange(z,w.getCursor())}function Bt(w,$){var k=[],P=w.listSelections(),z=Ue(w.clipPos($)),H=!Xe($,z),q=w.getCursor("head"),J=bt(P,q),Q=Xe(P[J].head,P[J].anchor),se=P.length-1,he=se-J>J?se:0,we=P[he].anchor,Ae=Math.min(we.line,z.line),be=Math.max(we.line,z.line),Ce=we.ch,Pe=z.ch,Ne=P[he].head.ch-Ce,et=Pe-Ce;Ne>0&&et<=0?(Ce++,H||Pe--):Ne<0&&et>=0?(Ce--,Q||Pe++):Ne<0&&et==-1&&(Ce--,Pe++);for(var vt=Ae;vt<=be;vt++){var lt={anchor:new Fe(vt,Ce),head:new Fe(vt,Pe)};k.push(lt)}return w.setSelections(k),$.ch=Pe,we.ch=Ce,we}function Rn(w,$,k){for(var P=[],z=0;z<k;z++){var H=fe($,z,0);P.push({anchor:H,head:H})}w.setSelections(P,0)}function bt(w,$,k){for(var P=0;P<w.length;P++){var z=Xe(w[P].anchor,$),H=Xe(w[P].head,$);if(z||H)return P}return-1}function Ze(w,$){var k=$.lastSelection,P=function(){var H=w.listSelections(),q=H[0],J=H[H.length-1],Q=ft(q.anchor,q.head)?q.anchor:q.head,se=ft(J.anchor,J.head)?J.head:J.anchor;return[Q,se]},z=function(){var H=w.getCursor(),q=w.getCursor(),J=k.visualBlock;if(J){var Q=J.width,se=J.height;q=new Fe(H.line+se,H.ch+Q);for(var he=[],we=H.line;we<q.line;we++){var Ae=new Fe(we,H.ch),be=new Fe(we,q.ch),Ce={anchor:Ae,head:be};he.push(Ce)}w.setSelections(he)}else{var Pe=k.anchorMark.find(),Ne=k.headMark.find(),et=Ne.line-Pe.line,vt=Ne.ch-Pe.ch;q={line:q.line+et,ch:et?q.ch:vt+q.ch},k.visualLine&&(H=new Fe(H.line,0),q=new Fe(q.line,dt(w,q.line))),w.setSelection(H,q)}return[H,q]};return $.visualMode?P():z()}function Pt(w,$){var k=$.sel.anchor,P=$.sel.head;$.lastPastedText&&(P=w.posFromIndex(w.indexFromPos(k)+$.lastPastedText.length),$.lastPastedText=null),$.lastSelection={anchorMark:w.setBookmark(k),headMark:w.setBookmark(P),anchor:Ue(k),head:Ue(P),visualMode:$.visualMode,visualLine:$.visualLine,visualBlock:$.visualBlock}}function In(w,$,k,P){var z=w.state.vim.sel,H=P?$:z.head,q=P?$:z.anchor,J;return ft(k,$)&&(J=k,k=$,$=J),ft(H,q)?(H=We($,H),q=Ie(q,k)):(q=We($,q),H=Ie(H,k),H=fe(H,0,-1),H.ch==-1&&H.line!=w.firstLine()&&(H=new Fe(H.line-1,dt(w,H.line-1)))),[q,H]}function Hn(w,$,z){var P=w.state.vim;$=$||P.sel;var z=z||P.visualLine?"line":P.visualBlock?"block":"char",H=Kn(w,$,z);w.setSelections(H.ranges,H.primary)}function Kn(w,$,k,P){var z=Ue($.head),H=Ue($.anchor);if(k=="char"){var q=!P&&!ft($.head,$.anchor)?1:0,J=ft($.head,$.anchor)?1:0;return z=fe($.head,0,q),H=fe($.anchor,0,J),{ranges:[{anchor:H,head:z}],primary:0}}if(k=="line"){if(ft($.head,$.anchor))z.ch=0,H.ch=dt(w,H.line);else{H.ch=0;var Q=w.lastLine();z.line>Q&&(z.line=Q),z.ch=dt(w,z.line)}return{ranges:[{anchor:H,head:z}],primary:0}}if(k=="block"){var se=Math.min(H.line,z.line),he=H.ch,we=Math.max(H.line,z.line),Ae=z.ch;he<Ae?Ae+=1:he+=1;for(var be=we-se+1,Ce=z.line==se?0:be-1,Pe=[],Ne=0;Ne<be;Ne++)Pe.push({anchor:new Fe(se+Ne,he),head:new Fe(se+Ne,Ae)});return{ranges:Pe,primary:Ce}}}function Un(w){var $=w.getCursor("head");return w.getSelection().length==1&&($=We($,w.getCursor("anchor"))),$}function wn(w,$){var k=w.state.vim;$!==!1&&w.setCursor(ue(w,k.sel.head)),Pt(w,k),k.visualMode=!1,k.visualLine=!1,k.visualBlock=!1,k.insertMode||He.signal(w,"vim-mode-change",{mode:"normal"})}function Dn(w,$,k){var P=w.getRange($,k);if(/\n\s*$/.test(P)){var z=P.split(`
1401
+ `);z.pop();for(var H,H=z.pop();z.length>0&&H&&m(H);H=z.pop())k.line--,k.ch=0;H?(k.line--,k.ch=dt(w,k.line)):k.ch=0}}function ir(w,$,k){$.ch=0,k.ch=0,k.line++}function on(w){if(!w)return 0;var $=w.search(/\S/);return $==-1?w.length:$}function Yn(w,$,k){var P=$.inclusive,z=$.innerWord,H=$.bigWord,q=$.noSymbol,J=$.multiline,Q=k||Un(w),se=w.getLine(Q.line),he=se,we=Q.line,Ae=we,be=Q.ch,Ce,Pe=q?Jo[0]:Qi[0];if(z&&/\s/.test(se.charAt(be)))Pe=function(On){return/\s/.test(On)};else{for(;!Pe(se.charAt(be));)if(be++,be>=se.length){if(!J)return null;be--,Ce=Mi(w,Q,!0,H,!0);break}H?Pe=Qi[0]:(Pe=Jo[0],Pe(se.charAt(be))||(Pe=Jo[1]))}for(var Ne=be,et=be;Pe(se.charAt(et))&&et>=0;)et--;if(et++,Ce)Ne=Ce.to,Ae=Ce.line,he=w.getLine(Ae),!he&&Ne==0&&Ne++;else for(;Pe(se.charAt(Ne))&&Ne<se.length;)Ne++;if(P){var vt=Ne,lt=Q.ch<=et&&/\s/.test(se.charAt(Q.ch));if(!lt)for(;/\s/.test(he.charAt(Ne))&&Ne<he.length;)Ne++;if(vt==Ne||lt){for(var ht=et;/\s/.test(se.charAt(et-1))&&et>0;)et--;!et&&!lt&&(et=ht)}}return{start:new Fe(we,et),end:new Fe(Ae,Ne)}}function Ii(w,$,k){var P=$;if(!He.findMatchingTag||!He.findEnclosingTag)return{start:P,end:P};var z=He.findMatchingTag(w,$)||He.findEnclosingTag(w,$);return!z||!z.open||!z.close?{start:P,end:P}:k?{start:z.open.from,end:z.close.to}:{start:z.open.to,end:z.close.from}}function si(w,$,k){Xe($,k)||Ye.jumpList.add(w,$,k)}function hr(w,$){Ye.lastCharacterSearch.increment=w,Ye.lastCharacterSearch.forward=$.forward,Ye.lastCharacterSearch.selectedCharacter=$.selectedCharacter}function Xn(w,$,k,P){var z=Ue(w.getCursor()),H=k?1:-1,q=k?w.lineCount():-1,J=z.ch,Q=z.line,se=w.getLine(Q),he={lineText:se,nextCh:se.charAt(J),lastCh:null,index:J,symb:P,reverseSymb:(k?{")":"(","}":"{"}:{"(":")","{":"}"})[P],forward:k,depth:0,curMoveThrough:!1},we=zi[P];if(!we)return z;var Ae=ji[we].init,be=ji[we].isComplete;for(Ae&&Ae(he);Q!==q&&$;){if(he.index+=H,he.nextCh=he.lineText.charAt(he.index),!he.nextCh){if(Q+=H,he.lineText=w.getLine(Q)||"",H>0)he.index=0;else{var Ce=he.lineText.length;he.index=Ce>0?Ce-1:0}he.nextCh=he.lineText.charAt(he.index)}be(he)&&(z.line=Q,z.ch=he.index,$--)}return he.nextCh||he.curMoveThrough?new Fe(Q,he.index):z}function Mi(w,$,k,P,z){var H=$.line,q=$.ch,J=w.getLine(H),Q=k?1:-1,se=P?Qi:Jo;if(z&&J==""){if(H+=Q,J=w.getLine(H),!o(w,H))return null;q=k?0:J.length}for(;;){if(z&&J=="")return{from:0,to:0,line:H};for(var he=Q>0?J.length:-1,we=he,Ae=he;q!=he;){for(var be=!1,Ce=0;Ce<se.length&&!be;++Ce)if(se[Ce](J.charAt(q))){for(we=q;q!=he&&se[Ce](J.charAt(q));)q+=Q;if(Ae=q,be=we!=Ae,we==$.ch&&H==$.line&&Ae==we+Q)continue;return{from:Math.min(we,Ae+1),to:Math.max(we,Ae),line:H}}be||(q+=Q)}if(H+=Q,!o(w,H))return null;J=w.getLine(H),q=Q>0?0:J.length}}function wr(w,$,k,P,z,H){var q=Ue($),J=[];(P&&!z||!P&&z)&&k++;for(var Q=!P||!z,se=0;se<k;se++){var he=Mi(w,$,P,H,Q);if(!he){var we=dt(w,w.lastLine());J.push(P?{line:w.lastLine(),from:we,to:we}:{line:0,from:0,to:0});break}J.push(he),$=new Fe(he.line,P?he.to-1:he.from)}var Ae=J.length!=k,be=J[0],Ce=J.pop();return P&&!z?(!Ae&&(be.from!=q.ch||be.line!=q.line)&&(Ce=J.pop()),new Fe(Ce.line,Ce.from)):P&&z?new Fe(Ce.line,Ce.to-1):!P&&z?(!Ae&&(be.to!=q.ch||be.line!=q.line)&&(Ce=J.pop()),new Fe(Ce.line,Ce.to)):new Fe(Ce.line,Ce.from)}function qi(w,$,k,P,z){var H=$,q=new Fe(H.line+k.repeat-1,1/0),J=w.clipPos(q);return J.ch--,z||(P.lastHPos=1/0,P.lastHSPos=w.charCoords(J,"div").left),q}function Li(w,$,k,P,z){for(var H=z||w.getCursor(),q=H.ch,J,Q=0;Q<$;Q++){var se=w.getLine(H.line);if(J=Oo(q,se,P,k),J==-1)return null;q=J}return new Fe(w.getCursor().line,J)}function fs(w,$){var k=w.getCursor().line;return ue(w,new Fe(k,$-1))}function Sr(w,$,k,P){!x(k,jo)&&!cn.test(k)||($.marks[k]&&$.marks[k].clear(),$.marks[k]=w.setBookmark(P))}function Oo(w,$,k,P,z){var H;return P?(H=$.indexOf(k,w+1),H!=-1):(H=$.lastIndexOf(k,w-1),H!=-1),H}function Or(w,$,k,P,z){function H(et){return!/\S/.test(w.getLine(et))}function q(et,vt,lt){return lt?H(et)!=H(et+vt):!H(et)&&H(et+vt)}function J(et){P=P>0?1:-1;var vt=w.ace.session.getFoldLine(et);vt&&et+P>vt.start.row&&et+P<vt.end.row&&(P=(P>0?vt.end.row:vt.start.row)-et)}var Q=$.line,se=w.firstLine(),he=w.lastLine(),we,Ae,be=Q;if(P){for(;se<=be&&be<=he&&k>0;)J(be),q(be,P)&&k--,be+=P;return new Fe(be,0)}var Ce=w.state.vim;if(Ce.visualLine&&q(Q,1,!0)){var Pe=Ce.sel.anchor;q(Pe.line,-1,!0)&&(!z||Pe.line!=Q)&&(Q+=1)}var Ne=H(Q);for(be=Q;be<=he&&k;be++)q(be,1,!0)&&(!z||H(be)!=Ne)&&k--;for(Ae=new Fe(be,0),be>he&&!Ne?Ne=!0:z=!1,be=Q;be>se&&!((!z||H(be)==Ne||be==Q)&&q(be,-1,!0));be--);return we=new Fe(be,0),{start:we,end:Ae}}function mi(w,$,k,P,z){function H(se){se.pos+se.dir<0||se.pos+se.dir>=se.line.length?se.line=null:se.pos+=se.dir}function q(se,he,we,Ae){var be=se.getLine(he),Ce={line:be,ln:he,pos:we,dir:Ae};if(Ce.line==="")return{ln:Ce.ln,pos:Ce.pos};var Pe=Ce.pos;for(H(Ce);Ce.line!==null;){if(Pe=Ce.pos,y(Ce.line[Ce.pos])){if(!z)return{ln:Ce.ln,pos:Ce.pos+1};for(H(Ce);Ce.line!==null&&m(Ce.line[Ce.pos]);)Pe=Ce.pos,H(Ce);return{ln:Ce.ln,pos:Pe+1}}H(Ce)}return{ln:Ce.ln,pos:Pe+1}}function J(se,he,we,Ae){var be=se.getLine(he),Ce={line:be,ln:he,pos:we,dir:Ae};if(Ce.line==="")return{ln:Ce.ln,pos:Ce.pos};var Pe=Ce.pos;for(H(Ce);Ce.line!==null;){if(!m(Ce.line[Ce.pos])&&!y(Ce.line[Ce.pos]))Pe=Ce.pos;else if(y(Ce.line[Ce.pos]))return z?m(Ce.line[Ce.pos+1])?{ln:Ce.ln,pos:Ce.pos+1}:{ln:Ce.ln,pos:Pe}:{ln:Ce.ln,pos:Pe};H(Ce)}return Ce.line=be,z&&m(Ce.line[Ce.pos])?{ln:Ce.ln,pos:Ce.pos}:{ln:Ce.ln,pos:Pe}}for(var Q={ln:$.line,pos:$.ch};k>0;)P<0?Q=J(w,Q.ln,Q.pos,P):Q=q(w,Q.ln,Q.pos,P),k--;return new Fe(Q.ln,Q.pos)}function ai(w,$,k,P){function z(Q,se){if(se.pos+se.dir<0||se.pos+se.dir>=se.line.length){if(se.ln+=se.dir,!o(Q,se.ln)){se.line=null,se.ln=null,se.pos=null;return}se.line=Q.getLine(se.ln),se.pos=se.dir>0?0:se.line.length-1}else se.pos+=se.dir}function H(Q,se,he,we){var Ne=Q.getLine(se),Ae=Ne==="",be={line:Ne,ln:se,pos:he,dir:we},Ce={ln:be.ln,pos:be.pos},Pe=be.line==="";for(z(Q,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!==""&&!m(be.line[be.pos]))return{ln:be.ln,pos:be.pos};y(be.line[be.pos])&&!Ae&&(be.pos===be.line.length-1||m(be.line[be.pos+1]))&&(Ae=!0),z(Q,be)}var Ne=Q.getLine(Ce.ln);Ce.pos=0;for(var et=Ne.length-1;et>=0;--et)if(!m(Ne[et])){Ce.pos=et;break}return Ce}function q(Q,se,he,we){var Pe=Q.getLine(se),Ae={line:Pe,ln:se,pos:he,dir:we},be={ln:Ae.ln,pos:null},Ce=Ae.line==="";for(z(Q,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!==""&&!m(Ae.line[Ae.pos])&&(Ce=!1,be={ln:Ae.ln,pos:Ae.pos}),z(Q,Ae)}var Pe=Q.getLine(be.ln);be.pos=0;for(var Ne=0;Ne<Pe.length;++Ne)if(!m(Pe[Ne])){be.pos=Ne;break}return be}for(var J={ln:$.line,pos:$.ch};k>0;)P<0?J=q(w,J.ln,J.pos,P):J=H(w,J.ln,J.pos,P),k--;return new Fe(J.ln,J.pos)}function Mn(w,$,k,P){var z=$,H,q,J={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[k],Q={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[k],se=w.getLine(z.line).charAt(z.ch),he=se===Q?1:0;if(H=w.scanForBracket(new Fe(z.line,z.ch+he),-1,void 0,{bracketRegex:J}),q=w.scanForBracket(new Fe(z.line,z.ch+he),1,void 0,{bracketRegex:J}),!H||!q)return null;if(H=H.pos,q=q.pos,H.line==q.line&&H.ch>q.ch||H.line>q.line){var we=H;H=q,q=we}return P?q.ch+=1:H.ch+=1,{start:H,end:q}}function qr(w,$,k,P){var z=Ue($),H=w.getLine(z.line),q=H.split(""),J,Q,se,he,we=q.indexOf(k);if(z.ch<we)z.ch=we;else if(we<z.ch&&q[z.ch]==k){var Ae=/string/.test(w.getTokenTypeAt(fe($,0,1))),be=/string/.test(w.getTokenTypeAt($)),Ce=Ae&&!be;Ce||(Q=z.ch,--z.ch)}if(q[z.ch]==k&&!Q)J=z.ch+1;else for(se=z.ch;se>-1&&!J;se--)q[se]==k&&(J=se+1);if(J&&!Q)for(se=J,he=q.length;se<he&&!Q;se++)q[se]==k&&(Q=se);return!J||!Q?{start:z,end:z}:(P&&(--J,++Q),{start:new Fe(z.line,J),end:new Fe(z.line,Q)})}function Kr(){}function Ln(w){var $=w.state.vim;return $.searchState_||($.searchState_=new Kr)}function or(w){return Oi(w,"/")}function vi(w){return Ni(w,"/")}function Oi(w,$){var k=Ni(w,$)||[];if(!k.length)return[];var P=[];if(k[0]===0){for(var z=0;z<k.length;z++)typeof k[z]=="number"&&P.push(w.substring(k[z]+1,k[z+1]));return P}}function Ni(w,$){$||($="/");for(var k=!1,P=[],z=0;z<w.length;z++){var H=w.charAt(z);!k&&H==$&&P.push(z),k=!k&&H=="\\"}return P}function ps(w){for(var $="|(){",k="}",P=!1,z=[],H=-1;H<w.length;H++){var q=w.charAt(H)||"",J=w.charAt(H+1)||"",Q=J&&$.indexOf(J)!=-1;P?((q!=="\\"||!Q)&&z.push(q),P=!1):q==="\\"?(P=!0,J&&k.indexOf(J)!=-1&&(Q=!0),(!Q||J==="\\")&&z.push(q)):(z.push(q),Q&&J!=="\\"&&z.push("\\"))}return z.join("")}function Ys(w){for(var $=!1,k=[],P=-1;P<w.length;P++){var z=w.charAt(P)||"",H=w.charAt(P+1)||"";no[z+H]?(k.push(no[z+H]),P++):$?(k.push(z),$=!1):z==="\\"?($=!0,s(H)||H==="$"?k.push("$"):H!=="/"&&H!=="\\"&&k.push("\\")):(z==="$"&&k.push("$"),k.push(z),H==="/"&&k.push("\\"))}return k.join("")}function vn(w){for(var $=new He.StringStream(w),k=[];!$.eol();){for(;$.peek()&&$.peek()!="\\";)k.push($.next());var P=!1;for(var z in Zs)if($.match(z,!0)){P=!0,k.push(Zs[z]);break}P||k.push($.next())}return k.join("")}function $r(w,$,k){var P=Ye.registerController.getRegister("/");if(P.setText(w),w instanceof RegExp)return w;var z=vi(w),H,q;if(!z.length)H=w;else{H=w.substring(0,z[0]);var J=w.substring(z[0]);q=J.indexOf("i")!=-1}if(!H)return null;_("pcre")||(H=ps(H)),k&&($=/^[^A-Z]*$/.test(H));var Q=new RegExp(H,$||q?"im":"m");return Q}function yi(w){typeof w=="string"&&(w=document.createElement(w));for(var $,k=1;k<arguments.length;k++)if($=arguments[k])if(typeof $!="object"&&($=document.createTextNode($)),$.nodeType)w.appendChild($);else for(var P in $)Object.prototype.hasOwnProperty.call($,P)&&(P[0]==="$"?w.style[P.slice(1)]=$[P]:w.setAttribute(P,$[P]));return w}function Ft(w,$){var k=yi("div",{$color:"red",$whiteSpace:"pre",class:"cm-vim-message"},$);w.openNotification?w.openNotification(k,{bottom:!0,duration:5e3}):alert(k.innerText)}function No(w,$){return yi("div",{$display:"flex"},yi("span",{$fontFamily:"monospace",$whiteSpace:"pre",$flex:1},w,yi("input",{type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false",$width:"100%"})),$&&yi("span",{$color:"#888"},$))}function xr(w,$){if(Xr.length){$.value||($.value=""),Wt=$;return}var k=No($.prefix,$.desc);if(w.openDialog)w.openDialog(k,$.onClose,{onKeyDown:$.onKeyDown,onKeyUp:$.onKeyUp,bottom:!0,selectValueOnOpen:!1,value:$.value});else{var P="";typeof $.prefix!="string"&&$.prefix&&(P+=$.prefix.textContent),$.desc&&(P+=" "+$.desc),$.onClose(prompt(P,""))}}function Pn(w,$){if(w instanceof RegExp&&$ instanceof RegExp){for(var k=["global","multiline","ignoreCase","source"],P=0;P<k.length;P++){var z=k[P];if(w[z]!==$[z])return!1}return!0}return!1}function xn(w,$,k,P){if($){var z=Ln(w),H=$r($,!!k,!!P);if(H)return bo(w,H),Pn(H,z.getQuery())||z.setQuery(H),H}}function Fn(w){if(w.source.charAt(0)=="^")var $=!0;return{token:function(k){if($&&!k.sol()){k.skipToEnd();return}var P=k.match(w,!1);if(P)return P[0].length==0?(k.next(),"searching"):!k.sol()&&(k.backUp(1),!w.exec(k.next()+P[0]))?(k.next(),null):(k.match(w),"searching");for(;!k.eol()&&(k.next(),!k.match(w,!1)););},query:w}}function bo(w,$){clearTimeout(hn);var k=Ln(w);k.highlightTimeout=hn,hn=setTimeout(function(){if(w.state.vim){var P=Ln(w);P.highlightTimeout=null;var z=P.getOverlay();(!z||$!=z.query)&&(z&&w.removeOverlay(z),z=Fn($),w.addOverlay(z),w.showMatchesOnScrollbar&&(P.getScrollbarAnnotate()&&P.getScrollbarAnnotate().clear(),P.setScrollbarAnnotate(w.showMatchesOnScrollbar($))),P.setOverlay(z))}},50)}function sr(w,$,k,P){return P===void 0&&(P=1),w.operation(function(){for(var z=w.getCursor(),H=w.getSearchCursor(k,z),q=0;q<P;q++){var J=H.find($);if(q==0&&J&&Xe(H.from(),z)){var Q=$?H.from():H.to();J=H.find($),J&&!J[0]&&Xe(H.from(),Q)&&w.getLine(Q.line).length==Q.ch&&(J=H.find($))}if(!J&&(H=w.getSearchCursor(k,$?new Fe(w.lastLine()):new Fe(w.firstLine(),0)),!H.find($)))return}return H.from()})}function Nr(w,$,k,P,z){return P===void 0&&(P=1),w.operation(function(){var H=w.getCursor(),q=w.getSearchCursor(k,H),J=q.find(!$);!z.visualMode&&J&&Xe(q.from(),H)&&q.find(!$);for(var Q=0;Q<P;Q++)if(J=q.find($),!J&&(q=w.getSearchCursor(k,$?new Fe(w.lastLine()):new Fe(w.firstLine(),0)),!q.find($)))return;return[q.from(),q.to()]})}function bi(w){var $=Ln(w);$.highlightTimeout&&(clearTimeout($.highlightTimeout),$.highlightTimeout=null),w.removeOverlay(Ln(w).getOverlay()),$.setOverlay(null),$.getScrollbarAnnotate()&&($.getScrollbarAnnotate().clear(),$.setScrollbarAnnotate(null))}function li(w,$,k){return typeof w!="number"&&(w=w.line),$ instanceof Array?x(w,$):typeof k=="number"?w>=$&&w<=k:w==$}function Ki(w){var $=w.ace.renderer;return{top:$.getFirstFullyVisibleRow(),bottom:$.getLastFullyVisibleRow()}}function ci(w,$,k){if(k=="'"||k=="`")return Ye.jumpList.find(w,-1)||new Fe(0,0);if(k==".")return Yi(w);var P=$.marks[k];return P&&P.find()}function Yi(w){if(w.getLastEditEnd)return w.getLastEditEnd();for(var $=w.doc.history.done,k=$.length;k--;)if($[k].changes)return Ue($[k].changes[0].to)}function wo(w,$,k,P,z,H,q,J,Q){function se(){w.operation(function(){for(;!Pe;)he(),Ae();be()})}function he(){var lt=w.getRange(H.from(),H.to()),ht=lt.replace(q,J),On=H.to().line;H.replace(ht),et=H.to().line,z+=et-On,vt=et<On}function we(){var lt=Ne&&Ue(H.to()),ht=H.findNext();return ht&&!ht[0]&&lt&&Xe(H.from(),lt)&&(ht=H.findNext()),ht}function Ae(){for(;we()&&li(H.from(),P,z);)if(!(!k&&H.from().line==et&&!vt)){w.scrollIntoView(H.from(),30),w.setSelection(H.from(),H.to()),Ne=H.from(),Pe=!1;return}Pe=!0}function be(lt){if(lt&&lt(),w.focus(),Ne){w.setCursor(Ne);var ht=w.state.vim;ht.exMode=!1,ht.lastHPos=ht.lastHSPos=Ne.ch}Q&&Q()}function Ce(lt,ht,On){He.e_stop(lt);var Tt=B(lt);switch(Tt){case"y":he(),Ae();break;case"n":Ae();break;case"a":var en=Q;Q=void 0,w.operation(se),Q=en;break;case"l":he();case"q":case"<Esc>":case"<C-c>":case"<C-[>":be(On)}return Pe&&be(On),!0}w.state.vim.exMode=!0;var Pe=!1,Ne,et,vt;if(Ae(),Pe){Ft(w,"No matches for "+q.source);return}if(!$){se(),Q&&Q();return}xr(w,{prefix:yi("span","replace with ",yi("strong",J)," (y/n/a/q/l)"),onKeyDown:Ce})}function dr(w,$){var k=w.state.vim,P=Ye.macroModeState,z=Ye.registerController.getRegister("."),H=P.isPlaying,q=P.lastInsertModeChanges;H||(w.off("change",Do),k.insertEnd&&k.insertEnd.clear(),k.insertEnd=null,He.off(w.getInputField(),"keydown",Zi)),!H&&k.insertModeRepeat>1&&(Ko(w,k,k.insertModeRepeat-1,!0),k.lastEditInputState.repeatOverride=k.insertModeRepeat),delete k.insertModeRepeat,k.insertMode=!1,$||w.setCursor(w.getCursor().line,w.getCursor().ch-1),w.setOption("keyMap","vim"),w.setOption("disableInput",!0),w.toggleOverwrite(!1),z.setText(q.changes.join("")),He.signal(w,"vim-mode-change",{mode:"normal"}),P.isRecording&&yn(P)}function Xi(w){Vn.unshift(w)}function Ji(w,$,k,P,z){var H={keys:w,type:$};H[$]=k,H[$+"Args"]=P;for(var q in z)H[q]=z[q];Xi(H)}function wi(w,$,k,P){var z=Ye.registerController.getRegister(P);if(P==":"){z.keyBuffer[0]&&Zr.processCommand(w,z.keyBuffer[0]),k.isPlaying=!1;return}var H=z.keyBuffer,q=0;k.isPlaying=!0,k.replaySearchQueries=z.searchQueries.slice(0);for(var J=0;J<H.length;J++)for(var Q=H[J],se,he;Q;)if(se=/<\w+-.+?>|<\w+>|./.exec(Q),he=se[0],Q=Q.substring(se.index+he.length),$t.handleKey(w,he,"macro"),$.insertMode){var we=z.insertModeChanges[q++].changes;Ye.macroModeState.lastInsertModeChanges.changes=we,xo(w,we,1),dr(w)}k.isPlaying=!1}function Di(w,$){if(!w.isPlaying){var k=w.latestRegister,P=Ye.registerController.getRegister(k);P&&P.pushText($)}}function yn(w){if(!w.isPlaying){var $=w.latestRegister,k=Ye.registerController.getRegister($);k&&k.pushInsertModeChanges&&k.pushInsertModeChanges(w.lastInsertModeChanges)}}function qo(w,$){if(!w.isPlaying){var k=w.latestRegister,P=Ye.registerController.getRegister(k);P&&P.pushSearchQuery&&P.pushSearchQuery($)}}function Do(w,$){var k=Ye.macroModeState,P=k.lastInsertModeChanges;if(!k.isPlaying)for(var z=w.state.vim;$;){if(P.expectCursorActivityForChange=!0,P.ignoreCount>1)P.ignoreCount--;else if($.origin=="+input"||$.origin=="paste"||$.origin===void 0){var H=w.listSelections().length;H>1&&(P.ignoreCount=H);var q=$.text.join(`
1402
+ `);if(P.maybeReset&&(P.changes=[],P.maybeReset=!1),q)if(w.state.overwrite&&!/\n/.test(q))P.changes.push([q]);else{if(q.length>1){var J=z&&z.insertEnd&&z.insertEnd.find(),Q=w.getCursor();if(J&&J.line==Q.line){var se=J.ch-Q.ch;se>0&&se<q.length&&(P.changes.push([q,se]),q="")}}q&&P.changes.push(q)}}$=$.next}}function Pi(w){var $=w.state.vim;if($.insertMode){var k=Ye.macroModeState;if(k.isPlaying)return;var P=k.lastInsertModeChanges;P.expectCursorActivityForChange?P.expectCursorActivityForChange=!1:(P.maybeReset=!0,$.insertEnd&&$.insertEnd.clear(),$.insertEnd=w.setBookmark(w.getCursor(),{insertLeft:!0}))}else w.curOp.isVimOp||Po(w,$)}function Po(w,$,k){var P=w.getCursor("anchor"),z=w.getCursor("head");if($.visualMode&&!w.somethingSelected()?wn(w,!1):!$.visualMode&&!$.insertMode&&w.somethingSelected()&&($.visualMode=!0,$.visualLine=!1,He.signal(w,"vim-mode-change",{mode:"visual"})),$.visualMode){var H=ft(z,P)?0:-1,q=ft(z,P)?-1:0;z=fe(z,0,H),P=fe(P,0,q),$.sel={anchor:P,head:z},Sr(w,$,"<",We(z,P)),Sr(w,$,">",Ie(z,P))}else!$.insertMode&&!k&&($.lastHPos=w.getCursor().ch)}function Fo(w,$){this.keyName=w,this.key=$.key,this.ctrlKey=$.ctrlKey,this.altKey=$.altKey,this.metaKey=$.metaKey,this.shiftKey=$.shiftKey}function Zi(w){var $=Ye.macroModeState,k=$.lastInsertModeChanges,P=He.keyName?He.keyName(w):w.key;P&&(P.indexOf("Delete")!=-1||P.indexOf("Backspace")!=-1)&&(k.maybeReset&&(k.changes=[],k.maybeReset=!1),k.changes.push(new Fo(P,w)))}function Ko(w,$,k,P){function z(){J?Fi.processAction(w,$,$.lastEditActionCommand):Fi.evalInput(w,$)}function H(he){if(q.lastInsertModeChanges.changes.length>0){he=$.lastEditActionCommand?he:1;var we=q.lastInsertModeChanges;xo(w,we.changes,he)}}var q=Ye.macroModeState;q.isPlaying=!0;var J=!!$.lastEditActionCommand,Q=$.inputState;if($.inputState=$.lastEditInputState,J&&$.lastEditActionCommand.interlaceInsertRepeat)for(var se=0;se<k;se++)z(),H(1);else P||z(),H(k);$.inputState=Q,$.insertMode&&!P&&dr(w),q.isPlaying=!1}function Yo(w,$){He.lookupKey($,"vim-insert",function(k){return typeof k=="string"?He.commands[k](w):k(w),!0})}function xo(w,$,k){var P=w.getCursor("head"),z=Ye.macroModeState.lastInsertModeChanges.visualBlock;z&&(Rn(w,P,z+1),k=w.listSelections().length,w.setCursor(P));for(var H=0;H<k;H++){z&&w.setCursor(fe(P,H,0));for(var q=0;q<$.length;q++){var J=$[q];if(J instanceof Fo)Yo(w,J.keyName);else if(typeof J=="string")w.replaceSelection(J);else{var Q=w.getCursor(),se=fe(Q,0,J[0].length-(J[1]||0));w.replaceRange(J[0],Q,J[1]?Q:se),w.setCursor(se)}}}z&&w.setCursor(fe(P,0,1))}function Co(w,$,k,P){$.length>1&&$[0]=="n"&&($=$.replace("numpad","")),$=Bo[$]||$;var z="";if(k.ctrlKey&&(z+="C-"),k.altKey&&(z+="A-"),(z||$.length>1)&&k.shiftKey&&(z+="S-"),P&&!P.expectLiteralNext&&$.length==1){if(Gn.keymap&&$ in Gn.keymap)(Gn.remapCtrl!==!1||!z)&&($=Gn.keymap[$]);else if($.charCodeAt(0)>255){var H=k.code&&k.code.slice(-1)||"";k.shiftKey||(H=H.toLowerCase()),H&&($=H)}}return z+=$,z.length>1&&(z="<"+z+">"),z}function xi(w){var $=new w.constructor;return Object.keys(w).forEach(function(k){if(k!="insertEnd"){var P=w[k];Array.isArray(P)?P=P.slice():P&&typeof P=="object"&&P.constructor!=Object&&(P=xi(P)),$[k]=P}}),w.sel&&($.sel={head:w.sel.head&&Ue(w.sel.head),anchor:w.sel.anchor&&Ue(w.sel.anchor)}),$}function ie(w,$,k){var P=!1,z=$t.maybeInitVimState_(w),H=z.visualBlock||z.wasInVisualBlock,q=w.ace.inMultiSelectMode;if(z.wasInVisualBlock&&!q?z.wasInVisualBlock=!1:q&&z.visualBlock&&(z.wasInVisualBlock=!0),$=="<Esc>"&&!z.insertMode&&!z.visualMode&&q)w.ace.exitMultiSelectMode();else if(H||!q||w.ace.inVirtualSelectionMode)P=$t.handleKey(w,$,k);else{var J=xi(z),Q=z.inputState.changeQueueList||[];w.operation(function(){w.curOp.isVimOp=!0;var se=0;w.ace.forEachSelection(function(){var he=w.ace.selection;w.state.vim.lastHPos=he.$desiredColumn==null?he.lead.column:he.$desiredColumn,w.state.vim.inputState.changeQueue=Q[se];var we=w.getCursor("head"),Ae=w.getCursor("anchor"),be=ft(we,Ae)?0:-1,Ce=ft(we,Ae)?-1:0;we=fe(we,0,be),Ae=fe(Ae,0,Ce),w.state.vim.sel.head=we,w.state.vim.sel.anchor=Ae,P=Pr(w,$,k),he.$desiredColumn=w.state.vim.lastHPos==-1?null:w.state.vim.lastHPos,w.ace.inVirtualSelectionMode&&(Q[se]=w.state.vim.inputState.changeQueue),w.virtualSelectionMode()&&(w.state.vim=xi(J)),se++}),w.curOp.cursorActivity&&!P&&(w.curOp.cursorActivity=!1),z.status=w.state.vim.status,w.state.vim=z,z.inputState.changeQueueList=Q,z.inputState.changeQueue=null},!0)}return P&&!z.visualMode&&!z.insert&&z.visualMode!=w.somethingSelected()&&Po(w,z,!0),P}function $e(w,$){$.off("beforeEndOperation",$e);var k=$.state.cm.vimCmd;k&&$.execCommand(k.exec?k:k.name,k.args),$.curOp=$.prevOp}var Le=e("../range").Range,rt=e("../lib/event_emitter").EventEmitter,wt=e("../lib/dom"),Xt=e("../lib/oop"),Qt=e("../lib/keys"),Yr=e("../lib/event"),fr=e("../search").Search,zn=e("../lib/useragent"),Dr=e("../search_highlight").SearchHighlight,Sn=e("../commands/multi_select_commands"),ja=e("../mode/text").Mode.prototype.tokenRe,zo=e("../ext/hardwrap").hardWrap;e("../multi_select");var He=function(w){this.ace=w,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)};He.Pos=function(w,$){if(!(this instanceof Fe))return new Fe(w,$);this.line=w,this.ch=$},He.defineOption=function(w,$,k){},He.commands={redo:function(w){w.ace.redo()},undo:function(w){w.ace.undo()},newlineAndIndent:function(w){w.ace.insert(`
1403
+ `)},goLineLeft:function(w){w.ace.selection.moveCursorLineStart()},goLineRight:function(w){w.ace.selection.moveCursorLineEnd()}},He.keyMap={},He.addClass=He.rmClass=function(){},He.e_stop=He.e_preventDefault=Yr.stopEvent,He.keyName=function(w){var $=Qt[w.keyCode]||w.key||"";return $.length==1&&($=$.toUpperCase()),$=Yr.getModifierString(w).replace(/(^|-)\w/g,function(k){return k.toUpperCase()})+$,$},He.keyMap.default=function(w){return function($){var k=$.ace.commands.commandKeyBinding[w.toLowerCase()];return k&&$.ace.execCommand(k)!==!1}},He.lookupKey=function w($,k,P){k||(k="default"),typeof k=="string"&&(k=He.keyMap[k]||He.keyMap.default);var z=typeof k=="function"?k($):k[$];if(z===!1)return"nothing";if(z==="...")return"multi";if(z!=null&&P(z))return"handled";if(k.fallthrough){if(!Array.isArray(k.fallthrough))return w($,k.fallthrough,P);for(var H=0;H<k.fallthrough.length;H++){var q=w($,k.fallthrough[H],P);if(q)return q}}},He.findMatchingTag=function(w,$){return w.findMatchingTag($)},He.findEnclosingTag=function(w,$){},He.signal=function(w,$,k){return w._signal($,k)},He.on=Yr.addListener,He.off=Yr.removeListener,He.isWordChar=function(w){return w<""?/^\w$/.test(w):(ja.lastIndex=0,ja.test(w))},(function(){Xt.implement(He.prototype,rt),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:[]},z=this.curOp=this.curOp||{};z.changeHandlers||(z.changeHandlers=this._eventRegistry.change&&this._eventRegistry.change.slice()),z.lastChange?z.lastChange.next=z.lastChange=P:z.lastChange=z.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(Sn.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 z=this.ace.prevOp;this.ace.startOperation({command:{name:"vim",scrollIntoView:"cursor"}})}var H=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(),!H.cursorActivity&&!H.lastChange&&z&&(this.ace.prevOp=z)),(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,z){var H=z?z[k+"Handlers"]:(this._eventRegistry||{})[k];if(H){H=H.slice();for(var q=0;q<H.length;q++)H[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 z=!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),z&&(this.ace.renderer.scrollCursorIntoView(),this.ace.endOperation())},this.getCursor=function(k){var P=this.ace.selection,z=k=="anchor"?P.isEmpty()?P.lead:P.anchor:k=="head"||!k?P.lead:P.getRange()[k];return f(z)},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(z){return{anchor:this.clipPos(f(z.cursor==z.end?z.start:z.end)),head:this.clipPos(f(z.cursor))}},this)},this.setSelections=function(k,P){var z=this.ace.multiSelect,H=k.map(function(se){var he=u(se.anchor),we=u(se.head),Ae=Le.comparePoints(he,we)<0?new Le.fromPoints(he,we):new Le.fromPoints(we,he);return Ae.cursor=Le.comparePoints(Ae.start,we)?Ae.end:Ae.start,Ae});if(this.ace.inVirtualSelectionMode){this.ace.selection.fromOrientedRange(H[0]);return}P?H[P]&&H.push(H.splice(P,1)[0]):H=H.reverse(),z.toSingleRange(H[0].clone());for(var q=this.ace.session,J=0;J<H.length;J++){var Q=q.$clipRangeToDocument(H[J]);z.addRange(Q)}},this.setSelection=function(k,P,z){var H=this.ace.selection;H.moveTo(k.line,k.ch),H.selectTo(P.line,P.ch),z&&z.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 f(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",z=k.start,H=k.end,q=(H.row-z.row)*(P?1:-1),J=(H.column-z.column)*(P?1:-1);P&&(H=z);for(var Q in this.marks){var se=this.marks[Q],he=Le.comparePoints(se,z);if(!(he<0)){if(he===0&&P)if(!se.$insertRight)he=1;else{if(se.bias!=1){se.bias=-1;continue}he=1}var we=P?he:Le.comparePoints(se,H);if(we>0){se.row+=q,se.column+=se.row==H.row?J:0;continue}!P&&we<=0&&(se.row=z.row,se.column=z.column,we===0&&(se.bias=1))}}};var w=function(k,P,z,H){this.cm=k,this.id=P,this.row=z,this.column=H,k.marks[this.id]=this};w.prototype.clear=function(){delete this.cm.marks[this.id]},w.prototype.find=function(){return f(this)},this.setBookmark=function(k,P){var z=new w(this,this.$uid++,k.line,k.ch);return(!P||!P.insertLeft)&&(z.$insertRight=!0),this.marks[z.id]=z,z},this.moveH=function(k,P){if(P=="char"){var z=this.ace.selection;z.clearSelection(),z.moveCursorBy(0,k)}},this.findPosV=function(k,P,z,H){if(z=="page"){var q=this.ace.renderer,J=q.layerConfig;P*=Math.floor(J.height/J.lineHeight),z="line"}if(z=="line"){var Q=this.ace.session.documentToScreenPosition(k.line,k.ch);H!=null&&(Q.column=H),Q.row+=P,Q.row=Math.min(Math.max(0,Q.row),this.ace.session.getScreenLength()-1);var se=this.ace.session.screenToDocumentPosition(Q.row,Q.column);return f(se)}debugger},this.charCoords=function(k,P){if(P=="div"||!P){var z=this.ace.session.documentToScreenPosition(k.line,k.ch);return{left:z.column,top:z.row}}if(P=="local"){var H=this.ace.renderer,z=this.ace.session.documentToScreenPosition(k.line,k.ch),q=H.layerConfig.lineHeight,J=H.layerConfig.characterWidth,Q=q*z.row;return{left:z.column*J,top:Q,bottom:Q+q}}},this.coordsChar=function(k,P){var z=this.ace.renderer;if(P=="local"){var H=Math.max(0,Math.floor(k.top/z.lineHeight)),q=Math.max(0,Math.floor(k.left/z.characterWidth)),J=z.session.screenToDocumentPosition(H,q);return f(J)}if(P=="div")throw"not implemented"},this.getSearchCursor=function(k,P,z){var H=!1,q=!1;k instanceof RegExp&&!k.global&&(H=!k.ignoreCase,k=k.source,q=!0),k=="\\n"&&(k=`
1404
+ `,q=!1);var J=new fr;P.ch==null&&(P.ch=Number.MAX_VALUE);var Q={row:P.line,column:P.ch},se=this,he=null;return{findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(we){J.setOptions({needle:k,caseSensitive:H,wrap:!1,backwards:we,regExp:q,start:he||Q});var Ae=J.find(se.ace.session);return he=Ae,he&&[!he.isEmpty()]},from:function(){return he&&f(he.start)},to:function(){return he&&f(he.end)},replace:function(we){he&&(he.end=se.ace.session.doc.replace(he,we))}}},this.scrollTo=function(k,P){var z=this.ace.renderer,H=z.layerConfig,q=H.maxHeight;q-=(z.$size.scrollerHeight-z.lineHeight)*z.$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,H.width)))},this.scrollInfo=function(){return 0},this.scrollIntoView=function(k,P){if(k){var z=this.ace.renderer,H={top:0,bottom:P};z.scrollCursorIntoView(u(k),z.lineHeight*2/z.$size.scrollerHeight,H)}},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,z){z||(z=P);var H=new Le(P.line,P.ch,z.line,z.ch);return this.ace.session.$clipRangeToDocument(H),this.ace.session.replace(H,k)},this.replaceSelection=this.replaceSelections=function(k){var P=Array.isArray(k)&&k,z=this.ace.selection;if(this.ace.inVirtualSelectionMode){this.ace.session.replace(z.getRange(),P?k[0]||"":k);return}z.inVirtualSelectionMode=!0;var H=z.rangeList.ranges;H.length||(H=[this.ace.multiSelect.getRange()]);for(var q=H.length;q--;)this.ace.session.replace(H[q],P?k[q]||"":k);z.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 $={indentWithTabs:"useSoftTabs",indentUnit:"tabSize",tabSize:"tabSize",firstLineNumber:"firstLineNumber",readOnly:"readOnly"};this.setOption=function(k,P){switch(this.state[k]=P,k){case"indentWithTabs":k=$[k],P=!P;break;case"keyMap":this.state.$keyMap=P;return;default:k=$[k]}k&&this.ace.setOption(k,P)},this.getOption=function(k){var P,z=$[k];switch(z&&(P=this.ace.getOption(z)),k){case"indentWithTabs":return k=$[k],!P;case"keyMap":return this.state.$keyMap||"vim"}return z?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 Dr(null,"ace_highlight-marker","text"),z=this.ace.session.addDynamicMarker(P);P.id=z.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 J=q.start.row;J==q.end.row?P.cache[J]=void 0:P.cache.splice(J,P.cache.length)},P.session.on("changeEditor",P.destroy),P.session.on("change",P.updateOnChange)}var H=new RegExp(k.query.source,"gmi");this.$searchHighlight=k.highlight=P,this.$searchHighlight.setRegexp(H),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(u(k));return{to:P&&f(P)}},this.findMatchingTag=function(k){var P=this.ace.session.getMatchingTags(u(k));if(P)return{open:{from:f(P.openTag.start),to:f(P.openTag.end)},close:{from:f(P.closeTag.start),to:f(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(u(k))},this.posFromIndex=function(k){return f(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,z,H){var q=H.bracketRegex.source,J=/paren|text|operator|tag/;if(P==1)var Q=this.ace.session.$findClosingBracket(q.slice(1,2),u(k),J);else{var Q=this.ace.session.$findOpeningBracket(q.slice(-2,-1),{row:k.line,column:k.ch+1},J);!Q&&H.bracketRegex&&H.bracketRegex.test(this.getLine(k.line)[k.ch-1])&&(Q={row:k.line,column:k.ch-1})}return Q&&{pos:f(Q)}},this.refresh=function(){return this.ace.resize(!0)},this.getMode=function(){return{name:this.getOption("mode")}},this.execCommand=function(k){if(He.commands.hasOwnProperty(k))return He.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 z=k.row,H=0;H<P.length;H++){var q=P[H];if(q.start.row!=q.end.row){if(q.action[0]=="i")q.start.row<z&&(z+=q.end.row-q.start.row);else if(q.start.row<z){if(z<q.end.row||z==q.end.row&&q.start.column>0)return null;z-=q.end.row-q.start.row}}}return z},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 f(k.$lastDelta.end)}}).call(He.prototype);var Xs=He.StringStream=function(w,$){this.pos=this.start=0,this.string=w,this.tabSize=$||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};Xs.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(w){var $=this.string.charAt(this.pos);if(typeof w=="string")var k=$==w;else var k=$&&(w.test?w.test($):w($));if(k)return++this.pos,$},eatWhile:function(w){for(var $=this.pos;this.eat(w););return this.pos>$},eatSpace:function(){for(var w=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>w},skipToEnd:function(){this.pos=this.string.length},skipTo:function(w){var $=this.string.indexOf(w,this.pos);if($>-1)return this.pos=$,!0},backUp:function(w){this.pos-=w},column:function(){throw"not implemented"},indentation:function(){throw"not implemented"},match:function(w,$,k){if(typeof w!="string"){var P=this.string.slice(this.pos).match(w);return P&&P.index>0?null:(P&&$!==!1&&(this.pos+=P[0].length),P)}var z=function(q){return k?q.toLowerCase():q},H=this.string.substr(this.pos,w.length);if(z(H)==z(w))return $!==!1&&(this.pos+=w.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(w,$){this.lineStart+=w;try{return $()}finally{this.lineStart-=w}}},He.defineExtension=function(w,$){He.prototype[w]=$},wt.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 w(k,P,z){var H=k.ace.container,q;return q=H.appendChild(document.createElement("div")),z?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 $(k,P){k.state.currentNotificationClose&&k.state.currentNotificationClose(),k.state.currentNotificationClose=P}He.defineExtension("openDialog",function(k,P,z){function H(we){if(typeof we=="string")se.value=we;else{if(J||we&&we.type=="blur"&&document.activeElement===se)return;Q.state.dialog==q&&(Q.state.dialog=null,Q.focus()),J=!0,q.remove(),z.onClose&&z.onClose(q);var Ae=Q;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()){z||(z={}),$(this,null);var q=w(this,k,z.bottom),J=!1,Q=this;this.state.dialog=q;var se=q.getElementsByTagName("input")[0],he;return se?(z.value&&(se.value=z.value,z.selectValueOnOpen!==!1&&se.select()),z.onInput&&He.on(se,"input",function(we){z.onInput(we,se.value,H)}),z.onKeyUp&&He.on(se,"keyup",function(we){z.onKeyUp(we,se.value,H)}),He.on(se,"keydown",function(we){z&&z.onKeyDown&&z.onKeyDown(we,se.value,H)||(we.keyCode==13&&P(se.value),(we.keyCode==27||z.closeOnEnter!==!1&&we.keyCode==13)&&(He.e_stop(we),H()))}),z.closeOnBlur!==!1&&He.on(se,"blur",H),se.focus()):(he=q.getElementsByTagName("button")[0])&&(He.on(he,"click",function(){H(),Q.focus()}),z.closeOnBlur!==!1&&He.on(he,"blur",H),he.focus()),H}}),He.defineExtension("openNotification",function(k,P){function z(){q||(q=!0,clearTimeout(J),H.remove())}if(!this.virtualSelectionMode()){$(this,z);var H=w(this,k,P&&P.bottom),q=!1,J,Q=P&&typeof P.duration<"u"?P.duration:5e3;return He.on(H,"click",function(se){He.e_preventDefault(se),z()}),Q&&(J=setTimeout(z,Q)),z}})})();var Fe=He.Pos,Vn=[{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"}],Xo=Vn.length,_o=[{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"}],Gn=N(""),Ba=/[\d]/,Jo=[He.isWordChar,function(w){return w&&!He.isWordChar(w)&&!/\s/.test(w)}],Qi=[function(w){return/\S/.test(w)}],jo=["<",">"],Js=["-",'"',".",":","_","/","+"],cn=/^\w$/,mt;try{mt=new RegExp("^[\\p{Lu}]$","u")}catch{mt=/^[A-Z]$/}var Kt={};T("filetype",void 0,"string",["ft"],function(w,$){if($!==void 0){if(w===void 0){var k=$.getOption("mode");return k=="null"?"":k}var k=w==""?"null":w;$.setOption("mode",k)}}),T("textwidth",80,"number",["tw"],function(w,$){if($!==void 0){if(w===void 0){var k=$.getOption("textwidth");return k}var P=Math.round(w);P>1&&$.setOption("textwidth",P)}});var eo=function(){function w(Q,se,he){function we(Pe){var Ne=++z%P,et=J[Ne];et&&et.clear(),J[Ne]=Q.setBookmark(Pe)}var Ae=z%P,be=J[Ae];if(be){var Ce=be.find();Ce&&!Xe(Ce,se)&&we(se)}else we(se);we(he),H=z,q=z-P+1,q<0&&(q=0)}function $(Q,se){z+=se,z>H?z=H:z<q&&(z=q);var he=J[(P+z)%P];if(he&&!he.find()){var we=se>0?1:-1,Ae,be=Q.getCursor();do if(z+=we,he=J[(P+z)%P],he&&(Ae=he.find())&&!Xe(be,Ae))break;while(z<H&&z>q)}return he}function k(Q,se){var he=z,we=$(Q,se);return z=he,we&&we.find()}var P=100,z=-1,H=0,q=0,J=new Array(P);return{cachedCursor:void 0,add:w,find:k,move:$}},Jn=function(w){return w?{changes:w.changes,expectCursorActivityForChange:w.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};C.prototype={exitMacroRecordMode:function(){var w=Ye.macroModeState;w.onRecordingDone&&w.onRecordingDone(),w.onRecordingDone=void 0,w.isRecording=!1},enterMacroRecordMode:function(w,$){var k=Ye.registerController.getRegister($);if(k){if(k.clear(),this.latestRegister=$,w.openDialog){var P=yi("span",{class:"cm-vim-message"},"recording @"+$);this.onRecordingDone=w.openDialog(P,null,{bottom:!0})}this.isRecording=!0}}};var Ye,$n,$t={enterVimMode:a,leaveVimMode:g,buildKeyMap:function(){},getRegisterController:function(){return Ye.registerController},resetVimGlobalState_:O,getVimGlobalState_:function(){return Ye},maybeInitVimState_:L,suppressErrorLogging:!1,InsertModeKey:Fo,map:function(w,$,k){Zr.map(w,$,k)},unmap:function(w,$){return Zr.unmap(w,$)},noremap:function(w,$,k){Zr.map(w,$,k,!0)},mapclear:function(w){var $=Vn.length,k=Xo,P=Vn.slice(0,$-k);if(Vn=Vn.slice($-k),w)for(var z=P.length-1;z>=0;z--){var H=P[z];if(w!==H.context)if(H.context)this._mapCommand(H);else{var q=["normal","insert","visual"];for(var J in q)if(q[J]!==w){var Q={};for(var se in H)Q[se]=H[se];Q.context=q[J],this._mapCommand(Q)}}}},langmap:F,vimKeyFromEvent:B,setOption:S,getOption:_,defineOption:T,defineEx:function(w,$,k){if(!$)$=w;else if(w.indexOf($)!==0)throw new Error('(Vim.defineEx) "'+$+'" is not a prefix of "'+w+'", command not registered');Cr[w]=k,Zr.commandMap_[$]={name:w,shortName:$,type:"api"}},handleKey:function(w,$,k){var P=this.findKey(w,$,k);if(typeof P=="function")return P()},multiSelectHandleKey:ie,findKey:function(w,$,k){function P(){var se=Ye.macroModeState;if(se.isRecording){if($=="q")return se.exitMacroRecordMode(),A(w),!0;k!="mapping"&&Di(se,$)}}function z(){if($=="<Esc>"){if(J.visualMode)wn(w);else{if(!J.insertMode)return;dr(w)}return A(w),!0}}function H(){if(z())return!0;J.inputState.keyBuffer.push($);var se=J.inputState.keyBuffer.join(""),he=$.length==1,we=Fi.matchCommand(se,Vn,J.inputState,"insert"),Ae=J.inputState.changeQueue;if(we.type=="none")return A(w),!1;if(we.type=="partial"){if(we.expectLiteralNext&&(J.expectLiteralNext=!0),$n&&window.clearTimeout($n),$n=he&&window.setTimeout(function(){J.insertMode&&J.inputState.keyBuffer.length&&A(w)},_("insertModeEscKeysTimeout")),he){var be=w.listSelections();(!Ae||Ae.removed.length!=be.length)&&(Ae=J.inputState.changeQueue=new D),Ae.inserted+=$;for(var Ce=0;Ce<be.length;Ce++){var Pe=We(be[Ce].anchor,be[Ce].head),Ne=Ie(be[Ce].anchor,be[Ce].head),et=w.getRange(Pe,w.state.overwrite?fe(Ne,0,1):Ne);Ae.removed[Ce]=(Ae.removed[Ce]||"")+et}}return!he}if(J.expectLiteralNext=!1,$n&&window.clearTimeout($n),we.command&&Ae){for(var be=w.listSelections(),Ce=0;Ce<be.length;Ce++){var vt=be[Ce].head;w.replaceRange(Ae.removed[Ce]||"",fe(vt,0,-Ae.inserted.length),vt,"+input")}Ye.macroModeState.lastInsertModeChanges.changes.pop()}return we.command||A(w),we.command}function q(){if(P()||z())return!0;J.inputState.keyBuffer.push($);var se=J.inputState.keyBuffer.join("");if(/^[1-9]\d*$/.test(se))return!0;var he=/^(\d*)(.*)$/.exec(se);if(!he)return A(w),!1;var we=J.visualMode?"visual":"normal",Ae=he[2]||he[1];J.inputState.operatorShortcut&&J.inputState.operatorShortcut.slice(-1)==Ae&&(Ae=J.inputState.operatorShortcut);var be=Fi.matchCommand(Ae,Vn,J.inputState,we);return be.type=="none"?(A(w),!1):be.type=="partial"?(be.expectLiteralNext&&(J.expectLiteralNext=!0),!0):be.type=="clear"?(A(w),!0):(J.expectLiteralNext=!1,J.inputState.keyBuffer.length=0,he=/^(\d*)(.*)$/.exec(se),he[1]&&he[1]!="0"&&J.inputState.pushRepeatDigit(he[1]),be.command)}var J=L(w),Q;return J.insertMode?Q=H():Q=q(),Q===!1?!J.insertMode&&$.length===1?function(){return!0}:void 0:Q===!0?function(){return!0}:function(){if(!((Q.operator||Q.isEdit)&&w.getOption("readOnly")))return w.operation(function(){w.curOp.isVimOp=!0;try{Q.type=="keyToKey"?I(w,Q.toKeys,Q):Fi.processCommand(w,J,Q)}catch(se){throw w.state.vim=void 0,L(w),$t.suppressErrorLogging||console.log(se),se}return!0})}},handleEx:function(w,$){Zr.processCommand(w,$)},defineMotion:X,defineAction:le,defineOperator:ee,mapCommand:Ji,_mapCommand:Xi,defineRegister:W,exitVisualMode:wn,exitInsertMode:dr},Xr=[],to=!1,Wt,Jr={Return:"CR",Backspace:"BS",Delete:"Del",Escape:"Esc",Insert:"Ins",ArrowLeft:"Left",ArrowRight:"Right",ArrowUp:"Up",ArrowDown:"Down",Enter:"CR"," ":"Space"},pr={Shift:1,Alt:1,Command:1,Control:1,CapsLock:1,AltGraph:1,Dead:1,Unidentified:1},Ao={};"Left|Right|Up|Down|End|Home".split("|").concat(Object.keys(Jr)).forEach(function(w){Ao[(Jr[w]||"").toLowerCase()]=Ao[w.toLowerCase()]=w}),T("langmap",void 0,"string",["lmap"],function(w,$){if(w===void 0)return Gn.string;F(w)}),E.prototype.pushRepeatDigit=function(w){this.operator?this.motionRepeat=this.motionRepeat.concat(w):this.prefixRepeat=this.prefixRepeat.concat(w)},E.prototype.getRepeat=function(){var w=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(w=1,this.prefixRepeat.length>0&&(w*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(w*=parseInt(this.motionRepeat.join(""),10))),w},j.prototype={setText:function(w,$,k){this.keyBuffer=[w||""],this.linewise=!!$,this.blockwise=!!k},pushText:function(w,$){$&&(this.linewise||this.keyBuffer.push(`
1438
+ `),this.linewise=!0),this.keyBuffer.push(w)},pushInsertModeChanges:function(w){this.insertModeChanges.push(Jn(w))},pushSearchQuery:function(w){this.searchQueries.push(w)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},V.prototype={pushText:function(w,$,k,P,z){if(w!=="_"){P&&k.charAt(k.length-1)!==`
1439
+ `&&(k+=`
1440
+ `);var H=this.isValidRegister(w)?this.getRegister(w):null;if(!H){switch($){case"yank":this.registers[0]=new j(k,P,z);break;case"delete":case"change":k.indexOf(`
1441
+ `)==-1?this.registers["-"]=new j(k,P):(this.shiftNumericRegisters_(),this.registers[1]=new j(k,P))}this.unnamedRegister.setText(k,P,z);return}var q=h(w);q?H.pushText(k,P):H.setText(k,P,z),w==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"&&navigator.clipboard.writeText(k),this.unnamedRegister.setText(H.toString(),P)}},getRegister:function(w){return this.isValidRegister(w)?(w=w.toLowerCase(),this.registers[w]||(this.registers[w]=new j),this.registers[w]):this.unnamedRegister},isValidRegister:function(w){return w&&(x(w,Js)||cn.test(w))},shiftNumericRegisters_:function(){for(var w=9;w>=2;w--)this.registers[w]=this.getRegister(""+(w-1))}},K.prototype={nextMatch:function(w,$){var k=this.historyBuffer,P=$?-1:1;this.initialPrefix===null&&(this.initialPrefix=w);for(var z=this.iterator+P;$?z>=0:z<k.length;z+=P)for(var H=k[z],q=0;q<=H.length;q++)if(this.initialPrefix==H.substring(0,q))return this.iterator=z,H;if(z>=k.length)return this.iterator=k.length,this.initialPrefix;if(z<0)return w},pushInput:function(w){var $=this.historyBuffer.indexOf(w);$>-1&&this.historyBuffer.splice($,1),w.length&&this.historyBuffer.push(w)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var Fi={matchCommand:function(w,$,k,P){var z=Se(w,$,P,k);if(!z.full&&!z.partial)return{type:"none"};if(!z.full&&z.partial)return{type:"partial",expectLiteralNext:z.partial.length==1&&z.partial[0].keys.slice(-11)=="<character>"};for(var H,q=0;q<z.full.length;q++){var J=z.full[q];H||(H=J)}if(H.keys.slice(-11)=="<character>"||H.keys.slice(-10)=="<register>"){var Q=Re(w);if(!Q||Q.length>1)return{type:"clear"};k.selectedCharacter=Q}return{type:"full",command:H}},processCommand:function(w,$,k){switch($.inputState.repeatOverride=k.repeatOverride,k.type){case"motion":this.processMotion(w,$,k);break;case"operator":this.processOperator(w,$,k);break;case"operatorMotion":this.processOperatorMotion(w,$,k);break;case"action":this.processAction(w,$,k);break;case"search":this.processSearch(w,$,k);break;case"ex":case"keyToEx":this.processEx(w,$,k);break}},processMotion:function(w,$,k){$.inputState.motion=k.motion,$.inputState.motionArgs=ne(k.motionArgs),this.evalInput(w,$)},processOperator:function(w,$,k){var P=$.inputState;if(P.operator){if(P.operator==k.operator){P.motion="expandToLine",P.motionArgs={linewise:!0},this.evalInput(w,$);return}A(w)}P.operator=k.operator,P.operatorArgs=ne(k.operatorArgs),k.keys.length>1&&(P.operatorShortcut=k.keys),k.exitVisualBlock&&($.visualBlock=!1,Hn(w)),$.visualMode&&this.evalInput(w,$)},processOperatorMotion:function(w,$,k){var P=$.visualMode,z=ne(k.operatorMotionArgs);z&&P&&z.visualLine&&($.visualLine=!0),this.processOperator(w,$,k),P||this.processMotion(w,$,k)},processAction:function(w,$,k){var P=$.inputState,z=P.getRepeat(),H=!!z,q=ne(k.actionArgs)||{};P.selectedCharacter&&(q.selectedCharacter=P.selectedCharacter),k.operator&&this.processOperator(w,$,k),k.motion&&this.processMotion(w,$,k),(k.motion||k.operator)&&this.evalInput(w,$),q.repeat=z||1,q.repeatIsExplicit=H,q.registerName=P.registerName,A(w),$.lastMotion=null,k.isEdit&&this.recordLastEdit($,P,k),Zn[k.action](w,q,$)},processSearch:function(w,$,k){function P(Ne,et,vt){Ye.searchHistoryController.pushInput(Ne),Ye.searchHistoryController.reset();try{xn(w,Ne,et,vt)}catch{Ft(w,"Invalid regex: "+Ne),A(w);return}Fi.processMotion(w,$,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:k.searchArgs.toJumplist}})}function z(Ne){P(Ne,!0,!0);var et=Ye.macroModeState;et.isRecording&&qo(et,Ne)}function H(Ne,et,vt){var lt=B(Ne),ht,On;lt=="<Up>"||lt=="<Down>"?(ht=lt=="<Up>",On=Ne.target?Ne.target.selectionEnd:0,et=Ye.searchHistoryController.nextMatch(et,ht)||"",vt(et),On&&Ne.target&&(Ne.target.selectionEnd=Ne.target.selectionStart=Math.min(On,Ne.target.value.length))):lt&&lt!="<Left>"&&lt!="<Right>"&&Ye.searchHistoryController.reset();var Tt;try{Tt=xn(w,et,!0,!0)}catch{}Tt?w.scrollIntoView(sr(w,!J,Tt),30):(bi(w),w.scrollTo(we.left,we.top))}function q(Ne,et,vt){var lt=B(Ne);lt=="<Esc>"||lt=="<C-c>"||lt=="<C-[>"||lt=="<BS>"&&et==""?(Ye.searchHistoryController.pushInput(et),Ye.searchHistoryController.reset(),xn(w,he),bi(w),w.scrollTo(we.left,we.top),He.e_stop(Ne),A(w),vt(),w.focus()):lt=="<Up>"||lt=="<Down>"?He.e_stop(Ne):lt=="<C-u>"&&(He.e_stop(Ne),vt(""))}if(w.getSearchCursor){var J=k.searchArgs.forward,Q=k.searchArgs.wholeWordOnly;Ln(w).setReversed(!J);var se=J?"/":"?",he=Ln(w).getQuery(),we=w.getScrollInfo();switch(k.searchArgs.querySrc){case"prompt":var Ae=Ye.macroModeState;if(Ae.isPlaying){var Pe=Ae.replaySearchQueries.shift();P(Pe,!0,!1)}else xr(w,{onClose:z,prefix:se,desc:"(JavaScript regexp)",onKeyUp:H,onKeyDown:q});break;case"wordUnderCursor":var be=Yn(w,{noSymbol:!0}),Ce=!0;if(be||(be=Yn(w,{noSymbol:!1}),Ce=!1),!be){Ft(w,"No word under cursor"),A(w);return}var Pe=w.getLine(be.start.line).substring(be.start.ch,be.end.ch);Ce&&Q?Pe="\\b"+Pe+"\\b":Pe=mn(Pe),Ye.jumpList.cachedCursor=w.getCursor(),w.setCursor(be.start),P(Pe,!0,!1)}}},processEx:function(w,$,k){function P(H){Ye.exCommandHistoryController.pushInput(H),Ye.exCommandHistoryController.reset(),Zr.processCommand(w,H),w.state.vim&&A(w)}function z(H,q,J){var Q=B(H),se,he;(Q=="<Esc>"||Q=="<C-c>"||Q=="<C-[>"||Q=="<BS>"&&q=="")&&(Ye.exCommandHistoryController.pushInput(q),Ye.exCommandHistoryController.reset(),He.e_stop(H),A(w),J(),w.focus()),Q=="<Up>"||Q=="<Down>"?(He.e_stop(H),se=Q=="<Up>",he=H.target?H.target.selectionEnd:0,q=Ye.exCommandHistoryController.nextMatch(q,se)||"",J(q),he&&H.target&&(H.target.selectionEnd=H.target.selectionStart=Math.min(he,H.target.value.length))):Q=="<C-u>"?(He.e_stop(H),J("")):Q&&Q!="<Left>"&&Q!="<Right>"&&Ye.exCommandHistoryController.reset()}k.type=="keyToEx"?Zr.processCommand(w,k.exArgs.input):$.visualMode?xr(w,{onClose:P,prefix:":",value:"'<,'>",onKeyDown:z,selectValueOnOpen:!1}):xr(w,{onClose:P,prefix:":",onKeyDown:z})},evalInput:function(w,$){var k=$.inputState,P=k.motion,z=k.motionArgs||{},H=k.operator,q=k.operatorArgs||{},J=k.registerName,Q=$.sel,se=Ue($.visualMode?ue(w,Q.head):w.getCursor("head")),he=Ue($.visualMode?ue(w,Q.anchor):w.getCursor("anchor")),we=Ue(se),Ae=Ue(he),be,Ce,Pe;if(H&&this.recordLastEdit($,k),k.repeatOverride!==void 0?Pe=k.repeatOverride:Pe=k.getRepeat(),Pe>0&&z.explicitRepeat?z.repeatIsExplicit=!0:(z.noRepeat||!z.explicitRepeat&&Pe===0)&&(Pe=1,z.repeatIsExplicit=!1),k.selectedCharacter&&(z.selectedCharacter=q.selectedCharacter=k.selectedCharacter),z.repeat=Pe,A(w),P){var Ne=jn[P](w,se,z,$,k);if($.lastMotion=jn[P],!Ne)return;if(z.toJumplist){!H&&w.ace.curOp!=null&&(w.ace.curOp.command.scrollIntoView="center-animate");var et=Ye.jumpList,vt=et.cachedCursor;vt?(si(w,vt,Ne),delete et.cachedCursor):si(w,se,Ne)}Ne instanceof Array?(Ce=Ne[0],be=Ne[1]):be=Ne,be||(be=Ue(se)),$.visualMode?((!$.visualBlock||be.ch!==1/0)&&(be=ue(w,be,we)),Ce&&(Ce=ue(w,Ce)),Ce=Ce||Ae,Q.anchor=Ce,Q.head=be,Hn(w),Sr(w,$,"<",ft(Ce,be)?Ce:be),Sr(w,$,">",ft(Ce,be)?be:Ce)):H||(w.ace.curOp&&(w.ace.curOp.vimDialogScroll="center-animate"),be=ue(w,be,we),w.setCursor(be.line,be.ch))}if(H){if(q.lastSel){Ce=Ae;var lt=q.lastSel,ht=Math.abs(lt.head.line-lt.anchor.line),On=Math.abs(lt.head.ch-lt.anchor.ch);lt.visualLine?be=new Fe(Ae.line+ht,Ae.ch):lt.visualBlock?be=new Fe(Ae.line+ht,Ae.ch+On):lt.head.line==lt.anchor.line?be=new Fe(Ae.line,Ae.ch+On):be=new Fe(Ae.line+ht,Ae.ch),$.visualMode=!0,$.visualLine=lt.visualLine,$.visualBlock=lt.visualBlock,Q=$.sel={anchor:Ce,head:be},Hn(w)}else $.visualMode&&(q.lastSel={anchor:Ue(Q.anchor),head:Ue(Q.head),visualBlock:$.visualBlock,visualLine:$.visualLine});var Tt,en,Ot,Rt,gr;if($.visualMode){Tt=We(Q.head,Q.anchor),en=Ie(Q.head,Q.anchor),Ot=$.visualLine||q.linewise,Rt=$.visualBlock?"block":Ot?"line":"char";var _r=v(w,Tt,en);if(gr=Kn(w,{anchor:_r.start,head:_r.end},Rt),Ot){var Bn=gr.ranges;if(Rt=="block")for(var G=0;G<Bn.length;G++)Bn[G].head.ch=dt(w,Bn[G].head.line);else Rt=="line"&&(Bn[0].head=new Fe(Bn[0].head.line+1,0))}}else{if(Tt=Ue(Ce||Ae),en=Ue(be||we),ft(en,Tt)){var Z=Tt;Tt=en,en=Z}Ot=z.linewise||q.linewise,Ot?ir(w,Tt,en):z.forward&&Dn(w,Tt,en),Rt="char";var ae=!z.inclusive||Ot,_r=v(w,Tt,en);gr=Kn(w,{anchor:_r.start,head:_r.end},Rt,ae)}w.setSelections(gr.ranges,gr.primary),$.lastMotion=null,q.repeat=Pe,q.registerName=J,q.linewise=Ot;var ce=gs[H](w,q,gr.ranges,Ae,be);$.visualMode&&wn(w,ce!=null),ce&&w.setCursor(ce)}},recordLastEdit:function(w,$,k){var P=Ye.macroModeState;P.isPlaying||(w.lastEditInputState=$,w.lastEditActionCommand=k,P.lastInsertModeChanges.changes=[],P.lastInsertModeChanges.expectCursorActivityForChange=!1,P.lastInsertModeChanges.visualBlock=w.visualBlock?w.sel.head.line-w.sel.anchor.line:0)}},jn={moveToTopLine:function(w,$,k){var P=Ki(w).top+k.repeat-1;return new Fe(P,on(w.getLine(P)))},moveToMiddleLine:function(w){var $=Ki(w),k=Math.floor(($.top+$.bottom)*.5);return new Fe(k,on(w.getLine(k)))},moveToBottomLine:function(w,$,k){var P=Ki(w).bottom-k.repeat+1;return new Fe(P,on(w.getLine(P)))},expandToLine:function(w,$,k){var P=$;return new Fe(P.line+k.repeat-1,1/0)},findNext:function(w,$,k){var P=Ln(w),z=P.getQuery();if(z){var H=!k.forward;return H=P.isReversed()?!H:H,bo(w,z),sr(w,H,z,k.repeat)}},findAndSelectNextInclusive:function(w,$,k,P,z){var H=Ln(w),q=H.getQuery();if(q){var J=!k.forward;J=H.isReversed()?!J:J;var Q=Nr(w,J,q,k.repeat,P);if(Q){if(z.operator)return Q;var se=Q[0],he=new Fe(Q[1].line,Q[1].ch-1);if(P.visualMode){(P.visualLine||P.visualBlock)&&(P.visualLine=!1,P.visualBlock=!1,He.signal(w,"vim-mode-change",{mode:"visual",subMode:""}));var we=P.sel.anchor;if(we)return H.isReversed()?k.forward?[we,se]:[we,he]:k.forward?[we,he]:[we,se]}else P.visualMode=!0,P.visualLine=!1,P.visualBlock=!1,He.signal(w,"vim-mode-change",{mode:"visual",subMode:""});return J?[he,se]:[se,he]}}},goToMark:function(w,$,k,P){var z=ci(w,P,k.selectedCharacter);return z?k.linewise?{line:z.line,ch:on(w.getLine(z.line))}:z:null},moveToOtherHighlightedEnd:function(w,$,k,P){if(P.visualBlock&&k.sameLine){var z=P.sel;return[ue(w,new Fe(z.anchor.line,z.head.ch)),ue(w,new Fe(z.head.line,z.anchor.ch))]}return[P.sel.head,P.sel.anchor]},jumpToMark:function(w,$,k,P){for(var z=$,H=0;H<k.repeat;H++){var q=z;for(var J in P.marks)if(c(J)){var Q=P.marks[J].find(),se=k.forward?ft(Q,q):ft(q,Q);if(!se&&!(k.linewise&&Q.line==q.line)){var he=Xe(q,z),we=k.forward?Mt(q,Q,z):Mt(z,Q,q);(he||we)&&(z=Q)}}}return k.linewise&&(z=new Fe(z.line,on(w.getLine(z.line)))),z},moveByCharacters:function(w,$,k){var P=$,z=k.repeat,H=k.forward?P.ch+z:P.ch-z;return new Fe(P.line,H)},moveByLines:function(w,$,k,P){var z=$,H=z.ch;switch(P.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:H=P.lastHPos;break;default:P.lastHPos=H}var q=k.repeat+(k.repeatOffset||0),J=k.forward?z.line+q:z.line-q,Q=w.firstLine(),se=w.lastLine();if(J<Q&&z.line==Q)return this.moveToStartOfLine(w,$,k,P);if(J>se&&z.line==se)return qi(w,$,k,P,!0);var he=w.ace.session.getFoldLine(J);return he&&(k.forward?J>he.start.row&&(J=he.end.row+1):J=he.start.row),k.toFirstChar&&(H=on(w.getLine(J)),P.lastHPos=H),P.lastHSPos=w.charCoords(new Fe(J,H),"div").left,new Fe(J,H)},moveByDisplayLines:function(w,$,k,P){var z=$;switch(P.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:P.lastHSPos=w.charCoords(z,"div").left}var H=k.repeat,Q=w.findPosV(z,k.forward?H:-H,"line",P.lastHSPos);if(Q.hitSide)if(k.forward)var q=w.charCoords(Q,"div"),J={top:q.top+8,left:P.lastHSPos},Q=w.coordsChar(J,"div");else{var se=w.charCoords(new Fe(w.firstLine(),0),"div");se.left=P.lastHSPos,Q=w.coordsChar(se,"div")}return P.lastHPos=Q.ch,Q},moveByPage:function(w,$,k){var P=$,z=k.repeat;return w.findPosV(P,k.forward?z:-z,"page")},moveByParagraph:function(w,$,k){var P=k.forward?1:-1;return Or(w,$,k.repeat,P)},moveBySentence:function(w,$,k){var P=k.forward?1:-1;return ai(w,$,k.repeat,P)},moveByScroll:function(w,$,k,P){var z=w.getScrollInfo(),H=null,q=k.repeat;q||(q=z.clientHeight/(2*w.defaultTextHeight()));var J=w.charCoords($,"local");if(k.repeat=q,H=jn.moveByDisplayLines(w,$,k,P),!H)return null;var Q=w.charCoords(H,"local");return w.scrollTo(null,z.top+Q.top-J.top),H},moveByWords:function(w,$,k){return wr(w,$,k.repeat,!!k.forward,!!k.wordEnd,!!k.bigWord)},moveTillCharacter:function(w,$,k){var P=k.repeat,z=Li(w,P,k.forward,k.selectedCharacter,$),H=k.forward?-1:1;return hr(H,k),z?(z.ch+=H,z):null},moveToCharacter:function(w,$,k){var P=k.repeat;return hr(0,k),Li(w,P,k.forward,k.selectedCharacter,$)||$},moveToSymbol:function(w,$,k){var P=k.repeat;return Xn(w,P,k.forward,k.selectedCharacter)||$},moveToColumn:function(w,$,k,P){var z=k.repeat;return P.lastHPos=z-1,P.lastHSPos=w.charCoords($,"div").left,fs(w,z)},moveToEol:function(w,$,k,P){return qi(w,$,k,P,!1)},moveToFirstNonWhiteSpaceCharacter:function(w,$){var k=$;return new Fe(k.line,on(w.getLine(k.line)))},moveToMatchedSymbol:function(w,$){for(var k=$,P=k.line,z=k.ch,H=w.getLine(P),q;z<H.length;z++)if(q=H.charAt(z),q&&p(q)){var J=w.getTokenTypeAt(new Fe(P,z+1));if(J!=="string"&&J!=="comment")break}if(z<H.length){var Q=/[<>]/.test(H[z])?/[(){}[\]<>]/:/[(){}[\]]/,se=w.findMatchingBracket(new Fe(P,z+1),{bracketRegex:Q});return se.to}return k},moveToStartOfLine:function(w,$){return new Fe($.line,0)},moveToLineOrEdgeOfDocument:function(w,$,k){var P=k.forward?w.lastLine():w.firstLine();return k.repeatIsExplicit&&(P=k.repeat-w.getOption("firstLineNumber")),new Fe(P,on(w.getLine(P)))},moveToStartOfDisplayLine:function(w){return w.execCommand("goLineLeft"),w.getCursor()},moveToEndOfDisplayLine:function(w){w.execCommand("goLineRight");var $=w.getCursor();return $.sticky=="before"&&$.ch--,$},textObjectManipulation:function(w,$,k,P){var z={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},H={"'":!0,'"':!0,"`":!0},q=k.selectedCharacter;q=="b"?q="(":q=="B"&&(q="{");var J=!k.textObjectInner,Q,se;if(z[q]){if(se=!0,Q=Mn(w,$,q,J),!Q){var he=w.getSearchCursor(new RegExp("\\"+q,"g"),$);he.find()&&(Q=Mn(w,he.from(),q,J))}}else if(H[q])se=!0,Q=qr(w,$,q,J);else if(q==="W"||q==="w")for(var we=k.repeat||1;we-- >0;){var Ae=Yn(w,{inclusive:J,innerWord:!J,bigWord:q==="W",noSymbol:q==="W",multiline:!0},Q&&Q.end);Ae&&(Q||(Q=Ae),Q.end=Ae.end)}else if(q==="p")if(Q=Or(w,$,k.repeat,0,J),k.linewise=!0,P.visualMode)P.visualLine||(P.visualLine=!0);else{var be=P.inputState.operatorArgs;be&&(be.linewise=!0),Q.end.line--}else if(q==="t")Q=Ii(w,$,J);else if(q==="s"){var Ce=w.getLine($.line);$.ch>0&&y(Ce[$.ch])&&($.ch-=1);var Pe=mi(w,$,k.repeat,1,J),Ne=mi(w,$,k.repeat,-1,J);m(w.getLine(Ne.line)[Ne.ch])&&m(w.getLine(Pe.line)[Pe.ch-1])&&(Ne={line:Ne.line,ch:Ne.ch+1}),Q={start:Ne,end:Pe}}return Q?w.state.vim.visualMode?In(w,Q.start,Q.end,se):[Q.start,Q.end]:null},repeatLastCharacterSearch:function(w,$,k){var P=Ye.lastCharacterSearch,z=k.repeat,H=k.forward===P.forward,q=(P.increment?1:0)*(H?-1:1);w.moveH(-q,"char"),k.inclusive=!!H;var J=Li(w,z,H,P.selectedCharacter);return J?(J.ch+=q,J):(w.moveH(q,"char"),$)}},gs={change:function(w,$,k){var P,z,H=w.state.vim,q=k[0].anchor,J=k[0].head;if(H.visualMode)if($.fullLine)J.ch=Number.MAX_VALUE,J.line--,w.setSelection(q,J),z=w.getSelection(),w.replaceSelection(""),P=q;else{z=w.getSelection();var Q=oe("",k.length);w.replaceSelections(Q),P=We(k[0].head,k[0].anchor)}else{z=w.getRange(q,J);var se=H.lastEditInputState||{};if(se.motion=="moveByWords"&&!m(z)){var he=/\s+$/.exec(z);he&&se.motionArgs&&se.motionArgs.forward&&(J=fe(J,0,-he[0].length),z=z.slice(0,-he[0].length))}$.linewise&&(q=new Fe(q.line,on(w.getLine(q.line))),J.line>q.line&&(J=new Fe(J.line-1,Number.MAX_VALUE))),w.replaceRange("",q,J),P=q}Ye.registerController.pushText($.registerName,"change",z,$.linewise,k.length>1),Zn.enterInsertMode(w,{head:P},w.state.vim)},delete:function(w,$,k){var P,z,H=w.state.vim;if(H.visualBlock){z=w.getSelection();var q=oe("",k.length);w.replaceSelections(q),P=We(k[0].head,k[0].anchor)}else{var J=k[0].anchor,Q=k[0].head;$.linewise&&Q.line!=w.firstLine()&&J.line==w.lastLine()&&J.line==Q.line-1&&(J.line==w.firstLine()?J.ch=0:J=new Fe(J.line-1,dt(w,J.line-1))),z=w.getRange(J,Q),w.replaceRange("",J,Q),P=J,$.linewise&&(P=jn.moveToFirstNonWhiteSpaceCharacter(w,J))}return Ye.registerController.pushText($.registerName,"delete",z,$.linewise,H.visualBlock),ue(w,P)},indent:function(w,$,k){var P=w.state.vim,z=P.visualMode?$.repeat:1;if(P.visualBlock){for(var H=w.getOption("tabSize"),q=w.getOption("indentWithTabs")?" ":" ".repeat(H),J,Q=k.length-1;Q>=0;Q--)if(J=We(k[Q].anchor,k[Q].head),$.indentRight)w.replaceRange(q.repeat(z),J,J);else{for(var se=w.getLine(J.line),he=0,we=0;we<z;we++){var Ae=se[J.ch+he];if(Ae==" ")he++;else{if(Ae!=" ")break;he++;for(var be=1;be<q.length&&(Ae=se[J.ch+he],Ae===" ");be++)he++}}w.replaceRange("",J,fe(J,0,he))}return J}if(w.indentMore)for(var we=0;we<z;we++)$.indentRight?w.indentMore():w.indentLess();else{var Ce=k[0].anchor.line,Pe=P.visualBlock?k[k.length-1].anchor.line:k[0].head.line;$.linewise&&Pe--;for(var Q=Ce;Q<=Pe;Q++)for(var we=0;we<z;we++)w.indentLine(Q,$.indentRight)}return jn.moveToFirstNonWhiteSpaceCharacter(w,k[0].anchor)},indentAuto:function(w,$,k){return w.execCommand("indentAuto"),jn.moveToFirstNonWhiteSpaceCharacter(w,k[0].anchor)},hardWrap:function(w,$,k,P,z){if(w.hardWrap){var H=k[0].anchor.line,q=k[0].head.line;$.linewise&&q--;var J=w.hardWrap({from:H,to:q});return J>H&&$.linewise&&J--,$.keepCursor?P:new Fe(J,0)}},changeCase:function(w,$,k,P,z){for(var H=w.getSelections(),q=[],J=$.toLower,Q=0;Q<H.length;Q++){var se=H[Q],he="";if(J===!0)he=se.toLowerCase();else if(J===!1)he=se.toUpperCase();else for(var we=0;we<se.length;we++){var Ae=se.charAt(we);he+=h(Ae)?Ae.toLowerCase():Ae.toUpperCase()}q.push(he)}return w.replaceSelections(q),$.shouldMoveCursor?z:!w.state.vim.visualMode&&$.linewise&&k[0].anchor.line+1==k[0].head.line?jn.moveToFirstNonWhiteSpaceCharacter(w,P):$.linewise?P:We(k[0].anchor,k[0].head)},yank:function(w,$,k,P){var z=w.state.vim,H=w.getSelection(),q=z.visualMode?We(z.sel.anchor,z.sel.head,k[0].head,k[0].anchor):P;return Ye.registerController.pushText($.registerName,"yank",H,$.linewise,z.visualBlock),q}},Zn={jumpListWalk:function(w,$,k){if(!k.visualMode){var P=$.repeat,z=$.forward,H=Ye.jumpList,q=H.move(w,z?P:-P),J=q?q.find():void 0;J=J||w.getCursor(),w.setCursor(J),w.ace.curOp.command.scrollIntoView="center-animate"}},scroll:function(w,$,k){if(!k.visualMode){var P=$.repeat||1,z=w.defaultTextHeight(),H=w.getScrollInfo().top,q=z*P,J=$.forward?H+q:H-q,Q=Ue(w.getCursor()),se=w.charCoords(Q,"local");if($.forward)J>se.top?(Q.line+=(J-se.top)/z,Q.line=Math.ceil(Q.line),w.setCursor(Q),se=w.charCoords(Q,"local"),w.scrollTo(null,se.top)):w.scrollTo(null,J);else{var he=J+w.getScrollInfo().clientHeight;he<se.bottom?(Q.line-=(se.bottom-he)/z,Q.line=Math.floor(Q.line),w.setCursor(Q),se=w.charCoords(Q,"local"),w.scrollTo(null,se.bottom-w.getScrollInfo().clientHeight)):w.scrollTo(null,J)}}},scrollToCursor:function(w,$){var k=w.getCursor().line,P=w.charCoords(new Fe(k,0),"local"),z=w.getScrollInfo().clientHeight,H=P.top;switch($.position){case"center":H=P.bottom-z/2;break;case"bottom":var q=new Fe(k,w.getLine(k).length-1),J=w.charCoords(q,"local"),Q=J.bottom-H;H=H-z+Q}w.scrollTo(null,H)},replayMacro:function(w,$,k){var P=$.selectedCharacter,z=$.repeat,H=Ye.macroModeState;for(P=="@"?P=H.latestRegister:H.latestRegister=P;z--;)wi(w,k,H,P)},enterMacroRecordMode:function(w,$){var k=Ye.macroModeState,P=$.selectedCharacter;Ye.registerController.isValidRegister(P)&&k.enterMacroRecordMode(w,P)},toggleOverwrite:function(w){w.state.overwrite?(w.toggleOverwrite(!1),w.setOption("keyMap","vim-insert"),He.signal(w,"vim-mode-change",{mode:"insert"})):(w.toggleOverwrite(!0),w.setOption("keyMap","vim-replace"),He.signal(w,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(w,$,k){if(!w.getOption("readOnly")){k.insertMode=!0,k.insertModeRepeat=$&&$.repeat||1;var P=$?$.insertAt:null,z=k.sel,H=$.head||w.getCursor("head"),q=w.listSelections().length;if(P=="eol")H=new Fe(H.line,dt(w,H.line));else if(P=="bol")H=new Fe(H.line,0);else if(P=="charAfter"){var J=v(w,H,fe(H,0,1));H=J.end}else if(P=="firstNonBlank"){var J=v(w,H,jn.moveToFirstNonWhiteSpaceCharacter(w,H));H=J.end}else if(P=="startOfSelectedArea"){if(!k.visualMode)return;k.visualBlock?(H=new Fe(Math.min(z.head.line,z.anchor.line),Math.min(z.head.ch,z.anchor.ch)),q=Math.abs(z.head.line-z.anchor.line)+1):z.head.line<z.anchor.line?H=z.head:H=new Fe(z.anchor.line,0)}else if(P=="endOfSelectedArea"){if(!k.visualMode)return;k.visualBlock?(H=new Fe(Math.min(z.head.line,z.anchor.line),Math.max(z.head.ch,z.anchor.ch)+1),q=Math.abs(z.head.line-z.anchor.line)+1):z.head.line>=z.anchor.line?H=fe(z.head,0,1):H=new Fe(z.anchor.line,0)}else if(P=="inplace"){if(k.visualMode)return}else P=="lastEdit"&&(H=Yi(w)||H);w.setOption("disableInput",!1),$&&$.replace?(w.toggleOverwrite(!0),w.setOption("keyMap","vim-replace"),He.signal(w,"vim-mode-change",{mode:"replace"})):(w.toggleOverwrite(!1),w.setOption("keyMap","vim-insert"),He.signal(w,"vim-mode-change",{mode:"insert"})),Ye.macroModeState.isPlaying||(w.on("change",Do),k.insertEnd&&k.insertEnd.clear(),k.insertEnd=w.setBookmark(H,{insertLeft:!0}),He.on(w.getInputField(),"keydown",Zi)),k.visualMode&&wn(w),Rn(w,H,q)}},toggleVisualMode:function(w,$,k){var P=$.repeat,z=w.getCursor(),H;if(k.visualMode)k.visualLine^$.linewise||k.visualBlock^$.blockwise?(k.visualLine=!!$.linewise,k.visualBlock=!!$.blockwise,He.signal(w,"vim-mode-change",{mode:"visual",subMode:k.visualLine?"linewise":k.visualBlock?"blockwise":""}),Hn(w)):wn(w);else{k.visualMode=!0,k.visualLine=!!$.linewise,k.visualBlock=!!$.blockwise,H=ue(w,new Fe(z.line,z.ch+P-1));var q=v(w,z,H);k.sel={anchor:q.start,head:q.end},He.signal(w,"vim-mode-change",{mode:"visual",subMode:k.visualLine?"linewise":k.visualBlock?"blockwise":""}),Hn(w),Sr(w,k,"<",We(z,H)),Sr(w,k,">",Ie(z,H))}},reselectLastSelection:function(w,$,k){var P=k.lastSelection;if(k.visualMode&&Pt(w,k),P){var z=P.anchorMark.find(),H=P.headMark.find();if(!z||!H)return;k.sel={anchor:z,head:H},k.visualMode=!0,k.visualLine=P.visualLine,k.visualBlock=P.visualBlock,Hn(w),Sr(w,k,"<",We(z,H)),Sr(w,k,">",Ie(z,H)),He.signal(w,"vim-mode-change",{mode:"visual",subMode:k.visualLine?"linewise":k.visualBlock?"blockwise":""})}},joinLines:function(w,$,k){var P,z;if(k.visualMode){if(P=w.getCursor("anchor"),z=w.getCursor("head"),ft(z,P)){var H=z;z=P,P=H}z.ch=dt(w,z.line)-1}else{var q=Math.max($.repeat,2);P=w.getCursor(),z=ue(w,new Fe(P.line+q-1,1/0))}for(var J=0,Q=P.line;Q<z.line;Q++){J=dt(w,P.line);var se="",he=0;if(!$.keepSpaces){var we=w.getLine(P.line+1);he=we.search(/\S/),he==-1?he=we.length:se=" "}w.replaceRange(se,new Fe(P.line,J),new Fe(P.line+1,he))}var Ae=ue(w,new Fe(P.line,J));k.visualMode&&wn(w,!1),w.setCursor(Ae)},newLineAndEnterInsertMode:function(w,$,k){k.insertMode=!0;var P=Ue(w.getCursor());if(P.line===w.firstLine()&&!$.after)w.replaceRange(`
1442
+ `,new Fe(w.firstLine(),0)),w.setCursor(w.firstLine(),0);else{P.line=$.after?P.line:P.line-1,P.ch=dt(w,P.line),w.setCursor(P);var z=He.commands.newlineAndIndentContinueComment||He.commands.newlineAndIndent;z(w)}this.enterInsertMode(w,{repeat:$.repeat},k)},paste:function(w,$,k){var P=this,z=Ye.registerController.getRegister($.registerName),H=function(){var q=z.toString();P.continuePaste(w,$,k,q,z)};$.registerName==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"?navigator.clipboard.readText().then(function(q){P.continuePaste(w,$,k,q,z)},function(){H()}):H()},continuePaste:function(w,$,k,P,z){var H=Ue(w.getCursor());if(P){if($.matchIndent){var q=w.getOption("tabSize"),J=function(Bn){var G=Bn.split(" ").length-1,Z=Bn.split(" ").length-1;return G*q+Z*1},Q=w.getLine(w.getCursor().line),se=J(Q.match(/^\s*/)[0]),he=P.replace(/\n$/,""),we=P!==he,Ae=J(P.match(/^\s*/)[0]),P=he.replace(/^\s*/gm,function(Bn){var G=se+(J(Bn)-Ae);if(G<0)return"";if(w.getOption("indentWithTabs")){var Z=Math.floor(G/q);return Array(Z+1).join(" ")}return Array(G+1).join(" ")});P+=we?`
1443
+ `:""}if($.repeat>1)var P=Array($.repeat+1).join(P);var be=z.linewise,Ce=z.blockwise;if(Ce){P=P.split(`
1444
+ `),be&&P.pop();for(var Pe=0;Pe<P.length;Pe++)P[Pe]=P[Pe]==""?" ":P[Pe];H.ch+=$.after?1:0,H.ch=Math.min(dt(w,H.line),H.ch)}else be?k.visualMode?P=k.visualLine?P.slice(0,-1):`
1445
+ `+P.slice(0,P.length-1)+`
1446
+ `:$.after?(P=`
1447
+ `+P.slice(0,P.length-1),H.ch=dt(w,H.line)):H.ch=0:H.ch+=$.after?1:0;var Ne;if(k.visualMode){k.lastPastedText=P;var et,vt=Ze(w,k),lt=vt[0],ht=vt[1],On=w.getSelection(),Tt=w.listSelections(),en=new Array(Tt.length).join("1").split("1");k.lastSelection&&(et=k.lastSelection.headMark.find()),Ye.registerController.unnamedRegister.setText(On),Ce?(w.replaceSelections(en),ht=new Fe(lt.line+P.length-1,lt.ch),w.setCursor(lt),Bt(w,ht),w.replaceSelections(P),Ne=lt):k.visualBlock?(w.replaceSelections(en),w.setCursor(lt),w.replaceRange(P,lt,lt),Ne=lt):(w.replaceRange(P,lt,ht),Ne=w.posFromIndex(w.indexFromPos(lt)+P.length-1)),et&&(k.lastSelection.headMark=w.setBookmark(et)),be&&(Ne.ch=0)}else if(Ce){w.setCursor(H);for(var Pe=0;Pe<P.length;Pe++){var Ot=H.line+Pe;Ot>w.lastLine()&&w.replaceRange(`
1448
+ `,new Fe(Ot,0));var Rt=dt(w,Ot);Rt<H.ch&&rr(w,Ot,H.ch)}w.setCursor(H),Bt(w,new Fe(H.line+P.length-1,H.ch)),w.replaceSelections(P),Ne=H}else if(w.replaceRange(P,H),be){var Ot=$.after?H.line+1:H.line;Ne=new Fe(Ot,on(w.getLine(Ot)))}else Ne=Ue(H),/\n/.test(P)||(Ne.ch+=P.length-($.after?1:0));k.visualMode&&wn(w,!1),w.setCursor(Ne)}},undo:function(w,$){w.operation(function(){Ve(w,He.commands.undo,$.repeat)(),w.setCursor(ue(w,w.getCursor("start")))})},redo:function(w,$){Ve(w,He.commands.redo,$.repeat)()},setRegister:function(w,$,k){k.inputState.registerName=$.selectedCharacter},insertRegister:function(w,$,k){var P=$.selectedCharacter,z=Ye.registerController.getRegister(P),H=z&&z.toString();H&&w.replaceSelection(H)},oneNormalCommand:function(w,$,k){dr(w,!0),k.insertModeReturn=!0,He.on(w,"vim-command-done",function P(){k.visualMode||(k.insertModeReturn&&(k.insertModeReturn=!1,k.insertMode||Zn.enterInsertMode(w,{},k)),He.off(w,"vim-command-done",P))})},setMark:function(w,$,k){var P=$.selectedCharacter;Sr(w,k,P,w.getCursor())},replace:function(w,$,k){var P=$.selectedCharacter,z=w.getCursor(),H,q,J=w.listSelections();if(k.visualMode)z=w.getCursor("start"),q=w.getCursor("end");else{var Q=w.getLine(z.line);H=z.ch+$.repeat,H>Q.length&&(H=Q.length),q=new Fe(z.line,H)}var se=v(w,z,q);if(z=se.start,q=se.end,P==`
1449
+ `)k.visualMode||w.replaceRange("",z,q),(He.commands.newlineAndIndentContinueComment||He.commands.newlineAndIndent)(w);else{var he=w.getRange(z,q);if(he=he.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,P),he=he.replace(/[^\n]/g,P),k.visualBlock){var we=new Array(w.getOption("tabSize")+1).join(" ");he=w.getSelection(),he=he.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,P),he=he.replace(/\t/g,we).replace(/[^\n]/g,P).split(`
1450
+ `),w.replaceSelections(he)}else w.replaceRange(he,z,q);k.visualMode?(z=ft(J[0].anchor,J[0].head)?J[0].anchor:J[0].head,w.setCursor(z),wn(w,!1)):w.setCursor(fe(q,0,-1))}},incrementNumberToken:function(w,$){for(var k=w.getCursor(),P=w.getLine(k.line),z=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi,H,q,J,Q;(H=z.exec(P))!==null&&(q=H.index,J=q+H[0].length,!(k.ch<J)););if(!(!$.backtrack&&J<=k.ch)&&H){var se=H[2]||H[4],he=H[3]||H[5],we=$.increase?1:-1,Ae={"0b":2,0:8,"":10,"0x":16}[se.toLowerCase()],be=parseInt(H[1]+he,Ae)+we*$.repeat;Q=be.toString(Ae);var Ce=se?new Array(he.length-Q.length+1+H[1].length).join("0"):"";Q.charAt(0)==="-"?Q="-"+se+Ce+Q.substr(1):Q=se+Ce+Q;var Pe=new Fe(k.line,q),Ne=new Fe(k.line,J);w.replaceRange(Q,Pe,Ne),w.setCursor(new Fe(k.line,q+Q.length-1))}},repeatLastEdit:function(w,$,k){var P=k.lastEditInputState;if(P){var z=$.repeat;z&&$.repeatIsExplicit?k.lastEditInputState.repeatOverride=z:z=k.lastEditInputState.repeatOverride||z,Ko(w,k,z,!1)}},indent:function(w,$){w.indentLine(w.getCursor().line,$.indentRight)},exitInsertMode:dr},zi={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},ji={bracket:{isComplete:function(w){if(w.nextCh===w.symb){if(w.depth++,w.depth>=1)return!0}else w.nextCh===w.reverseSymb&&w.depth--;return!1}},section:{init:function(w){w.curMoveThrough=!0,w.symb=(w.forward?"]":"[")===w.symb?"{":"}"},isComplete:function(w){return w.index===0&&w.nextCh===w.symb}},comment:{isComplete:function(w){var $=w.lastCh==="*"&&w.nextCh==="/";return w.lastCh=w.nextCh,$}},method:{init:function(w){w.symb=w.symb==="m"?"{":"}",w.reverseSymb=w.symb==="{"?"}":"{"},isComplete:function(w){return w.nextCh===w.symb}},preprocess:{init:function(w){w.index=0},isComplete:function(w){if(w.nextCh==="#"){var $=w.lineText.match(/^#(\w+)/)[1];if($==="endif"){if(w.forward&&w.depth===0)return!0;w.depth++}else if($==="if"){if(!w.forward&&w.depth===0)return!0;w.depth--}if($==="else"&&w.depth===0)return!0}return!1}}};T("pcre",!0,"boolean"),Kr.prototype={getQuery:function(){return Ye.query},setQuery:function(w){Ye.query=w},getOverlay:function(){return this.searchOverlay},setOverlay:function(w){this.searchOverlay=w},isReversed:function(){return Ye.isReversed},setReversed:function(w){Ye.isReversed=w},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(w){this.annotate=w}};var no={"\\n":`
1451
+ `,"\\r":"\r","\\t":" "},Zs={"\\/":"/","\\\\":"\\","\\n":`
1452
+ `,"\\r":"\r","\\t":" ","\\&":"&"},hn=0,Wa=function(){this.buildCommandMap_()};Wa.prototype={processCommand:function(w,$,k){var P=this;w.operation(function(){w.curOp.isVimOp=!0,P._processCommand(w,$,k)})},_processCommand:function(w,$,k){var P=w.state.vim,z=Ye.registerController.getRegister(":"),H=z.toString(),q=new He.StringStream($);z.setText($);var J=k||{};J.input=$;try{this.parseInput_(w,q,J)}catch(he){throw Ft(w,he.toString()),he}P.visualMode&&wn(w);var Q,se;if(!J.commandName)J.line!==void 0&&(se="move");else if(Q=this.matchCommand_(J.commandName),Q){if(se=Q.name,Q.excludeFromCommandHistory&&z.setText(H),this.parseCommandArgs_(q,J,Q),Q.type=="exToKey"){I(w,Q.toKeys,Q);return}if(Q.type=="exToEx"){this.processCommand(w,Q.toInput);return}}if(!se){Ft(w,'Not an editor command ":'+$+'"');return}try{Cr[se](w,J),(!Q||!Q.possiblyAsync)&&J.callback&&J.callback()}catch(he){throw Ft(w,he.toString()),he}},parseInput_:function(w,$,k){if($.eatWhile(":"),$.eat("%")?(k.line=w.firstLine(),k.lineEnd=w.lastLine()):(k.line=this.parseLineSpec_(w,$),k.line!==void 0&&$.eat(",")&&(k.lineEnd=this.parseLineSpec_(w,$))),k.line==null)if(w.state.vim.visualMode){var P=ci(w,w.state.vim,"<");k.selectionLine=P&&P.line,P=ci(w,w.state.vim,">"),k.selectionLineEnd=P&&P.line}else k.selectionLine=w.getCursor().line;else k.selectionLine=k.line,k.selectionLineEnd=k.lineEnd;var z=$.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return z?k.commandName=z[1]:k.commandName=$.match(/.*/)[0],k},parseLineSpec_:function(w,$){var k=$.match(/^(\d+)/);if(k)return parseInt(k[1],10)-1;switch($.next()){case".":return this.parseLineSpecOffset_($,w.getCursor().line);case"$":return this.parseLineSpecOffset_($,w.lastLine());case"'":var P=$.next(),z=ci(w,w.state.vim,P);if(!z)throw new Error("Mark not set");return this.parseLineSpecOffset_($,z.line);case"-":case"+":return $.backUp(1),this.parseLineSpecOffset_($,w.getCursor().line);default:return $.backUp(1),void 0}},parseLineSpecOffset_:function(w,$){var k=w.match(/^([+-])?(\d+)/);if(k){var P=parseInt(k[2],10);k[1]=="-"?$-=P:$+=P}return $},parseCommandArgs_:function(w,$,k){if(!w.eol()){$.argString=w.match(/.*/)[0];var P=k.argDelimiter||/\s+/,z=tn($.argString).split(P);z.length&&z[0]&&($.args=z)}},matchCommand_:function(w){for(var $=w.length;$>0;$--){var k=w.substring(0,$);if(this.commandMap_[k]){var P=this.commandMap_[k];if(P.name.indexOf(w)===0)return P}}return null},buildCommandMap_:function(){this.commandMap_={};for(var w=0;w<_o.length;w++){var $=_o[w],k=$.shortName||$.name;this.commandMap_[k]=$}},map:function(w,$,k,P){if(w!=":"&&w.charAt(0)==":"){if(k)throw Error("Mode not supported for ex mappings");var z=w.substring(1);$!=":"&&$.charAt(0)==":"?this.commandMap_[z]={name:z,type:"exToEx",toInput:$.substring(1),user:!0}:this.commandMap_[z]={name:z,type:"exToKey",toKeys:$,user:!0}}else{var H={keys:w,type:"keyToKey",toKeys:$,noremap:!!P};k&&(H.context=k),Vn.unshift(H)}},unmap:function(w,$){if(w!=":"&&w.charAt(0)==":"){if($)throw Error("Mode not supported for ex mappings");var k=w.substring(1);if(this.commandMap_[k]&&this.commandMap_[k].user)return delete this.commandMap_[k],!0}else for(var P=w,z=0;z<Vn.length;z++)if(P==Vn[z].keys&&Vn[z].context===$)return Vn.splice(z,1),!0}};var Cr={colorscheme:function(w,$){if(!$.args||$.args.length<1){Ft(w,w.getOption("theme"));return}w.setOption("theme",$.args[0])},map:function(w,$,k,P){var z=$.args;if(!z||z.length<2){w&&Ft(w,"Invalid mapping: "+$.input);return}Zr.map(z[0],z[1],k,P)},imap:function(w,$){this.map(w,$,"insert")},nmap:function(w,$){this.map(w,$,"normal")},vmap:function(w,$){this.map(w,$,"visual")},omap:function(w,$){this.map(w,$,"operatorPending")},noremap:function(w,$){this.map(w,$,void 0,!0)},inoremap:function(w,$){this.map(w,$,"insert",!0)},nnoremap:function(w,$){this.map(w,$,"normal",!0)},vnoremap:function(w,$){this.map(w,$,"visual",!0)},onoremap:function(w,$){this.map(w,$,"operatorPending",!0)},unmap:function(w,$,k){var P=$.args;(!P||P.length<1||!Zr.unmap(P[0],k))&&w&&Ft(w,"No such mapping: "+$.input)},mapclear:function(w,$){$t.mapclear()},imapclear:function(w,$){$t.mapclear("insert")},nmapclear:function(w,$){$t.mapclear("normal")},vmapclear:function(w,$){$t.mapclear("visual")},omapclear:function(w,$){$t.mapclear("operatorPending")},move:function(w,$){Fi.processCommand(w,w.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:$.line+1})},set:function(w,$){var k=$.args,P=$.setCfg||{};if(!k||k.length<1){w&&Ft(w,"Invalid mapping: "+$.input);return}var z=k[0].split("="),H=z[0],q=z[1],J=!1,Q=!1;if(H.charAt(H.length-1)=="?"){if(q)throw Error("Trailing characters: "+$.argString);H=H.substring(0,H.length-1),J=!0}else H.charAt(H.length-1)=="!"&&(H=H.substring(0,H.length-1),Q=!0);q===void 0&&H.substring(0,2)=="no"&&(H=H.substring(2),q=!1);var se=Kt[H]&&Kt[H].type=="boolean";if(se&&(Q?q=!_(H,w,P):q==null&&(q=!0)),!se&&q===void 0||J){var he=_(H,w,P);he instanceof Error?Ft(w,he.message):he===!0||he===!1?Ft(w," "+(he?"":"no")+H):Ft(w," "+H+"="+he)}else{var we=S(H,q,w,P);we instanceof Error&&Ft(w,we.message)}},setlocal:function(w,$){$.setCfg={scope:"local"},this.set(w,$)},setglobal:function(w,$){$.setCfg={scope:"global"},this.set(w,$)},registers:function(w,$){var k=$.args,P=Ye.registerController.registers,z=`----------Registers----------
1453
+
1454
+ `;if(k){var H;k=k.join("");for(var q=0;q<k.length;q++)if(H=k.charAt(q),!!Ye.registerController.isValidRegister(H)){var J=P[H]||new j;z+='"'+H+" "+J.toString()+`
1455
+ `}}else for(var H in P){var Q=P[H].toString();Q.length&&(z+='"'+H+" "+Q+`
1456
+ `)}Ft(w,z)},sort:function(w,$){function k(){if($.argString){var Ot=new He.StringStream($.argString);if(Ot.eat("!")&&(H=!0),Ot.eol())return;if(!Ot.eatSpace())return"Invalid arguments";var Rt=Ot.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!Rt&&!Ot.eol())return"Invalid arguments";if(Rt[1]){q=Rt[1].indexOf("i")!=-1,J=Rt[1].indexOf("u")!=-1;var gr=Rt[1].indexOf("d")!=-1||Rt[1].indexOf("n")!=-1&&1,_r=Rt[1].indexOf("x")!=-1&&1,Bn=Rt[1].indexOf("o")!=-1&&1;if(gr+_r+Bn>1)return"Invalid arguments";Q=gr&&"decimal"||_r&&"hex"||Bn&&"octal"}Rt[2]&&(se=new RegExp(Rt[2].substr(1,Rt[2].length-2),q?"i":""))}}function P(Ot,Rt){if(H){var gr;gr=Ot,Ot=Rt,Rt=gr}q&&(Ot=Ot.toLowerCase(),Rt=Rt.toLowerCase());var _r=Q&&Ne.exec(Ot),Bn=Q&&Ne.exec(Rt);return _r?(_r=parseInt((_r[1]+_r[2]).toLowerCase(),et),Bn=parseInt((Bn[1]+Bn[2]).toLowerCase(),et),_r-Bn):Ot<Rt?-1:1}function z(Ot,Rt){if(H){var gr;gr=Ot,Ot=Rt,Rt=gr}return q&&(Ot[0]=Ot[0].toLowerCase(),Rt[0]=Rt[0].toLowerCase()),Ot[0]<Rt[0]?-1:1}var H,q,J,Q,se,he=k();if(he){Ft(w,he+": "+$.argString);return}var we=$.line||w.firstLine(),Ae=$.lineEnd||$.line||w.lastLine();if(we!=Ae){var be=new Fe(we,0),Ce=new Fe(Ae,dt(w,Ae)),Pe=w.getRange(be,Ce).split(`
1457
+ `),Ne=se||(Q=="decimal"?/(-?)([\d]+)/:Q=="hex"?/(-?)(?:0x)?([0-9a-f]+)/i:Q=="octal"?/([0-7]+)/:null),et=Q=="decimal"?10:Q=="hex"?16:Q=="octal"?8:null,vt=[],lt=[];if(Q||se)for(var ht=0;ht<Pe.length;ht++){var On=se?Pe[ht].match(se):null;On&&On[0]!=""?vt.push(On):!se&&Ne.exec(Pe[ht])?vt.push(Pe[ht]):lt.push(Pe[ht])}else lt=Pe;if(vt.sort(se?z:P),se)for(var ht=0;ht<vt.length;ht++)vt[ht]=vt[ht].input;else Q||lt.sort(P);if(Pe=H?vt.concat(lt):lt.concat(vt),J){var Tt=Pe,en;Pe=[];for(var ht=0;ht<Tt.length;ht++)Tt[ht]!=en&&Pe.push(Tt[ht]),en=Tt[ht]}w.replaceRange(Pe.join(`
1458
+ `),be,Ce)}},vglobal:function(w,$){this.global(w,$)},normal:function(w,$){var k=$.argString;if(k&&k[0]=="!"&&(k=k.slice(1),to=!0),k=k.trimStart(),!k){Ft(w,"Argument is required.");return}var P=$.line;if(typeof P=="number")for(var z=isNaN($.lineEnd)?P:$.lineEnd,H=P;H<=z;H++)w.setCursor(H,0),I(w,$.argString.trimStart()),w.state.vim.insertMode&&dr(w,!0);else I(w,$.argString.trimStart()),w.state.vim.insertMode&&dr(w,!0)},global:function(w,$){var k=$.argString;if(!k){Ft(w,"Regular Expression missing from global");return}var P=$.commandName[0]==="v";k[0]==="!"&&$.commandName[0]==="g"&&(P=!0,k=k.slice(1));var z=$.line!==void 0?$.line:w.firstLine(),H=$.lineEnd||$.line||w.lastLine(),q=or(k),J=k,Q;if(q.length&&(J=q[0],Q=q.slice(1,q.length).join("/")),J)try{xn(w,J,!0,!0)}catch{Ft(w,"Invalid regex: "+J);return}for(var se=Ln(w).getQuery(),he=[],we=z;we<=H;we++){var Ae=w.getLine(we),be=se.test(Ae);be!==P&&he.push(Q?w.getLineHandle(we):Ae)}if(!Q){Ft(w,he.join(`
1459
+ `));return}var Ce=0,Pe=function(){if(Ce<he.length){var Ne=he[Ce++],et=w.getLineNumber(Ne);if(et==null){Pe();return}var vt=et+1+Q;Zr.processCommand(w,vt,{callback:Pe})}else w.releaseLineHandles&&w.releaseLineHandles()};Pe()},substitute:function(w,$){if(!w.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var k=$.argString,P=k?Oi(k,k[0]):[],z,H="",q,J,Q,se=!1,he=!1;if(P.length)z=P[0],_("pcre")&&z!==""&&(z=new RegExp(z).source),H=P[1],H!==void 0&&(_("pcre")?H=vn(H.replace(/([^\\])&/g,"$1$$&")):H=Ys(H),Ye.lastSubstituteReplacePart=H),q=P[2]?P[2].split(" "):[];else if(k&&k.length){Ft(w,"Substitutions should be of the form :s/pattern/replace/");return}if(q&&(J=q[0],Q=parseInt(q[1]),J&&(J.indexOf("c")!=-1&&(se=!0),J.indexOf("g")!=-1&&(he=!0),_("pcre")?z=z+"/"+J:z=z.replace(/\//g,"\\/")+"/"+J)),z)try{xn(w,z,!0,!0)}catch{Ft(w,"Invalid regex: "+z);return}if(H=H||Ye.lastSubstituteReplacePart,H===void 0){Ft(w,"No previous substitute regular expression");return}var we=Ln(w),Ae=we.getQuery(),be=$.line!==void 0?$.line:w.getCursor().line,Ce=$.lineEnd||be;be==w.firstLine()&&Ce==w.lastLine()&&(Ce=1/0),Q&&(be=Ce,Ce=be+Q-1);var Pe=ue(w,new Fe(be,0)),Ne=w.getSearchCursor(Ae,Pe);wo(w,se,he,be,Ce,Ne,Ae,H,$.callback)},startinsert:function(w,$){I(w,$.argString=="!"?"A":"i",{})},redo:He.commands.redo,undo:He.commands.undo,write:function(w){He.commands.save?He.commands.save(w):w.save&&w.save()},nohlsearch:function(w){bi(w)},yank:function(w){var $=Ue(w.getCursor()),k=$.line,P=w.getLine(k);Ye.registerController.pushText("0","yank",P,!0,!0)},delete:function(w,$){var k=$.selectionLine,P=isNaN($.selectionLineEnd)?k:$.selectionLineEnd;gs.delete(w,{linewise:!0},[{anchor:new Fe(k,0),head:new Fe(P+1,0)}])},join:function(w,$){var k=$.selectionLine,P=isNaN($.selectionLineEnd)?k:$.selectionLineEnd;w.setCursor(new Fe(k,0)),Zn.joinLines(w,{repeat:P-k},w.state.vim)},delmarks:function(w,$){if(!$.argString||!tn($.argString)){Ft(w,"Argument required");return}for(var k=w.state.vim,P=new He.StringStream(tn($.argString));!P.eol();){P.eatSpace();var z=P.pos;if(!P.match(/[a-zA-Z]/,!1)){Ft(w,"Invalid argument: "+$.argString.substring(z));return}var H=P.next();if(P.match("-",!0)){if(!P.match(/[a-zA-Z]/,!1)){Ft(w,"Invalid argument: "+$.argString.substring(z));return}var q=H,J=P.next();if(!(c(q)&&c(J)||h(q)&&h(J))){Ft(w,"Invalid argument: "+q+"-");return}var Q=q.charCodeAt(0),se=J.charCodeAt(0);if(Q>=se){Ft(w,"Invalid argument: "+$.argString.substring(z));return}for(var he=0;he<=se-Q;he++){var we=String.fromCharCode(Q+he);delete k.marks[we]}}else delete k.marks[H]}}},Zr=new Wa;T("insertModeEscKeysTimeout",200,"number"),He.Vim=$t;var Bo={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"},Pr=$t.handleKey.bind($t);$t.handleKey=function(w,$,k){return w.operation(function(){return Pr(w,$,k)},!0)},O(),r.CodeMirror=He;var Ci=$t.maybeInitVimState_;r.handler={$id:"ace/keyboard/vim",drawCursor:function(w,$,k,P,z){var H=this.state.vim||{},q=k.characterWidth,J=k.lineHeight,Q=$.top,se=$.left;if(!H.insertMode){var he=P.cursor?Le.comparePoints(P.cursor,P.start)<=0:z.selection.isBackwards()||z.selection.isEmpty();!he&&se>q&&(se-=q)}!H.insertMode&&H.status&&(J/=2,Q+=J),wt.translate(w,se,Q),wt.setStyle(w.style,"width",q+"px"),wt.setStyle(w.style,"height",J+"px")},$getDirectionForHighlight:function(w){var $=w.state.cm,k=Ci($);if(!k.insertMode)return w.session.selection.isBackwards()||w.session.selection.isEmpty()},handleKeyboard:function(w,$,k,P,z){var H=w.editor,q=H.state.cm,J=Ci(q);if(P!=-1){if(J.insertMode||($==-1?(k.charCodeAt(0)>255&&w.inputKey&&(k=w.inputKey,k&&w.inputHash==4&&(k=k.toUpperCase())),w.inputChar=k):$==4||$==0?w.inputKey==k&&w.inputHash==$&&w.inputChar?(k=w.inputChar,$=-1):(w.inputChar=null,w.inputKey=k,w.inputHash=$):w.inputChar=w.inputKey=null),q.state.overwrite&&J.insertMode&&k=="backspace"&&$==0)return{command:"gotoleft"};if(k=="c"&&$==1&&!zn.isMac&&H.getCopyText())return H.once("copy",function(){J.insertMode?H.selection.clearSelection():q.operation(function(){wn(q)})}),{command:"null",passEvent:!0};if(k=="esc"&&!J.insertMode&&!J.visualMode&&!q.ace.inMultiSelectMode){var Q=Ln(q),se=Q.getOverlay();se&&q.removeOverlay(se)}if($==-1||$&1||$===0&&k.length>1){var he=J.insertMode,we=Co($,k,z||{},J);J.status==null&&(J.status="");var Ae=ie(q,we,"user");return J=Ci(q),Ae&&J.status!=null?J.status+=we:J.status==null&&(J.status=""),q._signal("changeStatus"),!Ae&&($!=-1||he)?void 0:{command:"null",passEvent:!Ae}}}},attach:function(w){function $(){var P=Ci(k).insertMode;k.ace.renderer.setStyle("normal-mode",!P),w.textInput.setCommandMode(!P),w.renderer.$keepTextAreaAtCursor=P,w.renderer.$blockCursor=!P}w.state||(w.state={});var k=new He(w);w.state.cm=k,w.$vimModeHandler=this,a(k),Ci(k).status=null,k.on("vim-command-done",function(){k.virtualSelectionMode()||(Ci(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()||($(),k._signal("changeStatus"))}),$(),w.renderer.$cursorLayer.drawCursor=this.drawCursor.bind(k)},detach:function(w){var $=w.state.cm;g($),$.destroy(),w.state.cm=null,w.$vimModeHandler=null,w.renderer.$cursorLayer.drawCursor=null,w.renderer.setStyle("normal-mode",!1),w.textInput.setCommandMode(!1),w.renderer.$keepTextAreaAtCursor=!0},getStatusText:function(w){var $=w.state.cm,k=Ci($);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(w,$){$&&$.ace.setOption("wrap",w)},type:"boolean"},!1),$t.defineEx("write","w",function(){console.log(":write is not implemented")}),Vn.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"}}),Vn.push({keys:"gq",type:"operator",operator:"hardWrap"}),$t.defineOperator("hardWrap",function(w,$,k,P,z){var H=k[0].anchor.line,q=k[0].head.line;return $.linewise&&q--,zo(w.ace,{startRow:H,endRow:q}),Fe(q,0)}),T("textwidth",void 0,"number",["tw"],function(w,$){if($!==void 0){if(w===void 0){var k=$.ace.getOption("printMarginColumn");return k}var P=Math.round(w);P>1&&$.ace.setOption("printMarginColumn",P)}}),Zn.aceCommand=function(w,$,k){w.vimCmd=$,w.ace.inVirtualSelectionMode?w.ace.on("beforeEndOperation",$e):$e(null,w.ace)},Zn.fold=function(w,$,k){w.ace.execCommand(["toggleFoldWidget","toggleFoldWidget","foldOther","unfoldall"][($.all?2:0)+($.open?1:0)])},Xo=Vn.length,r.handler.defaultKeymap=Vn,r.handler.actions=Zn,r.Vim=$t}),(function(){ace.require(["ace/keyboard/vim"],function(e){n&&(n.exports=e)})})()})(uv)),uv.exports}JS();var dv={},fv;function ZS(){return fv||(fv=1,(function(n){(function(){var t={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(v){return d(f(v),arguments)}function r(v,a){return e.apply(null,[v].concat(a||[]))}function d(v,a){var g=1,i=v.length,o,c="",p,s,h,m,y,x,T,S;for(p=0;p<i;p++)if(typeof v[p]=="string")c+=v[p];else if(typeof v[p]=="object"){if(h=v[p],h.keys)for(o=a[g],s=0;s<h.keys.length;s++){if(o==null)throw new Error(e('[sprintf] Cannot access property "%s" of undefined value "%s"',h.keys[s],h.keys[s-1]));o=o[h.keys[s]]}else h.param_no?o=a[h.param_no]:o=a[g++];if(t.not_type.test(h.type)&&t.not_primitive.test(h.type)&&o instanceof Function&&(o=o()),t.numeric_arg.test(h.type)&&typeof o!="number"&&isNaN(o))throw new TypeError(e("[sprintf] expecting number but found %T",o));switch(t.number.test(h.type)&&(T=o>=0),h.type){case"b":o=parseInt(o,10).toString(2);break;case"c":o=String.fromCharCode(parseInt(o,10));break;case"d":case"i":o=parseInt(o,10);break;case"j":o=JSON.stringify(o,null,h.width?parseInt(h.width):0);break;case"e":o=h.precision?parseFloat(o).toExponential(h.precision):parseFloat(o).toExponential();break;case"f":o=h.precision?parseFloat(o).toFixed(h.precision):parseFloat(o);break;case"g":o=h.precision?String(Number(o.toPrecision(h.precision))):parseFloat(o);break;case"o":o=(parseInt(o,10)>>>0).toString(8);break;case"s":o=String(o),o=h.precision?o.substring(0,h.precision):o;break;case"t":o=String(!!o),o=h.precision?o.substring(0,h.precision):o;break;case"T":o=Object.prototype.toString.call(o).slice(8,-1).toLowerCase(),o=h.precision?o.substring(0,h.precision):o;break;case"u":o=parseInt(o,10)>>>0;break;case"v":o=o.valueOf(),o=h.precision?o.substring(0,h.precision):o;break;case"x":o=(parseInt(o,10)>>>0).toString(16);break;case"X":o=(parseInt(o,10)>>>0).toString(16).toUpperCase();break}t.json.test(h.type)?c+=o:(t.number.test(h.type)&&(!T||h.sign)?(S=T?"+":"-",o=o.toString().replace(t.sign,"")):S="",y=h.pad_char?h.pad_char==="0"?"0":h.pad_char.charAt(1):" ",x=h.width-(S+o).length,m=h.width&&x>0?y.repeat(x):"",c+=h.align?S+o+m:y==="0"?S+m+o:m+S+o)}return c}var u=Object.create(null);function f(v){if(u[v])return u[v];for(var a=v,g,i=[],o=0;a;){if((g=t.text.exec(a))!==null)i.push(g[0]);else if((g=t.modulo.exec(a))!==null)i.push("%");else if((g=t.placeholder.exec(a))!==null){if(g[2]){o|=1;var c=[],p=g[2],s=[];if((s=t.key.exec(p))!==null)for(c.push(s[1]);(p=p.substring(s[0].length))!=="";)if((s=t.key_access.exec(p))!==null)c.push(s[1]);else if((s=t.index_access.exec(p))!==null)c.push(s[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");g[2]=c}else o|=2;if(o===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");i.push({placeholder:g[0],param_no:g[1],keys:g[2],sign:g[3],pad_char:g[4],align:g[5],width:g[6],precision:g[7],type:g[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");a=a.substring(g[0].length)}return u[v]=i}n.sprintf=e,n.vsprintf=r,typeof window<"u"&&(window.sprintf=e,window.vsprintf=r)})()})(dv)),dv}ZS();var hc={exports:{}},QS=hc.exports,pv;function e$(){return pv||(pv=1,(function(n,t){(function(){var e,r="4.18.1",d=200,u="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",f="Expected a function",v="Invalid `variable` option passed into `_.template`",a="Invalid `imports` option passed into `_.template`",g="__lodash_hash_undefined__",i=500,o="__lodash_placeholder__",c=1,p=2,s=4,h=1,m=2,y=1,x=2,T=4,S=8,_=16,C=32,L=64,O=128,M=256,I=512,B=30,F="...",N=800,E=16,A=1,D=2,j=3,W=1/0,V=9007199254740991,K=17976931348623157e292,X=NaN,oe=4294967295,ee=oe-1,le=oe>>>1,ue=[["ary",O],["bind",y],["bindKey",x],["curry",S],["curryRight",_],["flip",I],["partial",C],["partialRight",L],["rearg",M]],ne="[object Arguments]",fe="[object Array]",Se="[object AsyncFunction]",Te="[object Boolean]",Re="[object Date]",Ve="[object DOMException]",Ue="[object Error]",Xe="[object Function]",ft="[object GeneratorFunction]",We="[object Map]",Ie="[object Number]",Mt="[object Null]",dt="[object Object]",tn="[object Promise]",mn="[object Proxy]",rr="[object RegExp]",Bt="[object Set]",Rn="[object String]",bt="[object Symbol]",Ze="[object Undefined]",Pt="[object WeakMap]",In="[object WeakSet]",Hn="[object ArrayBuffer]",Kn="[object DataView]",Un="[object Float32Array]",wn="[object Float64Array]",Dn="[object Int8Array]",ir="[object Int16Array]",on="[object Int32Array]",Yn="[object Uint8Array]",Ii="[object Uint8ClampedArray]",si="[object Uint16Array]",hr="[object Uint32Array]",Xn=/\b__p \+= '';/g,Mi=/\b(__p \+=) '' \+/g,wr=/(__e\(.*?\)|\b__t\)) \+\n'';/g,qi=/&(?:amp|lt|gt|quot|#39);/g,Li=/[&<>"']/g,fs=RegExp(qi.source),Sr=RegExp(Li.source),Oo=/<%-([\s\S]+?)%>/g,Or=/<%([\s\S]+?)%>/g,mi=/<%=([\s\S]+?)%>/g,ai=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Mn=/^\w*$/,qr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Kr=/[\\^$.*+?()[\]{}|]/g,Ln=RegExp(Kr.source),or=/^\s+/,vi=/\s/,Oi=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ni=/\{\n\/\* \[wrapped with (.+)\] \*/,ps=/,? & /,Ys=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,vn=/[()=,{}\[\]\/\s]/,$r=/\\(\\)?/g,yi=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ft=/\w*$/,No=/^[-+]0x[0-9a-f]+$/i,xr=/^0b[01]+$/i,Pn=/^\[object .+?Constructor\]$/,xn=/^0o[0-7]+$/i,Fn=/^(?:0|[1-9]\d*)$/,bo=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,sr=/($^)/,Nr=/['\n\r\u2028\u2029\\]/g,bi="\\ud800-\\udfff",li="\\u0300-\\u036f",Ki="\\ufe20-\\ufe2f",ci="\\u20d0-\\u20ff",Yi=li+Ki+ci,wo="\\u2700-\\u27bf",dr="a-z\\xdf-\\xf6\\xf8-\\xff",Xi="\\xac\\xb1\\xd7\\xf7",Ji="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",wi="\\u2000-\\u206f",Di=" \\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",yn="A-Z\\xc0-\\xd6\\xd8-\\xde",qo="\\ufe0e\\ufe0f",Do=Xi+Ji+wi+Di,Pi="['’]",Po="["+bi+"]",Fo="["+Do+"]",Zi="["+Yi+"]",Ko="\\d+",Yo="["+wo+"]",xo="["+dr+"]",Co="[^"+bi+Do+Ko+wo+dr+yn+"]",xi="\\ud83c[\\udffb-\\udfff]",ie="(?:"+Zi+"|"+xi+")",$e="[^"+bi+"]",Le="(?:\\ud83c[\\udde6-\\uddff]){2}",rt="[\\ud800-\\udbff][\\udc00-\\udfff]",wt="["+yn+"]",Xt="\\u200d",Qt="(?:"+xo+"|"+Co+")",Yr="(?:"+wt+"|"+Co+")",fr="(?:"+Pi+"(?:d|ll|m|re|s|t|ve))?",zn="(?:"+Pi+"(?:D|LL|M|RE|S|T|VE))?",Dr=ie+"?",Sn="["+qo+"]?",ja="(?:"+Xt+"(?:"+[$e,Le,rt].join("|")+")"+Sn+Dr+")*",zo="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",He="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Xs=Sn+Dr+ja,Fe="(?:"+[Yo,Le,rt].join("|")+")"+Xs,Vn="(?:"+[$e+Zi+"?",Zi,Le,rt,Po].join("|")+")",Xo=RegExp(Pi,"g"),_o=RegExp(Zi,"g"),Gn=RegExp(xi+"(?="+xi+")|"+Vn+Xs,"g"),Ba=RegExp([wt+"?"+xo+"+"+fr+"(?="+[Fo,wt,"$"].join("|")+")",Yr+"+"+zn+"(?="+[Fo,wt+Qt,"$"].join("|")+")",wt+"?"+Qt+"+"+fr,wt+"+"+zn,He,zo,Ko,Fe].join("|"),"g"),Jo=RegExp("["+Xt+bi+Yi+qo+"]"),Qi=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,jo=["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"],Js=-1,cn={};cn[Un]=cn[wn]=cn[Dn]=cn[ir]=cn[on]=cn[Yn]=cn[Ii]=cn[si]=cn[hr]=!0,cn[ne]=cn[fe]=cn[Hn]=cn[Te]=cn[Kn]=cn[Re]=cn[Ue]=cn[Xe]=cn[We]=cn[Ie]=cn[dt]=cn[rr]=cn[Bt]=cn[Rn]=cn[Pt]=!1;var mt={};mt[ne]=mt[fe]=mt[Hn]=mt[Kn]=mt[Te]=mt[Re]=mt[Un]=mt[wn]=mt[Dn]=mt[ir]=mt[on]=mt[We]=mt[Ie]=mt[dt]=mt[rr]=mt[Bt]=mt[Rn]=mt[bt]=mt[Yn]=mt[Ii]=mt[si]=mt[hr]=!0,mt[Ue]=mt[Xe]=mt[Pt]=!1;var Kt={À:"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"},eo={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Jn={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Ye={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},$n=parseFloat,$t=parseInt,Xr=typeof ls=="object"&&ls&&ls.Object===Object&&ls,to=typeof self=="object"&&self&&self.Object===Object&&self,Wt=Xr||to||Function("return this")(),Jr=t&&!t.nodeType&&t,pr=Jr&&!0&&n&&!n.nodeType&&n,Ao=pr&&pr.exports===Jr,Fi=Ao&&Xr.process,jn=(function(){try{var me=pr&&pr.require&&pr.require("util").types;return me||Fi&&Fi.binding&&Fi.binding("util")}catch{}})(),gs=jn&&jn.isArrayBuffer,Zn=jn&&jn.isDate,zi=jn&&jn.isMap,ji=jn&&jn.isRegExp,no=jn&&jn.isSet,Zs=jn&&jn.isTypedArray;function hn(me,Ee,ke){switch(ke.length){case 0:return me.call(Ee);case 1:return me.call(Ee,ke[0]);case 2:return me.call(Ee,ke[0],ke[1]);case 3:return me.call(Ee,ke[0],ke[1],ke[2])}return me.apply(Ee,ke)}function Wa(me,Ee,ke,Qe){for(var yt=-1,It=me==null?0:me.length;++yt<It;){var sn=me[yt];Ee(Qe,sn,ke(sn),me)}return Qe}function Cr(me,Ee){for(var ke=-1,Qe=me==null?0:me.length;++ke<Qe&&Ee(me[ke],ke,me)!==!1;);return me}function Zr(me,Ee){for(var ke=me==null?0:me.length;ke--&&Ee(me[ke],ke,me)!==!1;);return me}function Bo(me,Ee){for(var ke=-1,Qe=me==null?0:me.length;++ke<Qe;)if(!Ee(me[ke],ke,me))return!1;return!0}function Pr(me,Ee){for(var ke=-1,Qe=me==null?0:me.length,yt=0,It=[];++ke<Qe;){var sn=me[ke];Ee(sn,ke,me)&&(It[yt++]=sn)}return It}function Ci(me,Ee){var ke=me==null?0:me.length;return!!ke&&we(me,Ee,0)>-1}function w(me,Ee,ke){for(var Qe=-1,yt=me==null?0:me.length;++Qe<yt;)if(ke(Ee,me[Qe]))return!0;return!1}function $(me,Ee){for(var ke=-1,Qe=me==null?0:me.length,yt=Array(Qe);++ke<Qe;)yt[ke]=Ee(me[ke],ke,me);return yt}function k(me,Ee){for(var ke=-1,Qe=Ee.length,yt=me.length;++ke<Qe;)me[yt+ke]=Ee[ke];return me}function P(me,Ee,ke,Qe){var yt=-1,It=me==null?0:me.length;for(Qe&&It&&(ke=me[++yt]);++yt<It;)ke=Ee(ke,me[yt],yt,me);return ke}function z(me,Ee,ke,Qe){var yt=me==null?0:me.length;for(Qe&&yt&&(ke=me[--yt]);yt--;)ke=Ee(ke,me[yt],yt,me);return ke}function H(me,Ee){for(var ke=-1,Qe=me==null?0:me.length;++ke<Qe;)if(Ee(me[ke],ke,me))return!0;return!1}var q=Pe("length");function J(me){return me.split("")}function Q(me){return me.match(Ys)||[]}function se(me,Ee,ke){var Qe;return ke(me,function(yt,It,sn){if(Ee(yt,It,sn))return Qe=It,!1}),Qe}function he(me,Ee,ke,Qe){for(var yt=me.length,It=ke+(Qe?1:-1);Qe?It--:++It<yt;)if(Ee(me[It],It,me))return It;return-1}function we(me,Ee,ke){return Ee===Ee?Et(me,Ee,ke):he(me,be,ke)}function Ae(me,Ee,ke,Qe){for(var yt=ke-1,It=me.length;++yt<It;)if(Qe(me[yt],Ee))return yt;return-1}function be(me){return me!==me}function Ce(me,Ee){var ke=me==null?0:me.length;return ke?lt(me,Ee)/ke:X}function Pe(me){return function(Ee){return Ee==null?e:Ee[me]}}function Ne(me){return function(Ee){return me==null?e:me[Ee]}}function et(me,Ee,ke,Qe,yt){return yt(me,function(It,sn,Ut){ke=Qe?(Qe=!1,It):Ee(ke,It,sn,Ut)}),ke}function vt(me,Ee){var ke=me.length;for(me.sort(Ee);ke--;)me[ke]=me[ke].value;return me}function lt(me,Ee){for(var ke,Qe=-1,yt=me.length;++Qe<yt;){var It=Ee(me[Qe]);It!==e&&(ke=ke===e?It:ke+It)}return ke}function ht(me,Ee){for(var ke=-1,Qe=Array(me);++ke<me;)Qe[ke]=Ee(ke);return Qe}function On(me,Ee){return $(Ee,function(ke){return[ke,me[ke]]})}function Tt(me){return me&&me.slice(0,xt(me)+1).replace(or,"")}function en(me){return function(Ee){return me(Ee)}}function Ot(me,Ee){return $(Ee,function(ke){return me[ke]})}function Rt(me,Ee){return me.has(Ee)}function gr(me,Ee){for(var ke=-1,Qe=me.length;++ke<Qe&&we(Ee,me[ke],0)>-1;);return ke}function _r(me,Ee){for(var ke=me.length;ke--&&we(Ee,me[ke],0)>-1;);return ke}function Bn(me,Ee){for(var ke=me.length,Qe=0;ke--;)me[ke]===Ee&&++Qe;return Qe}var G=Ne(Kt),Z=Ne(eo);function ae(me){return"\\"+Ye[me]}function ce(me,Ee){return me==null?e:me[Ee]}function ge(me){return Jo.test(me)}function _e(me){return Qi.test(me)}function Me(me){for(var Ee,ke=[];!(Ee=me.next()).done;)ke.push(Ee.value);return ke}function je(me){var Ee=-1,ke=Array(me.size);return me.forEach(function(Qe,yt){ke[++Ee]=[yt,Qe]}),ke}function qe(me,Ee){return function(ke){return me(Ee(ke))}}function Je(me,Ee){for(var ke=-1,Qe=me.length,yt=0,It=[];++ke<Qe;){var sn=me[ke];(sn===Ee||sn===o)&&(me[ke]=o,It[yt++]=ke)}return It}function it(me){var Ee=-1,ke=Array(me.size);return me.forEach(function(Qe){ke[++Ee]=Qe}),ke}function ut(me){var Ee=-1,ke=Array(me.size);return me.forEach(function(Qe){ke[++Ee]=[Qe,Qe]}),ke}function Et(me,Ee,ke){for(var Qe=ke-1,yt=me.length;++Qe<yt;)if(me[Qe]===Ee)return Qe;return-1}function nn(me,Ee,ke){for(var Qe=ke+1;Qe--;)if(me[Qe]===Ee)return Qe;return Qe}function Ht(me){return ge(me)?kn(me):q(me)}function kt(me){return ge(me)?Wn(me):J(me)}function xt(me){for(var Ee=me.length;Ee--&&vi.test(me.charAt(Ee)););return Ee}var gt=Ne(Jn);function kn(me){for(var Ee=Gn.lastIndex=0;Gn.test(me);)++Ee;return Ee}function Wn(me){return me.match(Gn)||[]}function mr(me){return me.match(Ba)||[]}var dn=(function me(Ee){Ee=Ee==null?Wt:bn.defaults(Wt.Object(),Ee,bn.pick(Wt,jo));var ke=Ee.Array,Qe=Ee.Date,yt=Ee.Error,It=Ee.Function,sn=Ee.Math,Ut=Ee.Object,_i=Ee.RegExp,Fr=Ee.String,En=Ee.TypeError,ro=ke.prototype,zr=It.prototype,Zo=Ut.prototype,tu=Ee["__core-js_shared__"],nu=zr.toString,fn=Zo.hasOwnProperty,_N=0,b1=(function(){var l=/[^.]+$/.exec(tu&&tu.keys&&tu.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""})(),ru=Zo.toString,AN=nu.call(Ut),kN=Wt._,SN=_i("^"+nu.call(fn).replace(Kr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),iu=Ao?Ee.Buffer:e,ms=Ee.Symbol,ou=Ee.Uint8Array,w1=iu?iu.allocUnsafe:e,su=qe(Ut.getPrototypeOf,Ut),x1=Ut.create,C1=Zo.propertyIsEnumerable,au=ro.splice,_1=ms?ms.isConcatSpreadable:e,Ll=ms?ms.iterator:e,Qs=ms?ms.toStringTag:e,lu=(function(){try{var l=ia(Ut,"defineProperty");return l({},"",{}),l}catch{}})(),$N=Ee.clearTimeout!==Wt.clearTimeout&&Ee.clearTimeout,EN=Qe&&Qe.now!==Wt.Date.now&&Qe.now,TN=Ee.setTimeout!==Wt.setTimeout&&Ee.setTimeout,cu=sn.ceil,uu=sn.floor,ap=Ut.getOwnPropertySymbols,RN=iu?iu.isBuffer:e,A1=Ee.isFinite,IN=ro.join,MN=qe(Ut.keys,Ut),Ar=sn.max,Qr=sn.min,LN=Qe.now,ON=Ee.parseInt,k1=sn.random,NN=ro.reverse,lp=ia(Ee,"DataView"),Ol=ia(Ee,"Map"),cp=ia(Ee,"Promise"),Ha=ia(Ee,"Set"),Nl=ia(Ee,"WeakMap"),Dl=ia(Ut,"create"),hu=Nl&&new Nl,Ua={},DN=oa(lp),PN=oa(Ol),FN=oa(cp),zN=oa(Ha),jN=oa(Nl),du=ms?ms.prototype:e,Pl=du?du.valueOf:e,S1=du?du.toString:e;function te(l){if(Qn(l)&&!Lt(l)&&!(l instanceof Yt)){if(l instanceof io)return l;if(fn.call(l,"__wrapped__"))return $x(l)}return new io(l)}var Va=(function(){function l(){}return function(b){if(!qn(b))return{};if(x1)return x1(b);l.prototype=b;var R=new l;return l.prototype=e,R}})();function fu(){}function io(l,b){this.__wrapped__=l,this.__actions__=[],this.__chain__=!!b,this.__index__=0,this.__values__=e}te.templateSettings={escape:Oo,evaluate:Or,interpolate:mi,variable:"",imports:{_:te}},te.prototype=fu.prototype,te.prototype.constructor=te,io.prototype=Va(fu.prototype),io.prototype.constructor=io;function Yt(l){this.__wrapped__=l,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=oe,this.__views__=[]}function BN(){var l=new Yt(this.__wrapped__);return l.__actions__=Ai(this.__actions__),l.__dir__=this.__dir__,l.__filtered__=this.__filtered__,l.__iteratees__=Ai(this.__iteratees__),l.__takeCount__=this.__takeCount__,l.__views__=Ai(this.__views__),l}function WN(){if(this.__filtered__){var l=new Yt(this);l.__dir__=-1,l.__filtered__=!0}else l=this.clone(),l.__dir__*=-1;return l}function HN(){var l=this.__wrapped__.value(),b=this.__dir__,R=Lt(l),U=b<0,Y=R?l.length:0,re=tD(0,Y,this.__views__),de=re.start,pe=re.end,xe=pe-de,Oe=U?pe:de-1,De=this.__iteratees__,ze=De.length,ot=0,pt=Qr(xe,this.__takeCount__);if(!R||!U&&Y==xe&&pt==xe)return X1(l,this.__actions__);var At=[];e:for(;xe--&&ot<pt;){Oe+=b;for(var zt=-1,Ct=l[Oe];++zt<ze;){var Gt=De[zt],Jt=Gt.iteratee,Hi=Gt.type,di=Jt(Ct);if(Hi==D)Ct=di;else if(!di){if(Hi==A)continue e;break e}}At[ot++]=Ct}return At}Yt.prototype=Va(fu.prototype),Yt.prototype.constructor=Yt;function ea(l){var b=-1,R=l==null?0:l.length;for(this.clear();++b<R;){var U=l[b];this.set(U[0],U[1])}}function UN(){this.__data__=Dl?Dl(null):{},this.size=0}function VN(l){var b=this.has(l)&&delete this.__data__[l];return this.size-=b?1:0,b}function GN(l){var b=this.__data__;if(Dl){var R=b[l];return R===g?e:R}return fn.call(b,l)?b[l]:e}function qN(l){var b=this.__data__;return Dl?b[l]!==e:fn.call(b,l)}function KN(l,b){var R=this.__data__;return this.size+=this.has(l)?0:1,R[l]=Dl&&b===e?g:b,this}ea.prototype.clear=UN,ea.prototype.delete=VN,ea.prototype.get=GN,ea.prototype.has=qN,ea.prototype.set=KN;function Qo(l){var b=-1,R=l==null?0:l.length;for(this.clear();++b<R;){var U=l[b];this.set(U[0],U[1])}}function YN(){this.__data__=[],this.size=0}function XN(l){var b=this.__data__,R=pu(b,l);if(R<0)return!1;var U=b.length-1;return R==U?b.pop():au.call(b,R,1),--this.size,!0}function JN(l){var b=this.__data__,R=pu(b,l);return R<0?e:b[R][1]}function ZN(l){return pu(this.__data__,l)>-1}function QN(l,b){var R=this.__data__,U=pu(R,l);return U<0?(++this.size,R.push([l,b])):R[U][1]=b,this}Qo.prototype.clear=YN,Qo.prototype.delete=XN,Qo.prototype.get=JN,Qo.prototype.has=ZN,Qo.prototype.set=QN;function es(l){var b=-1,R=l==null?0:l.length;for(this.clear();++b<R;){var U=l[b];this.set(U[0],U[1])}}function e2(){this.size=0,this.__data__={hash:new ea,map:new(Ol||Qo),string:new ea}}function t2(l){var b=Su(this,l).delete(l);return this.size-=b?1:0,b}function n2(l){return Su(this,l).get(l)}function r2(l){return Su(this,l).has(l)}function i2(l,b){var R=Su(this,l),U=R.size;return R.set(l,b),this.size+=R.size==U?0:1,this}es.prototype.clear=e2,es.prototype.delete=t2,es.prototype.get=n2,es.prototype.has=r2,es.prototype.set=i2;function ta(l){var b=-1,R=l==null?0:l.length;for(this.__data__=new es;++b<R;)this.add(l[b])}function o2(l){return this.__data__.set(l,g),this}function s2(l){return this.__data__.has(l)}ta.prototype.add=ta.prototype.push=o2,ta.prototype.has=s2;function ko(l){var b=this.__data__=new Qo(l);this.size=b.size}function a2(){this.__data__=new Qo,this.size=0}function l2(l){var b=this.__data__,R=b.delete(l);return this.size=b.size,R}function c2(l){return this.__data__.get(l)}function u2(l){return this.__data__.has(l)}function h2(l,b){var R=this.__data__;if(R instanceof Qo){var U=R.__data__;if(!Ol||U.length<d-1)return U.push([l,b]),this.size=++R.size,this;R=this.__data__=new es(U)}return R.set(l,b),this.size=R.size,this}ko.prototype.clear=a2,ko.prototype.delete=l2,ko.prototype.get=c2,ko.prototype.has=u2,ko.prototype.set=h2;function $1(l,b){var R=Lt(l),U=!R&&sa(l),Y=!R&&!U&&xs(l),re=!R&&!U&&!Y&&Ya(l),de=R||U||Y||re,pe=de?ht(l.length,Fr):[],xe=pe.length;for(var Oe in l)(b||fn.call(l,Oe))&&!(de&&(Oe=="length"||Y&&(Oe=="offset"||Oe=="parent")||re&&(Oe=="buffer"||Oe=="byteLength"||Oe=="byteOffset")||rs(Oe,xe)))&&pe.push(Oe);return pe}function E1(l){var b=l.length;return b?l[wp(0,b-1)]:e}function d2(l,b){return $u(Ai(l),na(b,0,l.length))}function f2(l){return $u(Ai(l))}function up(l,b,R){(R!==e&&!$o(l[b],R)||R===e&&!(b in l))&&Wo(l,b,R)}function Fl(l,b,R){var U=l[b];(!(fn.call(l,b)&&$o(U,R))||R===e&&!(b in l))&&Wo(l,b,R)}function pu(l,b){for(var R=l.length;R--;)if($o(l[R][0],b))return R;return-1}function p2(l,b,R,U){return vs(l,function(Y,re,de){b(U,Y,R(Y),de)}),U}function T1(l,b){return l&&Uo(b,Er(b),l)}function g2(l,b){return l&&Uo(b,Si(b),l)}function Wo(l,b,R){b=="__proto__"&&lu?lu(l,b,{configurable:!0,enumerable:!0,value:R,writable:!0}):l[b]=R}function hp(l,b){for(var R=-1,U=b.length,Y=ke(U),re=l==null;++R<U;)Y[R]=re?e:Gp(l,b[R]);return Y}function na(l,b,R){return l===l&&(R!==e&&(l=l<=R?l:R),b!==e&&(l=l>=b?l:b)),l}function oo(l,b,R,U,Y,re){var de,pe=b&c,xe=b&p,Oe=b&s;if(R&&(de=Y?R(l,U,Y,re):R(l)),de!==e)return de;if(!qn(l))return l;var De=Lt(l);if(De){if(de=rD(l),!pe)return Ai(l,de)}else{var ze=ei(l),ot=ze==Xe||ze==ft;if(xs(l))return Q1(l,pe);if(ze==dt||ze==ne||ot&&!Y){if(de=xe||ot?{}:yx(l),!pe)return xe?G2(l,g2(de,l)):V2(l,T1(de,l))}else{if(!mt[ze])return Y?l:{};de=iD(l,ze,pe)}}re||(re=new ko);var pt=re.get(l);if(pt)return pt;re.set(l,de),qx(l)?l.forEach(function(Ct){de.add(oo(Ct,b,R,Ct,l,re))}):Vx(l)&&l.forEach(function(Ct,Gt){de.set(Gt,oo(Ct,b,R,Gt,l,re))});var At=Oe?xe?Ip:Rp:xe?Si:Er,zt=De?e:At(l);return Cr(zt||l,function(Ct,Gt){zt&&(Gt=Ct,Ct=l[Gt]),Fl(de,Gt,oo(Ct,b,R,Gt,l,re))}),de}function m2(l){var b=Er(l);return function(R){return R1(R,l,b)}}function R1(l,b,R){var U=R.length;if(l==null)return!U;for(l=Ut(l);U--;){var Y=R[U],re=b[Y],de=l[Y];if(de===e&&!(Y in l)||!re(de))return!1}return!0}function I1(l,b,R){if(typeof l!="function")throw new En(f);return Vl(function(){l.apply(e,R)},b)}function zl(l,b,R,U){var Y=-1,re=Ci,de=!0,pe=l.length,xe=[],Oe=b.length;if(!pe)return xe;R&&(b=$(b,en(R))),U?(re=w,de=!1):b.length>=d&&(re=Rt,de=!1,b=new ta(b));e:for(;++Y<pe;){var De=l[Y],ze=R==null?De:R(De);if(De=U||De!==0?De:0,de&&ze===ze){for(var ot=Oe;ot--;)if(b[ot]===ze)continue e;xe.push(De)}else re(b,ze,U)||xe.push(De)}return xe}var vs=ix(Ho),M1=ix(fp,!0);function v2(l,b){var R=!0;return vs(l,function(U,Y,re){return R=!!b(U,Y,re),R}),R}function gu(l,b,R){for(var U=-1,Y=l.length;++U<Y;){var re=l[U],de=b(re);if(de!=null&&(pe===e?de===de&&!Wi(de):R(de,pe)))var pe=de,xe=re}return xe}function y2(l,b,R,U){var Y=l.length;for(R=Dt(R),R<0&&(R=-R>Y?0:Y+R),U=U===e||U>Y?Y:Dt(U),U<0&&(U+=Y),U=R>U?0:Yx(U);R<U;)l[R++]=b;return l}function L1(l,b){var R=[];return vs(l,function(U,Y,re){b(U,Y,re)&&R.push(U)}),R}function jr(l,b,R,U,Y){var re=-1,de=l.length;for(R||(R=sD),Y||(Y=[]);++re<de;){var pe=l[re];b>0&&R(pe)?b>1?jr(pe,b-1,R,U,Y):k(Y,pe):U||(Y[Y.length]=pe)}return Y}var dp=ox(),O1=ox(!0);function Ho(l,b){return l&&dp(l,b,Er)}function fp(l,b){return l&&O1(l,b,Er)}function mu(l,b){return Pr(b,function(R){return is(l[R])})}function ra(l,b){b=bs(b,l);for(var R=0,U=b.length;l!=null&&R<U;)l=l[So(b[R++])];return R&&R==U?l:e}function N1(l,b,R){var U=b(l);return Lt(l)?U:k(U,R(l))}function ui(l){return l==null?l===e?Ze:Mt:Qs&&Qs in Ut(l)?eD(l):fD(l)}function pp(l,b){return l>b}function b2(l,b){return l!=null&&fn.call(l,b)}function w2(l,b){return l!=null&&b in Ut(l)}function x2(l,b,R){return l>=Qr(b,R)&&l<Ar(b,R)}function gp(l,b,R){for(var U=R?w:Ci,Y=l[0].length,re=l.length,de=re,pe=ke(re),xe=1/0,Oe=[];de--;){var De=l[de];de&&b&&(De=$(De,en(b))),xe=Qr(De.length,xe),pe[de]=!R&&(b||Y>=120&&De.length>=120)?new ta(de&&De):e}De=l[0];var ze=-1,ot=pe[0];e:for(;++ze<Y&&Oe.length<xe;){var pt=De[ze],At=b?b(pt):pt;if(pt=R||pt!==0?pt:0,!(ot?Rt(ot,At):U(Oe,At,R))){for(de=re;--de;){var zt=pe[de];if(!(zt?Rt(zt,At):U(l[de],At,R)))continue e}ot&&ot.push(At),Oe.push(pt)}}return Oe}function C2(l,b,R,U){return Ho(l,function(Y,re,de){b(U,R(Y),re,de)}),U}function jl(l,b,R){b=bs(b,l),l=Cx(l,b);var U=l==null?l:l[So(ao(b))];return U==null?e:hn(U,l,R)}function D1(l){return Qn(l)&&ui(l)==ne}function _2(l){return Qn(l)&&ui(l)==Hn}function A2(l){return Qn(l)&&ui(l)==Re}function Bl(l,b,R,U,Y){return l===b?!0:l==null||b==null||!Qn(l)&&!Qn(b)?l!==l&&b!==b:k2(l,b,R,U,Bl,Y)}function k2(l,b,R,U,Y,re){var de=Lt(l),pe=Lt(b),xe=de?fe:ei(l),Oe=pe?fe:ei(b);xe=xe==ne?dt:xe,Oe=Oe==ne?dt:Oe;var De=xe==dt,ze=Oe==dt,ot=xe==Oe;if(ot&&xs(l)){if(!xs(b))return!1;de=!0,De=!1}if(ot&&!De)return re||(re=new ko),de||Ya(l)?gx(l,b,R,U,Y,re):Z2(l,b,xe,R,U,Y,re);if(!(R&h)){var pt=De&&fn.call(l,"__wrapped__"),At=ze&&fn.call(b,"__wrapped__");if(pt||At){var zt=pt?l.value():l,Ct=At?b.value():b;return re||(re=new ko),Y(zt,Ct,R,U,re)}}return ot?(re||(re=new ko),Q2(l,b,R,U,Y,re)):!1}function S2(l){return Qn(l)&&ei(l)==We}function mp(l,b,R,U){var Y=R.length,re=Y,de=!U;if(l==null)return!re;for(l=Ut(l);Y--;){var pe=R[Y];if(de&&pe[2]?pe[1]!==l[pe[0]]:!(pe[0]in l))return!1}for(;++Y<re;){pe=R[Y];var xe=pe[0],Oe=l[xe],De=pe[1];if(de&&pe[2]){if(Oe===e&&!(xe in l))return!1}else{var ze=new ko;if(U)var ot=U(Oe,De,xe,l,b,ze);if(!(ot===e?Bl(De,Oe,h|m,U,ze):ot))return!1}}return!0}function P1(l){if(!qn(l)||lD(l))return!1;var b=is(l)?SN:Pn;return b.test(oa(l))}function $2(l){return Qn(l)&&ui(l)==rr}function E2(l){return Qn(l)&&ei(l)==Bt}function T2(l){return Qn(l)&&Lu(l.length)&&!!cn[ui(l)]}function F1(l){return typeof l=="function"?l:l==null?$i:typeof l=="object"?Lt(l)?B1(l[0],l[1]):j1(l):aC(l)}function vp(l){if(!Ul(l))return MN(l);var b=[];for(var R in Ut(l))fn.call(l,R)&&R!="constructor"&&b.push(R);return b}function R2(l){if(!qn(l))return dD(l);var b=Ul(l),R=[];for(var U in l)U=="constructor"&&(b||!fn.call(l,U))||R.push(U);return R}function yp(l,b){return l<b}function z1(l,b){var R=-1,U=ki(l)?ke(l.length):[];return vs(l,function(Y,re,de){U[++R]=b(Y,re,de)}),U}function j1(l){var b=Lp(l);return b.length==1&&b[0][2]?wx(b[0][0],b[0][1]):function(R){return R===l||mp(R,l,b)}}function B1(l,b){return Np(l)&&bx(b)?wx(So(l),b):function(R){var U=Gp(R,l);return U===e&&U===b?qp(R,l):Bl(b,U,h|m)}}function vu(l,b,R,U,Y){l!==b&&dp(b,function(re,de){if(Y||(Y=new ko),qn(re))I2(l,b,de,R,vu,U,Y);else{var pe=U?U(Pp(l,de),re,de+"",l,b,Y):e;pe===e&&(pe=re),up(l,de,pe)}},Si)}function I2(l,b,R,U,Y,re,de){var pe=Pp(l,R),xe=Pp(b,R),Oe=de.get(xe);if(Oe){up(l,R,Oe);return}var De=re?re(pe,xe,R+"",l,b,de):e,ze=De===e;if(ze){var ot=Lt(xe),pt=!ot&&xs(xe),At=!ot&&!pt&&Ya(xe);De=xe,ot||pt||At?Lt(pe)?De=pe:ar(pe)?De=Ai(pe):pt?(ze=!1,De=Q1(xe,!0)):At?(ze=!1,De=ex(xe,!0)):De=[]:Gl(xe)||sa(xe)?(De=pe,sa(pe)?De=Xx(pe):(!qn(pe)||is(pe))&&(De=yx(xe))):ze=!1}ze&&(de.set(xe,De),Y(De,xe,U,re,de),de.delete(xe)),up(l,R,De)}function W1(l,b){var R=l.length;if(R)return b+=b<0?R:0,rs(b,R)?l[b]:e}function H1(l,b,R){b.length?b=$(b,function(re){return Lt(re)?function(de){return ra(de,re.length===1?re[0]:re)}:re}):b=[$i];var U=-1;b=$(b,en(_t()));var Y=z1(l,function(re,de,pe){var xe=$(b,function(Oe){return Oe(re)});return{criteria:xe,index:++U,value:re}});return vt(Y,function(re,de){return U2(re,de,R)})}function M2(l,b){return U1(l,b,function(R,U){return qp(l,U)})}function U1(l,b,R){for(var U=-1,Y=b.length,re={};++U<Y;){var de=b[U],pe=ra(l,de);R(pe,de)&&Wl(re,bs(de,l),pe)}return re}function L2(l){return function(b){return ra(b,l)}}function bp(l,b,R,U){var Y=U?Ae:we,re=-1,de=b.length,pe=l;for(l===b&&(b=Ai(b)),R&&(pe=$(l,en(R)));++re<de;)for(var xe=0,Oe=b[re],De=R?R(Oe):Oe;(xe=Y(pe,De,xe,U))>-1;)pe!==l&&au.call(pe,xe,1),au.call(l,xe,1);return l}function V1(l,b){for(var R=l?b.length:0,U=R-1;R--;){var Y=b[R];if(R==U||Y!==re){var re=Y;rs(Y)?au.call(l,Y,1):_p(l,Y)}}return l}function wp(l,b){return l+uu(k1()*(b-l+1))}function O2(l,b,R,U){for(var Y=-1,re=Ar(cu((b-l)/(R||1)),0),de=ke(re);re--;)de[U?re:++Y]=l,l+=R;return de}function xp(l,b){var R="";if(!l||b<1||b>V)return R;do b%2&&(R+=l),b=uu(b/2),b&&(l+=l);while(b);return R}function Vt(l,b){return Fp(xx(l,b,$i),l+"")}function N2(l){return E1(Xa(l))}function D2(l,b){var R=Xa(l);return $u(R,na(b,0,R.length))}function Wl(l,b,R,U){if(!qn(l))return l;b=bs(b,l);for(var Y=-1,re=b.length,de=re-1,pe=l;pe!=null&&++Y<re;){var xe=So(b[Y]),Oe=R;if(xe==="__proto__"||xe==="constructor"||xe==="prototype")return l;if(Y!=de){var De=pe[xe];Oe=U?U(De,xe,pe):e,Oe===e&&(Oe=qn(De)?De:rs(b[Y+1])?[]:{})}Fl(pe,xe,Oe),pe=pe[xe]}return l}var G1=hu?function(l,b){return hu.set(l,b),l}:$i,P2=lu?function(l,b){return lu(l,"toString",{configurable:!0,enumerable:!1,value:Yp(b),writable:!0})}:$i;function F2(l){return $u(Xa(l))}function so(l,b,R){var U=-1,Y=l.length;b<0&&(b=-b>Y?0:Y+b),R=R>Y?Y:R,R<0&&(R+=Y),Y=b>R?0:R-b>>>0,b>>>=0;for(var re=ke(Y);++U<Y;)re[U]=l[U+b];return re}function z2(l,b){var R;return vs(l,function(U,Y,re){return R=b(U,Y,re),!R}),!!R}function yu(l,b,R){var U=0,Y=l==null?U:l.length;if(typeof b=="number"&&b===b&&Y<=le){for(;U<Y;){var re=U+Y>>>1,de=l[re];de!==null&&!Wi(de)&&(R?de<=b:de<b)?U=re+1:Y=re}return Y}return Cp(l,b,$i,R)}function Cp(l,b,R,U){var Y=0,re=l==null?0:l.length;if(re===0)return 0;b=R(b);for(var de=b!==b,pe=b===null,xe=Wi(b),Oe=b===e;Y<re;){var De=uu((Y+re)/2),ze=R(l[De]),ot=ze!==e,pt=ze===null,At=ze===ze,zt=Wi(ze);if(de)var Ct=U||At;else Oe?Ct=At&&(U||ot):pe?Ct=At&&ot&&(U||!pt):xe?Ct=At&&ot&&!pt&&(U||!zt):pt||zt?Ct=!1:Ct=U?ze<=b:ze<b;Ct?Y=De+1:re=De}return Qr(re,ee)}function q1(l,b){for(var R=-1,U=l.length,Y=0,re=[];++R<U;){var de=l[R],pe=b?b(de):de;if(!R||!$o(pe,xe)){var xe=pe;re[Y++]=de===0?0:de}}return re}function K1(l){return typeof l=="number"?l:Wi(l)?X:+l}function Bi(l){if(typeof l=="string")return l;if(Lt(l))return $(l,Bi)+"";if(Wi(l))return S1?S1.call(l):"";var b=l+"";return b=="0"&&1/l==-W?"-0":b}function ys(l,b,R){var U=-1,Y=Ci,re=l.length,de=!0,pe=[],xe=pe;if(R)de=!1,Y=w;else if(re>=d){var Oe=b?null:X2(l);if(Oe)return it(Oe);de=!1,Y=Rt,xe=new ta}else xe=b?[]:pe;e:for(;++U<re;){var De=l[U],ze=b?b(De):De;if(De=R||De!==0?De:0,de&&ze===ze){for(var ot=xe.length;ot--;)if(xe[ot]===ze)continue e;b&&xe.push(ze),pe.push(De)}else Y(xe,ze,R)||(xe!==pe&&xe.push(ze),pe.push(De))}return pe}function _p(l,b){b=bs(b,l);var R=-1,U=b.length;if(!U)return!0;for(;++R<U;){var Y=So(b[R]);if(Y==="__proto__"&&!fn.call(l,"__proto__")||(Y==="constructor"||Y==="prototype")&&R<U-1)return!1}var re=Cx(l,b);return re==null||delete re[So(ao(b))]}function Y1(l,b,R,U){return Wl(l,b,R(ra(l,b)),U)}function bu(l,b,R,U){for(var Y=l.length,re=U?Y:-1;(U?re--:++re<Y)&&b(l[re],re,l););return R?so(l,U?0:re,U?re+1:Y):so(l,U?re+1:0,U?Y:re)}function X1(l,b){var R=l;return R instanceof Yt&&(R=R.value()),P(b,function(U,Y){return Y.func.apply(Y.thisArg,k([U],Y.args))},R)}function Ap(l,b,R){var U=l.length;if(U<2)return U?ys(l[0]):[];for(var Y=-1,re=ke(U);++Y<U;)for(var de=l[Y],pe=-1;++pe<U;)pe!=Y&&(re[Y]=zl(re[Y]||de,l[pe],b,R));return ys(jr(re,1),b,R)}function J1(l,b,R){for(var U=-1,Y=l.length,re=b.length,de={};++U<Y;){var pe=U<re?b[U]:e;R(de,l[U],pe)}return de}function kp(l){return ar(l)?l:[]}function Sp(l){return typeof l=="function"?l:$i}function bs(l,b){return Lt(l)?l:Np(l,b)?[l]:Sx(pn(l))}var j2=Vt;function ws(l,b,R){var U=l.length;return R=R===e?U:R,!b&&R>=U?l:so(l,b,R)}var Z1=$N||function(l){return Wt.clearTimeout(l)};function Q1(l,b){if(b)return l.slice();var R=l.length,U=w1?w1(R):new l.constructor(R);return l.copy(U),U}function $p(l){var b=new l.constructor(l.byteLength);return new ou(b).set(new ou(l)),b}function B2(l,b){var R=b?$p(l.buffer):l.buffer;return new l.constructor(R,l.byteOffset,l.byteLength)}function W2(l){var b=new l.constructor(l.source,Ft.exec(l));return b.lastIndex=l.lastIndex,b}function H2(l){return Pl?Ut(Pl.call(l)):{}}function ex(l,b){var R=b?$p(l.buffer):l.buffer;return new l.constructor(R,l.byteOffset,l.length)}function tx(l,b){if(l!==b){var R=l!==e,U=l===null,Y=l===l,re=Wi(l),de=b!==e,pe=b===null,xe=b===b,Oe=Wi(b);if(!pe&&!Oe&&!re&&l>b||re&&de&&xe&&!pe&&!Oe||U&&de&&xe||!R&&xe||!Y)return 1;if(!U&&!re&&!Oe&&l<b||Oe&&R&&Y&&!U&&!re||pe&&R&&Y||!de&&Y||!xe)return-1}return 0}function U2(l,b,R){for(var U=-1,Y=l.criteria,re=b.criteria,de=Y.length,pe=R.length;++U<de;){var xe=tx(Y[U],re[U]);if(xe){if(U>=pe)return xe;var Oe=R[U];return xe*(Oe=="desc"?-1:1)}}return l.index-b.index}function nx(l,b,R,U){for(var Y=-1,re=l.length,de=R.length,pe=-1,xe=b.length,Oe=Ar(re-de,0),De=ke(xe+Oe),ze=!U;++pe<xe;)De[pe]=b[pe];for(;++Y<de;)(ze||Y<re)&&(De[R[Y]]=l[Y]);for(;Oe--;)De[pe++]=l[Y++];return De}function rx(l,b,R,U){for(var Y=-1,re=l.length,de=-1,pe=R.length,xe=-1,Oe=b.length,De=Ar(re-pe,0),ze=ke(De+Oe),ot=!U;++Y<De;)ze[Y]=l[Y];for(var pt=Y;++xe<Oe;)ze[pt+xe]=b[xe];for(;++de<pe;)(ot||Y<re)&&(ze[pt+R[de]]=l[Y++]);return ze}function Ai(l,b){var R=-1,U=l.length;for(b||(b=ke(U));++R<U;)b[R]=l[R];return b}function Uo(l,b,R,U){var Y=!R;R||(R={});for(var re=-1,de=b.length;++re<de;){var pe=b[re],xe=U?U(R[pe],l[pe],pe,R,l):e;xe===e&&(xe=l[pe]),Y?Wo(R,pe,xe):Fl(R,pe,xe)}return R}function V2(l,b){return Uo(l,Op(l),b)}function G2(l,b){return Uo(l,mx(l),b)}function wu(l,b){return function(R,U){var Y=Lt(R)?Wa:p2,re=b?b():{};return Y(R,l,_t(U,2),re)}}function Ga(l){return Vt(function(b,R){var U=-1,Y=R.length,re=Y>1?R[Y-1]:e,de=Y>2?R[2]:e;for(re=l.length>3&&typeof re=="function"?(Y--,re):e,de&&hi(R[0],R[1],de)&&(re=Y<3?e:re,Y=1),b=Ut(b);++U<Y;){var pe=R[U];pe&&l(b,pe,U,re)}return b})}function ix(l,b){return function(R,U){if(R==null)return R;if(!ki(R))return l(R,U);for(var Y=R.length,re=b?Y:-1,de=Ut(R);(b?re--:++re<Y)&&U(de[re],re,de)!==!1;);return R}}function ox(l){return function(b,R,U){for(var Y=-1,re=Ut(b),de=U(b),pe=de.length;pe--;){var xe=de[l?pe:++Y];if(R(re[xe],xe,re)===!1)break}return b}}function q2(l,b,R){var U=b&y,Y=Hl(l);function re(){var de=this&&this!==Wt&&this instanceof re?Y:l;return de.apply(U?R:this,arguments)}return re}function sx(l){return function(b){b=pn(b);var R=ge(b)?kt(b):e,U=R?R[0]:b.charAt(0),Y=R?ws(R,1).join(""):b.slice(1);return U[l]()+Y}}function qa(l){return function(b){return P(oC(iC(b).replace(Xo,"")),l,"")}}function Hl(l){return function(){var b=arguments;switch(b.length){case 0:return new l;case 1:return new l(b[0]);case 2:return new l(b[0],b[1]);case 3:return new l(b[0],b[1],b[2]);case 4:return new l(b[0],b[1],b[2],b[3]);case 5:return new l(b[0],b[1],b[2],b[3],b[4]);case 6:return new l(b[0],b[1],b[2],b[3],b[4],b[5]);case 7:return new l(b[0],b[1],b[2],b[3],b[4],b[5],b[6])}var R=Va(l.prototype),U=l.apply(R,b);return qn(U)?U:R}}function K2(l,b,R){var U=Hl(l);function Y(){for(var re=arguments.length,de=ke(re),pe=re,xe=Ka(Y);pe--;)de[pe]=arguments[pe];var Oe=re<3&&de[0]!==xe&&de[re-1]!==xe?[]:Je(de,xe);if(re-=Oe.length,re<R)return hx(l,b,xu,Y.placeholder,e,de,Oe,e,e,R-re);var De=this&&this!==Wt&&this instanceof Y?U:l;return hn(De,this,de)}return Y}function ax(l){return function(b,R,U){var Y=Ut(b);if(!ki(b)){var re=_t(R,3);b=Er(b),R=function(pe){return re(Y[pe],pe,Y)}}var de=l(b,R,U);return de>-1?Y[re?b[de]:de]:e}}function lx(l){return ns(function(b){var R=b.length,U=R,Y=io.prototype.thru;for(l&&b.reverse();U--;){var re=b[U];if(typeof re!="function")throw new En(f);if(Y&&!de&&ku(re)=="wrapper")var de=new io([],!0)}for(U=de?U:R;++U<R;){re=b[U];var pe=ku(re),xe=pe=="wrapper"?Mp(re):e;xe&&Dp(xe[0])&&xe[1]==(O|S|C|M)&&!xe[4].length&&xe[9]==1?de=de[ku(xe[0])].apply(de,xe[3]):de=re.length==1&&Dp(re)?de[pe]():de.thru(re)}return function(){var Oe=arguments,De=Oe[0];if(de&&Oe.length==1&&Lt(De))return de.plant(De).value();for(var ze=0,ot=R?b[ze].apply(this,Oe):De;++ze<R;)ot=b[ze].call(this,ot);return ot}})}function xu(l,b,R,U,Y,re,de,pe,xe,Oe){var De=b&O,ze=b&y,ot=b&x,pt=b&(S|_),At=b&I,zt=ot?e:Hl(l);function Ct(){for(var Gt=arguments.length,Jt=ke(Gt),Hi=Gt;Hi--;)Jt[Hi]=arguments[Hi];if(pt)var di=Ka(Ct),Ui=Bn(Jt,di);if(U&&(Jt=nx(Jt,U,Y,pt)),re&&(Jt=rx(Jt,re,de,pt)),Gt-=Ui,pt&&Gt<Oe){var lr=Je(Jt,di);return hx(l,b,xu,Ct.placeholder,R,Jt,lr,pe,xe,Oe-Gt)}var Eo=ze?R:this,ss=ot?Eo[l]:l;return Gt=Jt.length,pe?Jt=pD(Jt,pe):At&&Gt>1&&Jt.reverse(),De&&xe<Gt&&(Jt.length=xe),this&&this!==Wt&&this instanceof Ct&&(ss=zt||Hl(ss)),ss.apply(Eo,Jt)}return Ct}function cx(l,b){return function(R,U){return C2(R,l,b(U),{})}}function Cu(l,b){return function(R,U){var Y;if(R===e&&U===e)return b;if(R!==e&&(Y=R),U!==e){if(Y===e)return U;typeof R=="string"||typeof U=="string"?(R=Bi(R),U=Bi(U)):(R=K1(R),U=K1(U)),Y=l(R,U)}return Y}}function Ep(l){return ns(function(b){return b=$(b,en(_t())),Vt(function(R){var U=this;return l(b,function(Y){return hn(Y,U,R)})})})}function _u(l,b){b=b===e?" ":Bi(b);var R=b.length;if(R<2)return R?xp(b,l):b;var U=xp(b,cu(l/Ht(b)));return ge(b)?ws(kt(U),0,l).join(""):U.slice(0,l)}function Y2(l,b,R,U){var Y=b&y,re=Hl(l);function de(){for(var pe=-1,xe=arguments.length,Oe=-1,De=U.length,ze=ke(De+xe),ot=this&&this!==Wt&&this instanceof de?re:l;++Oe<De;)ze[Oe]=U[Oe];for(;xe--;)ze[Oe++]=arguments[++pe];return hn(ot,Y?R:this,ze)}return de}function ux(l){return function(b,R,U){return U&&typeof U!="number"&&hi(b,R,U)&&(R=U=e),b=os(b),R===e?(R=b,b=0):R=os(R),U=U===e?b<R?1:-1:os(U),O2(b,R,U,l)}}function Au(l){return function(b,R){return typeof b=="string"&&typeof R=="string"||(b=lo(b),R=lo(R)),l(b,R)}}function hx(l,b,R,U,Y,re,de,pe,xe,Oe){var De=b&S,ze=De?de:e,ot=De?e:de,pt=De?re:e,At=De?e:re;b|=De?C:L,b&=~(De?L:C),b&T||(b&=-4);var zt=[l,b,Y,pt,ze,At,ot,pe,xe,Oe],Ct=R.apply(e,zt);return Dp(l)&&_x(Ct,zt),Ct.placeholder=U,Ax(Ct,l,b)}function Tp(l){var b=sn[l];return function(R,U){if(R=lo(R),U=U==null?0:Qr(Dt(U),292),U&&A1(R)){var Y=(pn(R)+"e").split("e"),re=b(Y[0]+"e"+(+Y[1]+U));return Y=(pn(re)+"e").split("e"),+(Y[0]+"e"+(+Y[1]-U))}return b(R)}}var X2=Ha&&1/it(new Ha([,-0]))[1]==W?function(l){return new Ha(l)}:Zp;function dx(l){return function(b){var R=ei(b);return R==We?je(b):R==Bt?ut(b):On(b,l(b))}}function ts(l,b,R,U,Y,re,de,pe){var xe=b&x;if(!xe&&typeof l!="function")throw new En(f);var Oe=U?U.length:0;if(Oe||(b&=-97,U=Y=e),de=de===e?de:Ar(Dt(de),0),pe=pe===e?pe:Dt(pe),Oe-=Y?Y.length:0,b&L){var De=U,ze=Y;U=Y=e}var ot=xe?e:Mp(l),pt=[l,b,R,U,Y,De,ze,re,de,pe];if(ot&&hD(pt,ot),l=pt[0],b=pt[1],R=pt[2],U=pt[3],Y=pt[4],pe=pt[9]=pt[9]===e?xe?0:l.length:Ar(pt[9]-Oe,0),!pe&&b&(S|_)&&(b&=-25),!b||b==y)var At=q2(l,b,R);else b==S||b==_?At=K2(l,b,pe):(b==C||b==(y|C))&&!Y.length?At=Y2(l,b,R,U):At=xu.apply(e,pt);var zt=ot?G1:_x;return Ax(zt(At,pt),l,b)}function fx(l,b,R,U){return l===e||$o(l,Zo[R])&&!fn.call(U,R)?b:l}function px(l,b,R,U,Y,re){return qn(l)&&qn(b)&&(re.set(b,l),vu(l,b,e,px,re),re.delete(b)),l}function J2(l){return Gl(l)?e:l}function gx(l,b,R,U,Y,re){var de=R&h,pe=l.length,xe=b.length;if(pe!=xe&&!(de&&xe>pe))return!1;var Oe=re.get(l),De=re.get(b);if(Oe&&De)return Oe==b&&De==l;var ze=-1,ot=!0,pt=R&m?new ta:e;for(re.set(l,b),re.set(b,l);++ze<pe;){var At=l[ze],zt=b[ze];if(U)var Ct=de?U(zt,At,ze,b,l,re):U(At,zt,ze,l,b,re);if(Ct!==e){if(Ct)continue;ot=!1;break}if(pt){if(!H(b,function(Gt,Jt){if(!Rt(pt,Jt)&&(At===Gt||Y(At,Gt,R,U,re)))return pt.push(Jt)})){ot=!1;break}}else if(!(At===zt||Y(At,zt,R,U,re))){ot=!1;break}}return re.delete(l),re.delete(b),ot}function Z2(l,b,R,U,Y,re,de){switch(R){case Kn:if(l.byteLength!=b.byteLength||l.byteOffset!=b.byteOffset)return!1;l=l.buffer,b=b.buffer;case Hn:return!(l.byteLength!=b.byteLength||!re(new ou(l),new ou(b)));case Te:case Re:case Ie:return $o(+l,+b);case Ue:return l.name==b.name&&l.message==b.message;case rr:case Rn:return l==b+"";case We:var pe=je;case Bt:var xe=U&h;if(pe||(pe=it),l.size!=b.size&&!xe)return!1;var Oe=de.get(l);if(Oe)return Oe==b;U|=m,de.set(l,b);var De=gx(pe(l),pe(b),U,Y,re,de);return de.delete(l),De;case bt:if(Pl)return Pl.call(l)==Pl.call(b)}return!1}function Q2(l,b,R,U,Y,re){var de=R&h,pe=Rp(l),xe=pe.length,Oe=Rp(b),De=Oe.length;if(xe!=De&&!de)return!1;for(var ze=xe;ze--;){var ot=pe[ze];if(!(de?ot in b:fn.call(b,ot)))return!1}var pt=re.get(l),At=re.get(b);if(pt&&At)return pt==b&&At==l;var zt=!0;re.set(l,b),re.set(b,l);for(var Ct=de;++ze<xe;){ot=pe[ze];var Gt=l[ot],Jt=b[ot];if(U)var Hi=de?U(Jt,Gt,ot,b,l,re):U(Gt,Jt,ot,l,b,re);if(!(Hi===e?Gt===Jt||Y(Gt,Jt,R,U,re):Hi)){zt=!1;break}Ct||(Ct=ot=="constructor")}if(zt&&!Ct){var di=l.constructor,Ui=b.constructor;di!=Ui&&"constructor"in l&&"constructor"in b&&!(typeof di=="function"&&di instanceof di&&typeof Ui=="function"&&Ui instanceof Ui)&&(zt=!1)}return re.delete(l),re.delete(b),zt}function ns(l){return Fp(xx(l,e,Rx),l+"")}function Rp(l){return N1(l,Er,Op)}function Ip(l){return N1(l,Si,mx)}var Mp=hu?function(l){return hu.get(l)}:Zp;function ku(l){for(var b=l.name+"",R=Ua[b],U=fn.call(Ua,b)?R.length:0;U--;){var Y=R[U],re=Y.func;if(re==null||re==l)return Y.name}return b}function Ka(l){var b=fn.call(te,"placeholder")?te:l;return b.placeholder}function _t(){var l=te.iteratee||Xp;return l=l===Xp?F1:l,arguments.length?l(arguments[0],arguments[1]):l}function Su(l,b){var R=l.__data__;return aD(b)?R[typeof b=="string"?"string":"hash"]:R.map}function Lp(l){for(var b=Er(l),R=b.length;R--;){var U=b[R],Y=l[U];b[R]=[U,Y,bx(Y)]}return b}function ia(l,b){var R=ce(l,b);return P1(R)?R:e}function eD(l){var b=fn.call(l,Qs),R=l[Qs];try{l[Qs]=e;var U=!0}catch{}var Y=ru.call(l);return U&&(b?l[Qs]=R:delete l[Qs]),Y}var Op=ap?function(l){return l==null?[]:(l=Ut(l),Pr(ap(l),function(b){return C1.call(l,b)}))}:Qp,mx=ap?function(l){for(var b=[];l;)k(b,Op(l)),l=su(l);return b}:Qp,ei=ui;(lp&&ei(new lp(new ArrayBuffer(1)))!=Kn||Ol&&ei(new Ol)!=We||cp&&ei(cp.resolve())!=tn||Ha&&ei(new Ha)!=Bt||Nl&&ei(new Nl)!=Pt)&&(ei=function(l){var b=ui(l),R=b==dt?l.constructor:e,U=R?oa(R):"";if(U)switch(U){case DN:return Kn;case PN:return We;case FN:return tn;case zN:return Bt;case jN:return Pt}return b});function tD(l,b,R){for(var U=-1,Y=R.length;++U<Y;){var re=R[U],de=re.size;switch(re.type){case"drop":l+=de;break;case"dropRight":b-=de;break;case"take":b=Qr(b,l+de);break;case"takeRight":l=Ar(l,b-de);break}}return{start:l,end:b}}function nD(l){var b=l.match(Ni);return b?b[1].split(ps):[]}function vx(l,b,R){b=bs(b,l);for(var U=-1,Y=b.length,re=!1;++U<Y;){var de=So(b[U]);if(!(re=l!=null&&R(l,de)))break;l=l[de]}return re||++U!=Y?re:(Y=l==null?0:l.length,!!Y&&Lu(Y)&&rs(de,Y)&&(Lt(l)||sa(l)))}function rD(l){var b=l.length,R=new l.constructor(b);return b&&typeof l[0]=="string"&&fn.call(l,"index")&&(R.index=l.index,R.input=l.input),R}function yx(l){return typeof l.constructor=="function"&&!Ul(l)?Va(su(l)):{}}function iD(l,b,R){var U=l.constructor;switch(b){case Hn:return $p(l);case Te:case Re:return new U(+l);case Kn:return B2(l,R);case Un:case wn:case Dn:case ir:case on:case Yn:case Ii:case si:case hr:return ex(l,R);case We:return new U;case Ie:case Rn:return new U(l);case rr:return W2(l);case Bt:return new U;case bt:return H2(l)}}function oD(l,b){var R=b.length;if(!R)return l;var U=R-1;return b[U]=(R>1?"& ":"")+b[U],b=b.join(R>2?", ":" "),l.replace(Oi,`{
1460
+ /* [wrapped with `+b+`] */
1461
+ `)}function sD(l){return Lt(l)||sa(l)||!!(_1&&l&&l[_1])}function rs(l,b){var R=typeof l;return b=b??V,!!b&&(R=="number"||R!="symbol"&&Fn.test(l))&&l>-1&&l%1==0&&l<b}function hi(l,b,R){if(!qn(R))return!1;var U=typeof b;return(U=="number"?ki(R)&&rs(b,R.length):U=="string"&&b in R)?$o(R[b],l):!1}function Np(l,b){if(Lt(l))return!1;var R=typeof l;return R=="number"||R=="symbol"||R=="boolean"||l==null||Wi(l)?!0:Mn.test(l)||!ai.test(l)||b!=null&&l in Ut(b)}function aD(l){var b=typeof l;return b=="string"||b=="number"||b=="symbol"||b=="boolean"?l!=="__proto__":l===null}function Dp(l){var b=ku(l),R=te[b];if(typeof R!="function"||!(b in Yt.prototype))return!1;if(l===R)return!0;var U=Mp(R);return!!U&&l===U[0]}function lD(l){return!!b1&&b1 in l}var cD=tu?is:eg;function Ul(l){var b=l&&l.constructor,R=typeof b=="function"&&b.prototype||Zo;return l===R}function bx(l){return l===l&&!qn(l)}function wx(l,b){return function(R){return R==null?!1:R[l]===b&&(b!==e||l in Ut(R))}}function uD(l){var b=Iu(l,function(U){return R.size===i&&R.clear(),U}),R=b.cache;return b}function hD(l,b){var R=l[1],U=b[1],Y=R|U,re=Y<(y|x|O),de=U==O&&R==S||U==O&&R==M&&l[7].length<=b[8]||U==(O|M)&&b[7].length<=b[8]&&R==S;if(!(re||de))return l;U&y&&(l[2]=b[2],Y|=R&y?0:T);var pe=b[3];if(pe){var xe=l[3];l[3]=xe?nx(xe,pe,b[4]):pe,l[4]=xe?Je(l[3],o):b[4]}return pe=b[5],pe&&(xe=l[5],l[5]=xe?rx(xe,pe,b[6]):pe,l[6]=xe?Je(l[5],o):b[6]),pe=b[7],pe&&(l[7]=pe),U&O&&(l[8]=l[8]==null?b[8]:Qr(l[8],b[8])),l[9]==null&&(l[9]=b[9]),l[0]=b[0],l[1]=Y,l}function dD(l){var b=[];if(l!=null)for(var R in Ut(l))b.push(R);return b}function fD(l){return ru.call(l)}function xx(l,b,R){return b=Ar(b===e?l.length-1:b,0),function(){for(var U=arguments,Y=-1,re=Ar(U.length-b,0),de=ke(re);++Y<re;)de[Y]=U[b+Y];Y=-1;for(var pe=ke(b+1);++Y<b;)pe[Y]=U[Y];return pe[b]=R(de),hn(l,this,pe)}}function Cx(l,b){return b.length<2?l:ra(l,so(b,0,-1))}function pD(l,b){for(var R=l.length,U=Qr(b.length,R),Y=Ai(l);U--;){var re=b[U];l[U]=rs(re,R)?Y[re]:e}return l}function Pp(l,b){if(!(b==="constructor"&&typeof l[b]=="function")&&b!="__proto__")return l[b]}var _x=kx(G1),Vl=TN||function(l,b){return Wt.setTimeout(l,b)},Fp=kx(P2);function Ax(l,b,R){var U=b+"";return Fp(l,oD(U,gD(nD(U),R)))}function kx(l){var b=0,R=0;return function(){var U=LN(),Y=E-(U-R);if(R=U,Y>0){if(++b>=N)return arguments[0]}else b=0;return l.apply(e,arguments)}}function $u(l,b){var R=-1,U=l.length,Y=U-1;for(b=b===e?U:b;++R<b;){var re=wp(R,Y),de=l[re];l[re]=l[R],l[R]=de}return l.length=b,l}var Sx=uD(function(l){var b=[];return l.charCodeAt(0)===46&&b.push(""),l.replace(qr,function(R,U,Y,re){b.push(Y?re.replace($r,"$1"):U||R)}),b});function So(l){if(typeof l=="string"||Wi(l))return l;var b=l+"";return b=="0"&&1/l==-W?"-0":b}function oa(l){if(l!=null){try{return nu.call(l)}catch{}try{return l+""}catch{}}return""}function gD(l,b){return Cr(ue,function(R){var U="_."+R[0];b&R[1]&&!Ci(l,U)&&l.push(U)}),l.sort()}function $x(l){if(l instanceof Yt)return l.clone();var b=new io(l.__wrapped__,l.__chain__);return b.__actions__=Ai(l.__actions__),b.__index__=l.__index__,b.__values__=l.__values__,b}function mD(l,b,R){(R?hi(l,b,R):b===e)?b=1:b=Ar(Dt(b),0);var U=l==null?0:l.length;if(!U||b<1)return[];for(var Y=0,re=0,de=ke(cu(U/b));Y<U;)de[re++]=so(l,Y,Y+=b);return de}function vD(l){for(var b=-1,R=l==null?0:l.length,U=0,Y=[];++b<R;){var re=l[b];re&&(Y[U++]=re)}return Y}function yD(){var l=arguments.length;if(!l)return[];for(var b=ke(l-1),R=arguments[0],U=l;U--;)b[U-1]=arguments[U];return k(Lt(R)?Ai(R):[R],jr(b,1))}var bD=Vt(function(l,b){return ar(l)?zl(l,jr(b,1,ar,!0)):[]}),wD=Vt(function(l,b){var R=ao(b);return ar(R)&&(R=e),ar(l)?zl(l,jr(b,1,ar,!0),_t(R,2)):[]}),xD=Vt(function(l,b){var R=ao(b);return ar(R)&&(R=e),ar(l)?zl(l,jr(b,1,ar,!0),e,R):[]});function CD(l,b,R){var U=l==null?0:l.length;return U?(b=R||b===e?1:Dt(b),so(l,b<0?0:b,U)):[]}function _D(l,b,R){var U=l==null?0:l.length;return U?(b=R||b===e?1:Dt(b),b=U-b,so(l,0,b<0?0:b)):[]}function AD(l,b){return l&&l.length?bu(l,_t(b,3),!0,!0):[]}function kD(l,b){return l&&l.length?bu(l,_t(b,3),!0):[]}function SD(l,b,R,U){var Y=l==null?0:l.length;return Y?(R&&typeof R!="number"&&hi(l,b,R)&&(R=0,U=Y),y2(l,b,R,U)):[]}function Ex(l,b,R){var U=l==null?0:l.length;if(!U)return-1;var Y=R==null?0:Dt(R);return Y<0&&(Y=Ar(U+Y,0)),he(l,_t(b,3),Y)}function Tx(l,b,R){var U=l==null?0:l.length;if(!U)return-1;var Y=U-1;return R!==e&&(Y=Dt(R),Y=R<0?Ar(U+Y,0):Qr(Y,U-1)),he(l,_t(b,3),Y,!0)}function Rx(l){var b=l==null?0:l.length;return b?jr(l,1):[]}function $D(l){var b=l==null?0:l.length;return b?jr(l,W):[]}function ED(l,b){var R=l==null?0:l.length;return R?(b=b===e?1:Dt(b),jr(l,b)):[]}function TD(l){for(var b=-1,R=l==null?0:l.length,U={};++b<R;){var Y=l[b];Wo(U,Y[0],Y[1])}return U}function Ix(l){return l&&l.length?l[0]:e}function RD(l,b,R){var U=l==null?0:l.length;if(!U)return-1;var Y=R==null?0:Dt(R);return Y<0&&(Y=Ar(U+Y,0)),we(l,b,Y)}function ID(l){var b=l==null?0:l.length;return b?so(l,0,-1):[]}var MD=Vt(function(l){var b=$(l,kp);return b.length&&b[0]===l[0]?gp(b):[]}),LD=Vt(function(l){var b=ao(l),R=$(l,kp);return b===ao(R)?b=e:R.pop(),R.length&&R[0]===l[0]?gp(R,_t(b,2)):[]}),OD=Vt(function(l){var b=ao(l),R=$(l,kp);return b=typeof b=="function"?b:e,b&&R.pop(),R.length&&R[0]===l[0]?gp(R,e,b):[]});function ND(l,b){return l==null?"":IN.call(l,b)}function ao(l){var b=l==null?0:l.length;return b?l[b-1]:e}function DD(l,b,R){var U=l==null?0:l.length;if(!U)return-1;var Y=U;return R!==e&&(Y=Dt(R),Y=Y<0?Ar(U+Y,0):Qr(Y,U-1)),b===b?nn(l,b,Y):he(l,be,Y,!0)}function PD(l,b){return l&&l.length?W1(l,Dt(b)):e}var FD=Vt(Mx);function Mx(l,b){return l&&l.length&&b&&b.length?bp(l,b):l}function zD(l,b,R){return l&&l.length&&b&&b.length?bp(l,b,_t(R,2)):l}function jD(l,b,R){return l&&l.length&&b&&b.length?bp(l,b,e,R):l}var BD=ns(function(l,b){var R=l==null?0:l.length,U=hp(l,b);return V1(l,$(b,function(Y){return rs(Y,R)?+Y:Y}).sort(tx)),U});function WD(l,b){var R=[];if(!(l&&l.length))return R;var U=-1,Y=[],re=l.length;for(b=_t(b,3);++U<re;){var de=l[U];b(de,U,l)&&(R.push(de),Y.push(U))}return V1(l,Y),R}function zp(l){return l==null?l:NN.call(l)}function HD(l,b,R){var U=l==null?0:l.length;return U?(R&&typeof R!="number"&&hi(l,b,R)?(b=0,R=U):(b=b==null?0:Dt(b),R=R===e?U:Dt(R)),so(l,b,R)):[]}function UD(l,b){return yu(l,b)}function VD(l,b,R){return Cp(l,b,_t(R,2))}function GD(l,b){var R=l==null?0:l.length;if(R){var U=yu(l,b);if(U<R&&$o(l[U],b))return U}return-1}function qD(l,b){return yu(l,b,!0)}function KD(l,b,R){return Cp(l,b,_t(R,2),!0)}function YD(l,b){var R=l==null?0:l.length;if(R){var U=yu(l,b,!0)-1;if($o(l[U],b))return U}return-1}function XD(l){return l&&l.length?q1(l):[]}function JD(l,b){return l&&l.length?q1(l,_t(b,2)):[]}function ZD(l){var b=l==null?0:l.length;return b?so(l,1,b):[]}function QD(l,b,R){return l&&l.length?(b=R||b===e?1:Dt(b),so(l,0,b<0?0:b)):[]}function eP(l,b,R){var U=l==null?0:l.length;return U?(b=R||b===e?1:Dt(b),b=U-b,so(l,b<0?0:b,U)):[]}function tP(l,b){return l&&l.length?bu(l,_t(b,3),!1,!0):[]}function nP(l,b){return l&&l.length?bu(l,_t(b,3)):[]}var rP=Vt(function(l){return ys(jr(l,1,ar,!0))}),iP=Vt(function(l){var b=ao(l);return ar(b)&&(b=e),ys(jr(l,1,ar,!0),_t(b,2))}),oP=Vt(function(l){var b=ao(l);return b=typeof b=="function"?b:e,ys(jr(l,1,ar,!0),e,b)});function sP(l){return l&&l.length?ys(l):[]}function aP(l,b){return l&&l.length?ys(l,_t(b,2)):[]}function lP(l,b){return b=typeof b=="function"?b:e,l&&l.length?ys(l,e,b):[]}function jp(l){if(!(l&&l.length))return[];var b=0;return l=Pr(l,function(R){if(ar(R))return b=Ar(R.length,b),!0}),ht(b,function(R){return $(l,Pe(R))})}function Lx(l,b){if(!(l&&l.length))return[];var R=jp(l);return b==null?R:$(R,function(U){return hn(b,e,U)})}var cP=Vt(function(l,b){return ar(l)?zl(l,b):[]}),uP=Vt(function(l){return Ap(Pr(l,ar))}),hP=Vt(function(l){var b=ao(l);return ar(b)&&(b=e),Ap(Pr(l,ar),_t(b,2))}),dP=Vt(function(l){var b=ao(l);return b=typeof b=="function"?b:e,Ap(Pr(l,ar),e,b)}),fP=Vt(jp);function pP(l,b){return J1(l||[],b||[],Fl)}function gP(l,b){return J1(l||[],b||[],Wl)}var mP=Vt(function(l){var b=l.length,R=b>1?l[b-1]:e;return R=typeof R=="function"?(l.pop(),R):e,Lx(l,R)});function Ox(l){var b=te(l);return b.__chain__=!0,b}function vP(l,b){return b(l),l}function Eu(l,b){return b(l)}var yP=ns(function(l){var b=l.length,R=b?l[0]:0,U=this.__wrapped__,Y=function(re){return hp(re,l)};return b>1||this.__actions__.length||!(U instanceof Yt)||!rs(R)?this.thru(Y):(U=U.slice(R,+R+(b?1:0)),U.__actions__.push({func:Eu,args:[Y],thisArg:e}),new io(U,this.__chain__).thru(function(re){return b&&!re.length&&re.push(e),re}))});function bP(){return Ox(this)}function wP(){return new io(this.value(),this.__chain__)}function xP(){this.__values__===e&&(this.__values__=Kx(this.value()));var l=this.__index__>=this.__values__.length,b=l?e:this.__values__[this.__index__++];return{done:l,value:b}}function CP(){return this}function _P(l){for(var b,R=this;R instanceof fu;){var U=$x(R);U.__index__=0,U.__values__=e,b?Y.__wrapped__=U:b=U;var Y=U;R=R.__wrapped__}return Y.__wrapped__=l,b}function AP(){var l=this.__wrapped__;if(l instanceof Yt){var b=l;return this.__actions__.length&&(b=new Yt(this)),b=b.reverse(),b.__actions__.push({func:Eu,args:[zp],thisArg:e}),new io(b,this.__chain__)}return this.thru(zp)}function kP(){return X1(this.__wrapped__,this.__actions__)}var SP=wu(function(l,b,R){fn.call(l,R)?++l[R]:Wo(l,R,1)});function $P(l,b,R){var U=Lt(l)?Bo:v2;return R&&hi(l,b,R)&&(b=e),U(l,_t(b,3))}function EP(l,b){var R=Lt(l)?Pr:L1;return R(l,_t(b,3))}var TP=ax(Ex),RP=ax(Tx);function IP(l,b){return jr(Tu(l,b),1)}function MP(l,b){return jr(Tu(l,b),W)}function LP(l,b,R){return R=R===e?1:Dt(R),jr(Tu(l,b),R)}function Nx(l,b){var R=Lt(l)?Cr:vs;return R(l,_t(b,3))}function Dx(l,b){var R=Lt(l)?Zr:M1;return R(l,_t(b,3))}var OP=wu(function(l,b,R){fn.call(l,R)?l[R].push(b):Wo(l,R,[b])});function NP(l,b,R,U){l=ki(l)?l:Xa(l),R=R&&!U?Dt(R):0;var Y=l.length;return R<0&&(R=Ar(Y+R,0)),Ou(l)?R<=Y&&l.indexOf(b,R)>-1:!!Y&&we(l,b,R)>-1}var DP=Vt(function(l,b,R){var U=-1,Y=typeof b=="function",re=ki(l)?ke(l.length):[];return vs(l,function(de){re[++U]=Y?hn(b,de,R):jl(de,b,R)}),re}),PP=wu(function(l,b,R){Wo(l,R,b)});function Tu(l,b){var R=Lt(l)?$:z1;return R(l,_t(b,3))}function FP(l,b,R,U){return l==null?[]:(Lt(b)||(b=b==null?[]:[b]),R=U?e:R,Lt(R)||(R=R==null?[]:[R]),H1(l,b,R))}var zP=wu(function(l,b,R){l[R?0:1].push(b)},function(){return[[],[]]});function jP(l,b,R){var U=Lt(l)?P:et,Y=arguments.length<3;return U(l,_t(b,4),R,Y,vs)}function BP(l,b,R){var U=Lt(l)?z:et,Y=arguments.length<3;return U(l,_t(b,4),R,Y,M1)}function WP(l,b){var R=Lt(l)?Pr:L1;return R(l,Mu(_t(b,3)))}function HP(l){var b=Lt(l)?E1:N2;return b(l)}function UP(l,b,R){(R?hi(l,b,R):b===e)?b=1:b=Dt(b);var U=Lt(l)?d2:D2;return U(l,b)}function VP(l){var b=Lt(l)?f2:F2;return b(l)}function GP(l){if(l==null)return 0;if(ki(l))return Ou(l)?Ht(l):l.length;var b=ei(l);return b==We||b==Bt?l.size:vp(l).length}function qP(l,b,R){var U=Lt(l)?H:z2;return R&&hi(l,b,R)&&(b=e),U(l,_t(b,3))}var KP=Vt(function(l,b){if(l==null)return[];var R=b.length;return R>1&&hi(l,b[0],b[1])?b=[]:R>2&&hi(b[0],b[1],b[2])&&(b=[b[0]]),H1(l,jr(b,1),[])}),Ru=EN||function(){return Wt.Date.now()};function YP(l,b){if(typeof b!="function")throw new En(f);return l=Dt(l),function(){if(--l<1)return b.apply(this,arguments)}}function Px(l,b,R){return b=R?e:b,b=l&&b==null?l.length:b,ts(l,O,e,e,e,e,b)}function Fx(l,b){var R;if(typeof b!="function")throw new En(f);return l=Dt(l),function(){return--l>0&&(R=b.apply(this,arguments)),l<=1&&(b=e),R}}var Bp=Vt(function(l,b,R){var U=y;if(R.length){var Y=Je(R,Ka(Bp));U|=C}return ts(l,U,b,R,Y)}),zx=Vt(function(l,b,R){var U=y|x;if(R.length){var Y=Je(R,Ka(zx));U|=C}return ts(b,U,l,R,Y)});function jx(l,b,R){b=R?e:b;var U=ts(l,S,e,e,e,e,e,b);return U.placeholder=jx.placeholder,U}function Bx(l,b,R){b=R?e:b;var U=ts(l,_,e,e,e,e,e,b);return U.placeholder=Bx.placeholder,U}function Wx(l,b,R){var U,Y,re,de,pe,xe,Oe=0,De=!1,ze=!1,ot=!0;if(typeof l!="function")throw new En(f);b=lo(b)||0,qn(R)&&(De=!!R.leading,ze="maxWait"in R,re=ze?Ar(lo(R.maxWait)||0,b):re,ot="trailing"in R?!!R.trailing:ot);function pt(lr){var Eo=U,ss=Y;return U=Y=e,Oe=lr,de=l.apply(ss,Eo),de}function At(lr){return Oe=lr,pe=Vl(Gt,b),De?pt(lr):de}function zt(lr){var Eo=lr-xe,ss=lr-Oe,lC=b-Eo;return ze?Qr(lC,re-ss):lC}function Ct(lr){var Eo=lr-xe,ss=lr-Oe;return xe===e||Eo>=b||Eo<0||ze&&ss>=re}function Gt(){var lr=Ru();if(Ct(lr))return Jt(lr);pe=Vl(Gt,zt(lr))}function Jt(lr){return pe=e,ot&&U?pt(lr):(U=Y=e,de)}function Hi(){pe!==e&&Z1(pe),Oe=0,U=xe=Y=pe=e}function di(){return pe===e?de:Jt(Ru())}function Ui(){var lr=Ru(),Eo=Ct(lr);if(U=arguments,Y=this,xe=lr,Eo){if(pe===e)return At(xe);if(ze)return Z1(pe),pe=Vl(Gt,b),pt(xe)}return pe===e&&(pe=Vl(Gt,b)),de}return Ui.cancel=Hi,Ui.flush=di,Ui}var XP=Vt(function(l,b){return I1(l,1,b)}),JP=Vt(function(l,b,R){return I1(l,lo(b)||0,R)});function ZP(l){return ts(l,I)}function Iu(l,b){if(typeof l!="function"||b!=null&&typeof b!="function")throw new En(f);var R=function(){var U=arguments,Y=b?b.apply(this,U):U[0],re=R.cache;if(re.has(Y))return re.get(Y);var de=l.apply(this,U);return R.cache=re.set(Y,de)||re,de};return R.cache=new(Iu.Cache||es),R}Iu.Cache=es;function Mu(l){if(typeof l!="function")throw new En(f);return function(){var b=arguments;switch(b.length){case 0:return!l.call(this);case 1:return!l.call(this,b[0]);case 2:return!l.call(this,b[0],b[1]);case 3:return!l.call(this,b[0],b[1],b[2])}return!l.apply(this,b)}}function QP(l){return Fx(2,l)}var eF=j2(function(l,b){b=b.length==1&&Lt(b[0])?$(b[0],en(_t())):$(jr(b,1),en(_t()));var R=b.length;return Vt(function(U){for(var Y=-1,re=Qr(U.length,R);++Y<re;)U[Y]=b[Y].call(this,U[Y]);return hn(l,this,U)})}),Wp=Vt(function(l,b){var R=Je(b,Ka(Wp));return ts(l,C,e,b,R)}),Hx=Vt(function(l,b){var R=Je(b,Ka(Hx));return ts(l,L,e,b,R)}),tF=ns(function(l,b){return ts(l,M,e,e,e,b)});function nF(l,b){if(typeof l!="function")throw new En(f);return b=b===e?b:Dt(b),Vt(l,b)}function rF(l,b){if(typeof l!="function")throw new En(f);return b=b==null?0:Ar(Dt(b),0),Vt(function(R){var U=R[b],Y=ws(R,0,b);return U&&k(Y,U),hn(l,this,Y)})}function iF(l,b,R){var U=!0,Y=!0;if(typeof l!="function")throw new En(f);return qn(R)&&(U="leading"in R?!!R.leading:U,Y="trailing"in R?!!R.trailing:Y),Wx(l,b,{leading:U,maxWait:b,trailing:Y})}function oF(l){return Px(l,1)}function sF(l,b){return Wp(Sp(b),l)}function aF(){if(!arguments.length)return[];var l=arguments[0];return Lt(l)?l:[l]}function lF(l){return oo(l,s)}function cF(l,b){return b=typeof b=="function"?b:e,oo(l,s,b)}function uF(l){return oo(l,c|s)}function hF(l,b){return b=typeof b=="function"?b:e,oo(l,c|s,b)}function dF(l,b){return b==null||R1(l,b,Er(b))}function $o(l,b){return l===b||l!==l&&b!==b}var fF=Au(pp),pF=Au(function(l,b){return l>=b}),sa=D1((function(){return arguments})())?D1:function(l){return Qn(l)&&fn.call(l,"callee")&&!C1.call(l,"callee")},Lt=ke.isArray,gF=gs?en(gs):_2;function ki(l){return l!=null&&Lu(l.length)&&!is(l)}function ar(l){return Qn(l)&&ki(l)}function mF(l){return l===!0||l===!1||Qn(l)&&ui(l)==Te}var xs=RN||eg,vF=Zn?en(Zn):A2;function yF(l){return Qn(l)&&l.nodeType===1&&!Gl(l)}function bF(l){if(l==null)return!0;if(ki(l)&&(Lt(l)||typeof l=="string"||typeof l.splice=="function"||xs(l)||Ya(l)||sa(l)))return!l.length;var b=ei(l);if(b==We||b==Bt)return!l.size;if(Ul(l))return!vp(l).length;for(var R in l)if(fn.call(l,R))return!1;return!0}function wF(l,b){return Bl(l,b)}function xF(l,b,R){R=typeof R=="function"?R:e;var U=R?R(l,b):e;return U===e?Bl(l,b,e,R):!!U}function Hp(l){if(!Qn(l))return!1;var b=ui(l);return b==Ue||b==Ve||typeof l.message=="string"&&typeof l.name=="string"&&!Gl(l)}function CF(l){return typeof l=="number"&&A1(l)}function is(l){if(!qn(l))return!1;var b=ui(l);return b==Xe||b==ft||b==Se||b==mn}function Ux(l){return typeof l=="number"&&l==Dt(l)}function Lu(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=V}function qn(l){var b=typeof l;return l!=null&&(b=="object"||b=="function")}function Qn(l){return l!=null&&typeof l=="object"}var Vx=zi?en(zi):S2;function _F(l,b){return l===b||mp(l,b,Lp(b))}function AF(l,b,R){return R=typeof R=="function"?R:e,mp(l,b,Lp(b),R)}function kF(l){return Gx(l)&&l!=+l}function SF(l){if(cD(l))throw new yt(u);return P1(l)}function $F(l){return l===null}function EF(l){return l==null}function Gx(l){return typeof l=="number"||Qn(l)&&ui(l)==Ie}function Gl(l){if(!Qn(l)||ui(l)!=dt)return!1;var b=su(l);if(b===null)return!0;var R=fn.call(b,"constructor")&&b.constructor;return typeof R=="function"&&R instanceof R&&nu.call(R)==AN}var Up=ji?en(ji):$2;function TF(l){return Ux(l)&&l>=-V&&l<=V}var qx=no?en(no):E2;function Ou(l){return typeof l=="string"||!Lt(l)&&Qn(l)&&ui(l)==Rn}function Wi(l){return typeof l=="symbol"||Qn(l)&&ui(l)==bt}var Ya=Zs?en(Zs):T2;function RF(l){return l===e}function IF(l){return Qn(l)&&ei(l)==Pt}function MF(l){return Qn(l)&&ui(l)==In}var LF=Au(yp),OF=Au(function(l,b){return l<=b});function Kx(l){if(!l)return[];if(ki(l))return Ou(l)?kt(l):Ai(l);if(Ll&&l[Ll])return Me(l[Ll]());var b=ei(l),R=b==We?je:b==Bt?it:Xa;return R(l)}function os(l){if(!l)return l===0?l:0;if(l=lo(l),l===W||l===-W){var b=l<0?-1:1;return b*K}return l===l?l:0}function Dt(l){var b=os(l),R=b%1;return b===b?R?b-R:b:0}function Yx(l){return l?na(Dt(l),0,oe):0}function lo(l){if(typeof l=="number")return l;if(Wi(l))return X;if(qn(l)){var b=typeof l.valueOf=="function"?l.valueOf():l;l=qn(b)?b+"":b}if(typeof l!="string")return l===0?l:+l;l=Tt(l);var R=xr.test(l);return R||xn.test(l)?$t(l.slice(2),R?2:8):No.test(l)?X:+l}function Xx(l){return Uo(l,Si(l))}function NF(l){return l?na(Dt(l),-V,V):l===0?l:0}function pn(l){return l==null?"":Bi(l)}var DF=Ga(function(l,b){if(Ul(b)||ki(b)){Uo(b,Er(b),l);return}for(var R in b)fn.call(b,R)&&Fl(l,R,b[R])}),Jx=Ga(function(l,b){Uo(b,Si(b),l)}),Zx=Ga(function(l,b,R,U){Uo(b,Si(b),l,U)}),Vp=Ga(function(l,b,R,U){Uo(b,Er(b),l,U)}),PF=ns(hp);function FF(l,b){var R=Va(l);return b==null?R:T1(R,b)}var zF=Vt(function(l,b){l=Ut(l);var R=-1,U=b.length,Y=U>2?b[2]:e;for(Y&&hi(b[0],b[1],Y)&&(U=1);++R<U;)for(var re=b[R],de=Si(re),pe=-1,xe=de.length;++pe<xe;){var Oe=de[pe],De=l[Oe];(De===e||$o(De,Zo[Oe])&&!fn.call(l,Oe))&&(l[Oe]=re[Oe])}return l}),jF=Vt(function(l){return l.push(e,px),hn(Qx,e,l)});function BF(l,b){return se(l,_t(b,3),Ho)}function WF(l,b){return se(l,_t(b,3),fp)}function HF(l,b){return l==null?l:dp(l,_t(b,3),Si)}function UF(l,b){return l==null?l:O1(l,_t(b,3),Si)}function VF(l,b){return l&&Ho(l,_t(b,3))}function GF(l,b){return l&&fp(l,_t(b,3))}function qF(l){return l==null?[]:mu(l,Er(l))}function KF(l){return l==null?[]:mu(l,Si(l))}function Gp(l,b,R){var U=l==null?e:ra(l,b);return U===e?R:U}function YF(l,b){return l!=null&&vx(l,b,b2)}function qp(l,b){return l!=null&&vx(l,b,w2)}var XF=cx(function(l,b,R){b!=null&&typeof b.toString!="function"&&(b=ru.call(b)),l[b]=R},Yp($i)),JF=cx(function(l,b,R){b!=null&&typeof b.toString!="function"&&(b=ru.call(b)),fn.call(l,b)?l[b].push(R):l[b]=[R]},_t),ZF=Vt(jl);function Er(l){return ki(l)?$1(l):vp(l)}function Si(l){return ki(l)?$1(l,!0):R2(l)}function QF(l,b){var R={};return b=_t(b,3),Ho(l,function(U,Y,re){Wo(R,b(U,Y,re),U)}),R}function ez(l,b){var R={};return b=_t(b,3),Ho(l,function(U,Y,re){Wo(R,Y,b(U,Y,re))}),R}var tz=Ga(function(l,b,R){vu(l,b,R)}),Qx=Ga(function(l,b,R,U){vu(l,b,R,U)}),nz=ns(function(l,b){var R={};if(l==null)return R;var U=!1;b=$(b,function(re){return re=bs(re,l),U||(U=re.length>1),re}),Uo(l,Ip(l),R),U&&(R=oo(R,c|p|s,J2));for(var Y=b.length;Y--;)_p(R,b[Y]);return R});function rz(l,b){return eC(l,Mu(_t(b)))}var iz=ns(function(l,b){return l==null?{}:M2(l,b)});function eC(l,b){if(l==null)return{};var R=$(Ip(l),function(U){return[U]});return b=_t(b),U1(l,R,function(U,Y){return b(U,Y[0])})}function oz(l,b,R){b=bs(b,l);var U=-1,Y=b.length;for(Y||(Y=1,l=e);++U<Y;){var re=l==null?e:l[So(b[U])];re===e&&(U=Y,re=R),l=is(re)?re.call(l):re}return l}function sz(l,b,R){return l==null?l:Wl(l,b,R)}function az(l,b,R,U){return U=typeof U=="function"?U:e,l==null?l:Wl(l,b,R,U)}var tC=dx(Er),nC=dx(Si);function lz(l,b,R){var U=Lt(l),Y=U||xs(l)||Ya(l);if(b=_t(b,4),R==null){var re=l&&l.constructor;Y?R=U?new re:[]:qn(l)?R=is(re)?Va(su(l)):{}:R={}}return(Y?Cr:Ho)(l,function(de,pe,xe){return b(R,de,pe,xe)}),R}function cz(l,b){return l==null?!0:_p(l,b)}function uz(l,b,R){return l==null?l:Y1(l,b,Sp(R))}function hz(l,b,R,U){return U=typeof U=="function"?U:e,l==null?l:Y1(l,b,Sp(R),U)}function Xa(l){return l==null?[]:Ot(l,Er(l))}function dz(l){return l==null?[]:Ot(l,Si(l))}function fz(l,b,R){return R===e&&(R=b,b=e),R!==e&&(R=lo(R),R=R===R?R:0),b!==e&&(b=lo(b),b=b===b?b:0),na(lo(l),b,R)}function pz(l,b,R){return b=os(b),R===e?(R=b,b=0):R=os(R),l=lo(l),x2(l,b,R)}function gz(l,b,R){if(R&&typeof R!="boolean"&&hi(l,b,R)&&(b=R=e),R===e&&(typeof b=="boolean"?(R=b,b=e):typeof l=="boolean"&&(R=l,l=e)),l===e&&b===e?(l=0,b=1):(l=os(l),b===e?(b=l,l=0):b=os(b)),l>b){var U=l;l=b,b=U}if(R||l%1||b%1){var Y=k1();return Qr(l+Y*(b-l+$n("1e-"+((Y+"").length-1))),b)}return wp(l,b)}var mz=qa(function(l,b,R){return b=b.toLowerCase(),l+(R?rC(b):b)});function rC(l){return Kp(pn(l).toLowerCase())}function iC(l){return l=pn(l),l&&l.replace(bo,G).replace(_o,"")}function vz(l,b,R){l=pn(l),b=Bi(b);var U=l.length;R=R===e?U:na(Dt(R),0,U);var Y=R;return R-=b.length,R>=0&&l.slice(R,Y)==b}function yz(l){return l=pn(l),l&&Sr.test(l)?l.replace(Li,Z):l}function bz(l){return l=pn(l),l&&Ln.test(l)?l.replace(Kr,"\\$&"):l}var wz=qa(function(l,b,R){return l+(R?"-":"")+b.toLowerCase()}),xz=qa(function(l,b,R){return l+(R?" ":"")+b.toLowerCase()}),Cz=sx("toLowerCase");function _z(l,b,R){l=pn(l),b=Dt(b);var U=b?Ht(l):0;if(!b||U>=b)return l;var Y=(b-U)/2;return _u(uu(Y),R)+l+_u(cu(Y),R)}function Az(l,b,R){l=pn(l),b=Dt(b);var U=b?Ht(l):0;return b&&U<b?l+_u(b-U,R):l}function kz(l,b,R){l=pn(l),b=Dt(b);var U=b?Ht(l):0;return b&&U<b?_u(b-U,R)+l:l}function Sz(l,b,R){return R||b==null?b=0:b&&(b=+b),ON(pn(l).replace(or,""),b||0)}function $z(l,b,R){return(R?hi(l,b,R):b===e)?b=1:b=Dt(b),xp(pn(l),b)}function Ez(){var l=arguments,b=pn(l[0]);return l.length<3?b:b.replace(l[1],l[2])}var Tz=qa(function(l,b,R){return l+(R?"_":"")+b.toLowerCase()});function Rz(l,b,R){return R&&typeof R!="number"&&hi(l,b,R)&&(b=R=e),R=R===e?oe:R>>>0,R?(l=pn(l),l&&(typeof b=="string"||b!=null&&!Up(b))&&(b=Bi(b),!b&&ge(l))?ws(kt(l),0,R):l.split(b,R)):[]}var Iz=qa(function(l,b,R){return l+(R?" ":"")+Kp(b)});function Mz(l,b,R){return l=pn(l),R=R==null?0:na(Dt(R),0,l.length),b=Bi(b),l.slice(R,R+b.length)==b}function Lz(l,b,R){var U=te.templateSettings;R&&hi(l,b,R)&&(b=e),l=pn(l),b=Vp({},b,U,fx);var Y=Vp({},b.imports,U.imports,fx),re=Er(Y),de=Ot(Y,re);Cr(re,function(Ct){if(vn.test(Ct))throw new yt(a)});var pe,xe,Oe=0,De=b.interpolate||sr,ze="__p += '",ot=_i((b.escape||sr).source+"|"+De.source+"|"+(De===mi?yi:sr).source+"|"+(b.evaluate||sr).source+"|$","g"),pt="//# sourceURL="+(fn.call(b,"sourceURL")?(b.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Js+"]")+`
1462
+ `;l.replace(ot,function(Ct,Gt,Jt,Hi,di,Ui){return Jt||(Jt=Hi),ze+=l.slice(Oe,Ui).replace(Nr,ae),Gt&&(pe=!0,ze+=`' +
1463
+ __e(`+Gt+`) +
1464
+ '`),di&&(xe=!0,ze+=`';
1465
+ `+di+`;
1466
+ __p += '`),Jt&&(ze+=`' +
1467
+ ((__t = (`+Jt+`)) == null ? '' : __t) +
1468
+ '`),Oe=Ui+Ct.length,Ct}),ze+=`';
1469
+ `;var At=fn.call(b,"variable")&&b.variable;if(!At)ze=`with (obj) {
1470
+ `+ze+`
1471
+ }
1472
+ `;else if(vn.test(At))throw new yt(v);ze=(xe?ze.replace(Xn,""):ze).replace(Mi,"$1").replace(wr,"$1;"),ze="function("+(At||"obj")+`) {
1473
+ `+(At?"":`obj || (obj = {});
1474
+ `)+"var __t, __p = ''"+(pe?", __e = _.escape":"")+(xe?`, __j = Array.prototype.join;
1475
+ function print() { __p += __j.call(arguments, '') }
1476
+ `:`;
1477
+ `)+ze+`return __p
1478
+ }`;var zt=sC(function(){return It(re,pt+"return "+ze).apply(e,de)});if(zt.source=ze,Hp(zt))throw zt;return zt}function Oz(l){return pn(l).toLowerCase()}function Nz(l){return pn(l).toUpperCase()}function Dz(l,b,R){if(l=pn(l),l&&(R||b===e))return Tt(l);if(!l||!(b=Bi(b)))return l;var U=kt(l),Y=kt(b),re=gr(U,Y),de=_r(U,Y)+1;return ws(U,re,de).join("")}function Pz(l,b,R){if(l=pn(l),l&&(R||b===e))return l.slice(0,xt(l)+1);if(!l||!(b=Bi(b)))return l;var U=kt(l),Y=_r(U,kt(b))+1;return ws(U,0,Y).join("")}function Fz(l,b,R){if(l=pn(l),l&&(R||b===e))return l.replace(or,"");if(!l||!(b=Bi(b)))return l;var U=kt(l),Y=gr(U,kt(b));return ws(U,Y).join("")}function zz(l,b){var R=B,U=F;if(qn(b)){var Y="separator"in b?b.separator:Y;R="length"in b?Dt(b.length):R,U="omission"in b?Bi(b.omission):U}l=pn(l);var re=l.length;if(ge(l)){var de=kt(l);re=de.length}if(R>=re)return l;var pe=R-Ht(U);if(pe<1)return U;var xe=de?ws(de,0,pe).join(""):l.slice(0,pe);if(Y===e)return xe+U;if(de&&(pe+=xe.length-pe),Up(Y)){if(l.slice(pe).search(Y)){var Oe,De=xe;for(Y.global||(Y=_i(Y.source,pn(Ft.exec(Y))+"g")),Y.lastIndex=0;Oe=Y.exec(De);)var ze=Oe.index;xe=xe.slice(0,ze===e?pe:ze)}}else if(l.indexOf(Bi(Y),pe)!=pe){var ot=xe.lastIndexOf(Y);ot>-1&&(xe=xe.slice(0,ot))}return xe+U}function jz(l){return l=pn(l),l&&fs.test(l)?l.replace(qi,gt):l}var Bz=qa(function(l,b,R){return l+(R?" ":"")+b.toUpperCase()}),Kp=sx("toUpperCase");function oC(l,b,R){return l=pn(l),b=R?e:b,b===e?_e(l)?mr(l):Q(l):l.match(b)||[]}var sC=Vt(function(l,b){try{return hn(l,e,b)}catch(R){return Hp(R)?R:new yt(R)}}),Wz=ns(function(l,b){return Cr(b,function(R){R=So(R),Wo(l,R,Bp(l[R],l))}),l});function Hz(l){var b=l==null?0:l.length,R=_t();return l=b?$(l,function(U){if(typeof U[1]!="function")throw new En(f);return[R(U[0]),U[1]]}):[],Vt(function(U){for(var Y=-1;++Y<b;){var re=l[Y];if(hn(re[0],this,U))return hn(re[1],this,U)}})}function Uz(l){return m2(oo(l,c))}function Yp(l){return function(){return l}}function Vz(l,b){return l==null||l!==l?b:l}var Gz=lx(),qz=lx(!0);function $i(l){return l}function Xp(l){return F1(typeof l=="function"?l:oo(l,c))}function Kz(l){return j1(oo(l,c))}function Yz(l,b){return B1(l,oo(b,c))}var Xz=Vt(function(l,b){return function(R){return jl(R,l,b)}}),Jz=Vt(function(l,b){return function(R){return jl(l,R,b)}});function Jp(l,b,R){var U=Er(b),Y=mu(b,U);R==null&&!(qn(b)&&(Y.length||!U.length))&&(R=b,b=l,l=this,Y=mu(b,Er(b)));var re=!(qn(R)&&"chain"in R)||!!R.chain,de=is(l);return Cr(Y,function(pe){var xe=b[pe];l[pe]=xe,de&&(l.prototype[pe]=function(){var Oe=this.__chain__;if(re||Oe){var De=l(this.__wrapped__),ze=De.__actions__=Ai(this.__actions__);return ze.push({func:xe,args:arguments,thisArg:l}),De.__chain__=Oe,De}return xe.apply(l,k([this.value()],arguments))})}),l}function Zz(){return Wt._===this&&(Wt._=kN),this}function Zp(){}function Qz(l){return l=Dt(l),Vt(function(b){return W1(b,l)})}var ej=Ep($),tj=Ep(Bo),nj=Ep(H);function aC(l){return Np(l)?Pe(So(l)):L2(l)}function rj(l){return function(b){return l==null?e:ra(l,b)}}var ij=ux(),oj=ux(!0);function Qp(){return[]}function eg(){return!1}function sj(){return{}}function aj(){return""}function lj(){return!0}function cj(l,b){if(l=Dt(l),l<1||l>V)return[];var R=oe,U=Qr(l,oe);b=_t(b),l-=oe;for(var Y=ht(U,b);++R<l;)b(R);return Y}function uj(l){return Lt(l)?$(l,So):Wi(l)?[l]:Ai(Sx(pn(l)))}function hj(l){var b=++_N;return pn(l)+b}var dj=Cu(function(l,b){return l+b},0),fj=Tp("ceil"),pj=Cu(function(l,b){return l/b},1),gj=Tp("floor");function mj(l){return l&&l.length?gu(l,$i,pp):e}function vj(l,b){return l&&l.length?gu(l,_t(b,2),pp):e}function yj(l){return Ce(l,$i)}function bj(l,b){return Ce(l,_t(b,2))}function wj(l){return l&&l.length?gu(l,$i,yp):e}function xj(l,b){return l&&l.length?gu(l,_t(b,2),yp):e}var Cj=Cu(function(l,b){return l*b},1),_j=Tp("round"),Aj=Cu(function(l,b){return l-b},0);function kj(l){return l&&l.length?lt(l,$i):0}function Sj(l,b){return l&&l.length?lt(l,_t(b,2)):0}return te.after=YP,te.ary=Px,te.assign=DF,te.assignIn=Jx,te.assignInWith=Zx,te.assignWith=Vp,te.at=PF,te.before=Fx,te.bind=Bp,te.bindAll=Wz,te.bindKey=zx,te.castArray=aF,te.chain=Ox,te.chunk=mD,te.compact=vD,te.concat=yD,te.cond=Hz,te.conforms=Uz,te.constant=Yp,te.countBy=SP,te.create=FF,te.curry=jx,te.curryRight=Bx,te.debounce=Wx,te.defaults=zF,te.defaultsDeep=jF,te.defer=XP,te.delay=JP,te.difference=bD,te.differenceBy=wD,te.differenceWith=xD,te.drop=CD,te.dropRight=_D,te.dropRightWhile=AD,te.dropWhile=kD,te.fill=SD,te.filter=EP,te.flatMap=IP,te.flatMapDeep=MP,te.flatMapDepth=LP,te.flatten=Rx,te.flattenDeep=$D,te.flattenDepth=ED,te.flip=ZP,te.flow=Gz,te.flowRight=qz,te.fromPairs=TD,te.functions=qF,te.functionsIn=KF,te.groupBy=OP,te.initial=ID,te.intersection=MD,te.intersectionBy=LD,te.intersectionWith=OD,te.invert=XF,te.invertBy=JF,te.invokeMap=DP,te.iteratee=Xp,te.keyBy=PP,te.keys=Er,te.keysIn=Si,te.map=Tu,te.mapKeys=QF,te.mapValues=ez,te.matches=Kz,te.matchesProperty=Yz,te.memoize=Iu,te.merge=tz,te.mergeWith=Qx,te.method=Xz,te.methodOf=Jz,te.mixin=Jp,te.negate=Mu,te.nthArg=Qz,te.omit=nz,te.omitBy=rz,te.once=QP,te.orderBy=FP,te.over=ej,te.overArgs=eF,te.overEvery=tj,te.overSome=nj,te.partial=Wp,te.partialRight=Hx,te.partition=zP,te.pick=iz,te.pickBy=eC,te.property=aC,te.propertyOf=rj,te.pull=FD,te.pullAll=Mx,te.pullAllBy=zD,te.pullAllWith=jD,te.pullAt=BD,te.range=ij,te.rangeRight=oj,te.rearg=tF,te.reject=WP,te.remove=WD,te.rest=nF,te.reverse=zp,te.sampleSize=UP,te.set=sz,te.setWith=az,te.shuffle=VP,te.slice=HD,te.sortBy=KP,te.sortedUniq=XD,te.sortedUniqBy=JD,te.split=Rz,te.spread=rF,te.tail=ZD,te.take=QD,te.takeRight=eP,te.takeRightWhile=tP,te.takeWhile=nP,te.tap=vP,te.throttle=iF,te.thru=Eu,te.toArray=Kx,te.toPairs=tC,te.toPairsIn=nC,te.toPath=uj,te.toPlainObject=Xx,te.transform=lz,te.unary=oF,te.union=rP,te.unionBy=iP,te.unionWith=oP,te.uniq=sP,te.uniqBy=aP,te.uniqWith=lP,te.unset=cz,te.unzip=jp,te.unzipWith=Lx,te.update=uz,te.updateWith=hz,te.values=Xa,te.valuesIn=dz,te.without=cP,te.words=oC,te.wrap=sF,te.xor=uP,te.xorBy=hP,te.xorWith=dP,te.zip=fP,te.zipObject=pP,te.zipObjectDeep=gP,te.zipWith=mP,te.entries=tC,te.entriesIn=nC,te.extend=Jx,te.extendWith=Zx,Jp(te,te),te.add=dj,te.attempt=sC,te.camelCase=mz,te.capitalize=rC,te.ceil=fj,te.clamp=fz,te.clone=lF,te.cloneDeep=uF,te.cloneDeepWith=hF,te.cloneWith=cF,te.conformsTo=dF,te.deburr=iC,te.defaultTo=Vz,te.divide=pj,te.endsWith=vz,te.eq=$o,te.escape=yz,te.escapeRegExp=bz,te.every=$P,te.find=TP,te.findIndex=Ex,te.findKey=BF,te.findLast=RP,te.findLastIndex=Tx,te.findLastKey=WF,te.floor=gj,te.forEach=Nx,te.forEachRight=Dx,te.forIn=HF,te.forInRight=UF,te.forOwn=VF,te.forOwnRight=GF,te.get=Gp,te.gt=fF,te.gte=pF,te.has=YF,te.hasIn=qp,te.head=Ix,te.identity=$i,te.includes=NP,te.indexOf=RD,te.inRange=pz,te.invoke=ZF,te.isArguments=sa,te.isArray=Lt,te.isArrayBuffer=gF,te.isArrayLike=ki,te.isArrayLikeObject=ar,te.isBoolean=mF,te.isBuffer=xs,te.isDate=vF,te.isElement=yF,te.isEmpty=bF,te.isEqual=wF,te.isEqualWith=xF,te.isError=Hp,te.isFinite=CF,te.isFunction=is,te.isInteger=Ux,te.isLength=Lu,te.isMap=Vx,te.isMatch=_F,te.isMatchWith=AF,te.isNaN=kF,te.isNative=SF,te.isNil=EF,te.isNull=$F,te.isNumber=Gx,te.isObject=qn,te.isObjectLike=Qn,te.isPlainObject=Gl,te.isRegExp=Up,te.isSafeInteger=TF,te.isSet=qx,te.isString=Ou,te.isSymbol=Wi,te.isTypedArray=Ya,te.isUndefined=RF,te.isWeakMap=IF,te.isWeakSet=MF,te.join=ND,te.kebabCase=wz,te.last=ao,te.lastIndexOf=DD,te.lowerCase=xz,te.lowerFirst=Cz,te.lt=LF,te.lte=OF,te.max=mj,te.maxBy=vj,te.mean=yj,te.meanBy=bj,te.min=wj,te.minBy=xj,te.stubArray=Qp,te.stubFalse=eg,te.stubObject=sj,te.stubString=aj,te.stubTrue=lj,te.multiply=Cj,te.nth=PD,te.noConflict=Zz,te.noop=Zp,te.now=Ru,te.pad=_z,te.padEnd=Az,te.padStart=kz,te.parseInt=Sz,te.random=gz,te.reduce=jP,te.reduceRight=BP,te.repeat=$z,te.replace=Ez,te.result=oz,te.round=_j,te.runInContext=me,te.sample=HP,te.size=GP,te.snakeCase=Tz,te.some=qP,te.sortedIndex=UD,te.sortedIndexBy=VD,te.sortedIndexOf=GD,te.sortedLastIndex=qD,te.sortedLastIndexBy=KD,te.sortedLastIndexOf=YD,te.startCase=Iz,te.startsWith=Mz,te.subtract=Aj,te.sum=kj,te.sumBy=Sj,te.template=Lz,te.times=cj,te.toFinite=os,te.toInteger=Dt,te.toLength=Yx,te.toLower=Oz,te.toNumber=lo,te.toSafeInteger=NF,te.toString=pn,te.toUpper=Nz,te.trim=Dz,te.trimEnd=Pz,te.trimStart=Fz,te.truncate=zz,te.unescape=jz,te.uniqueId=hj,te.upperCase=Bz,te.upperFirst=Kp,te.each=Nx,te.eachRight=Dx,te.first=Ix,Jp(te,(function(){var l={};return Ho(te,function(b,R){fn.call(te.prototype,R)||(l[R]=b)}),l})(),{chain:!1}),te.VERSION=r,Cr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(l){te[l].placeholder=te}),Cr(["drop","take"],function(l,b){Yt.prototype[l]=function(R){R=R===e?1:Ar(Dt(R),0);var U=this.__filtered__&&!b?new Yt(this):this.clone();return U.__filtered__?U.__takeCount__=Qr(R,U.__takeCount__):U.__views__.push({size:Qr(R,oe),type:l+(U.__dir__<0?"Right":"")}),U},Yt.prototype[l+"Right"]=function(R){return this.reverse()[l](R).reverse()}}),Cr(["filter","map","takeWhile"],function(l,b){var R=b+1,U=R==A||R==j;Yt.prototype[l]=function(Y){var re=this.clone();return re.__iteratees__.push({iteratee:_t(Y,3),type:R}),re.__filtered__=re.__filtered__||U,re}}),Cr(["head","last"],function(l,b){var R="take"+(b?"Right":"");Yt.prototype[l]=function(){return this[R](1).value()[0]}}),Cr(["initial","tail"],function(l,b){var R="drop"+(b?"":"Right");Yt.prototype[l]=function(){return this.__filtered__?new Yt(this):this[R](1)}}),Yt.prototype.compact=function(){return this.filter($i)},Yt.prototype.find=function(l){return this.filter(l).head()},Yt.prototype.findLast=function(l){return this.reverse().find(l)},Yt.prototype.invokeMap=Vt(function(l,b){return typeof l=="function"?new Yt(this):this.map(function(R){return jl(R,l,b)})}),Yt.prototype.reject=function(l){return this.filter(Mu(_t(l)))},Yt.prototype.slice=function(l,b){l=Dt(l);var R=this;return R.__filtered__&&(l>0||b<0)?new Yt(R):(l<0?R=R.takeRight(-l):l&&(R=R.drop(l)),b!==e&&(b=Dt(b),R=b<0?R.dropRight(-b):R.take(b-l)),R)},Yt.prototype.takeRightWhile=function(l){return this.reverse().takeWhile(l).reverse()},Yt.prototype.toArray=function(){return this.take(oe)},Ho(Yt.prototype,function(l,b){var R=/^(?:filter|find|map|reject)|While$/.test(b),U=/^(?:head|last)$/.test(b),Y=te[U?"take"+(b=="last"?"Right":""):b],re=U||/^find/.test(b);Y&&(te.prototype[b]=function(){var de=this.__wrapped__,pe=U?[1]:arguments,xe=de instanceof Yt,Oe=pe[0],De=xe||Lt(de),ze=function(Gt){var Jt=Y.apply(te,k([Gt],pe));return U&&ot?Jt[0]:Jt};De&&R&&typeof Oe=="function"&&Oe.length!=1&&(xe=De=!1);var ot=this.__chain__,pt=!!this.__actions__.length,At=re&&!ot,zt=xe&&!pt;if(!re&&De){de=zt?de:new Yt(this);var Ct=l.apply(de,pe);return Ct.__actions__.push({func:Eu,args:[ze],thisArg:e}),new io(Ct,ot)}return At&&zt?l.apply(this,pe):(Ct=this.thru(ze),At?U?Ct.value()[0]:Ct.value():Ct)})}),Cr(["pop","push","shift","sort","splice","unshift"],function(l){var b=ro[l],R=/^(?:push|sort|unshift)$/.test(l)?"tap":"thru",U=/^(?:pop|shift)$/.test(l);te.prototype[l]=function(){var Y=arguments;if(U&&!this.__chain__){var re=this.value();return b.apply(Lt(re)?re:[],Y)}return this[R](function(de){return b.apply(Lt(de)?de:[],Y)})}}),Ho(Yt.prototype,function(l,b){var R=te[b];if(R){var U=R.name+"";fn.call(Ua,U)||(Ua[U]=[]),Ua[U].push({name:b,func:R})}}),Ua[xu(e,x).name]=[{name:"wrapper",func:e}],Yt.prototype.clone=BN,Yt.prototype.reverse=WN,Yt.prototype.value=HN,te.prototype.at=yP,te.prototype.chain=bP,te.prototype.commit=wP,te.prototype.next=xP,te.prototype.plant=_P,te.prototype.reverse=AP,te.prototype.toJSON=te.prototype.valueOf=te.prototype.value=kP,te.prototype.first=te.prototype.head,Ll&&(te.prototype[Ll]=CP),te}),bn=dn();pr?((pr.exports=bn)._=bn,Jr._=bn):Wt._=bn}).call(QS)})(hc,hc.exports)),hc.exports}var t$=e$();Nn("a",uc(t$)).debounce(function(){this.rebuildDisplayText()},300);var gv={exports:{}},mv;function n$(){return mv||(mv=1,(function(n,t){(function(){ace.require(["ace/mode/text"],function(e){n&&(n.exports=e)})})()})(gv)),gv.exports}n$();const r$=!0,vr="u-",i$="uplot",o$=vr+"hz",s$=vr+"vt",a$=vr+"title",l$=vr+"wrap",c$=vr+"under",u$=vr+"over",h$=vr+"axis",Os=vr+"off",d$=vr+"select",f$=vr+"cursor-x",p$=vr+"cursor-y",g$=vr+"cursor-pt",m$=vr+"legend",v$=vr+"live",y$=vr+"inline",b$=vr+"series",w$=vr+"marker",vv=vr+"label",x$=vr+"value",hl="width",dl="height",fl="top",yv="bottom",ya="left",fh="right",ph="#000",bv=ph+"0",gh="mousemove",wv="mousedown",mh="mouseup",xv="mouseenter",Cv="mouseleave",_v="dblclick",C$="resize",_$="scroll",Av="change",dc="dppxchange",vh="--",ba=typeof window<"u",yh=ba?document:null,wa=ba?window:null,A$=ba?navigator:null;let ln,fc;function bh(){let n=devicePixelRatio;ln!=n&&(ln=n,fc&&Ch(Av,fc,bh),fc=matchMedia(`(min-resolution: ${ln-.001}dppx) and (max-resolution: ${ln+.001}dppx)`),Ns(Av,fc,bh),wa.dispatchEvent(new CustomEvent(dc)))}function Ei(n,t){if(t!=null){let e=n.classList;!e.contains(t)&&e.add(t)}}function wh(n,t){let e=n.classList;e.contains(t)&&e.remove(t)}function Tn(n,t,e){n.style[t]=e+"px"}function fo(n,t,e,r){let d=yh.createElement(n);return t!=null&&Ei(d,t),e?.insertBefore(d,r),d}function Vi(n,t){return fo("div",n,t)}const kv=new WeakMap;function Io(n,t,e,r,d){let u="translate("+t+"px,"+e+"px)",f=kv.get(n);u!=f&&(n.style.transform=u,kv.set(n,u),t<0||e<0||t>r||e>d?Ei(n,Os):wh(n,Os))}const Sv=new WeakMap;function $v(n,t,e){let r=t+e,d=Sv.get(n);r!=d&&(Sv.set(n,r),n.style.background=t,n.style.borderColor=e)}const Ev=new WeakMap;function Tv(n,t,e,r){let d=t+""+e,u=Ev.get(n);d!=u&&(Ev.set(n,d),n.style.height=e+"px",n.style.width=t+"px",n.style.marginLeft=r?-t/2+"px":0,n.style.marginTop=r?-e/2+"px":0)}const xh={passive:!0},k$={...xh,capture:!0};function Ns(n,t,e,r){t.addEventListener(n,e,r?k$:xh)}function Ch(n,t,e,r){t.removeEventListener(n,e,xh)}ba&&bh();function po(n,t,e,r){let d;e=e||0,r=r||t.length-1;let u=r<=2147483647;for(;r-e>1;)d=u?e+r>>1:Ri((e+r)/2),t[d]<n?e=d:r=d;return n-t[e]<=t[r]-n?e:r}function Rv(n){return(t,e,r)=>{let d=-1,u=-1;for(let f=e;f<=r;f++)if(n(t[f])){d=f;break}for(let f=r;f>=e;f--)if(n(t[f])){u=f;break}return[d,u]}}const Iv=n=>n!=null,Mv=n=>n!=null&&n>0,pc=Rv(Iv),S$=Rv(Mv);function $$(n,t,e,r=0,d=!1){let u=d?S$:pc,f=d?Mv:Iv;[t,e]=u(n,t,e);let v=n[t],a=n[t];if(t>-1)if(r==1)v=n[t],a=n[e];else if(r==-1)v=n[e],a=n[t];else for(let g=t;g<=e;g++){let i=n[g];f(i)&&(i<v?v=i:i>a&&(a=i))}return[v??_n,a??-_n]}function gc(n,t,e,r){let d=Nv(n),u=Nv(t);n==t&&(d==-1?(n*=e,t/=e):(n/=e,t*=e));let f=e==10?Vo:Dv,v=d==1?Ri:Gi,a=u==1?Gi:Ri,g=v(f(yr(n))),i=a(f(yr(t))),o=xa(e,g),c=xa(e,i);return e==10&&(g<0&&(o=An(o,-g)),i<0&&(c=An(c,-i))),r||e==2?(n=o*d,t=c*u):(n=Hv(n,o),t=yc(t,c)),[n,t]}function _h(n,t,e,r){let d=gc(n,t,e,r);return n==0&&(d[0]=0),t==0&&(d[1]=0),d}const Ah=.1,Lv={mode:3,pad:Ah},pl={pad:0,soft:null,mode:0},E$={min:pl,max:pl};function mc(n,t,e,r){return bc(e)?Ov(n,t,e):(pl.pad=e,pl.soft=r?0:null,pl.mode=r?3:0,Ov(n,t,E$))}function rn(n,t){return n??t}function T$(n,t,e){for(t=rn(t,0),e=rn(e,n.length-1);t<=e;){if(n[t]!=null)return!0;t++}return!1}function Ov(n,t,e){let r=e.min,d=e.max,u=rn(r.pad,0),f=rn(d.pad,0),v=rn(r.hard,-_n),a=rn(d.hard,_n),g=rn(r.soft,_n),i=rn(d.soft,-_n),o=rn(r.mode,0),c=rn(d.mode,0),p=t-n,s=Vo(p),h=ri(yr(n),yr(t)),m=Vo(h),y=yr(m-s);(p<1e-24||y>10)&&(p=0,(n==0||t==0)&&(p=1e-24,o==2&&g!=_n&&(u=0),c==2&&i!=-_n&&(f=0)));let x=p||h||1e3,T=Vo(x),S=xa(10,Ri(T)),_=x*(p==0?n==0?.1:1:u),C=An(Hv(n-_,S/10),24),L=n>=g&&(o==1||o==3&&C<=g||o==2&&C>=g)?g:_n,O=ri(v,C<L&&n>=L?L:go(L,C)),M=x*(p==0?t==0?.1:1:f),I=An(yc(t+M,S/10),24),B=t<=i&&(c==1||c==3&&I>=i||c==2&&I<=i)?i:-_n,F=go(a,I>B&&t<=B?B:ri(B,I));return O==F&&O==0&&(F=100),[O,F]}const R$=new Intl.NumberFormat(ba?A$.language:"en-US"),kh=n=>R$.format(n),Ti=Math,vc=Ti.PI,yr=Ti.abs,Ri=Ti.floor,br=Ti.round,Gi=Ti.ceil,go=Ti.min,ri=Ti.max,xa=Ti.pow,Nv=Ti.sign,Vo=Ti.log10,Dv=Ti.log2,I$=(n,t=1)=>Ti.sinh(n)*t,Sh=(n,t=1)=>Ti.asinh(n/t),_n=1/0;function Pv(n){return(Vo((n^n>>31)-(n>>31))|0)+1}function $h(n,t,e){return go(ri(n,t),e)}function Fv(n){return typeof n=="function"}function qt(n){return Fv(n)?n:()=>n}const M$=()=>{},zv=n=>n,jv=(n,t)=>t,L$=n=>null,Bv=n=>!0,Wv=(n,t)=>n==t,O$=/\.\d*?(?=9{6,}|0{6,})/gm,Ds=n=>{if(Vv(n)||cs.has(n))return n;const t=`${n}`,e=t.match(O$);if(e==null)return n;let r=e[0].length-1;if(t.indexOf("e-")!=-1){let[d,u]=t.split("e");return+`${Ds(d)}e${u}`}return An(n,r)};function Ps(n,t){return Ds(An(Ds(n/t))*t)}function yc(n,t){return Ds(Gi(Ds(n/t))*t)}function Hv(n,t){return Ds(Ri(Ds(n/t))*t)}function An(n,t=0){if(Vv(n))return n;let e=10**t,r=n*e*(1+Number.EPSILON);return br(r)/e}const cs=new Map;function Uv(n){return((""+n).split(".")[1]||"").length}function gl(n,t,e,r){let d=[],u=r.map(Uv);for(let f=t;f<e;f++){let v=yr(f),a=An(xa(n,f),v);for(let g=0;g<r.length;g++){let i=n==10?+`${r[g]}e${f}`:r[g]*a,o=(f>=0?0:v)+(f>=u[g]?0:u[g]),c=n==10?i:An(i,o);d.push(c),cs.set(c,o)}}return d}const ml={},Eh=[],Ca=[null,null],us=Array.isArray,Vv=Number.isInteger,N$=n=>n===void 0;function Gv(n){return typeof n=="string"}function bc(n){let t=!1;if(n!=null){let e=n.constructor;t=e==null||e==Object}return t}function D$(n){return n!=null&&typeof n=="object"}const P$=Object.getPrototypeOf(Uint8Array),qv="__proto__";function _a(n,t=bc){let e;if(us(n)){let r=n.find(d=>d!=null);if(us(r)||t(r)){e=Array(n.length);for(let d=0;d<n.length;d++)e[d]=_a(n[d],t)}else e=n.slice()}else if(n instanceof P$)e=n.slice();else if(t(n)){e={};for(let r in n)r!=qv&&(e[r]=_a(n[r],t))}else e=n;return e}function cr(n){let t=arguments;for(let e=1;e<t.length;e++){let r=t[e];for(let d in r)d!=qv&&(bc(n[d])?cr(n[d],_a(r[d])):n[d]=_a(r[d]))}return n}const F$=0,z$=1,j$=2;function B$(n,t,e){for(let r=0,d,u=-1;r<t.length;r++){let f=t[r];if(f>u){for(d=f-1;d>=0&&n[d]==null;)n[d--]=null;for(d=f+1;d<e&&n[d]==null;)n[u=d++]=null}}}function W$(n,t){if(V$(n)){let f=n[0].slice();for(let v=1;v<n.length;v++)f.push(...n[v].slice(1));return G$(f[0])||(f=U$(f)),f}let e=new Set;for(let f=0;f<n.length;f++){let v=n[f][0],a=v.length;for(let g=0;g<a;g++)e.add(v[g])}let r=[Array.from(e).sort((f,v)=>f-v)],d=r[0].length,u=new Map;for(let f=0;f<d;f++)u.set(r[0][f],f);for(let f=0;f<n.length;f++){let v=n[f],a=v[0];for(let g=1;g<v.length;g++){let i=v[g],o=Array(d).fill(void 0),c=t?t[f][g]:z$,p=[];for(let s=0;s<i.length;s++){let h=i[s],m=u.get(a[s]);h===null?c!=F$&&(o[m]=h,c==j$&&p.push(m)):o[m]=h}B$(o,p,d),r.push(o)}}return r}const H$=typeof queueMicrotask>"u"?n=>Promise.resolve().then(n):queueMicrotask;function U$(n){let t=n[0],e=t.length,r=Array(e);for(let u=0;u<r.length;u++)r[u]=u;r.sort((u,f)=>t[u]-t[f]);let d=[];for(let u=0;u<n.length;u++){let f=n[u],v=Array(e);for(let a=0;a<e;a++)v[a]=f[r[a]];d.push(v)}return d}function V$(n){let t=n[0][0],e=t.length;for(let r=1;r<n.length;r++){let d=n[r][0];if(d.length!=e)return!1;if(d!=t){for(let u=0;u<e;u++)if(d[u]!=t[u])return!1}}return!0}function G$(n,t=100){const e=n.length;if(e<=1)return!0;let r=0,d=e-1;for(;r<=d&&n[r]==null;)r++;for(;d>=r&&n[d]==null;)d--;if(d<=r)return!0;const u=ri(1,Ri((d-r+1)/t));for(let f=n[r],v=r+u;v<=d;v+=u){const a=n[v];if(a!=null){if(a<=f)return!1;f=a}}return!0}const Kv=["January","February","March","April","May","June","July","August","September","October","November","December"],Yv=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Xv(n){return n.slice(0,3)}const q$=Yv.map(Xv),K$=Kv.map(Xv),Y$={MMMM:Kv,MMM:K$,WWWW:Yv,WWW:q$};function vl(n){return(n<10?"0":"")+n}function X$(n){return(n<10?"00":n<100?"0":"")+n}const J$={YYYY:n=>n.getFullYear(),YY:n=>(n.getFullYear()+"").slice(2),MMMM:(n,t)=>t.MMMM[n.getMonth()],MMM:(n,t)=>t.MMM[n.getMonth()],MM:n=>vl(n.getMonth()+1),M:n=>n.getMonth()+1,DD:n=>vl(n.getDate()),D:n=>n.getDate(),WWWW:(n,t)=>t.WWWW[n.getDay()],WWW:(n,t)=>t.WWW[n.getDay()],HH:n=>vl(n.getHours()),H:n=>n.getHours(),h:n=>{let t=n.getHours();return t==0?12:t>12?t-12:t},AA:n=>n.getHours()>=12?"PM":"AM",aa:n=>n.getHours()>=12?"pm":"am",a:n=>n.getHours()>=12?"p":"a",mm:n=>vl(n.getMinutes()),m:n=>n.getMinutes(),ss:n=>vl(n.getSeconds()),s:n=>n.getSeconds(),fff:n=>X$(n.getMilliseconds())};function Th(n,t){t=t||Y$;let e=[],r=/\{([a-z]+)\}|[^{]+/gi,d;for(;d=r.exec(n);)e.push(d[0][0]=="{"?J$[d[1]]:d[0]);return u=>{let f="";for(let v=0;v<e.length;v++)f+=typeof e[v]=="string"?e[v]:e[v](u,t);return f}}const Z$=new Intl.DateTimeFormat().resolvedOptions().timeZone;function Q$(n,t){let e;return t=="UTC"||t=="Etc/UTC"?e=new Date(+n+n.getTimezoneOffset()*6e4):t==Z$?e=n:(e=new Date(n.toLocaleString("en-US",{timeZone:t})),e.setMilliseconds(n.getMilliseconds())),e}const Jv=n=>n%1==0,wc=[1,2,2.5,5],eE=gl(10,-32,0,wc),Zv=gl(10,0,32,wc),tE=Zv.filter(Jv),Fs=eE.concat(Zv),Rh=`
1479
+ `,Qv="{YYYY}",ey=Rh+Qv,ty="{M}/{D}",yl=Rh+ty,xc=yl+"/{YY}",ny="{aa}",nE="{h}:{mm}",Aa=nE+ny,ry=Rh+Aa,iy=":{ss}",un=null;function oy(n){let t=n*1e3,e=t*60,r=e*60,d=r*24,u=d*30,f=d*365,v=(n==1?gl(10,0,3,wc).filter(Jv):gl(10,-3,0,wc)).concat([t,t*5,t*10,t*15,t*30,e,e*5,e*10,e*15,e*30,r,r*2,r*3,r*4,r*6,r*8,r*12,d,d*2,d*3,d*4,d*5,d*6,d*7,d*8,d*9,d*10,d*15,u,u*2,u*3,u*4,u*6,f,f*2,f*5,f*10,f*25,f*50,f*100]);const a=[[f,Qv,un,un,un,un,un,un,1],[d*28,"{MMM}",ey,un,un,un,un,un,1],[d,ty,ey,un,un,un,un,un,1],[r,"{h}"+ny,xc,un,yl,un,un,un,1],[e,Aa,xc,un,yl,un,un,un,1],[t,iy,xc+" "+Aa,un,yl+" "+Aa,un,ry,un,1],[n,iy+".{fff}",xc+" "+Aa,un,yl+" "+Aa,un,ry,un,1]];function g(i){return(o,c,p,s,h,m)=>{let y=[],x=h>=f,T=h>=u&&h<f,S=i(p),_=An(S*n,3),C=Ih(S.getFullYear(),x?0:S.getMonth(),T||x?1:S.getDate()),L=An(C*n,3);if(T||x){let O=T?h/u:0,M=x?h/f:0,I=_==L?_:An(Ih(C.getFullYear()+M,C.getMonth()+O,1)*n,3),B=new Date(br(I/n)),F=B.getFullYear(),N=B.getMonth();for(let E=0;I<=s;E++){let A=Ih(F+M*E,N+O*E,1),D=A-i(An(A*n,3));I=An((+A+D)*n,3),I<=s&&y.push(I)}}else{let O=h>=d?d:h,M=Ri(p)-Ri(_),I=L+M+yc(_-L,O);y.push(I);let B=i(I),F=B.getHours()+B.getMinutes()/e+B.getSeconds()/r,N=h/r,E=o.axes[c]._space,A=m/E;for(;I=An(I+h,n==1?0:3),!(I>s);)if(N>1){let D=Ri(An(F+N,6))%24,j=i(I).getHours()-D;j>1&&(j=-1),I-=j*r,F=(F+N)%24;let W=y[y.length-1];An((I-W)/h,3)*A>=.7&&y.push(I)}else y.push(I)}return y}}return[v,a,g]}const[rE,iE,oE]=oy(1),[sE,aE,lE]=oy(.001);gl(2,-53,53,[1]);function sy(n,t){return n.map(e=>e.map((r,d)=>d==0||d==8||r==null?r:t(d==1||e[8]==0?r:e[1]+r)))}function ay(n,t){return(e,r,d,u,f)=>{let v=t.find(s=>f>=s[0])||t[t.length-1],a,g,i,o,c,p;return r.map(s=>{let h=n(s),m=h.getFullYear(),y=h.getMonth(),x=h.getDate(),T=h.getHours(),S=h.getMinutes(),_=h.getSeconds(),C=m!=a&&v[2]||y!=g&&v[3]||x!=i&&v[4]||T!=o&&v[5]||S!=c&&v[6]||_!=p&&v[7]||v[1];return a=m,g=y,i=x,o=T,c=S,p=_,C(h)})}}function cE(n,t){let e=Th(t);return(r,d,u,f,v)=>d.map(a=>e(n(a)))}function Ih(n,t,e){return new Date(n,t,e)}function ly(n,t){return t(n)}const uE="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function cy(n,t){return(e,r,d,u)=>u==null?vh:t(n(r))}function hE(n,t){let e=n.series[t];return e.width?e.stroke(n,t):e.points.width?e.points.stroke(n,t):null}function dE(n,t){return n.series[t].fill(n,t)}const fE={show:!0,live:!0,isolate:!1,mount:M$,markers:{show:!0,width:2,stroke:hE,fill:dE,dash:"solid"},idx:null,idxs:null,values:[]};function pE(n,t){let e=n.cursor.points,r=Vi(),d=e.size(n,t);Tn(r,hl,d),Tn(r,dl,d);let u=d/-2;Tn(r,"marginLeft",u),Tn(r,"marginTop",u);let f=e.width(n,t,d);return f&&Tn(r,"borderWidth",f),r}function gE(n,t){let e=n.series[t].points;return e._fill||e._stroke}function mE(n,t){let e=n.series[t].points;return e._stroke||e._fill}function vE(n,t){return n.series[t].points.size}const Mh=[0,0];function yE(n,t,e){return Mh[0]=t,Mh[1]=e,Mh}function Cc(n,t,e,r=!0){return d=>{d.button==0&&(!r||d.target==t)&&e(d)}}function Lh(n,t,e,r=!0){return d=>{(!r||d.target==t)&&e(d)}}const bE={show:!0,x:!0,y:!0,lock:!1,move:yE,points:{one:!1,show:pE,size:vE,width:0,stroke:mE,fill:gE},bind:{mousedown:Cc,mouseup:Cc,click:Cc,dblclick:Cc,mousemove:Lh,mouseleave:Lh,mouseenter:Lh},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(n,t)=>{t.stopPropagation(),t.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(n,t,e,r,d)=>r-d,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},uy={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},Oh=cr({},uy,{filter:jv}),hy=cr({},Oh,{size:10}),dy=cr({},uy,{show:!1}),Nh='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"',fy="bold "+Nh,py=1.5,gy={show:!0,scale:"x",stroke:ph,space:50,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:fy,side:2,grid:Oh,ticks:hy,border:dy,font:Nh,lineGap:py,rotate:0},wE="Value",xE="Time",my={show:!0,scale:"x",auto:!1,sorted:1,min:_n,max:-_n,idxs:[]};function CE(n,t,e,r,d){return t.map(u=>u==null?"":kh(u))}function _E(n,t,e,r,d,u,f){let v=[],a=cs.get(d)||0;e=f?e:An(yc(e,d),a);for(let g=e;g<=r;g=An(g+d,a))v.push(Object.is(g,-0)?0:g);return v}function Dh(n,t,e,r,d,u,f){const v=[],a=n.scales[n.axes[t].scale].log,g=a==10?Vo:Dv,i=Ri(g(e));d=xa(a,i),a==10&&(d=Fs[po(d,Fs)]);let o=e,c=d*a;a==10&&(c=Fs[po(c,Fs)]);do v.push(o),o=o+d,a==10&&!cs.has(o)&&(o=An(o,cs.get(d))),o>=c&&(d=o,c=d*a,a==10&&(c=Fs[po(c,Fs)]));while(o<=r);return v}function AE(n,t,e,r,d,u,f){let v=n.scales[n.axes[t].scale].asinh,a=r>v?Dh(n,t,ri(v,e),r,d):[v],g=r>=0&&e<=0?[0]:[];return(e<-v?Dh(n,t,ri(v,-r),-e,d):[v]).reverse().map(i=>-i).concat(g,a)}const vy=/./,kE=/[12357]/,SE=/[125]/,yy=/1/,Ph=(n,t,e,r)=>n.map((d,u)=>t==4&&d==0||u%r==0&&e.test(d.toExponential()[d<0?1:0])?d:null);function $E(n,t,e,r,d){let u=n.axes[e],f=u.scale,v=n.scales[f],a=n.valToPos,g=u._space,i=a(10,f),o=a(9,f)-i>=g?vy:a(7,f)-i>=g?kE:a(5,f)-i>=g?SE:yy;if(o==yy){let c=yr(a(1,f)-i);if(c<g)return Ph(t.slice().reverse(),v.distr,o,Gi(g/c)).reverse()}return Ph(t,v.distr,o,1)}function EE(n,t,e,r,d){let u=n.axes[e],f=u.scale,v=u._space,a=n.valToPos,g=yr(a(1,f)-a(2,f));return g<v?Ph(t.slice().reverse(),3,vy,Gi(v/g)).reverse():t}function TE(n,t,e,r){return r==null?vh:t==null?"":kh(t)}const by={show:!0,scale:"y",stroke:ph,space:30,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:fy,side:3,grid:Oh,ticks:hy,border:dy,font:Nh,lineGap:py,rotate:0};function RE(n,t){let e=3+(n||1)*2;return An(e*t,3)}function IE(n,t){let{scale:e,idxs:r}=n.series[0],d=n._data[0],u=n.valToPos(d[r[0]],e,!0),f=n.valToPos(d[r[1]],e,!0),v=yr(f-u),a=n.series[t],g=v/(a.points.space*ln);return r[1]-r[0]<=g}const wy={scale:null,auto:!0,sorted:0,min:_n,max:-_n},xy=(n,t,e,r,d)=>d,Cy={show:!0,auto:!0,sorted:0,gaps:xy,alpha:1,facets:[cr({},wy,{scale:"x"}),cr({},wy,{scale:"y"})]},_y={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:xy,alpha:1,points:{show:IE,filter:null},values:null,min:_n,max:-_n,idxs:[],path:null,clip:null};function ME(n,t,e,r,d){return e/10}const Ay={time:r$,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},LE=cr({},Ay,{time:!1,ori:1}),ky={};function Sy(n,t){let e=ky[n];return e||(e={key:n,plots:[],sub(r){e.plots.push(r)},unsub(r){e.plots=e.plots.filter(d=>d!=r)},pub(r,d,u,f,v,a,g){for(let i=0;i<e.plots.length;i++)e.plots[i]!=d&&e.plots[i].pub(r,d,u,f,v,a,g)}},n!=null&&(ky[n]=e)),e}const ka=1,Fh=2;function zs(n,t,e){const r=n.mode,d=n.series[t],u=r==2?n._data[t]:n._data,f=n.scales,v=n.bbox;let a=u[0],g=r==2?u[1]:u[t],i=r==2?f[d.facets[0].scale]:f[n.series[0].scale],o=r==2?f[d.facets[1].scale]:f[d.scale],c=v.left,p=v.top,s=v.width,h=v.height,m=n.valToPosH,y=n.valToPosV;return i.ori==0?e(d,a,g,i,o,m,y,c,p,s,h,Ac,Sa,Sc,Ty,Iy):e(d,a,g,i,o,y,m,p,c,h,s,kc,$a,Bh,Ry,My)}function zh(n,t){let e=0,r=0,d=rn(n.bands,Eh);for(let u=0;u<d.length;u++){let f=d[u];f.series[0]==t?e=f.dir:f.series[1]==t&&(f.dir==1?r|=1:r|=2)}return[e,r==1?-1:r==2?1:r==3?2:0]}function OE(n,t,e,r,d){let u=n.mode,f=n.series[t],v=u==2?f.facets[1].scale:f.scale,a=n.scales[v];return d==-1?a.min:d==1?a.max:a.distr==3?a.dir==1?a.min:a.max:0}function Go(n,t,e,r,d,u){return zs(n,t,(f,v,a,g,i,o,c,p,s,h,m)=>{let y=f.pxRound;const x=g.dir*(g.ori==0?1:-1),T=g.ori==0?Sa:$a;let S,_;x==1?(S=e,_=r):(S=r,_=e);let C=y(o(v[S],g,h,p)),L=y(c(a[S],i,m,s)),O=y(o(v[_],g,h,p)),M=y(c(u==1?i.max:i.min,i,m,s)),I=new Path2D(d);return T(I,O,M),T(I,C,M),T(I,C,L),I})}function _c(n,t,e,r,d,u){let f=null;if(n.length>0){f=new Path2D;const v=t==0?Sc:Bh;let a=e;for(let o=0;o<n.length;o++){let c=n[o];if(c[1]>c[0]){let p=c[0]-a;p>0&&v(f,a,r,p,r+u),a=c[1]}}let g=e+d-a,i=10;g>0&&v(f,a,r-i/2,g,r+u+i)}return f}function NE(n,t,e){let r=n[n.length-1];r&&r[0]==t?r[1]=e:n.push([t,e])}function jh(n,t,e,r,d,u,f){let v=[],a=n.length;for(let g=d==1?e:r;g>=e&&g<=r;g+=d)if(t[g]===null){let i=g,o=g;if(d==1)for(;++g<=r&&t[g]===null;)o=g;else for(;--g>=e&&t[g]===null;)o=g;let c=u(n[i]),p=o==i?c:u(n[o]),s=i-d;c=f<=0&&s>=0&&s<a?u(n[s]):c;let h=o+d;p=f>=0&&h>=0&&h<a?u(n[h]):p,p>=c&&v.push([c,p])}return v}function $y(n){return n==0?zv:n==1?br:t=>Ps(t,n)}function Ey(n){let t=n==0?Ac:kc,e=n==0?(d,u,f,v,a,g)=>{d.arcTo(u,f,v,a,g)}:(d,u,f,v,a,g)=>{d.arcTo(f,u,a,v,g)},r=n==0?(d,u,f,v,a)=>{d.rect(u,f,v,a)}:(d,u,f,v,a)=>{d.rect(f,u,a,v)};return(d,u,f,v,a,g=0,i=0)=>{g==0&&i==0?r(d,u,f,v,a):(g=go(g,v/2,a/2),i=go(i,v/2,a/2),t(d,u+g,f),e(d,u+v,f,u+v,f+a,g),e(d,u+v,f+a,u,f+a,i),e(d,u,f+a,u,f,i),e(d,u,f,u+v,f,g),d.closePath())}}const Ac=(n,t,e)=>{n.moveTo(t,e)},kc=(n,t,e)=>{n.moveTo(e,t)},Sa=(n,t,e)=>{n.lineTo(t,e)},$a=(n,t,e)=>{n.lineTo(e,t)},Sc=Ey(0),Bh=Ey(1),Ty=(n,t,e,r,d,u)=>{n.arc(t,e,r,d,u)},Ry=(n,t,e,r,d,u)=>{n.arc(e,t,r,d,u)},Iy=(n,t,e,r,d,u,f)=>{n.bezierCurveTo(t,e,r,d,u,f)},My=(n,t,e,r,d,u,f)=>{n.bezierCurveTo(e,t,d,r,f,u)};function Ly(n){return(t,e,r,d,u)=>zs(t,e,(f,v,a,g,i,o,c,p,s,h,m)=>{let{pxRound:y,points:x}=f,T,S;g.ori==0?(T=Ac,S=Ty):(T=kc,S=Ry);const _=An(x.width*ln,3);let C=(x.size-x.width)/2*ln,L=An(C*2,3),O=new Path2D,M=new Path2D,{left:I,top:B,width:F,height:N}=t.bbox;Sc(M,I-L,B-L,F+L*2,N+L*2);const E=A=>{if(a[A]!=null){let D=y(o(v[A],g,h,p)),j=y(c(a[A],i,m,s));T(O,D+C,j),S(O,D,j,C,0,vc*2)}};if(u)u.forEach(E);else for(let A=r;A<=d;A++)E(A);return{stroke:_>0?O:null,fill:O,clip:M,flags:ka|Fh}})}function Oy(n){return(t,e,r,d,u,f)=>{r!=d&&(u!=r&&f!=r&&n(t,e,r),u!=d&&f!=d&&n(t,e,d),n(t,e,f))}}const DE=Oy(Sa),PE=Oy($a);function Ny(n){const t=rn(n?.alignGaps,0);return(e,r,d,u)=>zs(e,r,(f,v,a,g,i,o,c,p,s,h,m)=>{[d,u]=pc(a,d,u);let y=f.pxRound,x=F=>y(o(F,g,h,p)),T=F=>y(c(F,i,m,s)),S,_;g.ori==0?(S=Sa,_=DE):(S=$a,_=PE);const C=g.dir*(g.ori==0?1:-1),L={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:ka},O=L.stroke;let M=!1;if(u-d>=h*4){let F=oe=>e.posToVal(oe,g.key,!0),N=null,E=null,A,D,j,W=x(v[C==1?d:u]),V=x(v[d]),K=x(v[u]),X=F(C==1?V+1:K-1);for(let oe=C==1?d:u;oe>=d&&oe<=u;oe+=C){let ee=v[oe],le=(C==1?ee<X:ee>X)?W:x(ee),ue=a[oe];le==W?ue!=null?(D=ue,N==null?(S(O,le,T(D)),A=N=E=D):D<N?N=D:D>E&&(E=D)):ue===null&&(M=!0):(N!=null&&_(O,W,T(N),T(E),T(A),T(D)),ue!=null?(D=ue,S(O,le,T(D)),N=E=A=D):(N=E=null,ue===null&&(M=!0)),W=le,X=F(W+C))}N!=null&&N!=E&&j!=W&&_(O,W,T(N),T(E),T(A),T(D))}else for(let F=C==1?d:u;F>=d&&F<=u;F+=C){let N=a[F];N===null?M=!0:N!=null&&S(O,x(v[F]),T(N))}let[I,B]=zh(e,r);if(f.fill!=null||I!=0){let F=L.fill=new Path2D(O),N=f.fillTo(e,r,f.min,f.max,I),E=T(N),A=x(v[d]),D=x(v[u]);C==-1&&([D,A]=[A,D]),S(F,D,E),S(F,A,E)}if(!f.spanGaps){let F=[];M&&F.push(...jh(v,a,d,u,C,x,t)),L.gaps=F=f.gaps(e,r,d,u,F),L.clip=_c(F,g.ori,p,s,h,m)}return B!=0&&(L.band=B==2?[Go(e,r,d,u,O,-1),Go(e,r,d,u,O,1)]:Go(e,r,d,u,O,B)),L})}function FE(n){const t=rn(n.align,1),e=rn(n.ascDesc,!1),r=rn(n.alignGaps,0),d=rn(n.extend,!1);return(u,f,v,a)=>zs(u,f,(g,i,o,c,p,s,h,m,y,x,T)=>{[v,a]=pc(o,v,a);let S=g.pxRound,{left:_,width:C}=u.bbox,L=K=>S(s(K,c,x,m)),O=K=>S(h(K,p,T,y)),M=c.ori==0?Sa:$a;const I={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:ka},B=I.stroke,F=c.dir*(c.ori==0?1:-1);let N=O(o[F==1?v:a]),E=L(i[F==1?v:a]),A=E,D=E;d&&t==-1&&(D=_,M(B,D,N)),M(B,E,N);for(let K=F==1?v:a;K>=v&&K<=a;K+=F){let X=o[K];if(X==null)continue;let oe=L(i[K]),ee=O(X);t==1?M(B,oe,N):M(B,A,ee),M(B,oe,ee),N=ee,A=oe}let j=A;d&&t==1&&(j=_+C,M(B,j,N));let[W,V]=zh(u,f);if(g.fill!=null||W!=0){let K=I.fill=new Path2D(B),X=g.fillTo(u,f,g.min,g.max,W),oe=O(X);M(K,j,oe),M(K,D,oe)}if(!g.spanGaps){let K=[];K.push(...jh(i,o,v,a,F,L,r));let X=g.width*ln/2,oe=e||t==1?X:-X,ee=e||t==-1?-X:X;K.forEach(le=>{le[0]+=oe,le[1]+=ee}),I.gaps=K=g.gaps(u,f,v,a,K),I.clip=_c(K,c.ori,m,y,x,T)}return V!=0&&(I.band=V==2?[Go(u,f,v,a,B,-1),Go(u,f,v,a,B,1)]:Go(u,f,v,a,B,V)),I})}function Dy(n,t,e,r,d,u,f=_n){if(n.length>1){let v=null;for(let a=0,g=1/0;a<n.length;a++)if(t[a]!==void 0){if(v!=null){let i=yr(n[a]-n[v]);i<g&&(g=i,f=yr(e(n[a],r,d,u)-e(n[v],r,d,u)))}v=a}}return f}function zE(n){n=n||ml;const t=rn(n.size,[.6,_n,1]),e=n.align||0,r=n.gap||0;let d=n.radius;d=d==null?[0,0]:typeof d=="number"?[d,0]:d;const u=qt(d),f=1-t[0],v=rn(t[1],_n),a=rn(t[2],1),g=rn(n.disp,ml),i=rn(n.each,p=>{}),{fill:o,stroke:c}=g;return(p,s,h,m)=>zs(p,s,(y,x,T,S,_,C,L,O,M,I,B)=>{let F=y.pxRound,N=e,E=r*ln,A=v*ln,D=a*ln,j,W;S.ori==0?[j,W]=u(p,s):[W,j]=u(p,s);const V=S.dir*(S.ori==0?1:-1);let K=S.ori==0?Sc:Bh,X=S.ori==0?i:(Ze,Pt,In,Hn,Kn,Un,wn)=>{i(Ze,Pt,In,Kn,Hn,wn,Un)},oe=rn(p.bands,Eh).find(Ze=>Ze.series[0]==s),ee=oe!=null?oe.dir:0,le=y.fillTo(p,s,y.min,y.max,ee),ue=F(L(le,_,B,M)),ne,fe,Se,Te=I,Re=F(y.width*ln),Ve=!1,Ue=null,Xe=null,ft=null,We=null;o!=null&&(Re==0||c!=null)&&(Ve=!0,Ue=o.values(p,s,h,m),Xe=new Map,new Set(Ue).forEach(Ze=>{Ze!=null&&Xe.set(Ze,new Path2D)}),Re>0&&(ft=c.values(p,s,h,m),We=new Map,new Set(ft).forEach(Ze=>{Ze!=null&&We.set(Ze,new Path2D)})));let{x0:Ie,size:Mt}=g;if(Ie!=null&&Mt!=null){N=1,x=Ie.values(p,s,h,m),Ie.unit==2&&(x=x.map(Pt=>p.posToVal(O+Pt*I,S.key,!0)));let Ze=Mt.values(p,s,h,m);Mt.unit==2?fe=Ze[0]*I:fe=C(Ze[0],S,I,O)-C(0,S,I,O),Te=Dy(x,T,C,S,I,O,Te),Se=Te-fe+E}else Te=Dy(x,T,C,S,I,O,Te),Se=Te*f+E,fe=Te-Se;Se<1&&(Se=0),Re>=fe/2&&(Re=0),Se<5&&(F=zv);let dt=Se>0,tn=Te-Se-(dt?Re:0);fe=F($h(tn,D,A)),ne=(N==0?fe/2:N==V?0:fe)-N*V*((N==0?E/2:0)+(dt?Re/2:0));const mn={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},rr=Ve?null:new Path2D;let Bt=null;if(oe!=null)Bt=p.data[oe.series[1]];else{let{y0:Ze,y1:Pt}=g;Ze!=null&&Pt!=null&&(T=Pt.values(p,s,h,m),Bt=Ze.values(p,s,h,m))}let Rn=j*fe,bt=W*fe;for(let Ze=V==1?h:m;Ze>=h&&Ze<=m;Ze+=V){let Pt=T[Ze];if(Pt==null)continue;if(Bt!=null){let on=Bt[Ze]??0;if(Pt-on==0)continue;ue=L(on,_,B,M)}let In=S.distr!=2||g!=null?x[Ze]:Ze,Hn=C(In,S,I,O),Kn=L(rn(Pt,le),_,B,M),Un=F(Hn-ne),wn=F(ri(Kn,ue)),Dn=F(go(Kn,ue)),ir=wn-Dn;if(Pt!=null){let on=Pt<0?bt:Rn,Yn=Pt<0?Rn:bt;Ve?(Re>0&&ft[Ze]!=null&&K(We.get(ft[Ze]),Un,Dn+Ri(Re/2),fe,ri(0,ir-Re),on,Yn),Ue[Ze]!=null&&K(Xe.get(Ue[Ze]),Un,Dn+Ri(Re/2),fe,ri(0,ir-Re),on,Yn)):K(rr,Un,Dn+Ri(Re/2),fe,ri(0,ir-Re),on,Yn),X(p,s,Ze,Un-Re/2,Dn,fe+Re,ir)}}return Re>0?mn.stroke=Ve?We:rr:Ve||(mn._fill=y.width==0?y._fill:y._stroke??y._fill,mn.width=0),mn.fill=Ve?Xe:rr,mn})}function jE(n,t){const e=rn(t?.alignGaps,0);return(r,d,u,f)=>zs(r,d,(v,a,g,i,o,c,p,s,h,m,y)=>{[u,f]=pc(g,u,f);let x=v.pxRound,T=j=>x(c(j,i,m,s)),S=j=>x(p(j,o,y,h)),_,C,L;i.ori==0?(_=Ac,L=Sa,C=Iy):(_=kc,L=$a,C=My);const O=i.dir*(i.ori==0?1:-1);let M=T(a[O==1?u:f]),I=M,B=[],F=[];for(let j=O==1?u:f;j>=u&&j<=f;j+=O)if(g[j]!=null){let W=a[j],V=T(W);B.push(I=V),F.push(S(g[j]))}const N={stroke:n(B,F,_,L,C,x),fill:null,clip:null,band:null,gaps:null,flags:ka},E=N.stroke;let[A,D]=zh(r,d);if(v.fill!=null||A!=0){let j=N.fill=new Path2D(E),W=v.fillTo(r,d,v.min,v.max,A),V=S(W);L(j,I,V),L(j,M,V)}if(!v.spanGaps){let j=[];j.push(...jh(a,g,u,f,O,T,e)),N.gaps=j=v.gaps(r,d,u,f,j),N.clip=_c(j,i.ori,s,h,m,y)}return D!=0&&(N.band=D==2?[Go(r,d,u,f,E,-1),Go(r,d,u,f,E,1)]:Go(r,d,u,f,E,D)),N})}function BE(n){return jE(WE,n)}function WE(n,t,e,r,d,u){const f=n.length;if(f<2)return null;const v=new Path2D;if(e(v,n[0],t[0]),f==2)r(v,n[1],t[1]);else{let a=Array(f),g=Array(f-1),i=Array(f-1),o=Array(f-1);for(let c=0;c<f-1;c++)i[c]=t[c+1]-t[c],o[c]=n[c+1]-n[c],g[c]=i[c]/o[c];a[0]=g[0];for(let c=1;c<f-1;c++)g[c]===0||g[c-1]===0||g[c-1]>0!=g[c]>0?a[c]=0:(a[c]=3*(o[c-1]+o[c])/((2*o[c]+o[c-1])/g[c-1]+(o[c]+2*o[c-1])/g[c]),isFinite(a[c])||(a[c]=0));a[f-1]=g[f-2];for(let c=0;c<f-1;c++)d(v,n[c]+o[c]/3,t[c]+a[c]*o[c]/3,n[c+1]-o[c]/3,t[c+1]-a[c+1]*o[c]/3,n[c+1],t[c+1])}return v}const Wh=new Set;function Py(){for(let n of Wh)n.syncRect(!0)}ba&&(Ns(C$,wa,Py),Ns(_$,wa,Py,!0),Ns(dc,wa,()=>{Hr.pxRatio=ln}));const HE=Ny(),UE=Ly();function Fy(n,t,e,r){return(r?[n[0],n[1]].concat(n.slice(2)):[n[0]].concat(n.slice(1))).map((d,u)=>Hh(d,u,t,e))}function VE(n,t){return n.map((e,r)=>r==0?{}:cr({},t,e))}function Hh(n,t,e,r){return cr({},t==0?e:r,n)}function zy(n,t,e){return t==null?Ca:[t,e]}const GE=zy;function qE(n,t,e){return t==null?Ca:mc(t,e,Ah,!0)}function jy(n,t,e,r){return t==null?Ca:gc(t,e,n.scales[r].log,!1)}const KE=jy;function By(n,t,e,r){return t==null?Ca:_h(t,e,n.scales[r].log,!1)}const YE=By;function XE(n,t,e,r,d){let u=ri(Pv(n),Pv(t)),f=t-n,v=po(d/r*f,e);do{let a=e[v],g=r*a/f;if(g>=d&&u+(a<5?cs.get(a):0)<=17)return[a,g]}while(++v<e.length);return[0,0]}function Wy(n){let t,e;return n=n.replace(/(\d+)px/,(r,d)=>(t=br((e=+d)*ln))+"px"),[n,t,e]}function JE(n){n.show&&[n.font,n.labelFont].forEach(t=>{let e=An(t[2]*ln,1);t[0]=t[0].replace(/[0-9.]+px/,e+"px"),t[1]=e})}function Hr(n,t,e){const r={mode:rn(n.mode,1)},d=r.mode;function u(G,Z,ae,ce){let ge=Z.valToPct(G);return ce+ae*(Z.dir==-1?1-ge:ge)}function f(G,Z,ae,ce){let ge=Z.valToPct(G);return ce+ae*(Z.dir==-1?ge:1-ge)}function v(G,Z,ae,ce){return Z.ori==0?u(G,Z,ae,ce):f(G,Z,ae,ce)}r.valToPosH=u,r.valToPosV=f;let a=!1;r.status=0;const g=r.root=Vi(i$);if(n.id!=null&&(g.id=n.id),Ei(g,n.class),n.title){let G=Vi(a$,g);G.textContent=n.title}const i=fo("canvas"),o=r.ctx=i.getContext("2d"),c=Vi(l$,g);Ns("click",c,G=>{G.target===s&&(mt!=Qi||Kt!=jo)&&Jn.click(r,G)},!0);const p=r.under=Vi(c$,c);c.appendChild(i);const s=r.over=Vi(u$,c);n=_a(n);const h=+rn(n.pxAlign,1),m=$y(h);(n.plugins||[]).forEach(G=>{G.opts&&(n=G.opts(r,n)||n)});const y=n.ms||.001,x=r.series=d==1?Fy(n.series||[],my,_y,!1):VE(n.series||[null],Cy),T=r.axes=Fy(n.axes||[],gy,by,!0),S=r.scales={},_=r.bands=n.bands||[];_.forEach(G=>{G.fill=qt(G.fill||null),G.dir=rn(G.dir,-1)});const C=d==2?x[1].facets[0].scale:x[0].scale,L={axes:Yr,series:Ko},O=(n.drawOrder||["axes","series"]).map(G=>L[G]);function M(G){const Z=G.distr==3?ae=>Vo(ae>0?ae:G.clamp(r,ae,G.min,G.max,G.key)):G.distr==4?ae=>Sh(ae,G.asinh):G.distr==100?ae=>G.fwd(ae):ae=>ae;return ae=>{let ce=Z(ae),{_min:ge,_max:_e}=G,Me=_e-ge;return(ce-ge)/Me}}function I(G){let Z=S[G];if(Z==null){let ae=(n.scales||ml)[G]||ml;if(ae.from!=null){I(ae.from);let ce=cr({},S[ae.from],ae,{key:G});ce.valToPct=M(ce),S[G]=ce}else{Z=S[G]=cr({},G==C?Ay:LE,ae),Z.key=G;let ce=Z.time,ge=Z.range,_e=us(ge);if((G!=C||d==2&&!ce)&&(_e&&(ge[0]==null||ge[1]==null)&&(ge={min:ge[0]==null?Lv:{mode:1,hard:ge[0],soft:ge[0]},max:ge[1]==null?Lv:{mode:1,hard:ge[1],soft:ge[1]}},_e=!1),!_e&&bc(ge))){let Me=ge;ge=(je,qe,Je)=>qe==null?Ca:mc(qe,Je,Me)}Z.range=qt(ge||(ce?GE:G==C?Z.distr==3?KE:Z.distr==4?YE:zy:Z.distr==3?jy:Z.distr==4?By:qE)),Z.auto=qt(_e?!1:Z.auto),Z.clamp=qt(Z.clamp||ME),Z._min=Z._max=null,Z.valToPct=M(Z)}}}I("x"),I("y"),d==1&&x.forEach(G=>{I(G.scale)}),T.forEach(G=>{I(G.scale)});for(let G in n.scales)I(G);const B=S[C],F=B.distr;let N,E;B.ori==0?(Ei(g,o$),N=u,E=f):(Ei(g,s$),N=f,E=u);const A={};for(let G in S){let Z=S[G];(Z.min!=null||Z.max!=null)&&(A[G]={min:Z.min,max:Z.max},Z.min=Z.max=null)}const D=n.tzDate||(G=>new Date(br(G/y))),j=n.fmtDate||Th,W=y==1?oE(D):lE(D),V=ay(D,sy(y==1?iE:aE,j)),K=cy(D,ly(uE,j)),X=[],oe=r.legend=cr({},fE,n.legend),ee=r.cursor=cr({},bE,{drag:{y:d==2}},n.cursor),le=oe.show,ue=ee.show,ne=oe.markers;oe.idxs=X,ne.width=qt(ne.width),ne.dash=qt(ne.dash),ne.stroke=qt(ne.stroke),ne.fill=qt(ne.fill);let fe,Se,Te,Re=[],Ve=[],Ue,Xe=!1,ft={};if(oe.live){const G=x[1]?x[1].values:null;Xe=G!=null,Ue=Xe?G(r,1,0):{_:0};for(let Z in Ue)ft[Z]=vh}if(le)if(fe=fo("table",m$,g),Te=fo("tbody",null,fe),oe.mount(r,fe),Xe){Se=fo("thead",null,fe,Te);let G=fo("tr",null,Se);fo("th",null,G);for(var We in Ue)fo("th",vv,G).textContent=We}else Ei(fe,y$),oe.live&&Ei(fe,v$);const Ie={show:!0},Mt={show:!1};function dt(G,Z){if(Z==0&&(Xe||!oe.live||d==2))return Ca;let ae=[],ce=fo("tr",b$,Te,Te.childNodes[Z]);Ei(ce,G.class),G.show||Ei(ce,Os);let ge=fo("th",null,ce);if(ne.show){let je=Vi(w$,ge);if(Z>0){let qe=ne.width(r,Z);qe&&(je.style.border=qe+"px "+ne.dash(r,Z)+" "+ne.stroke(r,Z)),je.style.background=ne.fill(r,Z)}}let _e=Vi(vv,ge);G.label instanceof HTMLElement?_e.appendChild(G.label):_e.textContent=G.label,Z>0&&(ne.show||(_e.style.color=G.width>0?ne.stroke(r,Z):ne.fill(r,Z)),mn("click",ge,je=>{if(ee._lock)return;ai(je);let qe=x.indexOf(G);if((je.ctrlKey||je.metaKey)!=oe.isolate){let Je=x.some((it,ut)=>ut>0&&ut!=qe&&it.show);x.forEach((it,ut)=>{ut>0&&pr(ut,Je?ut==qe?Ie:Mt:Ie,!0,Tt.setSeries)})}else pr(qe,{show:!G.show},!0,Tt.setSeries)},!1),Kr&&mn(xv,ge,je=>{ee._lock||(ai(je),pr(x.indexOf(G),no,!0,Tt.setSeries))},!1));for(var Me in Ue){let je=fo("td",x$,ce);je.textContent="--",ae.push(je)}return[ce,ae]}const tn=new Map;function mn(G,Z,ae,ce=!0){const ge=tn.get(Z)||{},_e=ee.bind[G](r,Z,ae,ce);_e&&(Ns(G,Z,ge[G]=_e),tn.set(Z,ge))}function rr(G,Z,ae){const ce=tn.get(Z)||{};for(let ge in ce)(G==null||ge==G)&&(Ch(ge,Z,ce[ge]),delete ce[ge]);G==null&&tn.delete(Z)}let Bt=0,Rn=0,bt=0,Ze=0,Pt=0,In=0,Hn=Pt,Kn=In,Un=bt,wn=Ze,Dn=0,ir=0,on=0,Yn=0;r.bbox={};let Ii=!1,si=!1,hr=!1,Xn=!1,Mi=!1,wr=!1;function qi(G,Z,ae){(ae||G!=r.width||Z!=r.height)&&Li(G,Z),fr(!1),hr=!0,si=!0,zo()}function Li(G,Z){r.width=Bt=bt=G,r.height=Rn=Ze=Z,Pt=In=0,Or(),mi();let ae=r.bbox;Dn=ae.left=Ps(Pt*ln,.5),ir=ae.top=Ps(In*ln,.5),on=ae.width=Ps(bt*ln,.5),Yn=ae.height=Ps(Ze*ln,.5)}const fs=3;function Sr(){let G=!1,Z=0;for(;!G;){Z++;let ae=Xt(Z),ce=Qt(Z);G=Z==fs||ae&&ce,G||(Li(r.width,r.height),si=!0)}}function Oo({width:G,height:Z}){qi(G,Z)}r.setSize=Oo;function Or(){let G=!1,Z=!1,ae=!1,ce=!1;T.forEach((ge,_e)=>{if(ge.show&&ge._show){let{side:Me,_size:je}=ge,qe=Me%2,Je=ge.label!=null?ge.labelSize:0,it=je+Je;it>0&&(qe?(bt-=it,Me==3?(Pt+=it,ce=!0):ae=!0):(Ze-=it,Me==0?(In+=it,G=!0):Z=!0))}}),$r[0]=G,$r[1]=ae,$r[2]=Z,$r[3]=ce,bt-=xr[1]+xr[3],Pt+=xr[3],Ze-=xr[2]+xr[0],In+=xr[0]}function mi(){let G=Pt+bt,Z=In+Ze,ae=Pt,ce=In;function ge(_e,Me){switch(_e){case 1:return G+=Me,G-Me;case 2:return Z+=Me,Z-Me;case 3:return ae-=Me,ae+Me;case 0:return ce-=Me,ce+Me}}T.forEach((_e,Me)=>{if(_e.show&&_e._show){let je=_e.side;_e._pos=ge(je,_e._size),_e.label!=null&&(_e._lpos=ge(je,_e.labelSize))}})}if(ee.dataIdx==null){let G=ee.hover,Z=G.skip=new Set(G.skip??[]);Z.add(void 0);let ae=G.prox=qt(G.prox),ce=G.bias??=0;ee.dataIdx=(ge,_e,Me,je)=>{if(_e==0)return Me;let qe=Me,Je=ae(ge,_e,Me,je)??_n,it=Je>=0&&Je<_n,ut=B.ori==0?bt:Ze,Et=ee.left,nn=t[0],Ht=t[_e];if(Z.has(Ht[Me])){qe=null;let kt=null,xt=null,gt;if(ce==0||ce==-1)for(gt=Me;kt==null&&gt-- >0;)Z.has(Ht[gt])||(kt=gt);if(ce==0||ce==1)for(gt=Me;xt==null&&gt++<Ht.length;)Z.has(Ht[gt])||(xt=gt);if(kt!=null||xt!=null)if(it){let kn=kt==null?-1/0:N(nn[kt],B,ut,0),Wn=xt==null?1/0:N(nn[xt],B,ut,0),mr=Et-kn,dn=Wn-Et;mr<=dn?mr<=Je&&(qe=kt):dn<=Je&&(qe=xt)}else qe=xt==null?kt:kt==null?xt:Me-kt<=xt-Me?kt:xt}else it&&yr(Et-N(nn[Me],B,ut,0))>Je&&(qe=null);return qe}}const ai=G=>{ee.event=G};ee.idxs=X,ee._lock=!1;let Mn=ee.points;Mn.show=qt(Mn.show),Mn.size=qt(Mn.size),Mn.stroke=qt(Mn.stroke),Mn.width=qt(Mn.width),Mn.fill=qt(Mn.fill);const qr=r.focus=cr({},n.focus||{alpha:.3},ee.focus),Kr=qr.prox>=0,Ln=Kr&&Mn.one;let or=[],vi=[],Oi=[];function Ni(G,Z){let ae=Mn.show(r,Z);if(ae instanceof HTMLElement)return Ei(ae,g$),Ei(ae,G.class),Io(ae,-10,-10,bt,Ze),s.insertBefore(ae,or[Z]),ae}function ps(G,Z){if(d==1||Z>0){let ae=d==1&&S[G.scale].time,ce=G.value;G.value=ae?Gv(ce)?cy(D,ly(ce,j)):ce||K:ce||TE,G.label=G.label||(ae?xE:wE)}if(Ln||Z>0){G.width=G.width==null?1:G.width,G.paths=G.paths||HE||L$,G.fillTo=qt(G.fillTo||OE),G.pxAlign=+rn(G.pxAlign,h),G.pxRound=$y(G.pxAlign),G.stroke=qt(G.stroke||null),G.fill=qt(G.fill||null),G._stroke=G._fill=G._paths=G._focus=null;let ae=RE(ri(1,G.width),1),ce=G.points=cr({},{size:ae,width:ri(1,ae*.2),stroke:G.stroke,space:ae*2,paths:UE,_stroke:null,_fill:null},G.points);ce.show=qt(ce.show),ce.filter=qt(ce.filter),ce.fill=qt(ce.fill),ce.stroke=qt(ce.stroke),ce.paths=qt(ce.paths),ce.pxAlign=G.pxAlign}if(le){let ae=dt(G,Z);Re.splice(Z,0,ae[0]),Ve.splice(Z,0,ae[1]),oe.values.push(null)}if(ue){X.splice(Z,0,null);let ae=null;Ln?Z==0&&(ae=Ni(G,Z)):Z>0&&(ae=Ni(G,Z)),or.splice(Z,0,ae),vi.splice(Z,0,0),Oi.splice(Z,0,0)}ht("addSeries",Z)}function Ys(G,Z){Z=Z??x.length,G=d==1?Hh(G,Z,my,_y):Hh(G,Z,{},Cy),x.splice(Z,0,G),ps(x[Z],Z)}r.addSeries=Ys;function vn(G){if(x.splice(G,1),le){oe.values.splice(G,1),Ve.splice(G,1);let Z=Re.splice(G,1)[0];rr(null,Z.firstChild),Z.remove()}ue&&(X.splice(G,1),or.splice(G,1)[0].remove(),vi.splice(G,1),Oi.splice(G,1)),ht("delSeries",G)}r.delSeries=vn;const $r=[!1,!1,!1,!1];function yi(G,Z){if(G._show=G.show,G.show){let ae=G.side%2,ce=S[G.scale];ce==null&&(G.scale=ae?x[1].scale:C,ce=S[G.scale]);let ge=ce.time;G.size=qt(G.size),G.space=qt(G.space),G.rotate=qt(G.rotate),us(G.incrs)&&G.incrs.forEach(Me=>{!cs.has(Me)&&cs.set(Me,Uv(Me))}),G.incrs=qt(G.incrs||(ce.distr==2?tE:ge?y==1?rE:sE:Fs)),G.splits=qt(G.splits||(ge&&ce.distr==1?W:ce.distr==3?Dh:ce.distr==4?AE:_E)),G.stroke=qt(G.stroke),G.grid.stroke=qt(G.grid.stroke),G.ticks.stroke=qt(G.ticks.stroke),G.border.stroke=qt(G.border.stroke);let _e=G.values;G.values=us(_e)&&!us(_e[0])?qt(_e):ge?us(_e)?ay(D,sy(_e,j)):Gv(_e)?cE(D,_e):_e||V:_e||CE,G.filter=qt(G.filter||(ce.distr>=3&&ce.log==10?$E:ce.distr==3&&ce.log==2?EE:jv)),G.font=Wy(G.font),G.labelFont=Wy(G.labelFont),G._size=G.size(r,null,Z,0),G._space=G._rotate=G._incrs=G._found=G._splits=G._values=null,G._size>0&&($r[Z]=!0,G._el=Vi(h$,c))}}function Ft(G,Z,ae,ce){let[ge,_e,Me,je]=ae,qe=Z%2,Je=0;return qe==0&&(je||_e)&&(Je=Z==0&&!ge||Z==2&&!Me?br(gy.size/3):0),qe==1&&(ge||Me)&&(Je=Z==1&&!_e||Z==3&&!je?br(by.size/2):0),Je}const No=r.padding=(n.padding||[Ft,Ft,Ft,Ft]).map(G=>qt(rn(G,Ft))),xr=r._padding=No.map((G,Z)=>G(r,Z,$r,0));let Pn,xn=null,Fn=null;const bo=d==1?x[0].idxs:null;let sr=null,Nr=!1;function bi(G,Z){if(t=G??[],r.data=r._data=t,d==2){Pn=0;for(let ae=1;ae<x.length;ae++)Pn+=t[ae][0].length}else{t.length==0&&(r.data=r._data=t=[[]]),sr=t[0],Pn=sr.length;let ae=t;if(F==2){ae=t.slice();let ce=ae[0]=Array(Pn);for(let ge=0;ge<Pn;ge++)ce[ge]=ge}r._data=t=ae}if(fr(!0),ht("setData"),F==2&&(hr=!0),Z!==!1){let ae=B;ae.auto(r,Nr)?li():Jr(C,ae.min,ae.max),Xn=Xn||ee.left>=0,wr=!0,zo()}}r.setData=bi;function li(){Nr=!0;let G,Z;d==1&&(Pn>0?(xn=bo[0]=0,Fn=bo[1]=Pn-1,G=t[0][xn],Z=t[0][Fn],F==2?(G=xn,Z=Fn):G==Z&&(F==3?[G,Z]=gc(G,G,B.log,!1):F==4?[G,Z]=_h(G,G,B.log,!1):B.time?Z=G+br(86400/y):[G,Z]=mc(G,Z,Ah,!0))):(xn=bo[0]=G=null,Fn=bo[1]=Z=null)),Jr(C,G,Z)}let Ki,ci,Yi,wo,dr,Xi,Ji,wi,Di,yn;function qo(G,Z,ae,ce,ge,_e){G??=bv,ae??=Eh,ce??="butt",ge??=bv,_e??="round",G!=Ki&&(o.strokeStyle=Ki=G),ge!=ci&&(o.fillStyle=ci=ge),Z!=Yi&&(o.lineWidth=Yi=Z),_e!=dr&&(o.lineJoin=dr=_e),ce!=Xi&&(o.lineCap=Xi=ce),ae!=wo&&o.setLineDash(wo=ae)}function Do(G,Z,ae,ce){Z!=ci&&(o.fillStyle=ci=Z),G!=Ji&&(o.font=Ji=G),ae!=wi&&(o.textAlign=wi=ae),ce!=Di&&(o.textBaseline=Di=ce)}function Pi(G,Z,ae,ce,ge=0){if(ce.length>0&&G.auto(r,Nr)&&(Z==null||Z.min==null)){let _e=rn(xn,0),Me=rn(Fn,ce.length-1),je=ae.min==null?$$(ce,_e,Me,ge,G.distr==3):[ae.min,ae.max];G.min=go(G.min,ae.min=je[0]),G.max=ri(G.max,ae.max=je[1])}}const Po={min:null,max:null};function Fo(){for(let ce in S){let ge=S[ce];A[ce]==null&&(ge.min==null||A[C]!=null&&ge.auto(r,Nr))&&(A[ce]=Po)}for(let ce in S){let ge=S[ce];A[ce]==null&&ge.from!=null&&A[ge.from]!=null&&(A[ce]=Po)}A[C]!=null&&fr(!0);let G={};for(let ce in A){let ge=A[ce];if(ge!=null){let _e=G[ce]=_a(S[ce],D$);if(ge.min!=null)cr(_e,ge);else if(ce!=C||d==2)if(Pn==0&&_e.from==null){let Me=_e.range(r,null,null,ce);_e.min=Me[0],_e.max=Me[1]}else _e.min=_n,_e.max=-_n}}if(Pn>0){x.forEach((ce,ge)=>{if(d==1){let _e=ce.scale,Me=A[_e];if(Me==null)return;let je=G[_e];if(ge==0){let qe=je.range(r,je.min,je.max,_e);je.min=qe[0],je.max=qe[1],xn=po(je.min,t[0]),Fn=po(je.max,t[0]),Fn-xn>1&&(t[0][xn]<je.min&&xn++,t[0][Fn]>je.max&&Fn--),ce.min=sr[xn],ce.max=sr[Fn]}else ce.show&&ce.auto&&Pi(je,Me,ce,t[ge],ce.sorted);ce.idxs[0]=xn,ce.idxs[1]=Fn}else if(ge>0&&ce.show&&ce.auto){let[_e,Me]=ce.facets,je=_e.scale,qe=Me.scale,[Je,it]=t[ge],ut=G[je],Et=G[qe];ut!=null&&Pi(ut,A[je],_e,Je,_e.sorted),Et!=null&&Pi(Et,A[qe],Me,it,Me.sorted),ce.min=Me.min,ce.max=Me.max}});for(let ce in G){let ge=G[ce],_e=A[ce];if(ge.from==null&&(_e==null||_e.min==null)){let Me=ge.range(r,ge.min==_n?null:ge.min,ge.max==-_n?null:ge.max,ce);ge.min=Me[0],ge.max=Me[1]}}}for(let ce in G){let ge=G[ce];if(ge.from!=null){let _e=G[ge.from];if(_e.min==null)ge.min=ge.max=null;else{let Me=ge.range(r,_e.min,_e.max,ce);ge.min=Me[0],ge.max=Me[1]}}}let Z={},ae=!1;for(let ce in G){let ge=G[ce],_e=S[ce];if(_e.min!=ge.min||_e.max!=ge.max){_e.min=ge.min,_e.max=ge.max;let Me=_e.distr;_e._min=Me==3?Vo(_e.min):Me==4?Sh(_e.min,_e.asinh):Me==100?_e.fwd(_e.min):_e.min,_e._max=Me==3?Vo(_e.max):Me==4?Sh(_e.max,_e.asinh):Me==100?_e.fwd(_e.max):_e.max,Z[ce]=ae=!0}}if(ae){x.forEach((ce,ge)=>{d==2?ge>0&&Z.y&&(ce._paths=null):Z[ce.scale]&&(ce._paths=null)});for(let ce in Z)hr=!0,ht("setScale",ce);ue&&ee.left>=0&&(Xn=wr=!0)}for(let ce in A)A[ce]=null}function Zi(G){let Z=$h(xn-1,0,Pn-1),ae=$h(Fn+1,0,Pn-1);for(;G[Z]==null&&Z>0;)Z--;for(;G[ae]==null&&ae<Pn-1;)ae++;return[Z,ae]}function Ko(){if(Pn>0){let G=x.some(Z=>Z._focus)&&yn!=qr.alpha;G&&(o.globalAlpha=yn=qr.alpha),x.forEach((Z,ae)=>{if(ae>0&&Z.show&&(Yo(ae,!1),Yo(ae,!0),Z._paths==null)){let ce=yn;yn!=Z.alpha&&(o.globalAlpha=yn=Z.alpha);let ge=d==2?[0,t[ae][0].length-1]:Zi(t[ae]);Z._paths=Z.paths(r,ae,ge[0],ge[1]),yn!=ce&&(o.globalAlpha=yn=ce)}}),x.forEach((Z,ae)=>{if(ae>0&&Z.show){let ce=yn;yn!=Z.alpha&&(o.globalAlpha=yn=Z.alpha),Z._paths!=null&&xo(ae,!1);{let ge=Z._paths!=null?Z._paths.gaps:null,_e=Z.points.show(r,ae,xn,Fn,ge),Me=Z.points.filter(r,ae,_e,ge);(_e||Me)&&(Z.points._paths=Z.points.paths(r,ae,xn,Fn,Me),xo(ae,!0))}yn!=ce&&(o.globalAlpha=yn=ce),ht("drawSeries",ae)}}),G&&(o.globalAlpha=yn=1)}}function Yo(G,Z){let ae=Z?x[G].points:x[G];ae._stroke=ae.stroke(r,G),ae._fill=ae.fill(r,G)}function xo(G,Z){let ae=Z?x[G].points:x[G],{stroke:ce,fill:ge,clip:_e,flags:Me,_stroke:je=ae._stroke,_fill:qe=ae._fill,_width:Je=ae.width}=ae._paths;Je=An(Je*ln,3);let it=null,ut=Je%2/2;Z&&qe==null&&(qe=Je>0?"#fff":je);let Et=ae.pxAlign==1&&ut>0;if(Et&&o.translate(ut,ut),!Z){let nn=Dn-Je/2,Ht=ir-Je/2,kt=on+Je,xt=Yn+Je;it=new Path2D,it.rect(nn,Ht,kt,xt)}Z?ie(je,Je,ae.dash,ae.cap,qe,ce,ge,Me,_e):Co(G,je,Je,ae.dash,ae.cap,qe,ce,ge,Me,it,_e),Et&&o.translate(-ut,-ut)}function Co(G,Z,ae,ce,ge,_e,Me,je,qe,Je,it){let ut=!1;qe!=0&&_.forEach((Et,nn)=>{if(Et.series[0]==G){let Ht=x[Et.series[1]],kt=t[Et.series[1]],xt=(Ht._paths||ml).band;us(xt)&&(xt=Et.dir==1?xt[0]:xt[1]);let gt,kn=null;Ht.show&&xt&&T$(kt,xn,Fn)?(kn=Et.fill(r,nn)||_e,gt=Ht._paths.clip):xt=null,ie(Z,ae,ce,ge,kn,Me,je,qe,Je,it,gt,xt),ut=!0}}),ut||ie(Z,ae,ce,ge,_e,Me,je,qe,Je,it)}const xi=ka|Fh;function ie(G,Z,ae,ce,ge,_e,Me,je,qe,Je,it,ut){qo(G,Z,ae,ce,ge),(qe||Je||ut)&&(o.save(),qe&&o.clip(qe),Je&&o.clip(Je)),ut?(je&xi)==xi?(o.clip(ut),it&&o.clip(it),Le(ge,Me),$e(G,_e,Z)):je&Fh?(Le(ge,Me),o.clip(ut),$e(G,_e,Z)):je&ka&&(o.save(),o.clip(ut),it&&o.clip(it),Le(ge,Me),o.restore(),$e(G,_e,Z)):(Le(ge,Me),$e(G,_e,Z)),(qe||Je||ut)&&o.restore()}function $e(G,Z,ae){ae>0&&(Z instanceof Map?Z.forEach((ce,ge)=>{o.strokeStyle=Ki=ge,o.stroke(ce)}):Z!=null&&G&&o.stroke(Z))}function Le(G,Z){Z instanceof Map?Z.forEach((ae,ce)=>{o.fillStyle=ci=ce,o.fill(ae)}):Z!=null&&G&&o.fill(Z)}function rt(G,Z,ae,ce){let ge=T[G],_e;if(ce<=0)_e=[0,0];else{let Me=ge._space=ge.space(r,G,Z,ae,ce),je=ge._incrs=ge.incrs(r,G,Z,ae,ce,Me);_e=XE(Z,ae,je,ce,Me)}return ge._found=_e}function wt(G,Z,ae,ce,ge,_e,Me,je,qe,Je){let it=Me%2/2;h==1&&o.translate(it,it),qo(je,Me,qe,Je,je),o.beginPath();let ut,Et,nn,Ht,kt=ge+(ce==0||ce==3?-_e:_e);ae==0?(Et=ge,Ht=kt):(ut=ge,nn=kt);for(let xt=0;xt<G.length;xt++)Z[xt]!=null&&(ae==0?ut=nn=G[xt]:Et=Ht=G[xt],o.moveTo(ut,Et),o.lineTo(nn,Ht));o.stroke(),h==1&&o.translate(-it,-it)}function Xt(G){let Z=!0;return T.forEach((ae,ce)=>{if(!ae.show)return;let ge=S[ae.scale];if(ge.min==null){ae._show&&(Z=!1,ae._show=!1,fr(!1));return}else ae._show||(Z=!1,ae._show=!0,fr(!1));let _e=ae.side,Me=_e%2,{min:je,max:qe}=ge,[Je,it]=rt(ce,je,qe,Me==0?bt:Ze);if(it==0)return;let ut=ge.distr==2,Et=ae._splits=ae.splits(r,ce,je,qe,Je,it,ut),nn=ge.distr==2?Et.map(gt=>sr[gt]):Et,Ht=ge.distr==2?sr[Et[1]]-sr[Et[0]]:Je,kt=ae._values=ae.values(r,ae.filter(r,nn,ce,it,Ht),ce,it,Ht);ae._rotate=_e==2?ae.rotate(r,kt,ce,it):0;let xt=ae._size;ae._size=Gi(ae.size(r,kt,ce,G)),xt!=null&&ae._size!=xt&&(Z=!1)}),Z}function Qt(G){let Z=!0;return No.forEach((ae,ce)=>{let ge=ae(r,ce,$r,G);ge!=xr[ce]&&(Z=!1),xr[ce]=ge}),Z}function Yr(){for(let G=0;G<T.length;G++){let Z=T[G];if(!Z.show||!Z._show)continue;let ae=Z.side,ce=ae%2,ge,_e,Me=Z.stroke(r,G),je=ae==0||ae==3?-1:1,[qe,Je]=Z._found;if(Z.label!=null){let Fr=Z.labelGap*je,En=br((Z._lpos+Fr)*ln);Do(Z.labelFont[0],Me,"center",ae==2?fl:yv),o.save(),ce==1?(ge=_e=0,o.translate(En,br(ir+Yn/2)),o.rotate((ae==3?-vc:vc)/2)):(ge=br(Dn+on/2),_e=En);let ro=Fv(Z.label)?Z.label(r,G,qe,Je):Z.label;o.fillText(ro,ge,_e),o.restore()}if(Je==0)continue;let it=S[Z.scale],ut=ce==0?on:Yn,Et=ce==0?Dn:ir,nn=Z._splits,Ht=it.distr==2?nn.map(Fr=>sr[Fr]):nn,kt=it.distr==2?sr[nn[1]]-sr[nn[0]]:qe,xt=Z.ticks,gt=Z.border,kn=xt.show?xt.size:0,Wn=br(kn*ln),mr=br((Z.alignTo==2?Z._size-kn-Z.gap:Z.gap)*ln),dn=Z._rotate*-vc/180,bn=m(Z._pos*ln),me=(Wn+mr)*je,Ee=bn+me;_e=ce==0?Ee:0,ge=ce==1?Ee:0;let ke=Z.font[0],Qe=Z.align==1?ya:Z.align==2?fh:dn>0?ya:dn<0?fh:ce==0?"center":ae==3?fh:ya,yt=dn||ce==1?"middle":ae==2?fl:yv;Do(ke,Me,Qe,yt);let It=Z.font[1]*Z.lineGap,sn=nn.map(Fr=>m(v(Fr,it,ut,Et))),Ut=Z._values;for(let Fr=0;Fr<Ut.length;Fr++){let En=Ut[Fr];if(En!=null){ce==0?ge=sn[Fr]:_e=sn[Fr],En=""+En;let ro=En.indexOf(`
1480
+ `)==-1?[En]:En.split(/\n/gm);for(let zr=0;zr<ro.length;zr++){let Zo=ro[zr];dn?(o.save(),o.translate(ge,_e+zr*It),o.rotate(dn),o.fillText(Zo,0,0),o.restore()):o.fillText(Zo,ge,_e+zr*It)}}}xt.show&&wt(sn,xt.filter(r,Ht,G,Je,kt),ce,ae,bn,Wn,An(xt.width*ln,3),xt.stroke(r,G),xt.dash,xt.cap);let _i=Z.grid;_i.show&&wt(sn,_i.filter(r,Ht,G,Je,kt),ce,ce==0?2:1,ce==0?ir:Dn,ce==0?Yn:on,An(_i.width*ln,3),_i.stroke(r,G),_i.dash,_i.cap),gt.show&&wt([bn],[1],ce==0?1:0,ce==0?1:2,ce==1?ir:Dn,ce==1?Yn:on,An(gt.width*ln,3),gt.stroke(r,G),gt.dash,gt.cap)}ht("drawAxes")}function fr(G){x.forEach((Z,ae)=>{ae>0&&(Z._paths=null,G&&(d==1?(Z.min=null,Z.max=null):Z.facets.forEach(ce=>{ce.min=null,ce.max=null})))})}let zn=!1,Dr=!1,Sn=[];function ja(){Dr=!1;for(let G=0;G<Sn.length;G++)ht(...Sn[G]);Sn.length=0}function zo(){zn||(H$(Xs),zn=!0)}function He(G,Z=!1){zn=!0,Dr=Z,G(r),Xs(),Z&&Sn.length>0&&queueMicrotask(ja)}r.batch=He;function Xs(){if(Ii&&(Fo(),Ii=!1),hr&&(Sr(),hr=!1),si){if(Tn(p,ya,Pt),Tn(p,fl,In),Tn(p,hl,bt),Tn(p,dl,Ze),Tn(s,ya,Pt),Tn(s,fl,In),Tn(s,hl,bt),Tn(s,dl,Ze),Tn(c,hl,Bt),Tn(c,dl,Rn),i.width=br(Bt*ln),i.height=br(Rn*ln),T.forEach(({_el:G,_show:Z,_size:ae,_pos:ce,side:ge})=>{if(G!=null)if(Z){let _e=ge===3||ge===0?ae:0,Me=ge%2==1;Tn(G,Me?"left":"top",ce-_e),Tn(G,Me?"width":"height",ae),Tn(G,Me?"top":"left",Me?In:Pt),Tn(G,Me?"height":"width",Me?Ze:bt),wh(G,Os)}else Ei(G,Os)}),Ki=ci=Yi=dr=Xi=Ji=wi=Di=wo=null,yn=1,z(!0),Pt!=Hn||In!=Kn||bt!=Un||Ze!=wn){fr(!1);let G=bt/Un,Z=Ze/wn;if(ue&&!Xn&&ee.left>=0){ee.left*=G,ee.top*=Z,_o&&Io(_o,br(ee.left),0,bt,Ze),Gn&&Io(Gn,0,br(ee.top),bt,Ze);for(let ae=0;ae<or.length;ae++){let ce=or[ae];ce!=null&&(vi[ae]*=G,Oi[ae]*=Z,Io(ce,Gi(vi[ae]),Gi(Oi[ae]),bt,Ze))}}if($t.show&&!Mi&&$t.left>=0&&$t.width>0){$t.left*=G,$t.width*=G,$t.top*=Z,$t.height*=Z;for(let ae in J)Tn(Xr,ae,$t[ae])}Hn=Pt,Kn=In,Un=bt,wn=Ze}ht("setSize"),si=!1}Bt>0&&Rn>0&&(o.clearRect(0,0,i.width,i.height),ht("drawClear"),O.forEach(G=>G()),ht("draw")),$t.show&&Mi&&(to($t),Mi=!1),ue&&Xn&&(k(null,!0,!1),Xn=!1),oe.show&&oe.live&&wr&&(w(),wr=!1),a||(a=!0,r.status=1,ht("ready")),Nr=!1,zn=!1}r.redraw=(G,Z)=>{hr=Z||!1,G!==!1?Jr(C,B.min,B.max):zo()};function Fe(G,Z){let ae=S[G];if(ae.from==null){if(Pn==0){let ce=ae.range(r,Z.min,Z.max,G);Z.min=ce[0],Z.max=ce[1]}if(Z.min>Z.max){let ce=Z.min;Z.min=Z.max,Z.max=ce}if(Pn>1&&Z.min!=null&&Z.max!=null&&Z.max-Z.min<1e-16)return;G==C&&ae.distr==2&&Pn>0&&(Z.min=po(Z.min,t[0]),Z.max=po(Z.max,t[0]),Z.min==Z.max&&Z.max++),A[G]=Z,Ii=!0,zo()}}r.setScale=Fe;let Vn,Xo,_o,Gn,Ba,Jo,Qi,jo,Js,cn,mt,Kt,eo=!1;const Jn=ee.drag;let Ye=Jn.x,$n=Jn.y;ue&&(ee.x&&(Vn=Vi(f$,s)),ee.y&&(Xo=Vi(p$,s)),B.ori==0?(_o=Vn,Gn=Xo):(_o=Xo,Gn=Vn),mt=ee.left,Kt=ee.top);const $t=r.select=cr({show:!0,over:!0,left:0,width:0,top:0,height:0},n.select),Xr=$t.show?Vi(d$,$t.over?s:p):null;function to(G,Z){if($t.show){for(let ae in G)$t[ae]=G[ae],ae in J&&Tn(Xr,ae,G[ae]);Z!==!1&&ht("setSelect")}}r.setSelect=to;function Wt(G){if(x[G].show)le&&wh(Re[G],Os);else if(le&&Ei(Re[G],Os),ue){let Z=Ln?or[0]:or[G];Z!=null&&Io(Z,-10,-10,bt,Ze)}}function Jr(G,Z,ae){Fe(G,{min:Z,max:ae})}function pr(G,Z,ae,ce){Z.focus!=null&&Zs(G),Z.show!=null&&x.forEach((ge,_e)=>{_e>0&&(G==_e||G==null)&&(ge.show=Z.show,Wt(_e),d==2?(Jr(ge.facets[0].scale,null,null),Jr(ge.facets[1].scale,null,null)):Jr(ge.scale,null,null),zo())}),ae!==!1&&ht("setSeries",G,Z),ce&&Rt("setSeries",r,G,Z)}r.setSeries=pr;function Ao(G,Z){cr(_[G],Z)}function Fi(G,Z){G.fill=qt(G.fill||null),G.dir=rn(G.dir,-1),Z=Z??_.length,_.splice(Z,0,G)}function jn(G){G==null?_.length=0:_.splice(G,1)}r.addBand=Fi,r.setBand=Ao,r.delBand=jn;function gs(G,Z){x[G].alpha=Z,ue&&or[G]!=null&&(or[G].style.opacity=Z),le&&Re[G]&&(Re[G].style.opacity=Z)}let Zn,zi,ji;const no={focus:!0};function Zs(G){if(G!=ji){let Z=G==null,ae=qr.alpha!=1;x.forEach((ce,ge)=>{if(d==1||ge>0){let _e=Z||ge==0||ge==G;ce._focus=Z?null:_e,ae&&gs(ge,_e?1:qr.alpha)}}),ji=G,ae&&zo()}}le&&Kr&&mn(Cv,fe,G=>{ee._lock||(ai(G),ji!=null&&pr(null,no,!0,Tt.setSeries))});function hn(G,Z,ae){let ce=S[Z];ae&&(G=G/ln-(ce.ori==1?In:Pt));let ge=bt;ce.ori==1&&(ge=Ze,G=ge-G),ce.dir==-1&&(G=ge-G);let _e=ce._min,Me=ce._max,je=G/ge,qe=_e+(Me-_e)*je,Je=ce.distr;return Je==3?xa(10,qe):Je==4?I$(qe,ce.asinh):Je==100?ce.bwd(qe):qe}function Wa(G,Z){let ae=hn(G,C,Z);return po(ae,t[0],xn,Fn)}r.valToIdx=G=>po(G,t[0]),r.posToIdx=Wa,r.posToVal=hn,r.valToPos=(G,Z,ae)=>S[Z].ori==0?u(G,S[Z],ae?on:bt,ae?Dn:0):f(G,S[Z],ae?Yn:Ze,ae?ir:0),r.setCursor=(G,Z,ae)=>{mt=G.left,Kt=G.top,k(null,Z,ae)};function Cr(G,Z){Tn(Xr,ya,$t.left=G),Tn(Xr,hl,$t.width=Z)}function Zr(G,Z){Tn(Xr,fl,$t.top=G),Tn(Xr,dl,$t.height=Z)}let Bo=B.ori==0?Cr:Zr,Pr=B.ori==1?Cr:Zr;function Ci(){if(le&&oe.live)for(let G=d==2?1:0;G<x.length;G++){if(G==0&&Xe)continue;let Z=oe.values[G],ae=0;for(let ce in Z)Ve[G][ae++].firstChild.nodeValue=Z[ce]}}function w(G,Z){if(G!=null&&(G.idxs?G.idxs.forEach((ae,ce)=>{X[ce]=ae}):N$(G.idx)||X.fill(G.idx),oe.idx=X[0]),le&&oe.live){for(let ae=0;ae<x.length;ae++)(ae>0||d==1&&!Xe)&&$(ae,X[ae]);Ci()}wr=!1,Z!==!1&&ht("setLegend")}r.setLegend=w;function $(G,Z){let ae=x[G],ce=G==0&&F==2?sr:t[G],ge;Xe?ge=ae.values(r,G,Z)??ft:(ge=ae.value(r,Z==null?null:ce[Z],G,Z),ge=ge==null?ft:{_:ge}),oe.values[G]=ge}function k(G,Z,ae){Js=mt,cn=Kt,[mt,Kt]=ee.move(r,mt,Kt),ee.left=mt,ee.top=Kt,ue&&(_o&&Io(_o,br(mt),0,bt,Ze),Gn&&Io(Gn,0,br(Kt),bt,Ze));let ce,ge=xn>Fn;Zn=_n,zi=null;let _e=B.ori==0?bt:Ze,Me=B.ori==1?bt:Ze;if(mt<0||Pn==0||ge){ce=ee.idx=null;for(let je=0;je<x.length;je++){let qe=or[je];qe!=null&&Io(qe,-10,-10,bt,Ze)}Kr&&pr(null,no,!0,G==null&&Tt.setSeries),oe.live&&(X.fill(ce),wr=!0)}else{let je,qe,Je;d==1&&(je=B.ori==0?mt:Kt,qe=hn(je,C),ce=ee.idx=po(qe,t[0],xn,Fn),Je=N(t[0][ce],B,_e,0));let it=-10,ut=-10,Et=0,nn=0,Ht=!0,kt="",xt="";for(let gt=d==2?1:0;gt<x.length;gt++){let kn=x[gt],Wn=X[gt],mr=Wn==null?null:d==1?t[gt][Wn]:t[gt][1][Wn],dn=ee.dataIdx(r,gt,ce,qe),bn=dn==null?null:d==1?t[gt][dn]:t[gt][1][dn];if(wr=wr||bn!=mr||dn!=Wn,X[gt]=dn,gt>0&&kn.show){let me=dn==null?-10:dn==ce?Je:N(d==1?t[0][dn]:t[gt][0][dn],B,_e,0),Ee=bn==null?-10:E(bn,d==1?S[kn.scale]:S[kn.facets[1].scale],Me,0);if(Kr&&bn!=null){let ke=B.ori==1?mt:Kt,Qe=yr(qr.dist(r,gt,dn,Ee,ke));if(Qe<Zn){let yt=qr.bias;if(yt!=0){let It=hn(ke,kn.scale),sn=bn>=0?1:-1,Ut=It>=0?1:-1;Ut==sn&&(Ut==1?yt==1?bn>=It:bn<=It:yt==1?bn<=It:bn>=It)&&(Zn=Qe,zi=gt)}else Zn=Qe,zi=gt}}if(wr||Ln){let ke,Qe;B.ori==0?(ke=me,Qe=Ee):(ke=Ee,Qe=me);let yt,It,sn,Ut,_i,Fr,En=!0,ro=Mn.bbox;if(ro!=null){En=!1;let zr=ro(r,gt);sn=zr.left,Ut=zr.top,yt=zr.width,It=zr.height}else sn=ke,Ut=Qe,yt=It=Mn.size(r,gt);if(Fr=Mn.fill(r,gt),_i=Mn.stroke(r,gt),Ln)gt==zi&&Zn<=qr.prox&&(it=sn,ut=Ut,Et=yt,nn=It,Ht=En,kt=Fr,xt=_i);else{let zr=or[gt];zr!=null&&(vi[gt]=sn,Oi[gt]=Ut,Tv(zr,yt,It,En),$v(zr,Fr,_i),Io(zr,Gi(sn),Gi(Ut),bt,Ze))}}}}if(Ln){let gt=qr.prox,kn=ji==null?Zn<=gt:Zn>gt||zi!=ji;if(wr||kn){let Wn=or[0];Wn!=null&&(vi[0]=it,Oi[0]=ut,Tv(Wn,Et,nn,Ht),$v(Wn,kt,xt),Io(Wn,Gi(it),Gi(ut),bt,Ze))}}}if($t.show&&eo)if(G!=null){let[je,qe]=Tt.scales,[Je,it]=Tt.match,[ut,Et]=G.cursor.sync.scales,nn=G.cursor.drag;if(Ye=nn._x,$n=nn._y,Ye||$n){let{left:Ht,top:kt,width:xt,height:gt}=G.select,kn=G.scales[ut].ori,Wn=G.posToVal,mr,dn,bn,me,Ee,ke=je!=null&&Je(je,ut),Qe=qe!=null&&it(qe,Et);ke&&Ye?(kn==0?(mr=Ht,dn=xt):(mr=kt,dn=gt),bn=S[je],me=N(Wn(mr,ut),bn,_e,0),Ee=N(Wn(mr+dn,ut),bn,_e,0),Bo(go(me,Ee),yr(Ee-me))):Bo(0,_e),Qe&&$n?(kn==1?(mr=Ht,dn=xt):(mr=kt,dn=gt),bn=S[qe],me=E(Wn(mr,Et),bn,Me,0),Ee=E(Wn(mr+dn,Et),bn,Me,0),Pr(go(me,Ee),yr(Ee-me))):Pr(0,Me)}else Q()}else{let je=yr(Js-Ba),qe=yr(cn-Jo);if(B.ori==1){let Et=je;je=qe,qe=Et}Ye=Jn.x&&je>=Jn.dist,$n=Jn.y&&qe>=Jn.dist;let Je=Jn.uni;Je!=null?Ye&&$n&&(Ye=je>=Je,$n=qe>=Je,!Ye&&!$n&&(qe>je?$n=!0:Ye=!0)):Jn.x&&Jn.y&&(Ye||$n)&&(Ye=$n=!0);let it,ut;Ye&&(B.ori==0?(it=Qi,ut=mt):(it=jo,ut=Kt),Bo(go(it,ut),yr(ut-it)),$n||Pr(0,Me)),$n&&(B.ori==1?(it=Qi,ut=mt):(it=jo,ut=Kt),Pr(go(it,ut),yr(ut-it)),Ye||Bo(0,_e)),!Ye&&!$n&&(Bo(0,0),Pr(0,0))}if(Jn._x=Ye,Jn._y=$n,G==null){if(ae){if(en!=null){let[je,qe]=Tt.scales;Tt.values[0]=je!=null?hn(B.ori==0?mt:Kt,je):null,Tt.values[1]=qe!=null?hn(B.ori==1?mt:Kt,qe):null}Rt(gh,r,mt,Kt,bt,Ze,ce)}if(Kr){let je=ae&&Tt.setSeries,qe=qr.prox;ji==null?Zn<=qe&&pr(zi,no,!0,je):Zn>qe?pr(null,no,!0,je):zi!=ji&&pr(zi,no,!0,je)}}wr&&(oe.idx=ce,w()),Z!==!1&&ht("setCursor")}let P=null;Object.defineProperty(r,"rect",{get(){return P==null&&z(!1),P}});function z(G=!1){G?P=null:(P=s.getBoundingClientRect(),ht("syncRect",P))}function H(G,Z,ae,ce,ge,_e,Me){ee._lock||eo&&G!=null&&G.movementX==0&&G.movementY==0||(q(G,Z,ae,ce,ge,_e,Me,!1,G!=null),G!=null?k(null,!0,!0):k(Z,!0,!1))}function q(G,Z,ae,ce,ge,_e,Me,je,qe){if(P==null&&z(!1),ai(G),G!=null)ae=G.clientX-P.left,ce=G.clientY-P.top;else{if(ae<0||ce<0){mt=-10,Kt=-10;return}let[Je,it]=Tt.scales,ut=Z.cursor.sync,[Et,nn]=ut.values,[Ht,kt]=ut.scales,[xt,gt]=Tt.match,kn=Z.axes[0].side%2==1,Wn=B.ori==0?bt:Ze,mr=B.ori==1?bt:Ze,dn=kn?_e:ge,bn=kn?ge:_e,me=kn?ce:ae,Ee=kn?ae:ce;if(Ht!=null?ae=xt(Je,Ht)?v(Et,S[Je],Wn,0):-10:ae=Wn*(me/dn),kt!=null?ce=gt(it,kt)?v(nn,S[it],mr,0):-10:ce=mr*(Ee/bn),B.ori==1){let ke=ae;ae=ce,ce=ke}}qe&&(Z==null||Z.cursor.event.type==gh)&&((ae<=1||ae>=bt-1)&&(ae=Ps(ae,bt)),(ce<=1||ce>=Ze-1)&&(ce=Ps(ce,Ze))),je?(Ba=ae,Jo=ce,[Qi,jo]=ee.move(r,ae,ce)):(mt=ae,Kt=ce)}const J={width:0,height:0,left:0,top:0};function Q(){to(J,!1)}let se,he,we,Ae;function be(G,Z,ae,ce,ge,_e,Me){eo=!0,Ye=$n=Jn._x=Jn._y=!1,q(G,Z,ae,ce,ge,_e,Me,!0,!1),G!=null&&(mn(mh,yh,Ce,!1),Rt(wv,r,Qi,jo,bt,Ze,null));let{left:je,top:qe,width:Je,height:it}=$t;se=je,he=qe,we=Je,Ae=it}function Ce(G,Z,ae,ce,ge,_e,Me){eo=Jn._x=Jn._y=!1,q(G,Z,ae,ce,ge,_e,Me,!1,!0);let{left:je,top:qe,width:Je,height:it}=$t,ut=Je>0||it>0,Et=se!=je||he!=qe||we!=Je||Ae!=it;if(ut&&Et&&to($t),Jn.setScale&&ut&&Et){let nn=je,Ht=Je,kt=qe,xt=it;if(B.ori==1&&(nn=qe,Ht=it,kt=je,xt=Je),Ye&&Jr(C,hn(nn,C),hn(nn+Ht,C)),$n)for(let gt in S){let kn=S[gt];gt!=C&&kn.from==null&&kn.min!=_n&&Jr(gt,hn(kt+xt,gt),hn(kt,gt))}Q()}else ee.lock&&(ee._lock=!ee._lock,k(Z,!0,G!=null));G!=null&&(rr(mh,yh),Rt(mh,r,mt,Kt,bt,Ze,null))}function Pe(G,Z,ae,ce,ge,_e,Me){if(ee._lock)return;ai(G);let je=eo;if(eo){let qe=!0,Je=!0,it=10,ut,Et;B.ori==0?(ut=Ye,Et=$n):(ut=$n,Et=Ye),ut&&Et&&(qe=mt<=it||mt>=bt-it,Je=Kt<=it||Kt>=Ze-it),ut&&qe&&(mt=mt<Qi?0:bt),Et&&Je&&(Kt=Kt<jo?0:Ze),k(null,!0,!0),eo=!1}mt=-10,Kt=-10,X.fill(null),k(null,!0,!0),je&&(eo=je)}function Ne(G,Z,ae,ce,ge,_e,Me){ee._lock||(ai(G),li(),Q(),G!=null&&Rt(_v,r,mt,Kt,bt,Ze,null))}function et(){T.forEach(JE),qi(r.width,r.height,!0)}Ns(dc,wa,et);const vt={};vt.mousedown=be,vt.mousemove=H,vt.mouseup=Ce,vt.dblclick=Ne,vt.setSeries=(G,Z,ae,ce)=>{let ge=Tt.match[2];ae=ge(r,Z,ae),ae!=-1&&pr(ae,ce,!0,!1)},ue&&(mn(wv,s,be),mn(gh,s,H),mn(xv,s,G=>{ai(G),z(!1)}),mn(Cv,s,Pe),mn(_v,s,Ne),Wh.add(r),r.syncRect=z);const lt=r.hooks=n.hooks||{};function ht(G,Z,ae){Dr?Sn.push([G,Z,ae]):G in lt&&lt[G].forEach(ce=>{ce.call(null,r,Z,ae)})}(n.plugins||[]).forEach(G=>{for(let Z in G.hooks)lt[Z]=(lt[Z]||[]).concat(G.hooks[Z])});const On=(G,Z,ae)=>ae,Tt=cr({key:null,setSeries:!1,filters:{pub:Bv,sub:Bv},scales:[C,x[1]?x[1].scale:null],match:[Wv,Wv,On],values:[null,null]},ee.sync);Tt.match.length==2&&Tt.match.push(On),ee.sync=Tt;const en=Tt.key,Ot=Sy(en);function Rt(G,Z,ae,ce,ge,_e,Me){Tt.filters.pub(G,Z,ae,ce,ge,_e,Me)&&Ot.pub(G,Z,ae,ce,ge,_e,Me)}Ot.sub(r);function gr(G,Z,ae,ce,ge,_e,Me){Tt.filters.sub(G,Z,ae,ce,ge,_e,Me)&&vt[G](null,Z,ae,ce,ge,_e,Me)}r.pub=gr;function _r(){Ot.unsub(r),Wh.delete(r),tn.clear(),Ch(dc,wa,et),g.remove(),fe?.remove(),ht("destroy")}r.destroy=_r;function Bn(){ht("init",n,t),bi(t||n.data,!1),A[C]?Fe(C,A[C]):li(),Mi=$t.show&&($t.width>0||$t.height>0),Xn=wr=!0,qi(n.width,n.height)}return x.forEach(ps),T.forEach(yi),e?e instanceof HTMLElement?(e.appendChild(g),Bn()):e(r,Bn):Bn(),r}Hr.assign=cr,Hr.fmtNum=kh,Hr.rangeNum=mc,Hr.rangeLog=gc,Hr.rangeAsinh=_h,Hr.orient=zs,Hr.pxRatio=ln,Hr.join=W$,Hr.fmtDate=Th,Hr.tzDate=Q$,Hr.sync=Sy;{Hr.addGap=NE,Hr.clipGaps=_c;let n=Hr.paths={points:Ly};n.linear=Ny,n.stepped=FE,n.bars=zE,n.spline=BE}var Hy,Uy;function ZE(){return Uy||(Uy=1,Hy=function(n,t,e,r,d){var u,f;if(r===void 0)r=0;else if(r=r|0,r<0||r>=n.length)throw new RangeError("invalid lower bound");if(d===void 0)d=n.length-1;else if(d=d|0,d<r||d>=n.length)throw new RangeError("invalid upper bound");for(;r<=d;)if(u=r+(d-r>>>1),f=+e(n[u],t,u,n),f<0)r=u+1;else if(f>0)d=u-1;else return u;return~r}),Hy}var QE=ZE();const Yj=Nn("y",uc(QE));var Uh,Vy;function eT(){if(Vy)return Uh;Vy=1;function n(t,e,r){var d=-1,u=t.length;e<0&&(e=-e>u?0:u+e),r=r>u?u:r,r<0&&(r+=u),u=e>r?0:r-e>>>0,e>>>=0;for(var f=Array(u);++d<u;)f[d]=t[d+e];return f}return Uh=n,Uh}var Vh,Gy;function tT(){if(Gy)return Vh;Gy=1;var n=eT();function t(e,r,d){var u=e.length;return d=d===void 0?u:d,!r&&d>=u?e:n(e,r,d)}return Vh=t,Vh}var Gh,qy;function Ky(){if(qy)return Gh;qy=1;var n="\\ud800-\\udfff",t="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",d=t+e+r,u="\\ufe0e\\ufe0f",f="\\u200d",v=RegExp("["+f+n+d+u+"]");function a(g){return v.test(g)}return Gh=a,Gh}var qh,Yy;function nT(){if(Yy)return qh;Yy=1;function n(t){return t.split("")}return qh=n,qh}var Kh,Xy;function rT(){if(Xy)return Kh;Xy=1;var n="\\ud800-\\udfff",t="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",d=t+e+r,u="\\ufe0e\\ufe0f",f="["+n+"]",v="["+d+"]",a="\\ud83c[\\udffb-\\udfff]",g="(?:"+v+"|"+a+")",i="[^"+n+"]",o="(?:\\ud83c[\\udde6-\\uddff]){2}",c="[\\ud800-\\udbff][\\udc00-\\udfff]",p="\\u200d",s=g+"?",h="["+u+"]?",m="(?:"+p+"(?:"+[i,o,c].join("|")+")"+h+s+")*",y=h+s+m,x="(?:"+[i+v+"?",v,o,c,f].join("|")+")",T=RegExp(a+"(?="+a+")|"+x+y,"g");function S(_){return _.match(T)||[]}return Kh=S,Kh}var Yh,Jy;function iT(){if(Jy)return Yh;Jy=1;var n=nT(),t=Ky(),e=rT();function r(d){return t(d)?e(d):n(d)}return Yh=r,Yh}var Xh,Zy;function oT(){if(Zy)return Xh;Zy=1;var n=typeof ls=="object"&&ls&&ls.Object===Object&&ls;return Xh=n,Xh}var Jh,Qy;function sT(){if(Qy)return Jh;Qy=1;var n=oT(),t=typeof self=="object"&&self&&self.Object===Object&&self,e=n||t||Function("return this")();return Jh=e,Jh}var Zh,e0;function Qh(){if(e0)return Zh;e0=1;var n=sT(),t=n.Symbol;return Zh=t,Zh}var ed,t0;function aT(){if(t0)return ed;t0=1;function n(t,e){for(var r=-1,d=t==null?0:t.length,u=Array(d);++r<d;)u[r]=e(t[r],r,t);return u}return ed=n,ed}var td,n0;function lT(){if(n0)return td;n0=1;var n=Array.isArray;return td=n,td}var nd,r0;function cT(){if(r0)return nd;r0=1;var n=Qh(),t=Object.prototype,e=t.hasOwnProperty,r=t.toString,d=n?n.toStringTag:void 0;function u(f){var v=e.call(f,d),a=f[d];try{f[d]=void 0;var g=!0}catch{}var i=r.call(f);return g&&(v?f[d]=a:delete f[d]),i}return nd=u,nd}var rd,i0;function uT(){if(i0)return rd;i0=1;var n=Object.prototype,t=n.toString;function e(r){return t.call(r)}return rd=e,rd}var id,o0;function hT(){if(o0)return id;o0=1;var n=Qh(),t=cT(),e=uT(),r="[object Null]",d="[object Undefined]",u=n?n.toStringTag:void 0;function f(v){return v==null?v===void 0?d:r:u&&u in Object(v)?t(v):e(v)}return id=f,id}var od,s0;function dT(){if(s0)return od;s0=1;function n(t){return t!=null&&typeof t=="object"}return od=n,od}var sd,a0;function fT(){if(a0)return sd;a0=1;var n=hT(),t=dT(),e="[object Symbol]";function r(d){return typeof d=="symbol"||t(d)&&n(d)==e}return sd=r,sd}var ad,l0;function pT(){if(l0)return ad;l0=1;var n=Qh(),t=aT(),e=lT(),r=fT(),d=n?n.prototype:void 0,u=d?d.toString:void 0;function f(v){if(typeof v=="string")return v;if(e(v))return t(v,f)+"";if(r(v))return u?u.call(v):"";var a=v+"";return a=="0"&&1/v==-1/0?"-0":a}return ad=f,ad}var ld,c0;function $c(){if(c0)return ld;c0=1;var n=pT();function t(e){return e==null?"":n(e)}return ld=t,ld}var cd,u0;function gT(){if(u0)return cd;u0=1;var n=tT(),t=Ky(),e=iT(),r=$c();function d(u){return function(f){f=r(f);var v=t(f)?e(f):void 0,a=v?v[0]:f.charAt(0),g=v?n(v,1).join(""):f.slice(1);return a[u]()+g}}return cd=d,cd}var ud,h0;function d0(){if(h0)return ud;h0=1;var n=gT(),t=n("toUpperCase");return ud=t,ud}var mT=d0();const vT=uc(mT);var hd,f0;function yT(){if(f0)return hd;f0=1;var n=$c(),t=d0();function e(r){return t(n(r).toLowerCase())}return hd=e,hd}var dd,p0;function bT(){if(p0)return dd;p0=1;function n(t,e,r,d){var u=-1,f=t==null?0:t.length;for(d&&f&&(r=t[++u]);++u<f;)r=e(r,t[u],u,t);return r}return dd=n,dd}var fd,g0;function wT(){if(g0)return fd;g0=1;function n(t){return function(e){return t?.[e]}}return fd=n,fd}var pd,m0;function xT(){if(m0)return pd;m0=1;var n=wT(),t={À:"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=n(t);return pd=e,pd}var gd,v0;function CT(){if(v0)return gd;v0=1;var n=xT(),t=$c(),e=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,r="\\u0300-\\u036f",d="\\ufe20-\\ufe2f",u="\\u20d0-\\u20ff",f=r+d+u,v="["+f+"]",a=RegExp(v,"g");function g(i){return i=t(i),i&&i.replace(e,n).replace(a,"")}return gd=g,gd}var md,y0;function _T(){if(y0)return md;y0=1;var n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function t(e){return e.match(n)||[]}return md=t,md}var vd,b0;function AT(){if(b0)return vd;b0=1;var n=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function t(e){return n.test(e)}return vd=t,vd}var yd,w0;function kT(){if(w0)return yd;w0=1;var n="\\ud800-\\udfff",t="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",d=t+e+r,u="\\u2700-\\u27bf",f="a-z\\xdf-\\xf6\\xf8-\\xff",v="\\xac\\xb1\\xd7\\xf7",a="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",g="\\u2000-\\u206f",i=" \\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",o="A-Z\\xc0-\\xd6\\xd8-\\xde",c="\\ufe0e\\ufe0f",p=v+a+g+i,s="['’]",h="["+p+"]",m="["+d+"]",y="\\d+",x="["+u+"]",T="["+f+"]",S="[^"+n+p+y+u+f+o+"]",_="\\ud83c[\\udffb-\\udfff]",C="(?:"+m+"|"+_+")",L="[^"+n+"]",O="(?:\\ud83c[\\udde6-\\uddff]){2}",M="[\\ud800-\\udbff][\\udc00-\\udfff]",I="["+o+"]",B="\\u200d",F="(?:"+T+"|"+S+")",N="(?:"+I+"|"+S+")",E="(?:"+s+"(?:d|ll|m|re|s|t|ve))?",A="(?:"+s+"(?:D|LL|M|RE|S|T|VE))?",D=C+"?",j="["+c+"]?",W="(?:"+B+"(?:"+[L,O,M].join("|")+")"+j+D+")*",V="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",K="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",X=j+D+W,oe="(?:"+[x,O,M].join("|")+")"+X,ee=RegExp([I+"?"+T+"+"+E+"(?="+[h,I,"$"].join("|")+")",N+"+"+A+"(?="+[h,I+F,"$"].join("|")+")",I+"?"+F+"+"+E,I+"+"+A,K,V,y,oe].join("|"),"g");function le(ue){return ue.match(ee)||[]}return yd=le,yd}var bd,x0;function ST(){if(x0)return bd;x0=1;var n=_T(),t=AT(),e=$c(),r=kT();function d(u,f,v){return u=e(u),f=v?void 0:f,f===void 0?t(u)?r(u):n(u):u.match(f)||[]}return bd=d,bd}var wd,C0;function $T(){if(C0)return wd;C0=1;var n=bT(),t=CT(),e=ST(),r="['’]",d=RegExp(r,"g");function u(f){return function(v){return n(e(t(v).replace(d,"")),f,"")}}return wd=u,wd}var xd,_0;function ET(){if(_0)return xd;_0=1;var n=yT(),t=$T(),e=t(function(r,d,u){return d=d.toLowerCase(),r+(u?n(d):d)});return xd=e,xd}var TT=ET();const RT=uc(TT),IT=Object.assign({"./ArrayWidget.vue":()=>at(()=>st.import("./ArrayWidget-DMSm_P6c-efc7746a4ba953cd6808.js"),void 0),"./ArrayplotWidget.vue":()=>at(()=>st.import("./ArrayplotWidget-fdXLhGAl-bb78ab3e4fdecdfebd67.js"),void 0),"./BlockWidget.vue":()=>at(()=>st.import("./BlockWidget-Do3W6tZh-30b366b735726d3e884d.js"),void 0),"./ButtonWidget.vue":()=>at(()=>st.import("./ButtonWidget-DukCQt0F-c8a88a1d238108f85fc0.js"),void 0),"./CanvasWidget.vue":()=>at(()=>st.import("./CanvasWidget-BRdVWln5-68610c4a029476073178.js"),void 0),"./CanvasdotWidget.vue":()=>at(()=>st.import("./CanvasdotWidget-DV8PeDWz-da21bd87f779b9139269.js"),void 0),"./CanvasimageWidget.vue":()=>at(()=>st.import("./CanvasimageWidget-Czbq1GuF-5f841f468351c7d6bdbf.js"),void 0),"./CanvasimagevalueWidget.vue":()=>at(()=>st.import("./CanvasimagevalueWidget-DKt5JgEt-c79bbec74e5403f7b6ec.js"),void 0),"./CanvaslabelWidget.vue":()=>at(()=>st.import("./CanvaslabelWidget-DW2I1ra1-bf0c322f7c308654cfc2.js"),void 0),"./CanvaslabelvalueWidget.vue":()=>at(()=>st.import("./CanvaslabelvalueWidget-BhzvZVfD-ba39d0f36fbf3db6cd9c.js"),void 0),"./CanvaslineWidget.vue":()=>at(()=>st.import("./CanvaslineWidget-DsjY37tp-97707caf9ea6147f085e.js"),void 0),"./CanvaslinevalueWidget.vue":()=>at(()=>st.import("./CanvaslinevalueWidget-ihI97G8T-a7ccb7b7ca2d2628fdd5.js"),void 0),"./CheckbuttonWidget.vue":()=>at(()=>st.import("./CheckbuttonWidget-B778Z-Zo-9dbaeff7a2a74130539a.js"),void 0),"./ComboboxWidget.vue":()=>at(()=>st.import("./ComboboxWidget-CuuvOL9K-838f18b5b010cb3d71ae.js"),void 0),"./DateWidget.vue":()=>at(()=>st.import("./DateWidget-COvQTAeo-fdab60f30b292f493736.js"),void 0),"./DynamicWidget.vue":()=>at(()=>st.import("./DynamicWidget-BuSbQVhf-f880988884028652fefc.js"),void 0),"./FilechecksumWidget.vue":()=>at(()=>st.import("./FilechecksumWidget-DRnOt_UE-b118998ed499ab04e025.js"),void 0),"./FiledisplayWidget.vue":()=>at(()=>st.import("./FiledisplayWidget-26R46EjS-312ad25b3132af381df5.js"),void 0),"./FormatvalueWidget.vue":()=>at(()=>st.import("./FormatvalueWidget-BxyscMJc-9965b0bd2806cfbe79cb.js"),void 0),"./HorizontalWidget.vue":()=>at(()=>st.import("./HorizontalWidget-fWLFj7Kg-46768f166783e7c59c1c.js"),void 0),"./HorizontalboxWidget.vue":()=>at(()=>st.import("./HorizontalboxWidget-DEaXhKEz-b0ba376ca37ee17a7d70.js"),void 0),"./HorizontallineWidget.vue":()=>at(()=>st.import("./HorizontallineWidget-Bvu1QP3S-2ef01995448de3e2d6b7.js"),void 0),"./IframeWidget.vue":()=>at(()=>st.import("./IframeWidget-B143k4lo-47d90846ad305990fd45.js"),void 0),"./ImageviewerWidget.vue":()=>at(()=>st.import("./ImageviewerWidget-CLrvr6dw-6adafd871908af16336a.js"),void 0),"./LabelWidget.vue":()=>at(()=>st.import("./LabelWidget-CA1bTX2B-cf65a81edc2678cf21d0.js"),void 0),"./LabelledWidget.vue":()=>at(()=>st.import("./LabelledWidget-BDhvr03J-d661081e5e66658337e8.js"),void 0),"./LabelprogressbarWidget.vue":()=>at(()=>st.import("./LabelprogressbarWidget-g7A5CE8S-3e6d2543cbb4356e663b.js"),void 0),"./LabelsparklineWidget.vue":()=>at(()=>st.import("./LabelsparklineWidget-B27xXxWg-46ed8faac17cc5e23e2c.js"),void 0),"./LabelvalueWidget.vue":()=>at(()=>st.import("./LabelvalueWidget-DFn8o6LC-83776b27319b83d8f0db.js"),void 0),"./LabelvaluedescWidget.vue":()=>at(()=>st.import("./LabelvaluedescWidget-BQpaxFaB-577f3f571587fc3e28a8.js"),void 0),"./LabelvaluelimitsbarWidget.vue":()=>at(()=>st.import("./LabelvaluelimitsbarWidget-C-z96q8z-05aedeebb4882527347a.js"),void 0),"./LabelvaluelimitscolumnWidget.vue":()=>at(()=>st.import("./LabelvaluelimitscolumnWidget-D2TMEv9O-8f2ba12f3d8541a80f4f.js"),void 0),"./LabelvaluerangebarWidget.vue":()=>at(()=>st.import("./LabelvaluerangebarWidget-D99dZCjz-f2a7ecfb05831ee9ece6.js"),void 0),"./LedWidget.vue":()=>at(()=>st.import("./LedWidget-D2uxHxe3-b432e645d6f5ac424a50.js"),void 0),"./LimitsbarWidget.vue":()=>at(()=>st.import("./LimitsbarWidget-Cqhh7LKU-68bbd725e553a8fbb473.js"),void 0),"./LimitscolorWidget.vue":()=>at(()=>st.import("./LimitscolorWidget-haGB4RbY-2bbe52d1c80aded0cc12.js"),void 0),"./LimitscolumnWidget.vue":()=>at(()=>st.import("./LimitscolumnWidget-B1GdmlR_-ea359135deab006453c1.js"),void 0),"./LinegraphWidget.vue":()=>at(()=>st.import("./LinegraphWidget-COSOQ0uM-d51c56629154333d44e4.js"),void 0),"./MatrixbycolumnsWidget.vue":()=>at(()=>st.import("./MatrixbycolumnsWidget-coHlLETG-860f23fb48426b9fd387.js"),void 0),"./ProgressbarWidget.vue":()=>at(()=>st.import("./ProgressbarWidget-D_yFssIZ-d10aa4e57145b3259669.js"),void 0),"./RadiobuttonWidget.vue":()=>at(()=>st.import("./RadiobuttonWidget-DL0jVTcb-3c465bd94a1d1501b9aa.js"),void 0),"./RadiogroupWidget.vue":()=>at(()=>st.import("./RadiogroupWidget-2-td69IA-a20b41e0ee16fca8216f.js"),void 0),"./RangebarWidget.vue":()=>at(()=>st.import("./RangebarWidget-i2mlnxys-4eec6df5412c7c011047.js"),void 0),"./RollupWidget.vue":()=>at(()=>st.import("./RollupWidget-BEJ2Icg1-e244836ce5d601a70583.js"),void 0),"./ScrollwindowWidget.vue":()=>at(()=>st.import("./ScrollwindowWidget-BU1cRpL8-db955ba3d4a28aa695c0.js"),void 0),"./SignalWidget.vue":()=>at(()=>st.import("./SignalWidget-hiTkeem9-803814029a9fe6a17581.js"),void 0),"./SpacerWidget.vue":()=>at(()=>st.import("./SpacerWidget-CBmzzS_X-207fd991cbf6a40fe4b0.js"),void 0),"./SparklineWidget.vue":()=>at(()=>st.import("./SparklineWidget-CizRh6QR-125aeb303d4965c33db7.js"),void 0),"./TabbookWidget.vue":()=>at(()=>st.import("./TabbookWidget-CvL3Ozmx-392ae93cab5b7cbb9764.js"),void 0),"./TextboxWidget.vue":()=>at(()=>st.import("./TextboxWidget-BtEwXzDO-e4893abb472b9a687d25.js"),void 0),"./TextfieldWidget.vue":()=>at(()=>st.import("./TextfieldWidget-BDbb57HP-51b0d1e6a5aa914e5ac8.js"),void 0),"./TimeWidget.vue":()=>at(()=>st.import("./TimeWidget-DzD8U8l8-2591897a5196cb54b68d.js"),void 0),"./TitleWidget.vue":()=>at(()=>st.import("./TitleWidget-CL53vf14-6e11a61576950ccd39fd.js"),void 0),"./ValueWidget.vue":()=>at(()=>st.import("./ValueWidget-CAkuc_w_-6037c5f1b4e7c0e9c790.js"),void 0),"./ValuelimitsbarWidget.vue":()=>at(()=>st.import("./ValuelimitsbarWidget-Y8sO05E1-c51344904eca186c081f.js"),void 0),"./ValuelimitscolumnWidget.vue":()=>at(()=>st.import("./ValuelimitscolumnWidget-iOjB_fCj-c8c67d58522b7f505b4f.js"),void 0),"./ValuerangebarWidget.vue":()=>at(()=>st.import("./ValuerangebarWidget-DsCoeAm6-a486168810aca7f0e206.js"),void 0),"./VerticalWidget.vue":()=>at(()=>st.import("./VerticalWidget-C6O0dhRU-7511fd89efa71860286e.js"),void 0),"./VerticalboxWidget.vue":()=>at(()=>st.import("./VerticalboxWidget-B-CoqRJG-29951e73bb5144b9ca2c.js"),void 0)}),MT=Object.entries(IT).reduce((n,[t,e])=>{t=t.split("/").pop();const r=vT(RT(t.replace(/\.\w+$/,"")));return{...n,[r]:ng(e)}},{}),Xj=Nn("w",{components:MT}),A0="openc3-ace-vim-mode-enabled",Cd="ace/keyboard/vim",k0="openc3-ace-default-scripting-language",Ec=Nn("Z",{isVimModeEnabled(){return localStorage.getItem(A0)==="true"},setVimMode(n){localStorage.setItem(A0,JSON.stringify(!!n))},toggleVimMode(n){this.isVimModeEnabled()?(n.setKeyboardHandler(null),this.setVimMode(!1)):(n.setKeyboardHandler(Cd),this.setVimMode(!0)),n.focus()},applyVimModeIfEnabled(n,{saveFn:t}={}){this.isVimModeEnabled()?(n.setKeyboardHandler(Cd),ace.config.loadModule(Cd,e=>{e.CodeMirror.Vim.defineEx("write","w",r=>{typeof t=="function"?t():r.ace.execCommand("save")})})):n.setKeyboardHandler(null)},getDefaultScriptingLanguage(){return localStorage.getItem(k0)||"python"},setDefaultScriptingLanguage(n){(n==="ruby"||n==="python")&&localStorage.setItem(k0,n)}}),LT={__name:"TopBarMenu",props:{menu:{type:Object,required:!0},title:{type:String,required:!0}},emits:["submenu-click"],setup(n,{emit:t}){const e=t,r=ig(!1);function d(){r.value=!1}function u(f){return f.replaceAll(" ","-").toLowerCase()}return(f,v)=>{const a=Ke("v-icon"),g=Ke("v-btn"),i=Ke("v-divider"),o=Ke("v-list-item-title"),c=Ke("v-list-item"),p=Ke("v-list"),s=Ke("v-menu"),h=Ke("v-radio"),m=Ke("v-list-item-action"),y=Ke("v-radio-group"),x=Ke("v-checkbox");return ct(),jt(s,{modelValue:r.value,"onUpdate:modelValue":v[0]||(v[0]=T=>r.value=T),"close-on-content-click":!1},{activator:Be(({props:T})=>[Ge(g,Ja(T,{variant:"outlined",class:"mx-1 menu-button",text:n.menu.label,"data-test":u(`${n.title} ${n.menu.label}`)}),{append:Be(()=>[Ge(a,{class:"menu-button-icon"},{default:Be(()=>[...v[1]||(v[1]=[Nt(" mdi-menu-down ",-1)])]),_:1})]),_:1},16,["text","data-test"])]),default:Be(()=>[Ge(p,null,{default:Be(()=>[(ct(!0),an(fi,null,To(n.menu.items,(T,S)=>(ct(),an(fi,null,[T.divider?(ct(),jt(i,{key:S+"-divider"})):T.subMenu&&T.subMenu.length>0?(ct(),an("div",{key:S+"-submenu"},[(ct(),jt(s,{key:S,"open-on-hover":"",location:"right"},{activator:Be(({props:_})=>[(ct(),jt(c,Ja({ref_for:!0},_,{key:S,disabled:T.disabled}),Nu({append:Be(()=>[Ge(a,null,{default:Be(()=>[...v[2]||(v[2]=[Nt(" mdi-chevron-right ",-1)])]),_:1})]),default:Be(()=>[!T.radio&&!T.checkbox?(ct(),jt(o,{key:0,style:Cs("cursor: pointer;"+(T.disabled?"opacity: 0.2":""))},{default:Be(()=>[Nt(Cn(T.label),1)]),_:2},1032,["style"])):ti("",!0)]),_:2},[T.icon?{name:"prepend",fn:Be(()=>[Ge(a,{disabled:T.disabled},{default:Be(()=>[Nt(Cn(T.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:Be(()=>[Ge(p,null,{default:Be(()=>[(ct(!0),an(fi,null,To(T.subMenu,(_,C)=>(ct(),jt(c,{key:C,"prepend-icon":_.icon,onClick:L=>e("submenu-click",_)},{default:Be(()=>[Ge(o,null,{default:Be(()=>[Nt(Cn(_.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):T.radioGroup?(ct(),jt(y,{key:S+"-radio-group",class:"ma-0 pa-0",density:"compact","hide-details":"","model-value":T.value,"onUpdate:modelValue":T.command},{default:Be(()=>[(ct(!0),an(fi,null,To(T.choices,(_,C)=>(ct(),jt(c,{key:C+"-choice"},{default:Be(()=>[Ge(m,{class:"list-action"},{default:Be(()=>[Ge(h,{color:"secondary",label:_.label,value:_.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(ct(),jt(c,{key:S+"-list",disabled:T.disabled,"data-test":u(`${n.title} ${n.menu.label} ${T.label}`),onClick:()=>{T.command(T),T.checkbox||d()}},Nu({default:Be(()=>[T.checkbox?(ct(),jt(m,{key:0,class:"list-action"},{default:Be(()=>[Ge(x,{modelValue:T.checked,"onUpdate:modelValue":_=>T.checked=_,label:T.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):ti("",!0),!T.radio&&!T.checkbox?(ct(),jt(o,{key:1,style:Cs("cursor: pointer;"+(T.disabled?"opacity: 0.2":""))},{default:Be(()=>[Nt(Cn(T.label),1)]),_:2},1032,["style"])):ti("",!0)]),_:2},[T.icon?{name:"prepend",fn:Be(()=>[Ge(a,{icon:T.icon,disabled:T.disabled},null,8,["icon","disabled"])]),key:"0"}:void 0]),1032,["disabled","data-test","onClick"]))],64))),256))]),_:1})]),_:1},8,["modelValue"])}}},OT={components:{TopBarMenu:LT},props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},mounted(){document.title=this.title},methods:{subMenuClick(n){n.command(n),this.$refs.topmenu[0].isActive=!1}}},NT={class:"app-title mr-2"};function DT(n,t,e,r,d,u){const f=Ke("v-col"),v=Ke("v-row"),a=Ke("TopBarMenu");return ct(),jt(rg,{to:"#openc3-menu"},[Ge(v,{"no-gutters":""},{default:Be(()=>[Ge(f,{"align-self":"end"},{default:Be(()=>[er("span",NT,Cn(e.title),1)]),_:1})]),_:1}),Ge(v,{dense:"",class:"flex-nowrap"},{default:Be(()=>[(ct(!0),an(fi,null,To(e.menus,(g,i)=>(ct(),jt(a,{key:i+"-top-menu",ref_for:!0,ref:"topmenu",menu:g,title:e.title,onSubmenuClick:u.subMenuClick},null,8,["menu","title","onSubmenuClick"]))),128))]),_:1})])}const PT=co(OT,[["render",DT],["__scopeId","data-v-f4fb184e"]]);function S0(n,t){return function(){return n.apply(t,arguments)}}const{toString:FT}=Object.prototype,{getPrototypeOf:Ea}=Object,{iterator:bl,toStringTag:$0}=Symbol,Tc=(({hasOwnProperty:n})=>(t,e)=>n.call(t,e))(Object.prototype),wl=(n,t)=>{let e=n;const r=[];for(;e!=null&&e!==Object.prototype;){if(r.indexOf(e)!==-1)return!1;if(r.push(e),Tc(e,t))return!0;e=Ea(e)}return!1},zT=(n,t)=>n!=null&&wl(n,t)?n[t]:void 0,_d=(n=>t=>{const e=FT.call(t);return n[e]||(n[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),mo=n=>(n=n.toLowerCase(),t=>_d(t)===n),Rc=n=>t=>typeof t===n,{isArray:js}=Array,Ta=Rc("undefined");function Ra(n){return n!==null&&!Ta(n)&&n.constructor!==null&&!Ta(n.constructor)&&gi(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const E0=mo("ArrayBuffer");function jT(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&E0(n.buffer),t}const BT=Rc("string"),gi=Rc("function"),T0=Rc("number"),Ia=n=>n!==null&&typeof n=="object",WT=n=>n===!0||n===!1,Ic=n=>{if(!Ia(n))return!1;const t=Ea(n);return(t===null||t===Object.prototype||Ea(t)===null)&&!wl(n,$0)&&!wl(n,bl)},HT=n=>{if(!Ia(n)||Ra(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},UT=mo("Date"),VT=mo("File"),GT=n=>!!(n&&typeof n.uri<"u"),qT=n=>n&&typeof n.getParts<"u",KT=mo("Blob"),YT=mo("FileList"),XT=n=>Ia(n)&&gi(n.pipe);function JT(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const R0=JT(),I0=typeof R0.FormData<"u"?R0.FormData:void 0,ZT=n=>{if(!n)return!1;if(I0&&n instanceof I0)return!0;const t=Ea(n);if(!t||t===Object.prototype||!gi(n.append))return!1;const e=_d(n);return e==="formdata"||e==="object"&&gi(n.toString)&&n.toString()==="[object FormData]"},QT=mo("URLSearchParams"),[eR,tR,nR,rR]=["ReadableStream","Request","Response","Headers"].map(mo),iR=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function xl(n,t,{allOwnKeys:e=!1}={}){if(n===null||typeof n>"u")return;let r,d;if(typeof n!="object"&&(n=[n]),js(n))for(r=0,d=n.length;r<d;r++)t.call(null,n[r],r,n);else{if(Ra(n))return;const u=e?Object.getOwnPropertyNames(n):Object.keys(n),f=u.length;let v;for(r=0;r<f;r++)v=u[r],t.call(null,n[v],v,n)}}function M0(n,t){if(Ra(n))return null;t=t.toLowerCase();const e=Object.keys(n);let r=e.length,d;for(;r-- >0;)if(d=e[r],t===d.toLowerCase())return d;return null}const Bs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,L0=n=>!Ta(n)&&n!==Bs;function Ad(...n){const{caseless:t,skipUndefined:e}=L0(this)&&this||{},r={},d=(u,f)=>{if(f==="__proto__"||f==="constructor"||f==="prototype")return;const v=t&&typeof f=="string"&&M0(r,f)||f,a=Tc(r,v)?r[v]:void 0;Ic(a)&&Ic(u)?r[v]=Ad(a,u):Ic(u)?r[v]=Ad({},u):js(u)?r[v]=u.slice():(!e||!Ta(u))&&(r[v]=u)};for(let u=0,f=n.length;u<f;u++){const v=n[u];if(!v||Ra(v)||(xl(v,d),typeof v!="object"||js(v)))continue;const a=Object.getOwnPropertySymbols(v);for(let g=0;g<a.length;g++){const i=a[g];mR.call(v,i)&&d(v[i],i)}}return r}const oR=(n,t,e,{allOwnKeys:r}={})=>(xl(t,(d,u)=>{e&&gi(d)?Object.defineProperty(n,u,{__proto__:null,value:S0(d,e),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(n,u,{__proto__:null,value:d,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),n),sR=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),aR=(n,t,e,r)=>{n.prototype=Object.create(t.prototype,r),Object.defineProperty(n.prototype,"constructor",{__proto__:null,value:n,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(n,"super",{__proto__:null,value:t.prototype}),e&&Object.assign(n.prototype,e)},lR=(n,t,e,r)=>{let d,u,f;const v={};if(t=t||{},n==null)return t;do{for(d=Object.getOwnPropertyNames(n),u=d.length;u-- >0;)f=d[u],(!r||r(f,n,t))&&!v[f]&&(t[f]=n[f],v[f]=!0);n=e!==!1&&Ea(n)}while(n&&(!e||e(n,t))&&n!==Object.prototype);return t},cR=(n,t,e)=>{n=String(n),(e===void 0||e>n.length)&&(e=n.length),e-=t.length;const r=n.indexOf(t,e);return r!==-1&&r===e},uR=n=>{if(!n)return null;if(js(n))return n;let t=n.length;if(!T0(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=n[t];return e},hR=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&Ea(Uint8Array)),dR=(n,t)=>{const e=(n&&n[bl]).call(n);let r;for(;(r=e.next())&&!r.done;){const d=r.value;t.call(n,d[0],d[1])}},fR=(n,t)=>{let e;const r=[];for(;(e=n.exec(t))!==null;)r.push(e);return r},pR=mo("HTMLFormElement"),gR=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,e,r){return e.toUpperCase()+r}),{propertyIsEnumerable:mR}=Object.prototype,vR=mo("RegExp"),O0=(n,t)=>{const e=Object.getOwnPropertyDescriptors(n),r={};xl(e,(d,u)=>{let f;(f=t(d,u,n))!==!1&&(r[u]=f||d)}),Object.defineProperties(n,r)},yR=n=>{O0(n,(t,e)=>{if(gi(n)&&["arguments","caller","callee"].includes(e))return!1;const r=n[e];if(gi(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},bR=(n,t)=>{const e={},r=d=>{d.forEach(u=>{e[u]=!0})};return js(n)?r(n):r(String(n).split(t)),e},wR=()=>{},xR=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function CR(n){return!!(n&&gi(n.append)&&n[$0]==="FormData"&&n[bl])}const _R=n=>{const t=new WeakSet,e=r=>{if(Ia(r)){if(t.has(r))return;if(Ra(r))return r;if(!("toJSON"in r)){t.add(r);const d=js(r)?[]:{};return xl(r,(u,f)=>{const v=e(u);!Ta(v)&&(d[f]=v)}),t.delete(r),d}}return r};return e(n)},AR=mo("AsyncFunction"),kR=n=>n&&(Ia(n)||gi(n))&&gi(n.then)&&gi(n.catch),N0=((n,t)=>n?setImmediate:t?((e,r)=>(Bs.addEventListener("message",({source:d,data:u})=>{d===Bs&&u===e&&r.length&&r.shift()()},!1),d=>{r.push(d),Bs.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",gi(Bs.postMessage)),SR=typeof queueMicrotask<"u"?queueMicrotask.bind(Bs):typeof process<"u"&&process.nextTick||N0,D0=n=>n!=null&&gi(n[bl]),$R=n=>n!=null&&wl(n,bl)&&D0(n),ye={isArray:js,isArrayBuffer:E0,isBuffer:Ra,isFormData:ZT,isArrayBufferView:jT,isString:BT,isNumber:T0,isBoolean:WT,isObject:Ia,isPlainObject:Ic,isEmptyObject:HT,isReadableStream:eR,isRequest:tR,isResponse:nR,isHeaders:rR,isUndefined:Ta,isDate:UT,isFile:VT,isReactNativeBlob:GT,isReactNative:qT,isBlob:KT,isRegExp:vR,isFunction:gi,isStream:XT,isURLSearchParams:QT,isTypedArray:hR,isFileList:YT,forEach:xl,merge:Ad,extend:oR,trim:iR,stripBOM:sR,inherits:aR,toFlatObject:lR,kindOf:_d,kindOfTest:mo,endsWith:cR,toArray:uR,forEachEntry:dR,matchAll:fR,isHTMLForm:pR,hasOwnProperty:Tc,hasOwnProp:Tc,hasOwnInPrototypeChain:wl,getSafeProp:zT,reduceDescriptors:O0,freezeMethods:yR,toObjectSet:bR,toCamelCase:gR,noop:wR,toFiniteNumber:xR,findKey:M0,global:Bs,isContextDefined:L0,isSpecCompliantForm:CR,toJSONObject:_R,isAsyncFn:AR,isThenable:kR,setImmediate:N0,asap:SR,isIterable:D0,isSafeIterable:$R},ER=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"]),TR=n=>{const t={};let e,r,d;return n&&n.split(`
1481
+ `).forEach(function(u){d=u.indexOf(":"),e=u.substring(0,d).trim().toLowerCase(),r=u.substring(d+1).trim(),!(!e||t[e]&&ER[e])&&(e==="set-cookie"?t[e]?t[e].push(r):t[e]=[r]:t[e]=t[e]?t[e]+", "+r:r)}),t};function RR(n){let t=0,e=n.length;for(;t<e;){const r=n.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;e>t;){const r=n.charCodeAt(e-1);if(r!==9&&r!==32)break;e-=1}return t===0&&e===n.length?n:n.slice(t,e)}const IR=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),MR=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function kd(n,t){return ye.isArray(n)?n.map(e=>kd(e,t)):RR(String(n).replace(t,""))}const LR=n=>kd(n,IR),OR=n=>kd(n,MR);function P0(n){const t=Object.create(null);return ye.forEach(n.toJSON(),(e,r)=>{t[r]=OR(e)}),t}const F0=Symbol("internals");function Cl(n){return n&&String(n).trim().toLowerCase()}function Mc(n){return n===!1||n==null?n:ye.isArray(n)?n.map(Mc):LR(String(n))}function NR(n){const t=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=e.exec(n);)t[r[1]]=r[2];return t}const DR=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function Sd(n,t,e,r,d){if(ye.isFunction(r))return r.call(this,t,e);if(d&&(t=e),!!ye.isString(t)){if(ye.isString(r))return t.indexOf(r)!==-1;if(ye.isRegExp(r))return r.test(t)}}function PR(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,r)=>e.toUpperCase()+r)}function FR(n,t){const e=ye.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(n,r+e,{__proto__:null,value:function(d,u,f){return this[r].call(this,t,d,u,f)},configurable:!0})})}let Ur=class{constructor(t){t&&this.set(t)}set(t,e,r){const d=this;function u(v,a,g){const i=Cl(a);if(!i)return;const o=ye.findKey(d,i);(!o||d[o]===void 0||g===!0||g===void 0&&d[o]!==!1)&&(d[o||a]=Mc(v))}const f=(v,a)=>ye.forEach(v,(g,i)=>u(g,i,a));if(ye.isPlainObject(t)||t instanceof this.constructor)f(t,e);else if(ye.isString(t)&&(t=t.trim())&&!DR(t))f(TR(t),e);else if(ye.isObject(t)&&ye.isSafeIterable(t)){let v=Object.create(null),a,g;for(const i of t){if(!ye.isArray(i))throw new TypeError("Object iterator must return a key-value pair");g=i[0],ye.hasOwnProp(v,g)?(a=v[g],v[g]=ye.isArray(a)?[...a,i[1]]:[a,i[1]]):v[g]=i[1]}f(v,e)}else t!=null&&u(e,t,r);return this}get(t,e){if(t=Cl(t),t){const r=ye.findKey(this,t);if(r){const d=this[r];if(!e)return d;if(e===!0)return NR(d);if(ye.isFunction(e))return e.call(this,d,r);if(ye.isRegExp(e))return e.exec(d);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Cl(t),t){const r=ye.findKey(this,t);return!!(r&&this[r]!==void 0&&(!e||Sd(this,this[r],r,e)))}return!1}delete(t,e){const r=this;let d=!1;function u(f){if(f=Cl(f),f){const v=ye.findKey(r,f);v&&(!e||Sd(r,r[v],v,e))&&(delete r[v],d=!0)}}return ye.isArray(t)?t.forEach(u):u(t),d}clear(t){const e=Object.keys(this);let r=e.length,d=!1;for(;r--;){const u=e[r];(!t||Sd(this,this[u],u,t,!0))&&(delete this[u],d=!0)}return d}normalize(t){const e=this,r={};return ye.forEach(this,(d,u)=>{const f=ye.findKey(r,u);if(f){e[f]=Mc(d),delete e[u];return}const v=t?PR(u):String(u).trim();v!==u&&delete e[u],e[v]=Mc(d),r[v]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return ye.forEach(this,(r,d)=>{r!=null&&r!==!1&&(e[d]=t&&ye.isArray(r)?r.join(", "):r)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
1482
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const r=new this(t);return e.forEach(d=>r.set(d)),r}static accessor(t){const e=(this[F0]=this[F0]={accessors:{}}).accessors,r=this.prototype;function d(u){const f=Cl(u);e[f]||(FR(r,u),e[f]=!0)}return ye.isArray(t)?t.forEach(d):d(t),this}};Ur.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ye.reduceDescriptors(Ur.prototype,({value:n},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(r){this[e]=r}}}),ye.freezeMethods(Ur);const zR="[REDACTED ****]";function jR(n){if(ye.hasOwnProp(n,"toJSON"))return!0;let t=Object.getPrototypeOf(n);for(;t&&t!==Object.prototype;){if(ye.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function BR(n,t){const e=new Set(t.map(u=>String(u).toLowerCase())),r=[],d=u=>{if(u===null||typeof u!="object"||ye.isBuffer(u))return u;if(r.indexOf(u)!==-1)return;u instanceof Ur&&(u=u.toJSON()),r.push(u);let f;if(ye.isArray(u))f=[],u.forEach((v,a)=>{const g=d(v);ye.isUndefined(g)||(f[a]=g)});else{if(!ye.isPlainObject(u)&&jR(u))return r.pop(),u;f=Object.create(null);for(const[v,a]of Object.entries(u)){const g=e.has(v.toLowerCase())?zR:d(a);ye.isUndefined(g)||(f[v]=g)}}return r.pop(),f};return d(n)}let nt=class hC extends Error{static from(t,e,r,d,u,f){const v=new hC(t.message,e||t.code,r,d,u);return Object.defineProperty(v,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),v.name=t.name,t.status!=null&&v.status==null&&(v.status=t.status),f&&Object.assign(v,f),v}constructor(t,e,r,d,u){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,e&&(this.code=e),r&&(this.config=r),d&&(this.request=d),u&&(this.response=u,this.status=u.status)}toJSON(){const t=this.config,e=t&&ye.hasOwnProp(t,"redact")?t.redact:void 0,r=ye.isArray(e)&&e.length>0?BR(t,e):ye.toJSONObject(t);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}}};nt.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",nt.ERR_BAD_OPTION="ERR_BAD_OPTION",nt.ECONNABORTED="ECONNABORTED",nt.ETIMEDOUT="ETIMEDOUT",nt.ECONNREFUSED="ECONNREFUSED",nt.ERR_NETWORK="ERR_NETWORK",nt.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",nt.ERR_DEPRECATED="ERR_DEPRECATED",nt.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",nt.ERR_BAD_REQUEST="ERR_BAD_REQUEST",nt.ERR_CANCELED="ERR_CANCELED",nt.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",nt.ERR_INVALID_URL="ERR_INVALID_URL",nt.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const WR=null,z0=100;function $d(n){return ye.isPlainObject(n)||ye.isArray(n)}function j0(n){return ye.endsWith(n,"[]")?n.slice(0,-2):n}function Ed(n,t,e){return n?n.concat(t).map(function(r,d){return r=j0(r),!e&&d?"["+r+"]":r}).join(e?".":""):t}function HR(n){return ye.isArray(n)&&!n.some($d)}const UR=ye.toFlatObject(ye,{},null,function(n){return/^is[A-Z]/.test(n)});function Lc(n,t,e){if(!ye.isObject(n))throw new TypeError("target must be an object");t=t||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,d=e.visitor||s,u=e.dots,f=e.indexes,v=e.Blob||typeof Blob<"u"&&Blob,a=e.maxDepth===void 0?z0:e.maxDepth,g=v&&ye.isSpecCompliantForm(t),i=[];if(!ye.isFunction(d))throw new TypeError("visitor must be a function");function o(y){if(y===null)return"";if(ye.isDate(y))return y.toISOString();if(ye.isBoolean(y))return y.toString();if(!g&&ye.isBlob(y))throw new nt("Blob is not supported. Use a Buffer instead.");if(ye.isArrayBuffer(y)||ye.isTypedArray(y)){if(g&&typeof v=="function")return new v([y]);if(typeof Buffer<"u")return Buffer.from(y);throw new nt("Blob is not supported. Use a Buffer instead.",nt.ERR_NOT_SUPPORT)}return y}function c(y){if(y>a)throw new nt("Object is too deeply nested ("+y+" levels). Max depth: "+a,nt.ERR_FORM_DATA_DEPTH_EXCEEDED)}function p(y,x){if(a===1/0)return JSON.stringify(y);const T=[];return JSON.stringify(y,function(S,_){if(!ye.isObject(_))return _;for(;T.length&&T[T.length-1]!==this;)T.pop();return T.push(_),c(x+T.length-1),_})}function s(y,x,T){let S=y;if(ye.isReactNative(t)&&ye.isReactNativeBlob(y))return t.append(Ed(T,x,u),o(y)),!1;if(y&&!T&&typeof y=="object"){if(ye.endsWith(x,"{}"))x=r?x:x.slice(0,-2),y=p(y,1);else if(ye.isArray(y)&&HR(y)||(ye.isFileList(y)||ye.endsWith(x,"[]"))&&(S=ye.toArray(y)))return x=j0(x),S.forEach(function(_,C){!(ye.isUndefined(_)||_===null)&&t.append(f===!0?Ed([x],C,u):f===null?x:x+"[]",o(_))}),!1}return $d(y)?!0:(t.append(Ed(T,x,u),o(y)),!1)}const h=Object.assign(UR,{defaultVisitor:s,convertValue:o,isVisitable:$d});function m(y,x,T=0){if(!ye.isUndefined(y)){if(c(T),i.indexOf(y)!==-1)throw new Error("Circular reference detected in "+x.join("."));i.push(y),ye.forEach(y,function(S,_){(!(ye.isUndefined(S)||S===null)&&d.call(t,S,ye.isString(_)?_.trim():_,x,h))===!0&&m(S,x?x.concat(_):[_],T+1)}),i.pop()}}if(!ye.isObject(n))throw new TypeError("data must be an object");return m(n),t}function B0(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(n).replace(/[!'()~]|%20/g,function(e){return t[e]})}function Td(n,t){this._pairs=[],n&&Lc(n,this,t)}const W0=Td.prototype;W0.append=function(n,t){this._pairs.push([n,t])},W0.toString=function(n){const t=n?e=>n.call(this,e,B0):B0;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};function VR(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function H0(n,t,e){if(!t)return n;n=n||"";const r=ye.isFunction(e)?{serialize:e}:e,d=ye.getSafeProp(r,"encode")||VR,u=ye.getSafeProp(r,"serialize");let f;if(u?f=u(t,r):f=ye.isURLSearchParams(t)?t.toString():new Td(t,r).toString(d),f){const v=n.indexOf("#");v!==-1&&(n=n.slice(0,v)),n+=(n.indexOf("?")===-1?"?":"&")+f}return n}let U0=class{constructor(){this.handlers=[]}use(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){ye.forEach(this.handlers,function(e){e!==null&&t(e)})}};const Rd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},GR=typeof URLSearchParams<"u"?URLSearchParams:Td,qR=typeof FormData<"u"?FormData:null,KR=typeof Blob<"u"?Blob:null,YR={isBrowser:!0,classes:{URLSearchParams:GR,FormData:qR,Blob:KR},protocols:["http","https","file","blob","url","data"]},Id=typeof window<"u"&&typeof document<"u",Md=typeof navigator=="object"&&navigator||void 0,XR=Id&&(!Md||["ReactNative","NativeScript","NS"].indexOf(Md.product)<0),JR=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ZR=Id&&window.location.href||"http://localhost",QR=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Id,hasStandardBrowserEnv:XR,hasStandardBrowserWebWorkerEnv:JR,navigator:Md,origin:ZR},Symbol.toStringTag,{value:"Module"})),Rr={...QR,...YR};function eI(n,t){return Lc(n,new Rr.classes.URLSearchParams,{visitor:function(e,r,d,u){return Rr.isNode&&ye.isBuffer(e)?(this.append(r,e.toString("base64")),!1):u.defaultVisitor.apply(this,arguments)},...t})}const V0=z0;function G0(n){if(n>V0)throw new nt("FormData field is too deeply nested ("+n+" levels). Max depth: "+V0,nt.ERR_FORM_DATA_DEPTH_EXCEEDED)}function tI(n){const t=[],e=/\w+|\[(\w*)]/g;let r;for(;(r=e.exec(n))!==null;)G0(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function nI(n){const t={},e=Object.keys(n);let r;const d=e.length;let u;for(r=0;r<d;r++)u=e[r],t[u]=n[u];return t}function q0(n){function t(e,r,d,u){G0(u);let f=e[u++];if(f==="__proto__")return!0;const v=Number.isFinite(+f),a=u>=e.length;return f=!f&&ye.isArray(d)?d.length:f,a?(ye.hasOwnProp(d,f)?d[f]=ye.isArray(d[f])?d[f].concat(r):[d[f],r]:d[f]=r,!v):((!ye.hasOwnProp(d,f)||!ye.isObject(d[f]))&&(d[f]=[]),t(e,r,d[f],u)&&ye.isArray(d[f])&&(d[f]=nI(d[f])),!v)}if(ye.isFormData(n)&&ye.isFunction(n.entries)){const e={};return ye.forEachEntry(n,(r,d)=>{t(tI(r),d,e,0)}),e}return null}const Ma=(n,t)=>n!=null&&ye.hasOwnProp(n,t)?n[t]:void 0;function rI(n,t,e){if(ye.isString(n))try{return(t||JSON.parse)(n),ye.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(e||JSON.stringify)(n)}const _l={transitional:Rd,adapter:["xhr","http","fetch"],transformRequest:[function(n,t){const e=t.getContentType()||"",r=e.indexOf("application/json")>-1,d=ye.isObject(n);if(d&&ye.isHTMLForm(n)&&(n=new FormData(n)),ye.isFormData(n))return r?JSON.stringify(q0(n)):n;if(ye.isArrayBuffer(n)||ye.isBuffer(n)||ye.isStream(n)||ye.isFile(n)||ye.isBlob(n)||ye.isReadableStream(n))return n;if(ye.isArrayBufferView(n))return n.buffer;if(ye.isURLSearchParams(n))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let u;if(d){const f=Ma(this,"formSerializer");if(e.indexOf("application/x-www-form-urlencoded")>-1)return eI(n,f).toString();if((u=ye.isFileList(n))||e.indexOf("multipart/form-data")>-1){const v=Ma(this,"env"),a=v&&v.FormData;return Lc(u?{"files[]":n}:n,a&&new a,f)}}return d||r?(t.setContentType("application/json",!1),rI(n)):n}],transformResponse:[function(n){const t=Ma(this,"transitional")||_l.transitional,e=t&&t.forcedJSONParsing,r=Ma(this,"responseType"),d=r==="json";if(ye.isResponse(n)||ye.isReadableStream(n))return n;if(n&&ye.isString(n)&&(e&&!r||d)){const u=!(t&&t.silentJSONParsing)&&d;try{return JSON.parse(n,Ma(this,"parseReviver"))}catch(f){if(u)throw f.name==="SyntaxError"?nt.from(f,nt.ERR_BAD_RESPONSE,this,null,Ma(this,"response")):f}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Rr.classes.FormData,Blob:Rr.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ye.forEach(["delete","get","head","post","put","patch","query"],n=>{_l.headers[n]={}});function Ld(n,t){const e=this||_l,r=t||e,d=Ur.from(r.headers);let u=r.data;return ye.forEach(n,function(f){u=f.call(e,u,d.normalize(),t?t.status:void 0)}),d.normalize(),u}function K0(n){return!!(n&&n.__CANCEL__)}let Al=class extends nt{constructor(t,e,r){super(t??"canceled",nt.ERR_CANCELED,e,r),this.name="CanceledError",this.__CANCEL__=!0}};function Y0(n,t,e){const r=e.config.validateStatus;!e.status||!r||r(e.status)?n(e):t(new nt("Request failed with status code "+e.status,e.status>=400&&e.status<500?nt.ERR_BAD_REQUEST:nt.ERR_BAD_RESPONSE,e.config,e.request,e))}function iI(n){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(n);return t&&t[1]||""}function oI(n,t){n=n||10;const e=new Array(n),r=new Array(n);let d=0,u=0,f;return t=t!==void 0?t:1e3,function(v){const a=Date.now(),g=r[u];f||(f=a),e[d]=v,r[d]=a;let i=u,o=0;for(;i!==d;)o+=e[i++],i=i%n;if(d=(d+1)%n,d===u&&(u=(u+1)%n),a-f<t)return;const c=g&&a-g;return c?Math.round(o*1e3/c):void 0}}function sI(n,t){let e=0,r=1e3/t,d,u;const f=(v,a=Date.now())=>{e=a,d=null,u&&(clearTimeout(u),u=null),n(...v)};return[(...v)=>{const a=Date.now(),g=a-e;g>=r?f(v,a):(d=v,u||(u=setTimeout(()=>{u=null,f(d)},r-g)))},()=>d&&f(d)]}const Oc=(n,t,e=3)=>{let r=0;const d=oI(50,250);return sI(u=>{if(!u||typeof u.loaded!="number")return;const f=u.loaded,v=u.lengthComputable?u.total:void 0,a=v!=null?Math.min(f,v):f,g=Math.max(0,a-r),i=d(g);r=Math.max(r,a);const o={loaded:a,total:v,progress:v?a/v:void 0,bytes:g,rate:i||void 0,estimated:i&&v?(v-a)/i:void 0,event:u,lengthComputable:v!=null,[t?"download":"upload"]:!0};n(o)},e)},X0=(n,t)=>{const e=n!=null;return[r=>t[0]({lengthComputable:e,total:n,loaded:r}),t[1]]},J0=n=>(...t)=>ye.asap(()=>n(...t)),aI=Rr.hasStandardBrowserEnv?((n,t)=>e=>(e=new URL(e,Rr.origin),n.protocol===e.protocol&&n.host===e.host&&(t||n.port===e.port)))(new URL(Rr.origin),Rr.navigator&&/(msie|trident)/i.test(Rr.navigator.userAgent)):()=>!0,lI=Rr.hasStandardBrowserEnv?{write(n,t,e,r,d,u,f){if(typeof document>"u")return;const v=[`${n}=${encodeURIComponent(t)}`];ye.isNumber(e)&&v.push(`expires=${new Date(e).toUTCString()}`),ye.isString(r)&&v.push(`path=${r}`),ye.isString(d)&&v.push(`domain=${d}`),u===!0&&v.push("secure"),ye.isString(f)&&v.push(`SameSite=${f}`),document.cookie=v.join("; ")},read(n){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let e=0;e<t.length;e++){const r=t[e].replace(/^\s+/,""),d=r.indexOf("=");if(d!==-1&&r.slice(0,d)===n)try{return decodeURIComponent(r.slice(d+1))}catch{return r.slice(d+1)}}return null},remove(n){this.write(n,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function cI(n){return typeof n!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function uI(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}const hI=/^https?:(?!\/\/)/i,dI=/[\t\n\r]/g;function fI(n){let t=0;for(;t<n.length&&n.charCodeAt(t)<=32;)t++;return n.slice(t)}function pI(n){return fI(n).replace(dI,"")}function Z0(n,t){if(typeof n=="string"&&hI.test(pI(n)))throw new nt('Invalid URL: missing "//" after protocol',nt.ERR_INVALID_URL,t)}function Q0(n,t,e,r){Z0(t,r);let d=!cI(t);return n&&(d||e===!1)?(Z0(n,r),uI(n,t)):t}const eb=n=>n instanceof Ur?{...n}:n;function Ws(n,t){n=n||{},t=t||{};const e=Object.create(null);Object.defineProperty(e,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(i,o,c,p){return ye.isPlainObject(i)&&ye.isPlainObject(o)?ye.merge.call({caseless:p},i,o):ye.isPlainObject(o)?ye.merge({},o):ye.isArray(o)?o.slice():o}function d(i,o,c,p){if(ye.isUndefined(o)){if(!ye.isUndefined(i))return r(void 0,i,c,p)}else return r(i,o,c,p)}function u(i,o){if(!ye.isUndefined(o))return r(void 0,o)}function f(i,o){if(ye.isUndefined(o)){if(!ye.isUndefined(i))return r(void 0,i)}else return r(void 0,o)}function v(i){const o=ye.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!ye.isUndefined(o))if(ye.isPlainObject(o)){if(ye.hasOwnProp(o,i))return o[i]}else return;const c=ye.hasOwnProp(n,"transitional")?n.transitional:void 0;if(ye.isPlainObject(c)&&ye.hasOwnProp(c,i))return c[i]}function a(i,o,c){if(ye.hasOwnProp(t,c))return r(i,o);if(ye.hasOwnProp(n,c))return r(void 0,i)}const g={url:u,method:u,data:u,baseURL:f,transformRequest:f,transformResponse:f,paramsSerializer:f,timeout:f,timeoutMessage:f,withCredentials:f,withXSRFToken:f,adapter:f,responseType:f,xsrfCookieName:f,xsrfHeaderName:f,onUploadProgress:f,onDownloadProgress:f,decompress:f,maxContentLength:f,maxBodyLength:f,beforeRedirect:f,transport:f,httpAgent:f,httpsAgent:f,cancelToken:f,socketPath:f,allowedSocketPaths:f,responseEncoding:f,validateStatus:a,headers:(i,o,c)=>d(eb(i),eb(o),c,!0)};return ye.forEach(Object.keys({...n,...t}),function(i){if(i==="__proto__"||i==="constructor"||i==="prototype")return;const o=ye.hasOwnProp(g,i)?g[i]:d,c=ye.hasOwnProp(n,i)?n[i]:void 0,p=ye.hasOwnProp(t,i)?t[i]:void 0,s=o(c,p,i);ye.isUndefined(s)&&o!==a||(e[i]=s)}),ye.hasOwnProp(t,"validateStatus")&&ye.isUndefined(t.validateStatus)&&v("validateStatusUndefinedResolves")===!1&&(ye.hasOwnProp(n,"validateStatus")?e.validateStatus=r(void 0,n.validateStatus):delete e.validateStatus),e}const gI=["content-type","content-length"];function mI(n,t,e){if(e!=="content-only"){n.set(t);return}Object.entries(t||{}).forEach(([r,d])=>{gI.includes(r.toLowerCase())&&n.set(r,d)})}const vI=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,e)=>String.fromCharCode(parseInt(e,16)));function tb(n){const t=Ws({},n),e=c=>ye.hasOwnProp(t,c)?t[c]:void 0,r=e("data");let d=e("withXSRFToken");const u=e("xsrfHeaderName"),f=e("xsrfCookieName");let v=e("headers");const a=e("auth"),g=e("baseURL"),i=e("allowAbsoluteUrls"),o=e("url");if(t.headers=v=Ur.from(v),t.url=H0(Q0(g,o,i,t),e("params"),e("paramsSerializer")),a){const c=ye.getSafeProp(a,"username")||"",p=ye.getSafeProp(a,"password")||"";try{v.set("Authorization","Basic "+btoa(c+":"+(p?vI(p):"")))}catch(s){throw nt.from(s,nt.ERR_BAD_OPTION_VALUE,n)}}if(ye.isFormData(r)&&(Rr.hasStandardBrowserEnv||Rr.hasStandardBrowserWebWorkerEnv||ye.isReactNative(r)?v.setContentType(void 0):ye.isFunction(r.getHeaders)&&mI(v,r.getHeaders(),e("formDataHeaderPolicy"))),Rr.hasStandardBrowserEnv&&(ye.isFunction(d)&&(d=d(t)),d===!0||d==null&&aI(t.url))){const c=u&&f&&lI.read(f);c&&v.set(u,c)}return t}const yI=typeof XMLHttpRequest<"u",bI=yI&&function(n){return new Promise(function(t,e){const r=tb(n);let d=r.data;const u=Ur.from(r.headers).normalize();let{responseType:f,onUploadProgress:v,onDownloadProgress:a}=r,g,i,o,c,p;function s(){c&&c(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(g),r.signal&&r.signal.removeEventListener("abort",g)}let h=new XMLHttpRequest;h.open(r.method.toUpperCase(),r.url,!0),h.timeout=r.timeout;function m(){if(!h)return;const x=Ur.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),T={data:!f||f==="text"||f==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:x,config:n,request:h};Y0(function(S){t(S),s()},function(S){e(S),s()},T),h=null}"onloadend"in h?h.onloadend=m:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.startsWith("file:"))||setTimeout(m)},h.onabort=function(){h&&(e(new nt("Request aborted",nt.ECONNABORTED,n,h)),s(),h=null)},h.onerror=function(x){const T=x&&x.message?x.message:"Network Error",S=new nt(T,nt.ERR_NETWORK,n,h);S.event=x||null,e(S),s(),h=null},h.ontimeout=function(){let x=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const T=r.transitional||Rd;r.timeoutErrorMessage&&(x=r.timeoutErrorMessage),e(new nt(x,T.clarifyTimeoutError?nt.ETIMEDOUT:nt.ECONNABORTED,n,h)),s(),h=null},d===void 0&&u.setContentType(null),"setRequestHeader"in h&&ye.forEach(P0(u),function(x,T){h.setRequestHeader(T,x)}),ye.isUndefined(r.withCredentials)||(h.withCredentials=!!r.withCredentials),f&&f!=="json"&&(h.responseType=r.responseType),a&&([o,p]=Oc(a,!0),h.addEventListener("progress",o)),v&&h.upload&&([i,c]=Oc(v),h.upload.addEventListener("progress",i),h.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(g=x=>{h&&(e(!x||x.type?new Al(null,n,h):x),h.abort(),s(),h=null)},r.cancelToken&&r.cancelToken.subscribe(g),r.signal&&(r.signal.aborted?g():r.signal.addEventListener("abort",g)));const y=iI(r.url);if(y&&!Rr.protocols.includes(y)){e(new nt("Unsupported protocol "+y+":",nt.ERR_BAD_REQUEST,n)),s();return}h.send(d||null)})},wI=(n,t)=>{if(n=n?n.filter(Boolean):[],!t&&!n.length)return;const e=new AbortController;let r=!1;const d=function(a){if(!r){r=!0,f();const g=a instanceof Error?a:this.reason;e.abort(g instanceof nt?g:new Al(g instanceof Error?g.message:g))}};let u=t&&setTimeout(()=>{u=null,d(new nt(`timeout of ${t}ms exceeded`,nt.ETIMEDOUT))},t);const f=()=>{n&&(u&&clearTimeout(u),u=null,n.forEach(a=>{a.unsubscribe?a.unsubscribe(d):a.removeEventListener("abort",d)}),n=null)};n.forEach(a=>a.addEventListener("abort",d,{once:!0}));const{signal:v}=e;return v.unsubscribe=()=>ye.asap(f),v},xI=function*(n,t){let e=n.byteLength;if(e<t){yield n;return}let r=0,d;for(;r<e;)d=r+t,yield n.slice(r,d),r=d},CI=async function*(n,t){for await(const e of _I(n))yield*xI(e,t)},_I=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const t=n.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},nb=(n,t,e,r)=>{const d=CI(n,t);let u=0,f,v=a=>{f||(f=!0,r&&r(a))};return new ReadableStream({async pull(a){try{const{done:g,value:i}=await d.next();if(g){v(),a.close();return}let o=i.byteLength;if(e){let c=u+=o;e(c)}a.enqueue(new Uint8Array(i))}catch(g){throw v(g),g}},cancel(a){return v(a),d.return()}},{highWaterMark:2})},Nc=n=>n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102,AI=(n,t,e)=>t+2<e&&Nc(n.charCodeAt(t+1))&&Nc(n.charCodeAt(t+2));function kI(n){if(!n||typeof n!="string"||!n.startsWith("data:"))return 0;const t=n.indexOf(",");if(t<0)return 0;const e=n.slice(5,t),r=n.slice(t+1);if(/;base64/i.test(e)){let u=r.length;const f=r.length;for(let o=0;o<f;o++)if(r.charCodeAt(o)===37&&o+2<f){const c=r.charCodeAt(o+1),p=r.charCodeAt(o+2);Nc(c)&&Nc(p)&&(u-=2,o+=2)}let v=0,a=f-1;const g=o=>o>=2&&r.charCodeAt(o-2)===37&&r.charCodeAt(o-1)===51&&(r.charCodeAt(o)===68||r.charCodeAt(o)===100);a>=0&&(r.charCodeAt(a)===61?(v++,a--):g(a)&&(v++,a-=3)),v===1&&a>=0&&(r.charCodeAt(a)===61||g(a))&&v++;const i=Math.floor(u/4)*3-(v||0);return i>0?i:0}let d=0;for(let u=0,f=r.length;u<f;u++){const v=r.charCodeAt(u);if(v===37&&AI(r,u,f))d+=1,u+=2;else if(v<128)d+=1;else if(v<2048)d+=2;else if(v>=55296&&v<=56319&&u+1<f){const a=r.charCodeAt(u+1);a>=56320&&a<=57343?(d+=4,u++):d+=3}else d+=3}return d}const Od="1.18.1",rb=64*1024,{isFunction:Dc}=ye,SI=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,e)=>String.fromCharCode(parseInt(e,16))),ib=n=>{if(!ye.isString(n))return n;try{return decodeURIComponent(n)}catch{return n}},ob=(n,...t)=>{try{return!!n(...t)}catch{return!1}},$I=n=>{const t=n.indexOf("://");let e=n;return t!==-1&&(e=e.slice(t+3)),e.includes("@")||e.includes(":")},EI=n=>{const t=ye.global!==void 0&&ye.global!==null?ye.global:globalThis,{ReadableStream:e,TextEncoder:r}=t;n=ye.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},n);const{fetch:d,Request:u,Response:f}=n,v=d?Dc(d):typeof fetch=="function",a=Dc(u),g=Dc(f);if(!v)return!1;const i=v&&Dc(e),o=v&&(typeof r=="function"?(y=>x=>y.encode(x))(new r):async y=>new Uint8Array(await new u(y).arrayBuffer())),c=a&&i&&ob(()=>{let y=!1;const x=new u(Rr.origin,{body:new e,method:"POST",get duplex(){return y=!0,"half"}}),T=x.headers.has("Content-Type");return x.body!=null&&x.body.cancel(),y&&!T}),p=g&&i&&ob(()=>ye.isReadableStream(new f("").body)),s={stream:p&&(y=>y.body)};v&&["text","arrayBuffer","blob","formData","stream"].forEach(y=>{!s[y]&&(s[y]=(x,T)=>{let S=x&&x[y];if(S)return S.call(x);throw new nt(`Response type '${y}' is not supported`,nt.ERR_NOT_SUPPORT,T)})});const h=async y=>{if(y==null)return 0;if(ye.isBlob(y))return y.size;if(ye.isSpecCompliantForm(y))return(await new u(Rr.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 o(y)).byteLength},m=async(y,x)=>ye.toFiniteNumber(y.getContentLength())??h(x);return async y=>{let{url:x,method:T,data:S,signal:_,cancelToken:C,timeout:L,onDownloadProgress:O,onUploadProgress:M,responseType:I,headers:B,withCredentials:F="same-origin",fetchOptions:N,maxContentLength:E,maxBodyLength:A}=tb(y);const D=ye.isNumber(E)&&E>-1,j=ye.isNumber(A)&&A>-1,W=ne=>ye.hasOwnProp(y,ne)?y[ne]:void 0;let V=d||fetch;I=I?(I+"").toLowerCase():"text";let K=wI([_,C&&C.toAbortSignal()],L),X=null;const oe=K&&K.unsubscribe&&(()=>{K.unsubscribe()});let ee,le=null;const ue=()=>new nt("Request body larger than maxBodyLength limit",nt.ERR_BAD_REQUEST,y,X);try{let ne;const fe=W("auth");if(fe){const Ie=ye.getSafeProp(fe,"username")||"",Mt=ye.getSafeProp(fe,"password")||"";ne={username:Ie,password:Mt}}if($I(x)){const Ie=new URL(x,Rr.origin);if(!ne&&(Ie.username||Ie.password)){const Mt=ib(Ie.username),dt=ib(Ie.password);ne={username:Mt,password:dt}}(Ie.username||Ie.password)&&(Ie.username="",Ie.password="",x=Ie.href)}if(ne&&(B.delete("authorization"),B.set("Authorization","Basic "+btoa(SI((ne.username||"")+":"+(ne.password||""))))),D&&typeof x=="string"&&x.startsWith("data:")&&kI(x)>E)throw new nt("maxContentLength size of "+E+" exceeded",nt.ERR_BAD_RESPONSE,y,X);if(j&&T!=="get"&&T!=="head"){const Ie=await h(S);if(typeof Ie=="number"&&isFinite(Ie)&&(ee=Ie,Ie>A))throw ue()}const Se=j&&(ye.isReadableStream(S)||ye.isStream(S)),Te=(Ie,Mt,dt)=>nb(Ie,rb,tn=>{if(j&&tn>A)throw le=ue();Mt&&Mt(tn)},dt);if(c&&T!=="get"&&T!=="head"&&(M||Se)){if(ee=ee??await m(B,S),ee!==0||Se){let Ie=new u(x,{method:"POST",body:S,duplex:"half"}),Mt;if(ye.isFormData(S)&&(Mt=Ie.headers.get("content-type"))&&B.setContentType(Mt),Ie.body){const[dt,tn]=M&&X0(ee,Oc(J0(M)))||[];S=Te(Ie.body,dt,tn)}}}else if(Se&&!a&&i&&T!=="get"&&T!=="head")S=Te(S);else if(Se&&a&&!c&&T!=="get"&&T!=="head")throw new nt("Stream request bodies are not supported by the current fetch implementation",nt.ERR_NOT_SUPPORT,y,X);ye.isString(F)||(F=F?"include":"omit");const Re=a&&"credentials"in u.prototype;if(ye.isFormData(S)){const Ie=B.getContentType();Ie&&/^multipart\/form-data/i.test(Ie)&&!/boundary=/i.test(Ie)&&B.delete("content-type")}B.set("User-Agent","axios/"+Od,!1);const Ve={...N,signal:K,method:T.toUpperCase(),headers:P0(B.normalize()),body:S,duplex:"half",credentials:Re?F:void 0};X=a&&new u(x,Ve);let Ue=await(a?V(X,N):V(x,Ve));const Xe=Ur.from(Ue.headers);if(D){const Ie=ye.toFiniteNumber(Xe.getContentLength());if(Ie!=null&&Ie>E)throw new nt("maxContentLength size of "+E+" exceeded",nt.ERR_BAD_RESPONSE,y,X)}const ft=p&&(I==="stream"||I==="response");if(p&&Ue.body&&(O||D||ft&&oe)){const Ie={};["status","statusText","headers"].forEach(Bt=>{Ie[Bt]=Ue[Bt]});const Mt=ye.toFiniteNumber(Xe.getContentLength()),[dt,tn]=O&&X0(Mt,Oc(J0(O),!0))||[];let mn=0;const rr=Bt=>{if(D&&(mn=Bt,mn>E))throw new nt("maxContentLength size of "+E+" exceeded",nt.ERR_BAD_RESPONSE,y,X);dt&&dt(Bt)};Ue=new f(nb(Ue.body,rb,rr,()=>{tn&&tn(),oe&&oe()}),Ie)}I=I||"text";let We=await s[ye.findKey(s,I)||"text"](Ue,y);if(D&&!p&&!ft){let Ie;if(We!=null&&(typeof We.byteLength=="number"?Ie=We.byteLength:typeof We.size=="number"?Ie=We.size:typeof We=="string"&&(Ie=typeof r=="function"?new r().encode(We).byteLength:We.length)),typeof Ie=="number"&&Ie>E)throw new nt("maxContentLength size of "+E+" exceeded",nt.ERR_BAD_RESPONSE,y,X)}return!ft&&oe&&oe(),await new Promise((Ie,Mt)=>{Y0(Ie,Mt,{data:We,headers:Ur.from(Ue.headers),status:Ue.status,statusText:Ue.statusText,config:y,request:X})})}catch(ne){if(oe&&oe(),K&&K.aborted&&K.reason instanceof nt){const fe=K.reason;throw fe.config=y,X&&(fe.request=X),ne!==fe&&Object.defineProperty(fe,"cause",{__proto__:null,value:ne,writable:!0,enumerable:!1,configurable:!0}),fe}if(le)throw X&&!le.request&&(le.request=X),le;if(ne instanceof nt)throw X&&!ne.request&&(ne.request=X),ne;if(ne&&ne.name==="TypeError"&&/Load failed|fetch/i.test(ne.message)){const fe=new nt("Network Error",nt.ERR_NETWORK,y,X,ne&&ne.response);throw Object.defineProperty(fe,"cause",{__proto__:null,value:ne.cause||ne,writable:!0,enumerable:!1,configurable:!0}),fe}throw nt.from(ne,ne&&ne.code,y,X,ne&&ne.response)}}},TI=new Map,sb=n=>{let t=n&&n.env||{};const{fetch:e,Request:r,Response:d}=t,u=[r,d,e];let f=u.length,v=f,a,g,i=TI;for(;v--;)a=u[v],g=i.get(a),g===void 0&&i.set(a,g=v?new Map:EI(t)),i=g;return g};sb();const Nd={http:WR,xhr:bI,fetch:{get:sb}};ye.forEach(Nd,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(n,"adapterName",{__proto__:null,value:t})}});const ab=n=>`- ${n}`,RI=n=>ye.isFunction(n)||n===null||n===!1;function II(n,t){n=ye.isArray(n)?n:[n];const{length:e}=n;let r,d;const u={};for(let f=0;f<e;f++){r=n[f];let v;if(d=r,!RI(r)&&(d=Nd[(v=String(r)).toLowerCase()],d===void 0))throw new nt(`Unknown adapter '${v}'`);if(d&&(ye.isFunction(d)||(d=d.get(t))))break;u[v||"#"+f]=d}if(!d){const f=Object.entries(u).map(([a,g])=>`adapter ${a} `+(g===!1?"is not supported by the environment":"is not available in the build"));let v=e?f.length>1?`since :
1483
+ `+f.map(ab).join(`
1484
+ `):" "+ab(f[0]):"as no adapter specified";throw new nt("There is no suitable adapter to dispatch the request "+v,nt.ERR_NOT_SUPPORT)}return d}const lb={getAdapter:II,adapters:Nd};function Dd(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new Al(null,n)}function cb(n){return Dd(n),n.headers=Ur.from(n.headers),n.data=Ld.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),lb.getAdapter(n.adapter||_l.adapter,n)(n).then(function(t){Dd(n),n.response=t;try{t.data=Ld.call(n,n.transformResponse,t)}finally{delete n.response}return t.headers=Ur.from(t.headers),t},function(t){if(!K0(t)&&(Dd(n),t&&t.response)){n.response=t.response;try{t.response.data=Ld.call(n,n.transformResponse,t.response)}finally{delete n.response}t.response.headers=Ur.from(t.response.headers)}return Promise.reject(t)})}const Pc={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{Pc[n]=function(e){return typeof e===n||"a"+(t<1?"n ":" ")+n}});const ub={};Pc.transitional=function(n,t,e){function r(d,u){return"[Axios v"+Od+"] Transitional option '"+d+"'"+u+(e?". "+e:"")}return(d,u,f)=>{if(n===!1)throw new nt(r(u," has been removed"+(t?" in "+t:"")),nt.ERR_DEPRECATED);return t&&!ub[u]&&(ub[u]=!0,console.warn(r(u," has been deprecated since v"+t+" and will be removed in the near future"))),n?n(d,u,f):!0}},Pc.spelling=function(n){return(t,e)=>(console.warn(`${e} is likely a misspelling of ${n}`),!0)};function MI(n,t,e){if(typeof n!="object"||n===null)throw new nt("options must be an object",nt.ERR_BAD_OPTION_VALUE);const r=Object.keys(n);let d=r.length;for(;d-- >0;){const u=r[d],f=Object.prototype.hasOwnProperty.call(t,u)?t[u]:void 0;if(f){const v=n[u],a=v===void 0||f(v,u,n);if(a!==!0)throw new nt("option "+u+" must be "+a,nt.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new nt("Unknown option "+u,nt.ERR_BAD_OPTION)}}const Fc={assertOptions:MI,validators:Pc},Vr=Fc.validators;let Hs=class{constructor(t){this.defaults=t||{},this.interceptors={request:new U0,response:new U0}}async request(t,e){try{return await this._request(t,e)}catch(r){if(r instanceof Error){let d={};Error.captureStackTrace?Error.captureStackTrace(d):d=new Error;const u=(()=>{if(!d.stack)return"";const f=d.stack.indexOf(`
1485
+ `);return f===-1?"":d.stack.slice(f+1)})();try{if(!r.stack)r.stack=u;else if(u){const f=u.indexOf(`
1486
+ `),v=f===-1?-1:u.indexOf(`
1487
+ `,f+1),a=v===-1?"":u.slice(v+1);String(r.stack).endsWith(a)||(r.stack+=`
1488
+ `+u)}}catch{}}throw r}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=Ws(this.defaults,e);const{transitional:r,paramsSerializer:d,headers:u}=e;r!==void 0&&Fc.assertOptions(r,{silentJSONParsing:Vr.transitional(Vr.boolean),forcedJSONParsing:Vr.transitional(Vr.boolean),clarifyTimeoutError:Vr.transitional(Vr.boolean),legacyInterceptorReqResOrdering:Vr.transitional(Vr.boolean),advertiseZstdAcceptEncoding:Vr.transitional(Vr.boolean),validateStatusUndefinedResolves:Vr.transitional(Vr.boolean)},!1),d!=null&&(ye.isFunction(d)?e.paramsSerializer={serialize:d}:Fc.assertOptions(d,{encode:Vr.function,serialize:Vr.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),Fc.assertOptions(e,{baseUrl:Vr.spelling("baseURL"),withXsrfToken:Vr.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let f=u&&ye.merge(u.common,u[e.method]);u&&ye.forEach(["delete","get","head","post","put","patch","query","common"],s=>{delete u[s]}),e.headers=Ur.concat(f,u);const v=[];let a=!0;this.interceptors.request.forEach(function(s){if(typeof s.runWhen=="function"&&s.runWhen(e)===!1)return;a=a&&s.synchronous;const h=e.transitional||Rd;h&&h.legacyInterceptorReqResOrdering?v.unshift(s.fulfilled,s.rejected):v.push(s.fulfilled,s.rejected)});const g=[];this.interceptors.response.forEach(function(s){g.push(s.fulfilled,s.rejected)});let i,o=0,c;if(!a){const s=[cb.bind(this),void 0];for(s.unshift(...v),s.push(...g),c=s.length,i=Promise.resolve(e);o<c;)i=i.then(s[o++],s[o++]);return i}c=v.length;let p=e;for(;o<c;){const s=v[o++],h=v[o++];try{p=s(p)}catch(m){h.call(this,m);break}}try{i=cb.call(this,p)}catch(s){return Promise.reject(s)}for(o=0,c=g.length;o<c;)i=i.then(g[o++],g[o++]);return i}getUri(t){t=Ws(this.defaults,t);const e=Q0(t.baseURL,t.url,t.allowAbsoluteUrls,t);return H0(e,t.params,t.paramsSerializer)}};ye.forEach(["delete","get","head","options"],function(n){Hs.prototype[n]=function(t,e){return this.request(Ws(e||{},{method:n,url:t,data:e&&ye.hasOwnProp(e,"data")?e.data:void 0}))}}),ye.forEach(["post","put","patch","query"],function(n){function t(e){return function(r,d,u){return this.request(Ws(u||{},{method:n,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:d}))}}Hs.prototype[n]=t(),n!=="query"&&(Hs.prototype[n+"Form"]=t(!0))});let LI=class dC{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(d){e=d});const r=this;this.promise.then(d=>{if(!r._listeners)return;let u=r._listeners.length;for(;u-- >0;)r._listeners[u](d);r._listeners=null}),this.promise.then=d=>{let u;const f=new Promise(v=>{r.subscribe(v),u=v}).then(d);return f.cancel=function(){r.unsubscribe(u)},f},t(function(d,u,f){r.reason||(r.reason=new Al(d,u,f),e(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=r=>{t.abort(r)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new dC(function(e){t=e}),cancel:t}}};function OI(n){return function(t){return n.apply(null,t)}}function NI(n){return ye.isObject(n)&&n.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(([n,t])=>{Pd[t]=n});function hb(n){const t=new Hs(n),e=S0(Hs.prototype.request,t);return ye.extend(e,Hs.prototype,t,{allOwnKeys:!0}),ye.extend(e,t,null,{allOwnKeys:!0}),e.create=function(r){return hb(Ws(n,r))},e}const nr=Nn("T",hb(_l));nr.Axios=Hs,nr.CanceledError=Al,nr.CancelToken=LI,nr.isCancel=K0,nr.VERSION=Od,nr.toFormData=Lc,nr.AxiosError=nt,nr.Cancel=nr.CanceledError,nr.all=function(n){return Promise.all(n)},nr.spread=OI,nr.isAxiosError=NI,nr.mergeConfig=Ws,nr.AxiosHeaders=Ur,nr.formToJSON=n=>q0(ye.isHTMLForm(n)?new FormData(n):n),nr.getAdapter=lb.getAdapter,nr.HttpStatusCode=Pd,nr.default=nr;const{Axios:Jj,AxiosError:Zj,CanceledError:Qj,isCancel:eB,CancelToken:tB,VERSION:nB,all:rB,Cancel:iB,isAxiosError:oB,spread:sB,toFormData:aB,AxiosHeaders:lB,HttpStatusCode:cB,formToJSON:uB,getAdapter:hB,mergeConfig:dB,create:fB}=nr;function db(){return Object.assign({},ga())}function DI(n,t,e){const r=ni(n,e?.in);return r.setTime(r.getTime()+t*cc),r}function PI(n,t){const e=()=>Ro(t?.in,NaN),r=BI(n);let d;if(r.date){const a=WI(r.date,2);d=HI(a.restDateString,a.year)}if(!d||isNaN(+d))return e();const u=+d;let f=0,v;if(r.time&&(f=UI(r.time),isNaN(f)))return e();if(r.timezone){if(v=VI(r.timezone),isNaN(v))return e()}else{const a=new Date(u+f),g=ni(0,t?.in);return g.setFullYear(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()),g.setHours(a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds(),a.getUTCMilliseconds()),g}return ni(u+f+v,t?.in)}const zc={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},FI=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,zI=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,jI=/^([+-])(\d{2})(?::?(\d{2}))?$/;function BI(n){const t={},e=n.split(zc.dateTimeDelimiter);let r;if(e.length>2)return t;if(/:/.test(e[0])?r=e[0]:(t.date=e[0],r=e[1],zc.timeZoneDelimiter.test(t.date)&&(t.date=n.split(zc.timeZoneDelimiter)[0],r=n.substr(t.date.length,n.length))),r){const d=zc.timezone.exec(r);d?(t.time=r.replace(d[1],""),t.timezone=d[1]):t.time=r}return t}function WI(n,t){const e=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=n.match(e);if(!r)return{year:NaN,restDateString:""};const d=r[1]?parseInt(r[1]):null,u=r[2]?parseInt(r[2]):null;return{year:u===null?d:u*100,restDateString:n.slice((r[1]||r[2]).length)}}function HI(n,t){if(t===null)return new Date(NaN);const e=n.match(FI);if(!e)return new Date(NaN);const r=!!e[4],d=kl(e[1]),u=kl(e[2])-1,f=kl(e[3]),v=kl(e[4]),a=kl(e[5])-1;if(r)return XI(t,v,a)?GI(t,v,a):new Date(NaN);{const g=new Date(0);return!KI(t,u,f)||!YI(t,d)?new Date(NaN):(g.setUTCFullYear(t,u,Math.max(d,f)),g)}}function kl(n){return n?parseInt(n):1}function UI(n){const t=n.match(zI);if(!t)return NaN;const e=Fd(t[1]),r=Fd(t[2]),d=Fd(t[3]);return JI(e,r,d)?e*ch+r*cc+d*1e3:NaN}function Fd(n){return n&&parseFloat(n.replace(",","."))||0}function VI(n){if(n==="Z")return 0;const t=n.match(jI);if(!t)return 0;const e=t[1]==="+"?-1:1,r=parseInt(t[2]),d=t[3]&&parseInt(t[3])||0;return ZI(r,d)?e*(r*ch+d*cc):NaN}function GI(n,t,e){const r=new Date(0);r.setUTCFullYear(n,0,4);const d=r.getUTCDay()||7,u=(t-1)*7+e+1-d;return r.setUTCDate(r.getUTCDate()+u),r}const qI=[31,null,31,30,31,30,31,31,30,31,30,31];function fb(n){return n%400===0||n%4===0&&n%100!==0}function KI(n,t,e){return t>=0&&t<=11&&e>=1&&e<=(qI[t]||(fb(n)?29:28))}function YI(n,t){return t>=1&&t<=(fb(n)?366:365)}function XI(n,t,e){return t>=1&&t<=53&&e>=0&&e<=6}function JI(n,t,e){return n===24?t===0&&e===0:e>=0&&e<60&&t>=0&&t<60&&n>=0&&n<25}function ZI(n,t){return t>=0&&t<=59}function QI(n,t,e){return DI(n,-t,e)}function pb(n,t,e){const r=db(),d=nM(n,e.timeZone,e.locale??r.locale);return"formatToParts"in d?eM(d,t):tM(d,t)}function eM(n,t){const e=n.formatToParts(t);for(let r=e.length-1;r>=0;--r)if(e[r].type==="timeZoneName")return e[r].value}function tM(n,t){const e=n.format(t).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(e);return r?r[0].substr(1):""}function nM(n,t,e){return new Intl.DateTimeFormat(e?[e.code,"en-US"]:void 0,{timeZone:t,timeZoneName:n})}function rM(n,t){const e=lM(t);return"formatToParts"in e?oM(e,n):sM(e,n)}const iM={year:0,month:1,day:2,hour:3,minute:4,second:5};function oM(n,t){try{const e=n.formatToParts(t),r=[];for(let d=0;d<e.length;d++){const u=iM[e[d].type];u!==void 0&&(r[u]=parseInt(e[d].value,10))}return r}catch(e){if(e instanceof RangeError)return[NaN];throw e}}function sM(n,t){const e=n.format(t),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 zd={},gb=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")),aM=gb==="06/25/2014, 00:00:00"||gb==="‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";function lM(n){return zd[n]||(zd[n]=aM?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:n,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),zd[n]}function mb(n,t,e,r,d,u,f){const v=new Date(0);return v.setUTCFullYear(n,t,e),v.setUTCHours(r,d,u,f),v}const vb=36e5,cM=6e4,jd={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function Bd(n,t,e){if(!n)return 0;let r=jd.timezoneZ.exec(n);if(r)return 0;let d,u;if(r=jd.timezoneHH.exec(n),r)return d=parseInt(r[1],10),yb(d)?-(d*vb):NaN;if(r=jd.timezoneHHMM.exec(n),r){d=parseInt(r[2],10);const f=parseInt(r[3],10);return yb(d,f)?(u=Math.abs(d)*vb+f*cM,r[1]==="+"?-u:u):NaN}if(dM(n)){t=new Date(t||Date.now());const f=e?t:uM(t),v=Wd(f,n);return-(e?v:hM(t,v,n))}return NaN}function uM(n){return mb(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())}function Wd(n,t){const e=rM(n,t),r=mb(e[0],e[1]-1,e[2],e[3]%24,e[4],e[5],0).getTime();let d=n.getTime();const u=d%1e3;return d-=u>=0?u:1e3+u,r-d}function hM(n,t,e){let r=n.getTime()-t;const d=Wd(new Date(r),e);if(t===d)return t;r-=d-t;const u=Wd(new Date(r),e);return d===u?d:Math.max(d,u)}function yb(n,t){return-23<=n&&n<=23&&(t==null||0<=t&&t<=59)}const bb={};function dM(n){if(bb[n])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:n}),bb[n]=!0,!0}catch{return!1}}const fM=60*1e3,pM={X:function(n,t,e){const r=Hd(e.timeZone,n);if(r===0)return"Z";switch(t){case"X":return wb(r);case"XXXX":case"XX":return La(r);default:return La(r,":")}},x:function(n,t,e){const r=Hd(e.timeZone,n);switch(t){case"x":return wb(r);case"xxxx":case"xx":return La(r);default:return La(r,":")}},O:function(n,t,e){const r=Hd(e.timeZone,n);switch(t){case"O":case"OO":case"OOO":return"GMT"+gM(r,":");default:return"GMT"+La(r,":")}},z:function(n,t,e){switch(t){case"z":case"zz":case"zzz":return pb("short",n,e);default:return pb("long",n,e)}}};function Hd(n,t){const e=n?Bd(n,t,!0)/fM:t?.getTimezoneOffset()??0;if(Number.isNaN(e))throw new RangeError("Invalid time zone specified: "+n);return e}function jc(n,t){const e=n<0?"-":"";let r=Math.abs(n).toString();for(;r.length<t;)r="0"+r;return e+r}function La(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),d=jc(Math.floor(r/60),2),u=jc(Math.floor(r%60),2);return e+d+t+u}function wb(n,t){return n%60===0?(n>0?"-":"+")+jc(Math.abs(n)/60,2):La(n,t)}function gM(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),d=Math.floor(r/60),u=r%60;return u===0?e+String(d):e+String(d)+t+jc(u,2)}function xb(n){const t=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return t.setUTCFullYear(n.getFullYear()),+n-+t}const mM=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,Ud=36e5,Cb=6e4,vM=2,ii={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:mM};function _b(n,t={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(n===null)return new Date(NaN);const e=t.additionalDigits==null?vM:Number(t.additionalDigits);if(e!==2&&e!==1&&e!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]")return new Date(n.getTime());if(typeof n=="number"||Object.prototype.toString.call(n)==="[object Number]")return new Date(n);if(Object.prototype.toString.call(n)!=="[object String]")return new Date(NaN);const r=yM(n),{year:d,restDateString:u}=bM(r.date,e),f=wM(u,d);if(f===null||isNaN(f.getTime()))return new Date(NaN);if(f){const v=f.getTime();let a=0,g;if(r.time&&(a=xM(r.time),a===null||isNaN(a)))return new Date(NaN);if(r.timeZone||t.timeZone){if(g=Bd(r.timeZone||t.timeZone,new Date(v+a)),isNaN(g))return new Date(NaN)}else g=xb(new Date(v+a)),g=xb(new Date(v+a+g));return new Date(v+a+g)}else return new Date(NaN)}function yM(n){const t={};let e=ii.dateTimePattern.exec(n),r;if(e?(t.date=e[1],r=e[3]):(e=ii.datePattern.exec(n),e?(t.date=e[1],r=e[2]):(t.date=null,r=n)),r){const d=ii.timeZone.exec(r);d?(t.time=r.replace(d[1],""),t.timeZone=d[1].trim()):t.time=r}return t}function bM(n,t){if(n){const e=ii.YYY[t],r=ii.YYYYY[t];let d=ii.YYYY.exec(n)||r.exec(n);if(d){const u=d[1];return{year:parseInt(u,10),restDateString:n.slice(u.length)}}if(d=ii.YY.exec(n)||e.exec(n),d){const u=d[1];return{year:parseInt(u,10)*100,restDateString:n.slice(u.length)}}}return{year:null}}function wM(n,t){if(t===null)return null;let e,r,d;if(!n||!n.length)return e=new Date(0),e.setUTCFullYear(t),e;let u=ii.MM.exec(n);if(u)return e=new Date(0),r=parseInt(u[1],10)-1,Sb(t,r)?(e.setUTCFullYear(t,r),e):new Date(NaN);if(u=ii.DDD.exec(n),u){e=new Date(0);const f=parseInt(u[1],10);return AM(t,f)?(e.setUTCFullYear(t,0,f),e):new Date(NaN)}if(u=ii.MMDD.exec(n),u){e=new Date(0),r=parseInt(u[1],10)-1;const f=parseInt(u[2],10);return Sb(t,r,f)?(e.setUTCFullYear(t,r,f),e):new Date(NaN)}if(u=ii.Www.exec(n),u)return d=parseInt(u[1],10)-1,$b(d)?Ab(t,d):new Date(NaN);if(u=ii.WwwD.exec(n),u){d=parseInt(u[1],10)-1;const f=parseInt(u[2],10)-1;return $b(d,f)?Ab(t,d,f):new Date(NaN)}return null}function xM(n){let t,e,r=ii.HH.exec(n);if(r)return t=parseFloat(r[1].replace(",",".")),Vd(t)?t%24*Ud:NaN;if(r=ii.HHMM.exec(n),r)return t=parseInt(r[1],10),e=parseFloat(r[2].replace(",",".")),Vd(t,e)?t%24*Ud+e*Cb:NaN;if(r=ii.HHMMSS.exec(n),r){t=parseInt(r[1],10),e=parseInt(r[2],10);const d=parseFloat(r[3].replace(",","."));return Vd(t,e,d)?t%24*Ud+e*Cb+d*1e3:NaN}return null}function Ab(n,t,e){t=t||0,e=e||0;const r=new Date(0);r.setUTCFullYear(n,0,4);const d=r.getUTCDay()||7,u=t*7+e+1-d;return r.setUTCDate(r.getUTCDate()+u),r}const CM=[31,28,31,30,31,30,31,31,30,31,30,31],_M=[31,29,31,30,31,30,31,31,30,31,30,31];function kb(n){return n%400===0||n%4===0&&n%100!==0}function Sb(n,t,e){if(t<0||t>11)return!1;if(e!=null){if(e<1)return!1;const r=kb(n);if(r&&e>_M[t]||!r&&e>CM[t])return!1}return!0}function AM(n,t){if(t<1)return!1;const e=kb(n);return!(e&&t>366||!e&&t>365)}function $b(n,t){return!(n<0||n>52||t!=null&&(t<0||t>6))}function Vd(n,t,e){return!(n<0||n>=25||t!=null&&(t<0||t>=60)||e!=null&&(e<0||e>=60))}const kM=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function SM(n,t,e={}){t=String(t);const r=t.match(kM);if(r){const d=_b(e.originalDate||n,e);t=r.reduce(function(u,f){if(f[0]==="'")return u;const v=u.indexOf(f),a=u[v-1]==="'",g=u.replace(f,"'"+pM[f[0]](d,f,e)+"'");return a?g.substring(0,v-1)+g.substring(v+1):g},t)}return Ms(n,t,e)}function $M(n,t,e){n=_b(n,e);const r=Bd(t,n,!0),d=new Date(n.getTime()-r),u=new Date(0);return u.setFullYear(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()),u.setHours(d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds()),u}function Bc(n,t,e,r){return r={...r,timeZone:t,originalDate:n},SM($M(n,t,{timeZone:r.timeZone}),e,r)}const Wc="yyyy-MM-dd",Eb="HH:mm:ss.SSS",Tb="HH:mm:ss",Hc=`${Wc} ${Eb}`,Rb=`${Wc} ${Tb}`,pB=Nn("R",{methods:{parseDateTime(n,t){return n.includes(" ")&&(n=n.replace(" ","T")),t&&t==="UTC"&&(n+="Z"),Date.parse(n)},formatUtcToLocal(n,t){return Ms(!t||t==="local"?QI(n,n.getTimezoneOffset()):n,Hc)},formatDateTime(n,t){return!t||t==="local"?Ms(n,Hc):Bc(n,t,Hc)},formatDateTimeHMS(n,t){return!t||t==="local"?Ms(n,Rb):Bc(n,t,Rb)},formatDate:function(n,t){return!t||t==="local"?Ms(n,Wc):Bc(n,this.timeZone,Wc)},formatTime:function(n,t,e=Eb){return!t||t==="local"?Ms(n,e):Bc(n,this.timeZone,e)},formatTimeHMS:function(n,t){return this.formatTime(n,t,Tb)},formatTimestamp(n,t){return this.formatDateTime(PI(n),t)},formatSeconds(n,t){return this.formatDateTime(new Date(n*1e3),t)},formatNanoseconds(n,t){return this.formatDateTime(new Date(parseInt(n)/1e6),t)}}}),Ib=100,Mb=Nn("h",yg("app",{state:()=>({notifyHistory:[],namedWidgets:{},playback:{playbackMode:null,playbackDateTime:null,playbackStep:1,playbackLoading:0}}),getters:{namedWidget:n=>t=>n.namedWidgets[t]},actions:{notifyAddHistory(n){this.notifyHistory.length>=Ib&&(this.notifyHistory.length=Ib-1),this.notifyHistory.unshift(n)},notifyClearHistory(){this.notifyHistory=[]},setNamedWidget(n){Object.assign(this.namedWidgets,n)},clearNamedWidget(n){delete this.namedWidgets[n]},updatePlayback(n){Object.assign(this.playback,n)}}})),Oa=bg();Oa.use(({store:n})=>{n.commit=(t,e)=>{typeof n[t]=="function"&&n[t](e)},n.dispatch=(t,e)=>{if(typeof n[t]=="function")return n[t](e)}});const EM=Oa.install.bind(Oa);Oa.install=n=>{EM(n);const t=Mb(Oa);n.config.globalProperties.$store={state:new Proxy({},{get(e,r){return t.$state}}),getters:new Proxy({},{get(e,r){if(r.includes("/")){const[,d]=r.split("/");return t[d]}return t[r]}}),commit(e,r){if(e.includes("/")){const[,d]=e.split("/");t[d]?.(r)}else t[e]?.(r)},dispatch(e,r){if(e.includes("/")){const[,d]=e.split("/");return t[d]?.(r)}else return t[e]?.(r)}}};const TM="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=",RM={props:{status:{type:String,required:!0},large:{type:Boolean},small:{type:Boolean},scale:{type:Number,default:1}},computed:{icons:function(){return TM},scaleFactor:function(){return this.scale?this.scale:this.large?1:this.small?.3:.5},iconStyle:function(){const n=PM.indexOf(Lb[this.status]),t=1-(n-1)*.05,e=224*this.scaleFactor*t,r=32*this.scaleFactor*t,d=32*this.scaleFactor*t;return[`background-image: url(${this.icons});`,`background-position-x: -${n*d}px;`,`background-size: ${e}px ${r}px;`,`height: ${d}px;`,`width: ${d}px;`,`padding-top: ${n-1}px;`].join("")}}};function IM(n,t,e,r,d,u){return ct(),an("div",{style:Cs(u.iconStyle)},null,4)}const MM=co(RM,[["render",IM]]),LM={props:{icon:{type:String,default:null},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{colorStyle:function(){return{"--iconColor":this.color}}}};function OM(n,t,e,r,d,u){const f=Ke("rux-icon");return ct(),jt(f,{size:e.size,icon:e.icon,style:Cs(u.colorStyle)},null,8,["size","icon","style"])}const NM=co(LM,[["render",OM],["__scopeId","data-v-bb4cd487"]]),Lb={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"},Gd={fatal:"#ff69B4",critical:"#ff3838",serious:"#ffb302",caution:"#fce83a",normal:"#56f000",standby:"#2dccff",off:"#a4abb6"},DM=function(n){const t="#000000",e="#ffffff",r=Gd[Lb[n]];if(r){const d=+`0x${r.slice(1,3)}`,u=+`0x${r.slice(3,5)}`,f=+`0x${r.slice(5,7)}`;if((d*299+u*587+f*114)/1e3>128)return t}return e},PM=Object.keys(Gd),FM={astro:{component:n=>aa(NM,{...n})},"astro-status":{component:n=>aa(MM,{...n,status:n.icon})}},zM={extras:{component:n=>aa(TC,{...n})}},jM=50,BM=2e3,Ob="single-spa:app-change",WM={data(){return{appsMounted:!1,show:!1,hideSpinner:!1,pollInterval:null}},computed:{showSpinner:function(){return!this.hideSpinner&&!this.show}},created(){window.addEventListener(Ob,this.handleAppChange)},mounted(){this.pollForMountedApps(),setTimeout(()=>{this.appsMounted||(this.show=!0,this.pollInterval&&clearInterval(this.pollInterval))},BM)},unmounted(){window.removeEventListener(Ob,this.handleAppChange),this.pollInterval&&clearInterval(this.pollInterval)},methods:{handleAppChange:function(n){this.show=!n.detail.appsByNewStatus.MOUNTED,this.hideSpinner=!0},pollForMountedApps:function(){this.pollInterval=setInterval(()=>{this.appsMounted=Fu().length>0,Fu().length>0&&(this.hideSpinner=!0,clearInterval(this.pollInterval))},jM)}}},HM={class:"mx-1"},UM={key:1,class:"d-flex justify-center align-center"};function VM(n,t,e,r,d,u){const f=Ke("v-card-title"),v=Ke("v-card-text"),a=Ke("v-card"),g=Ke("v-progress-circular");return ct(),an(fi,null,[d.show?(ct(),jt(a,{key:0},{default:Be(()=>[Ge(f,null,{default:Be(()=>[...t[0]||(t[0]=[Nt(" 404 Not Found ",-1)])]),_:1}),Ge(v,{class:"d-flex align-center mt-3"},{default:Be(()=>[t[1]||(t[1]=Nt(" The requested URL ",-1)),er("code",HM,Cn(n.$route.fullPath),1),t[2]||(t[2]=Nt(" was not routable. ",-1)),t[3]||(t[3]=er("span",{class:"text-h3 mx-1"}," 🦄 ",-1))]),_:1})]),_:1})):ti("",!0),u.showSpinner?(ct(),an("div",UM,[Ge(g,{indeterminate:""})])):ti("",!0)],64)}const GM=co(WM,[["render",VM]]);var qd={};const qM={props:{modelValue:Boolean},emits:["update:modelValue"],data(){return{url:"",type:null,response:null,activeDownload:!1,disableSearch:!1,expanded:[]}},computed:{show:{get(){return this.modelValue},set(n){this.$emit("update:modelValue",n)}},listData:function(){return this.response?this.type==="github"?this.parseGithub():this.parseRuby():[]}},methods:{parseGithub:function(){const n=/\w+.gem/;return this.response.tree.filter(t=>n.exec(t.path)).map(t=>({name:t.path,url:`https://raw.github.com/OpenC3/openc3-tools/main/${t.path}`}))},getResponse:function(){this.disableSearch=!0,nr.get(this.url).then(n=>{this.response=n.data}),setTimeout(()=>{this.disableSearch=!1},1e4)},searchGithub:function(){this.type="github",this.url="https://api.github.com/repos/OpenC3/openc3-tools/git/trees/main?recursive=1",this.getResponse()},downloadGem:function(n){const t=document.createElement("a");t.href=n.url,t.setAttribute("download",n.name),t.click(),t.remove()}}},KM={class:"pa-3"},YM={class:"px-2"},XM={key:0,class:"mt-4"},JM={key:1,class:"mt-4"};function ZM(n,t,e,r,d,u){const f=Ke("v-spacer"),v=Ke("v-toolbar"),a=Ke("v-row"),g=Ke("v-icon"),i=Ke("v-btn"),o=Ke("v-col"),c=Ke("v-list-item-title"),p=Ke("v-progress-circular"),s=Ke("v-list-item"),h=Ke("v-divider"),m=Ke("v-card-text"),y=Ke("v-card"),x=Ke("v-dialog");return ct(),jt(x,{modelValue:u.show,"onUpdate:modelValue":t[0]||(t[0]=T=>u.show=T),width:"600"},{default:Be(()=>[Ge(y,null,{default:Be(()=>[Ge(v,{height:"24"},{default:Be(()=>[Ge(f),t[1]||(t[1]=er("span",null," Download Gems ",-1)),Ge(f)]),_:1}),Ge(m,null,{default:Be(()=>[er("div",KM,[Ge(a,{class:"my-2"},{default:Be(()=>[...t[2]||(t[2]=[Nt(" Select a download option ",-1)])]),_:1}),Ge(a,null,{default:Be(()=>[Ge(o,null,{default:Be(()=>[er("div",YM,[Ge(i,{block:"","data-test":"searchGithub",color:"primary",disabled:d.disableSearch,onClick:u.searchGithub},{default:Be(()=>[t[4]||(t[4]=Nt(" Github ",-1)),Ge(g,{end:"",theme:"dark"},{default:Be(()=>[...t[3]||(t[3]=[Nt(" mdi-github ",-1)])]),_:1})]),_:1},8,["disabled","onClick"])])]),_:1})]),_:1}),Ge(a,{class:"mt-5"},{default:Be(()=>[...t[5]||(t[5]=[Nt(" Community Gems ",-1)])]),_:1}),u.listData.length<1?(ct(),an("div",XM,[Ge(a,{class:"mx-2"},{default:Be(()=>[...t[6]||(t[6]=[er("span",null," I’m sorry, Dave. No gems available.... ",-1)])]),_:1})])):(ct(),an("div",JM,[(ct(!0),an(fi,null,To(u.listData,(T,S)=>(ct(),an("div",{key:S},[Ge(s,null,{default:Be(()=>[Ge(c,null,{default:Be(()=>[Nt(Cn(T.name),1)]),_:2},1024),Ge(s,{icon:""},{default:Be(()=>[d.activeDownload?(ct(),jt(p,{key:0,indeterminate:"",color:"primary"})):(ct(),jt(i,{key:1,icon:"mdi-cloud-download",variant:"text",disabled:d.activeDownload,onClick:_=>u.downloadGem(T)},null,8,["disabled","onClick"]))]),_:2},1024)]),_:2},1024),S<u.listData.length-1?(ct(),jt(h,{key:S})):ti("",!0)]))),128))]))])]),_:1})]),_:1})]),_:1},8,["modelValue"])}const gB=Nn("C",co(qM,[["render",ZM]])),QM={props:{modelValue:Boolean,plugin:{type:String,default:null},targets:{type:Array,default:null},pluginDelete:Boolean},emits:["update:modelValue","submit","cancel"],data(){return{modifiedTargets:[],deleteModified:!1}},computed:{show:{get(){return this.modelValue},set(n){this.$emit("update:modelValue",n)}}},created(){for(const n of this.targets)dm.get(`/openc3-api/targets/${n.name}/modified_files`).then(t=>{t.data.length!==0&&this.modifiedTargets.push({name:n.name,files:t.data})})},methods:{cancel(){this.show=!1,this.$emit("cancel")}}},eL={class:"file-list-container"};function tL(n,t,e,r,d,u){const f=Ke("v-spacer"),v=Ke("v-toolbar"),a=Ke("v-list-item-title"),g=Ke("v-list-item-subtitle"),i=Ke("v-list-item"),o=Ke("v-checkbox"),c=Ke("v-card-text"),p=Ke("v-btn"),s=Ke("v-card-actions"),h=Ke("v-card"),m=Ke("v-dialog");return ct(),jt(m,{modelValue:u.show,"onUpdate:modelValue":t[2]||(t[2]=y=>u.show=y),persistent:"",width:"600",onKeydown:ql(u.cancel,["esc"])},{default:Be(()=>[Ge(h,null,{default:Be(()=>[Ge(v,{height:"24"},{default:Be(()=>[Ge(f),t[3]||(t[3]=er("span",null," Modified Plugin ",-1)),Ge(f)]),_:1}),Ge(c,{class:"pa-3 card-container"},{default:Be(()=>[er("div",null," Plugin "+Cn(e.plugin)+" was modified. Would you like to delete the existing modified files? ",1),(ct(!0),an(fi,null,To(d.modifiedTargets,(y,x)=>(ct(),jt(i,{key:x,lines:"two"},{default:Be(()=>[Ge(a,null,{default:Be(()=>[Nt(Cn(y.name),1)]),_:2},1024),er("div",eL,[(ct(!0),an(fi,null,To(y.files,(T,S)=>(ct(),jt(g,{key:S},{default:Be(()=>[Nt(Cn(T),1)]),_:2},1024))),128))])]),_:2},1024))),128)),Ge(o,{modelValue:d.deleteModified,"onUpdate:modelValue":t[0]||(t[0]=y=>d.deleteModified=y),label:"DELETE MODIFIED! THIS CAN NOT BE UNDONE!!!",color:"error","data-test":"modified-plugin-delete-checkbox"},null,8,["modelValue"])]),_:1}),Ge(s,{class:"px-2"},{default:Be(()=>[Ge(f),Ge(p,{variant:"outlined","data-test":"modified-plugin-cancel",onClick:u.cancel},{default:Be(()=>[...t[4]||(t[4]=[Nt(" Cancel ",-1)])]),_:1},8,["onClick"]),Ge(p,{variant:"flat","data-test":"modified-plugin-submit",onClick:t[1]||(t[1]=()=>{u.show=!1,n.$emit("submit",d.deleteModified)})},{default:Be(()=>[...t[5]||(t[5]=[Nt(" Confirm ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","onKeydown"])}const mB=Nn("e",co(QM,[["render",tL],["__scopeId","data-v-06cfb31b"]])),Kd=[{displayName:"Plugins",name:"PluginsTab",path:"plugins",component:()=>at(()=>st.import("./PluginsTab-C-ItW862-32d7ee9164d04691765d.js"),void 0)},{displayName:"Targets",name:"TargetsTab",path:"targets",component:()=>at(()=>st.import("./TargetsTab-KTV_gfLE-3a9c157196f584e54664.js"),void 0)},{displayName:"Interfaces",name:"InterfacesTab",path:"interfaces",component:()=>at(()=>st.import("./InterfacesTab-zhl06TGR-269bf95691e1ca1133d0.js"),void 0)},{displayName:"Routers",name:"RoutersTab",path:"routers",component:()=>at(()=>st.import("./RoutersTab-DUvEd6IA-b95f4c2224cc6903fd12.js"),void 0)},{displayName:"Microservices",name:"MicroservicesTab",path:"microservices",component:()=>at(()=>st.import("./MicroservicesTab-eR0hpoO1-90e70bfd68ca8cece876.js"),void 0)},{displayName:"Packages",name:"PackagesTab",path:"packages",component:()=>at(()=>st.import("./PackagesTab-aA0fmiQh-fb563fc6f35c8b0be850.js"),void 0)},{displayName:"Tools",name:"ToolsTab",path:"tools",component:()=>at(()=>st.import("./ToolsTab-yFxYcJ-o-7c21c60dd470d658fe4d.js"),void 0)},{displayName:"Redis",name:"RedisTab",path:"redis",component:()=>at(()=>st.import("./RedisTab-WR7ODfau-47151697811af67bb310.js"),void 0)},{displayName:"TSDB",name:"TsdbTab",path:"tsdb",component:()=>at(()=>st.import("./TsdbTab-B0BR-V6A-ab626c8be8b9836c1c78.js"),void 0)},{displayName:"Secrets",name:"SecretsTab",path:"secrets",component:()=>at(()=>st.import("./SecretsTab-CkjjSxCg-e1665e5ecea3aed8dad6.js"),void 0)},{displayName:"Settings",name:"SettingsTab",path:"settings",component:()=>at(()=>st.import("./SettingsTab-CJp0hFpx-bae27f27a99072352713.js"),void 0)}],nL={components:{TopBar:PT},data(){return{title:"Administrator Console",curTab:null}},computed:{tabs:function(){return Kd.map(n=>({displayName:n.displayName,path:{name:n.name}}))}}};function rL(n,t,e,r,d,u){const f=Ke("top-bar"),v=Ke("v-tab"),a=Ke("v-tabs"),g=Ke("router-view"),i=Ke("v-card");return ct(),an("div",null,[Ge(f,{title:d.title},null,8,["title"]),Ge(i,null,{default:Be(()=>[Ge(a,{modelValue:d.curTab,"onUpdate:modelValue":t[0]||(t[0]=o=>d.curTab=o),"fixed-tabs":""},{default:Be(()=>[(ct(!0),an(fi,null,To(u.tabs,(o,c)=>(ct(),jt(v,{key:c,to:o.path},{default:Be(()=>[Nt(Cn(o.displayName),1)]),_:2},1032,["to"]))),128))]),_:1},8,["modelValue"]),Ge(g)]),_:1})])}const iL=co(nL,[["render",rL]]);function Yd(n){let[t,e]=n;return[t,e]}function Nb(n,t){let e=n,r=t,d=e.length,u=r.length;if(d===0||u===0)return 0;d>u?e=e.substring(d-u):d<u&&(r=r.substring(0,d));let f=Math.min(d,u);if(e===r)return f;let v=0,a=1;for(let g=0;g!==-1;){let i=e.substring(f-a);if(g=r.indexOf(i),g===-1)return v;a+=g,(g===0||e.substring(f-a)===r.substring(0,a))&&(v=a,a++)}return v}function Xd(n,t){if(!n||!t||n[0]!==t[0])return 0;let e=0,r=Math.min(n.length,t.length),d=r,u=0;for(;e<d;)n.substring(u,d)===t.substring(u,d)?(e=d,u=e):r=d,d=Math.floor((r-e)/2+e);return d}function Uc(n,t){if(!n||!t||n[n.length-1]!==t[t.length-1])return 0;let e=0,r=Math.min(n.length,t.length),d=r,u=0;for(;e<d;)n.substring(n.length-d,n.length-u)===t.substring(t.length-d,t.length-u)?(e=d,u=e):r=d,d=Math.floor((r-e)/2+e);return d}function oL(n){let t=n.charCodeAt(0);return t>=55296&&t<=56319}function sL(n){let t=n.charCodeAt(0);return t>=56320&&t<=57343}function aL(n,t,e){let r=n.length,d=t.length,u=Math.ceil((r+d)/2),f=u,v=2*u,a=Array(v),g=Array(v);for(let m=0;m<v;m++)a[m]=-1,g[m]=-1;a[f+1]=0,g[f+1]=0;let i=r-d,o=i%2!=0,c=0,p=0,s=0,h=0;for(let m=0;m<u&&!(Date.now()>e);m++){for(let y=-m+c;y<=m-p;y+=2){let x=f+y,T;T=y===-m||y!==m&&a[x-1]<a[x+1]?a[x+1]:a[x-1]+1;let S=T-y;for(;T<r&&S<d&&n.charAt(T)===t.charAt(S);)T++,S++;if(a[x]=T,T>r)p+=2;else if(S>d)c+=2;else if(o){let _=f+i-y;if(_>=0&&_<v&&g[_]!==-1){let C=r-g[_];if(T>=C)return Db(n,t,T,S,e)}}}for(let y=-m+s;y<=m-h;y+=2){let x=f+y,T;T=y===-m||y!==m&&g[x-1]<g[x+1]?g[x+1]:g[x-1]+1;let S=T-y;for(;T<r&&S<d&&n.charAt(r-T-1)===t.charAt(d-S-1);)T++,S++;if(g[x]=T,T>r)h+=2;else if(S>d)s+=2;else if(!o){let _=f+i-y;if(_>=0&&_<v&&a[_]!==-1){let C=a[_],L=f+C-_;if(T=r-T,C>=T)return Db(n,t,C,L,e)}}}}return[[Na,n],[Da,t]]}function Db(n,t,e,r,d){let u=n.substring(0,e),f=t.substring(0,r),v=n.substring(e),a=t.substring(r),g=Us(u,f,{checkLines:!1,deadline:d}),i=Us(v,a,{checkLines:!1,deadline:d});return g.concat(i)}function lL(n,t,e=1){if(e<=0)return null;let r=n.length>t.length?n:t,d=n.length>t.length?t:n;if(r.length<4||d.length*2<r.length)return null;let u=Pb(r,d,Math.ceil(r.length/4)),f=Pb(r,d,Math.ceil(r.length/2)),v;if(u&&f)v=u[4].length>f[4].length?u:f;else{if(!u&&!f)return null;f?u||(v=f):v=u}if(!v)throw Error("Unable to find a half match.");let a,g,i,o;n.length>t.length?(a=v[0],g=v[1],i=v[2],o=v[3]):(i=v[0],o=v[1],a=v[2],g=v[3]);let c=v[4];return[a,g,i,o,c]}function Pb(n,t,e){let r=n.slice(e,e+Math.floor(n.length/4)),d=-1,u="",f,v,a,g;for(;(d=t.indexOf(r,d+1))!==-1;){let i=Xd(n.slice(e),t.slice(d)),o=Uc(n.slice(0,e),t.slice(0,d));u.length<o+i&&(u=t.slice(d-o,d)+t.slice(d,d+i),f=n.slice(0,e-o),v=n.slice(e+i),a=t.slice(0,d-o),g=t.slice(d+i))}return u.length*2>=n.length?[f||"",v||"",a||"",g||"",u||""]:null}function cL(n,t){for(let e=0;e<n.length;e++){let r=n[e][1],d=[];for(let u=0;u<r.length;u++)d[u]=t[r.charCodeAt(u)];n[e][1]=d.join("")}}function uL(n,t){let e=[],r={};e[0]="";function d(v){let a="",g=0,i=-1,o=e.length;for(;i<v.length-1;){i=v.indexOf(`
1489
+ `,g),i===-1&&(i=v.length-1);let c=v.slice(g,i+1);(r.hasOwnProperty?r.hasOwnProperty(c):r[c]!==void 0)?a+=String.fromCharCode(r[c]):(o===u&&(c=v.slice(g),i=v.length),a+=String.fromCharCode(o),r[c]=o,e[o++]=c),g=i+1}return a}let u=4e4,f=d(n);return u=65535,{chars1:f,chars2:d(t),lineArray:e}}function hL(n,t,e){let r=n,d=t,u=uL(r,d);r=u.chars1,d=u.chars2;let f=u.lineArray,v=Us(r,d,{checkLines:!1,deadline:e.deadline});cL(v,f),v=Bb(v),v.push([Vc,""]);let a=0,g=0,i=0,o="",c="";for(;a<v.length;){switch(v[a][0]){case Da:i++,c+=v[a][1];break;case Na:g++,o+=v[a][1];break;case Vc:if(g>=1&&i>=1){v.splice(a-g-i,g+i),a=a-g-i;let p=Us(o,c,{checkLines:!1,deadline:e.deadline});for(let s=p.length-1;s>=0;s--)v.splice(a,0,p[s]);a+=p.length}i=0,g=0,o="",c="";break;default:throw Error("Unknown diff operation.")}a++}return v.pop(),v}function dL(n,t,e){let r;if(!n)return[[Da,t]];if(!t)return[[Na,n]];let d=n.length>t.length?n:t,u=n.length>t.length?t:n,f=d.indexOf(u);if(f!==-1)return r=[[Da,d.substring(0,f)],[Vc,u],[Da,d.substring(f+u.length)]],n.length>t.length&&(r[0][0]=Na,r[2][0]=Na),r;if(u.length===1)return[[Na,n],[Da,t]];let v=lL(n,t);if(v){let a=v[0],g=v[1],i=v[2],o=v[3],c=v[4],p=Us(a,i,e),s=Us(g,o,e);return p.concat([[Vc,c]],s)}return e.checkLines&&n.length>100&&t.length>100?hL(n,t,e):aL(n,t,e.deadline)}var fL=Object.defineProperty,Fb=Object.getOwnPropertySymbols,pL=Object.prototype.hasOwnProperty,gL=Object.prototype.propertyIsEnumerable,zb=(n,t,e)=>t in n?fL(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,mL=(n,t)=>{for(var e in t||={})pL.call(t,e)&&zb(n,e,t[e]);if(Fb)for(var e of Fb(t))gL.call(t,e)&&zb(n,e,t[e]);return n};const Na=-1,Da=1,Vc=0;function vL(n,t,e){if(n===null||t===null)throw Error("Null input. (diff)");let r=Us(n,t,bL({}));return xL(r),r}function Us(n,t,e){let r=n,d=t;if(r===d)return r?[[0,r]]:[];let u=Xd(r,d),f=r.substring(0,u);r=r.substring(u),d=d.substring(u),u=Uc(r,d);let v=r.substring(r.length-u);r=r.substring(0,r.length-u),d=d.substring(0,d.length-u);let a=dL(r,d,e);return f&&a.unshift([0,f]),v&&a.push([0,v]),a=Jd(a),a}function yL(n){let t=1;return typeof n<"u"&&(t=n<=0?Number.MAX_VALUE:n),Date.now()+t*1e3}function bL(n){return mL({checkLines:!0,deadline:yL(n.timeout||1)},n)}function Gc(n,t,e){return e===1?n+t:t+n}function qc(n,t){return t===1?[n.substring(0,n.length-1),n[n.length-1]]:[n.substring(1),n[0]]}function wL(n,t,e,r){return r===1?n[t][1][n[t][1].length-1]===n[e][1][n[e][1].length-1]:n[t][1][0]===n[e][1][0]}function jb(n,t,e){let r=e===1?-1:1,d=null,u=null,f=t+e;for(;f>=0&&f<n.length&&(d===null||u===null);f+=e){let[g,i]=n[f];if(i.length!==0){if(g===1){d===null&&(d=f);continue}else if(g===-1){u===null&&(u=f);continue}else if(g===0){if(d===null&&u===null){let[o,c]=qc(n[t][1],e);n[t][1]=o,n[f][1]=Gc(n[f][1],c,r);return}break}}}if(d!==null&&u!==null&&wL(n,d,u,e)){let[g,i]=qc(n[d][1],r),[o]=qc(n[u][1],r);n[d][1]=g,n[u][1]=o,n[t][1]=Gc(n[t][1],i,e);return}let[v,a]=qc(n[t][1],e);n[t][1]=v,d===null?(n.splice(f,0,[1,a]),u!==null&&u>=f&&u++):n[d][1]=Gc(n[d][1],a,r),u===null?n.splice(f,0,[-1,a]):n[u][1]=Gc(n[u][1],a,r)}function xL(n){for(let t=0;t<n.length;t++){let[e,r]=n[t];if(r.length===0)continue;let d=r[0],u=r[r.length-1];oL(u)&&e===0&&jb(n,t,1),sL(d)&&e===0&&jb(n,t,-1)}for(let t=0;t<n.length;t++)n[t][1].length===0&&n.splice(t,1)}function Bb(n){let t=n.map(o=>Yd(o)),e=!1,r=[],d=0,u=null,f=0,v=0,a=0,g=0,i=0;for(;f<t.length;)t[f][0]===0?(r[d++]=f,v=g,a=i,g=0,i=0,u=t[f][1]):(t[f][0]===1?g+=t[f][1].length:i+=t[f][1].length,u&&u.length<=Math.max(v,a)&&u.length<=Math.max(g,i)&&(t.splice(r[d-1],0,[-1,u]),t[r[d-1]+1][0]=1,d--,d--,f=d>0?r[d-1]:-1,v=0,a=0,g=0,i=0,u=null,e=!0)),f++;for(e&&(t=Jd(t)),t=AL(t),f=1;f<t.length;){if(t[f-1][0]===-1&&t[f][0]===1){let o=t[f-1][1],c=t[f][1],p=Nb(o,c),s=Nb(c,o);p>=s?(p>=o.length/2||p>=c.length/2)&&(t.splice(f,0,[0,c.substring(0,p)]),t[f-1][1]=o.substring(0,o.length-p),t[f+1][1]=c.substring(p),f++):(s>=o.length/2||s>=c.length/2)&&(t.splice(f,0,[0,o.substring(0,s)]),t[f-1][0]=1,t[f-1][1]=c.substring(0,c.length-s),t[f+1][0]=-1,t[f+1][1]=o.substring(s),f++),f++}f++}return t}const Wb=/[^a-zA-Z0-9]/,Hb=/\s/,Ub=/[\r\n]/,CL=/\n\r?\n$/,_L=/^\r?\n\r?\n/;function AL(n){let t=n.map(d=>Yd(d));function e(d,u){if(!d||!u)return 6;let f=d.charAt(d.length-1),v=u.charAt(0),a=f.match(Wb),g=v.match(Wb),i=a&&f.match(Hb),o=g&&v.match(Hb),c=i&&f.match(Ub),p=o&&v.match(Ub),s=c&&d.match(CL),h=p&&u.match(_L);return s||h?5:c||p?4:a&&!i&&o?3:i||o?2:a||g?1:0}let r=1;for(;r<t.length-1;){if(t[r-1][0]===0&&t[r+1][0]===0){let d=t[r-1][1],u=t[r][1],f=t[r+1][1],v=Uc(d,u);if(v){let c=u.substring(u.length-v);d=d.substring(0,d.length-v),u=c+u.substring(0,u.length-v),f=c+f}let a=d,g=u,i=f,o=e(d,u)+e(u,f);for(;u.charAt(0)===f.charAt(0);){d+=u.charAt(0),u=u.substring(1)+f.charAt(0),f=f.substring(1);let c=e(d,u)+e(u,f);c>=o&&(o=c,a=d,g=u,i=f)}t[r-1][1]!==a&&(a?t[r-1][1]=a:(t.splice(r-1,1),r--),t[r][1]=g,i?t[r+1][1]=i:(t.splice(r+1,1),r--))}r++}return t}function Jd(n){let t=n.map(g=>Yd(g));t.push([0,""]);let e=0,r=0,d=0,u="",f="",v;for(;e<t.length;)switch(t[e][0]){case 1:d++,f+=t[e][1],e++;break;case-1:r++,u+=t[e][1],e++;break;case 0:r+d>1?(r!==0&&d!==0&&(v=Xd(f,u),v!==0&&(e-r-d>0&&t[e-r-d-1][0]===0?t[e-r-d-1][1]+=f.substring(0,v):(t.splice(0,0,[0,f.substring(0,v)]),e++),f=f.substring(v),u=u.substring(v)),v=Uc(f,u),v!==0&&(t[e][1]=f.substring(f.length-v)+t[e][1],f=f.substring(0,f.length-v),u=u.substring(0,u.length-v))),e-=r+d,t.splice(e,r+d),u.length&&(t.splice(e,0,[-1,u]),e++),f.length&&(t.splice(e,0,[1,f]),e++),e++):e!==0&&t[e-1][0]===0?(t[e-1][1]+=t[e][1],t.splice(e,1)):e++,d=0,r=0,u="",f="";break;default:throw Error("Unknown diff operation")}t[t.length-1][1]===""&&t.pop();let a=!1;for(e=1;e<t.length-1;)t[e-1][0]===0&&t[e+1][0]===0&&(t[e][1].substring(t[e][1].length-t[e-1][1].length)===t[e-1][1]?(t[e][1]=t[e-1][1]+t[e][1].substring(0,t[e][1].length-t[e-1][1].length),t[e+1][1]=t[e-1][1]+t[e+1][1],t.splice(e-1,1),a=!0):t[e][1].substring(0,t[e+1][1].length)===t[e+1][1]&&(t[e-1][1]+=t[e+1][1],t[e][1]=t[e][1].substring(t[e+1][1].length)+t[e+1][1],t.splice(e+1,1),a=!0)),e++;return a&&(t=Jd(t)),t}function Vb(n,t,e=!1){let r=null,d=!0;return function(...u){let f=e&&d,v=()=>{n.apply(this,u),r=null};f&&(d=!1,v()),r||=setTimeout(v,t)}}function kL(n,t){let e;return function(...r){clearTimeout(e),e=setTimeout(()=>n.apply(this,r),t)}}function Gb(n=""){return(n??"").replace(/\r\n/g,`
1490
+ `)}function qb(n,t,e,r){let d=n+(e-n)/2;return`M ${n} ${t} C ${d},${t} ${d},${r} ${e},${r}`}const Pa="right",Vs="left",SL="specific",$L="broad";var Kb={SVG_NS:"http://www.w3.org/2000/svg"};function Yb(n,t){let{mode:e}=n.options;return t===Vs&&n.options.left.mode!==null&&(e=n.options.left.mode??e),t===Pa&&n.options.right.mode!==null&&(e=n.options.right.mode??e),e}function Xb(n,t){let{theme:e}=n.options;return t===Vs&&n.options.left.theme!==null&&(e=n.options.left.theme??e),t===Pa&&n.options.right.theme!==null&&(e=n.options.right.theme??e),e}function EL(n,t){return n.ace.getSession().doc.getLine(t)}function TL(n){let t=n.options.left.id;return t?document.getElementById(t)?.offsetHeight??0:0}function Jb(n){let t=document.createElement("div"),e={class:n.className,style:`top:${n.topOffset}px`,title:n.tooltip,"data-diff-index":n.diffIndex};for(let r in e)t.setAttribute(r,String(e[r]));return t.innerHTML=n.arrowContent,t}function Zd(n,t){let e=`js-${t}-${Math.random().toString(36).substr(2,5)}`,r=n.querySelector(`.${t}`);if(r)return r.id=r.id||e,r.id;let d=document.createElement("div");return n.appendChild(d),d.className=t,d.id=e,d.id}function Zb(n,t,e,r){let d=n==="document"?document:document.querySelector(n);d&&d.addEventListener(t,u=>{let f=d.querySelectorAll(e),v=u.target;for(let a=0,g=f.length;a<g;a+=1){let i=v,o=f[a];for(;i&&i!==d;)i===o&&r.call(o,u),i=i.parentNode}})}let Gs=null;function RL(n){if(n.Range)return n.Range;let t=n.acequire||n.require;return t?t("ace/range"):!1}const IL={ace:void 0,mode:null,theme:null,element:null,diffGranularity:$L,lockScrolling:!0,showDiffs:!0,showConnectors:!0,charDiffs:!0,maxDiffs:5e3,left:{id:null,content:null,mode:null,theme:null,editable:!0,copyLinkEnabled:!0},right:{id:null,content:null,mode:null,theme:null,editable:!0,copyLinkEnabled:!0},classes:{gutterID:"acediff__gutter",diff:"acediff__diffLine",diffChar:"acediff__diffChar",diffGutter:"acediff__diffGutter",connector:"acediff__connector",newCodeConnectorLink:"acediff__newCodeConnector",newCodeConnectorLinkContent:"&#8594;",deletedCodeConnectorLink:"acediff__deletedCodeConnector",deletedCodeConnectorLinkContent:"&#8592;",copyRightContainer:"acediff__copy--right",copyLeftContainer:"acediff__copy--left"},connectorYOffset:0,onDiffReady:null};var ML=class{options;el;editors;diffs=[];lineHeight=0;gutterSVG=null;gutterWidth=0;gutterHeight=0;copyLeftContainer=null;copyRightContainer=null;connectorYOffset=0;removeEventHandlers=null;constructor(n={}){let t=JSON.parse(JSON.stringify(IL));this.options={...t,...n,left:{...t.left,...n.left},right:{...t.right,...n.right},classes:{...t.classes,...n.classes}};let e=()=>typeof window<"u"?window.ace:void 0;this.options.ace||(this.options.ace=e());let{ace:r}=this.options;if(!r){let u="No ace editor found nor supplied - `options.ace` or `window.ace` is missing";throw console.error(u),Error(u)}let d=RL(r);if(!d){let u="Could not require Range module for Ace. Depends on your bundling strategy, but it usually comes with Ace itself. See https://ace.c9.io/api/range.html, open an issue on GitHub ace-diff/ace-diff";throw console.error(u),Error(u)}if(Gs=d,this.options.element===null){let u="You need to specify an element for Ace-diff - `options.element` is missing";throw console.error(u),Error(u)}if(this.options.element instanceof HTMLElement)this.el=this.options.element;else{let u=document.body.querySelector(this.options.element);if(!u){let f=`Can't find the specified element ${this.options.element}`;throw console.error(f),Error(f)}this.el=u}this.options.left.id=Zd(this.el,"acediff__left"),this.options.classes.gutterID=Zd(this.el,"acediff__gutter"),this.options.right.id=Zd(this.el,"acediff__right"),this.el.innerHTML=`<div class="acediff acediff__wrap">${this.el.innerHTML}</div>`,this.editors={left:{ace:r.edit(this.options.left.id),markers:[],lineLengths:[],diffGutters:[]},right:{ace:r.edit(this.options.right.id),markers:[],lineLengths:[],diffGutters:[]},editorHeight:null},this.editors.left.ace.getSession().setMode(Yb(this,Vs)??""),this.editors.right.ace.getSession().setMode(Yb(this,Pa)??""),this.editors.left.ace.setReadOnly(!this.options.left.editable),this.editors.right.ace.setReadOnly(!this.options.right.editable),this.editors.left.ace.setShowFoldWidgets(!1),this.editors.right.ace.setShowFoldWidgets(!1),this.editors.left.ace.setTheme(Xb(this,Vs)??""),this.editors.right.ace.setTheme(Xb(this,Pa)??""),this.editors.left.ace.setValue(Gb(this.options.left.content??null),-1),this.editors.right.ace.setValue(Gb(this.options.right.content??null),-1),this.editors.editorHeight=TL(this),setTimeout(()=>{this.lineHeight=this.editors.left.ace.renderer.lineHeight,this.addEventHandlers(),this.createCopyContainers(),this.createGutter(),this.diff()},1)}setOptions(n){this.options={...this.options,...n,left:{...this.options.left,...n.left},right:{...this.options.right,...n.right},classes:{...this.options.classes,...n.classes}},this.diff()}getNumDiffs(){return this.diffs.length}getEditors(){return{left:this.editors.left.ace,right:this.editors.right.ace}}diff(){let n=this.editors.left.ace.getSession().getValue(),t=Bb(vL(this.editors.right.ace.getSession().getValue(),n));this.editors.left.lineLengths=this.getLineLengths(this.editors.left),this.editors.right.lineLengths=this.getLineLengths(this.editors.right);let e=[],r={left:0,right:0};t.forEach(d=>{let u=d[0],f=d[1];f.length!==0&&(u===0?(r.left+=f.length,r.right+=f.length):u===-1?(e.push(this.computeDiff(-1,r.left,r.right,f)),r.right+=f.length):u===1&&(e.push(this.computeDiff(1,r.left,r.right,f)),r.left+=f.length))}),this.diffs=this.simplifyDiffs(e),!(this.diffs.length>this.options.maxDiffs)&&(this.clearDiffs(),this.decorate(),typeof this.options.onDiffReady=="function"&&this.options.onDiffReady(this.diffs))}clear(){this.clearDiffs(),this.clearGutter(),this.clearArrows()}destroy(){let n=this.editors.left.ace.getValue();this.editors.left.ace.destroy();let t=this.editors.left.ace.container,e=t.cloneNode(!1);e.textContent=n,t.parentNode?.replaceChild(e,t);let r=this.editors.right.ace.getValue();this.editors.right.ace.destroy(),t=this.editors.right.ace.container,e=t.cloneNode(!1),e.textContent=r,t.parentNode?.replaceChild(e,t);let d=document.getElementById(this.options.classes.gutterID);d&&(d.innerHTML=""),this.removeEventHandlers?.()}addEventHandlers(){let n=!1,t=(d,u)=>{if(!this.options.lockScrolling||n)return;let f=d.ace.getSession(),v=u.ace.getSession(),a=f.getScrollTop(),g=f.getLength()*this.lineHeight,i=d.ace.renderer.$size.scrollerHeight,o=Math.max(0,g-i),c=o>0?a/o:0,p=v.getLength()*this.lineHeight,s=u.ace.renderer.$size.scrollerHeight,h=c*Math.max(0,p-s);n=!0,v.setScrollTop(h),n=!1};this.editors.left.ace.getSession().on("changeScrollTop",Vb(()=>{t(this.editors.left,this.editors.right),this.updateGap()},16)),this.editors.right.ace.getSession().on("changeScrollTop",Vb(()=>{t(this.editors.right,this.editors.left),this.updateGap()},16));let e=this.diff.bind(this);this.editors.left.ace.on("change",e),this.editors.right.ace.on("change",e),this.options.left.copyLinkEnabled&&Zb(`#${this.options.classes.gutterID}`,"click",`.${this.options.classes.newCodeConnectorLink}`,d=>this.copy(d,"ltr")),this.options.right.copyLinkEnabled&&Zb(`#${this.options.classes.gutterID}`,"click",`.${this.options.classes.deletedCodeConnectorLink}`,d=>this.copy(d,"rtl"));let r=kL(()=>{let d=document.getElementById(this.options.left.id);d&&(this.editors.availableHeight=d.offsetHeight),this.diff()},250);window.addEventListener("resize",r),this.removeEventHandlers=()=>{window.removeEventListener("resize",r)}}copy(n,t){let e=n.target,r=parseInt(e.getAttribute("data-diff-index")??"0",10),d=this.diffs[r];if(!d||t==="ltr"&&!this.options.right.editable||t==="rtl"&&!this.options.left.editable)return;let u,f,v,a,g,i;t==="ltr"?(u=this.editors.left,f=this.editors.right,v=d.leftStartOffset,a=d.leftEndOffset,g=d.rightStartOffset,i=d.rightEndOffset):(u=this.editors.right,f=this.editors.left,v=d.rightStartOffset,a=d.rightEndOffset,g=d.leftStartOffset,i=d.leftEndOffset);let o=u.ace.getValue().substring(v,a),c=f.ace.getSession().doc,p=c.indexToPosition(g,0),s=c.indexToPosition(i,0),h=f.ace.getSession().getScrollTop();Gs&&f.ace.getSession().replace(new Gs(p.row,p.column,s.row,s.column),o),f.ace.getSession().setScrollTop(parseInt(String(h),10)),this.diff()}getLineLengths(n){return n.ace.getSession().doc.getAllLines().map(t=>t.length+1)}showDiff(n,t,e,r,d){let u=this.editors[n],f=e;f<t&&(f=t);let v=`${d} ${f>t?"lines":"targetOnly"} ${n}`,a=f;if(a>t&&--a,Gs&&u.markers.push(u.ace.session.addMarker(new Gs(t,0,a,1),v,"fullLine")),this.options.charDiffs&&r&&r.length>0){let i=`${this.options.classes.diffChar} ${n}`;r.forEach(o=>{Gs&&u.markers.push(u.ace.session.addMarker(new Gs(o.lineStart,o.start,o.lineEnd-1,o.end),i,"text"))})}let g=`${this.options.classes.diffGutter} ${n}`;for(let i=t;i<f;i+=1)u.ace.session.addGutterDecoration(i,g),u.diffGutters.push({line:i,className:g})}updateGap(){this.clearDiffs(),this.decorate(),this.positionCopyContainers()}clearDiffs(){this.editors.left.markers.forEach(n=>{this.editors.left.ace.getSession().removeMarker(n)}),this.editors.right.markers.forEach(n=>{this.editors.right.ace.getSession().removeMarker(n)}),this.editors.left.markers=[],this.editors.right.markers=[],this.editors.left.diffGutters.forEach(n=>{this.editors.left.ace.session.removeGutterDecoration(n.line,n.className)}),this.editors.right.diffGutters.forEach(n=>{this.editors.right.ace.session.removeGutterDecoration(n.line,n.className)}),this.editors.left.diffGutters=[],this.editors.right.diffGutters=[]}addConnector(n,t,e,r){let d=this.editors.left.ace.getSession().getScrollTop(),u=this.editors.right.ace.getSession().getScrollTop();this.connectorYOffset=1;let f=n*this.lineHeight-d+.5,v=this.gutterWidth+1,a=e*this.lineHeight-u+.5,g=t*this.lineHeight-d+this.connectorYOffset+.5,i=this.gutterWidth+1,o=r*this.lineHeight-u+this.connectorYOffset+.5,c=qb(-1,f,v,a),p=qb(i,o,-1,g),s=`${c} ${`L${v},${a} ${i},${o}`} ${p} ${`L-1,${g} -1,${f}`}`,h=document.createElementNS(Kb.SVG_NS,"path");h.setAttribute("d",s),h.setAttribute("class",this.options.classes.connector??""),this.gutterSVG?.appendChild(h)}addCopyArrows(n,t){if(n.leftEndLine>n.leftStartLine&&this.options.left.copyLinkEnabled&&this.options.right.editable){let e=Jb({className:this.options.classes.newCodeConnectorLink??"",topOffset:n.leftStartLine*this.lineHeight,tooltip:"Copy to right",diffIndex:t,arrowContent:this.options.classes.newCodeConnectorLinkContent??""});this.copyRightContainer?.appendChild(e)}if(n.rightEndLine>n.rightStartLine&&this.options.right.copyLinkEnabled&&this.options.left.editable){let e=Jb({className:this.options.classes.deletedCodeConnectorLink??"",topOffset:n.rightStartLine*this.lineHeight,tooltip:"Copy to left",diffIndex:t,arrowContent:this.options.classes.deletedCodeConnectorLinkContent??""});this.copyLeftContainer?.appendChild(e)}}positionCopyContainers(){let n=this.editors.left.ace.getSession().getScrollTop(),t=this.editors.right.ace.getSession().getScrollTop();this.copyRightContainer&&(this.copyRightContainer.style.cssText=`top: ${-n}px`),this.copyLeftContainer&&(this.copyLeftContainer.style.cssText=`top: ${-t}px`)}computeDiff(n,t,e,r){let d={};if(n===1){let u=this.getSingleDiffInfo(this.editors.left,t,r),f=this.getLineForCharPosition(this.editors.right,e),v=this.getCharsOnLine(this.editors.right,f),a=this.getCharsOnLine(this.editors.left,u.startLine),g=f,i=u.startLine===u.endLine,o=0;(u.startChar>0||i&&r.length<a)&&v>0&&u.startChar<a&&o++,d={leftStartLine:u.startLine,leftEndLine:u.endLine+1,rightStartLine:g,rightEndLine:g+o,leftStartOffset:t,leftEndOffset:t+r.length,rightStartOffset:e,rightEndOffset:e,leftStartChar:u.startChar,leftEndChar:u.endChar}}else{let u=this.getSingleDiffInfo(this.editors.right,e,r),f=this.getLineForCharPosition(this.editors.left,t),v=this.getCharsOnLine(this.editors.left,f),a=this.getCharsOnLine(this.editors.right,u.startLine),g=f,i=u.startLine===u.endLine,o=0;(u.startChar>0||i&&r.length<a)&&v>0&&u.startChar<a&&o++,d={leftStartLine:g,leftEndLine:g+o,rightStartLine:u.startLine,rightEndLine:u.endLine+1,leftStartOffset:t,leftEndOffset:t,rightStartOffset:e,rightEndOffset:e+r.length,rightStartChar:u.startChar,rightEndChar:u.endChar}}return d}getSingleDiffInfo(n,t,e){let r={startLine:0,startChar:0,endLine:0,endChar:0},d=t+e.length,u=0,f=!1,v=!1;n.lineLengths.forEach((g,i)=>{u+=g,!f&&t<u&&(r.startLine=i,r.startChar=t-u+g,f=!0),!v&&d<=u&&(r.endLine=i,r.endChar=d-u+g,v=!0)}),r.startChar>0&&this.getCharsOnLine(n,r.startLine)===r.startChar&&(r.startLine++,r.startChar=0),r.endChar===0&&r.endLine--;let a=/\n$/.test(e);return r.startChar>0&&a&&r.endLine++,r}getCharsOnLine(n,t){return EL(n,t).length}getLineForCharPosition(n,t){let e=n.ace.getSession().doc.getAllLines(),r=0,d=0;for(let u=0;u<e.length;u+=1){let f=e[u];if(f!==void 0&&(d+=f.length+1),t<=d){r=u,t===d&&u<e.length-1&&(r+=1);break}}return d>=n.ace.getSession().getValue().length&&(r+=1),r}createGutter(){let n=document.getElementById(this.options.classes.gutterID);if(!n)return;this.gutterHeight=n.clientHeight,this.gutterWidth=n.clientWidth;let t=this.getTotalHeight(Vs),e=this.getTotalHeight(Pa),r=Math.max(t,e,this.gutterHeight);this.gutterSVG=document.createElementNS(Kb.SVG_NS,"svg"),this.gutterSVG.setAttribute("width",String(this.gutterWidth)),this.gutterSVG.setAttribute("height",String(r)),n.appendChild(this.gutterSVG)}getTotalHeight(n){return(n===Vs?this.editors.left:this.editors.right).ace.getSession().getLength()*this.lineHeight}createCopyContainers(){this.copyRightContainer=document.createElement("div"),this.copyRightContainer.setAttribute("class",this.options.classes.copyRightContainer??""),this.copyLeftContainer=document.createElement("div"),this.copyLeftContainer.setAttribute("class",this.options.classes.copyLeftContainer??"");let n=document.getElementById(this.options.classes.gutterID);n&&(n.appendChild(this.copyRightContainer),n.appendChild(this.copyLeftContainer))}clearGutter(){let n=document.getElementById(this.options.classes.gutterID);n&&this.gutterSVG&&n.removeChild(this.gutterSVG),this.createGutter()}clearArrows(){this.copyLeftContainer&&(this.copyLeftContainer.innerHTML=""),this.copyRightContainer&&(this.copyRightContainer.innerHTML="")}simplifyDiffs(n){let t=[],e=d=>this.options.diffGranularity===SL?d<1:d<=1,r=d=>{let u={...d,leftChars:[],rightChars:[]};return d.leftEndChar!==void 0&&u.leftChars.push({start:d.leftStartChar??0,end:d.leftEndChar,lineStart:d.leftStartLine??0,lineEnd:d.leftEndLine??0}),d.rightEndChar!==void 0&&u.rightChars.push({start:d.rightStartChar??0,end:d.rightEndChar,lineStart:d.rightStartLine??0,lineEnd:d.rightEndLine??0}),u};return n.forEach((d,u)=>{if(u===0){t.push(r(d));return}let f=!1;for(let v=0;v<t.length;v+=1)if(e(Math.abs(d.leftStartLine-t[v].leftEndLine))&&e(Math.abs(d.rightStartLine-t[v].rightEndLine))){t[v].leftStartLine=Math.min(d.leftStartLine,t[v].leftStartLine),t[v].rightStartLine=Math.min(d.rightStartLine,t[v].rightStartLine),t[v].leftEndLine=Math.max(d.leftEndLine,t[v].leftEndLine),t[v].rightEndLine=Math.max(d.rightEndLine,t[v].rightEndLine),t[v].leftStartOffset=Math.min(d.leftStartOffset,t[v].leftStartOffset),t[v].leftEndOffset=Math.max(d.leftEndOffset,t[v].leftEndOffset),t[v].rightStartOffset=Math.min(d.rightStartOffset,t[v].rightStartOffset),t[v].rightEndOffset=Math.max(d.rightEndOffset,t[v].rightEndOffset),d.leftEndChar!==void 0&&t[v].leftChars.push({start:d.leftStartChar??0,end:d.leftEndChar,lineStart:d.leftStartLine,lineEnd:d.leftEndLine}),d.rightEndChar!==void 0&&t[v].rightChars.push({start:d.rightStartChar??0,end:d.rightEndChar,lineStart:d.rightStartLine,lineEnd:d.rightEndLine}),f=!0;break}f||t.push(r(d))}),t.filter(d=>!(d.leftStartLine===d.leftEndLine&&d.rightStartLine===d.rightEndLine))}decorate(){this.clearGutter(),this.clearArrows(),this.diffs.forEach((n,t)=>{this.options.showDiffs&&(this.showDiff(Vs,n.leftStartLine,n.leftEndLine,n.leftChars,this.options.classes.diff??""),this.showDiff(Pa,n.rightStartLine,n.rightEndLine,n.rightChars,this.options.classes.diff??""),this.options.showConnectors&&this.addConnector(n.leftStartLine,n.leftEndLine,n.rightStartLine,n.rightEndLine),this.addCopyArrows(n,t))})}},Qd={exports:{}},ef,Qb;function Sl(){if(Qb)return ef;Qb=1;const n="2.0.0",t=256,e=Number.MAX_SAFE_INTEGER||9007199254740991,r=16,d=t-6;return ef={MAX_LENGTH:t,MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:d,MAX_SAFE_INTEGER:e,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:n,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},ef}var ew,tw;function Kc(){return tw||(tw=1,ew=typeof process=="object"&&qd&&qd.NODE_DEBUG&&/\bsemver\b/i.test(qd.NODE_DEBUG)?(...n)=>console.error("SEMVER",...n):()=>{}),ew}var nw;function $l(){return nw||(nw=1,(function(n,t){const{MAX_SAFE_COMPONENT_LENGTH:e,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:d}=Sl(),u=Kc();t=n.exports={};const f=t.re=[],v=t.safeRe=[],a=t.src=[],g=t.safeSrc=[],i=t.t={};let o=0;const c="[a-zA-Z0-9-]",p=[["\\s",1],["\\d",d],[c,r]],s=m=>{for(const[y,x]of p)m=m.split(`${y}*`).join(`${y}{0,${x}}`).split(`${y}+`).join(`${y}{1,${x}}`);return m},h=(m,y,x)=>{const T=s(y),S=o++;u(m,S,y),i[m]=S,a[S]=y,g[S]=T,f[S]=new RegExp(y,x?"g":void 0),v[S]=new RegExp(T,x?"g":void 0)};h("NUMERICIDENTIFIER","0|[1-9]\\d*"),h("NUMERICIDENTIFIERLOOSE","\\d+"),h("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${c}*`),h("MAINVERSION",`(${a[i.NUMERICIDENTIFIER]})\\.(${a[i.NUMERICIDENTIFIER]})\\.(${a[i.NUMERICIDENTIFIER]})`),h("MAINVERSIONLOOSE",`(${a[i.NUMERICIDENTIFIERLOOSE]})\\.(${a[i.NUMERICIDENTIFIERLOOSE]})\\.(${a[i.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASEIDENTIFIER",`(?:${a[i.NONNUMERICIDENTIFIER]}|${a[i.NUMERICIDENTIFIER]})`),h("PRERELEASEIDENTIFIERLOOSE",`(?:${a[i.NONNUMERICIDENTIFIER]}|${a[i.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASE",`(?:-(${a[i.PRERELEASEIDENTIFIER]}(?:\\.${a[i.PRERELEASEIDENTIFIER]})*))`),h("PRERELEASELOOSE",`(?:-?(${a[i.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${a[i.PRERELEASEIDENTIFIERLOOSE]})*))`),h("BUILDIDENTIFIER",`${c}+`),h("BUILD",`(?:\\+(${a[i.BUILDIDENTIFIER]}(?:\\.${a[i.BUILDIDENTIFIER]})*))`),h("FULLPLAIN",`v?${a[i.MAINVERSION]}${a[i.PRERELEASE]}?${a[i.BUILD]}?`),h("FULL",`^${a[i.FULLPLAIN]}$`),h("LOOSEPLAIN",`[v=\\s]*${a[i.MAINVERSIONLOOSE]}${a[i.PRERELEASELOOSE]}?${a[i.BUILD]}?`),h("LOOSE",`^${a[i.LOOSEPLAIN]}$`),h("GTLT","((?:<|>)?=?)"),h("XRANGEIDENTIFIERLOOSE",`${a[i.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h("XRANGEIDENTIFIER",`${a[i.NUMERICIDENTIFIER]}|x|X|\\*`),h("XRANGEPLAIN",`[v=\\s]*(${a[i.XRANGEIDENTIFIER]})(?:\\.(${a[i.XRANGEIDENTIFIER]})(?:\\.(${a[i.XRANGEIDENTIFIER]})(?:${a[i.PRERELEASE]})?${a[i.BUILD]}?)?)?`),h("XRANGEPLAINLOOSE",`[v=\\s]*(${a[i.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[i.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[i.XRANGEIDENTIFIERLOOSE]})(?:${a[i.PRERELEASELOOSE]})?${a[i.BUILD]}?)?)?`),h("XRANGE",`^${a[i.GTLT]}\\s*${a[i.XRANGEPLAIN]}$`),h("XRANGELOOSE",`^${a[i.GTLT]}\\s*${a[i.XRANGEPLAINLOOSE]}$`),h("COERCEPLAIN",`(^|[^\\d])(\\d{1,${e}})(?:\\.(\\d{1,${e}}))?(?:\\.(\\d{1,${e}}))?`),h("COERCE",`${a[i.COERCEPLAIN]}(?:$|[^\\d])`),h("COERCEFULL",a[i.COERCEPLAIN]+`(?:${a[i.PRERELEASE]})?(?:${a[i.BUILD]})?(?:$|[^\\d])`),h("COERCERTL",a[i.COERCE],!0),h("COERCERTLFULL",a[i.COERCEFULL],!0),h("LONETILDE","(?:~>?)"),h("TILDETRIM",`(\\s*)${a[i.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",h("TILDE",`^${a[i.LONETILDE]}${a[i.XRANGEPLAIN]}$`),h("TILDELOOSE",`^${a[i.LONETILDE]}${a[i.XRANGEPLAINLOOSE]}$`),h("LONECARET","(?:\\^)"),h("CARETTRIM",`(\\s*)${a[i.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",h("CARET",`^${a[i.LONECARET]}${a[i.XRANGEPLAIN]}$`),h("CARETLOOSE",`^${a[i.LONECARET]}${a[i.XRANGEPLAINLOOSE]}$`),h("COMPARATORLOOSE",`^${a[i.GTLT]}\\s*(${a[i.LOOSEPLAIN]})$|^$`),h("COMPARATOR",`^${a[i.GTLT]}\\s*(${a[i.FULLPLAIN]})$|^$`),h("COMPARATORTRIM",`(\\s*)${a[i.GTLT]}\\s*(${a[i.LOOSEPLAIN]}|${a[i.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",h("HYPHENRANGE",`^\\s*(${a[i.XRANGEPLAIN]})\\s+-\\s+(${a[i.XRANGEPLAIN]})\\s*$`),h("HYPHENRANGELOOSE",`^\\s*(${a[i.XRANGEPLAINLOOSE]})\\s+-\\s+(${a[i.XRANGEPLAINLOOSE]})\\s*$`),h("STAR","(<|>)?=?\\s*\\*"),h("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),h("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(Qd,Qd.exports)),Qd.exports}var tf,rw;function nf(){if(rw)return tf;rw=1;const n=Object.freeze({loose:!0}),t=Object.freeze({});return tf=e=>e?typeof e!="object"?n:e:t,tf}var rf,iw;function ow(){if(iw)return rf;iw=1;const n=/^[0-9]+$/,t=(e,r)=>{if(typeof e=="number"&&typeof r=="number")return e===r?0:e<r?-1:1;const d=n.test(e),u=n.test(r);return d&&u&&(e=+e,r=+r),e===r?0:d&&!u?-1:u&&!d?1:e<r?-1:1};return rf={compareIdentifiers:t,rcompareIdentifiers:(e,r)=>t(r,e)},rf}var of,sw;function Gr(){if(sw)return of;sw=1;const n=Kc(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:e}=Sl(),{safeRe:r,t:d}=$l(),u=nf(),{compareIdentifiers:f}=ow(),v=(g,i)=>{const o=i.split(".");if(o.length>g.length)return!1;for(let c=0;c<o.length;c++)if(f(g[c],o[c])!==0)return!1;return!0};class a{constructor(i,o){if(o=u(o),i instanceof a){if(i.loose===!!o.loose&&i.includePrerelease===!!o.includePrerelease)return i;i=i.version}else if(typeof i!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof i}".`);if(i.length>t)throw new TypeError(`version is longer than ${t} characters`);n("SemVer",i,o),this.options=o,this.loose=!!o.loose,this.includePrerelease=!!o.includePrerelease;const c=i.trim().match(o.loose?r[d.LOOSE]:r[d.FULL]);if(!c)throw new TypeError(`Invalid Version: ${i}`);if(this.raw=i,this.major=+c[1],this.minor=+c[2],this.patch=+c[3],this.major>e||this.major<0)throw new TypeError("Invalid major version");if(this.minor>e||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>e||this.patch<0)throw new TypeError("Invalid patch version");c[4]?this.prerelease=c[4].split(".").map(p=>{if(/^[0-9]+$/.test(p)){const s=+p;if(s>=0&&s<e)return s}return p}):this.prerelease=[],this.build=c[5]?c[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(i){if(n("SemVer.compare",this.version,this.options,i),!(i instanceof a)){if(typeof i=="string"&&i===this.version)return 0;i=new a(i,this.options)}return i.version===this.version?0:this.compareMain(i)||this.comparePre(i)}compareMain(i){return i instanceof a||(i=new a(i,this.options)),this.major<i.major?-1:this.major>i.major?1:this.minor<i.minor?-1:this.minor>i.minor?1:this.patch<i.patch?-1:this.patch>i.patch?1:0}comparePre(i){if(i instanceof a||(i=new a(i,this.options)),this.prerelease.length&&!i.prerelease.length)return-1;if(!this.prerelease.length&&i.prerelease.length)return 1;if(!this.prerelease.length&&!i.prerelease.length)return 0;let o=0;do{const c=this.prerelease[o],p=i.prerelease[o];if(n("prerelease compare",o,c,p),c===void 0&&p===void 0)return 0;if(p===void 0)return 1;if(c===void 0)return-1;if(c!==p)return f(c,p)}while(++o)}compareBuild(i){i instanceof a||(i=new a(i,this.options));let o=0;do{const c=this.build[o],p=i.build[o];if(n("build compare",o,c,p),c===void 0&&p===void 0)return 0;if(p===void 0)return 1;if(c===void 0)return-1;if(c!==p)return f(c,p)}while(++o)}inc(i,o,c){if(i.startsWith("pre")){if(!o&&c===!1)throw new Error("invalid increment argument: identifier is empty");if(o){const p=`-${o}`.match(this.options.loose?r[d.PRERELEASELOOSE]:r[d.PRERELEASE]);if(!p||p[1]!==o)throw new Error(`invalid identifier: ${o}`)}}switch(i){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",o,c);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",o,c);break;case"prepatch":this.prerelease.length=0,this.inc("patch",o,c),this.inc("pre",o,c);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",o,c),this.inc("pre",o,c);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const p=Number(c)?1:0;if(this.prerelease.length===0)this.prerelease=[p];else{let s=this.prerelease.length;for(;--s>=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);if(s===-1){if(o===this.prerelease.join(".")&&c===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(p)}}if(o){let s=[o,p];if(c===!1&&(s=[o]),v(this.prerelease,o)){const h=this.prerelease[o.split(".").length];isNaN(h)&&(this.prerelease=s)}else this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${i}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return of=a,of}var sf,aw;function qs(){if(aw)return sf;aw=1;const n=Gr();return sf=(t,e,r=!1)=>{if(t instanceof n)return t;try{return new n(t,e)}catch(d){if(!r)return null;throw d}},sf}var af,lw;function LL(){if(lw)return af;lw=1;const n=qs();return af=(t,e)=>{const r=n(t,e);return r?r.version:null},af}var lf,cw;function OL(){if(cw)return lf;cw=1;const n=qs();return lf=(t,e)=>{const r=n(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null},lf}var cf,uw;function NL(){if(uw)return cf;uw=1;const n=Gr();return cf=(t,e,r,d,u)=>{typeof r=="string"&&(u=d,d=r,r=void 0);try{return new n(t instanceof n?t.version:t,r).inc(e,d,u).version}catch{return null}},cf}var uf,hw;function DL(){if(hw)return uf;hw=1;const n=qs();return uf=(t,e)=>{const r=n(t,null,!0),d=n(e,null,!0),u=r.compare(d);if(u===0)return null;const f=u>0,v=f?r:d,a=f?d:r,g=!!v.prerelease.length;if(a.prerelease.length&&!g){if(!a.patch&&!a.minor)return"major";if(a.compareMain(v)===0)return a.minor&&!a.patch?"minor":"patch"}const i=g?"pre":"";return r.major!==d.major?i+"major":r.minor!==d.minor?i+"minor":r.patch!==d.patch?i+"patch":"prerelease"},uf}var hf,dw;function PL(){if(dw)return hf;dw=1;const n=Gr();return hf=(t,e)=>new n(t,e).major,hf}var df,fw;function FL(){if(fw)return df;fw=1;const n=Gr();return df=(t,e)=>new n(t,e).minor,df}var ff,pw;function zL(){if(pw)return ff;pw=1;const n=Gr();return ff=(t,e)=>new n(t,e).patch,ff}var pf,gw;function jL(){if(gw)return pf;gw=1;const n=qs();return pf=(t,e)=>{const r=n(t,e);return r&&r.prerelease.length?r.prerelease:null},pf}var gf,mw;function vo(){if(mw)return gf;mw=1;const n=Gr();return gf=(t,e,r)=>new n(t,r).compare(new n(e,r)),gf}var mf,vw;function BL(){if(vw)return mf;vw=1;const n=vo();return mf=(t,e,r)=>n(e,t,r),mf}var vf,yw;function WL(){if(yw)return vf;yw=1;const n=vo();return vf=(t,e)=>n(t,e,!0),vf}var yf,bw;function bf(){if(bw)return yf;bw=1;const n=Gr();return yf=(t,e,r)=>{const d=new n(t,r),u=new n(e,r);return d.compare(u)||d.compareBuild(u)},yf}var wf,ww;function HL(){if(ww)return wf;ww=1;const n=bf();return wf=(t,e)=>t.sort((r,d)=>n(r,d,e)),wf}var xf,xw;function UL(){if(xw)return xf;xw=1;const n=bf();return xf=(t,e)=>t.sort((r,d)=>n(d,r,e)),xf}var Cf,Cw;function Yc(){if(Cw)return Cf;Cw=1;const n=vo();return Cf=(t,e,r)=>n(t,e,r)>0,Cf}var _f,_w;function Af(){if(_w)return _f;_w=1;const n=vo();return _f=(t,e,r)=>n(t,e,r)<0,_f}var kf,Aw;function kw(){if(Aw)return kf;Aw=1;const n=vo();return kf=(t,e,r)=>n(t,e,r)===0,kf}var Sf,Sw;function $w(){if(Sw)return Sf;Sw=1;const n=vo();return Sf=(t,e,r)=>n(t,e,r)!==0,Sf}var $f,Ew;function Ef(){if(Ew)return $f;Ew=1;const n=vo();return $f=(t,e,r)=>n(t,e,r)>=0,$f}var Tf,Tw;function Rf(){if(Tw)return Tf;Tw=1;const n=vo();return Tf=(t,e,r)=>n(t,e,r)<=0,Tf}var If,Rw;function Iw(){if(Rw)return If;Rw=1;const n=kw(),t=$w(),e=Yc(),r=Ef(),d=Af(),u=Rf();return If=(f,v,a,g)=>{switch(v){case"===":return typeof f=="object"&&(f=f.version),typeof a=="object"&&(a=a.version),f===a;case"!==":return typeof f=="object"&&(f=f.version),typeof a=="object"&&(a=a.version),f!==a;case"":case"=":case"==":return n(f,a,g);case"!=":return t(f,a,g);case">":return e(f,a,g);case">=":return r(f,a,g);case"<":return d(f,a,g);case"<=":return u(f,a,g);default:throw new TypeError(`Invalid operator: ${v}`)}},If}var Mf,Mw;function VL(){if(Mw)return Mf;Mw=1;const n=Gr(),t=qs(),{safeRe:e,t:r}=$l();return Mf=(d,u)=>{if(d instanceof n)return d;if(typeof d=="number"&&(d=String(d)),typeof d!="string")return null;u=u||{};let f=null;if(!u.rtl)f=d.match(u.includePrerelease?e[r.COERCEFULL]:e[r.COERCE]);else{const c=u.includePrerelease?e[r.COERCERTLFULL]:e[r.COERCERTL];let p;for(;(p=c.exec(d))&&(!f||f.index+f[0].length!==d.length);)(!f||p.index+p[0].length!==f.index+f[0].length)&&(f=p),c.lastIndex=p.index+p[1].length+p[2].length;c.lastIndex=-1}if(f===null)return null;const v=f[2],a=f[3]||"0",g=f[4]||"0",i=u.includePrerelease&&f[5]?`-${f[5]}`:"",o=u.includePrerelease&&f[6]?`+${f[6]}`:"";return t(`${v}.${a}.${g}${i}${o}`,u)},Mf}var Lf,Lw;function GL(){if(Lw)return Lf;Lw=1;const n=qs(),t=Sl(),e=Gr(),r=(v,a,g)=>{if(!t.RELEASE_TYPES.includes(a))return null;const i=d(v,g);return i&&u(i,a)},d=(v,a)=>{const g=v instanceof e?v.version:v;return n(g,a)},u=(v,a)=>{if(f(a))return v.version;switch(v.prerelease=[],a){case"major":v.minor=0,v.patch=0;break;case"minor":v.patch=0;break}return v.format()},f=v=>v.startsWith("pre");return Lf=r,Lf}var Of,Ow;function qL(){if(Ow)return Of;Ow=1;class n{constructor(){this.max=1e3,this.map=new Map}get(e){const r=this.map.get(e);if(r!==void 0)return this.map.delete(e),this.map.set(e,r),r}delete(e){return this.map.delete(e)}set(e,r){if(!this.delete(e)&&r!==void 0){if(this.map.size>=this.max){const d=this.map.keys().next().value;this.delete(d)}this.map.set(e,r)}return this}}return Of=n,Of}var Nf,Nw;function yo(){if(Nw)return Nf;Nw=1;const n=/\s+/g;class t{constructor(W,V){if(V=d(V),W instanceof t)return W.loose===!!V.loose&&W.includePrerelease===!!V.includePrerelease?W:new t(W.raw,V);if(W instanceof u)return this.raw=W.value,this.set=[[W]],this.formatted=void 0,this;if(this.options=V,this.loose=!!V.loose,this.includePrerelease=!!V.includePrerelease,this.raw=W.trim().replace(n," "),this.set=this.raw.split("||").map(K=>this.parseRange(K.trim())).filter(K=>K.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const K=this.set[0];if(this.set=this.set.filter(X=>!y(X[0])),this.set.length===0)this.set=[K];else if(this.set.length>1){for(const X of this.set)if(X.length===1&&x(X[0])){this.set=[X];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let W=0;W<this.set.length;W++){W>0&&(this.formatted+="||");const V=this.set[W];for(let K=0;K<V.length;K++)K>0&&(this.formatted+=" "),this.formatted+=V[K].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(W){W=W.replace(m,"");const V=((this.options.includePrerelease&&s)|(this.options.loose&&h))+":"+W,K=r.get(V);if(K)return K;const X=this.options.loose,oe=X?a[i.HYPHENRANGELOOSE]:a[i.HYPHENRANGE];W=W.replace(oe,A(this.options.includePrerelease)),f("hyphen replace",W),W=W.replace(a[i.COMPARATORTRIM],o),f("comparator trim",W),W=W.replace(a[i.TILDETRIM],c),f("tilde trim",W),W=W.replace(a[i.CARETTRIM],p),f("caret trim",W);let ee=W.split(" ").map(fe=>S(fe,this.options)).join(" ").split(/\s+/).map(fe=>E(fe,this.options));X&&(ee=ee.filter(fe=>(f("loose invalid filter",fe,this.options),!!fe.match(a[i.COMPARATORLOOSE])))),f("range list",ee);const le=new Map,ue=ee.map(fe=>new u(fe,this.options));for(const fe of ue){if(y(fe))return[fe];le.set(fe.value,fe)}le.size>1&&le.has("")&&le.delete("");const ne=[...le.values()];return r.set(V,ne),ne}intersects(W,V){if(!(W instanceof t))throw new TypeError("a Range is required");return this.set.some(K=>T(K,V)&&W.set.some(X=>T(X,V)&&K.every(oe=>X.every(ee=>oe.intersects(ee,V)))))}test(W){if(!W)return!1;if(typeof W=="string")try{W=new v(W,this.options)}catch{return!1}for(let V=0;V<this.set.length;V++)if(D(this.set[V],W,this.options))return!0;return!1}}Nf=t;const e=qL(),r=new e,d=nf(),u=Xc(),f=Kc(),v=Gr(),{safeRe:a,src:g,t:i,comparatorTrimReplace:o,tildeTrimReplace:c,caretTrimReplace:p}=$l(),{FLAG_INCLUDE_PRERELEASE:s,FLAG_LOOSE:h}=Sl(),m=new RegExp(g[i.BUILD],"g"),y=j=>j.value==="<0.0.0-0",x=j=>j.value==="",T=(j,W)=>{let V=!0;const K=j.slice();let X=K.pop();for(;V&&K.length;)V=K.every(oe=>X.intersects(oe,W)),X=K.pop();return V},S=(j,W)=>(j=j.replace(a[i.BUILD],""),f("comp",j,W),j=M(j,W),f("caret",j),j=L(j,W),f("tildes",j),j=B(j,W),f("xrange",j),j=N(j,W),f("stars",j),j),_=j=>!j||j.toLowerCase()==="x"||j==="*",C=(j,W,V)=>_(j)&&!_(W)||_(W)&&V&&!_(V),L=(j,W)=>j.trim().split(/\s+/).map(V=>O(V,W)).join(" "),O=(j,W)=>{const V=W.loose?a[i.TILDELOOSE]:a[i.TILDE],K=W.includePrerelease?"-0":"";return j.replace(V,(X,oe,ee,le,ue)=>{f("tilde",j,X,oe,ee,le,ue);let ne;return _(oe)?ne="":_(ee)?ne=`>=${oe}.0.0${K} <${+oe+1}.0.0-0`:_(le)?ne=`>=${oe}.${ee}.0${K} <${oe}.${+ee+1}.0-0`:ue?(f("replaceTilde pr",ue),ne=`>=${oe}.${ee}.${le}-${ue} <${oe}.${+ee+1}.0-0`):ne=`>=${oe}.${ee}.${le} <${oe}.${+ee+1}.0-0`,f("tilde return",ne),ne})},M=(j,W)=>j.trim().split(/\s+/).map(V=>I(V,W)).join(" "),I=(j,W)=>{f("caret",j,W);const V=W.loose?a[i.CARETLOOSE]:a[i.CARET],K=W.includePrerelease?"-0":"";return j.replace(V,(X,oe,ee,le,ue)=>{f("caret",j,X,oe,ee,le,ue);let ne;return _(oe)?ne="":_(ee)?ne=`>=${oe}.0.0${K} <${+oe+1}.0.0-0`:_(le)?oe==="0"?ne=`>=${oe}.${ee}.0${K} <${oe}.${+ee+1}.0-0`:ne=`>=${oe}.${ee}.0${K} <${+oe+1}.0.0-0`:ue?(f("replaceCaret pr",ue),oe==="0"?ee==="0"?ne=`>=${oe}.${ee}.${le}-${ue} <${oe}.${ee}.${+le+1}-0`:ne=`>=${oe}.${ee}.${le}-${ue} <${oe}.${+ee+1}.0-0`:ne=`>=${oe}.${ee}.${le}-${ue} <${+oe+1}.0.0-0`):(f("no pr"),oe==="0"?ee==="0"?ne=`>=${oe}.${ee}.${le} <${oe}.${ee}.${+le+1}-0`:ne=`>=${oe}.${ee}.${le} <${oe}.${+ee+1}.0-0`:ne=`>=${oe}.${ee}.${le} <${+oe+1}.0.0-0`),f("caret return",ne),ne})},B=(j,W)=>(f("replaceXRanges",j,W),j.split(/\s+/).map(V=>F(V,W)).join(" ")),F=(j,W)=>{j=j.trim();const V=W.loose?a[i.XRANGELOOSE]:a[i.XRANGE];return j.replace(V,(K,X,oe,ee,le,ue)=>{if(f("xRange",j,K,X,oe,ee,le,ue),C(oe,ee,le))return j;const ne=_(oe),fe=ne||_(ee),Se=fe||_(le),Te=Se;return X==="="&&Te&&(X=""),ue=W.includePrerelease?"-0":"",ne?X===">"||X==="<"?K="<0.0.0-0":K="*":X&&Te?(fe&&(ee=0),le=0,X===">"?(X=">=",fe?(oe=+oe+1,ee=0,le=0):(ee=+ee+1,le=0)):X==="<="&&(X="<",fe?oe=+oe+1:ee=+ee+1),X==="<"&&(ue="-0"),K=`${X+oe}.${ee}.${le}${ue}`):fe?K=`>=${oe}.0.0${ue} <${+oe+1}.0.0-0`:Se&&(K=`>=${oe}.${ee}.0${ue} <${oe}.${+ee+1}.0-0`),f("xRange return",K),K})},N=(j,W)=>(f("replaceStars",j,W),j.trim().replace(a[i.STAR],"")),E=(j,W)=>(f("replaceGTE0",j,W),j.trim().replace(a[W.includePrerelease?i.GTE0PRE:i.GTE0],"")),A=j=>(W,V,K,X,oe,ee,le,ue,ne,fe,Se,Te)=>(_(K)?V="":_(X)?V=`>=${K}.0.0${j?"-0":""}`:_(oe)?V=`>=${K}.${X}.0${j?"-0":""}`:ee?V=`>=${V}`:V=`>=${V}${j?"-0":""}`,_(ne)?ue="":_(fe)?ue=`<${+ne+1}.0.0-0`:_(Se)?ue=`<${ne}.${+fe+1}.0-0`:Te?ue=`<=${ne}.${fe}.${Se}-${Te}`:j?ue=`<${ne}.${fe}.${+Se+1}-0`:ue=`<=${ue}`,`${V} ${ue}`.trim()),D=(j,W,V)=>{for(let K=0;K<j.length;K++)if(!j[K].test(W))return!1;if(W.prerelease.length&&!V.includePrerelease){for(let K=0;K<j.length;K++)if(f(j[K].semver),j[K].semver!==u.ANY&&j[K].semver.prerelease.length>0){const X=j[K].semver;if(X.major===W.major&&X.minor===W.minor&&X.patch===W.patch)return!0}return!1}return!0};return Nf}var Df,Dw;function Xc(){if(Dw)return Df;Dw=1;const n=Symbol("SemVer ANY");class t{static get ANY(){return n}constructor(i,o){if(o=e(o),i instanceof t){if(i.loose===!!o.loose)return i;i=i.value}i=i.trim().split(/\s+/).join(" "),f("comparator",i,o),this.options=o,this.loose=!!o.loose,this.parse(i),this.semver===n?this.value="":this.value=this.operator+this.semver.version,f("comp",this)}parse(i){const o=this.options.loose?r[d.COMPARATORLOOSE]:r[d.COMPARATOR],c=i.match(o);if(!c)throw new TypeError(`Invalid comparator: ${i}`);this.operator=c[1]!==void 0?c[1]:"",this.operator==="="&&(this.operator=""),c[2]?this.semver=new v(c[2],this.options.loose):this.semver=n}toString(){return this.value}test(i){if(f("Comparator.test",i,this.options.loose),this.semver===n||i===n)return!0;if(typeof i=="string")try{i=new v(i,this.options)}catch{return!1}return u(i,this.operator,this.semver,this.options)}intersects(i,o){if(!(i instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new a(i.value,o).test(this.value):i.operator===""?i.value===""?!0:new a(this.value,o).test(i.semver):(o=e(o),o.includePrerelease&&(this.value==="<0.0.0-0"||i.value==="<0.0.0-0")||!o.includePrerelease&&(this.value.startsWith("<0.0.0")||i.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&i.operator.startsWith(">")||this.operator.startsWith("<")&&i.operator.startsWith("<")||this.semver.version===i.semver.version&&this.operator.includes("=")&&i.operator.includes("=")||u(this.semver,"<",i.semver,o)&&this.operator.startsWith(">")&&i.operator.startsWith("<")||u(this.semver,">",i.semver,o)&&this.operator.startsWith("<")&&i.operator.startsWith(">")))}}Df=t;const e=nf(),{safeRe:r,t:d}=$l(),u=Iw(),f=Kc(),v=Gr(),a=yo();return Df}var Pf,Pw;function Jc(){if(Pw)return Pf;Pw=1;const n=yo();return Pf=(t,e,r)=>{try{e=new n(e,r)}catch{return!1}return e.test(t)},Pf}var Ff,Fw;function KL(){if(Fw)return Ff;Fw=1;const n=yo();return Ff=(t,e)=>new n(t,e).set.map(r=>r.map(d=>d.value).join(" ").trim().split(" ")),Ff}var zf,zw;function YL(){if(zw)return zf;zw=1;const n=Gr(),t=yo();return zf=(e,r,d)=>{let u=null,f=null,v=null;try{v=new t(r,d)}catch{return null}return e.forEach(a=>{v.test(a)&&(!u||f.compare(a)===-1)&&(u=a,f=new n(u,d))}),u},zf}var jf,jw;function XL(){if(jw)return jf;jw=1;const n=Gr(),t=yo();return jf=(e,r,d)=>{let u=null,f=null,v=null;try{v=new t(r,d)}catch{return null}return e.forEach(a=>{v.test(a)&&(!u||f.compare(a)===1)&&(u=a,f=new n(u,d))}),u},jf}var Bf,Bw;function JL(){if(Bw)return Bf;Bw=1;const n=Gr(),t=yo(),e=Yc();return Bf=(r,d)=>{r=new t(r,d);let u=new n("0.0.0");if(r.test(u)||(u=new n("0.0.0-0"),r.test(u)))return u;u=null;for(let f=0;f<r.set.length;++f){const v=r.set[f];let a=null;v.forEach(g=>{const i=new n(g.semver.version);switch(g.operator){case">":i.prerelease.length===0?i.patch++:i.prerelease.push(0),i.raw=i.format();case"":case">=":(!a||e(i,a))&&(a=i);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${g.operator}`)}}),a&&(!u||e(u,a))&&(u=a)}return u&&r.test(u)?u:null},Bf}var Wf,Ww;function ZL(){if(Ww)return Wf;Ww=1;const n=yo();return Wf=(t,e)=>{try{return new n(t,e).range||"*"}catch{return null}},Wf}var Hf,Hw;function Uf(){if(Hw)return Hf;Hw=1;const n=Gr(),t=Xc(),{ANY:e}=t,r=yo(),d=Jc(),u=Yc(),f=Af(),v=Rf(),a=Ef();return Hf=(g,i,o,c)=>{g=new n(g,c),i=new r(i,c);let p,s,h,m,y;switch(o){case">":p=u,s=v,h=f,m=">",y=">=";break;case"<":p=f,s=a,h=u,m="<",y="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(d(g,i,c))return!1;for(let x=0;x<i.set.length;++x){const T=i.set[x];let S=null,_=null;if(T.forEach(C=>{C.semver===e&&(C=new t(">=0.0.0")),S=S||C,_=_||C,p(C.semver,S.semver,c)?S=C:h(C.semver,_.semver,c)&&(_=C)}),S.operator===m||S.operator===y||(!_.operator||_.operator===m)&&s(g,_.semver)||_.operator===y&&h(g,_.semver))return!1}return!0},Hf}var Vf,Uw;function QL(){if(Uw)return Vf;Uw=1;const n=Uf();return Vf=(t,e,r)=>n(t,e,">",r),Vf}var Gf,Vw;function eO(){if(Vw)return Gf;Vw=1;const n=Uf();return Gf=(t,e,r)=>n(t,e,"<",r),Gf}var qf,Gw;function tO(){if(Gw)return qf;Gw=1;const n=yo();return qf=(t,e,r)=>(t=new n(t,r),e=new n(e,r),t.intersects(e,r)),qf}var Kf,qw;function nO(){if(qw)return Kf;qw=1;const n=Jc(),t=vo();return Kf=(e,r,d)=>{const u=[];let f=null,v=null;const a=e.sort((c,p)=>t(c,p,d));for(const c of a)n(c,r,d)?(v=c,f||(f=c)):(v&&u.push([f,v]),v=null,f=null);f&&u.push([f,null]);const g=[];for(const[c,p]of u)c===p?g.push(c):!p&&c===a[0]?g.push("*"):p?c===a[0]?g.push(`<=${p}`):g.push(`${c} - ${p}`):g.push(`>=${c}`);const i=g.join(" || "),o=typeof r.raw=="string"?r.raw:String(r);return i.length<o.length?i:r},Kf}var Yf,Kw;function rO(){if(Kw)return Yf;Kw=1;const n=yo(),t=Xc(),{ANY:e}=t,r=Jc(),d=vo(),u=(o,c,p={})=>{if(o===c)return!0;o=new n(o,p),c=new n(c,p);let s=!1;e:for(const h of o.set){for(const m of c.set){const y=a(h,m,p);if(s=s||y!==null,y)continue e}if(s)return!1}return!0},f=[new t(">=0.0.0-0")],v=[new t(">=0.0.0")],a=(o,c,p)=>{if(o===c)return!0;if(o.length===1&&o[0].semver===e){if(c.length===1&&c[0].semver===e)return!0;p.includePrerelease?o=f:o=v}if(c.length===1&&c[0].semver===e){if(p.includePrerelease)return!0;c=v}const s=new Set;let h,m;for(const O of o)O.operator===">"||O.operator===">="?h=g(h,O,p):O.operator==="<"||O.operator==="<="?m=i(m,O,p):s.add(O.semver);if(s.size>1)return null;let y;if(h&&m&&(y=d(h.semver,m.semver,p),y>0||y===0&&(h.operator!==">="||m.operator!=="<=")))return null;for(const O of s){if(h&&!r(O,String(h),p)||m&&!r(O,String(m),p))return null;for(const M of c)if(!r(O,String(M),p))return!1;return!0}let x,T,S,_,C=m&&!p.includePrerelease&&m.semver.prerelease.length?m.semver:!1,L=h&&!p.includePrerelease&&h.semver.prerelease.length?h.semver:!1;C&&C.prerelease.length===1&&m.operator==="<"&&C.prerelease[0]===0&&(C=!1);for(const O of c){if(_=_||O.operator===">"||O.operator===">=",S=S||O.operator==="<"||O.operator==="<=",h){if(L&&O.semver.prerelease&&O.semver.prerelease.length&&O.semver.major===L.major&&O.semver.minor===L.minor&&O.semver.patch===L.patch&&(L=!1),O.operator===">"||O.operator===">="){if(x=g(h,O,p),x===O&&x!==h)return!1}else if(h.operator===">="&&!O.test(h.semver))return!1}if(m){if(C&&O.semver.prerelease&&O.semver.prerelease.length&&O.semver.major===C.major&&O.semver.minor===C.minor&&O.semver.patch===C.patch&&(C=!1),O.operator==="<"||O.operator==="<="){if(T=i(m,O,p),T===O&&T!==m)return!1}else if(m.operator==="<="&&!O.test(m.semver))return!1}if(!O.operator&&(m||h)&&y!==0)return!1}return!(h&&S&&!m&&y!==0||m&&_&&!h&&y!==0||L||C)},g=(o,c,p)=>{if(!o)return c;const s=d(o.semver,c.semver,p);return s>0?o:s<0||c.operator===">"&&o.operator===">="?c:o},i=(o,c,p)=>{if(!o)return c;const s=d(o.semver,c.semver,p);return s<0?o:s>0||c.operator==="<"&&o.operator==="<="?c:o};return Yf=u,Yf}var Xf,Yw;function iO(){if(Yw)return Xf;Yw=1;const n=$l(),t=Sl(),e=Gr(),r=ow(),d=qs(),u=LL(),f=OL(),v=NL(),a=DL(),g=PL(),i=FL(),o=zL(),c=jL(),p=vo(),s=BL(),h=WL(),m=bf(),y=HL(),x=UL(),T=Yc(),S=Af(),_=kw(),C=$w(),L=Ef(),O=Rf(),M=Iw(),I=VL(),B=GL(),F=Xc(),N=yo(),E=Jc(),A=KL(),D=YL(),j=XL(),W=JL(),V=ZL(),K=Uf(),X=QL(),oe=eO(),ee=tO(),le=nO(),ue=rO();return Xf={parse:d,valid:u,clean:f,inc:v,diff:a,major:g,minor:i,patch:o,prerelease:c,compare:p,rcompare:s,compareLoose:h,compareBuild:m,sort:y,rsort:x,gt:T,lt:S,eq:_,neq:C,gte:L,lte:O,cmp:M,coerce:I,truncate:B,Comparator:F,Range:N,satisfies:E,toComparators:A,maxSatisfying:D,minSatisfying:j,minVersion:W,validRange:V,outside:K,gtr:X,ltr:oe,intersects:ee,simplifyRange:le,subset:ue,SemVer:e,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:t.SEMVER_SPEC_VERSION,RELEASE_TYPES:t.RELEASE_TYPES,compareIdentifiers:r.compareIdentifiers,rcompareIdentifiers:r.rcompareIdentifiers},Xf}var oO=Nn("j",iO());const sO={props:{pluginName:{type:String,required:!0},variables:{type:Object,required:!0},pluginTxt:{type:String,required:!0},existingPluginTxt:{type:String,required:!1,default:null},storePluginId:{type:Number,required:!1,default:null},storeVersionId:{type:Number,required:!1,default:null},minCosmosVersion:{type:String,required:!1,default:void 0},modelValue:Boolean},emits:["callback","update:modelValue"],data(){return{installedCosmosVersion:null,tab:0,localVariables:{},localPluginTxt:"",localExistingPluginTxt:null,editor:null,differ:null,contextMenu:!1,menuX:0,menuY:0}},computed:{show:{get(){return this.modelValue},set(n){this.$emit("update:modelValue",n)}}},watch:{value:{immediate:!0,handler:function(){const n=JSON.parse(JSON.stringify(this.variables));this.localVariables={};for(const[t,e]of Object.entries(n))typeof e=="string"?this.localVariables[t]={value:e}:this.localVariables[t]=e;this.localPluginTxt=this.pluginTxt.slice(),this.existingPluginTxt!==null&&(this.localExistingPluginTxt=this.existingPluginTxt.slice())}}},created(){dm.get("/openc3-api/info").then(({data:n})=>{this.installedCosmosVersion=n.version})},mounted(){const n=this.buildPluginMode();this.existingPluginTxt===null?(this.editor=Ls.edit(this.$refs.editor),this.editor.setTheme("ace/theme/twilight"),this.editor.session.setMode(new n),this.editor.session.setTabSize(2),this.editor.session.setUseWrapMode(!0),this.editor.$blockScrolling=1/0,this.editor.setHighlightActiveLine(!1),this.editor.setValue(this.localPluginTxt),this.editor.clearSelection(),Ec.applyVimModeIfEnabled(this.editor),this.editor.session.$undoManager.markClean(),this.editor.focus()):(this.tab=1,this.differ=new ML({element:this.$refs.editor,mode:new n,theme:"ace/theme/twilight",left:{content:this.localExistingPluginTxt,copyLinkEnabled:!1},right:{content:this.localPluginTxt,editable:!1}}),this.differ.getEditors().left.setFontSize(16),this.differ.getEditors().right.setFontSize(16),Ec.applyVimModeIfEnabled(this.differ.getEditors().left),Ec.applyVimModeIfEnabled(this.differ.getEditors().right),this.curDiff=-1)},beforeUnmount(){this.editor&&this.editor.destroy(),this.differ&&this.differ.destroy()},methods:{previousDiff(){this.curDiff--,this.curDiff<0&&(this.curDiff=this.differ.diffs.length-1),this.scrollToCurDiff()},nextDiff(){this.curDiff++,this.curDiff>=this.differ.diffs.length&&(this.curDiff=0),this.scrollToCurDiff()},scrollToCurDiff(){if(this.differ.diffs.length===0)return;let n=this.differ.diffs[this.curDiff].leftStartLine,t=this.differ.diffs[this.curDiff].rightStartLine;n>5&&(n-=5),t>5&&(t-=5),this.differ.getEditors().left.scrollToLine(n),this.differ.getEditors().right.scrollToLine(t)},buildPluginMode(){let n=Ls.require("ace/lib/oop"),t=Ls.require("ace/mode/ruby_highlight_rules").RubyHighlightRules,e=["VARIABLE","VARIABLE_DESCRIPTION","VARIABLE_STATE"],r=new RegExp(`(\\b${e.join("\\b|\\b")}\\b)`),d=function(){t.call(this);for(let i in this.$rules)this.$rules[i].unshift({regex:r,token:"support.function"})};n.inherits(d,t);let u=Ls.require("ace/mode/matching_brace_outdent").MatchingBraceOutdent,f=Ls.require("ace/mode/behaviour/cstyle").CstyleBehaviour,v=Ls.require("ace/mode/folding/ruby").FoldMode,a=function(){this.HighlightRules=d,this.$outdent=new u,this.$behaviour=new f,this.foldingRules=new v,this.indentKeywords=this.foldingRules.indentKeywords},g=Ls.require("ace/mode/ruby").Mode;return n.inherits(a,g),(function(){this.$id="ace/mode/openc3"}).call(a.prototype),a},checkVersionAndSubmit:function(){!this.installedCosmosVersion||!this.minCosmosVersion||oO.gte(this.installedCosmosVersion,this.minCosmosVersion)?this.submit():this.$dialog.confirm(`This plugin requires a minimum COSMOS version of ${this.minCosmosVersion}, which is greater than your installed version (${this.installedCosmosVersion}). Install anyway?`,{okText:"Install",cancelText:"Cancel"}).then(n=>{this.submit()}).catch(n=>{this.close()})},submit:function(){this.existingPluginTxt===null?this.emitSubmit(this.editor.getValue().split(`
1491
+ `)):this.differ.diffs.length===0?this.emitSubmit(this.differ.getEditors().left.getValue().split(`
1492
+ `)):this.$dialog.confirm("Diffs still detected! Install using 'Existing plugin.txt' (left) and ignore additional changes in the new plugin.txt (right)?",{okText:"Install",cancelText:"Cancel"}).then(n=>{this.emitSubmit(this.differ.getEditors().left.getValue().split(`
1493
+ `))}).catch(n=>{})},emitSubmit(n){let t={name:this.pluginName,variables:og(this.localVariables),plugin_txt_lines:n,store_plugin_id:this.storePluginId,store_version_id:this.storeVersionId};this.$emit("callback",t)},close:function(){this.show=!this.show},handleEsc:function(){this.editor.session.$undoManager.isClean()?this.close():this.$dialog.confirm("You have unsaved changes. Are you sure you want to close?",{okText:"Close without saving",cancelText:"Cancel"}).then(()=>{this.close()}).catch(()=>{this.editor?.focus()})},showContextMenu:function(n){this.menuX=n.pageX,this.menuY=n.pageY;let t=this.editor.getCursorPosition(),e=this.editor.session.getTokenAt(t.row,t.column);if(e){let r=e.value.trim();r.includes(" ")?this.docsKeyword=r.split(" ")[0]:this.docsKeyword=r,this.contextMenu=!0}},toggleVimMode:function(){this.editor&&Ec.toggleVimMode(this.editor)},hasOptions(n){return n.options&&n.options.length>0},getDescription(n){return n.description||""},getOptionItems(n){return n.options?n.options.map(t=>({text:t.text||t.value,value:t.value})):[]}}},aO={key:0,class:"text-body-1 text-medium-emphasis pa-3"},lO={ref:"editor",class:"editor"},cO={key:0};function uO(n,t,e,r,d,u){const f=Ke("v-card-title"),v=Ke("v-alert"),a=Ke("v-tab"),g=Ke("v-tabs"),i=Ke("v-list-item"),o=Ke("v-combobox"),c=Ke("v-text-field"),p=Ke("v-col"),s=Ke("v-row"),h=Ke("v-window-item"),m=Ke("v-list-item-title"),y=Ke("v-divider"),x=Ke("v-list"),T=Ke("v-menu"),S=Ke("v-window"),_=Ke("v-btn"),C=Ke("v-spacer"),L=Ke("v-card-actions"),O=Ke("v-card-text"),M=Ke("v-card"),I=Ke("v-dialog");return ct(),jt(I,{modelValue:u.show,"onUpdate:modelValue":t[5]||(t[5]=B=>u.show=B),persistent:"",width:"80vw",onKeydown:ql(la(u.handleEsc,["stop"]),["esc"])},{default:Be(()=>[Ge(M,null,{default:Be(()=>[Ge(f,null,{default:Be(()=>[Nt(Cn(e.pluginName),1)]),_:1}),Ge(O,{class:"pt-0"},{default:Be(()=>[e.existingPluginTxt!==null?(ct(),jt(v,{key:0,type:"warning",variant:"tonal",class:"mb-3"},{default:Be(()=>[Nt(" The existing plugin.txt is different from the "+Cn(e.pluginName)+"'s plugin.txt. Navigate the diffs making whatever edits you want before installing. You may want to update "+Cn(e.pluginName)+"'s plugin.txt going forward. ",1)]),_:1})):ti("",!0),Ge(g,{modelValue:d.tab,"onUpdate:modelValue":t[0]||(t[0]=B=>d.tab=B),class:"mb-3"},{default:Be(()=>[(ct(),jt(a,{key:0},{default:Be(()=>[...t[6]||(t[6]=[Nt(" Variables ",-1)])]),_:1})),(ct(),jt(a,{key:1},{default:Be(()=>[...t[7]||(t[7]=[Nt(" plugin.txt ",-1)])]),_:1}))]),_:1},8,["modelValue"]),er("form",{onSubmit:t[4]||(t[4]=la((...B)=>n.onSubmit&&n.onSubmit(...B),["prevent"]))},[Ge(S,{modelValue:d.tab,"onUpdate:modelValue":t[3]||(t[3]=B=>d.tab=B)},{default:Be(()=>[Ge(h,{value:0,eager:"true",class:"tab"},{default:Be(()=>[Object.keys(d.localVariables).length===0?(ct(),an("div",aO," No variables defined for this plugin. ")):(ct(),jt(s,{key:1,class:"pt-2"},{default:Be(()=>[(ct(!0),an(fi,null,To(d.localVariables,(B,F)=>(ct(),jt(p,{key:F,cols:"12",sm:"6",md:"3"},{default:Be(()=>[u.hasOptions(B)?(ct(),jt(o,{key:0,modelValue:B.value,"onUpdate:modelValue":N=>B.value=N,items:u.getOptionItems(B),"item-title":"text","item-value":"value","return-object":!1,label:F,hint:u.getDescription(B),"persistent-hint":"",density:"comfortable",variant:"outlined","data-test":"variable-combobox"},{item:Be(({item:N,props:E})=>[Ge(i,Ja({ref_for:!0},E),{title:Be(()=>[Nt(Cn(N.raw.text),1)]),_:2},1040)]),_:1},8,["modelValue","onUpdate:modelValue","items","label","hint"])):(ct(),jt(c,{key:1,modelValue:B.value,"onUpdate:modelValue":N=>B.value=N,label:F,hint:u.getDescription(B),"persistent-hint":"",clearable:"",density:"comfortable",variant:"outlined","data-test":"variable-text"},null,8,["modelValue","onUpdate:modelValue","label","hint"]))]),_:2},1024))),128))]),_:1}))]),_:1}),e.existingPluginTxt===null?(ct(),jt(h,{key:0,value:1,eager:"true",class:"tab"},{default:Be(()=>[Ge(s,{class:"pa-3"},{default:Be(()=>[Ge(p,null,{default:Be(()=>[...t[8]||(t[8]=[Nt(" This can be edited before installation. ",-1)])]),_:1})]),_:1}),er("pre",{ref:"editor",class:"editor",onContextmenu:t[1]||(t[1]=la((...B)=>u.showContextMenu&&u.showContextMenu(...B),["prevent"]))},null,544),Ge(T,{modelValue:d.contextMenu,"onUpdate:modelValue":t[2]||(t[2]=B=>d.contextMenu=B),target:[d.menuX,d.menuY]},{default:Be(()=>[Ge(x,null,{default:Be(()=>[Ge(i,{link:""},{default:Be(()=>[Ge(m,{onClick:n.openDocumentation},{default:Be(()=>[Nt(Cn(n.docsKeyword)+" documentation ",1)]),_:1},8,["onClick"])]),_:1}),Ge(y),Ge(i,{title:"Toggle Vim mode","prepend-icon":"extras:vim",onClick:u.toggleVimMode},null,8,["onClick"])]),_:1})]),_:1},8,["modelValue","target"])]),_:1})):(ct(),jt(h,{key:1,value:1,eager:"true",class:"tab"},{default:Be(()=>[Ge(s,{class:"pa-3"},{default:Be(()=>[Ge(p,null,{default:Be(()=>[...t[9]||(t[9]=[Nt(" Existing plugin.txt. This can be edited before installation. ",-1)])]),_:1}),Ge(p,{class:"ml-6"},{default:Be(()=>[...t[10]||(t[10]=[Nt(" Uneditable plugin.txt from the new plugin. ",-1)])]),_:1})]),_:1}),er("pre",lO,null,512)]),_:1}))]),_:1},8,["modelValue"]),Ge(L,{class:"px-2 mt-2"},{default:Be(()=>[e.existingPluginTxt!==null?(ct(),an("div",cO,[Ge(_,{variant:"text",onClick:u.nextDiff},{default:Be(()=>[...t[11]||(t[11]=[Nt(" Next Diff ",-1)])]),_:1},8,["onClick"]),Ge(_,{variant:"text",onClick:u.previousDiff},{default:Be(()=>[...t[12]||(t[12]=[Nt(" Previous Diff ",-1)])]),_:1},8,["onClick"])])):ti("",!0),Ge(C),Ge(_,{variant:"outlined","data-test":"edit-cancel",onClick:la(u.close,["prevent"])},{default:Be(()=>[...t[13]||(t[13]=[Nt(" Cancel ",-1)])]),_:1},8,["onClick"]),Ge(_,{variant:"flat","data-test":"edit-submit",onClick:u.checkVersionAndSubmit},{default:Be(()=>[...t[14]||(t[14]=[Nt(" Install ",-1)])]),_:1},8,["onClick"])]),_:1})],32)]),_:1})]),_:1})]),_:1},8,["modelValue","onKeydown"])}const vB=Nn("x",co(sO,[["render",uO],["__scopeId","data-v-1bfc6e55"]])),hO=Kd.find(n=>n.name==="PluginsTab"),Xw=[{path:"/",component:iL,children:[{component:hO.component,path:""},...Kd]},{path:"/:pathMatch(.*)*",name:"NotFound",component:GM}];Xw.forEach(n=>Cg(n));const dO=mg({history:vg(),routes:Xw});function Jw(n,t){(t==null||t>n.length)&&(t=n.length);for(var e=0,r=Array(t);e<t;e++)r[e]=n[e];return r}function fO(n){if(Array.isArray(n))return n}function pO(n,t){var e=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(e!=null){var r,d,u,f,v=[],a=!0,g=!1;try{if(u=(e=e.call(n)).next,t!==0)for(;!(a=(r=u.call(e)).done)&&(v.push(r.value),v.length!==t);a=!0);}catch(i){g=!0,d=i}finally{try{if(!a&&e.return!=null&&(f=e.return(),Object(f)!==f))return}finally{if(g)throw d}}return v}}function gO(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1494
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mO(n,t){return fO(n)||pO(n,t)||vO(n,t)||gO()}function vO(n,t){if(n){if(typeof n=="string")return Jw(n,t);var e={}.toString.call(n).slice(8,-1);return e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set"?Array.from(n):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Jw(n,t):void 0}}const Zw=Object.entries,Qw=Object.setPrototypeOf,yO=Object.isFrozen,bO=Object.getPrototypeOf,wO=Object.getOwnPropertyDescriptor;let Ir=Object.freeze,Mr=Object.seal,Fa=Object.create,e1=typeof Reflect<"u"&&Reflect,Jf=e1.apply,Zf=e1.construct;Ir||(Ir=function(n){return n}),Mr||(Mr=function(n){return n}),Jf||(Jf=function(n,t){for(var e=arguments.length,r=new Array(e>2?e-2:0),d=2;d<e;d++)r[d-2]=arguments[d];return n.apply(t,r)}),Zf||(Zf=function(n){for(var t=arguments.length,e=new Array(t>1?t-1:0),r=1;r<t;r++)e[r-1]=arguments[r];return new n(...e)});const El=ur(Array.prototype.forEach),xO=ur(Array.prototype.lastIndexOf),t1=ur(Array.prototype.pop),za=ur(Array.prototype.push),CO=ur(Array.prototype.splice),hs=Array.isArray,Tl=ur(String.prototype.toLowerCase),Qf=ur(String.prototype.toString),n1=ur(String.prototype.match),Rl=ur(String.prototype.replace),r1=ur(String.prototype.indexOf),_O=ur(String.prototype.trim),AO=ur(Number.prototype.toString),kO=ur(Boolean.prototype.toString),i1=typeof BigInt>"u"?null:ur(BigInt.prototype.toString),o1=typeof Symbol>"u"?null:ur(Symbol.prototype.toString),kr=ur(Object.prototype.hasOwnProperty),Il=ur(Object.prototype.toString),Lr=ur(RegExp.prototype.test),Ks=SO(TypeError);function ur(n){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var e=arguments.length,r=new Array(e>1?e-1:0),d=1;d<e;d++)r[d-1]=arguments[d];return Jf(n,t,r)}}function SO(n){return function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return Zf(n,e)}}function Zt(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Tl;if(Qw&&Qw(n,null),!hs(t))return n;let r=t.length;for(;r--;){let d=t[r];if(typeof d=="string"){const u=e(d);u!==d&&(yO(t)||(t[r]=u),d=u)}n[d]=!0}return n}function $O(n){for(let t=0;t<n.length;t++)kr(n,t)||(n[t]=null);return n}function oi(n){const t=Fa(null);for(const r of Zw(n)){var e=mO(r,2);const d=e[0],u=e[1];kr(n,d)&&(hs(u)?t[d]=$O(u):u&&typeof u=="object"&&u.constructor===Object?t[d]=oi(u):t[d]=u)}return t}function EO(n){switch(typeof n){case"string":return n;case"number":return AO(n);case"boolean":return kO(n);case"bigint":return i1?i1(n):"0";case"symbol":return o1?o1(n):"Symbol()";case"undefined":return Il(n);case"function":case"object":{if(n===null)return Il(n);const t=n,e=Mo(t,"toString");if(typeof e=="function"){const r=e(t);return typeof r=="string"?r:Il(r)}return Il(n)}default:return Il(n)}}function Mo(n,t){for(;n!==null;){const r=wO(n,t);if(r){if(r.get)return ur(r.get);if(typeof r.value=="function")return ur(r.value)}n=bO(n)}function e(){return null}return e}function TO(n){try{return Lr(n,""),!0}catch{return!1}}const s1=Ir(["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"]),ep=Ir(["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"]),tp=Ir(["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"]),RO=Ir(["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"]),np=Ir(["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"]),IO=Ir(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),a1=Ir(["#text"]),l1=Ir(["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"]),rp=Ir(["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"]),c1=Ir(["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"]),Zc=Ir(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),MO=Mr(/{{[\w\W]*|^[\w\W]*}}/g),LO=Mr(/<%[\w\W]*|^[\w\W]*%>/g),OO=Mr(/\${[\w\W]*/g),NO=Mr(/^data-[\-\w.\u00B7-\uFFFF]+$/),DO=Mr(/^aria-[\-\w]+$/),u1=Mr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),PO=Mr(/^(?:\w+script|data):/i),FO=Mr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),zO=Mr(/^html$/i),jO=Mr(/^[a-z][.\w]*(-[.\w]+)+$/i),h1=Mr(/<[/\w!]/g),BO=Mr(/<[/\w]/g),WO=Mr(/<\/no(script|embed|frames)/i),HO=Mr(/\/>/i),Lo={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},UO=function(){return typeof window>"u"?null:window},VO=function(n,t){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let e=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(e=t.getAttribute(r));const d="dompurify"+(e?"#"+e:"");try{return n.createPolicy(d,{createHTML(u){return u},createScriptURL(u){return u}})}catch{return console.warn("TrustedTypes policy "+d+" could not be created."),null}},d1=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},ds=function(n,t,e,r){return kr(n,t)&&hs(n[t])?Zt(r.base?oi(r.base):{},n[t],r.transform):e};function f1(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:UO();const t=ie=>f1(ie);if(t.version="3.4.11",t.removed=[],!n||!n.document||n.document.nodeType!==Lo.document||!n.Element)return t.isSupported=!1,t;let e=n.document;const r=e,d=r.currentScript;n.DocumentFragment;const u=n.HTMLTemplateElement,f=n.Node,v=n.Element,a=n.NodeFilter;n.NamedNodeMap===void 0&&(n.NamedNodeMap||n.MozNamedAttrMap),n.HTMLFormElement;const i=n.DOMParser,o=n.trustedTypes,c=v.prototype,p=Mo(c,"cloneNode"),s=Mo(c,"remove"),h=Mo(c,"nextSibling"),m=Mo(c,"childNodes"),y=Mo(c,"parentNode"),x=Mo(c,"shadowRoot"),T=Mo(c,"attributes"),S=f&&f.prototype?Mo(f.prototype,"nodeType"):null,_=f&&f.prototype?Mo(f.prototype,"nodeName"):null;if(typeof u=="function"){const ie=e.createElement("template");ie.content&&ie.content.ownerDocument&&(e=ie.content.ownerDocument)}let C,L="",O,M=!1,I=0;const B=function(){if(I>0)throw Ks('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.')},F=function(ie){B(),I++;try{return C.createHTML(ie)}finally{I--}},N=function(ie){B(),I++;try{return C.createScriptURL(ie)}finally{I--}},E=function(){return M||(O=VO(o,d),M=!0),O},A=e,D=A.implementation,j=A.createNodeIterator,W=A.createDocumentFragment,V=A.getElementsByTagName,K=r.importNode;let X=d1();t.isSupported=typeof Zw=="function"&&typeof y=="function"&&D&&D.createHTMLDocument!==void 0;const oe=MO,ee=LO,le=OO,ue=NO,ne=DO,fe=PO,Se=FO,Te=jO;let Re=u1,Ve=null;const Ue=Zt({},[...s1,...ep,...tp,...np,...a1]);let Xe=null;const ft=Zt({},[...l1,...rp,...c1,...Zc]);let We=Object.seal(Fa(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}})),Ie=null,Mt=null;const dt=Object.seal(Fa(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let tn=!0,mn=!0,rr=!1,Bt=!0,Rn=!1,bt=!0,Ze=!1,Pt=!1,In=null,Hn=null,Kn=!1,Un=!1,wn=!1,Dn=!1,ir=!0,on=!1;const Yn="user-content-";let Ii=!0,si=!1,hr={},Xn=null;const Mi=Zt({},["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 wr=null;const qi=Zt({},["audio","video","img","source","image","track"]);let Li=null;const fs=Zt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Sr="http://www.w3.org/1998/Math/MathML",Oo="http://www.w3.org/2000/svg",Or="http://www.w3.org/1999/xhtml";let mi=Or,ai=!1,Mn=null;const qr=Zt({},[Sr,Oo,Or],Qf),Kr=Ir(["mi","mo","mn","ms","mtext"]);let Ln=Zt({},Kr);const or=Ir(["annotation-xml"]);let vi=Zt({},or);const Oi=Zt({},["title","style","font","a","script"]);let Ni=null;const ps=["application/xhtml+xml","text/html"],Ys="text/html";let vn=null,$r=null;const yi=e.createElement("form"),Ft=function(ie){return ie instanceof RegExp||ie instanceof Function},No=function(){let ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if($r&&$r===ie)return;(!ie||typeof ie!="object")&&(ie={}),ie=oi(ie),Ni=ps.indexOf(ie.PARSER_MEDIA_TYPE)===-1?Ys:ie.PARSER_MEDIA_TYPE,vn=Ni==="application/xhtml+xml"?Qf:Tl,Ve=ds(ie,"ALLOWED_TAGS",Ue,{transform:vn}),Xe=ds(ie,"ALLOWED_ATTR",ft,{transform:vn}),Mn=ds(ie,"ALLOWED_NAMESPACES",qr,{transform:Qf}),Li=ds(ie,"ADD_URI_SAFE_ATTR",fs,{transform:vn,base:fs}),wr=ds(ie,"ADD_DATA_URI_TAGS",qi,{transform:vn,base:qi}),Xn=ds(ie,"FORBID_CONTENTS",Mi,{transform:vn}),Ie=ds(ie,"FORBID_TAGS",oi({}),{transform:vn}),Mt=ds(ie,"FORBID_ATTR",oi({}),{transform:vn}),hr=kr(ie,"USE_PROFILES")?ie.USE_PROFILES&&typeof ie.USE_PROFILES=="object"?oi(ie.USE_PROFILES):ie.USE_PROFILES:!1,tn=ie.ALLOW_ARIA_ATTR!==!1,mn=ie.ALLOW_DATA_ATTR!==!1,rr=ie.ALLOW_UNKNOWN_PROTOCOLS||!1,Bt=ie.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Rn=ie.SAFE_FOR_TEMPLATES||!1,bt=ie.SAFE_FOR_XML!==!1,Ze=ie.WHOLE_DOCUMENT||!1,Un=ie.RETURN_DOM||!1,wn=ie.RETURN_DOM_FRAGMENT||!1,Dn=ie.RETURN_TRUSTED_TYPE||!1,Kn=ie.FORCE_BODY||!1,ir=ie.SANITIZE_DOM!==!1,on=ie.SANITIZE_NAMED_PROPS||!1,Ii=ie.KEEP_CONTENT!==!1,si=ie.IN_PLACE||!1,Re=TO(ie.ALLOWED_URI_REGEXP)?ie.ALLOWED_URI_REGEXP:u1,mi=typeof ie.NAMESPACE=="string"?ie.NAMESPACE:Or,Ln=kr(ie,"MATHML_TEXT_INTEGRATION_POINTS")&&ie.MATHML_TEXT_INTEGRATION_POINTS&&typeof ie.MATHML_TEXT_INTEGRATION_POINTS=="object"?oi(ie.MATHML_TEXT_INTEGRATION_POINTS):Zt({},Kr),vi=kr(ie,"HTML_INTEGRATION_POINTS")&&ie.HTML_INTEGRATION_POINTS&&typeof ie.HTML_INTEGRATION_POINTS=="object"?oi(ie.HTML_INTEGRATION_POINTS):Zt({},or);const $e=kr(ie,"CUSTOM_ELEMENT_HANDLING")&&ie.CUSTOM_ELEMENT_HANDLING&&typeof ie.CUSTOM_ELEMENT_HANDLING=="object"?oi(ie.CUSTOM_ELEMENT_HANDLING):Fa(null);if(We=Fa(null),kr($e,"tagNameCheck")&&Ft($e.tagNameCheck)&&(We.tagNameCheck=$e.tagNameCheck),kr($e,"attributeNameCheck")&&Ft($e.attributeNameCheck)&&(We.attributeNameCheck=$e.attributeNameCheck),kr($e,"allowCustomizedBuiltInElements")&&typeof $e.allowCustomizedBuiltInElements=="boolean"&&(We.allowCustomizedBuiltInElements=$e.allowCustomizedBuiltInElements),Mr(We),Rn&&(mn=!1),wn&&(Un=!0),hr&&(Ve=Zt({},a1),Xe=Fa(null),hr.html===!0&&(Zt(Ve,s1),Zt(Xe,l1)),hr.svg===!0&&(Zt(Ve,ep),Zt(Xe,rp),Zt(Xe,Zc)),hr.svgFilters===!0&&(Zt(Ve,tp),Zt(Xe,rp),Zt(Xe,Zc)),hr.mathMl===!0&&(Zt(Ve,np),Zt(Xe,c1),Zt(Xe,Zc))),dt.tagCheck=null,dt.attributeCheck=null,kr(ie,"ADD_TAGS")&&(typeof ie.ADD_TAGS=="function"?dt.tagCheck=ie.ADD_TAGS:hs(ie.ADD_TAGS)&&(Ve===Ue&&(Ve=oi(Ve)),Zt(Ve,ie.ADD_TAGS,vn))),kr(ie,"ADD_ATTR")&&(typeof ie.ADD_ATTR=="function"?dt.attributeCheck=ie.ADD_ATTR:hs(ie.ADD_ATTR)&&(Xe===ft&&(Xe=oi(Xe)),Zt(Xe,ie.ADD_ATTR,vn))),kr(ie,"ADD_URI_SAFE_ATTR")&&hs(ie.ADD_URI_SAFE_ATTR)&&Zt(Li,ie.ADD_URI_SAFE_ATTR,vn),kr(ie,"FORBID_CONTENTS")&&hs(ie.FORBID_CONTENTS)&&(Xn===Mi&&(Xn=oi(Xn)),Zt(Xn,ie.FORBID_CONTENTS,vn)),kr(ie,"ADD_FORBID_CONTENTS")&&hs(ie.ADD_FORBID_CONTENTS)&&(Xn===Mi&&(Xn=oi(Xn)),Zt(Xn,ie.ADD_FORBID_CONTENTS,vn)),Ii&&(Ve["#text"]=!0),Ze&&Zt(Ve,["html","head","body"]),Ve.table&&(Zt(Ve,["tbody"]),delete Ie.tbody),ie.TRUSTED_TYPES_POLICY){if(typeof ie.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ks('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof ie.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ks('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const Le=C;C=ie.TRUSTED_TYPES_POLICY;try{L=F("")}catch(rt){throw C=Le,rt}}else ie.TRUSTED_TYPES_POLICY===null?(C=void 0,L=""):(C===void 0&&(C=E()),C&&typeof L=="string"&&(L=F("")));Ir&&Ir(ie),$r=ie},xr=Zt({},[...ep,...tp,...RO]),Pn=Zt({},[...np,...IO]),xn=function(ie,$e,Le){return $e.namespaceURI===Or?ie==="svg":$e.namespaceURI===Sr?ie==="svg"&&(Le==="annotation-xml"||Ln[Le]):!!xr[ie]},Fn=function(ie,$e,Le){return $e.namespaceURI===Or?ie==="math":$e.namespaceURI===Oo?ie==="math"&&vi[Le]:!!Pn[ie]},bo=function(ie,$e,Le){return $e.namespaceURI===Oo&&!vi[Le]||$e.namespaceURI===Sr&&!Ln[Le]?!1:!Pn[ie]&&(Oi[ie]||!xr[ie])},sr=function(ie){let $e=y(ie);(!$e||!$e.tagName)&&($e={namespaceURI:mi,tagName:"template"});const Le=Tl(ie.tagName),rt=Tl($e.tagName);return Mn[ie.namespaceURI]?ie.namespaceURI===Oo?xn(Le,$e,rt):ie.namespaceURI===Sr?Fn(Le,$e,rt):ie.namespaceURI===Or?bo(Le,$e,rt):!!(Ni==="application/xhtml+xml"&&Mn[ie.namespaceURI]):!1},Nr=function(ie){za(t.removed,{element:ie});try{y(ie).removeChild(ie)}catch{if(s(ie),!y(ie))throw Ks("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},bi=function(ie){const $e=m(ie);if($e){const rt=[];El($e,wt=>{za(rt,wt)}),El(rt,wt=>{try{s(wt)}catch{}})}const Le=T(ie);if(Le)for(let rt=Le.length-1;rt>=0;--rt){const wt=Le[rt],Xt=wt&&wt.name;if(typeof Xt=="string")try{ie.removeAttribute(Xt)}catch{}}},li=function(ie,$e){try{za(t.removed,{attribute:$e.getAttributeNode(ie),from:$e})}catch{za(t.removed,{attribute:null,from:$e})}if($e.removeAttribute(ie),ie==="is")if(Un||wn)try{Nr($e)}catch{}else try{$e.setAttribute(ie,"")}catch{}},Ki=function(ie){const $e=T(ie);if($e)for(let Le=$e.length-1;Le>=0;--Le){const rt=$e[Le],wt=rt&&rt.name;if(!(typeof wt!="string"||Xe[vn(wt)]))try{ie.removeAttribute(wt)}catch{}}},ci=function(ie){const $e=[ie];for(;$e.length>0;){const Le=$e.pop();(S?S(Le):Le.nodeType)===Lo.element&&Ki(Le);const rt=m(Le);if(rt)for(let wt=rt.length-1;wt>=0;--wt)$e.push(rt[wt])}},Yi=function(ie){let $e=null,Le=null;if(Kn)ie="<remove></remove>"+ie;else{const Xt=n1(ie,/^[\r\n\t ]+/);Le=Xt&&Xt[0]}Ni==="application/xhtml+xml"&&mi===Or&&(ie='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+ie+"</body></html>");const rt=C?F(ie):ie;if(mi===Or)try{$e=new i().parseFromString(rt,Ni)}catch{}if(!$e||!$e.documentElement){$e=D.createDocument(mi,"template",null);try{$e.documentElement.innerHTML=ai?L:rt}catch{}}const wt=$e.body||$e.documentElement;return ie&&Le&&wt.insertBefore(e.createTextNode(Le),wt.childNodes[0]||null),mi===Or?V.call($e,Ze?"html":"body")[0]:Ze?$e.documentElement:wt},wo=function(ie){return j.call(ie.ownerDocument||ie,ie,a.SHOW_ELEMENT|a.SHOW_COMMENT|a.SHOW_TEXT|a.SHOW_PROCESSING_INSTRUCTION|a.SHOW_CDATA_SECTION,null)},dr=function(ie){return ie=Rl(ie,oe," "),ie=Rl(ie,ee," "),ie=Rl(ie,le," "),ie},Xi=function(ie){var $e;ie.normalize();const Le=j.call(ie.ownerDocument||ie,ie,a.SHOW_TEXT|a.SHOW_COMMENT|a.SHOW_CDATA_SECTION|a.SHOW_PROCESSING_INSTRUCTION,null);let rt=Le.nextNode();for(;rt;)rt.data=dr(rt.data),rt=Le.nextNode();const wt=($e=ie.querySelectorAll)===null||$e===void 0?void 0:$e.call(ie,"template");wt&&El(wt,Xt=>{wi(Xt.content)&&Xi(Xt.content)})},Ji=function(ie){const $e=_?_(ie):null;return typeof $e!="string"||vn($e)!=="form"?!1:typeof ie.nodeName!="string"||typeof ie.textContent!="string"||typeof ie.removeChild!="function"||ie.attributes!==T(ie)||typeof ie.removeAttribute!="function"||typeof ie.setAttribute!="function"||typeof ie.namespaceURI!="string"||typeof ie.insertBefore!="function"||typeof ie.hasChildNodes!="function"||ie.nodeType!==S(ie)||ie.childNodes!==m(ie)},wi=function(ie){if(!S||typeof ie!="object"||ie===null)return!1;try{return S(ie)===Lo.documentFragment}catch{return!1}},Di=function(ie){if(!S||typeof ie!="object"||ie===null)return!1;try{return typeof S(ie)=="number"}catch{return!1}};function yn(ie,$e,Le){ie.length!==0&&El(ie,rt=>{rt.call(t,$e,Le,$r)})}const qo=function(ie,$e){return!!(bt&&ie.hasChildNodes()&&!Di(ie.firstElementChild)&&Lr(h1,ie.textContent)&&Lr(h1,ie.innerHTML)||bt&&ie.namespaceURI===Or&&$e==="style"&&Di(ie.firstElementChild)||ie.nodeType===Lo.processingInstruction||bt&&ie.nodeType===Lo.comment&&Lr(BO,ie.data))},Do=function(ie,$e){if(!Ie[$e]&&Zi($e)&&(We.tagNameCheck instanceof RegExp&&Lr(We.tagNameCheck,$e)||We.tagNameCheck instanceof Function&&We.tagNameCheck($e)))return!1;if(Ii&&!Xn[$e]){const Le=y(ie),rt=m(ie);if(rt&&Le){const wt=rt.length;for(let Xt=wt-1;Xt>=0;--Xt){const Qt=si?rt[Xt]:p(rt[Xt],!0);Le.insertBefore(Qt,h(ie))}}}return Nr(ie),!0},Pi=function(ie){if(yn(X.beforeSanitizeElements,ie,null),Ji(ie))return Nr(ie),!0;const $e=vn(_?_(ie):ie.nodeName);if(yn(X.uponSanitizeElement,ie,{tagName:$e,allowedTags:Ve}),qo(ie,$e))return Nr(ie),!0;if(Ie[$e]||!(dt.tagCheck instanceof Function&&dt.tagCheck($e))&&!Ve[$e])return Do(ie,$e);if((S?S(ie):ie.nodeType)===Lo.element&&!sr(ie)||($e==="noscript"||$e==="noembed"||$e==="noframes")&&Lr(WO,ie.innerHTML))return Nr(ie),!0;if(Rn&&ie.nodeType===Lo.text){const Le=dr(ie.textContent);ie.textContent!==Le&&(za(t.removed,{element:ie.cloneNode()}),ie.textContent=Le)}return yn(X.afterSanitizeElements,ie,null),!1},Po=function(ie,$e,Le){if(Mt[$e]||ir&&($e==="id"||$e==="name")&&(Le in e||Le in yi))return!1;const rt=Xe[$e]||dt.attributeCheck instanceof Function&&dt.attributeCheck($e,ie);if(!(mn&&Lr(ue,$e))&&!(tn&&Lr(ne,$e))){if(rt){if(!Li[$e]&&!Lr(Re,Rl(Le,Se,""))&&!(($e==="src"||$e==="xlink:href"||$e==="href")&&ie!=="script"&&r1(Le,"data:")===0&&wr[ie])&&!(rr&&!Lr(fe,Rl(Le,Se,"")))&&Le)return!1}else if(!(Zi(ie)&&(We.tagNameCheck instanceof RegExp&&Lr(We.tagNameCheck,ie)||We.tagNameCheck instanceof Function&&We.tagNameCheck(ie))&&(We.attributeNameCheck instanceof RegExp&&Lr(We.attributeNameCheck,$e)||We.attributeNameCheck instanceof Function&&We.attributeNameCheck($e,ie))||$e==="is"&&We.allowCustomizedBuiltInElements&&(We.tagNameCheck instanceof RegExp&&Lr(We.tagNameCheck,Le)||We.tagNameCheck instanceof Function&&We.tagNameCheck(Le))))return!1}return!0},Fo=Zt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Zi=function(ie){return!Fo[Tl(ie)]&&Lr(Te,ie)},Ko=function(ie,$e,Le,rt){if(C&&typeof o=="object"&&typeof o.getAttributeType=="function"&&!Le)switch(o.getAttributeType(ie,$e)){case"TrustedHTML":return F(rt);case"TrustedScriptURL":return N(rt)}return rt},Yo=function(ie,$e,Le,rt){try{Le?ie.setAttributeNS(Le,$e,rt):ie.setAttribute($e,rt),Ji(ie)?Nr(ie):t1(t.removed)}catch{li($e,ie)}},xo=function(ie){yn(X.beforeSanitizeAttributes,ie,null);const $e=ie.attributes;if(!$e||Ji(ie))return;const Le={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Xe,forceKeepAttr:void 0};let rt=$e.length;const wt=vn(ie.nodeName);for(;rt--;){const Xt=$e[rt],Qt=Xt.name,Yr=Xt.namespaceURI,fr=Xt.value,zn=vn(Qt),Dr=fr;let Sn=Qt==="value"?Dr:_O(Dr);if(Le.attrName=zn,Le.attrValue=Sn,Le.keepAttr=!0,Le.forceKeepAttr=void 0,yn(X.uponSanitizeAttribute,ie,Le),Sn=Le.attrValue,on&&(zn==="id"||zn==="name")&&r1(Sn,Yn)!==0&&(li(Qt,ie),Sn=Yn+Sn),bt&&Lr(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Sn)){li(Qt,ie);continue}if(zn==="attributename"&&n1(Sn,"href")){li(Qt,ie);continue}if(!Le.forceKeepAttr){if(!Le.keepAttr){li(Qt,ie);continue}if(!Bt&&Lr(HO,Sn)){li(Qt,ie);continue}if(Rn&&(Sn=dr(Sn)),!Po(wt,zn,Sn)){li(Qt,ie);continue}Sn=Ko(wt,zn,Yr,Sn),Sn!==Dr&&Yo(ie,Qt,Yr,Sn)}}yn(X.afterSanitizeAttributes,ie,null)},Co=function(ie){let $e=null;const Le=wo(ie);for(yn(X.beforeSanitizeShadowDOM,ie,null);$e=Le.nextNode();)if(yn(X.uponSanitizeShadowNode,$e,null),Pi($e),xo($e),wi($e.content)&&Co($e.content),(S?S($e):$e.nodeType)===Lo.element){const rt=x($e);wi(rt)&&(xi(rt),Co(rt))}yn(X.afterSanitizeShadowDOM,ie,null)},xi=function(ie){const $e=[{node:ie,shadow:null}];for(;$e.length>0;){const Le=$e.pop();if(Le.shadow){Co(Le.shadow);continue}const rt=Le.node,wt=(S?S(rt):rt.nodeType)===Lo.element,Xt=m(rt);if(Xt)for(let Qt=Xt.length-1;Qt>=0;--Qt)$e.push({node:Xt[Qt],shadow:null});if(wt){const Qt=_?_(rt):null;if(typeof Qt=="string"&&vn(Qt)==="template"){const Yr=rt.content;wi(Yr)&&$e.push({node:Yr,shadow:null})}}if(wt){const Qt=x(rt);wi(Qt)&&$e.push({node:null,shadow:Qt},{node:Qt,shadow:null})}}};return t.sanitize=function(ie){let $e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Le=null,rt=null,wt=null,Xt=null;if(ai=!ie,ai&&(ie="<!-->"),typeof ie!="string"&&!Di(ie)&&(ie=EO(ie),typeof ie!="string"))throw Ks("dirty is not a string, aborting");if(!t.isSupported)return ie;Pt?(Ve=In,Xe=Hn):No($e),(X.uponSanitizeElement.length>0||X.uponSanitizeAttribute.length>0)&&(Ve=oi(Ve)),X.uponSanitizeAttribute.length>0&&(Xe=oi(Xe)),t.removed=[];const Qt=si&&typeof ie!="string"&&Di(ie);if(Qt){const zn=_?_(ie):ie.nodeName;if(typeof zn=="string"){const Dr=vn(zn);if(!Ve[Dr]||Ie[Dr])throw Ks("root node is forbidden and cannot be sanitized in-place")}if(Ji(ie))throw Ks("root node is clobbered and cannot be sanitized in-place");try{xi(ie)}catch(Dr){throw bi(ie),Dr}}else if(Di(ie))Le=Yi("<!---->"),rt=Le.ownerDocument.importNode(ie,!0),rt.nodeType===Lo.element&&rt.nodeName==="BODY"||rt.nodeName==="HTML"?Le=rt:Le.appendChild(rt),xi(rt);else{if(!Un&&!Rn&&!Ze&&ie.indexOf("<")===-1)return C&&Dn?F(ie):ie;if(Le=Yi(ie),!Le)return Un?null:Dn?L:""}Le&&Kn&&Nr(Le.firstChild);const Yr=wo(Qt?ie:Le);try{for(;wt=Yr.nextNode();)Pi(wt),xo(wt),wi(wt.content)&&Co(wt.content)}catch(zn){throw Qt&&bi(ie),zn}if(Qt)return El(t.removed,zn=>{zn.element&&ci(zn.element)}),Rn&&Xi(ie),ie;if(Un){if(Rn&&Xi(Le),wn)for(Xt=W.call(Le.ownerDocument);Le.firstChild;)Xt.appendChild(Le.firstChild);else Xt=Le;return(Xe.shadowroot||Xe.shadowrootmode)&&(Xt=K.call(r,Xt,!0)),Xt}let fr=Ze?Le.outerHTML:Le.innerHTML;return Ze&&Ve["!doctype"]&&Le.ownerDocument&&Le.ownerDocument.doctype&&Le.ownerDocument.doctype.name&&Lr(zO,Le.ownerDocument.doctype.name)&&(fr="<!DOCTYPE "+Le.ownerDocument.doctype.name+`>
1495
+ `+fr),Rn&&(fr=dr(fr)),C&&Dn?F(fr):fr},t.setConfig=function(){let ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};No(ie),Pt=!0,In=Ve,Hn=Xe},t.clearConfig=function(){$r=null,Pt=!1,In=null,Hn=null,C=O,L=""},t.isValidAttribute=function(ie,$e,Le){$r||No({});const rt=vn(ie),wt=vn($e);return Po(rt,wt,Le)},t.addHook=function(ie,$e){typeof $e=="function"&&kr(X,ie)&&za(X[ie],$e)},t.removeHook=function(ie,$e){if(kr(X,ie)){if($e!==void 0){const Le=xO(X[ie],$e);return Le===-1?void 0:CO(X[ie],Le,1)[0]}return t1(X[ie])}},t.removeHooks=function(ie){kr(X,ie)&&(X[ie]=[])},t.removeAllHooks=function(){X=d1()},t}var GO=f1();const qO={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"}},KO={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:n=>!!n||"Required.",match:n=>n===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 GO.sanitize(this.params.text)}},methods:{dialog:function(n,t,e){this.params=n,this.show=!0,this.resolve=t,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=""}}},YO=["innerHTML"],XO={key:2},JO={key:3,class:"validate mt-4"};function ZO(n,t,e,r,d,u){const f=Ke("v-spacer"),v=Ke("v-toolbar"),a=Ke("v-icon"),g=Ke("v-text-field"),i=Ke("v-card-text"),o=Ke("v-btn"),c=Ke("v-card-actions"),p=Ke("v-card"),s=Ke("v-dialog"),h=Ke("v-app");return ct(),jt(h,null,{default:Be(()=>[Ge(s,{modelValue:n.show,"onUpdate:modelValue":t[1]||(t[1]=m=>n.show=m),persistent:"",width:"600",onKeydown:ql(u.cancel,["esc"])},{default:Be(()=>[Ge(p,null,{default:Be(()=>[Ge(v,{height:"24"},{default:Be(()=>[Ge(f),er("span",null,Cn(n.params.title),1),Ge(f)]),_:1}),Ge(i,{class:"mt-4 pa-3"},{default:Be(()=>[n.params.validateText?(ct(),jt(a,{key:0,class:"mr-2"},{default:Be(()=>[...t[2]||(t[2]=[Nt(" mdi-alert ",-1)])]),_:1})):ti("",!0),n.params.html?(ct(),an("span",{key:1,innerHTML:u.sanitizedText},null,8,YO)):(ct(),an("span",XO,Cn(u.sanitizedText),1)),n.params.validateText?(ct(),an("div",JO,[Nt(" Enter "+Cn(n.params.validateText)+" to confirm! ",1),Ge(g,{modelValue:n.validationText,"onUpdate:modelValue":t[0]||(t[0]=m=>n.validationText=m),variant:"solo",density:"compact","single-line":"",rules:[n.rules.required,n.rules.match],"data-test":"confirm-dialog-validate"},null,8,["modelValue","rules"])])):ti("",!0)]),_:1}),Ge(c,{class:"px-2"},{default:Be(()=>[Ge(f),n.params.cancelText?(ct(),jt(o,{key:0,variant:"outlined","data-test":u.dataTestCancel,onClick:u.cancel},{default:Be(()=>[Nt(Cn(n.params.cancelText),1)]),_:1},8,["data-test","onClick"])):ti("",!0),Ge(o,{variant:"flat",color:n.params.okClass,"data-test":u.dataTestOk,onClick:u.ok},{default:Be(()=>[Nt(Cn(n.params.okText),1)]),_:1},8,["color","data-test","onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue","onKeydown"])]),_:1})}const QO=co(KO,[["render",ZO],["__scopeId","data-v-53691296"]]);class eN{constructor(){this.mounted=!1,this.$root=null}mount(){if(this.mounted)return;const t=window.Vue.createApp(QO);t.use(op);const e=document.createElement("div");document.querySelector("#openc3-app-toolbar > div").appendChild(e),this.$root=t.mount(e),this.mounted=!0}open({title:t,text:e,okText:r,okClass:d,validateText:u,cancelText:f,html:v}){return this.mount(),new Promise((a,g)=>{this.$root.dialog({title:t,text:e,okText:r,okClass:d,validateText:u,cancelText:f,html:v},a,g)})}confirm(t,{okText:e="Ok",cancelText:r="Cancel",okClass:d="primary"}){return this.open({title:"Confirm",text:t,okText:e,okClass:d,validateText:null,cancelText:r,html:!1})}alert(t,{okText:e="Ok",html:r=!1,okClass:d="primary"}){return this.open({title:"Alert",text:t,okText:e,okClass:d,validateText:null,cancelText:null,html:r})}validate(t,{okText:e="Ok",validateText:r="CONFIRM",cancelText:d="Cancel",okClass:u="primary"}){return this.open({title:"Confirm",text:t,okText:e,okClass:u,validateText:r,cancelText:d,html:!1})}}const tN={install(n,t){const e=new eN;n.provide("dialog",e),n.config.globalProperties.hasOwnProperty("$dialog")||(n.config.globalProperties.$dialog=e)}},nN={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`
1496
+ --toast-bg-color:${Gd[this.toastNotification.level]};
1497
+ --toast-fg-color:${DM(this.toastNotification.level)};
1498
+ `},contentStyle:function(){return`
1499
+ white-space: ${this.expanded?"normal":"nowrap"};
1500
+ overflow-x: ${this.expanded?"visible":"hidden"};
1501
+ text-overflow: ${this.expanded?"unset":"ellipsis"};
1502
+ `}},methods:{toast:function(n,t){this.noToastPaths.includes(window.location.pathname)||(t===void 0&&(t=5e3),this.toastNotification=n,this.showToast=!0,this.cancelAutohide(),t&&(this.timeout=setTimeout(()=>{this.hide()},t)))},hide:function(){this.cancelAutohide(),this.showToast=!1},cancelAutohide:function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},expand:function(){this.cancelAutohide(),this.expanded=!0}}},rN={key:0,class:"text-subtitle-1 mr-1 notification-text"},iN={key:1,class:"text-body-2 notification-text"},oN={key:2,class:"text-body-2 notification-text"};function sN(n,t,e,r,d,u){const f=Ke("v-icon"),v=Ke("v-spacer"),a=Ke("v-btn"),g=Ke("v-sheet"),i=Ke("v-slide-y-transition");return ct(),jt(i,null,{default:Be(()=>[pg(Ge(g,{style:Cs(u.toastStyle),class:"toast-notification",onClick:u.expand},{default:Be(()=>[Ge(f,{class:"mr-1 notification-text"},{default:Be(()=>[Nt(Cn(u.toastNotificationIcon),1)]),_:1}),er("div",{class:"toast-content",style:Cs(u.contentStyle)},[n.toastNotification.title?(ct(),an("span",rN,[n.toastNotification.body||n.toastNotification.message?(ct(),an(fi,{key:0},[Nt(Cn(n.toastNotification.title)+": ",1)],64)):(ct(),an(fi,{key:1},[Nt(Cn(n.toastNotification.title),1)],64))])):ti("",!0),n.toastNotification.body?(ct(),an("span",iN,Cn(n.toastNotification.body),1)):ti("",!0),n.toastNotification.message?(ct(),an("span",oN,Cn(n.toastNotification.message),1)):ti("",!0)],4),Ge(v),Ge(a,{variant:"text",class:"notification-text",onClick:la(u.hide,["stop"])},{default:Be(()=>[...t[0]||(t[0]=[Nt(" Dismiss ",-1)])]),_:1},8,["onClick"])]),_:1},8,["style","onClick"]),[[gg,n.showToast]])]),_:1})}const aN=co(nN,[["render",sN],["__scopeId","data-v-ef96840d"]]);class lN{constructor(t={}){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=Mb()),this.store}mount(){if(this.mounted)return;const t=Pu(aN);t.use(op);const e=document.createElement("div");document.querySelector("#openc3-app-toolbar > div").appendChild(e),this.$root=t.mount(e),this.mounted=!0}open({method:t,title:e,body:r,message:d,level:u,duration:f,type:v="alert",logToConsole:a=!1,saveToHistory:g=!0}){this.mount(),a&&console.log(d?`${u.toUpperCase()} - ${d}`:`${u.toUpperCase()} - ${e}: ${r}`),g&&this.getStore().notifyAddHistory({title:e,body:r,message:d,level:u}),this[t]({title:e,body:r,message:d,level:u,duration:f,type:v})}toast({title:t,body:e,message:r,level:d,duration:u,type:f}){this.$root.toast({title:t,body:e,message:r,level:d,type:f},u)}critical({title:t,body:e,message:r,type:d,duration:u,logToConsole:f,saveToHistory:v}){this.open({method:"toast",level:"critical",title:t,body:e,message:r,type:d,duration:u,logToConsole:f,saveToHistory:v})}FATAL(t){this.critical(t)}ERROR(t){this.critical(t)}serious({title:t,body:e,message:r,type:d,duration:u,logToConsole:f,saveToHistory:v}){this.open({method:"toast",level:"serious",title:t,body:e,message:r,type:d,duration:u,logToConsole:f,saveToHistory:v})}caution({title:t,body:e,message:r,type:d,duration:u,logToConsole:f,saveToHistory:v}){this.open({method:"toast",level:"caution",title:t,body:e,message:r,type:d,duration:u,logToConsole:f,saveToHistory:v})}WARN(t){this.caution(t)}normal({title:t,body:e,message:r,type:d,duration:u,logToConsole:f,saveToHistory:v}){this.open({method:"toast",level:"normal",title:t,body:e,message:r,type:d,duration:u,logToConsole:f,saveToHistory:v})}INFO(t){this.normal(t)}DEBUG(t){this.normal(t)}standby({title:t,body:e,message:r,type:d,duration:u,logToConsole:f,saveToHistory:v}){this.open({method:"toast",level:"standby",title:t,body:e,message:r,type:d,duration:u,logToConsole:f,saveToHistory:v})}off({title:t,body:e,message:r,type:d,duration:u,logToConsole:f,saveToHistory:v}){this.open({method:"toast",level:"off",title:t,body:e,message:r,type:d,duration:u,logToConsole:f,saveToHistory:v})}}const cN={install(n,t){const e=new lN(t);n.provide("notify",e),n.config.globalProperties.hasOwnProperty("$notify")||(n.config.globalProperties.$notify=e)}};function uN(n){ag(`Vuetify: ${n}`)}function p1(n){let t;return n!==null&&typeof n=="object"&&((t=Object.getPrototypeOf(n))===Object.prototype||t===null)}function hN(n,t){const e={};for(const r of t)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e}function g1(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=arguments.length>2?arguments[2]:void 0;const r={};for(const d in n)r[d]=n[d];for(const d in t){const u=n[d],f=t[d];if(p1(u)&&p1(f)){r[d]=g1(u,f,e);continue}if(e&&Array.isArray(u)&&Array.isArray(f)){r[d]=e(u,f);continue}r[d]=f}return r}function Ml(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(Ml.cache.has(n))return Ml.cache.get(n);const t=n.replace(/[^a-z]/gi,"-").replace(/\B([A-Z])/g,"-$1").toLowerCase();return Ml.cache.set(n,t),t}Ml.cache=new Map;function m1(n,t){return e=>Object.keys(n).reduce((r,d)=>{const u=typeof n[d]=="object"&&n[d]!=null&&!Array.isArray(n[d])?n[d]:{type:n[d]};return e&&d in e?r[d]={...u,default:e[d]}:r[d]=u,t&&!r[d].source&&(r[d].source=t),r},{})}function v1(n,t){const e=dg();if(!e)throw new Error(`[Vuetify] ${n} must be called from inside a setup function`);return e}function dN(n){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v1("injectSelf");const{provides:e}=t;if(e&&n in e)return e[n]}const ip=Symbol.for("vuetify:defaults");function y1(){const n=lg(ip);if(!n)throw new Error("[Vuetify] Could not find defaults instance");return n}function fN(n,t){return n.props&&(typeof n.props[t]<"u"||typeof n.props[Ml(t)]<"u")}function pN(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:y1();const r=v1("useDefaults");if(t=t??r.type.name??r.type.__name,!t)throw new Error("[Vuetify] Could not determine component name");const d=Du(()=>e.value?.[n._as??t]),u=new Proxy(n,{get(a,g){const i=Reflect.get(a,g);if(g==="class"||g==="style")return[d.value?.[g],i].filter(p=>p!=null);if(fN(r.vnode,g))return i;const o=d.value?.[g];if(o!==void 0)return o;const c=e.value?.global?.[g];return c!==void 0?c:i}}),f=cg();ug(()=>{if(d.value){const a=Object.entries(d.value).filter(g=>{let[i]=g;return i.startsWith(i[0].toUpperCase())});f.value=a.length?Object.fromEntries(a):void 0}else f.value=void 0});function v(){const a=dN(ip,r);fg(ip,Du(()=>f.value?g1(a?.value??{},f.value):a?.value))}return{props:u,provideSubDefaults:v}}function Qc(n){if(n._setup=n._setup??n.setup,!n.name)return uN("The component is missing an explicit name, unable to generate default prop value"),n;if(n._setup){n.props=m1(n.props??{},n.name)();const t=Object.keys(n.props).filter(e=>e!=="class"&&e!=="style");n.filterProps=function(e){return hN(e,t)},n.props._as=String,n.setup=function(e,r){const d=y1();if(!d.value)return n._setup(e,r);const{props:u,provideSubDefaults:f}=pN(e,e._as??n.name,d),v=n._setup(u,r);return f(),v}}return n}function gN(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return t=>(n?Qc:sg)(t)}const mN=[String,Function,Object,Array],eu=m1({icon:{type:mN},tag:{type:[String,Object,Function],required:!0}},"icon");gN()({name:"VComponentIcon",props:eu(),setup(n,t){let{slots:e}=t;return()=>{const r=n.icon;return Ge(n.tag,null,{default:()=>[n.icon?Ge(r,null,null):e.default?.()]})}}}),Qc({name:"VSvgIcon",inheritAttrs:!1,props:eu(),setup(n,t){let{attrs:e}=t;return()=>Ge(n.tag,Ja(e,{style:null}),{default:()=>[er("svg",{class:"v-icon__svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true"},[Array.isArray(n.icon)?n.icon.map(r=>Array.isArray(r)?er("path",{d:r[0],"fill-opacity":r[1]},null):er("path",{d:r},null)):er("path",{d:n.icon},null)])]})}}),Qc({name:"VLigatureIcon",props:eu(),setup(n){return()=>Ge(n.tag,null,{default:()=>[n.icon]})}});const vN=Qc({name:"VClassIcon",props:eu(),setup(n){return()=>Ge(n.tag,{class:hg(n.icon)},null)}}),yN={component:n=>aa(vN,{...n,class:"mdi"})},bN={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"}},wN={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"}},xN={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"}},CN={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"}},op=wg({theme:{defaultTheme:"cosmosDark",themes:{cosmosDark:qO,cosmosDarkCobalt:bN,cosmosDarkIndigo:wN,cosmosDarkSlate:xN,cosmosDarkEmerald:CN}},defaults:{VCheckbox:{color:"secondary"},VCheckboxBtn:{color:"secondary"},VRadio:{color:"secondary"},VRadioGroup:{color:"secondary"},VSwitch:{color:"secondary"}},icons:{defaultSet:"mdi",sets:{mdi:yN,...FM,...zM}}}),sp=gC({createApp:Pu,appOptions:{render(){return aa(_C,{})},el:"#openc3-tool"},handleInstance:n=>{n.use(dO),n.use(Oa),n.use(op),n.use(tN),n.use(cN)}}),yB=Nn("g",sp.bootstrap),bB=Nn("n",sp.mount),wB=Nn("v",sp.unmount)})}}));