openc3-cosmos-tool-admin 6.4.0 → 6.4.2

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 (100) hide show
  1. checksums.yaml +4 -4
  2. data/tools/admin/{ArrayWidget-DAZApfkV-278468a53d6dcd290939.js → ArrayWidget-D0fKsdTb-f6704a836c42d6598c02.js} +2 -2
  3. data/tools/admin/{ArrayplotWidget-BfsxDplv-e75768e19a78a755021f.js → ArrayplotWidget-BmRSuGhA-dfe6cec7311c38280d2b.js} +1 -1
  4. data/tools/admin/{BarColumn-q0nAsvrd-83b968497a97f5a12a7a.js → BarColumn-DtYw6Gmq-1d16bc85c4f8760ac794.js} +1 -1
  5. data/tools/admin/{BlockWidget-SDCUWcMQ-2bc1ff795dd9b8289734.js → BlockWidget-Dpxbw455-2f60f33bbec004d67840.js} +2 -2
  6. data/tools/admin/{ButtonWidget-BVMjwC19-21d6311409e6295e5ff1.js → ButtonWidget-8iOpXmpp-6bc46041a60a63e6af96.js} +1 -1
  7. data/tools/admin/CanvasWidget-B0iU38rA-fe1c08ba22e8f5ea496a.js +1 -0
  8. data/tools/admin/CanvasdotWidget-C9viSVBs-3a9eb2305cb45c588c0c.js +1 -0
  9. data/tools/admin/{CanvasimageWidget-DHOSz-dJ-de800e86e1bee6f5a0ff.js → CanvasimageWidget-CFiCpITu-88be36fd4a4c0ded8ba4.js} +1 -1
  10. data/tools/admin/{CanvasimagevalueWidget-zrURWWUL-17057ebfab0467f8b7f5.js → CanvasimagevalueWidget-fu6vbAY0-70133f5d496b15e819f9.js} +1 -1
  11. data/tools/admin/CanvaslabelWidget-BVqHq3Vp-ace5f608a06ccca78b59.js +1 -0
  12. data/tools/admin/{CanvaslabelvalueWidget-BsIdBtEb-963e3f40288b9cc769c9.js → CanvaslabelvalueWidget-BOFa8-NU-2ff194ff28fbc9febfab.js} +1 -1
  13. data/tools/admin/{CanvaslineWidget-CA2aPGRg-176c5b3f1d9009c13ce0.js → CanvaslineWidget-l3ko0QXk-8e623ca09c6a7d6047a5.js} +1 -1
  14. data/tools/admin/{CanvaslinevalueWidget-J7epKRlo-c968b8847757e14bfb1c.js → CanvaslinevalueWidget-BCZoO-Z6-adeeaccf3c74a1ab0898.js} +1 -1
  15. data/tools/admin/CheckbuttonWidget-BN7e1d5b-570fad87e1ed08d80c4e.js +1 -0
  16. data/tools/admin/ComboboxWidget-Bb5RGXDB-18d7807d9586cb760f47.js +1 -0
  17. data/tools/admin/{DateWidget-BaQqthC7-3d8a26b6aafc6de1b56a.js → DateWidget-Dggqab-F-75c41d7ba653738a9a30.js} +1 -1
  18. data/tools/admin/{DetailsDialog-C5jf8o0K-618733616700caa427d3.js → DetailsDialog-BhSAQDSK-b73443d1a14c5e42ffab.js} +1 -1
  19. data/tools/admin/{DynamicWidget-CfMtj7H8-28b5c02a544a8b721b2d.js → DynamicWidget-CfMtj7H8-ffb5ab076611fda81271.js} +1 -1
  20. data/tools/admin/{FormatvalueWidget--H5B9i_Y-cca10587c6e1ab5b71a6.js → FormatvalueWidget-B9_PbzY2-a2114dd71c00fd34392b.js} +1 -1
  21. data/tools/admin/{Graph-M382Zo8o-749b759d928f020bf06b.js → Graph-B29y4d5A-412e44909dc4cfbacb13.js} +1 -1
  22. data/tools/admin/{GraphWidget-_YOGDD1U-16510f2fb4ff72f50671.js → GraphWidget-oBxPa3EB-df30fe3ae10ee959a2e6.js} +1 -1
  23. data/tools/admin/{HorizontalWidget-D_gzrOWs-bd70f9d52446f354a3ed.js → HorizontalWidget-BWgZL_Oz-3f8e5ee942efbac8be1a.js} +1 -1
  24. data/tools/admin/{HorizontalboxWidget-GDcjO-UB-e7a5b1d2df595dfa8528.js → HorizontalboxWidget-yMYUnNB8-fc3cfe3a8d5a32a27580.js} +1 -1
  25. data/tools/admin/HorizontallineWidget-C4zMx7z2-562aa8322c7dd88b5e4b.js +1 -0
  26. data/tools/admin/{IframeWidget-CuUav9b3-4b58f427f7c7c3b092bc.js → IframeWidget-DA4P_mJT-42b73b878426164cbded.js} +1 -1
  27. data/tools/admin/{ImageLoader-3KLKJ5mV-6e47a29f0a6ec0e7517b.js → ImageLoader-rvd9t-mk-8788ce7530b5de20139a.js} +1 -1
  28. data/tools/admin/{ImageviewerWidget-BMZ6REN4-99508d60b2bf097a6732.js → ImageviewerWidget-B1wK0hK4-465f226b24efdf22d511.js} +1 -1
  29. data/tools/admin/{InterfacesTab-DTixVrGo-d1c54d784fb72d35a760.js → InterfacesTab-CVvIDSTG-ee81cdb027c31e89a3a7.js} +1 -1
  30. data/tools/admin/{LabelWidget-oh6FIG6s-d868fb2bd26ce6d2f3d6.js → LabelWidget-CY0saBoK-84c2f9a842d2d17c195b.js} +1 -1
  31. data/tools/admin/LabelledWidget-B3ZOYaGy-4984bbb26812a9002517.js +1 -0
  32. data/tools/admin/{LabelprogressbarWidget-CqIiGoDb-3253bfa6f16674c0a578.js → LabelprogressbarWidget-CmXcESTg-1967485fae89cc5c4ef1.js} +1 -1
  33. data/tools/admin/LabelsparklineWidget-D_yrQrn6-cbf45f82a40f2077021f.js +1 -0
  34. data/tools/admin/{LabelvalueWidget-BefwSSVq-80d87143686ab5e22873.js → LabelvalueWidget-dNaNfsBE-774b61018bc8c9f830d5.js} +1 -1
  35. data/tools/admin/{LabelvaluedescWidget-NxrCzznm-1abe6e80871d0a1d3f62.js → LabelvaluedescWidget-3vNoH6Mc-6955d92d5ab9a7350d23.js} +1 -1
  36. data/tools/admin/LabelvaluelimitsbarWidget-7VppYVIN-7be7bf3cb5b8eb4ee4ae.js +1 -0
  37. data/tools/admin/LabelvaluelimitscolumnWidget-BZ6nwifg-3ad23ad580922c2ad60a.js +1 -0
  38. data/tools/admin/LabelvaluerangebarWidget-IyuXLNsw-922e4c775e1ff7e3121f.js +1 -0
  39. data/tools/admin/Layout-BqMhhhws-f26297b3aef3301546d3.js +1 -0
  40. data/tools/admin/{LedWidget--4eSxBnn-b23e9dba9fe8083fa005.js → LedWidget-DSxpmIOK-8670b49839fe2115e1cd.js} +1 -1
  41. data/tools/admin/{LimitsbarWidget-BQaumgRt-83eeb25d4b6e4e99b119.js → LimitsbarWidget-BoPTdVV5-f454ae2b53547026f2a7.js} +1 -1
  42. data/tools/admin/{LimitscolorWidget-BBF9sRtF-62a27f46ce7c054d150f.js → LimitscolorWidget-Bt3qOvrv-d5ea8d6587d47617a544.js} +1 -1
  43. data/tools/admin/{LimitscolumnWidget-DZZtSoXw-425281a88105e20ed3ba.js → LimitscolumnWidget-Ce6YnUBz-bd4c13c9ca9707268db5.js} +1 -1
  44. data/tools/admin/LinegraphWidget-XAbg0jj2-ebd424cc384fcbdeca36.js +1 -0
  45. data/tools/admin/{MatrixbycolumnsWidget-dpgZz4wR-f0f3fdf10d49af904bf5.js → MatrixbycolumnsWidget-5MgJFZtz-9686d89696d17f542dda.js} +1 -1
  46. data/tools/admin/{MicroservicesTab-DbL48MBc-484871d8f774092c18ce.js → MicroservicesTab-DlnZ9h0y-b69b8c6b8581408c1a6d.js} +1 -1
  47. data/tools/admin/{OutputDialog-B5qHVyck-5685928991e632d92ddf.js → OutputDialog-aZe2HT6j-4e83a904779077aaab69.js} +1 -1
  48. data/tools/admin/{PackagesTab-Bw34RkLc-a8bd901d60023aea57d0.js → PackagesTab-D5hNxd_X-360ace707dedab79d923.js} +1 -1
  49. data/tools/admin/{PluginsTab-C9t0-QVm-6573a228c03271a9a721.js → PluginsTab-BP8DYqd--a1dcf74e4ea1920c64cc.js} +2 -2
  50. data/tools/admin/{ProgressbarWidget-7cYr8136-1c12582ce9d4ff413a55.js → ProgressbarWidget-CDwDOFIy-b7de548e62e1d6dea1db.js} +1 -1
  51. data/tools/admin/{RadiobuttonWidget-DTfn-7F2-2fdf40f484b98c933b8e.js → RadiobuttonWidget-cQ8V8LaD-c3ce96d20d228ed736bb.js} +1 -1
  52. data/tools/admin/RadiogroupWidget-BvRnuGA2-dc18d57388cdc905a7ac.js +1 -0
  53. data/tools/admin/{RangebarWidget-CG2Y7eYp-376805c2784826569f50.js → RangebarWidget-aHmgV0qs-195fe90ec25be177a045.js} +1 -1
  54. data/tools/admin/{RedisTab-CvPLS0Qe-5d4a932e4970ba3ca803.js → RedisTab-D1-HQK-m-c71dc435602b87aa013d.js} +1 -1
  55. data/tools/admin/{RollupWidget-C6HKTfCR-2fee2f5abf13112784d3.js → RollupWidget-D1jUPrUQ-c8aec12f5161240b5d28.js} +1 -1
  56. data/tools/admin/{RoutersTab-D-ex_yMO-5fc215e92e7302a8075a.js → RoutersTab-CF0ADapt-5c32fb3f63f2b34fd1fd.js} +1 -1
  57. data/tools/admin/{ScrollwindowWidget-DvhBCYd2-1ca5ef1549a42b7ea26c.js → ScrollwindowWidget-Cn0o3b4E-d91d991867e4af348de0.js} +1 -1
  58. data/tools/admin/{SecretsTab-CLkJfzf--d880a0e1441849be64f2.js → SecretsTab-BAIHxgdM-eba9bde245220082bcfc.js} +1 -1
  59. data/tools/admin/{SettingsTab-CysOMBFu-96c27242035cd5ef53f0.js → SettingsTab-C2k0BDcX-e12c074d16d125846514.js} +1 -1
  60. data/tools/admin/{SignalWidget-BZIoGjam-517ce457178e055a0785.js → SignalWidget-BQBzqdU--683f84b63c1a5ec65f77.js} +1 -1
  61. data/tools/admin/{SimpleTextDialog-CGStqYvO-a8fcf03f2e92086fa44a.js → SimpleTextDialog-3EEsXpGl-a341ff22d5031bf2b5f9.js} +1 -1
  62. data/tools/admin/{SpacerWidget-YBS8RZIE-6f604070f76233e8abf6.js → SpacerWidget-C0RmQY3t-d438a4ab2e888170e61b.js} +1 -1
  63. data/tools/admin/{SparklineWidget-BMhY9vYe-330a5e7e3db2907e0b78.js → SparklineWidget-BTH9rvcX-3ad31ebbc940d444a503.js} +1 -1
  64. data/tools/admin/TabbookWidget-C-aDdEoD-5dccca344b01e06516fd.js +1 -0
  65. data/tools/admin/{TargetsTab-CfBt-dZW-af29d3abcec34f39d21d.js → TargetsTab-DAmlfJ9Z-985a6f7882eec7083cb2.js} +1 -1
  66. data/tools/admin/TextboxWidget-Dd2ccpUQ-46af1553c645fbca0d0a.js +1 -0
  67. data/tools/admin/TextfieldWidget-DY3aFTnP-8f961f7e7dc21bacabe1.js +1 -0
  68. data/tools/admin/{TimeWidget-CQzn13rQ-dde78e9108545bc47090.js → TimeWidget-C_site21-ba762ef597b81ab878df.js} +1 -1
  69. data/tools/admin/TitleWidget-Bx81VfQD-655388ab39aa6405caee.js +1 -0
  70. data/tools/admin/{ToolsTab-CnhhRS3J-57d6ddffd01325622abb.js → ToolsTab-CW_TQ53O-afc510a63929f4e2f203.js} +2 -2
  71. data/tools/admin/{VWidget-iASFPjdx-14bb7ec00b6bb0823126.js → VWidget-DuUens7G-e35701680fc49f443832.js} +1 -1
  72. data/tools/admin/{ValueWidget-BVI6uUVX-3d7edd0290c877d1cbb8.js → ValueWidget-cbjxVV3B-889a66573876672a3366.js} +1 -1
  73. data/tools/admin/{ValuelimitsbarWidget-BiIcery0-86e4d3b97524111adad6.js → ValuelimitsbarWidget-cQb2o_xH-60f15aa0ca30d7b52ba7.js} +1 -1
  74. data/tools/admin/{ValuelimitscolumnWidget-BiRI8GbI-2b9bd816bf467264a76d.js → ValuelimitscolumnWidget-BBTuSCK9-f03888294f187a7c6dcc.js} +1 -1
  75. data/tools/admin/{ValuerangebarWidget-CtMFQu9--3192b0e9ed894b0a92c2.js → ValuerangebarWidget-Ct7iGtu0-6eda1de3ba1e2d0c069a.js} +1 -1
  76. data/tools/admin/{VerticalWidget-CRmcpQBn-52ff42eb62875348fc5a.js → VerticalWidget-DJn02myf-f004381a5ced4329d2a5.js} +1 -1
  77. data/tools/admin/VerticalboxWidget-DHQMxtF3-9d0671aa48d3588305c3.js +1 -0
  78. data/tools/admin/{Widget-CFEnOKms-b56cb1cdd01a85ba35b8.js → Widget-CP2CtyUr-c8a8622a88dee144641c.js} +1 -1
  79. data/tools/admin/{main-261a03f701466d100c9b.js → main-db6b82ad3670bbb76dc8.js} +44 -44
  80. data/tools/admin/main.js +1 -1
  81. metadata +80 -80
  82. data/tools/admin/CanvasWidget-bVkufjRQ-67d07bc7c7e068b64f55.js +0 -1
  83. data/tools/admin/CanvasdotWidget-DpniFfca-45fb1bde56856286c38d.js +0 -1
  84. data/tools/admin/CanvaslabelWidget-D-XAMifp-41af33bdafdfcfaeca35.js +0 -1
  85. data/tools/admin/CheckbuttonWidget-ByH-PDRG-626ee1d1d84173983d50.js +0 -1
  86. data/tools/admin/ComboboxWidget-Bdm_fMzW-cab3c8e434fe2c88bab1.js +0 -1
  87. data/tools/admin/HorizontallineWidget-DZvOYFxf-5f8d348b3e905046cbc4.js +0 -1
  88. data/tools/admin/LabelledWidget-Bic36les-b854193849403490d15f.js +0 -1
  89. data/tools/admin/LabelsparklineWidget-DLhmqO02-5615de2dfe11c3bc1e0e.js +0 -1
  90. data/tools/admin/LabelvaluelimitsbarWidget-pq7qoolL-799f04ee161ac207990e.js +0 -1
  91. data/tools/admin/LabelvaluelimitscolumnWidget-edkpogsl-cc8cb37331d149620877.js +0 -1
  92. data/tools/admin/LabelvaluerangebarWidget-DpJNv9dh-69d6c63a5b945223a268.js +0 -1
  93. data/tools/admin/Layout-B0hvhBQO-e6d9491c66fb7999ee9f.js +0 -1
  94. data/tools/admin/LinegraphWidget-DTLZmyWs-72c6387f595a0a4013be.js +0 -1
  95. data/tools/admin/RadiogroupWidget-DWvTpw94-72c898511170802d814f.js +0 -1
  96. data/tools/admin/TabbookWidget-RfET19pq-f131be0ee6a50775a079.js +0 -1
  97. data/tools/admin/TextboxWidget-M8vFBSxS-8d0b53e2f7eebf969abb.js +0 -1
  98. data/tools/admin/TextfieldWidget-Dev7lCsT-b4e43b129c8b8b194dba.js +0 -1
  99. data/tools/admin/TitleWidget-C4zbSian-f6fd7ad5542875ddd1c9.js +0 -1
  100. data/tools/admin/VerticalboxWidget-C-qChjug-a7cdc3ed315048ef8b50.js +0 -1
@@ -1,4 +1,4 @@
1
- System.register(["vue","vue-router","single-spa","vuex","vuetify"],function(sr,rt){"use strict";var Ue,Xt,lt,Fe,We,gn,fr,ff,pf,gf,_n,Li,Xi,Ht,fl,tu,Ur,is,js,ka,mf,vf,yf,bf,nu,wf,xf,Cf,kf,ru,_f,Sf,Af,Tf,$f,Mf,Ef;return{setters:[Et=>{Ue=Et.resolveComponent,Xt=Et.createBlock,lt=Et.openBlock,Fe=Et.withCtx,We=Et.createVNode,gn=Et.createElementBlock,fr=Et.createElementVNode,ff=Et.useCssVars,pf=Et.defineAsyncComponent,gf=Et.Teleport,_n=Et.toDisplayString,Li=Et.Fragment,Xi=Et.renderList,Ht=Et.createTextVNode,fl=Et.mergeProps,tu=Et.createSlots,Ur=Et.createCommentVNode,is=Et.normalizeStyle,js=Et.h,ka=Et.withModifiers,mf=Et.toRaw,vf=Et.defineComponent,yf=Et.warn,bf=Et.inject,nu=Et.computed,wf=Et.shallowRef,xf=Et.watchEffect,Cf=Et.getCurrentInstance,kf=Et.provide,ru=Et.createApp,_f=Et.withDirectives,Sf=Et.vShow},Et=>{Af=Et.createRouter,Tf=Et.createWebHistory},Et=>{$f=Et.getMountedApps},Et=>{Mf=Et.createStore},Et=>{Ef=Et.createVuetify}],execute:function(){sr({$:Pf,a:No,f:_M,l:Tn,m:Ar,y:er,z:cd});var Et=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function If(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(f){return Object.getOwnPropertyDescriptor(t,f).enumerable})),n.push.apply(n,r)}return n}function os(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?If(Object(n),!0).forEach(function(r){ew(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):If(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function ew(t,e,n){return(e=function(r){var f=function(d,p){if(ss(d)!=="object"||d===null)return d;var b=d[Symbol.toPrimitive];if(b!==void 0){var h=b.call(d,p);if(ss(h)!=="object")return h;throw new TypeError("@@toPrimitive must return a primitive value.")}return(p==="string"?String:Number)(d)}(r,"string");return ss(f)==="symbol"?f:String(f)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ss(t){return ss=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ss(t)}(function(t){if(t.CSS&&t.CSS.escape)return t.CSS.escape;var e=function(n){if(arguments.length==0)throw new TypeError("`CSS.escape` requires an argument.");for(var r,f=String(n),d=f.length,p=-1,b="",h=f.charCodeAt(0);++p<d;)(r=f.charCodeAt(p))!=0?b+=r>=1&&r<=31||r==127||p==0&&r>=48&&r<=57||p==1&&r>=48&&r<=57&&h==45?"\\"+r.toString(16)+" ":p==0&&d==1&&r==45||!(r>=128||r==45||r==95||r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122)?"\\"+f.charAt(p):f.charAt(p):b+="�";return b};t.CSS||(t.CSS={}),t.CSS.escape=e})(Et);var tw={appOptions:null,template:null,Vue:null,createApp:null,handleInstance:null};function nw(t){if(ss(t)!=="object")throw new Error("single-spa-vue requires a configuration object");var e=os(os({},tw),t);if(!e.Vue&&!e.createApp)throw Error("single-spa-vue must be passed opts.Vue or opts.createApp");if(!e.appOptions)throw Error("single-spa-vue must be passed opts.appOptions");if(e.appOptions.el&&typeof e.appOptions.el!="string"&&!(e.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(ss(e.appOptions.el)));e.createApp=e.createApp||e.Vue&&e.Vue.createApp;var n={};return{bootstrap:rw.bind(null,e,n),mount:iw.bind(null,e,n),unmount:sw.bind(null,e,n),update:ow.bind(null,e,n)}}function rw(t){return t.loadRootComponent?t.loadRootComponent().then(function(e){return t.rootComponent=e}):Promise.resolve()}function iw(t,e,n){var r={};return Promise.resolve().then(function(){return function(f,d){return typeof f.appOptions=="function"?f.appOptions(d):Promise.resolve(os({},f.appOptions))}(t,n).then(function(f){var d;if(n.domElement&&!f.el&&(f.el=n.domElement),f.el)if(typeof f.el=="string"){if(!(d=document.querySelector(f.el)))throw Error("If appOptions.el is provided to single-spa-vue, the dom element must exist in the dom. Was provided as ".concat(f.el))}else(d=f.el).id||(d.id="single-spa-application:".concat(n.name)),f.el="#".concat(CSS.escape(d.id));else{var p="single-spa-application:".concat(n.name);f.el="#".concat(CSS.escape(p)),(d=document.getElementById(p))||((d=document.createElement("div")).id=p,document.body.appendChild(d))}if(!t.replaceMode&&(f.el=f.el+" .single-spa-container",!d.querySelector(".single-spa-container"))){var b=document.createElement("div");b.className="single-spa-container",d.appendChild(b)}r.domEl=d,f.render||f.template||!t.rootComponent||(f.render=function(g){return g(t.rootComponent)}),f.data||(f.data={});var h=f.data;if(f.data=function(){return os(os({},typeof h=="function"?h.call(this,this):h),n)},t.createApp){if(r.vueInstance=t.createApp(f),t.handleInstance)return Promise.resolve(t.handleInstance(r.vueInstance,n)).then(function(){return r.root=r.vueInstance.mount(f.el),e[n.name]=r,r.vueInstance});r.root=r.vueInstance.mount(f.el)}else if(r.vueInstance=new t.Vue(f),r.vueInstance.bind&&(r.vueInstance=r.vueInstance.bind(r.vueInstance)),t.handleInstance)return Promise.resolve(t.handleInstance(r.vueInstance,n)).then(function(){return e[n.name]=r,r.vueInstance});return e[n.name]=r,r.vueInstance})})}function ow(t,e,n){return Promise.resolve().then(function(){var r=e[n.name],f=os(os({},t.appOptions.data||{}),n),d=r.root||r.vueInstance;for(var p in f)d[p]=f[p]})}function sw(t,e,n){return Promise.resolve().then(function(){var r=e[n.name];t.createApp?r.vueInstance.unmount(r.domEl):(r.vueInstance.$destroy(),r.vueInstance.$el.innerHTML=""),delete r.vueInstance,r.domEl&&(r.domEl.innerHTML="",delete r.domEl)})}const aw=(t,e)=>{const n=t.__vccOpts||t;for(const[r,f]of e)n[r]=f;return n},lw={};function cw(t,e){const n=Ue("router-view"),r=Ue("v-app");return lt(),Xt(r,{id:"innerapp"},{default:Fe(()=>[We(n)]),_:1})}const uw=aw(lw,[["render",cw]]),Lf=function(t){var e;!t.name!=="NotFound"&&(t.path=`/tools/admin/${t.path.replace(/^\//,"")}`),(e=t.children)==null||e.forEach(Lf)},GD="modulepreload",YD=function(t){return"/"+t},XD={},it=function(e,n,r){let f=Promise.resolve();function d(p){const b=new Event("vite:preloadError",{cancelable:!0});if(b.payload=p,window.dispatchEvent(b),!b.defaultPrevented)throw p}return f.then(p=>{for(const b of p||[])b.status==="rejected"&&d(b.reason);return e().catch(d)})},Ri=sr("d",(t,e)=>{const n=t.__vccOpts||t;for(const[r,f]of e)n[r]=f;return n}),hw="/icons/customIcons.svg",iu={props:{icon:{type:String},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{iconSrc:function(){return hw+"#"+this.icon}}},Rf=()=>{ff(t=>({"259824e2":t.color}))},Of=iu.setup;iu.setup=Of?(t,e)=>(Rf(),Of(t,e)):Rf;const dw={class:"cosmos-custom-icon"},fw={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",preserveAspectRatio:"xMidYMid meet",focusable:"false"},pw=["href"];function gw(t,e,n,r,f,d){return lt(),gn("span",dw,[(lt(),gn("svg",fw,[fr("use",{href:d.iconSrc},null,8,pw)]))])}const mw=Ri(iu,[["render",gw],["__scopeId","data-v-4b6f1199"]]),pl=6e4,ou=36e5,vw=1e3,Df=Symbol.for("constructDateFrom");function er(t,e){return typeof t=="function"?t(e):t&&typeof t=="object"&&Df in t?t[Df](e):t instanceof Date?new t.constructor(e):new Date(e)}function Tn(t,e){return er(e||t,t)}let yw={};function zs(){return yw}function Oo(t,e){var n,r,f,d;const p=zs(),b=(e==null?void 0:e.weekStartsOn)??((r=(n=e==null?void 0:e.locale)==null?void 0:n.options)==null?void 0:r.weekStartsOn)??p.weekStartsOn??((d=(f=p.locale)==null?void 0:f.options)==null?void 0:d.weekStartsOn)??0,h=Tn(t,e==null?void 0:e.in),g=h.getDay(),s=(g<b?7:0)+g-b;return h.setDate(h.getDate()-s),h.setHours(0,0,0,0),h}function Hs(t,e){return Oo(t,{...e,weekStartsOn:1})}function Nf(t,e){const n=Tn(t,void 0),r=n.getFullYear(),f=er(n,0);f.setFullYear(r+1,0,4),f.setHours(0,0,0,0);const d=Hs(f),p=er(n,0);p.setFullYear(r,0,4),p.setHours(0,0,0,0);const b=Hs(p);return n.getTime()>=d.getTime()?r+1:n.getTime()>=b.getTime()?r:r-1}function gl(t){const e=Tn(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function bw(t,...e){const n=er.bind(null,e.find(r=>typeof r=="object"));return e.map(n)}function Ff(t,e){const n=Tn(t,void 0);return n.setHours(0,0,0,0),n}function ww(t,e,n){const[r,f]=bw(void 0,t,e),d=Ff(r),p=Ff(f),b=+d-gl(d),h=+p-gl(p);return Math.round((b-h)/864e5)}function xw(t,e){const n=Nf(t),r=er(t,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Hs(r)}function Cw(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function Pf(t){return!(!Cw(t)&&typeof t!="number"||isNaN(+Tn(t)))}function kw(t,e){const n=Tn(t,void 0);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const _w={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"}},Sw=(t,e,n)=>{let r;const f=_w[t];return typeof f=="string"?r=f:e===1?r=f.one:r=f.other.replace("{{count}}",e.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function su(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const Aw={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Tw={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},$w={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Mw={date:su({formats:Aw,defaultWidth:"full"}),time:su({formats:Tw,defaultWidth:"full"}),dateTime:su({formats:$w,defaultWidth:"full"})},Ew={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Iw=(t,e,n,r)=>Ew[t];function _a(t){return(e,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let f;if(r==="formatting"&&t.formattingValues){const p=t.defaultFormattingWidth||t.defaultWidth,b=n!=null&&n.width?String(n.width):p;f=t.formattingValues[b]||t.formattingValues[p]}else{const p=t.defaultWidth,b=n!=null&&n.width?String(n.width):t.defaultWidth;f=t.values[b]||t.values[p]}const d=t.argumentCallback?t.argumentCallback(e):e;return f[d]}}const Lw={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Rw={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Ow={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"]},Dw={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"]},Nw={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"}},Fw={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"}},Pw=(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Bw={ordinalNumber:Pw,era:_a({values:Lw,defaultWidth:"wide"}),quarter:_a({values:Rw,defaultWidth:"wide",argumentCallback:t=>t-1}),month:_a({values:Ow,defaultWidth:"wide"}),day:_a({values:Dw,defaultWidth:"wide"}),dayPeriod:_a({values:Nw,defaultWidth:"wide",formattingValues:Fw,defaultFormattingWidth:"wide"})};function Sa(t){return(e,n={})=>{const r=n.width,f=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],d=e.match(f);if(!d)return null;const p=d[0],b=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],h=Array.isArray(b)?jw(b,a=>a.test(p)):Ww(b,a=>a.test(p));let g;g=t.valueCallback?t.valueCallback(h):h,g=n.valueCallback?n.valueCallback(g):g;const s=e.slice(p.length);return{value:g,rest:s}}}function Ww(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function jw(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return n}function zw(t){return(e,n={})=>{const r=e.match(t.matchPattern);if(!r)return null;const f=r[0],d=e.match(t.parsePattern);if(!d)return null;let p=t.valueCallback?t.valueCallback(d[0]):d[0];p=n.valueCallback?n.valueCallback(p):p;const b=e.slice(f.length);return{value:p,rest:b}}}const Hw=/^(\d+)(th|st|nd|rd)?/i,Uw=/\d+/i,Vw={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},qw={any:[/^b/i,/^(a|c)/i]},Kw={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Gw={any:[/1/i,/2/i,/3/i,/4/i]},Yw={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},Xw={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]},Qw={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},Zw={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]},Jw={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},e1={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}},t1={ordinalNumber:zw({matchPattern:Hw,parsePattern:Uw,valueCallback:t=>parseInt(t,10)}),era:Sa({matchPatterns:Vw,defaultMatchWidth:"wide",parsePatterns:qw,defaultParseWidth:"any"}),quarter:Sa({matchPatterns:Kw,defaultMatchWidth:"wide",parsePatterns:Gw,defaultParseWidth:"any",valueCallback:t=>t+1}),month:Sa({matchPatterns:Yw,defaultMatchWidth:"wide",parsePatterns:Xw,defaultParseWidth:"any"}),day:Sa({matchPatterns:Qw,defaultMatchWidth:"wide",parsePatterns:Zw,defaultParseWidth:"any"}),dayPeriod:Sa({matchPatterns:Jw,defaultMatchWidth:"any",parsePatterns:e1,defaultParseWidth:"any"})},Bf={code:"en-US",formatDistance:Sw,formatLong:Mw,formatRelative:Iw,localize:Bw,match:t1,options:{weekStartsOn:0,firstWeekContainsDate:1}};function n1(t,e){const n=Tn(t,void 0);return ww(n,kw(n))+1}function Wf(t,e){const n=Tn(t,void 0),r=+Hs(n)-+xw(n);return Math.round(r/6048e5)+1}function au(t,e){var n,r,f,d;const p=Tn(t,e==null?void 0:e.in),b=p.getFullYear(),h=zs(),g=(e==null?void 0:e.firstWeekContainsDate)??((r=(n=e==null?void 0:e.locale)==null?void 0:n.options)==null?void 0:r.firstWeekContainsDate)??h.firstWeekContainsDate??((d=(f=h.locale)==null?void 0:f.options)==null?void 0:d.firstWeekContainsDate)??1,s=er((e==null?void 0:e.in)||t,0);s.setFullYear(b+1,0,g),s.setHours(0,0,0,0);const a=Oo(s,e),c=er((e==null?void 0:e.in)||t,0);c.setFullYear(b,0,g),c.setHours(0,0,0,0);const l=Oo(c,e);return+p>=+a?b+1:+p>=+l?b:b-1}function r1(t,e){var n,r,f,d;const p=zs(),b=(e==null?void 0:e.firstWeekContainsDate)??((r=(n=e==null?void 0:e.locale)==null?void 0:n.options)==null?void 0:r.firstWeekContainsDate)??p.firstWeekContainsDate??((d=(f=p.locale)==null?void 0:f.options)==null?void 0:d.firstWeekContainsDate)??1,h=au(t,e),g=er((e==null?void 0:e.in)||t,0);return g.setFullYear(h,0,b),g.setHours(0,0,0,0),Oo(g,e)}function jf(t,e){const n=Tn(t,e==null?void 0:e.in),r=+Oo(n,e)-+r1(n,e);return Math.round(r/6048e5)+1}function hn(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const Do={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return hn(e==="yy"?r%100:r,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):hn(n+1,2)},d(t,e){return hn(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(t,e){return hn(t.getHours()%12||12,e.length)},H(t,e){return hn(t.getHours(),e.length)},m(t,e){return hn(t.getMinutes(),e.length)},s(t,e){return hn(t.getSeconds(),e.length)},S(t,e){const n=e.length,r=t.getMilliseconds(),f=Math.trunc(r*Math.pow(10,n-3));return hn(f,e.length)}},Us={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},zf={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const r=t.getFullYear(),f=r>0?r:1-r;return n.ordinalNumber(f,{unit:"year"})}return Do.y(t,e)},Y:function(t,e,n,r){const f=au(t,r),d=f>0?f:1-f;if(e==="YY"){const p=d%100;return hn(p,2)}return e==="Yo"?n.ordinalNumber(d,{unit:"year"}):hn(d,e.length)},R:function(t,e){const n=Nf(t);return hn(n,e.length)},u:function(t,e){const n=t.getFullYear();return hn(n,e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return hn(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return hn(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return Do.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return hn(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const f=jf(t,r);return e==="wo"?n.ordinalNumber(f,{unit:"week"}):hn(f,e.length)},I:function(t,e,n){const r=Wf(t);return e==="Io"?n.ordinalNumber(r,{unit:"week"}):hn(r,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):Do.d(t,e)},D:function(t,e,n){const r=n1(t);return e==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):hn(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const f=t.getDay(),d=(f-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(d);case"ee":return hn(d,2);case"eo":return n.ordinalNumber(d,{unit:"day"});case"eee":return n.day(f,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(f,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(f,{width:"short",context:"formatting"});case"eeee":default:return n.day(f,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const f=t.getDay(),d=(f-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(d);case"cc":return hn(d,e.length);case"co":return n.ordinalNumber(d,{unit:"day"});case"ccc":return n.day(f,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(f,{width:"narrow",context:"standalone"});case"cccccc":return n.day(f,{width:"short",context:"standalone"});case"cccc":default:return n.day(f,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),f=r===0?7:r;switch(e){case"i":return String(f);case"ii":return hn(f,e.length);case"io":return n.ordinalNumber(f,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const r=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let f;switch(r===12?f=Us.noon:r===0?f=Us.midnight:f=r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(f,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(f,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(f,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(f,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let f;switch(r>=17?f=Us.evening:r>=12?f=Us.afternoon:r>=4?f=Us.morning:f=Us.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(f,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(f,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(f,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let r=t.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Do.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):Do.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return e==="Ko"?n.ordinalNumber(r,{unit:"hour"}):hn(r,e.length)},k:function(t,e,n){let r=t.getHours();return r===0&&(r=24),e==="ko"?n.ordinalNumber(r,{unit:"hour"}):hn(r,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):Do.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):Do.s(t,e)},S:function(t,e){return Do.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return Uf(r);case"XXXX":case"XX":return as(r);case"XXXXX":case"XXX":default:return as(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return Uf(r);case"xxxx":case"xx":return as(r);case"xxxxx":case"xxx":default:return as(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Hf(r,":");case"OOOO":default:return"GMT"+as(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Hf(r,":");case"zzzz":default:return"GMT"+as(r,":")}},t:function(t,e,n){const r=Math.trunc(+t/1e3);return hn(r,e.length)},T:function(t,e,n){return hn(+t,e.length)}};function Hf(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),f=Math.trunc(r/60),d=r%60;return d===0?n+String(f):n+String(f)+e+hn(d,2)}function Uf(t,e){return t%60===0?(t>0?"-":"+")+hn(Math.abs(t)/60,2):as(t,e)}function as(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),f=hn(Math.trunc(r/60),2),d=hn(r%60,2);return n+f+e+d}const Vf=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},qf=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},i1=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],f=n[2];if(!f)return Vf(t,e);let d;switch(r){case"P":d=e.dateTime({width:"short"});break;case"PP":d=e.dateTime({width:"medium"});break;case"PPP":d=e.dateTime({width:"long"});break;case"PPPP":default:d=e.dateTime({width:"full"});break}return d.replace("{{date}}",Vf(r,e)).replace("{{time}}",qf(f,e))},lu={p:qf,P:i1},o1=/^D+$/,s1=/^Y+$/,a1=["D","DD","YY","YYYY"];function Kf(t){return o1.test(t)}function Gf(t){return s1.test(t)}function cu(t,e,n){const r=l1(t,e,n);if(console.warn(r),a1.includes(t))throw new RangeError(r)}function l1(t,e,n){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const c1=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,u1=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,h1=/^'([^]*?)'?$/,d1=/''/g,f1=/[a-zA-Z]/;function No(t,e,n){var r,f,d,p,b,h,g,s;const a=zs(),c=(n==null?void 0:n.locale)??a.locale??Bf,l=(n==null?void 0:n.firstWeekContainsDate)??((f=(r=n==null?void 0:n.locale)==null?void 0:r.options)==null?void 0:f.firstWeekContainsDate)??a.firstWeekContainsDate??((p=(d=a.locale)==null?void 0:d.options)==null?void 0:p.firstWeekContainsDate)??1,o=(n==null?void 0:n.weekStartsOn)??((h=(b=n==null?void 0:n.locale)==null?void 0:b.options)==null?void 0:h.weekStartsOn)??a.weekStartsOn??((s=(g=a.locale)==null?void 0:g.options)==null?void 0:s.weekStartsOn)??0,u=Tn(t,n==null?void 0:n.in);if(!Pf(u))throw new RangeError("Invalid time value");let m=e.match(u1).map(x=>{const E=x[0];if(E==="p"||E==="P"){const T=lu[E];return T(x,c.formatLong)}return x}).join("").match(c1).map(x=>{if(x==="''")return{isToken:!1,value:"'"};const E=x[0];if(E==="'")return{isToken:!1,value:p1(x)};if(zf[E])return{isToken:!0,value:x};if(E.match(f1))throw new RangeError("Format string contains an unescaped latin alphabet character `"+E+"`");return{isToken:!1,value:x}});c.localize.preprocessor&&(m=c.localize.preprocessor(u,m));const w={firstWeekContainsDate:l,weekStartsOn:o,locale:c};return m.map(x=>{if(!x.isToken)return x.value;const E=x.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&Gf(E)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&Kf(E))&&cu(E,e,String(t));const T=zf[E[0]];return T(u,E,c.localize,w)}).join("")}function p1(t){const e=t.match(h1);return e?e[1].replace(d1,"'"):t}var Fo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ml(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Yf={exports:{}},Xf;function g1(){return Xf||(Xf=1,function(t,e){(function(){var n="ace",r=function(){return this}();!r&&typeof window<"u"&&(r=window);var f=function(s,a,c){if(typeof s!="string"){f.original?f.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(c=a),f.modules[s]||(f.payloads[s]=c,f.modules[s]=null)};f.modules={},f.payloads={};var d=function(s,a,c){if(typeof a=="string"){var l=h(s,a);if(l!=null)return c&&c(),l}else if(Object.prototype.toString.call(a)==="[object Array]"){for(var o=[],u=0,m=a.length;u<m;++u){var w=h(s,a[u]);if(w==null&&p.original)return;o.push(w)}return c&&c.apply(null,o)||!0}},p=function(s,a){var c=d("",s,a);return c==null&&p.original?p.original.apply(this,arguments):c},b=function(s,a){if(a.indexOf("!")!==-1){var c=a.split("!");return b(s,c[0])+"!"+b(s,c[1])}if(a.charAt(0)=="."){var l=s.split("/").slice(0,-1).join("/");for(a=l+"/"+a;a.indexOf(".")!==-1&&o!=a;){var o=a;a=a.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return a},h=function(s,a){a=b(s,a);var c=f.modules[a];if(!c){if(c=f.payloads[a],typeof c=="function"){var l={},o={id:a,uri:"",exports:l,packaged:!0},u=function(w,x){return d(a,w,x)},m=c(u,l,o);l=m||o.exports,f.modules[a]=l,delete f.payloads[a]}c=f.modules[a]=l||c}return c};function g(s){var a=r;r[s]||(r[s]={}),a=r[s],(!a.define||!a.define.packaged)&&(f.original=a.define,a.define=f,a.define.packaged=!0),(!a.require||!a.require.packaged)&&(p.original=a.require,a.require=p,a.require.packaged=!0)}g(n)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(n,r,f){function d(p,b,h){Object.defineProperty(p,b,{value:h,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||d(String.prototype,"startsWith",function(p,b){return b=b||0,this.lastIndexOf(p,b)===b}),String.prototype.endsWith||d(String.prototype,"endsWith",function(p,b){var h=this;(b===void 0||b>h.length)&&(b=h.length),b-=p.length;var g=h.indexOf(p,b);return g!==-1&&g===b}),String.prototype.repeat||d(String.prototype,"repeat",function(p){for(var b="",h=this;p>0;)p&1&&(b+=h),(p>>=1)&&(h+=h);return b}),String.prototype.includes||d(String.prototype,"includes",function(p,b){return this.indexOf(p,b)!=-1}),Object.assign||(Object.assign=function(p){if(p==null)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(p),h=1;h<arguments.length;h++){var g=arguments[h];g!=null&&Object.keys(g).forEach(function(s){b[s]=g[s]})}return b}),Object.values||(Object.values=function(p){return Object.keys(p).map(function(b){return p[b]})}),Array.prototype.find||d(Array.prototype,"find",function(p){for(var b=this.length,h=arguments[1],g=0;g<b;g++){var s=this[g];if(p.call(h,s,g,this))return s}}),Array.prototype.findIndex||d(Array.prototype,"findIndex",function(p){for(var b=this.length,h=arguments[1],g=0;g<b;g++){var s=this[g];if(p.call(h,s,g,this))return g}}),Array.prototype.includes||d(Array.prototype,"includes",function(p,b){return this.indexOf(p,b)!=-1}),Array.prototype.fill||d(Array.prototype,"fill",function(p){for(var b=this,h=b.length>>>0,g=arguments[1],s=g>>0,a=s<0?Math.max(h+s,0):Math.min(s,h),c=arguments[2],l=c===void 0?h:c>>0,o=l<0?Math.max(h+l,0):Math.min(l,h);a<o;)b[a]=p,a++;return b}),Array.of||d(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(n,r,f){n("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(n,r,f){r.deepCopy=function d(p){if(typeof p!="object"||!p)return p;var b;if(Array.isArray(p)){b=[];for(var h=0;h<p.length;h++)b[h]=d(p[h]);return b}if(Object.prototype.toString.call(p)!=="[object Object]")return p;b={};for(var h in p)b[h]=d(p[h]);return b}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(n,r,f){r.last=function(b){return b[b.length-1]},r.stringReverse=function(b){return b.split("").reverse().join("")},r.stringRepeat=function(b,h){for(var g="";h>0;)h&1&&(g+=b),(h>>=1)&&(b+=b);return g};var d=/^\s\s*/,p=/\s\s*$/;r.stringTrimLeft=function(b){return b.replace(d,"")},r.stringTrimRight=function(b){return b.replace(p,"")},r.copyObject=function(b){var h={};for(var g in b)h[g]=b[g];return h},r.copyArray=function(b){for(var h=[],g=0,s=b.length;g<s;g++)b[g]&&typeof b[g]=="object"?h[g]=this.copyObject(b[g]):h[g]=b[g];return h},r.deepCopy=n("./deep_copy").deepCopy,r.arrayToMap=function(b){for(var h={},g=0;g<b.length;g++)h[b[g]]=1;return h},r.createMap=function(b){var h=Object.create(null);for(var g in b)h[g]=b[g];return h},r.arrayRemove=function(b,h){for(var g=0;g<=b.length;g++)h===b[g]&&b.splice(g,1)},r.escapeRegExp=function(b){return b.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},r.escapeHTML=function(b){return(""+b).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},r.getMatchOffsets=function(b,h){var g=[];return b.replace(h,function(s){g.push({offset:arguments[arguments.length-2],length:s.length})}),g},r.deferredCall=function(b){var h=null,g=function(){h=null,b()},s=function(a){return s.cancel(),h=setTimeout(g,a||0),s};return s.schedule=s,s.call=function(){return this.cancel(),b(),s},s.cancel=function(){return clearTimeout(h),h=null,s},s.isPending=function(){return h},s},r.delayedCall=function(b,h){var g=null,s=function(){g=null,b()},a=function(c){g==null&&(g=setTimeout(s,c||h))};return a.delay=function(c){g&&clearTimeout(g),g=setTimeout(s,c||h)},a.schedule=a,a.call=function(){this.cancel(),b()},a.cancel=function(){g&&clearTimeout(g),g=null},a.isPending=function(){return g},a},r.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},r.skipEmptyMatch=function(b,h,g){return g&&b.codePointAt(h)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(n,r,f){r.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},r.getOS=function(){return r.isMac?r.OS.MAC:r.isLinux?r.OS.LINUX:r.OS.WINDOWS};var d=typeof navigator=="object"?navigator:{},p=(/mac|win|linux/i.exec(d.platform)||["other"])[0].toLowerCase(),b=d.userAgent||"",h=d.appName||"";r.isWin=p=="win",r.isMac=p=="mac",r.isLinux=p=="linux",r.isIE=h=="Microsoft Internet Explorer"||h.indexOf("MSAppHost")>=0?parseFloat((b.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((b.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),r.isOldIE=r.isIE&&r.isIE<9,r.isGecko=r.isMozilla=b.match(/ Gecko\/\d+/),r.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",r.isWebKit=parseFloat(b.split("WebKit/")[1])||void 0,r.isChrome=parseFloat(b.split(" Chrome/")[1])||void 0,r.isSafari=parseFloat(b.split(" Safari/")[1])&&!r.isChrome||void 0,r.isEdge=parseFloat(b.split(" Edge/")[1])||void 0,r.isAIR=b.indexOf("AdobeAIR")>=0,r.isAndroid=b.indexOf("Android")>=0,r.isChromeOS=b.indexOf(" CrOS ")>=0,r.isIOS=/iPad|iPhone|iPod/.test(b)&&!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(n,r,f){var d=n("./useragent"),p="http://www.w3.org/1999/xhtml";r.buildDom=function c(l,o,u){if(typeof l=="string"&&l){var m=document.createTextNode(l);return o&&o.appendChild(m),m}if(!Array.isArray(l))return l&&l.appendChild&&o&&o.appendChild(l),l;if(typeof l[0]!="string"||!l[0]){for(var w=[],x=0;x<l.length;x++){var E=c(l[x],o,u);E&&w.push(E)}return w}var T=document.createElement(l[0]),k=l[1],C=1;k&&typeof k=="object"&&!Array.isArray(k)&&(C=2);for(var x=C;x<l.length;x++)c(l[x],T,u);return C==2&&Object.keys(k).forEach(function(L){var R=k[L];L==="class"?T.className=Array.isArray(R)?R.join(" "):R:typeof R=="function"||L=="value"||L[0]=="$"?T[L]=R:L==="ref"?u&&(u[R]=T):L==="style"?typeof R=="string"&&(T.style.cssText=R):R!=null&&T.setAttribute(L,R)}),o&&o.appendChild(T),T},r.getDocumentHead=function(c){return c||(c=document),c.head||c.getElementsByTagName("head")[0]||c.documentElement},r.createElement=function(c,l){return document.createElementNS?document.createElementNS(l||p,c):document.createElement(c)},r.removeChildren=function(c){c.innerHTML=""},r.createTextNode=function(c,l){var o=l?l.ownerDocument:document;return o.createTextNode(c)},r.createFragment=function(c){var l=c?c.ownerDocument:document;return l.createDocumentFragment()},r.hasCssClass=function(c,l){var o=(c.className+"").split(/\s+/g);return o.indexOf(l)!==-1},r.addCssClass=function(c,l){r.hasCssClass(c,l)||(c.className+=" "+l)},r.removeCssClass=function(c,l){for(var o=c.className.split(/\s+/g);;){var u=o.indexOf(l);if(u==-1)break;o.splice(u,1)}c.className=o.join(" ")},r.toggleCssClass=function(c,l){for(var o=c.className.split(/\s+/g),u=!0;;){var m=o.indexOf(l);if(m==-1)break;u=!1,o.splice(m,1)}return u&&o.push(l),c.className=o.join(" "),u},r.setCssClass=function(c,l,o){o?r.addCssClass(c,l):r.removeCssClass(c,l)},r.hasCssString=function(c,l){var o=0,u;if(l=l||document,u=l.querySelectorAll("style")){for(;o<u.length;)if(u[o++].id===c)return!0}},r.removeElementById=function(c,l){l=l||document,l.getElementById(c)&&l.getElementById(c).remove()};var b,h=[];r.useStrictCSP=function(c){b=c,c==!1?g():h||(h=[])};function g(){var c=h;h=null,c&&c.forEach(function(l){s(l[0],l[1])})}function s(c,l,o){if(!(typeof document>"u")){if(h){if(o)g();else if(o===!1)return h.push([c,l])}if(!b){var u=o;!o||!o.getRootNode?u=document:(u=o.getRootNode(),(!u||u==o)&&(u=document));var m=u.ownerDocument||u;if(l&&r.hasCssString(l,u))return null;l&&(c+=`
1
+ System.register(["vue","vue-router","single-spa","vuex","vuetify"],function(sr,rt){"use strict";var Ue,Xt,st,Fe,We,hn,fr,ff,pf,gf,yn,ri,Xi,Pt,fl,nu,Ur,is,js,ka,mf,vf,yf,bf,ru,wf,xf,Cf,kf,iu,_f,Sf,Af,Tf,$f,Mf,Ef;return{setters:[Et=>{Ue=Et.resolveComponent,Xt=Et.createBlock,st=Et.openBlock,Fe=Et.withCtx,We=Et.createVNode,hn=Et.createElementBlock,fr=Et.createElementVNode,ff=Et.useCssVars,pf=Et.defineAsyncComponent,gf=Et.Teleport,yn=Et.toDisplayString,ri=Et.Fragment,Xi=Et.renderList,Pt=Et.createTextVNode,fl=Et.mergeProps,nu=Et.createSlots,Ur=Et.createCommentVNode,is=Et.normalizeStyle,js=Et.h,ka=Et.withModifiers,mf=Et.toRaw,vf=Et.defineComponent,yf=Et.warn,bf=Et.inject,ru=Et.computed,wf=Et.shallowRef,xf=Et.watchEffect,Cf=Et.getCurrentInstance,kf=Et.provide,iu=Et.createApp,_f=Et.withDirectives,Sf=Et.vShow},Et=>{Af=Et.createRouter,Tf=Et.createWebHistory},Et=>{$f=Et.getMountedApps},Et=>{Mf=Et.createStore},Et=>{Ef=Et.createVuetify}],execute:function(){sr({$:Pf,a:No,f:_M,l:Tn,m:Ar,y:er,z:cd});var Et=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function If(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(f){return Object.getOwnPropertyDescriptor(t,f).enumerable})),n.push.apply(n,r)}return n}function os(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?If(Object(n),!0).forEach(function(r){ew(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):If(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function ew(t,e,n){return(e=function(r){var f=function(d,p){if(ss(d)!=="object"||d===null)return d;var b=d[Symbol.toPrimitive];if(b!==void 0){var h=b.call(d,p);if(ss(h)!=="object")return h;throw new TypeError("@@toPrimitive must return a primitive value.")}return(p==="string"?String:Number)(d)}(r,"string");return ss(f)==="symbol"?f:String(f)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ss(t){return ss=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ss(t)}(function(t){if(t.CSS&&t.CSS.escape)return t.CSS.escape;var e=function(n){if(arguments.length==0)throw new TypeError("`CSS.escape` requires an argument.");for(var r,f=String(n),d=f.length,p=-1,b="",h=f.charCodeAt(0);++p<d;)(r=f.charCodeAt(p))!=0?b+=r>=1&&r<=31||r==127||p==0&&r>=48&&r<=57||p==1&&r>=48&&r<=57&&h==45?"\\"+r.toString(16)+" ":p==0&&d==1&&r==45||!(r>=128||r==45||r==95||r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122)?"\\"+f.charAt(p):f.charAt(p):b+="�";return b};t.CSS||(t.CSS={}),t.CSS.escape=e})(Et);var tw={appOptions:null,template:null,Vue:null,createApp:null,handleInstance:null};function nw(t){if(ss(t)!=="object")throw new Error("single-spa-vue requires a configuration object");var e=os(os({},tw),t);if(!e.Vue&&!e.createApp)throw Error("single-spa-vue must be passed opts.Vue or opts.createApp");if(!e.appOptions)throw Error("single-spa-vue must be passed opts.appOptions");if(e.appOptions.el&&typeof e.appOptions.el!="string"&&!(e.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(ss(e.appOptions.el)));e.createApp=e.createApp||e.Vue&&e.Vue.createApp;var n={};return{bootstrap:rw.bind(null,e,n),mount:iw.bind(null,e,n),unmount:sw.bind(null,e,n),update:ow.bind(null,e,n)}}function rw(t){return t.loadRootComponent?t.loadRootComponent().then(function(e){return t.rootComponent=e}):Promise.resolve()}function iw(t,e,n){var r={};return Promise.resolve().then(function(){return function(f,d){return typeof f.appOptions=="function"?f.appOptions(d):Promise.resolve(os({},f.appOptions))}(t,n).then(function(f){var d;if(n.domElement&&!f.el&&(f.el=n.domElement),f.el)if(typeof f.el=="string"){if(!(d=document.querySelector(f.el)))throw Error("If appOptions.el is provided to single-spa-vue, the dom element must exist in the dom. Was provided as ".concat(f.el))}else(d=f.el).id||(d.id="single-spa-application:".concat(n.name)),f.el="#".concat(CSS.escape(d.id));else{var p="single-spa-application:".concat(n.name);f.el="#".concat(CSS.escape(p)),(d=document.getElementById(p))||((d=document.createElement("div")).id=p,document.body.appendChild(d))}if(!t.replaceMode&&(f.el=f.el+" .single-spa-container",!d.querySelector(".single-spa-container"))){var b=document.createElement("div");b.className="single-spa-container",d.appendChild(b)}r.domEl=d,f.render||f.template||!t.rootComponent||(f.render=function(g){return g(t.rootComponent)}),f.data||(f.data={});var h=f.data;if(f.data=function(){return os(os({},typeof h=="function"?h.call(this,this):h),n)},t.createApp){if(r.vueInstance=t.createApp(f),t.handleInstance)return Promise.resolve(t.handleInstance(r.vueInstance,n)).then(function(){return r.root=r.vueInstance.mount(f.el),e[n.name]=r,r.vueInstance});r.root=r.vueInstance.mount(f.el)}else if(r.vueInstance=new t.Vue(f),r.vueInstance.bind&&(r.vueInstance=r.vueInstance.bind(r.vueInstance)),t.handleInstance)return Promise.resolve(t.handleInstance(r.vueInstance,n)).then(function(){return e[n.name]=r,r.vueInstance});return e[n.name]=r,r.vueInstance})})}function ow(t,e,n){return Promise.resolve().then(function(){var r=e[n.name],f=os(os({},t.appOptions.data||{}),n),d=r.root||r.vueInstance;for(var p in f)d[p]=f[p]})}function sw(t,e,n){return Promise.resolve().then(function(){var r=e[n.name];t.createApp?r.vueInstance.unmount(r.domEl):(r.vueInstance.$destroy(),r.vueInstance.$el.innerHTML=""),delete r.vueInstance,r.domEl&&(r.domEl.innerHTML="",delete r.domEl)})}const aw=(t,e)=>{const n=t.__vccOpts||t;for(const[r,f]of e)n[r]=f;return n},lw={};function cw(t,e){const n=Ue("router-view"),r=Ue("v-app");return st(),Xt(r,{id:"innerapp"},{default:Fe(()=>[We(n)]),_:1})}const uw=aw(lw,[["render",cw]]),Lf=function(t){var e;!t.name!=="NotFound"&&(t.path=`/tools/admin/${t.path.replace(/^\//,"")}`),(e=t.children)==null||e.forEach(Lf)},GD="modulepreload",YD=function(t){return"/"+t},XD={},it=function(e,n,r){let f=Promise.resolve();function d(p){const b=new Event("vite:preloadError",{cancelable:!0});if(b.payload=p,window.dispatchEvent(b),!b.defaultPrevented)throw p}return f.then(p=>{for(const b of p||[])b.status==="rejected"&&d(b.reason);return e().catch(d)})},Ri=sr("d",(t,e)=>{const n=t.__vccOpts||t;for(const[r,f]of e)n[r]=f;return n}),hw="/icons/customIcons.svg",ou={props:{icon:{type:String},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{iconSrc:function(){return hw+"#"+this.icon}}},Rf=()=>{ff(t=>({"259824e2":t.color}))},Of=ou.setup;ou.setup=Of?(t,e)=>(Rf(),Of(t,e)):Rf;const dw={class:"cosmos-custom-icon"},fw={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",preserveAspectRatio:"xMidYMid meet",focusable:"false"},pw=["href"];function gw(t,e,n,r,f,d){return st(),hn("span",dw,[(st(),hn("svg",fw,[fr("use",{href:d.iconSrc},null,8,pw)]))])}const mw=Ri(ou,[["render",gw],["__scopeId","data-v-4b6f1199"]]),pl=6e4,su=36e5,vw=1e3,Df=Symbol.for("constructDateFrom");function er(t,e){return typeof t=="function"?t(e):t&&typeof t=="object"&&Df in t?t[Df](e):t instanceof Date?new t.constructor(e):new Date(e)}function Tn(t,e){return er(e||t,t)}let yw={};function zs(){return yw}function Oo(t,e){var n,r,f,d;const p=zs(),b=(e==null?void 0:e.weekStartsOn)??((r=(n=e==null?void 0:e.locale)==null?void 0:n.options)==null?void 0:r.weekStartsOn)??p.weekStartsOn??((d=(f=p.locale)==null?void 0:f.options)==null?void 0:d.weekStartsOn)??0,h=Tn(t,e==null?void 0:e.in),g=h.getDay(),s=(g<b?7:0)+g-b;return h.setDate(h.getDate()-s),h.setHours(0,0,0,0),h}function Hs(t,e){return Oo(t,{...e,weekStartsOn:1})}function Nf(t,e){const n=Tn(t,void 0),r=n.getFullYear(),f=er(n,0);f.setFullYear(r+1,0,4),f.setHours(0,0,0,0);const d=Hs(f),p=er(n,0);p.setFullYear(r,0,4),p.setHours(0,0,0,0);const b=Hs(p);return n.getTime()>=d.getTime()?r+1:n.getTime()>=b.getTime()?r:r-1}function gl(t){const e=Tn(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function bw(t,...e){const n=er.bind(null,e.find(r=>typeof r=="object"));return e.map(n)}function Ff(t,e){const n=Tn(t,void 0);return n.setHours(0,0,0,0),n}function ww(t,e,n){const[r,f]=bw(void 0,t,e),d=Ff(r),p=Ff(f),b=+d-gl(d),h=+p-gl(p);return Math.round((b-h)/864e5)}function xw(t,e){const n=Nf(t),r=er(t,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Hs(r)}function Cw(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function Pf(t){return!(!Cw(t)&&typeof t!="number"||isNaN(+Tn(t)))}function kw(t,e){const n=Tn(t,void 0);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const _w={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"}},Sw=(t,e,n)=>{let r;const f=_w[t];return typeof f=="string"?r=f:e===1?r=f.one:r=f.other.replace("{{count}}",e.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function au(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const Aw={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Tw={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},$w={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Mw={date:au({formats:Aw,defaultWidth:"full"}),time:au({formats:Tw,defaultWidth:"full"}),dateTime:au({formats:$w,defaultWidth:"full"})},Ew={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Iw=(t,e,n,r)=>Ew[t];function _a(t){return(e,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let f;if(r==="formatting"&&t.formattingValues){const p=t.defaultFormattingWidth||t.defaultWidth,b=n!=null&&n.width?String(n.width):p;f=t.formattingValues[b]||t.formattingValues[p]}else{const p=t.defaultWidth,b=n!=null&&n.width?String(n.width):t.defaultWidth;f=t.values[b]||t.values[p]}const d=t.argumentCallback?t.argumentCallback(e):e;return f[d]}}const Lw={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Rw={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Ow={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"]},Dw={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"]},Nw={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"}},Fw={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"}},Pw=(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Bw={ordinalNumber:Pw,era:_a({values:Lw,defaultWidth:"wide"}),quarter:_a({values:Rw,defaultWidth:"wide",argumentCallback:t=>t-1}),month:_a({values:Ow,defaultWidth:"wide"}),day:_a({values:Dw,defaultWidth:"wide"}),dayPeriod:_a({values:Nw,defaultWidth:"wide",formattingValues:Fw,defaultFormattingWidth:"wide"})};function Sa(t){return(e,n={})=>{const r=n.width,f=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],d=e.match(f);if(!d)return null;const p=d[0],b=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],h=Array.isArray(b)?jw(b,a=>a.test(p)):Ww(b,a=>a.test(p));let g;g=t.valueCallback?t.valueCallback(h):h,g=n.valueCallback?n.valueCallback(g):g;const s=e.slice(p.length);return{value:g,rest:s}}}function Ww(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function jw(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return n}function zw(t){return(e,n={})=>{const r=e.match(t.matchPattern);if(!r)return null;const f=r[0],d=e.match(t.parsePattern);if(!d)return null;let p=t.valueCallback?t.valueCallback(d[0]):d[0];p=n.valueCallback?n.valueCallback(p):p;const b=e.slice(f.length);return{value:p,rest:b}}}const Hw=/^(\d+)(th|st|nd|rd)?/i,Uw=/\d+/i,Vw={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},qw={any:[/^b/i,/^(a|c)/i]},Kw={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Gw={any:[/1/i,/2/i,/3/i,/4/i]},Yw={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},Xw={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]},Qw={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},Zw={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]},Jw={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},e1={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}},t1={ordinalNumber:zw({matchPattern:Hw,parsePattern:Uw,valueCallback:t=>parseInt(t,10)}),era:Sa({matchPatterns:Vw,defaultMatchWidth:"wide",parsePatterns:qw,defaultParseWidth:"any"}),quarter:Sa({matchPatterns:Kw,defaultMatchWidth:"wide",parsePatterns:Gw,defaultParseWidth:"any",valueCallback:t=>t+1}),month:Sa({matchPatterns:Yw,defaultMatchWidth:"wide",parsePatterns:Xw,defaultParseWidth:"any"}),day:Sa({matchPatterns:Qw,defaultMatchWidth:"wide",parsePatterns:Zw,defaultParseWidth:"any"}),dayPeriod:Sa({matchPatterns:Jw,defaultMatchWidth:"any",parsePatterns:e1,defaultParseWidth:"any"})},Bf={code:"en-US",formatDistance:Sw,formatLong:Mw,formatRelative:Iw,localize:Bw,match:t1,options:{weekStartsOn:0,firstWeekContainsDate:1}};function n1(t,e){const n=Tn(t,void 0);return ww(n,kw(n))+1}function Wf(t,e){const n=Tn(t,void 0),r=+Hs(n)-+xw(n);return Math.round(r/6048e5)+1}function lu(t,e){var n,r,f,d;const p=Tn(t,e==null?void 0:e.in),b=p.getFullYear(),h=zs(),g=(e==null?void 0:e.firstWeekContainsDate)??((r=(n=e==null?void 0:e.locale)==null?void 0:n.options)==null?void 0:r.firstWeekContainsDate)??h.firstWeekContainsDate??((d=(f=h.locale)==null?void 0:f.options)==null?void 0:d.firstWeekContainsDate)??1,s=er((e==null?void 0:e.in)||t,0);s.setFullYear(b+1,0,g),s.setHours(0,0,0,0);const a=Oo(s,e),c=er((e==null?void 0:e.in)||t,0);c.setFullYear(b,0,g),c.setHours(0,0,0,0);const l=Oo(c,e);return+p>=+a?b+1:+p>=+l?b:b-1}function r1(t,e){var n,r,f,d;const p=zs(),b=(e==null?void 0:e.firstWeekContainsDate)??((r=(n=e==null?void 0:e.locale)==null?void 0:n.options)==null?void 0:r.firstWeekContainsDate)??p.firstWeekContainsDate??((d=(f=p.locale)==null?void 0:f.options)==null?void 0:d.firstWeekContainsDate)??1,h=lu(t,e),g=er((e==null?void 0:e.in)||t,0);return g.setFullYear(h,0,b),g.setHours(0,0,0,0),Oo(g,e)}function jf(t,e){const n=Tn(t,e==null?void 0:e.in),r=+Oo(n,e)-+r1(n,e);return Math.round(r/6048e5)+1}function dn(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const Do={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return dn(e==="yy"?r%100:r,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):dn(n+1,2)},d(t,e){return dn(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(t,e){return dn(t.getHours()%12||12,e.length)},H(t,e){return dn(t.getHours(),e.length)},m(t,e){return dn(t.getMinutes(),e.length)},s(t,e){return dn(t.getSeconds(),e.length)},S(t,e){const n=e.length,r=t.getMilliseconds(),f=Math.trunc(r*Math.pow(10,n-3));return dn(f,e.length)}},Us={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},zf={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const r=t.getFullYear(),f=r>0?r:1-r;return n.ordinalNumber(f,{unit:"year"})}return Do.y(t,e)},Y:function(t,e,n,r){const f=lu(t,r),d=f>0?f:1-f;if(e==="YY"){const p=d%100;return dn(p,2)}return e==="Yo"?n.ordinalNumber(d,{unit:"year"}):dn(d,e.length)},R:function(t,e){const n=Nf(t);return dn(n,e.length)},u:function(t,e){const n=t.getFullYear();return dn(n,e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return dn(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return dn(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return Do.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return dn(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const f=jf(t,r);return e==="wo"?n.ordinalNumber(f,{unit:"week"}):dn(f,e.length)},I:function(t,e,n){const r=Wf(t);return e==="Io"?n.ordinalNumber(r,{unit:"week"}):dn(r,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):Do.d(t,e)},D:function(t,e,n){const r=n1(t);return e==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):dn(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const f=t.getDay(),d=(f-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(d);case"ee":return dn(d,2);case"eo":return n.ordinalNumber(d,{unit:"day"});case"eee":return n.day(f,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(f,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(f,{width:"short",context:"formatting"});case"eeee":default:return n.day(f,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const f=t.getDay(),d=(f-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(d);case"cc":return dn(d,e.length);case"co":return n.ordinalNumber(d,{unit:"day"});case"ccc":return n.day(f,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(f,{width:"narrow",context:"standalone"});case"cccccc":return n.day(f,{width:"short",context:"standalone"});case"cccc":default:return n.day(f,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),f=r===0?7:r;switch(e){case"i":return String(f);case"ii":return dn(f,e.length);case"io":return n.ordinalNumber(f,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const r=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let f;switch(r===12?f=Us.noon:r===0?f=Us.midnight:f=r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(f,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(f,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(f,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(f,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let f;switch(r>=17?f=Us.evening:r>=12?f=Us.afternoon:r>=4?f=Us.morning:f=Us.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(f,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(f,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(f,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let r=t.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Do.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):Do.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return e==="Ko"?n.ordinalNumber(r,{unit:"hour"}):dn(r,e.length)},k:function(t,e,n){let r=t.getHours();return r===0&&(r=24),e==="ko"?n.ordinalNumber(r,{unit:"hour"}):dn(r,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):Do.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):Do.s(t,e)},S:function(t,e){return Do.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return Uf(r);case"XXXX":case"XX":return as(r);case"XXXXX":case"XXX":default:return as(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return Uf(r);case"xxxx":case"xx":return as(r);case"xxxxx":case"xxx":default:return as(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Hf(r,":");case"OOOO":default:return"GMT"+as(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Hf(r,":");case"zzzz":default:return"GMT"+as(r,":")}},t:function(t,e,n){const r=Math.trunc(+t/1e3);return dn(r,e.length)},T:function(t,e,n){return dn(+t,e.length)}};function Hf(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),f=Math.trunc(r/60),d=r%60;return d===0?n+String(f):n+String(f)+e+dn(d,2)}function Uf(t,e){return t%60===0?(t>0?"-":"+")+dn(Math.abs(t)/60,2):as(t,e)}function as(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),f=dn(Math.trunc(r/60),2),d=dn(r%60,2);return n+f+e+d}const Vf=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},qf=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},i1=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],f=n[2];if(!f)return Vf(t,e);let d;switch(r){case"P":d=e.dateTime({width:"short"});break;case"PP":d=e.dateTime({width:"medium"});break;case"PPP":d=e.dateTime({width:"long"});break;case"PPPP":default:d=e.dateTime({width:"full"});break}return d.replace("{{date}}",Vf(r,e)).replace("{{time}}",qf(f,e))},cu={p:qf,P:i1},o1=/^D+$/,s1=/^Y+$/,a1=["D","DD","YY","YYYY"];function Kf(t){return o1.test(t)}function Gf(t){return s1.test(t)}function uu(t,e,n){const r=l1(t,e,n);if(console.warn(r),a1.includes(t))throw new RangeError(r)}function l1(t,e,n){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const c1=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,u1=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,h1=/^'([^]*?)'?$/,d1=/''/g,f1=/[a-zA-Z]/;function No(t,e,n){var r,f,d,p,b,h,g,s;const a=zs(),c=(n==null?void 0:n.locale)??a.locale??Bf,l=(n==null?void 0:n.firstWeekContainsDate)??((f=(r=n==null?void 0:n.locale)==null?void 0:r.options)==null?void 0:f.firstWeekContainsDate)??a.firstWeekContainsDate??((p=(d=a.locale)==null?void 0:d.options)==null?void 0:p.firstWeekContainsDate)??1,o=(n==null?void 0:n.weekStartsOn)??((h=(b=n==null?void 0:n.locale)==null?void 0:b.options)==null?void 0:h.weekStartsOn)??a.weekStartsOn??((s=(g=a.locale)==null?void 0:g.options)==null?void 0:s.weekStartsOn)??0,u=Tn(t,n==null?void 0:n.in);if(!Pf(u))throw new RangeError("Invalid time value");let m=e.match(u1).map(x=>{const E=x[0];if(E==="p"||E==="P"){const T=cu[E];return T(x,c.formatLong)}return x}).join("").match(c1).map(x=>{if(x==="''")return{isToken:!1,value:"'"};const E=x[0];if(E==="'")return{isToken:!1,value:p1(x)};if(zf[E])return{isToken:!0,value:x};if(E.match(f1))throw new RangeError("Format string contains an unescaped latin alphabet character `"+E+"`");return{isToken:!1,value:x}});c.localize.preprocessor&&(m=c.localize.preprocessor(u,m));const w={firstWeekContainsDate:l,weekStartsOn:o,locale:c};return m.map(x=>{if(!x.isToken)return x.value;const E=x.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&Gf(E)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&Kf(E))&&uu(E,e,String(t));const T=zf[E[0]];return T(u,E,c.localize,w)}).join("")}function p1(t){const e=t.match(h1);return e?e[1].replace(d1,"'"):t}var Fo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ml(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Yf={exports:{}},Xf;function g1(){return Xf||(Xf=1,function(t,e){(function(){var n="ace",r=function(){return this}();!r&&typeof window<"u"&&(r=window);var f=function(s,a,c){if(typeof s!="string"){f.original?f.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(c=a),f.modules[s]||(f.payloads[s]=c,f.modules[s]=null)};f.modules={},f.payloads={};var d=function(s,a,c){if(typeof a=="string"){var l=h(s,a);if(l!=null)return c&&c(),l}else if(Object.prototype.toString.call(a)==="[object Array]"){for(var o=[],u=0,m=a.length;u<m;++u){var w=h(s,a[u]);if(w==null&&p.original)return;o.push(w)}return c&&c.apply(null,o)||!0}},p=function(s,a){var c=d("",s,a);return c==null&&p.original?p.original.apply(this,arguments):c},b=function(s,a){if(a.indexOf("!")!==-1){var c=a.split("!");return b(s,c[0])+"!"+b(s,c[1])}if(a.charAt(0)=="."){var l=s.split("/").slice(0,-1).join("/");for(a=l+"/"+a;a.indexOf(".")!==-1&&o!=a;){var o=a;a=a.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return a},h=function(s,a){a=b(s,a);var c=f.modules[a];if(!c){if(c=f.payloads[a],typeof c=="function"){var l={},o={id:a,uri:"",exports:l,packaged:!0},u=function(w,x){return d(a,w,x)},m=c(u,l,o);l=m||o.exports,f.modules[a]=l,delete f.payloads[a]}c=f.modules[a]=l||c}return c};function g(s){var a=r;r[s]||(r[s]={}),a=r[s],(!a.define||!a.define.packaged)&&(f.original=a.define,a.define=f,a.define.packaged=!0),(!a.require||!a.require.packaged)&&(p.original=a.require,a.require=p,a.require.packaged=!0)}g(n)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(n,r,f){function d(p,b,h){Object.defineProperty(p,b,{value:h,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||d(String.prototype,"startsWith",function(p,b){return b=b||0,this.lastIndexOf(p,b)===b}),String.prototype.endsWith||d(String.prototype,"endsWith",function(p,b){var h=this;(b===void 0||b>h.length)&&(b=h.length),b-=p.length;var g=h.indexOf(p,b);return g!==-1&&g===b}),String.prototype.repeat||d(String.prototype,"repeat",function(p){for(var b="",h=this;p>0;)p&1&&(b+=h),(p>>=1)&&(h+=h);return b}),String.prototype.includes||d(String.prototype,"includes",function(p,b){return this.indexOf(p,b)!=-1}),Object.assign||(Object.assign=function(p){if(p==null)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(p),h=1;h<arguments.length;h++){var g=arguments[h];g!=null&&Object.keys(g).forEach(function(s){b[s]=g[s]})}return b}),Object.values||(Object.values=function(p){return Object.keys(p).map(function(b){return p[b]})}),Array.prototype.find||d(Array.prototype,"find",function(p){for(var b=this.length,h=arguments[1],g=0;g<b;g++){var s=this[g];if(p.call(h,s,g,this))return s}}),Array.prototype.findIndex||d(Array.prototype,"findIndex",function(p){for(var b=this.length,h=arguments[1],g=0;g<b;g++){var s=this[g];if(p.call(h,s,g,this))return g}}),Array.prototype.includes||d(Array.prototype,"includes",function(p,b){return this.indexOf(p,b)!=-1}),Array.prototype.fill||d(Array.prototype,"fill",function(p){for(var b=this,h=b.length>>>0,g=arguments[1],s=g>>0,a=s<0?Math.max(h+s,0):Math.min(s,h),c=arguments[2],l=c===void 0?h:c>>0,o=l<0?Math.max(h+l,0):Math.min(l,h);a<o;)b[a]=p,a++;return b}),Array.of||d(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(n,r,f){n("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(n,r,f){r.deepCopy=function d(p){if(typeof p!="object"||!p)return p;var b;if(Array.isArray(p)){b=[];for(var h=0;h<p.length;h++)b[h]=d(p[h]);return b}if(Object.prototype.toString.call(p)!=="[object Object]")return p;b={};for(var h in p)b[h]=d(p[h]);return b}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(n,r,f){r.last=function(b){return b[b.length-1]},r.stringReverse=function(b){return b.split("").reverse().join("")},r.stringRepeat=function(b,h){for(var g="";h>0;)h&1&&(g+=b),(h>>=1)&&(b+=b);return g};var d=/^\s\s*/,p=/\s\s*$/;r.stringTrimLeft=function(b){return b.replace(d,"")},r.stringTrimRight=function(b){return b.replace(p,"")},r.copyObject=function(b){var h={};for(var g in b)h[g]=b[g];return h},r.copyArray=function(b){for(var h=[],g=0,s=b.length;g<s;g++)b[g]&&typeof b[g]=="object"?h[g]=this.copyObject(b[g]):h[g]=b[g];return h},r.deepCopy=n("./deep_copy").deepCopy,r.arrayToMap=function(b){for(var h={},g=0;g<b.length;g++)h[b[g]]=1;return h},r.createMap=function(b){var h=Object.create(null);for(var g in b)h[g]=b[g];return h},r.arrayRemove=function(b,h){for(var g=0;g<=b.length;g++)h===b[g]&&b.splice(g,1)},r.escapeRegExp=function(b){return b.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},r.escapeHTML=function(b){return(""+b).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},r.getMatchOffsets=function(b,h){var g=[];return b.replace(h,function(s){g.push({offset:arguments[arguments.length-2],length:s.length})}),g},r.deferredCall=function(b){var h=null,g=function(){h=null,b()},s=function(a){return s.cancel(),h=setTimeout(g,a||0),s};return s.schedule=s,s.call=function(){return this.cancel(),b(),s},s.cancel=function(){return clearTimeout(h),h=null,s},s.isPending=function(){return h},s},r.delayedCall=function(b,h){var g=null,s=function(){g=null,b()},a=function(c){g==null&&(g=setTimeout(s,c||h))};return a.delay=function(c){g&&clearTimeout(g),g=setTimeout(s,c||h)},a.schedule=a,a.call=function(){this.cancel(),b()},a.cancel=function(){g&&clearTimeout(g),g=null},a.isPending=function(){return g},a},r.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},r.skipEmptyMatch=function(b,h,g){return g&&b.codePointAt(h)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(n,r,f){r.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},r.getOS=function(){return r.isMac?r.OS.MAC:r.isLinux?r.OS.LINUX:r.OS.WINDOWS};var d=typeof navigator=="object"?navigator:{},p=(/mac|win|linux/i.exec(d.platform)||["other"])[0].toLowerCase(),b=d.userAgent||"",h=d.appName||"";r.isWin=p=="win",r.isMac=p=="mac",r.isLinux=p=="linux",r.isIE=h=="Microsoft Internet Explorer"||h.indexOf("MSAppHost")>=0?parseFloat((b.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((b.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),r.isOldIE=r.isIE&&r.isIE<9,r.isGecko=r.isMozilla=b.match(/ Gecko\/\d+/),r.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",r.isWebKit=parseFloat(b.split("WebKit/")[1])||void 0,r.isChrome=parseFloat(b.split(" Chrome/")[1])||void 0,r.isSafari=parseFloat(b.split(" Safari/")[1])&&!r.isChrome||void 0,r.isEdge=parseFloat(b.split(" Edge/")[1])||void 0,r.isAIR=b.indexOf("AdobeAIR")>=0,r.isAndroid=b.indexOf("Android")>=0,r.isChromeOS=b.indexOf(" CrOS ")>=0,r.isIOS=/iPad|iPhone|iPod/.test(b)&&!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(n,r,f){var d=n("./useragent"),p="http://www.w3.org/1999/xhtml";r.buildDom=function c(l,o,u){if(typeof l=="string"&&l){var m=document.createTextNode(l);return o&&o.appendChild(m),m}if(!Array.isArray(l))return l&&l.appendChild&&o&&o.appendChild(l),l;if(typeof l[0]!="string"||!l[0]){for(var w=[],x=0;x<l.length;x++){var E=c(l[x],o,u);E&&w.push(E)}return w}var T=document.createElement(l[0]),k=l[1],C=1;k&&typeof k=="object"&&!Array.isArray(k)&&(C=2);for(var x=C;x<l.length;x++)c(l[x],T,u);return C==2&&Object.keys(k).forEach(function(L){var R=k[L];L==="class"?T.className=Array.isArray(R)?R.join(" "):R:typeof R=="function"||L=="value"||L[0]=="$"?T[L]=R:L==="ref"?u&&(u[R]=T):L==="style"?typeof R=="string"&&(T.style.cssText=R):R!=null&&T.setAttribute(L,R)}),o&&o.appendChild(T),T},r.getDocumentHead=function(c){return c||(c=document),c.head||c.getElementsByTagName("head")[0]||c.documentElement},r.createElement=function(c,l){return document.createElementNS?document.createElementNS(l||p,c):document.createElement(c)},r.removeChildren=function(c){c.innerHTML=""},r.createTextNode=function(c,l){var o=l?l.ownerDocument:document;return o.createTextNode(c)},r.createFragment=function(c){var l=c?c.ownerDocument:document;return l.createDocumentFragment()},r.hasCssClass=function(c,l){var o=(c.className+"").split(/\s+/g);return o.indexOf(l)!==-1},r.addCssClass=function(c,l){r.hasCssClass(c,l)||(c.className+=" "+l)},r.removeCssClass=function(c,l){for(var o=c.className.split(/\s+/g);;){var u=o.indexOf(l);if(u==-1)break;o.splice(u,1)}c.className=o.join(" ")},r.toggleCssClass=function(c,l){for(var o=c.className.split(/\s+/g),u=!0;;){var m=o.indexOf(l);if(m==-1)break;u=!1,o.splice(m,1)}return u&&o.push(l),c.className=o.join(" "),u},r.setCssClass=function(c,l,o){o?r.addCssClass(c,l):r.removeCssClass(c,l)},r.hasCssString=function(c,l){var o=0,u;if(l=l||document,u=l.querySelectorAll("style")){for(;o<u.length;)if(u[o++].id===c)return!0}},r.removeElementById=function(c,l){l=l||document,l.getElementById(c)&&l.getElementById(c).remove()};var b,h=[];r.useStrictCSP=function(c){b=c,c==!1?g():h||(h=[])};function g(){var c=h;h=null,c&&c.forEach(function(l){s(l[0],l[1])})}function s(c,l,o){if(!(typeof document>"u")){if(h){if(o)g();else if(o===!1)return h.push([c,l])}if(!b){var u=o;!o||!o.getRootNode?u=document:(u=o.getRootNode(),(!u||u==o)&&(u=document));var m=u.ownerDocument||u;if(l&&r.hasCssString(l,u))return null;l&&(c+=`
2
2
  /*# sourceURL=ace/css/`+l+" */");var w=r.createElement("style");w.appendChild(m.createTextNode(c)),l&&(w.id=l),u==m&&(u=r.getDocumentHead(m)),u.insertBefore(w,u.firstChild)}}}if(r.importCssString=s,r.importCssStylsheet=function(c,l){r.buildDom(["link",{rel:"stylesheet",href:c}],r.getDocumentHead(l))},r.scrollbarWidth=function(c){var l=r.createElement("ace_inner");l.style.width="100%",l.style.minWidth="0px",l.style.height="200px",l.style.display="block";var o=r.createElement("ace_outer"),u=o.style;u.position="absolute",u.left="-10000px",u.overflow="hidden",u.width="200px",u.minWidth="0px",u.height="150px",u.display="block",o.appendChild(l);var m=c&&c.documentElement||document&&document.documentElement;if(!m)return 0;m.appendChild(o);var w=l.offsetWidth;u.overflow="scroll";var x=l.offsetWidth;return w===x&&(x=o.clientWidth),m.removeChild(o),w-x},r.computedStyle=function(c,l){return window.getComputedStyle(c,"")||{}},r.setStyle=function(c,l,o){c[l]!==o&&(c[l]=o)},r.HAS_CSS_ANIMATION=!1,r.HAS_CSS_TRANSFORMS=!1,r.HI_DPI=d.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,d.isChromeOS&&(r.HI_DPI=!1),typeof document<"u"){var a=document.createElement("div");r.HI_DPI&&a.style.transform!==void 0&&(r.HAS_CSS_TRANSFORMS=!0),!d.isEdge&&typeof a.style.animationName<"u"&&(r.HAS_CSS_ANIMATION=!0),a=null}r.HAS_CSS_TRANSFORMS?r.translate=function(c,l,o){c.style.transform="translate("+Math.round(l)+"px, "+Math.round(o)+"px)"}:r.translate=function(c,l,o){c.style.top=Math.round(o)+"px",c.style.left=Math.round(l)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(n,r,f){/*
3
3
  * based on code from:
4
4
  *
@@ -165,17 +165,17 @@ System.register(["vue","vue-router","single-spa","vuex","vuetify"],function(sr,r
165
165
  }
166
166
  `}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(n,r,f){r.isDark=!1,r.cssClass="ace-tm",r.cssText=n("./textmate-css"),r.$id="ace/theme/textmate";var d=n("../lib/dom");d.importCssString(r.cssText,r.cssClass,!1)}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(n,r,f){"no use strict";var d=n("./lib/lang"),p=n("./lib/net"),b=n("./lib/dom"),h=n("./lib/app_config").AppConfig;f.exports=r=new h;var g={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};r.get=function(l){if(!g.hasOwnProperty(l))throw new Error("Unknown config key: "+l);return g[l]},r.set=function(l,o){if(g.hasOwnProperty(l))g[l]=o;else if(this.setDefaultValue("",l,o)==!1)throw new Error("Unknown config key: "+l);l=="useStrictCSP"&&b.useStrictCSP(o)},r.all=function(){return d.copyObject(g)},r.$modes={},r.moduleUrl=function(l,o){if(g.$moduleUrls[l])return g.$moduleUrls[l];var u=l.split("/");o=o||u[u.length-2]||"";var m=o=="snippets"?"/":"-",w=u[u.length-1];if(o=="worker"&&m=="-"){var x=new RegExp("^"+o+"[\\-_]|[\\-_]"+o+"$","g");w=w.replace(x,"")}(!w||w==o)&&u.length>1&&(w=u[u.length-2]);var E=g[o+"Path"];return E==null?E=g.basePath:m=="/"&&(o=m=""),E&&E.slice(-1)!="/"&&(E+="/"),E+o+m+w+this.get("suffix")},r.setModuleUrl=function(l,o){return g.$moduleUrls[l]=o};var s=function(l,o){if(l==="ace/theme/textmate"||l==="./theme/textmate")return o(null,n("./theme/textmate"));if(a)return a(l,o);console.error("loader is not configured")},a;r.setLoader=function(l){a=l},r.dynamicModules=Object.create(null),r.$loading={},r.$loaded={},r.loadModule=function(l,o){var u;if(Array.isArray(l))var m=l[0],w=l[1];else if(typeof l=="string")var w=l;var x=function(E){if(E&&!r.$loading[w])return o&&o(E);if(r.$loading[w]||(r.$loading[w]=[]),r.$loading[w].push(o),!(r.$loading[w].length>1)){var T=function(){s(w,function(k,C){C&&(r.$loaded[w]=C),r._emit("load.module",{name:w,module:C});var L=r.$loading[w];r.$loading[w]=null,L.forEach(function(R){R&&R(C)})})};if(!r.get("packaged"))return T();p.loadScript(r.moduleUrl(w,m),T),c()}};if(r.dynamicModules[w])r.dynamicModules[w]().then(function(E){E.default?x(E.default):x(E)});else{try{u=this.$require(w)}catch{}x(u||r.$loaded[w])}},r.$require=function(l){if(typeof f.require=="function"){var o="require";return f[o](l)}},r.setModuleLoader=function(l,o){r.dynamicModules[l]=o};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.40.1"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(n,r,f){n("./lib/fixoldbrowsers");var d=n("./config");d.setLoader(function(g,s){n([g],function(a){s(null,a)})});var p=function(){return this||typeof window<"u"&&window}();f.exports=function(g){d.init=b,d.$require=n,g.require=n},b(!0);function b(g){if(!(!p||!p.document)){d.set("packaged",g||n.packaged||f.packaged||p.define&&(void 0).packaged);var s={},a="",c=document.currentScript||document._currentScript,l=c&&c.ownerDocument||document;c&&c.src&&(a=c.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var o=l.getElementsByTagName("script"),u=0;u<o.length;u++){var m=o[u],w=m.src||m.getAttribute("src");if(w){for(var x=m.attributes,E=0,T=x.length;E<T;E++){var k=x[E];k.name.indexOf("data-ace-")===0&&(s[h(k.name.replace(/^data-ace-/,""))]=k.value)}var C=w.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);C&&(a=C[1])}}a&&(s.base=s.base||a,s.packaged=!0),s.basePath=s.base,s.workerPath=s.workerPath||s.base,s.modePath=s.modePath||s.base,s.themePath=s.themePath||s.base,delete s.base;for(var L in s)typeof s[L]<"u"&&d.set(L,s[L])}}function h(g){return g.replace(/-(.)/g,function(s,a){return a.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(n,r,f){var d=function(){function p(b,h,g,s){this.start={row:b,column:h},this.end={row:g,column:s}}return p.prototype.isEqual=function(b){return this.start.row===b.start.row&&this.end.row===b.end.row&&this.start.column===b.start.column&&this.end.column===b.end.column},p.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},p.prototype.contains=function(b,h){return this.compare(b,h)==0},p.prototype.compareRange=function(b){var h,g=b.end,s=b.start;return h=this.compare(g.row,g.column),h==1?(h=this.compare(s.row,s.column),h==1?2:h==0?1:0):h==-1?-2:(h=this.compare(s.row,s.column),h==-1?-1:h==1?42:0)},p.prototype.comparePoint=function(b){return this.compare(b.row,b.column)},p.prototype.containsRange=function(b){return this.comparePoint(b.start)==0&&this.comparePoint(b.end)==0},p.prototype.intersects=function(b){var h=this.compareRange(b);return h==-1||h==0||h==1},p.prototype.isEnd=function(b,h){return this.end.row==b&&this.end.column==h},p.prototype.isStart=function(b,h){return this.start.row==b&&this.start.column==h},p.prototype.setStart=function(b,h){typeof b=="object"?(this.start.column=b.column,this.start.row=b.row):(this.start.row=b,this.start.column=h)},p.prototype.setEnd=function(b,h){typeof b=="object"?(this.end.column=b.column,this.end.row=b.row):(this.end.row=b,this.end.column=h)},p.prototype.inside=function(b,h){return this.compare(b,h)==0?!(this.isEnd(b,h)||this.isStart(b,h)):!1},p.prototype.insideStart=function(b,h){return this.compare(b,h)==0?!this.isEnd(b,h):!1},p.prototype.insideEnd=function(b,h){return this.compare(b,h)==0?!this.isStart(b,h):!1},p.prototype.compare=function(b,h){return!this.isMultiLine()&&b===this.start.row?h<this.start.column?-1:h>this.end.column?1:0:b<this.start.row?-1:b>this.end.row?1:this.start.row===b?h>=this.start.column?0:-1:this.end.row===b?h<=this.end.column?0:1:0},p.prototype.compareStart=function(b,h){return this.start.row==b&&this.start.column==h?-1:this.compare(b,h)},p.prototype.compareEnd=function(b,h){return this.end.row==b&&this.end.column==h?1:this.compare(b,h)},p.prototype.compareInside=function(b,h){return this.end.row==b&&this.end.column==h?1:this.start.row==b&&this.start.column==h?-1:this.compare(b,h)},p.prototype.clipRows=function(b,h){if(this.end.row>h)var g={row:h+1,column:0};else if(this.end.row<b)var g={row:b,column:0};if(this.start.row>h)var s={row:h+1,column:0};else if(this.start.row<b)var s={row:b,column:0};return p.fromPoints(s||this.start,g||this.end)},p.prototype.extend=function(b,h){var g=this.compare(b,h);if(g==0)return this;if(g==-1)var s={row:b,column:h};else var a={row:b,column:h};return p.fromPoints(s||this.start,a||this.end)},p.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},p.prototype.isMultiLine=function(){return this.start.row!==this.end.row},p.prototype.clone=function(){return p.fromPoints(this.start,this.end)},p.prototype.collapseRows=function(){return this.end.column==0?new p(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new p(this.start.row,0,this.end.row,0)},p.prototype.toScreenRange=function(b){var h=b.documentToScreenPosition(this.start),g=b.documentToScreenPosition(this.end);return new p(h.row,h.column,g.row,g.column)},p.prototype.moveBy=function(b,h){this.start.row+=b,this.start.column+=h,this.end.row+=b,this.end.column+=h},p}();d.fromPoints=function(p,b){return new d(p.row,p.column,b.row,b.column)},d.comparePoints=function(p,b){return p.row-b.row||p.column-b.column},r.Range=d}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(n,r,f){for(var d=n("./oop"),p={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:"*"}},b={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},h=0;h<10;h++)b["Digit"+h]=48+h,b["Numpad"+h]=96+h,p.PRINTABLE_KEYS[48+h]=""+h,p.FUNCTION_KEYS[96+h]="Numpad"+h;for(var h=65;h<91;h++){var g=String.fromCharCode(h+32);b["Key"+g.toUpperCase()]=h,p.PRINTABLE_KEYS[h]=g}for(var h=1;h<13;h++)b["F"+h]=111+h,p.FUNCTION_KEYS[111+h]="F"+h;var s={Shift:16,Control:17,Alt:18,Meta:224};for(var a in s)b[a]=b[a+"Left"]=b[a+"Right"]=s[a];r.$codeToKeyCode=b,p.PRINTABLE_KEYS[173]="-";for(var c in p.FUNCTION_KEYS){var l=p.FUNCTION_KEYS[c].toLowerCase();p[l]=parseInt(c,10)}for(var c in p.PRINTABLE_KEYS){var l=p.PRINTABLE_KEYS[c].toLowerCase();p[l]=parseInt(c,10)}d.mixin(p,p.MODIFIER_KEYS),d.mixin(p,p.PRINTABLE_KEYS),d.mixin(p,p.FUNCTION_KEYS),p.enter=p.return,p.escape=p.esc,p.del=p.delete,function(){for(var o=["cmd","ctrl","alt","shift"],u=Math.pow(2,o.length);u--;)p.KEY_MODS[u]=o.filter(function(m){return u&p.KEY_MODS[m]}).join("-")+"-"}(),p.KEY_MODS[0]="",p.KEY_MODS[-1]="input-",d.mixin(r,p),r.default=r,r.keyCodeToString=function(o){var u=p[o];return typeof u!="string"&&(u=String.fromCharCode(o)),u.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(n,r,f){var d=n("./keys"),p=n("./useragent"),b=null,h=0,g;function s(){g=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return g={passive:!1},!0}})}catch{}}function a(){return g==null&&s(),g}function c(E,T,k){this.elem=E,this.type=T,this.callback=k}c.prototype.destroy=function(){o(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var l=r.addListener=function(E,T,k,C){E.addEventListener(T,k,a()),C&&C.$toDestroy.push(new c(E,T,k))},o=r.removeListener=function(E,T,k){E.removeEventListener(T,k,a())};r.stopEvent=function(E){return r.stopPropagation(E),r.preventDefault(E),!1},r.stopPropagation=function(E){E.stopPropagation&&E.stopPropagation()},r.preventDefault=function(E){E.preventDefault&&E.preventDefault()},r.getButton=function(E){return E.type=="dblclick"?0:E.type=="contextmenu"||p.isMac&&E.ctrlKey&&!E.altKey&&!E.shiftKey?2:E.button},r.capture=function(E,T,k){var C=E&&E.ownerDocument||document;function L(R){T&&T(R),k&&k(R),o(C,"mousemove",T),o(C,"mouseup",L),o(C,"dragstart",L)}return l(C,"mousemove",T),l(C,"mouseup",L),l(C,"dragstart",L),L},r.addMouseWheelListener=function(E,T,k){l(E,"wheel",function(C){var L=.15,R=C.deltaX||0,F=C.deltaY||0;switch(C.deltaMode){case C.DOM_DELTA_PIXEL:C.wheelX=R*L,C.wheelY=F*L;break;case C.DOM_DELTA_LINE:var I=15;C.wheelX=R*I,C.wheelY=F*I;break;case C.DOM_DELTA_PAGE:var H=150;C.wheelX=R*H,C.wheelY=F*H;break}T(C)},k)},r.addMultiMouseDownListener=function(E,T,k,C,L){var R=0,F,I,H,P={2:"dblclick",3:"tripleclick",4:"quadclick"};function O(A){if(r.getButton(A)!==0?R=0:A.detail>1?(R++,R>4&&(R=1)):R=1,p.isIE){var S=Math.abs(A.clientX-F)>5||Math.abs(A.clientY-I)>5;(!H||S)&&(R=1),H&&clearTimeout(H),H=setTimeout(function(){H=null},T[R-1]||600),R==1&&(F=A.clientX,I=A.clientY)}if(A._clicks=R,k[C]("mousedown",A),R>4)R=0;else if(R>1)return k[C](P[R],A)}Array.isArray(E)||(E=[E]),E.forEach(function(A){l(A,"mousedown",O,L)})};function u(E){return 0|(E.ctrlKey?1:0)|(E.altKey?2:0)|(E.shiftKey?4:0)|(E.metaKey?8:0)}r.getModifierString=function(E){return d.KEY_MODS[u(E)]};function m(E,T,k){var C=u(T);if(!k&&T.code&&(k=d.$codeToKeyCode[T.code]||k),!p.isMac&&b){if(T.getModifierState&&(T.getModifierState("OS")||T.getModifierState("Win"))&&(C|=8),b.altGr)if((3&C)!=3)b.altGr=0;else return;if(k===18||k===17){var L=T.location;if(k===17&&L===1)b[k]==1&&(h=T.timeStamp);else if(k===18&&C===3&&L===2){var R=T.timeStamp-h;R<50&&(b.altGr=!0)}}}if(k in d.MODIFIER_KEYS&&(k=-1),!(!C&&k===13&&T.location===3&&(E(T,C,-k),T.defaultPrevented))){if(p.isChromeOS&&C&8){if(E(T,C,k),T.defaultPrevented)return;C&=-9}return!C&&!(k in d.FUNCTION_KEYS)&&!(k in d.PRINTABLE_KEYS)?!1:E(T,C,k)}}r.addCommandKeyListener=function(E,T,k){var C=null;l(E,"keydown",function(L){b[L.keyCode]=(b[L.keyCode]||0)+1;var R=m(T,L,L.keyCode);return C=L.defaultPrevented,R},k),l(E,"keypress",function(L){C&&(L.ctrlKey||L.altKey||L.shiftKey||L.metaKey)&&(r.stopEvent(L),C=null)},k),l(E,"keyup",function(L){b[L.keyCode]=null},k),b||(w(),l(window,"focus",w))};function w(){b=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!p.isOldIE){var x=1;r.nextTick=function(E,T){T=T||window;var k="zero-timeout-message-"+x++,C=function(L){L.data==k&&(r.stopPropagation(L),o(T,"message",C),E())};l(T,"message",C),T.postMessage(k,"*")}}r.$idleBlocked=!1,r.onIdle=function(E,T){return setTimeout(function k(){r.$idleBlocked?setTimeout(k,100):E()},T)},r.$idleBlockId=null,r.blockIdle=function(E){r.$idleBlockId&&clearTimeout(r.$idleBlockId),r.$idleBlocked=!0,r.$idleBlockId=setTimeout(function(){r.$idleBlocked=!1},E||100)},r.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),r.nextFrame?r.nextFrame=r.nextFrame.bind(window):r.nextFrame=function(E){setTimeout(E,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(n,r,f){var d;f.exports={lineMode:!1,pasteCancelled:function(){return d&&d>Date.now()-50?!0:d=!1},cancel:function(){d=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(n,r,f){var d=n("../lib/event"),p=n("../config").nls,b=n("../lib/useragent"),h=n("../lib/dom"),g=n("../lib/lang"),s=n("../clipboard"),a=b.isChrome<18,c=b.isIE,l=b.isChrome>63,o=400,u=n("../lib/keys"),m=u.KEY_MODS,w=b.isIOS,x=w?/\s/:/\n/,E=b.isMobile,T;T=function(k,C){var L=h.createElement("textarea");L.className="ace_text-input",L.setAttribute("wrap","off"),L.setAttribute("autocorrect","off"),L.setAttribute("autocapitalize","off"),L.setAttribute("spellcheck","false"),L.style.opacity="0",k.insertBefore(L,k.firstChild);var R=!1,F=!1,I=!1,H=!1,P="";E||(L.style.fontSize="1px");var O=!1,A=!1,S="",D=0,W=0,U=0,K=Number.MAX_SAFE_INTEGER,Z=Number.MIN_SAFE_INTEGER,te=0;try{var he=document.activeElement===L}catch{}this.setNumberOfExtraLines=function(ke){if(K=Number.MAX_SAFE_INTEGER,Z=Number.MIN_SAFE_INTEGER,ke<0){te=0;return}te=ke},this.setAriaLabel=function(){var ke="";if(C.$textInputAriaLabel&&(ke+="".concat(C.$textInputAriaLabel,", ")),C.session){var Ve=C.session.selection.cursor.row;ke+=p("text-input.aria-label","Cursor at row $0",[Ve+1])}L.setAttribute("aria-label",ke)},this.setAriaOptions=function(ke){ke.activeDescendant?(L.setAttribute("aria-haspopup","true"),L.setAttribute("aria-autocomplete",ke.inline?"both":"list"),L.setAttribute("aria-activedescendant",ke.activeDescendant)):(L.setAttribute("aria-haspopup","false"),L.setAttribute("aria-autocomplete","both"),L.removeAttribute("aria-activedescendant")),ke.role&&L.setAttribute("role",ke.role),ke.setLabel&&(L.setAttribute("aria-roledescription",p("text-input.aria-roledescription","editor")),this.setAriaLabel())},this.setAriaOptions({role:"textbox"}),d.addListener(L,"blur",function(ke){A||(C.onBlur(ke),he=!1)},C),d.addListener(L,"focus",function(ke){if(!A){if(he=!0,b.isEdge)try{if(!document.hasFocus())return}catch{}C.onFocus(ke),b.isEdge?setTimeout(ae):ae()}},C),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:C.renderer.enableKeyboardAccessibility}),P||l||this.$focusScroll=="browser")return L.focus({preventScroll:!0});var ke=L.style.top;L.style.position="fixed",L.style.top="0px";try{var Ve=L.getBoundingClientRect().top!=0}catch{return}var Je=[];if(Ve)for(var vt=L.parentElement;vt&&vt.nodeType==1;)Je.push(vt),vt.setAttribute("ace_nocontext","true"),!vt.parentElement&&vt.getRootNode?vt=vt.getRootNode().host:vt=vt.parentElement;L.focus({preventScroll:!0}),Ve&&Je.forEach(function(Tt){Tt.removeAttribute("ace_nocontext")}),setTimeout(function(){L.style.position="",L.style.top=="0px"&&(L.style.top=ke)},0)},this.blur=function(){L.blur()},this.isFocused=function(){return he},C.on("beforeEndOperation",function(){var ke=C.curOp,Ve=ke&&ke.command&&ke.command.name;if(Ve!="insertstring"){var Je=Ve&&(ke.docChanged||ke.selectionChanged);I&&Je&&(S=L.value="",Jt()),ae()}}),C.on("changeSelection",this.setAriaLabel);var ne=function(ke,Ve){for(var Je=Ve,vt=1;vt<=ke-K&&vt<2*te+1;vt++)Je+=C.session.getLine(ke-vt).length+1;return Je},ae=w?function(ke){if(!(!he||R&&!ke||H)){ke||(ke="");var Ve=`
167
167
  ab`+ke+`cde fg
168
- `;Ve!=L.value&&(L.value=S=Ve);var Je=4,vt=4+(ke.length||(C.selection.isEmpty()?0:1));(D!=Je||W!=vt)&&L.setSelectionRange(Je,vt),D=Je,W=vt}}:function(){if(!(I||H)&&!(!he&&!Te)){I=!0;var ke=0,Ve=0,Je="";if(C.session){var vt=C.selection,Tt=vt.getRange(),At=vt.cursor.row;At===Z+1?(K=Z+1,Z=K+2*te):At===K-1?(Z=K-1,K=Z-2*te):(At<K-1||At>Z+1)&&(K=At>te?At-te:0,Z=At>te?At+te:2*te);for(var Pt=[],Nt=K;Nt<=Z;Nt++)Pt.push(C.session.getLine(Nt));if(Je=Pt.join(`
168
+ `;Ve!=L.value&&(L.value=S=Ve);var Je=4,vt=4+(ke.length||(C.selection.isEmpty()?0:1));(D!=Je||W!=vt)&&L.setSelectionRange(Je,vt),D=Je,W=vt}}:function(){if(!(I||H)&&!(!he&&!Te)){I=!0;var ke=0,Ve=0,Je="";if(C.session){var vt=C.selection,Tt=vt.getRange(),At=vt.cursor.row;At===Z+1?(K=Z+1,Z=K+2*te):At===K-1?(Z=K-1,K=Z-2*te):(At<K-1||At>Z+1)&&(K=At>te?At-te:0,Z=At>te?At+te:2*te);for(var Bt=[],Nt=K;Nt<=Z;Nt++)Bt.push(C.session.getLine(Nt));if(Je=Bt.join(`
169
169
  `),ke=ne(Tt.start.row,Tt.start.column),Ve=ne(Tt.end.row,Tt.end.column),Tt.start.row<K){var pt=C.session.getLine(K-1);ke=Tt.start.row<K-1?0:ke,Ve+=pt.length+1,Je=pt+`
170
170
  `+Je}else if(Tt.end.row>Z){var kt=C.session.getLine(Z+1);Ve=Tt.end.row>Z+1?kt.length:Tt.end.column,Ve+=Je.length+1,Je=Je+`
171
171
  `+kt}else E&&At>0&&(Je=`
172
172
  `+Je,Ve+=1,ke+=1);Je.length>o&&(ke<o&&Ve<o?Je=Je.slice(0,o):(Je=`
173
173
  `,ke==Ve?ke=Ve=0:(ke=0,Ve=1)));var $n=Je+`
174
174
 
175
- `;$n!=S&&(L.value=S=$n,D=W=$n.length)}if(Te&&(D=L.selectionStart,W=L.selectionEnd),W!=Ve||D!=ke||L.selectionEnd!=W)try{L.setSelectionRange(ke,Ve),D=ke,W=Ve}catch{}I=!1}};this.resetSelection=ae,he&&C.onFocus();var ue=function(ke){return ke.selectionStart===0&&ke.selectionEnd>=S.length&&ke.value===S&&S&&ke.selectionEnd!==W},ce=function(ke){I||(R?R=!1:ue(L)?(C.selectAll(),ae()):E&&L.selectionStart!=D&&ae())},ge=null;this.setInputHandler=function(ke){ge=ke},this.getInputHandler=function(){return ge};var Te=!1,$e=function(ke,Ve){if(Te&&(Te=!1),F)return ae(),ke&&C.onPaste(ke),F=!1,"";for(var Je=L.selectionStart,vt=L.selectionEnd,Tt=D,At=S.length-W,Pt=ke,Nt=ke.length-Je,pt=ke.length-vt,kt=0;Tt>0&&S[kt]==ke[kt];)kt++,Tt--;for(Pt=Pt.slice(kt),kt=1;At>0&&S.length-kt>D-1&&S[S.length-kt]==ke[ke.length-kt];)kt++,At--;Nt-=kt-1,pt-=kt-1;var $n=Pt.length-kt+1;if($n<0&&(Tt=-$n,$n=0),Pt=Pt.slice(0,$n),!Ve&&!Pt&&!Nt&&!Tt&&!At&&!pt)return"";H=!0;var $r=!1;return b.isAndroid&&Pt==". "&&(Pt=" ",$r=!0),Pt&&!Tt&&!At&&!Nt&&!pt||O?C.onTextInput(Pt):C.onTextInput(Pt,{extendLeft:Tt,extendRight:At,restoreStart:Nt,restoreEnd:pt}),H=!1,S=ke,D=Je,W=vt,U=pt,$r?`
176
- `:Pt},Ee=function(ke){if(I)return bn();if(ke&&ke.inputType){if(ke.inputType=="historyUndo")return C.execCommand("undo");if(ke.inputType=="historyRedo")return C.execCommand("redo")}var Ve=L.value,Je=$e(Ve,!0);(Ve.length>o+100||x.test(Je)||E&&D<1&&D==W)&&ae()},Ze=function(ke,Ve,Je){var vt=ke.clipboardData||window.clipboardData;if(!(!vt||a)){var Tt=c||Je?"Text":"text/plain";try{return Ve?vt.setData(Tt,Ve)!==!1:vt.getData(Tt)}catch(At){if(!Je)return Ze(At,Ve,!0)}}},Xe=function(ke,Ve){var Je=C.getCopyText();if(!Je)return d.preventDefault(ke);Ze(ke,Je)?(w&&(ae(Je),R=Je,setTimeout(function(){R=!1},10)),Ve?C.onCut():C.onCopy(),d.preventDefault(ke)):(R=!0,L.value=Je,L.select(),setTimeout(function(){R=!1,ae(),Ve?C.onCut():C.onCopy()}))},gt=function(ke){Xe(ke,!0)},at=function(ke){Xe(ke,!1)},mt=function(ke){var Ve=Ze(ke);s.pasteCancelled()||(typeof Ve=="string"?(Ve&&C.onPaste(Ve,ke),b.isIE&&setTimeout(ae),d.preventDefault(ke)):(L.value="",F=!0))};d.addCommandKeyListener(L,function(ke,Ve,Je){if(!I)return C.onCommandKey(ke,Ve,Je)},C),d.addListener(L,"select",ce,C),d.addListener(L,"input",Ee,C),d.addListener(L,"cut",gt,C),d.addListener(L,"copy",at,C),d.addListener(L,"paste",mt,C),(!("oncut"in L)||!("oncopy"in L)||!("onpaste"in L))&&d.addListener(k,"keydown",function(ke){if(!(b.isMac&&!ke.metaKey||!ke.ctrlKey))switch(ke.keyCode){case 67:at(ke);break;case 86:mt(ke);break;case 88:gt(ke);break}},C);var sn=function(ke){if(!(I||!C.onCompositionStart||C.$readOnly)&&(I={},!O)){ke.data&&(I.useTextareaForIME=!1),setTimeout(bn,0),C._signal("compositionStart"),C.on("mousedown",wr);var Ve=C.getSelectionRange();Ve.end.row=Ve.start.row,Ve.end.column=Ve.start.column,I.markerRange=Ve,I.selectionStart=D,C.onCompositionStart(I),I.useTextareaForIME?(S=L.value="",D=0,W=0):(L.msGetInputContext&&(I.context=L.msGetInputContext()),L.getInputContext&&(I.context=L.getInputContext()))}},bn=function(){if(!(!I||!C.onCompositionUpdate||C.$readOnly)){if(O)return wr();if(I.useTextareaForIME)C.onCompositionUpdate(L.value);else{var ke=L.value;$e(ke),I.markerRange&&(I.context&&(I.markerRange.start.column=I.selectionStart=I.context.compositionStartOffset),I.markerRange.end.column=I.markerRange.start.column+W-I.selectionStart+U)}}},Jt=function(ke){!C.onCompositionEnd||C.$readOnly||(I=!1,C.onCompositionEnd(),C.off("mousedown",wr),ke&&Ee())};function wr(){A=!0,L.blur(),L.focus(),A=!1}var wn=g.delayedCall(bn,50).schedule.bind(null,null);function Fn(ke){ke.keyCode==27&&L.value.length<L.selectionStart&&(I||(S=L.value),D=W=-1,ae()),wn()}d.addListener(L,"compositionstart",sn,C),d.addListener(L,"compositionupdate",bn,C),d.addListener(L,"keyup",Fn,C),d.addListener(L,"keydown",wn,C),d.addListener(L,"compositionend",Jt,C),this.getElement=function(){return L},this.setCommandMode=function(ke){O=ke,L.readOnly=!1},this.setReadOnly=function(ke){O||(L.readOnly=ke)},this.setCopyWithEmptySelection=function(ke){},this.onContextMenu=function(ke){Te=!0,ae(),C._emit("nativecontextmenu",{target:C,domEvent:ke}),this.moveToMouse(ke,!0)},this.moveToMouse=function(ke,Ve){P||(P=L.style.cssText),L.style.cssText=(Ve?"z-index:100000;":"")+(b.isIE?"opacity:0.1;":"")+"text-indent: -"+(D+W)*C.renderer.characterWidth*.5+"px;";var Je=C.container.getBoundingClientRect(),vt=h.computedStyle(C.container),Tt=Je.top+(parseInt(vt.borderTopWidth)||0),At=Je.left+(parseInt(vt.borderLeftWidth)||0),Pt=Je.bottom-Tt-L.clientHeight-2,Nt=function(pt){h.translate(L,pt.clientX-At-2,Math.min(pt.clientY-Tt-2,Pt))};Nt(ke),ke.type=="mousedown"&&(C.renderer.$isMousePressed=!0,clearTimeout(Pn),b.isWin&&d.capture(C.container,Nt,nr))},this.onContextMenuClose=nr;var Pn;function nr(){clearTimeout(Pn),Pn=setTimeout(function(){P&&(L.style.cssText=P,P=""),C.renderer.$isMousePressed=!1,C.renderer.$keepTextAreaAtCursor&&C.renderer.$moveTextAreaToCursor()},0)}var Ct=function(ke){C.textInput.onContextMenu(ke),nr()};d.addListener(L,"mouseup",Ct,C),d.addListener(L,"mousedown",function(ke){ke.preventDefault(),nr()},C),d.addListener(C.renderer.scroller,"contextmenu",Ct,C),d.addListener(L,"contextmenu",Ct,C),w&&Ke(k,C,L);function Ke(ke,Ve,Je){var vt=null,Tt=!1;Je.addEventListener("keydown",function(Pt){vt&&clearTimeout(vt),Tt=!0},!0),Je.addEventListener("keyup",function(Pt){vt=setTimeout(function(){Tt=!1},100)},!0);var At=function(Pt){if(document.activeElement===Je&&!(Tt||I||Ve.$mouseHandler.isMousePressed)&&!R){var Nt=Je.selectionStart,pt=Je.selectionEnd,kt=null,$n=0;if(Nt==0?kt=u.up:Nt==1?kt=u.home:pt>W&&S[pt]==`
175
+ `;$n!=S&&(L.value=S=$n,D=W=$n.length)}if(Te&&(D=L.selectionStart,W=L.selectionEnd),W!=Ve||D!=ke||L.selectionEnd!=W)try{L.setSelectionRange(ke,Ve),D=ke,W=Ve}catch{}I=!1}};this.resetSelection=ae,he&&C.onFocus();var ue=function(ke){return ke.selectionStart===0&&ke.selectionEnd>=S.length&&ke.value===S&&S&&ke.selectionEnd!==W},ce=function(ke){I||(R?R=!1:ue(L)?(C.selectAll(),ae()):E&&L.selectionStart!=D&&ae())},ge=null;this.setInputHandler=function(ke){ge=ke},this.getInputHandler=function(){return ge};var Te=!1,$e=function(ke,Ve){if(Te&&(Te=!1),F)return ae(),ke&&C.onPaste(ke),F=!1,"";for(var Je=L.selectionStart,vt=L.selectionEnd,Tt=D,At=S.length-W,Bt=ke,Nt=ke.length-Je,pt=ke.length-vt,kt=0;Tt>0&&S[kt]==ke[kt];)kt++,Tt--;for(Bt=Bt.slice(kt),kt=1;At>0&&S.length-kt>D-1&&S[S.length-kt]==ke[ke.length-kt];)kt++,At--;Nt-=kt-1,pt-=kt-1;var $n=Bt.length-kt+1;if($n<0&&(Tt=-$n,$n=0),Bt=Bt.slice(0,$n),!Ve&&!Bt&&!Nt&&!Tt&&!At&&!pt)return"";H=!0;var $r=!1;return b.isAndroid&&Bt==". "&&(Bt=" ",$r=!0),Bt&&!Tt&&!At&&!Nt&&!pt||O?C.onTextInput(Bt):C.onTextInput(Bt,{extendLeft:Tt,extendRight:At,restoreStart:Nt,restoreEnd:pt}),H=!1,S=ke,D=Je,W=vt,U=pt,$r?`
176
+ `:Bt},Ee=function(ke){if(I)return wn();if(ke&&ke.inputType){if(ke.inputType=="historyUndo")return C.execCommand("undo");if(ke.inputType=="historyRedo")return C.execCommand("redo")}var Ve=L.value,Je=$e(Ve,!0);(Ve.length>o+100||x.test(Je)||E&&D<1&&D==W)&&ae()},Ze=function(ke,Ve,Je){var vt=ke.clipboardData||window.clipboardData;if(!(!vt||a)){var Tt=c||Je?"Text":"text/plain";try{return Ve?vt.setData(Tt,Ve)!==!1:vt.getData(Tt)}catch(At){if(!Je)return Ze(At,Ve,!0)}}},Xe=function(ke,Ve){var Je=C.getCopyText();if(!Je)return d.preventDefault(ke);Ze(ke,Je)?(w&&(ae(Je),R=Je,setTimeout(function(){R=!1},10)),Ve?C.onCut():C.onCopy(),d.preventDefault(ke)):(R=!0,L.value=Je,L.select(),setTimeout(function(){R=!1,ae(),Ve?C.onCut():C.onCopy()}))},gt=function(ke){Xe(ke,!0)},lt=function(ke){Xe(ke,!1)},mt=function(ke){var Ve=Ze(ke);s.pasteCancelled()||(typeof Ve=="string"?(Ve&&C.onPaste(Ve,ke),b.isIE&&setTimeout(ae),d.preventDefault(ke)):(L.value="",F=!0))};d.addCommandKeyListener(L,function(ke,Ve,Je){if(!I)return C.onCommandKey(ke,Ve,Je)},C),d.addListener(L,"select",ce,C),d.addListener(L,"input",Ee,C),d.addListener(L,"cut",gt,C),d.addListener(L,"copy",lt,C),d.addListener(L,"paste",mt,C),(!("oncut"in L)||!("oncopy"in L)||!("onpaste"in L))&&d.addListener(k,"keydown",function(ke){if(!(b.isMac&&!ke.metaKey||!ke.ctrlKey))switch(ke.keyCode){case 67:lt(ke);break;case 86:mt(ke);break;case 88:gt(ke);break}},C);var sn=function(ke){if(!(I||!C.onCompositionStart||C.$readOnly)&&(I={},!O)){ke.data&&(I.useTextareaForIME=!1),setTimeout(wn,0),C._signal("compositionStart"),C.on("mousedown",wr);var Ve=C.getSelectionRange();Ve.end.row=Ve.start.row,Ve.end.column=Ve.start.column,I.markerRange=Ve,I.selectionStart=D,C.onCompositionStart(I),I.useTextareaForIME?(S=L.value="",D=0,W=0):(L.msGetInputContext&&(I.context=L.msGetInputContext()),L.getInputContext&&(I.context=L.getInputContext()))}},wn=function(){if(!(!I||!C.onCompositionUpdate||C.$readOnly)){if(O)return wr();if(I.useTextareaForIME)C.onCompositionUpdate(L.value);else{var ke=L.value;$e(ke),I.markerRange&&(I.context&&(I.markerRange.start.column=I.selectionStart=I.context.compositionStartOffset),I.markerRange.end.column=I.markerRange.start.column+W-I.selectionStart+U)}}},Jt=function(ke){!C.onCompositionEnd||C.$readOnly||(I=!1,C.onCompositionEnd(),C.off("mousedown",wr),ke&&Ee())};function wr(){A=!0,L.blur(),L.focus(),A=!1}var xn=g.delayedCall(wn,50).schedule.bind(null,null);function Fn(ke){ke.keyCode==27&&L.value.length<L.selectionStart&&(I||(S=L.value),D=W=-1,ae()),xn()}d.addListener(L,"compositionstart",sn,C),d.addListener(L,"compositionupdate",wn,C),d.addListener(L,"keyup",Fn,C),d.addListener(L,"keydown",xn,C),d.addListener(L,"compositionend",Jt,C),this.getElement=function(){return L},this.setCommandMode=function(ke){O=ke,L.readOnly=!1},this.setReadOnly=function(ke){O||(L.readOnly=ke)},this.setCopyWithEmptySelection=function(ke){},this.onContextMenu=function(ke){Te=!0,ae(),C._emit("nativecontextmenu",{target:C,domEvent:ke}),this.moveToMouse(ke,!0)},this.moveToMouse=function(ke,Ve){P||(P=L.style.cssText),L.style.cssText=(Ve?"z-index:100000;":"")+(b.isIE?"opacity:0.1;":"")+"text-indent: -"+(D+W)*C.renderer.characterWidth*.5+"px;";var Je=C.container.getBoundingClientRect(),vt=h.computedStyle(C.container),Tt=Je.top+(parseInt(vt.borderTopWidth)||0),At=Je.left+(parseInt(vt.borderLeftWidth)||0),Bt=Je.bottom-Tt-L.clientHeight-2,Nt=function(pt){h.translate(L,pt.clientX-At-2,Math.min(pt.clientY-Tt-2,Bt))};Nt(ke),ke.type=="mousedown"&&(C.renderer.$isMousePressed=!0,clearTimeout(Pn),b.isWin&&d.capture(C.container,Nt,nr))},this.onContextMenuClose=nr;var Pn;function nr(){clearTimeout(Pn),Pn=setTimeout(function(){P&&(L.style.cssText=P,P=""),C.renderer.$isMousePressed=!1,C.renderer.$keepTextAreaAtCursor&&C.renderer.$moveTextAreaToCursor()},0)}var Ct=function(ke){C.textInput.onContextMenu(ke),nr()};d.addListener(L,"mouseup",Ct,C),d.addListener(L,"mousedown",function(ke){ke.preventDefault(),nr()},C),d.addListener(C.renderer.scroller,"contextmenu",Ct,C),d.addListener(L,"contextmenu",Ct,C),w&&Ke(k,C,L);function Ke(ke,Ve,Je){var vt=null,Tt=!1;Je.addEventListener("keydown",function(Bt){vt&&clearTimeout(vt),Tt=!0},!0),Je.addEventListener("keyup",function(Bt){vt=setTimeout(function(){Tt=!1},100)},!0);var At=function(Bt){if(document.activeElement===Je&&!(Tt||I||Ve.$mouseHandler.isMousePressed)&&!R){var Nt=Je.selectionStart,pt=Je.selectionEnd,kt=null,$n=0;if(Nt==0?kt=u.up:Nt==1?kt=u.home:pt>W&&S[pt]==`
177
177
  `?kt=u.end:Nt<D&&S[Nt-1]==" "?(kt=u.left,$n=m.option):Nt<D||Nt==D&&W!=D&&Nt==pt?kt=u.left:pt>W&&S.slice(0,pt).split(`
178
- `).length>2?kt=u.down:pt>W&&S[pt-1]==" "?(kt=u.right,$n=m.option):(pt>W||pt==W&&W!=D&&Nt==pt)&&(kt=u.right),Nt!==pt&&($n|=m.shift),kt){var $r=Ve.onCommandKey({},$n,kt);if(!$r&&Ve.commands){kt=u.keyCodeToString(kt);var Yr=Ve.commands.findKeyCommand($n,kt);Yr&&Ve.execCommand(Yr)}D=Nt,W=pt,ae("")}}};document.addEventListener("selectionchange",At),Ve.on("destroy",function(){document.removeEventListener("selectionchange",At)})}this.destroy=function(){L.parentElement&&L.parentElement.removeChild(L)}},r.TextInput=T,r.$setUserAgentForTests=function(k,C){E=k,w=C}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(n,r,f){var d=n("../lib/useragent"),p=0,b=550,h=function(){function a(c){c.$clickSelection=null;var l=c.editor;l.setDefaultHandler("mousedown",this.onMouseDown.bind(c)),l.setDefaultHandler("dblclick",this.onDoubleClick.bind(c)),l.setDefaultHandler("tripleclick",this.onTripleClick.bind(c)),l.setDefaultHandler("quadclick",this.onQuadClick.bind(c)),l.setDefaultHandler("mousewheel",this.onMouseWheel.bind(c));var o=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];o.forEach(function(u){c[u]=this[u]},this),c.selectByLines=this.extendSelectionBy.bind(c,"getLineRange"),c.selectByWords=this.extendSelectionBy.bind(c,"getWordRange")}return a.prototype.onMouseDown=function(c){var l=c.inSelection(),o=c.getDocumentPosition();this.mousedownEvent=c;var u=this.editor,m=c.getButton();if(m!==0){var w=u.getSelectionRange(),x=w.isEmpty();(x||m==1)&&u.selection.moveToPosition(o),m==2&&(u.textInput.onContextMenu(c.domEvent),d.isMozilla||c.preventDefault());return}if(this.mousedownEvent.time=Date.now(),l&&!u.isFocused()&&(u.focus(),this.$focusTimeout&&!this.$clickSelection&&!u.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(c);return}return this.captureMouse(c),this.startSelect(o,c.domEvent._clicks>1),c.preventDefault()},a.prototype.startSelect=function(c,l){c=c||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var o=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?o.selection.selectToPosition(c):l||o.selection.moveToPosition(c),l||this.select(),o.setStyle("ace_selecting"),this.setState("select"))},a.prototype.select=function(){var c,l=this.editor,o=l.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var u=this.$clickSelection.comparePoint(o);if(u==-1)c=this.$clickSelection.end;else if(u==1)c=this.$clickSelection.start;else{var m=s(this.$clickSelection,o);o=m.cursor,c=m.anchor}l.selection.setSelectionAnchor(c.row,c.column)}l.selection.selectToPosition(o),l.renderer.scrollCursorIntoView()},a.prototype.extendSelectionBy=function(c){var l,o=this.editor,u=o.renderer.screenToTextCoordinates(this.x,this.y),m=o.selection[c](u.row,u.column);if(this.$clickSelection){var w=this.$clickSelection.comparePoint(m.start),x=this.$clickSelection.comparePoint(m.end);if(w==-1&&x<=0)l=this.$clickSelection.end,(m.end.row!=u.row||m.end.column!=u.column)&&(u=m.start);else if(x==1&&w>=0)l=this.$clickSelection.start,(m.start.row!=u.row||m.start.column!=u.column)&&(u=m.end);else if(w==-1&&x==1)u=m.end,l=m.start;else{var E=s(this.$clickSelection,u);u=E.cursor,l=E.anchor}o.selection.setSelectionAnchor(l.row,l.column)}o.selection.selectToPosition(u),o.renderer.scrollCursorIntoView()},a.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},a.prototype.focusWait=function(){var c=g(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),l=Date.now();(c>p||l-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},a.prototype.onDoubleClick=function(c){var l=c.getDocumentPosition(),o=this.editor,u=o.session,m=u.getBracketRange(l);m?(m.isEmpty()&&(m.start.column--,m.end.column++),this.setState("select")):(m=o.selection.getWordRange(l.row,l.column),this.setState("selectByWords")),this.$clickSelection=m,this.select()},a.prototype.onTripleClick=function(c){var l=c.getDocumentPosition(),o=this.editor;this.setState("selectByLines");var u=o.getSelectionRange();u.isMultiLine()&&u.contains(l.row,l.column)?(this.$clickSelection=o.selection.getLineRange(u.start.row),this.$clickSelection.end=o.selection.getLineRange(u.end.row).end):this.$clickSelection=o.selection.getLineRange(l.row),this.select()},a.prototype.onQuadClick=function(c){var l=this.editor;l.selectAll(),this.$clickSelection=l.getSelectionRange(),this.setState("selectAll")},a.prototype.onMouseWheel=function(c){if(!c.getAccelKey()){c.getShiftKey()&&c.wheelY&&!c.wheelX&&(c.wheelX=c.wheelY,c.wheelY=0);var l=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var o=this.$lastScroll,u=c.domEvent.timeStamp,m=u-o.t,w=m?c.wheelX/m:o.vx,x=m?c.wheelY/m:o.vy;m<b&&(w=(w+o.vx)/2,x=(x+o.vy)/2);var E=Math.abs(w/x),T=!1;if(E>=1&&l.renderer.isScrollableBy(c.wheelX*c.speed,0)&&(T=!0),E<=1&&l.renderer.isScrollableBy(0,c.wheelY*c.speed)&&(T=!0),T)o.allowed=u;else if(u-o.allowed<b){var k=Math.abs(w)<=1.5*Math.abs(o.vx)&&Math.abs(x)<=1.5*Math.abs(o.vy);k?(T=!0,o.allowed=u):o.allowed=0}if(o.t=u,o.vx=w,o.vy=x,T)return l.renderer.scrollBy(c.wheelX*c.speed,c.wheelY*c.speed),c.stop()}},a}();h.prototype.selectEnd=h.prototype.selectByLinesEnd,h.prototype.selectAllEnd=h.prototype.selectByLinesEnd,h.prototype.selectByWordsEnd=h.prototype.selectByLinesEnd,r.DefaultHandlers=h;function g(a,c,l,o){return Math.sqrt(Math.pow(l-a,2)+Math.pow(o-c,2))}function s(a,c){if(a.start.row==a.end.row)var l=2*c.column-a.start.column-a.end.column;else if(a.start.row==a.end.row-1&&!a.start.column&&!a.end.column)var l=c.column-4;else var l=2*c.row-a.start.row-a.end.row;return l<0?{cursor:a.start,anchor:a.end}:{cursor:a.end,anchor:a.start}}}),ace.define("ace/lib/scroll",["require","exports","module"],function(n,r,f){r.preventParentScroll=function(d){d.stopPropagation();var p=d.currentTarget,b=p.scrollHeight>p.clientHeight;b||d.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(n,r,f){var d=this&&this.__extends||function(){var u=function(m,w){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,E){x.__proto__=E}||function(x,E){for(var T in E)Object.prototype.hasOwnProperty.call(E,T)&&(x[T]=E[T])},u(m,w)};return function(m,w){if(typeof w!="function"&&w!==null)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");u(m,w);function x(){this.constructor=m}m.prototype=w===null?Object.create(w):(x.prototype=w.prototype,new x)}}(),p=this&&this.__values||function(u){var m=typeof Symbol=="function"&&Symbol.iterator,w=m&&u[m],x=0;if(w)return w.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&x>=u.length&&(u=void 0),{value:u&&u[x++],done:!u}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")},b=n("./lib/dom");n("./lib/event");var h=n("./range").Range,g=n("./lib/scroll").preventParentScroll,s="ace_tooltip",a=function(){function u(m){this.isOpen=!1,this.$element=null,this.$parentNode=m}return u.prototype.$init=function(){return this.$element=b.createElement("div"),this.$element.className=s,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},u.prototype.getElement=function(){return this.$element||this.$init()},u.prototype.setText=function(m){this.getElement().textContent=m},u.prototype.setHtml=function(m){this.getElement().innerHTML=m},u.prototype.setPosition=function(m,w){this.getElement().style.left=m+"px",this.getElement().style.top=w+"px"},u.prototype.setClassName=function(m){b.addCssClass(this.getElement(),m)},u.prototype.setTheme=function(m){this.$element.className=s+" "+(m.isDark?"ace_dark ":"")+(m.cssClass||"")},u.prototype.show=function(m,w,x){m!=null&&this.setText(m),w!=null&&x!=null&&this.setPosition(w,x),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},u.prototype.hide=function(m){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=s,this.isOpen=!1)},u.prototype.getHeight=function(){return this.getElement().offsetHeight},u.prototype.getWidth=function(){return this.getElement().offsetWidth},u.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},u}(),c=function(){function u(){this.popups=[]}return u.prototype.addPopup=function(m){this.popups.push(m),this.updatePopups()},u.prototype.removePopup=function(m){var w=this.popups.indexOf(m);w!==-1&&(this.popups.splice(w,1),this.updatePopups())},u.prototype.updatePopups=function(){var m,w,x,E;this.popups.sort(function(P,O){return O.priority-P.priority});var T=[];try{for(var k=p(this.popups),C=k.next();!C.done;C=k.next()){var L=C.value,R=!0;try{for(var F=(x=void 0,p(T)),I=F.next();!I.done;I=F.next()){var H=I.value;if(this.doPopupsOverlap(H,L)){R=!1;break}}}catch(P){x={error:P}}finally{try{I&&!I.done&&(E=F.return)&&E.call(F)}finally{if(x)throw x.error}}R?T.push(L):L.hide()}}catch(P){m={error:P}}finally{try{C&&!C.done&&(w=k.return)&&w.call(k)}finally{if(m)throw m.error}}},u.prototype.doPopupsOverlap=function(m,w){var x=m.getElement().getBoundingClientRect(),E=w.getElement().getBoundingClientRect();return x.left<E.right&&x.right>E.left&&x.top<E.bottom&&x.bottom>E.top},u}(),l=new c;r.popupManager=l,r.Tooltip=a;var o=function(u){d(m,u);function m(w){w===void 0&&(w=document.body);var x=u.call(this,w)||this;x.timeout=void 0,x.lastT=0,x.idleTime=350,x.lastEvent=void 0,x.onMouseOut=x.onMouseOut.bind(x),x.onMouseMove=x.onMouseMove.bind(x),x.waitForHover=x.waitForHover.bind(x),x.hide=x.hide.bind(x);var E=x.getElement();return E.style.whiteSpace="pre-wrap",E.style.pointerEvents="auto",E.addEventListener("mouseout",x.onMouseOut),E.tabIndex=-1,E.addEventListener("blur",(function(){E.contains(document.activeElement)||this.hide()}).bind(x)),E.addEventListener("wheel",g),x}return m.prototype.addToEditor=function(w){w.on("mousemove",this.onMouseMove),w.on("mousedown",this.hide),w.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},m.prototype.removeFromEditor=function(w){w.off("mousemove",this.onMouseMove),w.off("mousedown",this.hide),w.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},m.prototype.onMouseMove=function(w,x){this.lastEvent=w,this.lastT=Date.now();var E=x.$mouseHandler.isMousePressed;if(this.isOpen){var T=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(T.row,T.column)||E||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||E||(this.lastEvent=w,this.timeout=setTimeout(this.waitForHover,this.idleTime))},m.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var w=Date.now()-this.lastT;if(this.idleTime-w>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-w);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},m.prototype.isOutsideOfText=function(w){var x=w.editor,E=w.getDocumentPosition(),T=x.session.getLine(E.row);if(E.column==T.length){var k=x.renderer.pixelToScreenCoordinates(w.clientX,w.clientY),C=x.session.documentToScreenPosition(E.row,E.column);if(C.column!=k.column||C.row!=k.row)return!0}return!1},m.prototype.setDataProvider=function(w){this.$gatherData=w},m.prototype.showForRange=function(w,x,E,T){var k=10;if(!(T&&T!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var C=w.renderer;this.isOpen||(l.addPopup(this),this.$registerCloseEvents(),this.setTheme(C.theme)),this.isOpen=!0,this.addMarker(x,w.session),this.range=h.fromPoints(x.start,x.end);var L=C.textToScreenCoordinates(x.start.row,x.start.column),R=C.scroller.getBoundingClientRect();L.pageX<R.left&&(L.pageX=R.left);var F=this.getElement();F.innerHTML="",F.appendChild(E),F.style.maxHeight="",F.style.display="block";var I=F.clientHeight,H=F.clientWidth,P=window.innerHeight-L.pageY-C.lineHeight,O=!0;L.pageY-I<0&&L.pageY<P&&(O=!1),F.style.maxHeight=(O?L.pageY:P)-k+"px",F.style.top=O?"":L.pageY+C.lineHeight+"px",F.style.bottom=O?window.innerHeight-L.pageY+"px":"",F.style.left=Math.min(L.pageX,window.innerWidth-H-k)+"px"}},m.prototype.addMarker=function(w,x){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=x,this.marker=x&&x.addMarker(w,"ace_highlight-marker","text")},m.prototype.hide=function(w){!w&&document.activeElement==this.getElement()||w&&w.target&&(w.type!="keydown"||w.ctrlKey||w.metaKey)&&this.$element.contains(w.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,l.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(w){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!w.relatedTarget||this.getElement().contains(w.relatedTarget)||w&&w.currentTarget.contains(w.relatedTarget)||w.relatedTarget.classList.contains("ace_content")||this.hide())},m}(a);r.HoverTooltip=o}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config"],function(n,r,f){var d=this&&this.__extends||function(){var u=function(m,w){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,E){x.__proto__=E}||function(x,E){for(var T in E)Object.prototype.hasOwnProperty.call(E,T)&&(x[T]=E[T])},u(m,w)};return function(m,w){if(typeof w!="function"&&w!==null)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");u(m,w);function x(){this.constructor=m}m.prototype=w===null?Object.create(w):(x.prototype=w.prototype,new x)}}(),p=this&&this.__values||function(u){var m=typeof Symbol=="function"&&Symbol.iterator,w=m&&u[m],x=0;if(w)return w.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&x>=u.length&&(u=void 0),{value:u&&u[x++],done:!u}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")},b=n("../lib/dom"),h=n("../lib/event"),g=n("../tooltip").Tooltip,s=n("../config").nls,a=5,c=3;r.GUTTER_TOOLTIP_LEFT_OFFSET=a,r.GUTTER_TOOLTIP_TOP_OFFSET=c;function l(u){var m=u.editor,w=m.renderer.$gutterLayer,x=new o(m,!0);u.editor.setDefaultHandler("guttermousedown",function(R){if(!(!m.isFocused()||R.getButton()!=0)){var F=w.getRegion(R);if(F!="foldWidgets"){var I=R.getDocumentPosition().row,H=m.session.selection;if(R.getShiftKey())H.selectTo(I,0);else{if(R.domEvent.detail==2)return m.selectAll(),R.preventDefault();u.$clickSelection=m.selection.getLineRange(I)}return u.setState("selectByLines"),u.captureMouse(R),R.preventDefault()}}});var E,T;function k(){var R=T.getDocumentPosition().row,F=m.session.getLength();if(R==F){var I=m.renderer.pixelToScreenCoordinates(0,T.y).row,H=T.$pos;if(I>m.session.documentToScreenRow(H.row,H.column))return C()}if(x.showTooltip(R),!!x.isOpen)if(m.on("mousewheel",C),m.on("changeSession",C),window.addEventListener("keydown",C,!0),u.$tooltipFollowsMouse)L(T);else{var P=T.getGutterRow(),O=w.$lines.get(P);if(O){var A=O.element.querySelector(".ace_gutter_annotation"),S=A.getBoundingClientRect(),D=x.getElement().style;D.left=S.right-a+"px",D.top=S.bottom-c+"px"}else L(T)}}function C(R){R&&R.type==="keydown"&&(R.ctrlKey||R.metaKey)||R&&R.type==="mouseout"&&(!R.relatedTarget||x.getElement().contains(R.relatedTarget))||(E&&(E=clearTimeout(E)),x.isOpen&&(x.hideTooltip(),m.off("mousewheel",C),m.off("changeSession",C),window.removeEventListener("keydown",C,!0)))}function L(R){x.setPosition(R.x,R.y)}u.editor.setDefaultHandler("guttermousemove",function(R){var F=R.domEvent.target||R.domEvent.srcElement;if(b.hasCssClass(F,"ace_fold-widget")||b.hasCssClass(F,"ace_custom-widget"))return C();x.isOpen&&u.$tooltipFollowsMouse&&L(R),T=R,!E&&(E=setTimeout(function(){E=null,T&&!u.isMousePressed&&k()},50))}),h.addListener(m.renderer.$gutter,"mouseout",function(R){T=null,x.isOpen&&(E=setTimeout(function(){E=null,C(R)},50))},m)}r.GutterHandler=l;var o=function(u){d(m,u);function m(w,x){x===void 0&&(x=!1);var E=u.call(this,w.container)||this;E.editor=w,E.visibleTooltipRow;var T=E.getElement();return T.setAttribute("role","tooltip"),T.style.pointerEvents="auto",x&&(E.onMouseOut=E.onMouseOut.bind(E),T.addEventListener("mouseout",E.onMouseOut)),E}return m.prototype.onMouseOut=function(w){this.isOpen&&(!w.relatedTarget||this.getElement().contains(w.relatedTarget)||w&&w.currentTarget.contains(w.relatedTarget)||this.hideTooltip())},m.prototype.setPosition=function(w,x){var E=window.innerWidth||document.documentElement.clientWidth,T=window.innerHeight||document.documentElement.clientHeight,k=this.getWidth(),C=this.getHeight();w+=15,x+=15,w+k>E&&(w-=w+k-E),x+C>T&&(x-=20+C),g.prototype.setPosition.call(this,w,x)},Object.defineProperty(m,"annotationLabels",{get:function(){return{error:{singular:s("gutter-tooltip.aria-label.error.singular","error"),plural:s("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:s("gutter-tooltip.aria-label.security.singular","security finding"),plural:s("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:s("gutter-tooltip.aria-label.warning.singular","warning"),plural:s("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:s("gutter-tooltip.aria-label.info.singular","information message"),plural:s("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:s("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:s("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),m.prototype.showTooltip=function(w){var x,E=this.editor.renderer.$gutterLayer,T=E.$annotations[w],k;T?k={displayText:Array.from(T.displayText),type:Array.from(T.type)}:k={displayText:[],type:[]};var C=E.session.getFoldLine(w);if(C&&E.$showFoldedAnnotations){for(var L={error:[],security:[],warning:[],info:[],hint:[]},R={error:1,security:2,warning:3,info:4,hint:5},F,I=w+1;I<=C.end.row;I++)if(E.$annotations[I])for(var H=0;H<E.$annotations[I].text.length;H++){var P=E.$annotations[I].type[H];L[P].push(E.$annotations[I].text[H]),(!F||R[P]<R[F])&&(F=P)}if(["error","security","warning"].includes(F)){var O="".concat(m.annotationsToSummaryString(L)," in folded code.");k.displayText.push(O),k.type.push(F+"_fold")}}if(k.displayText.length===0)return this.hideTooltip();for(var A={error:[],security:[],warning:[],info:[],hint:[]},S=E.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",I=0;I<k.displayText.length;I++){var D=b.createElement("span"),W=b.createElement("span");(x=W.classList).add.apply(x,["ace_".concat(k.type[I]),S]),W.setAttribute("aria-label","".concat(m.annotationLabels[k.type[I].replace("_fold","")].singular)),W.setAttribute("role","img"),W.appendChild(b.createTextNode(" ")),D.appendChild(W),D.appendChild(b.createTextNode(k.displayText[I])),D.appendChild(b.createElement("br")),A[k.type[I].replace("_fold","")].push(D)}var U=this.getElement();b.removeChildren(U),A.error.forEach(function(K){return U.appendChild(K)}),A.security.forEach(function(K){return U.appendChild(K)}),A.warning.forEach(function(K){return U.appendChild(K)}),A.info.forEach(function(K){return U.appendChild(K)}),A.hint.forEach(function(K){return U.appendChild(K)}),U.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip")),this.show(),this.visibleTooltipRow=w,this.editor._signal("showGutterTooltip",this)},m.prototype.hideTooltip=function(){this.isOpen&&(this.$element.removeAttribute("aria-live"),this.hide(),this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this))},m.annotationsToSummaryString=function(w){var x,E,T=[],k=["error","security","warning","info","hint"];try{for(var C=p(k),L=C.next();!L.done;L=C.next()){var R=L.value;if(w[R].length){var F=w[R].length===1?m.annotationLabels[R].singular:m.annotationLabels[R].plural;T.push("".concat(w[R].length," ").concat(F))}}}catch(I){x={error:I}}finally{try{L&&!L.done&&(E=C.return)&&E.call(C)}finally{if(x)throw x.error}}return T.join(", ")},m}(g);r.GutterTooltip=o}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(n,r,f){var d=n("../lib/event"),p=n("../lib/useragent"),b=function(){function h(g,s){this.speed,this.wheelX,this.wheelY,this.domEvent=g,this.editor=s,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 h.prototype.stopPropagation=function(){d.stopPropagation(this.domEvent),this.propagationStopped=!0},h.prototype.preventDefault=function(){d.preventDefault(this.domEvent),this.defaultPrevented=!0},h.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},h.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},h.prototype.getGutterRow=function(){var g=this.getDocumentPosition().row,s=this.editor.session.documentToScreenRow(g,0),a=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return s-a},h.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var g=this.editor,s=g.getSelectionRange();if(s.isEmpty())this.$inSelection=!1;else{var a=this.getDocumentPosition();this.$inSelection=s.contains(a.row,a.column)}return this.$inSelection},h.prototype.getButton=function(){return d.getButton(this.domEvent)},h.prototype.getShiftKey=function(){return this.domEvent.shiftKey},h.prototype.getAccelKey=function(){return p.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},h}();r.MouseEvent=b}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(n,r,f){var d=n("../lib/dom"),p=n("../lib/event"),b=n("../lib/useragent"),h=200,g=200,s=5;function a(l){var o=l.editor,u=d.createElement("div");u.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",u.textContent=" ";var m=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];m.forEach(function(ne){l[ne]=this[ne]},this),o.on("mousedown",this.onMouseDown.bind(l));var w=o.container,x,E,T,k,C,L,R=0,F,I,H,P,O;this.onDragStart=function(ne){if(this.cancelDrag||!w.draggable){var ae=this;return setTimeout(function(){ae.startSelect(),ae.captureMouse(ne)},0),ne.preventDefault()}C=o.getSelectionRange();var ue=ne.dataTransfer;ue.effectAllowed=o.getReadOnly()?"copy":"copyMove",o.container.appendChild(u),ue.setDragImage&&ue.setDragImage(u,0,0),setTimeout(function(){o.container.removeChild(u)}),ue.clearData(),ue.setData("Text",o.session.getTextRange()),I=!0,this.setState("drag")},this.onDragEnd=function(ne){if(w.draggable=!1,I=!1,this.setState(null),!o.getReadOnly()){var ae=ne.dataTransfer.dropEffect;!F&&ae=="move"&&o.session.remove(o.getSelectionRange()),o.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(ne){if(!(o.getReadOnly()||!te(ne.dataTransfer)))return E=ne.clientX,T=ne.clientY,x||W(),R++,ne.dataTransfer.dropEffect=F=he(ne),p.preventDefault(ne)},this.onDragOver=function(ne){if(!(o.getReadOnly()||!te(ne.dataTransfer)))return E=ne.clientX,T=ne.clientY,x||(W(),R++),K!==null&&(K=null),ne.dataTransfer.dropEffect=F=he(ne),p.preventDefault(ne)},this.onDragLeave=function(ne){if(R--,R<=0&&x)return U(),F=null,p.preventDefault(ne)},this.onDrop=function(ne){if(L){var ae=ne.dataTransfer;if(I)switch(F){case"move":C.contains(L.row,L.column)?C={start:L,end:L}:C=o.moveText(C,L);break;case"copy":C=o.moveText(C,L,!0);break}else{var ue=ae.getData("Text");C={start:L,end:o.session.insert(L,ue)},o.focus(),F=null}return U(),p.preventDefault(ne)}},p.addListener(w,"dragstart",this.onDragStart.bind(l),o),p.addListener(w,"dragend",this.onDragEnd.bind(l),o),p.addListener(w,"dragenter",this.onDragEnter.bind(l),o),p.addListener(w,"dragover",this.onDragOver.bind(l),o),p.addListener(w,"dragleave",this.onDragLeave.bind(l),o),p.addListener(w,"drop",this.onDrop.bind(l),o);function A(ne,ae){var ue=Date.now(),ce=!ae||ne.row!=ae.row,ge=!ae||ne.column!=ae.column;if(!P||ce||ge)o.moveCursorToPosition(ne),P=ue,O={x:E,y:T};else{var Te=c(O.x,O.y,E,T);Te>s?P=null:ue-P>=g&&(o.renderer.scrollCursorIntoView(),P=null)}}function S(ne,ae){var ue=Date.now(),ce=o.renderer.layerConfig.lineHeight,ge=o.renderer.layerConfig.characterWidth,Te=o.renderer.scroller.getBoundingClientRect(),$e={x:{left:E-Te.left,right:Te.right-E},y:{top:T-Te.top,bottom:Te.bottom-T}},Ee=Math.min($e.x.left,$e.x.right),Ze=Math.min($e.y.top,$e.y.bottom),Xe={row:ne.row,column:ne.column};Ee/ge<=2&&(Xe.column+=$e.x.left<$e.x.right?-3:2),Ze/ce<=1&&(Xe.row+=$e.y.top<$e.y.bottom?-1:1);var gt=ne.row!=Xe.row,at=ne.column!=Xe.column,mt=!ae||ne.row!=ae.row;gt||at&&!mt?H?ue-H>=h&&o.renderer.scrollCursorIntoView(Xe):H=ue:H=null}function D(){var ne=L;L=o.renderer.screenToTextCoordinates(E,T),A(L,ne),S(L,ne)}function W(){C=o.selection.toOrientedRange(),x=o.session.addMarker(C,"ace_selection",o.getSelectionStyle()),o.clearSelection(),o.isFocused()&&o.renderer.$cursorLayer.setBlinking(!1),clearInterval(k),D(),k=setInterval(D,20),R=0,p.addListener(document,"mousemove",Z)}function U(){clearInterval(k),o.session.removeMarker(x),x=null,o.selection.fromOrientedRange(C),o.isFocused()&&!I&&o.$resetCursorStyle(),C=null,L=null,R=0,H=null,P=null,p.removeListener(document,"mousemove",Z)}var K=null;function Z(){K==null&&(K=setTimeout(function(){K!=null&&x&&U()},20))}function te(ne){var ae=ne.types;return!ae||Array.prototype.some.call(ae,function(ue){return ue=="text/plain"||ue=="Text"})}function he(ne){var ae=["copy","copymove","all","uninitialized"],ue=["move","copymove","linkmove","all","uninitialized"],ce=b.isMac?ne.altKey:ne.ctrlKey,ge="uninitialized";try{ge=ne.dataTransfer.effectAllowed.toLowerCase()}catch{}var Te="none";return ce&&ae.indexOf(ge)>=0?Te="copy":ue.indexOf(ge)>=0?Te="move":ae.indexOf(ge)>=0&&(Te="copy"),Te}}(function(){this.dragWait=function(){var l=Date.now()-this.mousedownEvent.time;l>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var l=this.editor.container;l.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(l){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var l=this.editor,o=l.container;o.draggable=!0,l.renderer.$cursorLayer.setBlinking(!1),l.setStyle("ace_dragging");var u=b.isWin?"default":"move";l.renderer.setCursorStyle(u),this.setState("dragReady")},this.onMouseDrag=function(l){var o=this.editor.container;if(b.isIE&&this.state=="dragReady"){var u=c(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);u>3&&o.dragDrop()}if(this.state==="dragWait"){var u=c(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);u>0&&(o.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(l){if(this.$dragEnabled){this.mousedownEvent=l;var o=this.editor,u=l.inSelection(),m=l.getButton(),w=l.domEvent.detail||1;if(w===1&&m===0&&u){if(l.editor.inMultiSelectMode&&(l.getAccelKey()||l.getShiftKey()))return;this.mousedownEvent.time=Date.now();var x=l.domEvent.target||l.domEvent.srcElement;if("unselectable"in x&&(x.unselectable="on"),o.getDragDelay()){if(b.isWebKit){this.cancelDrag=!0;var E=o.container;E.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(l,this.onMouseDrag.bind(this)),l.defaultPrevented=!0}}}}).call(a.prototype);function c(l,o,u,m){return Math.sqrt(Math.pow(u-l,2)+Math.pow(m-o,2))}r.DragdropHandler=a}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(n,r,f){var d=n("./mouse_event").MouseEvent,p=n("../lib/event"),b=n("../lib/dom");r.addTouchListeners=function(h,g){var s="scroll",a,c,l,o,u,m,w=0,x,E=0,T=0,k=0,C,L;function R(){var A=window.navigator&&window.navigator.clipboard,S=!1,D=function(){var K=g.getCopyText(),Z=g.session.getUndoManager().hasUndo();L.replaceChild(b.buildDom(S?["span",!K&&W("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],K&&W("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],K&&W("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],A&&W("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],Z&&W("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],W("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],W("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),L.firstChild)},W=function(K){return g.commands.canExecute(K,g)},U=function(K){var Z=K.target.getAttribute("action");if(Z=="more"||!S)return S=!S,D();Z=="paste"?A.readText().then(function(te){g.execCommand(Z,te)}):Z&&((Z=="cut"||Z=="copy")&&(A?A.writeText(g.getCopyText()):document.execCommand("copy")),g.execCommand(Z)),L.firstChild.style.display="none",S=!1,Z!="openCommandPalette"&&g.focus()};L=b.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(K){s="menu",K.stopPropagation(),K.preventDefault(),g.textInput.focus()},ontouchend:function(K){K.stopPropagation(),K.preventDefault(),U(K)},onclick:U},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],g.container)}function F(){if(!g.getOption("enableMobileMenu")){L&&I();return}L||R();var A=g.selection.cursor,S=g.renderer.textToScreenCoordinates(A.row,A.column),D=g.renderer.textToScreenCoordinates(0,0).pageX,W=g.renderer.scrollLeft,U=g.container.getBoundingClientRect();L.style.top=S.pageY-U.top-3+"px",S.pageX-U.left<U.width-70?(L.style.left="",L.style.right="10px"):(L.style.right="",L.style.left=D+W-U.left+"px"),L.style.display="",L.firstChild.style.display="none",g.on("input",I)}function I(A){L&&(L.style.display="none"),g.off("input",I)}function H(){u=null,clearTimeout(u);var A=g.selection.getRange(),S=A.contains(x.row,x.column);(A.isEmpty()||!S)&&(g.selection.moveToPosition(x),g.selection.selectWord()),s="wait",F()}function P(){u=null,clearTimeout(u),g.selection.moveToPosition(x);var A=E>=2?g.selection.getLineRange(x.row):g.session.getBracketRange(x);A&&!A.isEmpty()?g.selection.setRange(A):g.selection.selectWord(),s="wait"}p.addListener(h,"contextmenu",function(A){if(C){var S=g.textInput.getElement();S.focus()}},g),p.addListener(h,"touchstart",function(A){var S=A.touches;if(u||S.length>1){clearTimeout(u),u=null,l=-1,s="zoom";return}C=g.$mouseHandler.isMousePressed=!0;var D=g.renderer.layerConfig.lineHeight,W=g.renderer.layerConfig.lineHeight,U=A.timeStamp;o=U;var K=S[0],Z=K.clientX,te=K.clientY;Math.abs(a-Z)+Math.abs(c-te)>D&&(l=-1),a=A.clientX=Z,c=A.clientY=te,T=k=0;var he=new d(A,g);if(x=he.getDocumentPosition(),U-l<500&&S.length==1&&!w)E++,A.preventDefault(),A.button=0,P();else{E=0;var ne=g.selection.cursor,ae=g.selection.isEmpty()?ne:g.selection.anchor,ue=g.renderer.$cursorLayer.getPixelPosition(ne,!0),ce=g.renderer.$cursorLayer.getPixelPosition(ae,!0),ge=g.renderer.scroller.getBoundingClientRect(),Te=g.renderer.layerConfig.offset,$e=g.renderer.scrollLeft,Ee=function(gt,at){return gt=gt/W,at=at/D-.75,gt*gt+at*at};if(A.clientX<ge.left){s="zoom";return}var Ze=Ee(A.clientX-ge.left-ue.left+$e,A.clientY-ge.top-ue.top+Te),Xe=Ee(A.clientX-ge.left-ce.left+$e,A.clientY-ge.top-ce.top+Te);Ze<3.5&&Xe<3.5&&(s=Ze>Xe?"cursor":"anchor"),Xe<3.5?s="anchor":Ze<3.5?s="cursor":s="scroll",u=setTimeout(H,450)}l=U},g),p.addListener(h,"touchend",function(A){C=g.$mouseHandler.isMousePressed=!1,m&&clearInterval(m),s=="zoom"?(s="",w=0):u?(g.selection.moveToPosition(x),w=0,F()):s=="scroll"?(O(),I()):F(),clearTimeout(u),u=null},g),p.addListener(h,"touchmove",function(A){u&&(clearTimeout(u),u=null);var S=A.touches;if(!(S.length>1||s=="zoom")){var D=S[0],W=a-D.clientX,U=c-D.clientY;if(s=="wait")if(W*W+U*U>4)s="cursor";else return A.preventDefault();a=D.clientX,c=D.clientY,A.clientX=D.clientX,A.clientY=D.clientY;var K=A.timeStamp,Z=K-o;if(o=K,s=="scroll"){var te=new d(A,g);te.speed=1,te.wheelX=W,te.wheelY=U,10*Math.abs(W)<Math.abs(U)&&(W=0),10*Math.abs(U)<Math.abs(W)&&(U=0),Z!=0&&(T=W/Z,k=U/Z),g._emit("mousewheel",te),te.propagationStopped||(T=k=0)}else{var he=new d(A,g),ne=he.getDocumentPosition();s=="cursor"?g.selection.moveCursorToPosition(ne):s=="anchor"&&g.selection.setSelectionAnchor(ne.row,ne.column),g.renderer.scrollCursorIntoView(ne),A.preventDefault()}}},g);function O(){w+=60,m=setInterval(function(){w--<=0&&(clearInterval(m),m=null),Math.abs(T)<.01&&(T=0),Math.abs(k)<.01&&(k=0),w<20&&(T=.9*T),w<20&&(k=.9*k);var A=g.session.getScrollTop();g.renderer.scrollBy(10*T,10*k),A==g.session.getScrollTop()&&(w=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(n,r,f){var d=n("../lib/event"),p=n("../lib/useragent"),b=n("./default_handlers").DefaultHandlers,h=n("./default_gutter_handler").GutterHandler,g=n("./mouse_event").MouseEvent,s=n("./dragdrop_handler").DragdropHandler,a=n("./touch_handler").addTouchListeners,c=n("../config"),l=function(){function o(u){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var m=this;this.editor=u,new b(this),new h(this),new s(this);var w=function(T){var k=!document.hasFocus||!document.hasFocus()||!u.isFocused()&&document.activeElement==(u.textInput&&u.textInput.getElement());k&&window.focus(),u.focus(),setTimeout(function(){u.isFocused()||u.focus()})},x=u.renderer.getMouseEventTarget();d.addListener(x,"click",this.onMouseEvent.bind(this,"click"),u),d.addListener(x,"mousemove",this.onMouseMove.bind(this,"mousemove"),u),d.addMultiMouseDownListener([x,u.renderer.scrollBarV&&u.renderer.scrollBarV.inner,u.renderer.scrollBarH&&u.renderer.scrollBarH.inner,u.textInput&&u.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",u),d.addMouseWheelListener(u.container,this.onMouseWheel.bind(this,"mousewheel"),u),a(u.container,u);var E=u.renderer.$gutter;d.addListener(E,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),u),d.addListener(E,"click",this.onMouseEvent.bind(this,"gutterclick"),u),d.addListener(E,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),u),d.addListener(E,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),u),d.addListener(x,"mousedown",w,u),d.addListener(E,"mousedown",w,u),p.isIE&&u.renderer.scrollBarV&&(d.addListener(u.renderer.scrollBarV.element,"mousedown",w,u),d.addListener(u.renderer.scrollBarH.element,"mousedown",w,u)),u.on("mousemove",function(T){if(!(m.state||m.$dragDelay||!m.$dragEnabled)){var k=u.renderer.screenToTextCoordinates(T.x,T.y),C=u.session.selection.getRange(),L=u.renderer;!C.isEmpty()&&C.insideStart(k.row,k.column)?L.setCursorStyle("default"):L.setCursorStyle("")}},u)}return o.prototype.onMouseEvent=function(u,m){this.editor.session&&this.editor._emit(u,new g(m,this.editor))},o.prototype.onMouseMove=function(u,m){var w=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!w||!w.length||this.editor._emit(u,new g(m,this.editor))},o.prototype.onMouseWheel=function(u,m){var w=new g(m,this.editor);w.speed=this.$scrollSpeed*2,w.wheelX=m.wheelX,w.wheelY=m.wheelY,this.editor._emit(u,w)},o.prototype.setState=function(u){this.state=u},o.prototype.captureMouse=function(u,m){this.x=u.x,this.y=u.y,this.isMousePressed=!0;var w=this.editor,x=this.editor.renderer;x.$isMousePressed=!0;var E=this,T=function(F){if(F){if(p.isWebKit&&!F.which&&E.releaseMouse)return E.releaseMouse();E.x=F.clientX,E.y=F.clientY,m&&m(F),E.mouseEvent=new g(F,E.editor),E.$mouseMoved=!0}},k=function(F){w.off("beforeEndOperation",L),clearInterval(R),w.session&&C(),E[E.state+"End"]&&E[E.state+"End"](F),E.state="",E.isMousePressed=x.$isMousePressed=!1,x.$keepTextAreaAtCursor&&x.$moveTextAreaToCursor(),E.$onCaptureMouseMove=E.releaseMouse=null,F&&E.onMouseEvent("mouseup",F),w.endOperation()},C=function(){E[E.state]&&E[E.state](),E.$mouseMoved=!1};if(p.isOldIE&&u.domEvent.type=="dblclick")return setTimeout(function(){k(u)});var L=function(F){E.releaseMouse&&w.curOp.command.name&&w.curOp.selectionChanged&&(E[E.state+"End"]&&E[E.state+"End"](),E.state="",E.releaseMouse())};w.on("beforeEndOperation",L),w.startOperation({command:{name:"mouse"}}),E.$onCaptureMouseMove=T,E.releaseMouse=d.capture(this.editor.container,T,k);var R=setInterval(C,20)},o.prototype.cancelContextMenu=function(){var u=(function(m){m&&m.domEvent&&m.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",u),m&&m.domEvent&&d.stopEvent(m.domEvent))}).bind(this);setTimeout(u,10),this.editor.on("nativecontextmenu",u)},o.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},o}();l.prototype.releaseMouse=null,c.defineOptions(l.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:p.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),r.MouseHandler=l}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(n,r,f){var d=n("../lib/dom"),p=function(){function b(h){h.on("click",function(g){var s=g.getDocumentPosition(),a=h.session,c=a.getFoldAt(s.row,s.column,1);c&&(g.getAccelKey()?a.removeFold(c):a.expandFold(c),g.stop());var l=g.domEvent&&g.domEvent.target;l&&d.hasCssClass(l,"ace_inline_button")&&d.hasCssClass(l,"ace_toggle_wrap")&&(a.setOption("wrap",!a.getUseWrapMode()),h.renderer.scrollCursorIntoView())}),h.on("gutterclick",function(g){var s=h.renderer.$gutterLayer.getRegion(g);if(s=="foldWidgets"){var a=g.getDocumentPosition().row,c=h.session;c.foldWidgets&&c.foldWidgets[a]&&h.session.onFoldWidgetClick(a,g),h.isFocused()||h.focus(),g.stop()}}),h.on("gutterdblclick",function(g){var s=h.renderer.$gutterLayer.getRegion(g);if(s=="foldWidgets"){var a=g.getDocumentPosition().row,c=h.session,l=c.getParentFoldRangeData(a,!0),o=l.range||l.firstRange;if(o){a=o.start.row;var u=c.getFoldAt(a,c.getLine(a).length,1);u?c.removeFold(u):(c.addFold("...",o),h.renderer.scrollCursorIntoView({row:o.start.row,column:0}))}g.stop()}})}return b}();r.FoldHandler=p}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(n,r,f){var d=n("../lib/keys"),p=n("../lib/event"),b=function(){function h(g){this.$editor=g,this.$data={editor:g},this.$handlers=[],this.setDefaultHandler(g.commands)}return h.prototype.setDefaultHandler=function(g){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=g,this.addKeyboardHandler(g,0)},h.prototype.setKeyboardHandler=function(g){var s=this.$handlers;if(s[s.length-1]!=g){for(;s[s.length-1]&&s[s.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(s[s.length-1]);this.addKeyboardHandler(g,1)}},h.prototype.addKeyboardHandler=function(g,s){if(g){typeof g=="function"&&!g.handleKeyboard&&(g.handleKeyboard=g);var a=this.$handlers.indexOf(g);a!=-1&&this.$handlers.splice(a,1),s==null?this.$handlers.push(g):this.$handlers.splice(s,0,g),a==-1&&g.attach&&g.attach(this.$editor)}},h.prototype.removeKeyboardHandler=function(g){var s=this.$handlers.indexOf(g);return s==-1?!1:(this.$handlers.splice(s,1),g.detach&&g.detach(this.$editor),!0)},h.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},h.prototype.getStatusText=function(){var g=this.$data,s=g.editor;return this.$handlers.map(function(a){return a.getStatusText&&a.getStatusText(s,g)||""}).filter(Boolean).join(" ")},h.prototype.$callKeyboardHandlers=function(g,s,a,c){for(var l,o=!1,u=this.$editor.commands,m=this.$handlers.length;m--&&(l=this.$handlers[m].handleKeyboard(this.$data,g,s,a,c),!(!(!l||!l.command)&&(l.command=="null"?o=!0:o=u.exec(l.command,this.$editor,l.args,c),o&&c&&g!=-1&&l.passEvent!=!0&&l.command.passEvent!=!0&&p.stopEvent(c),o))););return!o&&g==-1&&(l={command:"insertstring"},o=u.exec("insertstring",this.$editor,s)),o&&this.$editor._signal&&this.$editor._signal("keyboardActivity",l),o},h.prototype.onCommandKey=function(g,s,a){var c=d.keyCodeToString(a);return this.$callKeyboardHandlers(s,c,a,g)},h.prototype.onTextInput=function(g){return this.$callKeyboardHandlers(-1,g)},h}();r.KeyBinding=b}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(n,r,f){var d=0,p=0,b=!1,h=!1,g=!1,s=[[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]],a=[[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,l=1,o=0,u=1,m=2,w=3,x=4,E=5,T=6,k=7,C=8,L=9,R=10,F=11,I=12,H=13,P=14,O=15,A=16,S=17,D=18,W=[D,D,D,D,D,D,D,D,D,T,E,T,C,E,D,D,D,D,D,D,D,D,D,D,D,D,D,D,E,E,E,T,C,x,x,F,F,F,x,x,x,x,x,R,L,R,L,L,m,m,m,m,m,m,m,m,m,m,L,x,x,x,x,x,x,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,x,x,x,x,x,x,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,x,x,x,x,D,D,D,D,D,D,E,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,F,F,F,F,x,x,x,x,o,x,x,D,x,x,F,F,m,m,x,o,x,x,x,m,o,x,x,x,x,x],U=[C,C,C,C,C,C,C,C,C,C,C,D,D,D,o,u,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,C,E,H,P,O,A,S,L,F,F,F,F,F,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 K(ne,ae,ue,ce){var ge=d?a:s,Te=null,$e=null,Ee=null,Ze=0,Xe=null,gt=null,at=-1,mt=null,sn=null,bn=[];if(!ce)for(mt=0,ce=[];mt<ue;mt++)ce[mt]=he(ne[mt]);for(p=d,b=!1,h=!1,g=!1,sn=0;sn<ue;sn++){if(Te=Ze,bn[sn]=$e=te(ne,ce,bn,sn),Ze=ge[Te][$e],Xe=Ze&240,Ze&=15,ae[sn]=Ee=ge[Ze][5],Xe>0)if(Xe==16){for(mt=at;mt<sn;mt++)ae[mt]=1;at=-1}else at=-1;if(gt=ge[Ze][6],gt)at==-1&&(at=sn);else if(at>-1){for(mt=at;mt<sn;mt++)ae[mt]=Ee;at=-1}ce[sn]==E&&(ae[sn]=0),p|=Ee}if(g){for(mt=0;mt<ue;mt++)if(ce[mt]==T){ae[mt]=d;for(var Jt=mt-1;Jt>=0&&ce[Jt]==C;Jt--)ae[Jt]=d}}}function Z(ne,ae,ue){if(!(p<ne)){if(ne==1&&d==l&&!h){ue.reverse();return}for(var ce=ue.length,ge=0,Te,$e,Ee,Ze;ge<ce;){if(ae[ge]>=ne){for(Te=ge+1;Te<ce&&ae[Te]>=ne;)Te++;for($e=ge,Ee=Te-1;$e<Ee;$e++,Ee--)Ze=ue[$e],ue[$e]=ue[Ee],ue[Ee]=Ze;ge=Te}ge++}}}function te(ne,ae,ue,ce){var ge=ae[ce],Te,$e,Ee,Ze;switch(ge){case o:case u:b=!1;case x:case w:return ge;case m:return b?w:m;case k:return b=!0,u;case C:return x;case L:return ce<1||ce+1>=ae.length||(Te=ue[ce-1])!=m&&Te!=w||($e=ae[ce+1])!=m&&$e!=w?x:(b&&($e=w),$e==Te?$e:x);case R:return Te=ce>0?ue[ce-1]:E,Te==m&&ce+1<ae.length&&ae[ce+1]==m?m:x;case F:if(ce>0&&ue[ce-1]==m)return m;if(b)return x;for(Ze=ce+1,Ee=ae.length;Ze<Ee&&ae[Ze]==F;)Ze++;return Ze<Ee&&ae[Ze]==m?m:x;case I:for(Ee=ae.length,Ze=ce+1;Ze<Ee&&ae[Ze]==I;)Ze++;if(Ze<Ee){var Xe=ne[ce],gt=Xe>=1425&&Xe<=2303||Xe==64286;if(Te=ae[Ze],gt&&(Te==u||Te==k))return u}return ce<1||(Te=ae[ce-1])==E?x:ue[ce-1];case E:return b=!1,h=!0,d;case T:return g=!0,x;case H:case P:case A:case S:case O:b=!1;case D:return x}}function he(ne){var ae=ne.charCodeAt(0),ue=ae>>8;return ue==0?ae>191?o:W[ae]:ue==5?/[\u0591-\u05f4]/.test(ne)?u:o:ue==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(ne)?I:/[\u0660-\u0669\u066b-\u066c]/.test(ne)?w:ae==1642?F:/[\u06f0-\u06f9]/.test(ne)?m:k:ue==32&&ae<=8287?U[ae&255]:ue==254&&ae>=65136?k:x}r.L=o,r.R=u,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(ne,ae,ue){if(ne.length<2)return{};var ce=ne.split(""),ge=new Array(ce.length),Te=new Array(ce.length),$e=[];d=ue?l:c,K(ce,$e,ce.length,ae);for(var Ee=0;Ee<ge.length;ge[Ee]=Ee,Ee++);Z(2,$e,ge),Z(1,$e,ge);for(var Ee=0;Ee<ge.length-1;Ee++)ae[Ee]===w?$e[Ee]=r.AN:$e[Ee]===u&&(ae[Ee]>k&&ae[Ee]<H||ae[Ee]===x||ae[Ee]===D)?$e[Ee]=r.ON_R:Ee>0&&ce[Ee-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(ce[Ee])&&($e[Ee-1]=$e[Ee]=r.R_H,Ee++);ce[ce.length-1]===r.DOT&&($e[ce.length-1]=r.B),ce[0]==="‫"&&($e[0]=r.RLE);for(var Ee=0;Ee<ge.length;Ee++)Te[Ee]=$e[ge[Ee]];return{logicalFromVisual:ge,bidiLevels:Te}},r.hasBidiCharacters=function(ne,ae){for(var ue=!1,ce=0;ce<ne.length;ce++)ae[ce]=he(ne.charAt(ce)),!ue&&(ae[ce]==u||ae[ce]==k||ae[ce]==w)&&(ue=!0);return ue},r.getVisualFromLogicalIdx=function(ne,ae){for(var ue=0;ue<ae.logicalFromVisual.length;ue++)if(ae.logicalFromVisual[ue]==ne)return ue;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(n,r,f){var d=n("./lib/bidiutil"),p=n("./lib/lang"),b=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,h=function(){function g(s){this.session=s,this.bidiMap={},this.currentRow=null,this.bidiUtil=d,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="¶",this.RLE="‫",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=b.test(s.getValue())}return g.prototype.isBidiRow=function(s,a,c){return this.seenBidi?(s!==this.currentRow&&(this.currentRow=s,this.updateRowLine(a,c),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},g.prototype.onChange=function(s){this.seenBidi?this.currentRow=null:s.action=="insert"&&b.test(s.lines.join(`
178
+ `).length>2?kt=u.down:pt>W&&S[pt-1]==" "?(kt=u.right,$n=m.option):(pt>W||pt==W&&W!=D&&Nt==pt)&&(kt=u.right),Nt!==pt&&($n|=m.shift),kt){var $r=Ve.onCommandKey({},$n,kt);if(!$r&&Ve.commands){kt=u.keyCodeToString(kt);var Yr=Ve.commands.findKeyCommand($n,kt);Yr&&Ve.execCommand(Yr)}D=Nt,W=pt,ae("")}}};document.addEventListener("selectionchange",At),Ve.on("destroy",function(){document.removeEventListener("selectionchange",At)})}this.destroy=function(){L.parentElement&&L.parentElement.removeChild(L)}},r.TextInput=T,r.$setUserAgentForTests=function(k,C){E=k,w=C}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(n,r,f){var d=n("../lib/useragent"),p=0,b=550,h=function(){function a(c){c.$clickSelection=null;var l=c.editor;l.setDefaultHandler("mousedown",this.onMouseDown.bind(c)),l.setDefaultHandler("dblclick",this.onDoubleClick.bind(c)),l.setDefaultHandler("tripleclick",this.onTripleClick.bind(c)),l.setDefaultHandler("quadclick",this.onQuadClick.bind(c)),l.setDefaultHandler("mousewheel",this.onMouseWheel.bind(c));var o=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];o.forEach(function(u){c[u]=this[u]},this),c.selectByLines=this.extendSelectionBy.bind(c,"getLineRange"),c.selectByWords=this.extendSelectionBy.bind(c,"getWordRange")}return a.prototype.onMouseDown=function(c){var l=c.inSelection(),o=c.getDocumentPosition();this.mousedownEvent=c;var u=this.editor,m=c.getButton();if(m!==0){var w=u.getSelectionRange(),x=w.isEmpty();(x||m==1)&&u.selection.moveToPosition(o),m==2&&(u.textInput.onContextMenu(c.domEvent),d.isMozilla||c.preventDefault());return}if(this.mousedownEvent.time=Date.now(),l&&!u.isFocused()&&(u.focus(),this.$focusTimeout&&!this.$clickSelection&&!u.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(c);return}return this.captureMouse(c),this.startSelect(o,c.domEvent._clicks>1),c.preventDefault()},a.prototype.startSelect=function(c,l){c=c||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var o=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?o.selection.selectToPosition(c):l||o.selection.moveToPosition(c),l||this.select(),o.setStyle("ace_selecting"),this.setState("select"))},a.prototype.select=function(){var c,l=this.editor,o=l.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var u=this.$clickSelection.comparePoint(o);if(u==-1)c=this.$clickSelection.end;else if(u==1)c=this.$clickSelection.start;else{var m=s(this.$clickSelection,o);o=m.cursor,c=m.anchor}l.selection.setSelectionAnchor(c.row,c.column)}l.selection.selectToPosition(o),l.renderer.scrollCursorIntoView()},a.prototype.extendSelectionBy=function(c){var l,o=this.editor,u=o.renderer.screenToTextCoordinates(this.x,this.y),m=o.selection[c](u.row,u.column);if(this.$clickSelection){var w=this.$clickSelection.comparePoint(m.start),x=this.$clickSelection.comparePoint(m.end);if(w==-1&&x<=0)l=this.$clickSelection.end,(m.end.row!=u.row||m.end.column!=u.column)&&(u=m.start);else if(x==1&&w>=0)l=this.$clickSelection.start,(m.start.row!=u.row||m.start.column!=u.column)&&(u=m.end);else if(w==-1&&x==1)u=m.end,l=m.start;else{var E=s(this.$clickSelection,u);u=E.cursor,l=E.anchor}o.selection.setSelectionAnchor(l.row,l.column)}o.selection.selectToPosition(u),o.renderer.scrollCursorIntoView()},a.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},a.prototype.focusWait=function(){var c=g(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),l=Date.now();(c>p||l-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},a.prototype.onDoubleClick=function(c){var l=c.getDocumentPosition(),o=this.editor,u=o.session,m=u.getBracketRange(l);m?(m.isEmpty()&&(m.start.column--,m.end.column++),this.setState("select")):(m=o.selection.getWordRange(l.row,l.column),this.setState("selectByWords")),this.$clickSelection=m,this.select()},a.prototype.onTripleClick=function(c){var l=c.getDocumentPosition(),o=this.editor;this.setState("selectByLines");var u=o.getSelectionRange();u.isMultiLine()&&u.contains(l.row,l.column)?(this.$clickSelection=o.selection.getLineRange(u.start.row),this.$clickSelection.end=o.selection.getLineRange(u.end.row).end):this.$clickSelection=o.selection.getLineRange(l.row),this.select()},a.prototype.onQuadClick=function(c){var l=this.editor;l.selectAll(),this.$clickSelection=l.getSelectionRange(),this.setState("selectAll")},a.prototype.onMouseWheel=function(c){if(!c.getAccelKey()){c.getShiftKey()&&c.wheelY&&!c.wheelX&&(c.wheelX=c.wheelY,c.wheelY=0);var l=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var o=this.$lastScroll,u=c.domEvent.timeStamp,m=u-o.t,w=m?c.wheelX/m:o.vx,x=m?c.wheelY/m:o.vy;m<b&&(w=(w+o.vx)/2,x=(x+o.vy)/2);var E=Math.abs(w/x),T=!1;if(E>=1&&l.renderer.isScrollableBy(c.wheelX*c.speed,0)&&(T=!0),E<=1&&l.renderer.isScrollableBy(0,c.wheelY*c.speed)&&(T=!0),T)o.allowed=u;else if(u-o.allowed<b){var k=Math.abs(w)<=1.5*Math.abs(o.vx)&&Math.abs(x)<=1.5*Math.abs(o.vy);k?(T=!0,o.allowed=u):o.allowed=0}if(o.t=u,o.vx=w,o.vy=x,T)return l.renderer.scrollBy(c.wheelX*c.speed,c.wheelY*c.speed),c.stop()}},a}();h.prototype.selectEnd=h.prototype.selectByLinesEnd,h.prototype.selectAllEnd=h.prototype.selectByLinesEnd,h.prototype.selectByWordsEnd=h.prototype.selectByLinesEnd,r.DefaultHandlers=h;function g(a,c,l,o){return Math.sqrt(Math.pow(l-a,2)+Math.pow(o-c,2))}function s(a,c){if(a.start.row==a.end.row)var l=2*c.column-a.start.column-a.end.column;else if(a.start.row==a.end.row-1&&!a.start.column&&!a.end.column)var l=c.column-4;else var l=2*c.row-a.start.row-a.end.row;return l<0?{cursor:a.start,anchor:a.end}:{cursor:a.end,anchor:a.start}}}),ace.define("ace/lib/scroll",["require","exports","module"],function(n,r,f){r.preventParentScroll=function(d){d.stopPropagation();var p=d.currentTarget,b=p.scrollHeight>p.clientHeight;b||d.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(n,r,f){var d=this&&this.__extends||function(){var u=function(m,w){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,E){x.__proto__=E}||function(x,E){for(var T in E)Object.prototype.hasOwnProperty.call(E,T)&&(x[T]=E[T])},u(m,w)};return function(m,w){if(typeof w!="function"&&w!==null)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");u(m,w);function x(){this.constructor=m}m.prototype=w===null?Object.create(w):(x.prototype=w.prototype,new x)}}(),p=this&&this.__values||function(u){var m=typeof Symbol=="function"&&Symbol.iterator,w=m&&u[m],x=0;if(w)return w.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&x>=u.length&&(u=void 0),{value:u&&u[x++],done:!u}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")},b=n("./lib/dom");n("./lib/event");var h=n("./range").Range,g=n("./lib/scroll").preventParentScroll,s="ace_tooltip",a=function(){function u(m){this.isOpen=!1,this.$element=null,this.$parentNode=m}return u.prototype.$init=function(){return this.$element=b.createElement("div"),this.$element.className=s,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},u.prototype.getElement=function(){return this.$element||this.$init()},u.prototype.setText=function(m){this.getElement().textContent=m},u.prototype.setHtml=function(m){this.getElement().innerHTML=m},u.prototype.setPosition=function(m,w){this.getElement().style.left=m+"px",this.getElement().style.top=w+"px"},u.prototype.setClassName=function(m){b.addCssClass(this.getElement(),m)},u.prototype.setTheme=function(m){this.$element.className=s+" "+(m.isDark?"ace_dark ":"")+(m.cssClass||"")},u.prototype.show=function(m,w,x){m!=null&&this.setText(m),w!=null&&x!=null&&this.setPosition(w,x),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},u.prototype.hide=function(m){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=s,this.isOpen=!1)},u.prototype.getHeight=function(){return this.getElement().offsetHeight},u.prototype.getWidth=function(){return this.getElement().offsetWidth},u.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},u}(),c=function(){function u(){this.popups=[]}return u.prototype.addPopup=function(m){this.popups.push(m),this.updatePopups()},u.prototype.removePopup=function(m){var w=this.popups.indexOf(m);w!==-1&&(this.popups.splice(w,1),this.updatePopups())},u.prototype.updatePopups=function(){var m,w,x,E;this.popups.sort(function(P,O){return O.priority-P.priority});var T=[];try{for(var k=p(this.popups),C=k.next();!C.done;C=k.next()){var L=C.value,R=!0;try{for(var F=(x=void 0,p(T)),I=F.next();!I.done;I=F.next()){var H=I.value;if(this.doPopupsOverlap(H,L)){R=!1;break}}}catch(P){x={error:P}}finally{try{I&&!I.done&&(E=F.return)&&E.call(F)}finally{if(x)throw x.error}}R?T.push(L):L.hide()}}catch(P){m={error:P}}finally{try{C&&!C.done&&(w=k.return)&&w.call(k)}finally{if(m)throw m.error}}},u.prototype.doPopupsOverlap=function(m,w){var x=m.getElement().getBoundingClientRect(),E=w.getElement().getBoundingClientRect();return x.left<E.right&&x.right>E.left&&x.top<E.bottom&&x.bottom>E.top},u}(),l=new c;r.popupManager=l,r.Tooltip=a;var o=function(u){d(m,u);function m(w){w===void 0&&(w=document.body);var x=u.call(this,w)||this;x.timeout=void 0,x.lastT=0,x.idleTime=350,x.lastEvent=void 0,x.onMouseOut=x.onMouseOut.bind(x),x.onMouseMove=x.onMouseMove.bind(x),x.waitForHover=x.waitForHover.bind(x),x.hide=x.hide.bind(x);var E=x.getElement();return E.style.whiteSpace="pre-wrap",E.style.pointerEvents="auto",E.addEventListener("mouseout",x.onMouseOut),E.tabIndex=-1,E.addEventListener("blur",(function(){E.contains(document.activeElement)||this.hide()}).bind(x)),E.addEventListener("wheel",g),x}return m.prototype.addToEditor=function(w){w.on("mousemove",this.onMouseMove),w.on("mousedown",this.hide),w.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},m.prototype.removeFromEditor=function(w){w.off("mousemove",this.onMouseMove),w.off("mousedown",this.hide),w.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},m.prototype.onMouseMove=function(w,x){this.lastEvent=w,this.lastT=Date.now();var E=x.$mouseHandler.isMousePressed;if(this.isOpen){var T=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(T.row,T.column)||E||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||E||(this.lastEvent=w,this.timeout=setTimeout(this.waitForHover,this.idleTime))},m.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var w=Date.now()-this.lastT;if(this.idleTime-w>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-w);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},m.prototype.isOutsideOfText=function(w){var x=w.editor,E=w.getDocumentPosition(),T=x.session.getLine(E.row);if(E.column==T.length){var k=x.renderer.pixelToScreenCoordinates(w.clientX,w.clientY),C=x.session.documentToScreenPosition(E.row,E.column);if(C.column!=k.column||C.row!=k.row)return!0}return!1},m.prototype.setDataProvider=function(w){this.$gatherData=w},m.prototype.showForRange=function(w,x,E,T){var k=10;if(!(T&&T!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var C=w.renderer;this.isOpen||(l.addPopup(this),this.$registerCloseEvents(),this.setTheme(C.theme)),this.isOpen=!0,this.addMarker(x,w.session),this.range=h.fromPoints(x.start,x.end);var L=C.textToScreenCoordinates(x.start.row,x.start.column),R=C.scroller.getBoundingClientRect();L.pageX<R.left&&(L.pageX=R.left);var F=this.getElement();F.innerHTML="",F.appendChild(E),F.style.maxHeight="",F.style.display="block";var I=F.clientHeight,H=F.clientWidth,P=window.innerHeight-L.pageY-C.lineHeight,O=!0;L.pageY-I<0&&L.pageY<P&&(O=!1),F.style.maxHeight=(O?L.pageY:P)-k+"px",F.style.top=O?"":L.pageY+C.lineHeight+"px",F.style.bottom=O?window.innerHeight-L.pageY+"px":"",F.style.left=Math.min(L.pageX,window.innerWidth-H-k)+"px"}},m.prototype.addMarker=function(w,x){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=x,this.marker=x&&x.addMarker(w,"ace_highlight-marker","text")},m.prototype.hide=function(w){!w&&document.activeElement==this.getElement()||w&&w.target&&(w.type!="keydown"||w.ctrlKey||w.metaKey)&&this.$element.contains(w.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,l.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(w){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!w.relatedTarget||this.getElement().contains(w.relatedTarget)||w&&w.currentTarget.contains(w.relatedTarget)||w.relatedTarget.classList.contains("ace_content")||this.hide())},m}(a);r.HoverTooltip=o}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config"],function(n,r,f){var d=this&&this.__extends||function(){var u=function(m,w){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,E){x.__proto__=E}||function(x,E){for(var T in E)Object.prototype.hasOwnProperty.call(E,T)&&(x[T]=E[T])},u(m,w)};return function(m,w){if(typeof w!="function"&&w!==null)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");u(m,w);function x(){this.constructor=m}m.prototype=w===null?Object.create(w):(x.prototype=w.prototype,new x)}}(),p=this&&this.__values||function(u){var m=typeof Symbol=="function"&&Symbol.iterator,w=m&&u[m],x=0;if(w)return w.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&x>=u.length&&(u=void 0),{value:u&&u[x++],done:!u}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")},b=n("../lib/dom"),h=n("../lib/event"),g=n("../tooltip").Tooltip,s=n("../config").nls,a=5,c=3;r.GUTTER_TOOLTIP_LEFT_OFFSET=a,r.GUTTER_TOOLTIP_TOP_OFFSET=c;function l(u){var m=u.editor,w=m.renderer.$gutterLayer,x=new o(m,!0);u.editor.setDefaultHandler("guttermousedown",function(R){if(!(!m.isFocused()||R.getButton()!=0)){var F=w.getRegion(R);if(F!="foldWidgets"){var I=R.getDocumentPosition().row,H=m.session.selection;if(R.getShiftKey())H.selectTo(I,0);else{if(R.domEvent.detail==2)return m.selectAll(),R.preventDefault();u.$clickSelection=m.selection.getLineRange(I)}return u.setState("selectByLines"),u.captureMouse(R),R.preventDefault()}}});var E,T;function k(){var R=T.getDocumentPosition().row,F=m.session.getLength();if(R==F){var I=m.renderer.pixelToScreenCoordinates(0,T.y).row,H=T.$pos;if(I>m.session.documentToScreenRow(H.row,H.column))return C()}if(x.showTooltip(R),!!x.isOpen)if(m.on("mousewheel",C),m.on("changeSession",C),window.addEventListener("keydown",C,!0),u.$tooltipFollowsMouse)L(T);else{var P=T.getGutterRow(),O=w.$lines.get(P);if(O){var A=O.element.querySelector(".ace_gutter_annotation"),S=A.getBoundingClientRect(),D=x.getElement().style;D.left=S.right-a+"px",D.top=S.bottom-c+"px"}else L(T)}}function C(R){R&&R.type==="keydown"&&(R.ctrlKey||R.metaKey)||R&&R.type==="mouseout"&&(!R.relatedTarget||x.getElement().contains(R.relatedTarget))||(E&&(E=clearTimeout(E)),x.isOpen&&(x.hideTooltip(),m.off("mousewheel",C),m.off("changeSession",C),window.removeEventListener("keydown",C,!0)))}function L(R){x.setPosition(R.x,R.y)}u.editor.setDefaultHandler("guttermousemove",function(R){var F=R.domEvent.target||R.domEvent.srcElement;if(b.hasCssClass(F,"ace_fold-widget")||b.hasCssClass(F,"ace_custom-widget"))return C();x.isOpen&&u.$tooltipFollowsMouse&&L(R),T=R,!E&&(E=setTimeout(function(){E=null,T&&!u.isMousePressed&&k()},50))}),h.addListener(m.renderer.$gutter,"mouseout",function(R){T=null,x.isOpen&&(E=setTimeout(function(){E=null,C(R)},50))},m)}r.GutterHandler=l;var o=function(u){d(m,u);function m(w,x){x===void 0&&(x=!1);var E=u.call(this,w.container)||this;E.editor=w,E.visibleTooltipRow;var T=E.getElement();return T.setAttribute("role","tooltip"),T.style.pointerEvents="auto",x&&(E.onMouseOut=E.onMouseOut.bind(E),T.addEventListener("mouseout",E.onMouseOut)),E}return m.prototype.onMouseOut=function(w){this.isOpen&&(!w.relatedTarget||this.getElement().contains(w.relatedTarget)||w&&w.currentTarget.contains(w.relatedTarget)||this.hideTooltip())},m.prototype.setPosition=function(w,x){var E=window.innerWidth||document.documentElement.clientWidth,T=window.innerHeight||document.documentElement.clientHeight,k=this.getWidth(),C=this.getHeight();w+=15,x+=15,w+k>E&&(w-=w+k-E),x+C>T&&(x-=20+C),g.prototype.setPosition.call(this,w,x)},Object.defineProperty(m,"annotationLabels",{get:function(){return{error:{singular:s("gutter-tooltip.aria-label.error.singular","error"),plural:s("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:s("gutter-tooltip.aria-label.security.singular","security finding"),plural:s("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:s("gutter-tooltip.aria-label.warning.singular","warning"),plural:s("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:s("gutter-tooltip.aria-label.info.singular","information message"),plural:s("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:s("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:s("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),m.prototype.showTooltip=function(w){var x,E=this.editor.renderer.$gutterLayer,T=E.$annotations[w],k;T?k={displayText:Array.from(T.displayText),type:Array.from(T.type)}:k={displayText:[],type:[]};var C=E.session.getFoldLine(w);if(C&&E.$showFoldedAnnotations){for(var L={error:[],security:[],warning:[],info:[],hint:[]},R={error:1,security:2,warning:3,info:4,hint:5},F,I=w+1;I<=C.end.row;I++)if(E.$annotations[I])for(var H=0;H<E.$annotations[I].text.length;H++){var P=E.$annotations[I].type[H];L[P].push(E.$annotations[I].text[H]),(!F||R[P]<R[F])&&(F=P)}if(["error","security","warning"].includes(F)){var O="".concat(m.annotationsToSummaryString(L)," in folded code.");k.displayText.push(O),k.type.push(F+"_fold")}}if(k.displayText.length===0)return this.hideTooltip();for(var A={error:[],security:[],warning:[],info:[],hint:[]},S=E.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",I=0;I<k.displayText.length;I++){var D=b.createElement("span"),W=b.createElement("span");(x=W.classList).add.apply(x,["ace_".concat(k.type[I]),S]),W.setAttribute("aria-label","".concat(m.annotationLabels[k.type[I].replace("_fold","")].singular)),W.setAttribute("role","img"),W.appendChild(b.createTextNode(" ")),D.appendChild(W),D.appendChild(b.createTextNode(k.displayText[I])),D.appendChild(b.createElement("br")),A[k.type[I].replace("_fold","")].push(D)}var U=this.getElement();b.removeChildren(U),A.error.forEach(function(K){return U.appendChild(K)}),A.security.forEach(function(K){return U.appendChild(K)}),A.warning.forEach(function(K){return U.appendChild(K)}),A.info.forEach(function(K){return U.appendChild(K)}),A.hint.forEach(function(K){return U.appendChild(K)}),U.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip")),this.show(),this.visibleTooltipRow=w,this.editor._signal("showGutterTooltip",this)},m.prototype.hideTooltip=function(){this.isOpen&&(this.$element.removeAttribute("aria-live"),this.hide(),this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this))},m.annotationsToSummaryString=function(w){var x,E,T=[],k=["error","security","warning","info","hint"];try{for(var C=p(k),L=C.next();!L.done;L=C.next()){var R=L.value;if(w[R].length){var F=w[R].length===1?m.annotationLabels[R].singular:m.annotationLabels[R].plural;T.push("".concat(w[R].length," ").concat(F))}}}catch(I){x={error:I}}finally{try{L&&!L.done&&(E=C.return)&&E.call(C)}finally{if(x)throw x.error}}return T.join(", ")},m}(g);r.GutterTooltip=o}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(n,r,f){var d=n("../lib/event"),p=n("../lib/useragent"),b=function(){function h(g,s){this.speed,this.wheelX,this.wheelY,this.domEvent=g,this.editor=s,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 h.prototype.stopPropagation=function(){d.stopPropagation(this.domEvent),this.propagationStopped=!0},h.prototype.preventDefault=function(){d.preventDefault(this.domEvent),this.defaultPrevented=!0},h.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},h.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},h.prototype.getGutterRow=function(){var g=this.getDocumentPosition().row,s=this.editor.session.documentToScreenRow(g,0),a=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return s-a},h.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var g=this.editor,s=g.getSelectionRange();if(s.isEmpty())this.$inSelection=!1;else{var a=this.getDocumentPosition();this.$inSelection=s.contains(a.row,a.column)}return this.$inSelection},h.prototype.getButton=function(){return d.getButton(this.domEvent)},h.prototype.getShiftKey=function(){return this.domEvent.shiftKey},h.prototype.getAccelKey=function(){return p.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},h}();r.MouseEvent=b}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(n,r,f){var d=n("../lib/dom"),p=n("../lib/event"),b=n("../lib/useragent"),h=200,g=200,s=5;function a(l){var o=l.editor,u=d.createElement("div");u.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",u.textContent=" ";var m=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];m.forEach(function(ne){l[ne]=this[ne]},this),o.on("mousedown",this.onMouseDown.bind(l));var w=o.container,x,E,T,k,C,L,R=0,F,I,H,P,O;this.onDragStart=function(ne){if(this.cancelDrag||!w.draggable){var ae=this;return setTimeout(function(){ae.startSelect(),ae.captureMouse(ne)},0),ne.preventDefault()}C=o.getSelectionRange();var ue=ne.dataTransfer;ue.effectAllowed=o.getReadOnly()?"copy":"copyMove",o.container.appendChild(u),ue.setDragImage&&ue.setDragImage(u,0,0),setTimeout(function(){o.container.removeChild(u)}),ue.clearData(),ue.setData("Text",o.session.getTextRange()),I=!0,this.setState("drag")},this.onDragEnd=function(ne){if(w.draggable=!1,I=!1,this.setState(null),!o.getReadOnly()){var ae=ne.dataTransfer.dropEffect;!F&&ae=="move"&&o.session.remove(o.getSelectionRange()),o.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(ne){if(!(o.getReadOnly()||!te(ne.dataTransfer)))return E=ne.clientX,T=ne.clientY,x||W(),R++,ne.dataTransfer.dropEffect=F=he(ne),p.preventDefault(ne)},this.onDragOver=function(ne){if(!(o.getReadOnly()||!te(ne.dataTransfer)))return E=ne.clientX,T=ne.clientY,x||(W(),R++),K!==null&&(K=null),ne.dataTransfer.dropEffect=F=he(ne),p.preventDefault(ne)},this.onDragLeave=function(ne){if(R--,R<=0&&x)return U(),F=null,p.preventDefault(ne)},this.onDrop=function(ne){if(L){var ae=ne.dataTransfer;if(I)switch(F){case"move":C.contains(L.row,L.column)?C={start:L,end:L}:C=o.moveText(C,L);break;case"copy":C=o.moveText(C,L,!0);break}else{var ue=ae.getData("Text");C={start:L,end:o.session.insert(L,ue)},o.focus(),F=null}return U(),p.preventDefault(ne)}},p.addListener(w,"dragstart",this.onDragStart.bind(l),o),p.addListener(w,"dragend",this.onDragEnd.bind(l),o),p.addListener(w,"dragenter",this.onDragEnter.bind(l),o),p.addListener(w,"dragover",this.onDragOver.bind(l),o),p.addListener(w,"dragleave",this.onDragLeave.bind(l),o),p.addListener(w,"drop",this.onDrop.bind(l),o);function A(ne,ae){var ue=Date.now(),ce=!ae||ne.row!=ae.row,ge=!ae||ne.column!=ae.column;if(!P||ce||ge)o.moveCursorToPosition(ne),P=ue,O={x:E,y:T};else{var Te=c(O.x,O.y,E,T);Te>s?P=null:ue-P>=g&&(o.renderer.scrollCursorIntoView(),P=null)}}function S(ne,ae){var ue=Date.now(),ce=o.renderer.layerConfig.lineHeight,ge=o.renderer.layerConfig.characterWidth,Te=o.renderer.scroller.getBoundingClientRect(),$e={x:{left:E-Te.left,right:Te.right-E},y:{top:T-Te.top,bottom:Te.bottom-T}},Ee=Math.min($e.x.left,$e.x.right),Ze=Math.min($e.y.top,$e.y.bottom),Xe={row:ne.row,column:ne.column};Ee/ge<=2&&(Xe.column+=$e.x.left<$e.x.right?-3:2),Ze/ce<=1&&(Xe.row+=$e.y.top<$e.y.bottom?-1:1);var gt=ne.row!=Xe.row,lt=ne.column!=Xe.column,mt=!ae||ne.row!=ae.row;gt||lt&&!mt?H?ue-H>=h&&o.renderer.scrollCursorIntoView(Xe):H=ue:H=null}function D(){var ne=L;L=o.renderer.screenToTextCoordinates(E,T),A(L,ne),S(L,ne)}function W(){C=o.selection.toOrientedRange(),x=o.session.addMarker(C,"ace_selection",o.getSelectionStyle()),o.clearSelection(),o.isFocused()&&o.renderer.$cursorLayer.setBlinking(!1),clearInterval(k),D(),k=setInterval(D,20),R=0,p.addListener(document,"mousemove",Z)}function U(){clearInterval(k),o.session.removeMarker(x),x=null,o.selection.fromOrientedRange(C),o.isFocused()&&!I&&o.$resetCursorStyle(),C=null,L=null,R=0,H=null,P=null,p.removeListener(document,"mousemove",Z)}var K=null;function Z(){K==null&&(K=setTimeout(function(){K!=null&&x&&U()},20))}function te(ne){var ae=ne.types;return!ae||Array.prototype.some.call(ae,function(ue){return ue=="text/plain"||ue=="Text"})}function he(ne){var ae=["copy","copymove","all","uninitialized"],ue=["move","copymove","linkmove","all","uninitialized"],ce=b.isMac?ne.altKey:ne.ctrlKey,ge="uninitialized";try{ge=ne.dataTransfer.effectAllowed.toLowerCase()}catch{}var Te="none";return ce&&ae.indexOf(ge)>=0?Te="copy":ue.indexOf(ge)>=0?Te="move":ae.indexOf(ge)>=0&&(Te="copy"),Te}}(function(){this.dragWait=function(){var l=Date.now()-this.mousedownEvent.time;l>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var l=this.editor.container;l.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(l){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var l=this.editor,o=l.container;o.draggable=!0,l.renderer.$cursorLayer.setBlinking(!1),l.setStyle("ace_dragging");var u=b.isWin?"default":"move";l.renderer.setCursorStyle(u),this.setState("dragReady")},this.onMouseDrag=function(l){var o=this.editor.container;if(b.isIE&&this.state=="dragReady"){var u=c(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);u>3&&o.dragDrop()}if(this.state==="dragWait"){var u=c(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);u>0&&(o.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(l){if(this.$dragEnabled){this.mousedownEvent=l;var o=this.editor,u=l.inSelection(),m=l.getButton(),w=l.domEvent.detail||1;if(w===1&&m===0&&u){if(l.editor.inMultiSelectMode&&(l.getAccelKey()||l.getShiftKey()))return;this.mousedownEvent.time=Date.now();var x=l.domEvent.target||l.domEvent.srcElement;if("unselectable"in x&&(x.unselectable="on"),o.getDragDelay()){if(b.isWebKit){this.cancelDrag=!0;var E=o.container;E.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(l,this.onMouseDrag.bind(this)),l.defaultPrevented=!0}}}}).call(a.prototype);function c(l,o,u,m){return Math.sqrt(Math.pow(u-l,2)+Math.pow(m-o,2))}r.DragdropHandler=a}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(n,r,f){var d=n("./mouse_event").MouseEvent,p=n("../lib/event"),b=n("../lib/dom");r.addTouchListeners=function(h,g){var s="scroll",a,c,l,o,u,m,w=0,x,E=0,T=0,k=0,C,L;function R(){var A=window.navigator&&window.navigator.clipboard,S=!1,D=function(){var K=g.getCopyText(),Z=g.session.getUndoManager().hasUndo();L.replaceChild(b.buildDom(S?["span",!K&&W("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],K&&W("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],K&&W("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],A&&W("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],Z&&W("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],W("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],W("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),L.firstChild)},W=function(K){return g.commands.canExecute(K,g)},U=function(K){var Z=K.target.getAttribute("action");if(Z=="more"||!S)return S=!S,D();Z=="paste"?A.readText().then(function(te){g.execCommand(Z,te)}):Z&&((Z=="cut"||Z=="copy")&&(A?A.writeText(g.getCopyText()):document.execCommand("copy")),g.execCommand(Z)),L.firstChild.style.display="none",S=!1,Z!="openCommandPalette"&&g.focus()};L=b.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(K){s="menu",K.stopPropagation(),K.preventDefault(),g.textInput.focus()},ontouchend:function(K){K.stopPropagation(),K.preventDefault(),U(K)},onclick:U},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],g.container)}function F(){if(!g.getOption("enableMobileMenu")){L&&I();return}L||R();var A=g.selection.cursor,S=g.renderer.textToScreenCoordinates(A.row,A.column),D=g.renderer.textToScreenCoordinates(0,0).pageX,W=g.renderer.scrollLeft,U=g.container.getBoundingClientRect();L.style.top=S.pageY-U.top-3+"px",S.pageX-U.left<U.width-70?(L.style.left="",L.style.right="10px"):(L.style.right="",L.style.left=D+W-U.left+"px"),L.style.display="",L.firstChild.style.display="none",g.on("input",I)}function I(A){L&&(L.style.display="none"),g.off("input",I)}function H(){u=null,clearTimeout(u);var A=g.selection.getRange(),S=A.contains(x.row,x.column);(A.isEmpty()||!S)&&(g.selection.moveToPosition(x),g.selection.selectWord()),s="wait",F()}function P(){u=null,clearTimeout(u),g.selection.moveToPosition(x);var A=E>=2?g.selection.getLineRange(x.row):g.session.getBracketRange(x);A&&!A.isEmpty()?g.selection.setRange(A):g.selection.selectWord(),s="wait"}p.addListener(h,"contextmenu",function(A){if(C){var S=g.textInput.getElement();S.focus()}},g),p.addListener(h,"touchstart",function(A){var S=A.touches;if(u||S.length>1){clearTimeout(u),u=null,l=-1,s="zoom";return}C=g.$mouseHandler.isMousePressed=!0;var D=g.renderer.layerConfig.lineHeight,W=g.renderer.layerConfig.lineHeight,U=A.timeStamp;o=U;var K=S[0],Z=K.clientX,te=K.clientY;Math.abs(a-Z)+Math.abs(c-te)>D&&(l=-1),a=A.clientX=Z,c=A.clientY=te,T=k=0;var he=new d(A,g);if(x=he.getDocumentPosition(),U-l<500&&S.length==1&&!w)E++,A.preventDefault(),A.button=0,P();else{E=0;var ne=g.selection.cursor,ae=g.selection.isEmpty()?ne:g.selection.anchor,ue=g.renderer.$cursorLayer.getPixelPosition(ne,!0),ce=g.renderer.$cursorLayer.getPixelPosition(ae,!0),ge=g.renderer.scroller.getBoundingClientRect(),Te=g.renderer.layerConfig.offset,$e=g.renderer.scrollLeft,Ee=function(gt,lt){return gt=gt/W,lt=lt/D-.75,gt*gt+lt*lt};if(A.clientX<ge.left){s="zoom";return}var Ze=Ee(A.clientX-ge.left-ue.left+$e,A.clientY-ge.top-ue.top+Te),Xe=Ee(A.clientX-ge.left-ce.left+$e,A.clientY-ge.top-ce.top+Te);Ze<3.5&&Xe<3.5&&(s=Ze>Xe?"cursor":"anchor"),Xe<3.5?s="anchor":Ze<3.5?s="cursor":s="scroll",u=setTimeout(H,450)}l=U},g),p.addListener(h,"touchend",function(A){C=g.$mouseHandler.isMousePressed=!1,m&&clearInterval(m),s=="zoom"?(s="",w=0):u?(g.selection.moveToPosition(x),w=0,F()):s=="scroll"?(O(),I()):F(),clearTimeout(u),u=null},g),p.addListener(h,"touchmove",function(A){u&&(clearTimeout(u),u=null);var S=A.touches;if(!(S.length>1||s=="zoom")){var D=S[0],W=a-D.clientX,U=c-D.clientY;if(s=="wait")if(W*W+U*U>4)s="cursor";else return A.preventDefault();a=D.clientX,c=D.clientY,A.clientX=D.clientX,A.clientY=D.clientY;var K=A.timeStamp,Z=K-o;if(o=K,s=="scroll"){var te=new d(A,g);te.speed=1,te.wheelX=W,te.wheelY=U,10*Math.abs(W)<Math.abs(U)&&(W=0),10*Math.abs(U)<Math.abs(W)&&(U=0),Z!=0&&(T=W/Z,k=U/Z),g._emit("mousewheel",te),te.propagationStopped||(T=k=0)}else{var he=new d(A,g),ne=he.getDocumentPosition();s=="cursor"?g.selection.moveCursorToPosition(ne):s=="anchor"&&g.selection.setSelectionAnchor(ne.row,ne.column),g.renderer.scrollCursorIntoView(ne),A.preventDefault()}}},g);function O(){w+=60,m=setInterval(function(){w--<=0&&(clearInterval(m),m=null),Math.abs(T)<.01&&(T=0),Math.abs(k)<.01&&(k=0),w<20&&(T=.9*T),w<20&&(k=.9*k);var A=g.session.getScrollTop();g.renderer.scrollBy(10*T,10*k),A==g.session.getScrollTop()&&(w=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(n,r,f){var d=n("../lib/event"),p=n("../lib/useragent"),b=n("./default_handlers").DefaultHandlers,h=n("./default_gutter_handler").GutterHandler,g=n("./mouse_event").MouseEvent,s=n("./dragdrop_handler").DragdropHandler,a=n("./touch_handler").addTouchListeners,c=n("../config"),l=function(){function o(u){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var m=this;this.editor=u,new b(this),new h(this),new s(this);var w=function(T){var k=!document.hasFocus||!document.hasFocus()||!u.isFocused()&&document.activeElement==(u.textInput&&u.textInput.getElement());k&&window.focus(),u.focus(),setTimeout(function(){u.isFocused()||u.focus()})},x=u.renderer.getMouseEventTarget();d.addListener(x,"click",this.onMouseEvent.bind(this,"click"),u),d.addListener(x,"mousemove",this.onMouseMove.bind(this,"mousemove"),u),d.addMultiMouseDownListener([x,u.renderer.scrollBarV&&u.renderer.scrollBarV.inner,u.renderer.scrollBarH&&u.renderer.scrollBarH.inner,u.textInput&&u.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",u),d.addMouseWheelListener(u.container,this.onMouseWheel.bind(this,"mousewheel"),u),a(u.container,u);var E=u.renderer.$gutter;d.addListener(E,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),u),d.addListener(E,"click",this.onMouseEvent.bind(this,"gutterclick"),u),d.addListener(E,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),u),d.addListener(E,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),u),d.addListener(x,"mousedown",w,u),d.addListener(E,"mousedown",w,u),p.isIE&&u.renderer.scrollBarV&&(d.addListener(u.renderer.scrollBarV.element,"mousedown",w,u),d.addListener(u.renderer.scrollBarH.element,"mousedown",w,u)),u.on("mousemove",function(T){if(!(m.state||m.$dragDelay||!m.$dragEnabled)){var k=u.renderer.screenToTextCoordinates(T.x,T.y),C=u.session.selection.getRange(),L=u.renderer;!C.isEmpty()&&C.insideStart(k.row,k.column)?L.setCursorStyle("default"):L.setCursorStyle("")}},u)}return o.prototype.onMouseEvent=function(u,m){this.editor.session&&this.editor._emit(u,new g(m,this.editor))},o.prototype.onMouseMove=function(u,m){var w=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!w||!w.length||this.editor._emit(u,new g(m,this.editor))},o.prototype.onMouseWheel=function(u,m){var w=new g(m,this.editor);w.speed=this.$scrollSpeed*2,w.wheelX=m.wheelX,w.wheelY=m.wheelY,this.editor._emit(u,w)},o.prototype.setState=function(u){this.state=u},o.prototype.captureMouse=function(u,m){this.x=u.x,this.y=u.y,this.isMousePressed=!0;var w=this.editor,x=this.editor.renderer;x.$isMousePressed=!0;var E=this,T=function(F){if(F){if(p.isWebKit&&!F.which&&E.releaseMouse)return E.releaseMouse();E.x=F.clientX,E.y=F.clientY,m&&m(F),E.mouseEvent=new g(F,E.editor),E.$mouseMoved=!0}},k=function(F){w.off("beforeEndOperation",L),clearInterval(R),w.session&&C(),E[E.state+"End"]&&E[E.state+"End"](F),E.state="",E.isMousePressed=x.$isMousePressed=!1,x.$keepTextAreaAtCursor&&x.$moveTextAreaToCursor(),E.$onCaptureMouseMove=E.releaseMouse=null,F&&E.onMouseEvent("mouseup",F),w.endOperation()},C=function(){E[E.state]&&E[E.state](),E.$mouseMoved=!1};if(p.isOldIE&&u.domEvent.type=="dblclick")return setTimeout(function(){k(u)});var L=function(F){E.releaseMouse&&w.curOp.command.name&&w.curOp.selectionChanged&&(E[E.state+"End"]&&E[E.state+"End"](),E.state="",E.releaseMouse())};w.on("beforeEndOperation",L),w.startOperation({command:{name:"mouse"}}),E.$onCaptureMouseMove=T,E.releaseMouse=d.capture(this.editor.container,T,k);var R=setInterval(C,20)},o.prototype.cancelContextMenu=function(){var u=(function(m){m&&m.domEvent&&m.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",u),m&&m.domEvent&&d.stopEvent(m.domEvent))}).bind(this);setTimeout(u,10),this.editor.on("nativecontextmenu",u)},o.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},o}();l.prototype.releaseMouse=null,c.defineOptions(l.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:p.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),r.MouseHandler=l}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(n,r,f){var d=n("../lib/dom"),p=function(){function b(h){h.on("click",function(g){var s=g.getDocumentPosition(),a=h.session,c=a.getFoldAt(s.row,s.column,1);c&&(g.getAccelKey()?a.removeFold(c):a.expandFold(c),g.stop());var l=g.domEvent&&g.domEvent.target;l&&d.hasCssClass(l,"ace_inline_button")&&d.hasCssClass(l,"ace_toggle_wrap")&&(a.setOption("wrap",!a.getUseWrapMode()),h.renderer.scrollCursorIntoView())}),h.on("gutterclick",function(g){var s=h.renderer.$gutterLayer.getRegion(g);if(s=="foldWidgets"){var a=g.getDocumentPosition().row,c=h.session;c.foldWidgets&&c.foldWidgets[a]&&h.session.onFoldWidgetClick(a,g),h.isFocused()||h.focus(),g.stop()}}),h.on("gutterdblclick",function(g){var s=h.renderer.$gutterLayer.getRegion(g);if(s=="foldWidgets"){var a=g.getDocumentPosition().row,c=h.session,l=c.getParentFoldRangeData(a,!0),o=l.range||l.firstRange;if(o){a=o.start.row;var u=c.getFoldAt(a,c.getLine(a).length,1);u?c.removeFold(u):(c.addFold("...",o),h.renderer.scrollCursorIntoView({row:o.start.row,column:0}))}g.stop()}})}return b}();r.FoldHandler=p}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(n,r,f){var d=n("../lib/keys"),p=n("../lib/event"),b=function(){function h(g){this.$editor=g,this.$data={editor:g},this.$handlers=[],this.setDefaultHandler(g.commands)}return h.prototype.setDefaultHandler=function(g){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=g,this.addKeyboardHandler(g,0)},h.prototype.setKeyboardHandler=function(g){var s=this.$handlers;if(s[s.length-1]!=g){for(;s[s.length-1]&&s[s.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(s[s.length-1]);this.addKeyboardHandler(g,1)}},h.prototype.addKeyboardHandler=function(g,s){if(g){typeof g=="function"&&!g.handleKeyboard&&(g.handleKeyboard=g);var a=this.$handlers.indexOf(g);a!=-1&&this.$handlers.splice(a,1),s==null?this.$handlers.push(g):this.$handlers.splice(s,0,g),a==-1&&g.attach&&g.attach(this.$editor)}},h.prototype.removeKeyboardHandler=function(g){var s=this.$handlers.indexOf(g);return s==-1?!1:(this.$handlers.splice(s,1),g.detach&&g.detach(this.$editor),!0)},h.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},h.prototype.getStatusText=function(){var g=this.$data,s=g.editor;return this.$handlers.map(function(a){return a.getStatusText&&a.getStatusText(s,g)||""}).filter(Boolean).join(" ")},h.prototype.$callKeyboardHandlers=function(g,s,a,c){for(var l,o=!1,u=this.$editor.commands,m=this.$handlers.length;m--&&(l=this.$handlers[m].handleKeyboard(this.$data,g,s,a,c),!(!(!l||!l.command)&&(l.command=="null"?o=!0:o=u.exec(l.command,this.$editor,l.args,c),o&&c&&g!=-1&&l.passEvent!=!0&&l.command.passEvent!=!0&&p.stopEvent(c),o))););return!o&&g==-1&&(l={command:"insertstring"},o=u.exec("insertstring",this.$editor,s)),o&&this.$editor._signal&&this.$editor._signal("keyboardActivity",l),o},h.prototype.onCommandKey=function(g,s,a){var c=d.keyCodeToString(a);return this.$callKeyboardHandlers(s,c,a,g)},h.prototype.onTextInput=function(g){return this.$callKeyboardHandlers(-1,g)},h}();r.KeyBinding=b}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(n,r,f){var d=0,p=0,b=!1,h=!1,g=!1,s=[[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]],a=[[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,l=1,o=0,u=1,m=2,w=3,x=4,E=5,T=6,k=7,C=8,L=9,R=10,F=11,I=12,H=13,P=14,O=15,A=16,S=17,D=18,W=[D,D,D,D,D,D,D,D,D,T,E,T,C,E,D,D,D,D,D,D,D,D,D,D,D,D,D,D,E,E,E,T,C,x,x,F,F,F,x,x,x,x,x,R,L,R,L,L,m,m,m,m,m,m,m,m,m,m,L,x,x,x,x,x,x,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,x,x,x,x,x,x,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,x,x,x,x,D,D,D,D,D,D,E,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,F,F,F,F,x,x,x,x,o,x,x,D,x,x,F,F,m,m,x,o,x,x,x,m,o,x,x,x,x,x],U=[C,C,C,C,C,C,C,C,C,C,C,D,D,D,o,u,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,C,E,H,P,O,A,S,L,F,F,F,F,F,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 K(ne,ae,ue,ce){var ge=d?a:s,Te=null,$e=null,Ee=null,Ze=0,Xe=null,gt=null,lt=-1,mt=null,sn=null,wn=[];if(!ce)for(mt=0,ce=[];mt<ue;mt++)ce[mt]=he(ne[mt]);for(p=d,b=!1,h=!1,g=!1,sn=0;sn<ue;sn++){if(Te=Ze,wn[sn]=$e=te(ne,ce,wn,sn),Ze=ge[Te][$e],Xe=Ze&240,Ze&=15,ae[sn]=Ee=ge[Ze][5],Xe>0)if(Xe==16){for(mt=lt;mt<sn;mt++)ae[mt]=1;lt=-1}else lt=-1;if(gt=ge[Ze][6],gt)lt==-1&&(lt=sn);else if(lt>-1){for(mt=lt;mt<sn;mt++)ae[mt]=Ee;lt=-1}ce[sn]==E&&(ae[sn]=0),p|=Ee}if(g){for(mt=0;mt<ue;mt++)if(ce[mt]==T){ae[mt]=d;for(var Jt=mt-1;Jt>=0&&ce[Jt]==C;Jt--)ae[Jt]=d}}}function Z(ne,ae,ue){if(!(p<ne)){if(ne==1&&d==l&&!h){ue.reverse();return}for(var ce=ue.length,ge=0,Te,$e,Ee,Ze;ge<ce;){if(ae[ge]>=ne){for(Te=ge+1;Te<ce&&ae[Te]>=ne;)Te++;for($e=ge,Ee=Te-1;$e<Ee;$e++,Ee--)Ze=ue[$e],ue[$e]=ue[Ee],ue[Ee]=Ze;ge=Te}ge++}}}function te(ne,ae,ue,ce){var ge=ae[ce],Te,$e,Ee,Ze;switch(ge){case o:case u:b=!1;case x:case w:return ge;case m:return b?w:m;case k:return b=!0,u;case C:return x;case L:return ce<1||ce+1>=ae.length||(Te=ue[ce-1])!=m&&Te!=w||($e=ae[ce+1])!=m&&$e!=w?x:(b&&($e=w),$e==Te?$e:x);case R:return Te=ce>0?ue[ce-1]:E,Te==m&&ce+1<ae.length&&ae[ce+1]==m?m:x;case F:if(ce>0&&ue[ce-1]==m)return m;if(b)return x;for(Ze=ce+1,Ee=ae.length;Ze<Ee&&ae[Ze]==F;)Ze++;return Ze<Ee&&ae[Ze]==m?m:x;case I:for(Ee=ae.length,Ze=ce+1;Ze<Ee&&ae[Ze]==I;)Ze++;if(Ze<Ee){var Xe=ne[ce],gt=Xe>=1425&&Xe<=2303||Xe==64286;if(Te=ae[Ze],gt&&(Te==u||Te==k))return u}return ce<1||(Te=ae[ce-1])==E?x:ue[ce-1];case E:return b=!1,h=!0,d;case T:return g=!0,x;case H:case P:case A:case S:case O:b=!1;case D:return x}}function he(ne){var ae=ne.charCodeAt(0),ue=ae>>8;return ue==0?ae>191?o:W[ae]:ue==5?/[\u0591-\u05f4]/.test(ne)?u:o:ue==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(ne)?I:/[\u0660-\u0669\u066b-\u066c]/.test(ne)?w:ae==1642?F:/[\u06f0-\u06f9]/.test(ne)?m:k:ue==32&&ae<=8287?U[ae&255]:ue==254&&ae>=65136?k:x}r.L=o,r.R=u,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(ne,ae,ue){if(ne.length<2)return{};var ce=ne.split(""),ge=new Array(ce.length),Te=new Array(ce.length),$e=[];d=ue?l:c,K(ce,$e,ce.length,ae);for(var Ee=0;Ee<ge.length;ge[Ee]=Ee,Ee++);Z(2,$e,ge),Z(1,$e,ge);for(var Ee=0;Ee<ge.length-1;Ee++)ae[Ee]===w?$e[Ee]=r.AN:$e[Ee]===u&&(ae[Ee]>k&&ae[Ee]<H||ae[Ee]===x||ae[Ee]===D)?$e[Ee]=r.ON_R:Ee>0&&ce[Ee-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(ce[Ee])&&($e[Ee-1]=$e[Ee]=r.R_H,Ee++);ce[ce.length-1]===r.DOT&&($e[ce.length-1]=r.B),ce[0]==="‫"&&($e[0]=r.RLE);for(var Ee=0;Ee<ge.length;Ee++)Te[Ee]=$e[ge[Ee]];return{logicalFromVisual:ge,bidiLevels:Te}},r.hasBidiCharacters=function(ne,ae){for(var ue=!1,ce=0;ce<ne.length;ce++)ae[ce]=he(ne.charAt(ce)),!ue&&(ae[ce]==u||ae[ce]==k||ae[ce]==w)&&(ue=!0);return ue},r.getVisualFromLogicalIdx=function(ne,ae){for(var ue=0;ue<ae.logicalFromVisual.length;ue++)if(ae.logicalFromVisual[ue]==ne)return ue;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(n,r,f){var d=n("./lib/bidiutil"),p=n("./lib/lang"),b=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,h=function(){function g(s){this.session=s,this.bidiMap={},this.currentRow=null,this.bidiUtil=d,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="¶",this.RLE="‫",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=b.test(s.getValue())}return g.prototype.isBidiRow=function(s,a,c){return this.seenBidi?(s!==this.currentRow&&(this.currentRow=s,this.updateRowLine(a,c),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},g.prototype.onChange=function(s){this.seenBidi?this.currentRow=null:s.action=="insert"&&b.test(s.lines.join(`
179
179
  `))&&(this.seenBidi=!0,this.currentRow=null)},g.prototype.getDocumentRow=function(){var s=0,a=this.session.$screenRowCache;if(a.length){var c=this.session.$getRowCacheIndex(a,this.currentRow);c>=0&&(s=this.session.$docRowCache[c])}return s},g.prototype.getSplitIndex=function(){var s=0,a=this.session.$screenRowCache;if(a.length)for(var c,l=this.session.$getRowCacheIndex(a,this.currentRow);this.currentRow-s>0&&(c=this.session.$getRowCacheIndex(a,this.currentRow-s-1),c===l);)l=c,s++;else s=this.currentRow;return s},g.prototype.updateRowLine=function(s,a){s===void 0&&(s=this.getDocumentRow());var c=s===this.session.getLength()-1,l=c?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(s),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var o=this.session.$wrapData[s];o&&(a===void 0&&(a=this.getSplitIndex()),a>0&&o.length?(this.wrapIndent=o.indent,this.wrapOffset=this.wrapIndent*this.charWidths[d.L],this.line=a<o.length?this.line.substring(o[a-1],o[a]):this.line.substring(o[o.length-1])):this.line=this.line.substring(0,o[a]),a==o.length&&(this.line+=this.showInvisibles?l:d.DOT))}else this.line+=this.showInvisibles?l:d.DOT;var u=this.session,m=0,w;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(x,E){return x===" "||u.isFullWidth(x.charCodeAt(0))?(w=x===" "?u.getScreenTabSize(E+m):2,m+=w-1,p.stringRepeat(d.DOT,w)):x}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==d.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},g.prototype.updateBidiMap=function(){var s=[];d.hasBidiCharacters(this.line,s)||this.isRtlDir?this.bidiMap=d.doBidiReorder(this.line,s,this.isRtlDir):this.bidiMap={}},g.prototype.markAsDirty=function(){this.currentRow=null},g.prototype.updateCharacterWidths=function(s){if(this.characterWidth!==s.$characterSize.width){this.fontMetrics=s;var a=this.characterWidth=s.$characterSize.width,c=s.$measureCharWidth("ה");this.charWidths[d.L]=this.charWidths[d.EN]=this.charWidths[d.ON_R]=a,this.charWidths[d.R]=this.charWidths[d.AN]=c,this.charWidths[d.R_H]=c*.45,this.charWidths[d.B]=this.charWidths[d.RLE]=0,this.currentRow=null}},g.prototype.setShowInvisibles=function(s){this.showInvisibles=s,this.currentRow=null},g.prototype.setEolChar=function(s){this.EOL=s},g.prototype.setContentWidth=function(s){this.contentWidth=s},g.prototype.isRtlLine=function(s){return this.$isRtl?!0:s!=null?this.session.getLine(s).charAt(0)==this.RLE:this.isRtlDir},g.prototype.setRtlDirection=function(s,a){for(var c=s.getCursorPosition(),l=s.selection.getSelectionAnchor().row;l<=c.row;l++)!a&&s.session.getLine(l).charAt(0)===s.session.$bidiHandler.RLE?s.session.doc.removeInLine(l,0,1):a&&s.session.getLine(l).charAt(0)!==s.session.$bidiHandler.RLE&&s.session.doc.insert({column:0,row:l},s.session.$bidiHandler.RLE)},g.prototype.getPosLeft=function(s){s-=this.wrapIndent;var a=this.line.charAt(0)===this.RLE?1:0,c=s>a?this.session.getOverwrite()?s:s-1:a,l=d.getVisualFromLogicalIdx(c,this.bidiMap),o=this.bidiMap.bidiLevels,u=0;!this.session.getOverwrite()&&s<=a&&o[l]%2!==0&&l++;for(var m=0;m<l;m++)u+=this.charWidths[o[m]];return!this.session.getOverwrite()&&s>a&&o[l]%2===0&&(u+=this.charWidths[o[l]]),this.wrapIndent&&(u+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(u+=this.rtlLineOffset),u},g.prototype.getSelections=function(s,a){var c=this.bidiMap,l=c.bidiLevels,o,u=[],m=0,w=Math.min(s,a)-this.wrapIndent,x=Math.max(s,a)-this.wrapIndent,E=!1,T=!1,k=0;this.wrapIndent&&(m+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var C,L=0;L<l.length;L++)C=c.logicalFromVisual[L],o=l[L],E=C>=w&&C<x,E&&!T?k=m:!E&&T&&u.push({left:k,width:m-k}),m+=this.charWidths[o],T=E;if(E&&L===l.length&&u.push({left:k,width:m-k}),this.isRtlDir)for(var R=0;R<u.length;R++)u[R].left+=this.rtlLineOffset;return u},g.prototype.offsetToCol=function(c){this.isRtlDir&&(c-=this.rtlLineOffset);var a=0,c=Math.max(c,0),l=0,o=0,u=this.bidiMap.bidiLevels,m=this.charWidths[u[o]];for(this.wrapIndent&&(c-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);c>l+m/2;){if(l+=m,o===u.length-1){m=0;break}m=this.charWidths[u[++o]]}return o>0&&u[o-1]%2!==0&&u[o]%2===0?(c<l&&o--,a=this.bidiMap.logicalFromVisual[o]):o>0&&u[o-1]%2===0&&u[o]%2!==0?a=1+(c>l?this.bidiMap.logicalFromVisual[o]:this.bidiMap.logicalFromVisual[o-1]):this.isRtlDir&&o===u.length-1&&m===0&&u[o-1]%2===0||!this.isRtlDir&&o===0&&u[o]%2!==0?a=1+this.bidiMap.logicalFromVisual[o]:(o>0&&u[o-1]%2!==0&&m!==0&&o--,a=this.bidiMap.logicalFromVisual[o]),a===0&&this.isRtlDir&&a++,a+this.wrapIndent},g}();r.BidiHandler=h}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(n,r,f){var d=n("./lib/oop"),p=n("./lib/lang"),b=n("./lib/event_emitter").EventEmitter,h=n("./range").Range,g=function(){function s(a){this.session=a,this.doc=a.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(l){c.$cursorChanged=!0,c.$silent||c._emit("changeCursor"),!c.$isEmpty&&!c.$silent&&c._emit("changeSelection"),!c.$keepDesiredColumnOnChange&&l.old.column!=l.value.column&&(c.$desiredColumn=null)}),this.anchor.on("change",function(){c.$anchorChanged=!0,!c.$isEmpty&&!c.$silent&&c._emit("changeSelection")})}return s.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},s.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},s.prototype.getCursor=function(){return this.lead.getPosition()},s.prototype.setAnchor=function(a,c){this.$isEmpty=!1,this.anchor.setPosition(a,c)},s.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},s.prototype.getSelectionLead=function(){return this.lead.getPosition()},s.prototype.isBackwards=function(){var a=this.anchor,c=this.lead;return a.row>c.row||a.row==c.row&&a.column>c.column},s.prototype.getRange=function(){var a=this.anchor,c=this.lead;return this.$isEmpty?h.fromPoints(c,c):this.isBackwards()?h.fromPoints(c,a):h.fromPoints(a,c)},s.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},s.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},s.prototype.setRange=function(a,c){var l=c?a.end:a.start,o=c?a.start:a.end;this.$setSelection(l.row,l.column,o.row,o.column)},s.prototype.$setSelection=function(a,c,l,o){if(!this.$silent){var u=this.$isEmpty,m=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(a,c),this.cursor.setPosition(l,o),this.$isEmpty=!h.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||u!=this.$isEmpty||m)&&this._emit("changeSelection")}},s.prototype.$moveSelection=function(a){var c=this.lead;this.$isEmpty&&this.setSelectionAnchor(c.row,c.column),a.call(this)},s.prototype.selectTo=function(a,c){this.$moveSelection(function(){this.moveCursorTo(a,c)})},s.prototype.selectToPosition=function(a){this.$moveSelection(function(){this.moveCursorToPosition(a)})},s.prototype.moveTo=function(a,c){this.clearSelection(),this.moveCursorTo(a,c)},s.prototype.moveToPosition=function(a){this.clearSelection(),this.moveCursorToPosition(a)},s.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},s.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},s.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},s.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},s.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},s.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},s.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},s.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},s.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},s.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},s.prototype.getWordRange=function(a,c){if(typeof c>"u"){var l=a||this.lead;a=l.row,c=l.column}return this.session.getWordRange(a,c)},s.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},s.prototype.selectAWord=function(){var a=this.getCursor(),c=this.session.getAWordRange(a.row,a.column);this.setSelectionRange(c)},s.prototype.getLineRange=function(a,c){var l=typeof a=="number"?a:this.lead.row,o,u=this.session.getFoldLine(l);return u?(l=u.start.row,o=u.end.row):o=l,c===!0?new h(l,0,o,this.session.getLine(o).length):new h(l,0,o+1,0)},s.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},s.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},s.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},s.prototype.wouldMoveIntoSoftTab=function(a,c,l){var o=a.column,u=a.column+c;return l<0&&(o=a.column-c,u=a.column),this.session.isTabStop(a)&&this.doc.getLine(a.row).slice(o,u).split(" ").length-1==c},s.prototype.moveCursorLeft=function(){var a=this.lead.getPosition(),c;if(c=this.session.getFoldAt(a.row,a.column,-1))this.moveCursorTo(c.start.row,c.start.column);else if(a.column===0)a.row>0&&this.moveCursorTo(a.row-1,this.doc.getLine(a.row-1).length);else{var l=this.session.getTabSize();this.wouldMoveIntoSoftTab(a,l,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-l):this.moveCursorBy(0,-1)}},s.prototype.moveCursorRight=function(){var a=this.lead.getPosition(),c;if(c=this.session.getFoldAt(a.row,a.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 l=this.session.getTabSize(),a=this.lead;this.wouldMoveIntoSoftTab(a,l,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,l):this.moveCursorBy(0,1)}},s.prototype.moveCursorLineStart=function(){var a=this.lead.row,c=this.lead.column,l=this.session.documentToScreenRow(a,c),o=this.session.screenToDocumentPosition(l,0),u=this.session.getDisplayLine(a,null,o.row,o.column),m=u.match(/^\s*/);m[0].length!=c&&!this.session.$useEmacsStyleLineStart&&(o.column+=m[0].length),this.moveCursorToPosition(o)},s.prototype.moveCursorLineEnd=function(){var a=this.lead,c=this.session.getDocumentLastRowColumnPosition(a.row,a.column);if(this.lead.column==c.column){var l=this.session.getLine(c.row);if(c.column==l.length){var o=l.search(/\s+$/);o>0&&(c.column=o)}}this.moveCursorTo(c.row,c.column)},s.prototype.moveCursorFileEnd=function(){var a=this.doc.getLength()-1,c=this.doc.getLine(a).length;this.moveCursorTo(a,c)},s.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},s.prototype.moveCursorLongWordRight=function(){var a=this.lead.row,c=this.lead.column,l=this.doc.getLine(a),o=l.substring(c);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var u=this.session.getFoldAt(a,c,1);if(u){this.moveCursorTo(u.end.row,u.end.column);return}if(this.session.nonTokenRe.exec(o)&&(c+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,o=l.substring(c)),c>=l.length){this.moveCursorTo(a,l.length),this.moveCursorRight(),a<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(o)&&(c+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(a,c)},s.prototype.moveCursorLongWordLeft=function(){var a=this.lead.row,c=this.lead.column,l;if(l=this.session.getFoldAt(a,c,-1)){this.moveCursorTo(l.start.row,l.start.column);return}var o=this.session.getFoldStringAt(a,c,-1);o==null&&(o=this.doc.getLine(a).substring(0,c));var u=p.stringReverse(o);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(u)&&(c-=this.session.nonTokenRe.lastIndex,u=u.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),c<=0){this.moveCursorTo(a,0),this.moveCursorLeft(),a>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(u)&&(c-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(a,c)},s.prototype.$shortWordEndIndex=function(a){var c=0,l,o=/\s/,u=this.session.tokenRe;if(u.lastIndex=0,this.session.tokenRe.exec(a))c=this.session.tokenRe.lastIndex;else{for(;(l=a[c])&&o.test(l);)c++;if(c<1){for(u.lastIndex=0;(l=a[c])&&!u.test(l);)if(u.lastIndex=0,c++,o.test(l))if(c>2){c--;break}else{for(;(l=a[c])&&o.test(l);)c++;if(c>2)break}}}return u.lastIndex=0,c},s.prototype.moveCursorShortWordRight=function(){var a=this.lead.row,c=this.lead.column,l=this.doc.getLine(a),o=l.substring(c),u=this.session.getFoldAt(a,c,1);if(u)return this.moveCursorTo(u.end.row,u.end.column);if(c==l.length){var m=this.doc.getLength();do a++,o=this.doc.getLine(a);while(a<m&&/^\s*$/.test(o));/^\s+/.test(o)||(o=""),c=0}var w=this.$shortWordEndIndex(o);this.moveCursorTo(a,c+w)},s.prototype.moveCursorShortWordLeft=function(){var a=this.lead.row,c=this.lead.column,l;if(l=this.session.getFoldAt(a,c,-1))return this.moveCursorTo(l.start.row,l.start.column);var o=this.session.getLine(a).substring(0,c);if(c===0){do a--,o=this.doc.getLine(a);while(a>0&&/^\s*$/.test(o));c=o.length,/\s+$/.test(o)||(o="")}var u=p.stringReverse(o),m=this.$shortWordEndIndex(u);return this.moveCursorTo(a,c-m)},s.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},s.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},s.prototype.moveCursorBy=function(a,c){var l=this.session.documentToScreenPosition(this.lead.row,this.lead.column),o;if(c===0&&(a!==0&&(this.session.$bidiHandler.isBidiRow(l.row,this.lead.row)?(o=this.session.$bidiHandler.getPosLeft(l.column),l.column=Math.round(o/this.session.$bidiHandler.charWidths[0])):o=l.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?l.column=this.$desiredColumn:this.$desiredColumn=l.column),a!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var u=this.session.lineWidgets[this.lead.row];a<0?a-=u.rowsAbove||0:a>0&&(a+=u.rowCount-(u.rowsAbove||0))}var m=this.session.screenToDocumentPosition(l.row+a,l.column,o);a!==0&&c===0&&m.row===this.lead.row&&(m.column,this.lead.column),this.moveCursorTo(m.row,m.column+c,c===0)},s.prototype.moveCursorToPosition=function(a){this.moveCursorTo(a.row,a.column)},s.prototype.moveCursorTo=function(a,c,l){var o=this.session.getFoldAt(a,c,1);o&&(a=o.start.row,c=o.start.column),this.$keepDesiredColumnOnChange=!0;var u=this.session.getLine(a);/[\uDC00-\uDFFF]/.test(u.charAt(c))&&u.charAt(c-1)&&(this.lead.row==a&&this.lead.column==c+1?c=c-1:c=c+1),this.lead.setPosition(a,c),this.$keepDesiredColumnOnChange=!1,l||(this.$desiredColumn=null)},s.prototype.moveCursorToScreen=function(a,c,l){var o=this.session.screenToDocumentPosition(a,c);this.moveCursorTo(o.row,o.column,l)},s.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},s.prototype.fromOrientedRange=function(a){this.setSelectionRange(a,a.cursor==a.start),this.$desiredColumn=a.desiredColumn||this.$desiredColumn},s.prototype.toOrientedRange=function(a){var c=this.getRange();return a?(a.start.column=c.start.column,a.start.row=c.start.row,a.end.column=c.end.column,a.end.row=c.end.row):a=c,a.cursor=this.isBackwards()?a.start:a.end,a.desiredColumn=this.$desiredColumn,a},s.prototype.getRangeOfMovements=function(a){var c=this.getCursor();try{a(this);var l=this.getCursor();return h.fromPoints(c,l)}catch{return h.fromPoints(c,c)}finally{this.moveCursorToPosition(c)}},s.prototype.toJSON=function(){if(this.rangeCount)var a=this.ranges.map(function(c){var l=c.clone();return l.isBackwards=c.cursor==c.start,l});else{var a=this.getRange();a.isBackwards=this.isBackwards()}return a},s.prototype.fromJSON=function(a){if(a.start==null)if(this.rangeList&&a.length>1){this.toSingleRange(a[0]);for(var c=a.length;c--;){var l=h.fromPoints(a[c].start,a[c].end);a[c].isBackwards&&(l.cursor=l.start),this.addRange(l,!0)}return}else a=a[0];this.rangeList&&this.toSingleRange(a),this.setSelectionRange(a,a.isBackwards)},s.prototype.isEqual=function(a){if((a.length||this.rangeCount)&&a.length!=this.rangeCount)return!1;if(!a.length||!this.ranges)return this.getRange().isEqual(a);for(var c=this.ranges.length;c--;)if(!this.ranges[c].isEqual(a[c]))return!1;return!0},s}();g.prototype.setSelectionAnchor=g.prototype.setAnchor,g.prototype.getSelectionAnchor=g.prototype.getAnchor,g.prototype.setSelectionRange=g.prototype.setRange,d.implement(g.prototype,b),r.Selection=g}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(n,r,f){var d=n("./lib/report_error").reportError,p=2e3,b=function(){function h(g){this.splitRegex,this.states=g,this.regExps={},this.matchMappings={};for(var s in this.states){for(var a=this.states[s],c=[],l=0,o=this.matchMappings[s]={defaultToken:"text"},u="g",m=[],w=0;w<a.length;w++){var x=a[w];if(x.defaultToken&&(o.defaultToken=x.defaultToken),x.caseInsensitive&&u.indexOf("i")===-1&&(u+="i"),x.unicode&&u.indexOf("u")===-1&&(u+="u"),x.regex!=null){x.regex instanceof RegExp&&(x.regex=x.regex.toString().slice(1,-1));var E=x.regex,T=new RegExp("(?:("+E+")|(.))").exec("a").length-2;Array.isArray(x.token)?x.token.length==1||T==1?x.token=x.token[0]:T-1!=x.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:x,groupCount:T-1}),x.token=x.token[0]):(x.tokenArray=x.token,x.token=null,x.onMatch=this.$arrayTokens):typeof x.token=="function"&&!x.onMatch&&(T>1?x.onMatch=this.$applyToken:x.onMatch=x.token),T>1&&(/\\\d/.test(x.regex)?E=x.regex.replace(/\\([0-9]+)/g,function(k,C){return"\\"+(parseInt(C,10)+l+1)}):(T=1,E=this.removeCapturingGroups(x.regex)),!x.splitRegex&&typeof x.token!="string"&&m.push(x)),o[l]=w,l+=T,c.push(E),x.onMatch||(x.onMatch=null)}}c.length||(o[0]=0,c.push("$")),m.forEach(function(k){k.splitRegex=this.createSplitterRegexp(k.regex,u)},this),this.regExps[s]=new RegExp("("+c.join(")|(")+")|($)",u)}}return h.prototype.$setMaxTokenCount=function(g){p=g|0},h.prototype.$applyToken=function(g){var s=this.splitRegex.exec(g).slice(1),a=this.token.apply(this,s);if(typeof a=="string")return[{type:a,value:g}];for(var c=[],l=0,o=a.length;l<o;l++)s[l]&&(c[c.length]={type:a[l],value:s[l]});return c},h.prototype.$arrayTokens=function(g){if(!g)return[];var s=this.splitRegex.exec(g);if(!s)return"text";for(var a=[],c=this.tokenArray,l=0,o=c.length;l<o;l++)s[l+1]&&(a[a.length]={type:c[l],value:s[l+1]});return a},h.prototype.removeCapturingGroups=function(g){var s=g.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(a,c){return c?"(?:":a});return s},h.prototype.createSplitterRegexp=function(g,s){if(g.indexOf("(?=")!=-1){var a=0,c=!1,l={};g.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(o,u,m,w,x,E){return c?c=x!="]":x?c=!0:w?(a==l.stack&&(l.end=E+1,l.stack=-1),a--):m&&(a++,m.length!=1&&(l.stack=a,l.start=E)),o}),l.end!=null&&/^\)*$/.test(g.substr(l.end))&&(g=g.substring(0,l.start)+g.substr(l.end))}return g.charAt(0)!="^"&&(g="^"+g),g.charAt(g.length-1)!="$"&&(g+="$"),new RegExp(g,(s||"").replace("g",""))},h.prototype.getLineTokens=function(g,s){if(s&&typeof s!="string"){var a=s.slice(0);s=a[0],s==="#tmp"&&(a.shift(),s=a.shift())}else var a=[];var c=s||"start",l=this.states[c];l||(c="start",l=this.states[c]);var o=this.matchMappings[c],u=this.regExps[c];u.lastIndex=0;for(var m,w=[],x=0,E=0,T={type:null,value:""};m=u.exec(g);){var k=o.defaultToken,C=null,L=m[0],R=u.lastIndex;if(R-L.length>x){var F=g.substring(x,R-L.length);T.type==k?T.value+=F:(T.type&&w.push(T),T={type:k,value:F})}for(var I=0;I<m.length-2;I++)if(m[I+1]!==void 0){C=l[o[I]],C.onMatch?k=C.onMatch(L,c,a,g):k=C.token,C.next&&(typeof C.next=="string"?c=C.next:c=C.next(c,a),l=this.states[c],l||(this.reportError("state doesn't exist",c),c="start",l=this.states[c]),o=this.matchMappings[c],x=R,u=this.regExps[c],u.lastIndex=R),C.consumeLineEnd&&(x=R);break}if(L){if(typeof k=="string")(!C||C.merge!==!1)&&T.type===k?T.value+=L:(T.type&&w.push(T),T={type:k,value:L});else if(k){T.type&&w.push(T),T={type:null,value:""};for(var I=0;I<k.length;I++)w.push(k[I])}}if(x==g.length)break;if(x=R,E++>p){for(E>2*g.length&&this.reportError("infinite loop with in ace tokenizer",{startState:s,line:g});x<g.length;)T.type&&w.push(T),T={value:g.substring(x,x+=500),type:"overflow"};c="start",a=[];break}}return T.type&&w.push(T),a.length>1&&a[0]!==c&&a.unshift("#tmp",c),{tokens:w,state:a.length?a:c}},h}();b.prototype.reportError=d,r.Tokenizer=b}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(n,r,f){var d=n("../lib/deep_copy").deepCopy,p;p=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(g,s){if(!s){for(var a in g)this.$rules[a]=g[a];return}for(var a in g){for(var c=g[a],l=0;l<c.length;l++){var o=c[l];(o.next||o.onMatch)&&(typeof o.next=="string"&&o.next.indexOf(s)!==0&&(o.next=s+o.next),o.nextState&&o.nextState.indexOf(s)!==0&&(o.nextState=s+o.nextState))}this.$rules[s+a]=c}},this.getRules=function(){return this.$rules},this.embedRules=function(g,s,a,c,l){var o=typeof g=="function"?new g().getRules():g;if(c)for(var u=0;u<c.length;u++)c[u]=s+c[u];else{c=[];for(var m in o)c.push(s+m)}if(this.addRules(o,s),a)for(var w=Array.prototype[l?"push":"unshift"],u=0;u<c.length;u++)w.apply(this.$rules[c[u]],d(a));this.$embeds||(this.$embeds=[]),this.$embeds.push(s)},this.getEmbeds=function(){return this.$embeds};var b=function(g,s){return(g!="start"||s.length)&&s.unshift(this.nextState,g),this.nextState},h=function(g,s){return s.shift(),s.shift()||"start"};this.normalizeRules=function(){var g=0,s=this.$rules;function a(c){var l=s[c];l.processed=!0;for(var o=0;o<l.length;o++){var u=l[o],m=null;Array.isArray(u)&&(m=u,u={}),!u.regex&&u.start&&(u.regex=u.start,u.next||(u.next=[]),u.next.push({defaultToken:u.token},{token:u.token+".end",regex:u.end||u.start,next:"pop"}),u.token=u.token+".start",u.push=!0);var w=u.next||u.push;if(w&&Array.isArray(w)){var x=u.stateName;x||(x=u.token,typeof x!="string"&&(x=x[0]||""),s[x]&&(x+=g++)),s[x]=w,u.next=x,a(x)}else w=="pop"&&(u.next=h);if(u.push&&(u.nextState=u.next||u.push,u.next=b,delete u.push),u.rules)for(var E in u.rules)s[E]?s[E].push&&s[E].push.apply(s[E],u.rules[E]):s[E]=u.rules[E];var T=typeof u=="string"?u:u.include;if(T&&(T==="$self"&&(T="start"),Array.isArray(T)?m=T.map(function(C){return s[C]}):m=s[T]),m){var k=[o,1].concat(m);u.noEscape&&(k=k.filter(function(C){return!C.next})),l.splice.apply(l,k),o--}u.keywordMap&&(u.token=this.createKeywordMapper(u.keywordMap,u.defaultToken||"text",u.caseInsensitive),delete u.defaultToken)}}Object.keys(s).forEach(a,this)},this.createKeywordMapper=function(g,s,a,c){var l=Object.create(null);return this.$keywordList=[],Object.keys(g).forEach(function(o){for(var u=g[o],m=u.split(c||"|"),w=m.length;w--;){var x=m[w];this.$keywordList.push(x),a&&(x=x.toLowerCase()),l[x]=o}},this),g=null,a?function(o){return l[o.toLowerCase()]||s}:function(o){return l[o]||s}},this.getKeywords=function(){return this.$keywords}}).call(p.prototype),r.TextHighlightRules=p}),ace.define("ace/mode/behaviour",["require","exports","module"],function(n,r,f){var d;d=function(){this.$behaviours={}},(function(){this.add=function(p,b,h){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[p]:this.$behaviours[p]={}}this.$behaviours[p][b]=h},this.addBehaviours=function(p){for(var b in p)for(var h in p[b])this.add(b,h,p[b][h])},this.remove=function(p){this.$behaviours&&this.$behaviours[p]&&delete this.$behaviours[p]},this.inherit=function(p,b){if(typeof p=="function")var h=new p().getBehaviours(b);else var h=p.getBehaviours(b);this.addBehaviours(h)},this.getBehaviours=function(p){if(p){for(var b={},h=0;h<p.length;h++)this.$behaviours[p[h]]&&(b[p[h]]=this.$behaviours[p[h]]);return b}else return this.$behaviours}}).call(d.prototype),r.Behaviour=d}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(n,r,f){var d=n("./range").Range,p=function(){function b(h,g,s){this.$session=h,this.$row=g,this.$rowTokens=h.getTokens(g);var a=h.getTokenAt(g,s);this.$tokenIndex=a?a.index:-1}return b.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]},b.prototype.stepForward=function(){this.$tokenIndex+=1;for(var h;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,h||(h=this.$session.getLength()),this.$row>=h)return this.$row=h-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},b.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},b.prototype.getCurrentTokenRow=function(){return this.$row},b.prototype.getCurrentTokenColumn=function(){var h=this.$rowTokens,g=this.$tokenIndex,s=h[g].start;if(s!==void 0)return s;for(s=0;g>0;)g-=1,s+=h[g].value.length;return s},b.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},b.prototype.getCurrentTokenRange=function(){var h=this.$rowTokens[this.$tokenIndex],g=this.getCurrentTokenColumn();return new d(this.$row,g,this.$row,g+h.value.length)},b}();r.TokenIterator=p}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(n,r,f){var d=n("../../lib/oop"),p=n("../behaviour").Behaviour,b=n("../../token_iterator").TokenIterator,h=n("../../lib/lang"),g=["text","paren.rparen","rparen","paren","punctuation.operator"],s=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],a,c={},l={'"':'"',"'":"'"},o=function(w){var x=-1;if(w.multiSelect&&(x=w.selection.index,c.rangeCount!=w.multiSelect.rangeCount&&(c={rangeCount:w.multiSelect.rangeCount})),c[x])return a=c[x];a=c[x]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},u=function(w,x,E,T){var k=w.end.row-w.start.row;return{text:E+x+T,selection:[0,w.start.column+1,k,w.end.column+(k?0:1)]}},m;m=function(w){w=w||{},this.add("braces","insertion",function(x,E,T,k,C){var L=T.getCursorPosition(),R=k.doc.getLine(L.row);if(C=="{"){o(T);var F=T.getSelectionRange(),I=k.doc.getTextRange(F),H=k.getTokenAt(L.row,L.column);if(I!==""&&I!=="{"&&T.getWrapBehavioursEnabled())return u(F,I,"{","}");if(H&&/(?:string)\.quasi|\.xml/.test(H.type)){var P=[/tag\-(?:open|name)/,/attribute\-name/];return P.some(function(K){return K.test(H.type)})||/(string)\.quasi/.test(H.type)&&H.value[L.column-H.start-1]!=="$"?void 0:(m.recordAutoInsert(T,k,"}"),{text:"{}",selection:[1,1]})}else if(m.isSaneInsertion(T,k))return/[\]\}\)]/.test(R[L.column])||T.inMultiSelectMode||w.braces?(m.recordAutoInsert(T,k,"}"),{text:"{}",selection:[1,1]}):(m.recordMaybeInsert(T,k,"{"),{text:"{",selection:[1,1]})}else if(C=="}"){o(T);var O=R.substring(L.column,L.column+1);if(O=="}"){var A=k.$findOpeningBracket("}",{column:L.column+1,row:L.row});if(A!==null&&m.isAutoInsertedClosing(L,R,C))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(C==`
180
180
  `||C==`\r
181
181
  `){o(T);var S="";m.isMaybeInsertedClosing(L,R)&&(S=h.stringRepeat("}",a.maybeInsertedBrackets),m.clearMaybeInsertedClosing());var O=R.substring(L.column,L.column+1);if(O==="}"){var D=k.findMatchingBracket({row:L.row,column:L.column+1},"}");if(!D)return null;var W=this.$getIndent(k.getLine(D.row))}else if(S)var W=this.$getIndent(R);else{m.clearMaybeInsertedClosing();return}var U=W+k.getTabString();return{text:`
@@ -1388,20 +1388,20 @@ System.register(["vue","vue-router","single-spa","vuex","vuetify"],function(sr,r
1388
1388
  padding: 0 8px;
1389
1389
  }`}),ace.define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/ext/searchbox-css","ace/keyboard/hash_handler","ace/lib/keys","ace/config"],function(n,r,f){var d=n("../lib/dom"),p=n("../lib/lang"),b=n("../lib/event"),h=n("./searchbox-css"),g=n("../keyboard/hash_handler").HashHandler,s=n("../lib/keys"),a=n("../config").nls,c=999;d.importCssString(h,"ace_searchbox",!1);var l=function(){function m(w,x,E){this.activeInput,this.element=d.buildDom(["div",{class:"ace_search right"},["span",{action:"hide",class:"ace_searchbtn_close"}],["div",{class:"ace_search_form"},["input",{class:"ace_search_field",placeholder:a("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"},a("search-box.find-all.text","All")]],["div",{class:"ace_replace_form"},["input",{class:"ace_search_field",placeholder:a("search-box.replace.placeholder","Replace with"),spellcheck:"false"}],["span",{action:"replaceAndFindNext",class:"ace_searchbtn"},a("search-box.replace-next.text","Replace")],["span",{action:"replaceAll",class:"ace_searchbtn"},a("search-box.replace-all.text","All")]],["div",{class:"ace_search_options"},["span",{action:"toggleReplace",class:"ace_button",title:a("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:a("search-box.toggle-regexp.title","RegExp Search")},".*"],["span",{action:"toggleCaseSensitive",class:"ace_button",title:a("search-box.toggle-case.title","CaseSensitive Search")},"Aa"],["span",{action:"toggleWholeWords",class:"ace_button",title:a("search-box.toggle-whole-word.title","Whole Word Search")},"\\b"],["span",{action:"searchInSelection",class:"ace_button",title:a("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(w),d.importCssString(h,"ace_searchbox",w.container),b.addListener(this.element,"touchstart",function(T){T.stopPropagation()},w)}return m.prototype.setEditor=function(w){w.searchBox=this,w.renderer.scroller.appendChild(this.element),this.editor=w},m.prototype.setSession=function(w){this.searchRange=null,this.$syncOptions(!0)},m.prototype.onEditorInput=function(){this.find(!1,!1,!0)},m.prototype.$initElements=function(w){this.searchBox=w.querySelector(".ace_search_form"),this.replaceBox=w.querySelector(".ace_replace_form"),this.searchOption=w.querySelector("[action=searchInSelection]"),this.replaceOption=w.querySelector("[action=toggleReplace]"),this.regExpOption=w.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=w.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=w.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field"),this.searchCounter=w.querySelector(".ace_search_counter")},m.prototype.$init=function(){var w=this.element;this.$initElements(w);var x=this;b.addListener(w,"mousedown",function(E){setTimeout(function(){x.activeInput.focus()},0),b.stopPropagation(E)}),b.addListener(w,"click",function(E){var T=E.target||E.srcElement,k=T.getAttribute("action");k&&x[k]?x[k]():x.$searchBarKb.commands[k]&&x.$searchBarKb.commands[k].exec(x),b.stopPropagation(E)}),b.addCommandKeyListener(w,function(E,T,k){var C=s.keyCodeToString(k),L=x.$searchBarKb.findKeyCommand(T,C);L&&L.exec&&(L.exec(x),b.stopEvent(E))}),this.$onChange=p.delayedCall(function(){x.find(!1,!1)}),b.addListener(this.searchInput,"input",function(){x.$onChange.schedule(20)}),b.addListener(this.searchInput,"focus",function(){x.activeInput=x.searchInput,x.searchInput.value&&x.highlight()}),b.addListener(this.replaceInput,"focus",function(){x.activeInput=x.replaceInput,x.searchInput.value&&x.highlight()})},m.prototype.setSearchRange=function(w){this.searchRange=w,w?this.searchRangeMarker=this.editor.session.addMarker(w,"ace_active-line"):this.searchRangeMarker&&(this.editor.session.removeMarker(this.searchRangeMarker),this.searchRangeMarker=null)},m.prototype.$syncOptions=function(w){d.setCssClass(this.replaceOption,"checked",this.searchRange),d.setCssClass(this.searchOption,"checked",this.searchOption.checked),this.replaceOption.textContent=this.replaceOption.checked?"-":"+",d.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),d.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),d.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked);var x=this.editor.getReadOnly();this.replaceOption.style.display=x?"none":"",this.replaceBox.style.display=this.replaceOption.checked&&!x?"":"none",this.find(!1,!1,w)},m.prototype.highlight=function(w){this.editor.session.highlight(w||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},m.prototype.find=function(w,x,E){var T=this.editor.find(this.searchInput.value,{skipCurrent:w,backwards:x,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked,preventScroll:E,range:this.searchRange}),k=!T&&this.searchInput.value;d.setCssClass(this.searchBox,"ace_nomatch",k),this.editor._emit("findSearchBox",{match:!k}),this.highlight(),this.updateCounter()},m.prototype.updateCounter=function(){var w=this.editor,x=w.$search.$options.re,E=x.unicode,T=0,k=0;if(x){var C=this.searchRange?w.session.getTextRange(this.searchRange):w.getValue();w.$search.$isMultilineSearch(w.getLastSearchOptions())&&(C=C.replace(/\r\n|\r|\n/g,`
1390
1390
  `),w.session.doc.$autoNewLine=`
1391
- `);var L=w.session.doc.positionToIndex(w.selection.anchor);this.searchRange&&(L-=w.session.doc.positionToIndex(this.searchRange.start));for(var R=x.lastIndex=0,F;(F=x.exec(C))&&(T++,R=F.index,R<=L&&k++,!(T>c||!F[0]&&(x.lastIndex=R+=p.skipEmptyMatch(C,R,E),R>=C.length))););}this.searchCounter.textContent=a("search-box.search-counter","$0 of $1",[k,T>c?c+"+":T])},m.prototype.findNext=function(){this.find(!0,!1)},m.prototype.findPrev=function(){this.find(!0,!0)},m.prototype.findAll=function(){var w=this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),x=!w&&this.searchInput.value;d.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(w,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&&(w=p.escapeRegExp(w)),w&&(this.searchInput.value=w),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},m.prototype.isFocused=function(){var w=document.activeElement;return w==this.searchInput||w==this.replaceInput},m}(),o=new g;o.bindKeys({"Ctrl-f|Command-f":function(m){var w=m.isReplace=!m.isReplace;m.replaceBox.style.display=w?"":"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:function(m){(m.activeInput==m.replaceInput?m.searchInput:m.replaceInput).focus()}}),o.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 u=new g([{bindKey:"Esc",name:"closeSearchBar",exec:function(m){m.searchBox.hide()}}]);l.prototype.$searchBarKb=o,l.prototype.$closeSearchBarKb=u,r.SearchBox=l,r.Search=function(m,w){var x=m.searchBox||new l(m);x.show(m.session.getTextRange(),w)}}),function(){ace.require(["ace/ext/searchbox"],function(n){t&&(t.exports=n)})}()}(cp)),cp.exports}C1();var k1=Object.defineProperty,_1=(t,e,n)=>e in t?k1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,vl=(t,e,n)=>_1(t,typeof e!="symbol"?e+"":e,n);function hp(t,e){return function(){return t.apply(e,arguments)}}const{toString:S1}=Object.prototype,{getPrototypeOf:uu}=Object,{iterator:yl,toStringTag:dp}=Symbol,bl=(t=>e=>{const n=S1.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Oi=t=>(t=t.toLowerCase(),e=>bl(e)===t),wl=t=>e=>typeof e===t,{isArray:Vs}=Array,Aa=wl("undefined");function A1(t){return t!==null&&!Aa(t)&&t.constructor!==null&&!Aa(t.constructor)&&Vr(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const fp=Oi("ArrayBuffer");function T1(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&fp(t.buffer),e}const $1=wl("string"),Vr=wl("function"),pp=wl("number"),xl=t=>t!==null&&typeof t=="object",M1=t=>t===!0||t===!1,Cl=t=>{if(bl(t)!=="object")return!1;const e=uu(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(dp in t)&&!(yl in t)},E1=Oi("Date"),I1=Oi("File"),L1=Oi("Blob"),R1=Oi("FileList"),O1=t=>xl(t)&&Vr(t.pipe),D1=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Vr(t.append)&&((e=bl(t))==="formdata"||e==="object"&&Vr(t.toString)&&t.toString()==="[object FormData]"))},N1=Oi("URLSearchParams"),[F1,P1,B1,W1]=["ReadableStream","Request","Response","Headers"].map(Oi),j1=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ta(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,f;if(typeof t!="object"&&(t=[t]),Vs(t))for(r=0,f=t.length;r<f;r++)e.call(null,t[r],r,t);else{const d=n?Object.getOwnPropertyNames(t):Object.keys(t),p=d.length;let b;for(r=0;r<p;r++)b=d[r],e.call(null,t[b],b,t)}}function gp(t,e){e=e.toLowerCase();const n=Object.keys(t);let r=n.length,f;for(;r-- >0;)if(f=n[r],e===f.toLowerCase())return f;return null}const cs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,mp=t=>!Aa(t)&&t!==cs;function hu(){const{caseless:t}=mp(this)&&this||{},e={},n=(r,f)=>{const d=t&&gp(e,f)||f;Cl(e[d])&&Cl(r)?e[d]=hu(e[d],r):Cl(r)?e[d]=hu({},r):Vs(r)?e[d]=r.slice():e[d]=r};for(let r=0,f=arguments.length;r<f;r++)arguments[r]&&Ta(arguments[r],n);return e}const z1=(t,e,n,{allOwnKeys:r}={})=>(Ta(e,(f,d)=>{n&&Vr(f)?t[d]=hp(f,n):t[d]=f},{allOwnKeys:r}),t),H1=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),U1=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},V1=(t,e,n,r)=>{let f,d,p;const b={};if(e=e||{},t==null)return e;do{for(f=Object.getOwnPropertyNames(t),d=f.length;d-- >0;)p=f[d],(!r||r(p,t,e))&&!b[p]&&(e[p]=t[p],b[p]=!0);t=n!==!1&&uu(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},q1=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},K1=t=>{if(!t)return null;if(Vs(t))return t;let e=t.length;if(!pp(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},G1=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&uu(Uint8Array)),Y1=(t,e)=>{const n=(t&&t[yl]).call(t);let r;for(;(r=n.next())&&!r.done;){const f=r.value;e.call(t,f[0],f[1])}},X1=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},Q1=Oi("HTMLFormElement"),Z1=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,n,r){return n.toUpperCase()+r}),vp=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),J1=Oi("RegExp"),yp=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};Ta(n,(f,d)=>{let p;(p=e(f,d,t))!==!1&&(r[d]=p||f)}),Object.defineProperties(t,r)},ex=t=>{yp(t,(e,n)=>{if(Vr(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(Vr(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},tx=(t,e)=>{const n={},r=f=>{f.forEach(d=>{n[d]=!0})};return Vs(t)?r(t):r(String(t).split(e)),n},nx=()=>{},rx=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function ix(t){return!!(t&&Vr(t.append)&&t[dp]==="FormData"&&t[yl])}const ox=t=>{const e=new Array(10),n=(r,f)=>{if(xl(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[f]=r;const d=Vs(r)?[]:{};return Ta(r,(p,b)=>{const h=n(p,f+1);!Aa(h)&&(d[b]=h)}),e[f]=void 0,d}}return r};return n(t,0)},sx=Oi("AsyncFunction"),ax=t=>t&&(xl(t)||Vr(t))&&Vr(t.then)&&Vr(t.catch),bp=((t,e)=>t?setImmediate:e?((n,r)=>(cs.addEventListener("message",({source:f,data:d})=>{f===cs&&d===n&&r.length&&r.shift()()},!1),f=>{r.push(f),cs.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Vr(cs.postMessage)),lx=typeof queueMicrotask<"u"?queueMicrotask.bind(cs):typeof process<"u"&&process.nextTick||bp,cx=t=>t!=null&&Vr(t[yl]),Se={isArray:Vs,isArrayBuffer:fp,isBuffer:A1,isFormData:D1,isArrayBufferView:T1,isString:$1,isNumber:pp,isBoolean:M1,isObject:xl,isPlainObject:Cl,isReadableStream:F1,isRequest:P1,isResponse:B1,isHeaders:W1,isUndefined:Aa,isDate:E1,isFile:I1,isBlob:L1,isRegExp:J1,isFunction:Vr,isStream:O1,isURLSearchParams:N1,isTypedArray:G1,isFileList:R1,forEach:Ta,merge:hu,extend:z1,trim:j1,stripBOM:H1,inherits:U1,toFlatObject:V1,kindOf:bl,kindOfTest:Oi,endsWith:q1,toArray:K1,forEachEntry:Y1,matchAll:X1,isHTMLForm:Q1,hasOwnProperty:vp,hasOwnProp:vp,reduceDescriptors:yp,freezeMethods:ex,toObjectSet:tx,toCamelCase:Z1,noop:nx,toFiniteNumber:rx,findKey:gp,global:cs,isContextDefined:mp,isSpecCompliantForm:ix,toJSONObject:ox,isAsyncFn:sx,isThenable:ax,setImmediate:bp,asap:lx,isIterable:cx};function Lt(t,e,n,r,f){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),f&&(this.response=f,this.status=f.status?f.status:null)}Se.inherits(Lt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Se.toJSONObject(this.config),code:this.code,status:this.status}}});const wp=Lt.prototype,xp={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{xp[t]={value:t}}),Object.defineProperties(Lt,xp),Object.defineProperty(wp,"isAxiosError",{value:!0}),Lt.from=(t,e,n,r,f,d)=>{const p=Object.create(wp);return Se.toFlatObject(t,p,function(b){return b!==Error.prototype},b=>b!=="isAxiosError"),Lt.call(p,t.message,e,n,r,f),p.cause=t,p.name=t.name,d&&Object.assign(p,d),p};const ux=null;function du(t){return Se.isPlainObject(t)||Se.isArray(t)}function Cp(t){return Se.endsWith(t,"[]")?t.slice(0,-2):t}function kp(t,e,n){return t?t.concat(e).map(function(r,f){return r=Cp(r),!n&&f?"["+r+"]":r}).join(n?".":""):e}function hx(t){return Se.isArray(t)&&!t.some(du)}const dx=Se.toFlatObject(Se,{},null,function(t){return/^is[A-Z]/.test(t)});function kl(t,e,n){if(!Se.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=Se.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(l,o){return!Se.isUndefined(o[l])});const r=n.metaTokens,f=n.visitor||g,d=n.dots,p=n.indexes,b=(n.Blob||typeof Blob<"u"&&Blob)&&Se.isSpecCompliantForm(e);if(!Se.isFunction(f))throw new TypeError("visitor must be a function");function h(l){if(l===null)return"";if(Se.isDate(l))return l.toISOString();if(!b&&Se.isBlob(l))throw new Lt("Blob is not supported. Use a Buffer instead.");return Se.isArrayBuffer(l)||Se.isTypedArray(l)?b&&typeof Blob=="function"?new Blob([l]):Buffer.from(l):l}function g(l,o,u){let m=l;if(l&&!u&&typeof l=="object"){if(Se.endsWith(o,"{}"))o=r?o:o.slice(0,-2),l=JSON.stringify(l);else if(Se.isArray(l)&&hx(l)||(Se.isFileList(l)||Se.endsWith(o,"[]"))&&(m=Se.toArray(l)))return o=Cp(o),m.forEach(function(w,x){!(Se.isUndefined(w)||w===null)&&e.append(p===!0?kp([o],x,d):p===null?o:o+"[]",h(w))}),!1}return du(l)?!0:(e.append(kp(u,o,d),h(l)),!1)}const s=[],a=Object.assign(dx,{defaultVisitor:g,convertValue:h,isVisitable:du});function c(l,o){if(!Se.isUndefined(l)){if(s.indexOf(l)!==-1)throw Error("Circular reference detected in "+o.join("."));s.push(l),Se.forEach(l,function(u,m){(!(Se.isUndefined(u)||u===null)&&f.call(e,u,Se.isString(m)?m.trim():m,o,a))===!0&&c(u,o?o.concat(m):[m])}),s.pop()}}if(!Se.isObject(t))throw new TypeError("data must be an object");return c(t),e}function _p(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function fu(t,e){this._pairs=[],t&&kl(t,this,e)}const Sp=fu.prototype;Sp.append=function(t,e){this._pairs.push([t,e])},Sp.toString=function(t){const e=t?function(n){return t.call(this,n,_p)}:_p;return this._pairs.map(function(n){return e(n[0])+"="+e(n[1])},"").join("&")};function fx(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ap(t,e,n){if(!e)return t;const r=n&&n.encode||fx;Se.isFunction(n)&&(n={serialize:n});const f=n&&n.serialize;let d;if(f?d=f(e,n):d=Se.isURLSearchParams(e)?e.toString():new fu(e,n).toString(r),d){const p=t.indexOf("#");p!==-1&&(t=t.slice(0,p)),t+=(t.indexOf("?")===-1?"?":"&")+d}return t}class Tp{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Se.forEach(this.handlers,function(n){n!==null&&e(n)})}}const $p={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},px=typeof URLSearchParams<"u"?URLSearchParams:fu,gx=typeof FormData<"u"?FormData:null,mx=typeof Blob<"u"?Blob:null,vx={isBrowser:!0,classes:{URLSearchParams:px,FormData:gx,Blob:mx},protocols:["http","https","file","blob","url","data"]},pu=typeof window<"u"&&typeof document<"u",gu=typeof navigator=="object"&&navigator||void 0,yx=pu&&(!gu||["ReactNative","NativeScript","NS"].indexOf(gu.product)<0),bx=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",wx=pu&&window.location.href||"http://localhost",xx=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:pu,hasStandardBrowserEnv:yx,hasStandardBrowserWebWorkerEnv:bx,navigator:gu,origin:wx},Symbol.toStringTag,{value:"Module"})),Sr={...xx,...vx};function Cx(t,e){return kl(t,new Sr.classes.URLSearchParams,Object.assign({visitor:function(n,r,f,d){return Sr.isNode&&Se.isBuffer(n)?(this.append(r,n.toString("base64")),!1):d.defaultVisitor.apply(this,arguments)}},e))}function kx(t){return Se.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function _x(t){const e={},n=Object.keys(t);let r;const f=n.length;let d;for(r=0;r<f;r++)d=n[r],e[d]=t[d];return e}function Mp(t){function e(n,r,f,d){let p=n[d++];if(p==="__proto__")return!0;const b=Number.isFinite(+p),h=d>=n.length;return p=!p&&Se.isArray(f)?f.length:p,h?(Se.hasOwnProp(f,p)?f[p]=[f[p],r]:f[p]=r,!b):((!f[p]||!Se.isObject(f[p]))&&(f[p]=[]),e(n,r,f[p],d)&&Se.isArray(f[p])&&(f[p]=_x(f[p])),!b)}if(Se.isFormData(t)&&Se.isFunction(t.entries)){const n={};return Se.forEachEntry(t,(r,f)=>{e(kx(r),f,n,0)}),n}return null}function Sx(t,e,n){if(Se.isString(t))try{return(e||JSON.parse)(t),Se.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const $a={transitional:$p,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,f=Se.isObject(t);if(f&&Se.isHTMLForm(t)&&(t=new FormData(t)),Se.isFormData(t))return r?JSON.stringify(Mp(t)):t;if(Se.isArrayBuffer(t)||Se.isBuffer(t)||Se.isStream(t)||Se.isFile(t)||Se.isBlob(t)||Se.isReadableStream(t))return t;if(Se.isArrayBufferView(t))return t.buffer;if(Se.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let d;if(f){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Cx(t,this.formSerializer).toString();if((d=Se.isFileList(t))||n.indexOf("multipart/form-data")>-1){const p=this.env&&this.env.FormData;return kl(d?{"files[]":t}:t,p&&new p,this.formSerializer)}}return f||r?(e.setContentType("application/json",!1),Sx(t)):t}],transformResponse:[function(t){const e=this.transitional||$a.transitional,n=e&&e.forcedJSONParsing,r=this.responseType==="json";if(Se.isResponse(t)||Se.isReadableStream(t))return t;if(t&&Se.isString(t)&&(n&&!this.responseType||r)){const f=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(d){if(f)throw d.name==="SyntaxError"?Lt.from(d,Lt.ERR_BAD_RESPONSE,this,null,this.response):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Sr.classes.FormData,Blob:Sr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Se.forEach(["delete","get","head","post","put","patch"],t=>{$a.headers[t]={}});const Ax=Se.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"]),Tx=t=>{const e={};let n,r,f;return t&&t.split(`
1392
- `).forEach(function(d){f=d.indexOf(":"),n=d.substring(0,f).trim().toLowerCase(),r=d.substring(f+1).trim(),!(!n||e[n]&&Ax[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},Ep=Symbol("internals");function Ma(t){return t&&String(t).trim().toLowerCase()}function _l(t){return t===!1||t==null?t:Se.isArray(t)?t.map(_l):String(t)}function $x(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const Mx=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function mu(t,e,n,r,f){if(Se.isFunction(r))return r.call(this,e,n);if(f&&(e=n),!!Se.isString(e)){if(Se.isString(r))return e.indexOf(r)!==-1;if(Se.isRegExp(r))return r.test(e)}}function Ex(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function Ix(t,e){const n=Se.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(f,d,p){return this[r].call(this,e,f,d,p)},configurable:!0})})}let qr=class{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function f(p,b,h){const g=Ma(b);if(!g)throw new Error("header name must be a non-empty string");const s=Se.findKey(r,g);(!s||r[s]===void 0||h===!0||h===void 0&&r[s]!==!1)&&(r[s||b]=_l(p))}const d=(p,b)=>Se.forEach(p,(h,g)=>f(h,g,b));if(Se.isPlainObject(t)||t instanceof this.constructor)d(t,e);else if(Se.isString(t)&&(t=t.trim())&&!Mx(t))d(Tx(t),e);else if(Se.isObject(t)&&Se.isIterable(t)){let p={},b,h;for(const g of t){if(!Se.isArray(g))throw TypeError("Object iterator must return a key-value pair");p[h=g[0]]=(b=p[h])?Se.isArray(b)?[...b,g[1]]:[b,g[1]]:g[1]}d(p,e)}else t!=null&&f(e,t,n);return this}get(t,e){if(t=Ma(t),t){const n=Se.findKey(this,t);if(n){const r=this[n];if(!e)return r;if(e===!0)return $x(r);if(Se.isFunction(e))return e.call(this,r,n);if(Se.isRegExp(e))return e.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Ma(t),t){const n=Se.findKey(this,t);return!!(n&&this[n]!==void 0&&(!e||mu(this,this[n],n,e)))}return!1}delete(t,e){const n=this;let r=!1;function f(d){if(d=Ma(d),d){const p=Se.findKey(n,d);p&&(!e||mu(n,n[p],p,e))&&(delete n[p],r=!0)}}return Se.isArray(t)?t.forEach(f):f(t),r}clear(t){const e=Object.keys(this);let n=e.length,r=!1;for(;n--;){const f=e[n];(!t||mu(this,this[f],f,t,!0))&&(delete this[f],r=!0)}return r}normalize(t){const e=this,n={};return Se.forEach(this,(r,f)=>{const d=Se.findKey(n,f);if(d){e[d]=_l(r),delete e[f];return}const p=t?Ex(f):String(f).trim();p!==f&&delete e[f],e[p]=_l(r),n[p]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return Se.forEach(this,(n,r)=>{n!=null&&n!==!1&&(e[r]=t&&Se.isArray(n)?n.join(", "):n)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
1393
- `)}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 n=new this(t);return e.forEach(r=>n.set(r)),n}static accessor(t){const e=(this[Ep]=this[Ep]={accessors:{}}).accessors,n=this.prototype;function r(f){const d=Ma(f);e[d]||(Ix(n,f),e[d]=!0)}return Se.isArray(t)?t.forEach(r):r(t),this}};qr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Se.reduceDescriptors(qr.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}}),Se.freezeMethods(qr);function vu(t,e){const n=this||$a,r=e||n,f=qr.from(r.headers);let d=r.data;return Se.forEach(t,function(p){d=p.call(n,d,f.normalize(),e?e.status:void 0)}),f.normalize(),d}function Ip(t){return!!(t&&t.__CANCEL__)}function qs(t,e,n){Lt.call(this,t??"canceled",Lt.ERR_CANCELED,e,n),this.name="CanceledError"}Se.inherits(qs,Lt,{__CANCEL__:!0});function Lp(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new Lt("Request failed with status code "+n.status,[Lt.ERR_BAD_REQUEST,Lt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Lx(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Rx(t,e){t=t||10;const n=new Array(t),r=new Array(t);let f=0,d=0,p;return e=e!==void 0?e:1e3,function(b){const h=Date.now(),g=r[d];p||(p=h),n[f]=b,r[f]=h;let s=d,a=0;for(;s!==f;)a+=n[s++],s=s%t;if(f=(f+1)%t,f===d&&(d=(d+1)%t),h-p<e)return;const c=g&&h-g;return c?Math.round(a*1e3/c):void 0}}function Ox(t,e){let n=0,r=1e3/e,f,d;const p=(b,h=Date.now())=>{n=h,f=null,d&&(clearTimeout(d),d=null),t.apply(null,b)};return[(...b)=>{const h=Date.now(),g=h-n;g>=r?p(b,h):(f=b,d||(d=setTimeout(()=>{d=null,p(f)},r-g)))},()=>f&&p(f)]}const Sl=(t,e,n=3)=>{let r=0;const f=Rx(50,250);return Ox(d=>{const p=d.loaded,b=d.lengthComputable?d.total:void 0,h=p-r,g=f(h),s=p<=b;r=p;const a={loaded:p,total:b,progress:b?p/b:void 0,bytes:h,rate:g||void 0,estimated:g&&b&&s?(b-p)/g:void 0,event:d,lengthComputable:b!=null,[e?"download":"upload"]:!0};t(a)},n)},Rp=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},Op=t=>(...e)=>Se.asap(()=>t(...e)),Dx=Sr.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,Sr.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(Sr.origin),Sr.navigator&&/(msie|trident)/i.test(Sr.navigator.userAgent)):()=>!0,Nx=Sr.hasStandardBrowserEnv?{write(t,e,n,r,f,d){const p=[t+"="+encodeURIComponent(e)];Se.isNumber(n)&&p.push("expires="+new Date(n).toGMTString()),Se.isString(r)&&p.push("path="+r),Se.isString(f)&&p.push("domain="+f),d===!0&&p.push("secure"),document.cookie=p.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Fx(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Px(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Dp(t,e,n){let r=!Fx(e);return t&&(r||n==!1)?Px(t,e):e}const Np=t=>t instanceof qr?{...t}:t;function us(t,e){e=e||{};const n={};function r(g,s,a,c){return Se.isPlainObject(g)&&Se.isPlainObject(s)?Se.merge.call({caseless:c},g,s):Se.isPlainObject(s)?Se.merge({},s):Se.isArray(s)?s.slice():s}function f(g,s,a,c){if(Se.isUndefined(s)){if(!Se.isUndefined(g))return r(void 0,g,a,c)}else return r(g,s,a,c)}function d(g,s){if(!Se.isUndefined(s))return r(void 0,s)}function p(g,s){if(Se.isUndefined(s)){if(!Se.isUndefined(g))return r(void 0,g)}else return r(void 0,s)}function b(g,s,a){if(a in e)return r(g,s);if(a in t)return r(void 0,g)}const h={url:d,method:d,data:d,baseURL:p,transformRequest:p,transformResponse:p,paramsSerializer:p,timeout:p,timeoutMessage:p,withCredentials:p,withXSRFToken:p,adapter:p,responseType:p,xsrfCookieName:p,xsrfHeaderName:p,onUploadProgress:p,onDownloadProgress:p,decompress:p,maxContentLength:p,maxBodyLength:p,beforeRedirect:p,transport:p,httpAgent:p,httpsAgent:p,cancelToken:p,socketPath:p,responseEncoding:p,validateStatus:b,headers:(g,s,a)=>f(Np(g),Np(s),a,!0)};return Se.forEach(Object.keys(Object.assign({},t,e)),function(g){const s=h[g]||f,a=s(t[g],e[g],g);Se.isUndefined(a)&&s!==b||(n[g]=a)}),n}const Fp=t=>{const e=us({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:f,xsrfCookieName:d,headers:p,auth:b}=e;e.headers=p=qr.from(p),e.url=Ap(Dp(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),b&&p.set("Authorization","Basic "+btoa((b.username||"")+":"+(b.password?unescape(encodeURIComponent(b.password)):"")));let h;if(Se.isFormData(n)){if(Sr.hasStandardBrowserEnv||Sr.hasStandardBrowserWebWorkerEnv)p.setContentType(void 0);else if((h=p.getContentType())!==!1){const[g,...s]=h?h.split(";").map(a=>a.trim()).filter(Boolean):[];p.setContentType([g||"multipart/form-data",...s].join("; "))}}if(Sr.hasStandardBrowserEnv&&(r&&Se.isFunction(r)&&(r=r(e)),r||r!==!1&&Dx(e.url))){const g=f&&d&&Nx.read(d);g&&p.set(f,g)}return e},Bx=typeof XMLHttpRequest<"u",Wx=Bx&&function(t){return new Promise(function(e,n){const r=Fp(t);let f=r.data;const d=qr.from(r.headers).normalize();let{responseType:p,onUploadProgress:b,onDownloadProgress:h}=r,g,s,a,c,l;function o(){c&&c(),l&&l(),r.cancelToken&&r.cancelToken.unsubscribe(g),r.signal&&r.signal.removeEventListener("abort",g)}let u=new XMLHttpRequest;u.open(r.method.toUpperCase(),r.url,!0),u.timeout=r.timeout;function m(){if(!u)return;const x=qr.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),E={data:!p||p==="text"||p==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:x,config:t,request:u};Lp(function(T){e(T),o()},function(T){n(T),o()},E),u=null}"onloadend"in u?u.onloadend=m:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(m)},u.onabort=function(){u&&(n(new Lt("Request aborted",Lt.ECONNABORTED,t,u)),u=null)},u.onerror=function(){n(new Lt("Network Error",Lt.ERR_NETWORK,t,u)),u=null},u.ontimeout=function(){let x=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const E=r.transitional||$p;r.timeoutErrorMessage&&(x=r.timeoutErrorMessage),n(new Lt(x,E.clarifyTimeoutError?Lt.ETIMEDOUT:Lt.ECONNABORTED,t,u)),u=null},f===void 0&&d.setContentType(null),"setRequestHeader"in u&&Se.forEach(d.toJSON(),function(x,E){u.setRequestHeader(E,x)}),Se.isUndefined(r.withCredentials)||(u.withCredentials=!!r.withCredentials),p&&p!=="json"&&(u.responseType=r.responseType),h&&([a,l]=Sl(h,!0),u.addEventListener("progress",a)),b&&u.upload&&([s,c]=Sl(b),u.upload.addEventListener("progress",s),u.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(g=x=>{u&&(n(!x||x.type?new qs(null,t,u):x),u.abort(),u=null)},r.cancelToken&&r.cancelToken.subscribe(g),r.signal&&(r.signal.aborted?g():r.signal.addEventListener("abort",g)));const w=Lx(r.url);if(w&&Sr.protocols.indexOf(w)===-1){n(new Lt("Unsupported protocol "+w+":",Lt.ERR_BAD_REQUEST,t));return}u.send(f||null)})},jx=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,f;const d=function(g){if(!f){f=!0,b();const s=g instanceof Error?g:this.reason;r.abort(s instanceof Lt?s:new qs(s instanceof Error?s.message:s))}};let p=e&&setTimeout(()=>{p=null,d(new Lt(`timeout ${e} of ms exceeded`,Lt.ETIMEDOUT))},e);const b=()=>{t&&(p&&clearTimeout(p),p=null,t.forEach(g=>{g.unsubscribe?g.unsubscribe(d):g.removeEventListener("abort",d)}),t=null)};t.forEach(g=>g.addEventListener("abort",d));const{signal:h}=r;return h.unsubscribe=()=>Se.asap(b),h}},zx=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,f;for(;r<n;)f=r+e,yield t.slice(r,f),r=f},Hx=async function*(t,e){for await(const n of Ux(t))yield*zx(n,e)},Ux=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},Pp=(t,e,n,r)=>{const f=Hx(t,e);let d=0,p,b=h=>{p||(p=!0,r&&r(h))};return new ReadableStream({async pull(h){try{const{done:g,value:s}=await f.next();if(g){b(),h.close();return}let a=s.byteLength;if(n){let c=d+=a;n(c)}h.enqueue(new Uint8Array(s))}catch(g){throw b(g),g}},cancel(h){return b(h),f.return()}},{highWaterMark:2})},Al=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Bp=Al&&typeof ReadableStream=="function",Vx=Al&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),Wp=(t,...e)=>{try{return!!t(...e)}catch{return!1}},qx=Bp&&Wp(()=>{let t=!1;const e=new Request(Sr.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),jp=64*1024,yu=Bp&&Wp(()=>Se.isReadableStream(new Response("").body)),Tl={stream:yu&&(t=>t.body)};Al&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Tl[e]&&(Tl[e]=Se.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new Lt(`Response type '${e}' is not supported`,Lt.ERR_NOT_SUPPORT,r)})})})(new Response);const Kx=async t=>{if(t==null)return 0;if(Se.isBlob(t))return t.size;if(Se.isSpecCompliantForm(t))return(await new Request(Sr.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(Se.isArrayBufferView(t)||Se.isArrayBuffer(t))return t.byteLength;if(Se.isURLSearchParams(t)&&(t=t+""),Se.isString(t))return(await Vx(t)).byteLength},Gx=async(t,e)=>Se.toFiniteNumber(t.getContentLength())??Kx(e),Yx=Al&&(async t=>{let{url:e,method:n,data:r,signal:f,cancelToken:d,timeout:p,onDownloadProgress:b,onUploadProgress:h,responseType:g,headers:s,withCredentials:a="same-origin",fetchOptions:c}=Fp(t);g=g?(g+"").toLowerCase():"text";let l=jx([f,d&&d.toAbortSignal()],p),o;const u=l&&l.unsubscribe&&(()=>{l.unsubscribe()});let m;try{if(h&&qx&&n!=="get"&&n!=="head"&&(m=await Gx(s,r))!==0){let k=new Request(e,{method:"POST",body:r,duplex:"half"}),C;if(Se.isFormData(r)&&(C=k.headers.get("content-type"))&&s.setContentType(C),k.body){const[L,R]=Rp(m,Sl(Op(h)));r=Pp(k.body,jp,L,R)}}Se.isString(a)||(a=a?"include":"omit");const w="credentials"in Request.prototype;o=new Request(e,{...c,signal:l,method:n.toUpperCase(),headers:s.normalize().toJSON(),body:r,duplex:"half",credentials:w?a:void 0});let x=await fetch(o);const E=yu&&(g==="stream"||g==="response");if(yu&&(b||E&&u)){const k={};["status","statusText","headers"].forEach(F=>{k[F]=x[F]});const C=Se.toFiniteNumber(x.headers.get("content-length")),[L,R]=b&&Rp(C,Sl(Op(b),!0))||[];x=new Response(Pp(x.body,jp,L,()=>{R&&R(),u&&u()}),k)}g=g||"text";let T=await Tl[Se.findKey(Tl,g)||"text"](x,t);return!E&&u&&u(),await new Promise((k,C)=>{Lp(k,C,{data:T,headers:qr.from(x.headers),status:x.status,statusText:x.statusText,config:t,request:o})})}catch(w){throw u&&u(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new Lt("Network Error",Lt.ERR_NETWORK,t,o),{cause:w.cause||w}):Lt.from(w,w&&w.code,t,o)}}),bu={http:ux,xhr:Wx,fetch:Yx};Se.forEach(bu,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const zp=t=>`- ${t}`,Xx=t=>Se.isFunction(t)||t===null||t===!1,Hp={getAdapter:t=>{t=Se.isArray(t)?t:[t];const{length:e}=t;let n,r;const f={};for(let d=0;d<e;d++){n=t[d];let p;if(r=n,!Xx(n)&&(r=bu[(p=String(n)).toLowerCase()],r===void 0))throw new Lt(`Unknown adapter '${p}'`);if(r)break;f[p||"#"+d]=r}if(!r){const d=Object.entries(f).map(([b,h])=>`adapter ${b} `+(h===!1?"is not supported by the environment":"is not available in the build"));let p=e?d.length>1?`since :
1391
+ `);var L=w.session.doc.positionToIndex(w.selection.anchor);this.searchRange&&(L-=w.session.doc.positionToIndex(this.searchRange.start));for(var R=x.lastIndex=0,F;(F=x.exec(C))&&(T++,R=F.index,R<=L&&k++,!(T>c||!F[0]&&(x.lastIndex=R+=p.skipEmptyMatch(C,R,E),R>=C.length))););}this.searchCounter.textContent=a("search-box.search-counter","$0 of $1",[k,T>c?c+"+":T])},m.prototype.findNext=function(){this.find(!0,!1)},m.prototype.findPrev=function(){this.find(!0,!0)},m.prototype.findAll=function(){var w=this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),x=!w&&this.searchInput.value;d.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(w,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&&(w=p.escapeRegExp(w)),w&&(this.searchInput.value=w),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},m.prototype.isFocused=function(){var w=document.activeElement;return w==this.searchInput||w==this.replaceInput},m}(),o=new g;o.bindKeys({"Ctrl-f|Command-f":function(m){var w=m.isReplace=!m.isReplace;m.replaceBox.style.display=w?"":"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:function(m){(m.activeInput==m.replaceInput?m.searchInput:m.replaceInput).focus()}}),o.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 u=new g([{bindKey:"Esc",name:"closeSearchBar",exec:function(m){m.searchBox.hide()}}]);l.prototype.$searchBarKb=o,l.prototype.$closeSearchBarKb=u,r.SearchBox=l,r.Search=function(m,w){var x=m.searchBox||new l(m);x.show(m.session.getTextRange(),w)}}),function(){ace.require(["ace/ext/searchbox"],function(n){t&&(t.exports=n)})}()}(cp)),cp.exports}C1();var k1=Object.defineProperty,_1=(t,e,n)=>e in t?k1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,vl=(t,e,n)=>_1(t,typeof e!="symbol"?e+"":e,n);function hp(t,e){return function(){return t.apply(e,arguments)}}const{toString:S1}=Object.prototype,{getPrototypeOf:hu}=Object,{iterator:yl,toStringTag:dp}=Symbol,bl=(t=>e=>{const n=S1.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Oi=t=>(t=t.toLowerCase(),e=>bl(e)===t),wl=t=>e=>typeof e===t,{isArray:Vs}=Array,Aa=wl("undefined");function A1(t){return t!==null&&!Aa(t)&&t.constructor!==null&&!Aa(t.constructor)&&Vr(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const fp=Oi("ArrayBuffer");function T1(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&fp(t.buffer),e}const $1=wl("string"),Vr=wl("function"),pp=wl("number"),xl=t=>t!==null&&typeof t=="object",M1=t=>t===!0||t===!1,Cl=t=>{if(bl(t)!=="object")return!1;const e=hu(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(dp in t)&&!(yl in t)},E1=Oi("Date"),I1=Oi("File"),L1=Oi("Blob"),R1=Oi("FileList"),O1=t=>xl(t)&&Vr(t.pipe),D1=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Vr(t.append)&&((e=bl(t))==="formdata"||e==="object"&&Vr(t.toString)&&t.toString()==="[object FormData]"))},N1=Oi("URLSearchParams"),[F1,P1,B1,W1]=["ReadableStream","Request","Response","Headers"].map(Oi),j1=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ta(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,f;if(typeof t!="object"&&(t=[t]),Vs(t))for(r=0,f=t.length;r<f;r++)e.call(null,t[r],r,t);else{const d=n?Object.getOwnPropertyNames(t):Object.keys(t),p=d.length;let b;for(r=0;r<p;r++)b=d[r],e.call(null,t[b],b,t)}}function gp(t,e){e=e.toLowerCase();const n=Object.keys(t);let r=n.length,f;for(;r-- >0;)if(f=n[r],e===f.toLowerCase())return f;return null}const cs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,mp=t=>!Aa(t)&&t!==cs;function du(){const{caseless:t}=mp(this)&&this||{},e={},n=(r,f)=>{const d=t&&gp(e,f)||f;Cl(e[d])&&Cl(r)?e[d]=du(e[d],r):Cl(r)?e[d]=du({},r):Vs(r)?e[d]=r.slice():e[d]=r};for(let r=0,f=arguments.length;r<f;r++)arguments[r]&&Ta(arguments[r],n);return e}const z1=(t,e,n,{allOwnKeys:r}={})=>(Ta(e,(f,d)=>{n&&Vr(f)?t[d]=hp(f,n):t[d]=f},{allOwnKeys:r}),t),H1=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),U1=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},V1=(t,e,n,r)=>{let f,d,p;const b={};if(e=e||{},t==null)return e;do{for(f=Object.getOwnPropertyNames(t),d=f.length;d-- >0;)p=f[d],(!r||r(p,t,e))&&!b[p]&&(e[p]=t[p],b[p]=!0);t=n!==!1&&hu(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},q1=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},K1=t=>{if(!t)return null;if(Vs(t))return t;let e=t.length;if(!pp(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},G1=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&hu(Uint8Array)),Y1=(t,e)=>{const n=(t&&t[yl]).call(t);let r;for(;(r=n.next())&&!r.done;){const f=r.value;e.call(t,f[0],f[1])}},X1=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},Q1=Oi("HTMLFormElement"),Z1=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,n,r){return n.toUpperCase()+r}),vp=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),J1=Oi("RegExp"),yp=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};Ta(n,(f,d)=>{let p;(p=e(f,d,t))!==!1&&(r[d]=p||f)}),Object.defineProperties(t,r)},ex=t=>{yp(t,(e,n)=>{if(Vr(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(Vr(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},tx=(t,e)=>{const n={},r=f=>{f.forEach(d=>{n[d]=!0})};return Vs(t)?r(t):r(String(t).split(e)),n},nx=()=>{},rx=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function ix(t){return!!(t&&Vr(t.append)&&t[dp]==="FormData"&&t[yl])}const ox=t=>{const e=new Array(10),n=(r,f)=>{if(xl(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[f]=r;const d=Vs(r)?[]:{};return Ta(r,(p,b)=>{const h=n(p,f+1);!Aa(h)&&(d[b]=h)}),e[f]=void 0,d}}return r};return n(t,0)},sx=Oi("AsyncFunction"),ax=t=>t&&(xl(t)||Vr(t))&&Vr(t.then)&&Vr(t.catch),bp=((t,e)=>t?setImmediate:e?((n,r)=>(cs.addEventListener("message",({source:f,data:d})=>{f===cs&&d===n&&r.length&&r.shift()()},!1),f=>{r.push(f),cs.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Vr(cs.postMessage)),lx=typeof queueMicrotask<"u"?queueMicrotask.bind(cs):typeof process<"u"&&process.nextTick||bp,cx=t=>t!=null&&Vr(t[yl]),Se={isArray:Vs,isArrayBuffer:fp,isBuffer:A1,isFormData:D1,isArrayBufferView:T1,isString:$1,isNumber:pp,isBoolean:M1,isObject:xl,isPlainObject:Cl,isReadableStream:F1,isRequest:P1,isResponse:B1,isHeaders:W1,isUndefined:Aa,isDate:E1,isFile:I1,isBlob:L1,isRegExp:J1,isFunction:Vr,isStream:O1,isURLSearchParams:N1,isTypedArray:G1,isFileList:R1,forEach:Ta,merge:du,extend:z1,trim:j1,stripBOM:H1,inherits:U1,toFlatObject:V1,kindOf:bl,kindOfTest:Oi,endsWith:q1,toArray:K1,forEachEntry:Y1,matchAll:X1,isHTMLForm:Q1,hasOwnProperty:vp,hasOwnProp:vp,reduceDescriptors:yp,freezeMethods:ex,toObjectSet:tx,toCamelCase:Z1,noop:nx,toFiniteNumber:rx,findKey:gp,global:cs,isContextDefined:mp,isSpecCompliantForm:ix,toJSONObject:ox,isAsyncFn:sx,isThenable:ax,setImmediate:bp,asap:lx,isIterable:cx};function Lt(t,e,n,r,f){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),f&&(this.response=f,this.status=f.status?f.status:null)}Se.inherits(Lt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Se.toJSONObject(this.config),code:this.code,status:this.status}}});const wp=Lt.prototype,xp={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{xp[t]={value:t}}),Object.defineProperties(Lt,xp),Object.defineProperty(wp,"isAxiosError",{value:!0}),Lt.from=(t,e,n,r,f,d)=>{const p=Object.create(wp);return Se.toFlatObject(t,p,function(b){return b!==Error.prototype},b=>b!=="isAxiosError"),Lt.call(p,t.message,e,n,r,f),p.cause=t,p.name=t.name,d&&Object.assign(p,d),p};const ux=null;function fu(t){return Se.isPlainObject(t)||Se.isArray(t)}function Cp(t){return Se.endsWith(t,"[]")?t.slice(0,-2):t}function kp(t,e,n){return t?t.concat(e).map(function(r,f){return r=Cp(r),!n&&f?"["+r+"]":r}).join(n?".":""):e}function hx(t){return Se.isArray(t)&&!t.some(fu)}const dx=Se.toFlatObject(Se,{},null,function(t){return/^is[A-Z]/.test(t)});function kl(t,e,n){if(!Se.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=Se.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(l,o){return!Se.isUndefined(o[l])});const r=n.metaTokens,f=n.visitor||g,d=n.dots,p=n.indexes,b=(n.Blob||typeof Blob<"u"&&Blob)&&Se.isSpecCompliantForm(e);if(!Se.isFunction(f))throw new TypeError("visitor must be a function");function h(l){if(l===null)return"";if(Se.isDate(l))return l.toISOString();if(!b&&Se.isBlob(l))throw new Lt("Blob is not supported. Use a Buffer instead.");return Se.isArrayBuffer(l)||Se.isTypedArray(l)?b&&typeof Blob=="function"?new Blob([l]):Buffer.from(l):l}function g(l,o,u){let m=l;if(l&&!u&&typeof l=="object"){if(Se.endsWith(o,"{}"))o=r?o:o.slice(0,-2),l=JSON.stringify(l);else if(Se.isArray(l)&&hx(l)||(Se.isFileList(l)||Se.endsWith(o,"[]"))&&(m=Se.toArray(l)))return o=Cp(o),m.forEach(function(w,x){!(Se.isUndefined(w)||w===null)&&e.append(p===!0?kp([o],x,d):p===null?o:o+"[]",h(w))}),!1}return fu(l)?!0:(e.append(kp(u,o,d),h(l)),!1)}const s=[],a=Object.assign(dx,{defaultVisitor:g,convertValue:h,isVisitable:fu});function c(l,o){if(!Se.isUndefined(l)){if(s.indexOf(l)!==-1)throw Error("Circular reference detected in "+o.join("."));s.push(l),Se.forEach(l,function(u,m){(!(Se.isUndefined(u)||u===null)&&f.call(e,u,Se.isString(m)?m.trim():m,o,a))===!0&&c(u,o?o.concat(m):[m])}),s.pop()}}if(!Se.isObject(t))throw new TypeError("data must be an object");return c(t),e}function _p(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function pu(t,e){this._pairs=[],t&&kl(t,this,e)}const Sp=pu.prototype;Sp.append=function(t,e){this._pairs.push([t,e])},Sp.toString=function(t){const e=t?function(n){return t.call(this,n,_p)}:_p;return this._pairs.map(function(n){return e(n[0])+"="+e(n[1])},"").join("&")};function fx(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ap(t,e,n){if(!e)return t;const r=n&&n.encode||fx;Se.isFunction(n)&&(n={serialize:n});const f=n&&n.serialize;let d;if(f?d=f(e,n):d=Se.isURLSearchParams(e)?e.toString():new pu(e,n).toString(r),d){const p=t.indexOf("#");p!==-1&&(t=t.slice(0,p)),t+=(t.indexOf("?")===-1?"?":"&")+d}return t}class Tp{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Se.forEach(this.handlers,function(n){n!==null&&e(n)})}}const $p={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},px=typeof URLSearchParams<"u"?URLSearchParams:pu,gx=typeof FormData<"u"?FormData:null,mx=typeof Blob<"u"?Blob:null,vx={isBrowser:!0,classes:{URLSearchParams:px,FormData:gx,Blob:mx},protocols:["http","https","file","blob","url","data"]},gu=typeof window<"u"&&typeof document<"u",mu=typeof navigator=="object"&&navigator||void 0,yx=gu&&(!mu||["ReactNative","NativeScript","NS"].indexOf(mu.product)<0),bx=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",wx=gu&&window.location.href||"http://localhost",xx=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:gu,hasStandardBrowserEnv:yx,hasStandardBrowserWebWorkerEnv:bx,navigator:mu,origin:wx},Symbol.toStringTag,{value:"Module"})),Sr={...xx,...vx};function Cx(t,e){return kl(t,new Sr.classes.URLSearchParams,Object.assign({visitor:function(n,r,f,d){return Sr.isNode&&Se.isBuffer(n)?(this.append(r,n.toString("base64")),!1):d.defaultVisitor.apply(this,arguments)}},e))}function kx(t){return Se.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function _x(t){const e={},n=Object.keys(t);let r;const f=n.length;let d;for(r=0;r<f;r++)d=n[r],e[d]=t[d];return e}function Mp(t){function e(n,r,f,d){let p=n[d++];if(p==="__proto__")return!0;const b=Number.isFinite(+p),h=d>=n.length;return p=!p&&Se.isArray(f)?f.length:p,h?(Se.hasOwnProp(f,p)?f[p]=[f[p],r]:f[p]=r,!b):((!f[p]||!Se.isObject(f[p]))&&(f[p]=[]),e(n,r,f[p],d)&&Se.isArray(f[p])&&(f[p]=_x(f[p])),!b)}if(Se.isFormData(t)&&Se.isFunction(t.entries)){const n={};return Se.forEachEntry(t,(r,f)=>{e(kx(r),f,n,0)}),n}return null}function Sx(t,e,n){if(Se.isString(t))try{return(e||JSON.parse)(t),Se.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const $a={transitional:$p,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,f=Se.isObject(t);if(f&&Se.isHTMLForm(t)&&(t=new FormData(t)),Se.isFormData(t))return r?JSON.stringify(Mp(t)):t;if(Se.isArrayBuffer(t)||Se.isBuffer(t)||Se.isStream(t)||Se.isFile(t)||Se.isBlob(t)||Se.isReadableStream(t))return t;if(Se.isArrayBufferView(t))return t.buffer;if(Se.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let d;if(f){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Cx(t,this.formSerializer).toString();if((d=Se.isFileList(t))||n.indexOf("multipart/form-data")>-1){const p=this.env&&this.env.FormData;return kl(d?{"files[]":t}:t,p&&new p,this.formSerializer)}}return f||r?(e.setContentType("application/json",!1),Sx(t)):t}],transformResponse:[function(t){const e=this.transitional||$a.transitional,n=e&&e.forcedJSONParsing,r=this.responseType==="json";if(Se.isResponse(t)||Se.isReadableStream(t))return t;if(t&&Se.isString(t)&&(n&&!this.responseType||r)){const f=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(d){if(f)throw d.name==="SyntaxError"?Lt.from(d,Lt.ERR_BAD_RESPONSE,this,null,this.response):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Sr.classes.FormData,Blob:Sr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Se.forEach(["delete","get","head","post","put","patch"],t=>{$a.headers[t]={}});const Ax=Se.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"]),Tx=t=>{const e={};let n,r,f;return t&&t.split(`
1392
+ `).forEach(function(d){f=d.indexOf(":"),n=d.substring(0,f).trim().toLowerCase(),r=d.substring(f+1).trim(),!(!n||e[n]&&Ax[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},Ep=Symbol("internals");function Ma(t){return t&&String(t).trim().toLowerCase()}function _l(t){return t===!1||t==null?t:Se.isArray(t)?t.map(_l):String(t)}function $x(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const Mx=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function vu(t,e,n,r,f){if(Se.isFunction(r))return r.call(this,e,n);if(f&&(e=n),!!Se.isString(e)){if(Se.isString(r))return e.indexOf(r)!==-1;if(Se.isRegExp(r))return r.test(e)}}function Ex(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function Ix(t,e){const n=Se.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(f,d,p){return this[r].call(this,e,f,d,p)},configurable:!0})})}let qr=class{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function f(p,b,h){const g=Ma(b);if(!g)throw new Error("header name must be a non-empty string");const s=Se.findKey(r,g);(!s||r[s]===void 0||h===!0||h===void 0&&r[s]!==!1)&&(r[s||b]=_l(p))}const d=(p,b)=>Se.forEach(p,(h,g)=>f(h,g,b));if(Se.isPlainObject(t)||t instanceof this.constructor)d(t,e);else if(Se.isString(t)&&(t=t.trim())&&!Mx(t))d(Tx(t),e);else if(Se.isObject(t)&&Se.isIterable(t)){let p={},b,h;for(const g of t){if(!Se.isArray(g))throw TypeError("Object iterator must return a key-value pair");p[h=g[0]]=(b=p[h])?Se.isArray(b)?[...b,g[1]]:[b,g[1]]:g[1]}d(p,e)}else t!=null&&f(e,t,n);return this}get(t,e){if(t=Ma(t),t){const n=Se.findKey(this,t);if(n){const r=this[n];if(!e)return r;if(e===!0)return $x(r);if(Se.isFunction(e))return e.call(this,r,n);if(Se.isRegExp(e))return e.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Ma(t),t){const n=Se.findKey(this,t);return!!(n&&this[n]!==void 0&&(!e||vu(this,this[n],n,e)))}return!1}delete(t,e){const n=this;let r=!1;function f(d){if(d=Ma(d),d){const p=Se.findKey(n,d);p&&(!e||vu(n,n[p],p,e))&&(delete n[p],r=!0)}}return Se.isArray(t)?t.forEach(f):f(t),r}clear(t){const e=Object.keys(this);let n=e.length,r=!1;for(;n--;){const f=e[n];(!t||vu(this,this[f],f,t,!0))&&(delete this[f],r=!0)}return r}normalize(t){const e=this,n={};return Se.forEach(this,(r,f)=>{const d=Se.findKey(n,f);if(d){e[d]=_l(r),delete e[f];return}const p=t?Ex(f):String(f).trim();p!==f&&delete e[f],e[p]=_l(r),n[p]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return Se.forEach(this,(n,r)=>{n!=null&&n!==!1&&(e[r]=t&&Se.isArray(n)?n.join(", "):n)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
1393
+ `)}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 n=new this(t);return e.forEach(r=>n.set(r)),n}static accessor(t){const e=(this[Ep]=this[Ep]={accessors:{}}).accessors,n=this.prototype;function r(f){const d=Ma(f);e[d]||(Ix(n,f),e[d]=!0)}return Se.isArray(t)?t.forEach(r):r(t),this}};qr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Se.reduceDescriptors(qr.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}}),Se.freezeMethods(qr);function yu(t,e){const n=this||$a,r=e||n,f=qr.from(r.headers);let d=r.data;return Se.forEach(t,function(p){d=p.call(n,d,f.normalize(),e?e.status:void 0)}),f.normalize(),d}function Ip(t){return!!(t&&t.__CANCEL__)}function qs(t,e,n){Lt.call(this,t??"canceled",Lt.ERR_CANCELED,e,n),this.name="CanceledError"}Se.inherits(qs,Lt,{__CANCEL__:!0});function Lp(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new Lt("Request failed with status code "+n.status,[Lt.ERR_BAD_REQUEST,Lt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Lx(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Rx(t,e){t=t||10;const n=new Array(t),r=new Array(t);let f=0,d=0,p;return e=e!==void 0?e:1e3,function(b){const h=Date.now(),g=r[d];p||(p=h),n[f]=b,r[f]=h;let s=d,a=0;for(;s!==f;)a+=n[s++],s=s%t;if(f=(f+1)%t,f===d&&(d=(d+1)%t),h-p<e)return;const c=g&&h-g;return c?Math.round(a*1e3/c):void 0}}function Ox(t,e){let n=0,r=1e3/e,f,d;const p=(b,h=Date.now())=>{n=h,f=null,d&&(clearTimeout(d),d=null),t.apply(null,b)};return[(...b)=>{const h=Date.now(),g=h-n;g>=r?p(b,h):(f=b,d||(d=setTimeout(()=>{d=null,p(f)},r-g)))},()=>f&&p(f)]}const Sl=(t,e,n=3)=>{let r=0;const f=Rx(50,250);return Ox(d=>{const p=d.loaded,b=d.lengthComputable?d.total:void 0,h=p-r,g=f(h),s=p<=b;r=p;const a={loaded:p,total:b,progress:b?p/b:void 0,bytes:h,rate:g||void 0,estimated:g&&b&&s?(b-p)/g:void 0,event:d,lengthComputable:b!=null,[e?"download":"upload"]:!0};t(a)},n)},Rp=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},Op=t=>(...e)=>Se.asap(()=>t(...e)),Dx=Sr.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,Sr.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(Sr.origin),Sr.navigator&&/(msie|trident)/i.test(Sr.navigator.userAgent)):()=>!0,Nx=Sr.hasStandardBrowserEnv?{write(t,e,n,r,f,d){const p=[t+"="+encodeURIComponent(e)];Se.isNumber(n)&&p.push("expires="+new Date(n).toGMTString()),Se.isString(r)&&p.push("path="+r),Se.isString(f)&&p.push("domain="+f),d===!0&&p.push("secure"),document.cookie=p.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Fx(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Px(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Dp(t,e,n){let r=!Fx(e);return t&&(r||n==!1)?Px(t,e):e}const Np=t=>t instanceof qr?{...t}:t;function us(t,e){e=e||{};const n={};function r(g,s,a,c){return Se.isPlainObject(g)&&Se.isPlainObject(s)?Se.merge.call({caseless:c},g,s):Se.isPlainObject(s)?Se.merge({},s):Se.isArray(s)?s.slice():s}function f(g,s,a,c){if(Se.isUndefined(s)){if(!Se.isUndefined(g))return r(void 0,g,a,c)}else return r(g,s,a,c)}function d(g,s){if(!Se.isUndefined(s))return r(void 0,s)}function p(g,s){if(Se.isUndefined(s)){if(!Se.isUndefined(g))return r(void 0,g)}else return r(void 0,s)}function b(g,s,a){if(a in e)return r(g,s);if(a in t)return r(void 0,g)}const h={url:d,method:d,data:d,baseURL:p,transformRequest:p,transformResponse:p,paramsSerializer:p,timeout:p,timeoutMessage:p,withCredentials:p,withXSRFToken:p,adapter:p,responseType:p,xsrfCookieName:p,xsrfHeaderName:p,onUploadProgress:p,onDownloadProgress:p,decompress:p,maxContentLength:p,maxBodyLength:p,beforeRedirect:p,transport:p,httpAgent:p,httpsAgent:p,cancelToken:p,socketPath:p,responseEncoding:p,validateStatus:b,headers:(g,s,a)=>f(Np(g),Np(s),a,!0)};return Se.forEach(Object.keys(Object.assign({},t,e)),function(g){const s=h[g]||f,a=s(t[g],e[g],g);Se.isUndefined(a)&&s!==b||(n[g]=a)}),n}const Fp=t=>{const e=us({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:f,xsrfCookieName:d,headers:p,auth:b}=e;e.headers=p=qr.from(p),e.url=Ap(Dp(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),b&&p.set("Authorization","Basic "+btoa((b.username||"")+":"+(b.password?unescape(encodeURIComponent(b.password)):"")));let h;if(Se.isFormData(n)){if(Sr.hasStandardBrowserEnv||Sr.hasStandardBrowserWebWorkerEnv)p.setContentType(void 0);else if((h=p.getContentType())!==!1){const[g,...s]=h?h.split(";").map(a=>a.trim()).filter(Boolean):[];p.setContentType([g||"multipart/form-data",...s].join("; "))}}if(Sr.hasStandardBrowserEnv&&(r&&Se.isFunction(r)&&(r=r(e)),r||r!==!1&&Dx(e.url))){const g=f&&d&&Nx.read(d);g&&p.set(f,g)}return e},Bx=typeof XMLHttpRequest<"u",Wx=Bx&&function(t){return new Promise(function(e,n){const r=Fp(t);let f=r.data;const d=qr.from(r.headers).normalize();let{responseType:p,onUploadProgress:b,onDownloadProgress:h}=r,g,s,a,c,l;function o(){c&&c(),l&&l(),r.cancelToken&&r.cancelToken.unsubscribe(g),r.signal&&r.signal.removeEventListener("abort",g)}let u=new XMLHttpRequest;u.open(r.method.toUpperCase(),r.url,!0),u.timeout=r.timeout;function m(){if(!u)return;const x=qr.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),E={data:!p||p==="text"||p==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:x,config:t,request:u};Lp(function(T){e(T),o()},function(T){n(T),o()},E),u=null}"onloadend"in u?u.onloadend=m:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(m)},u.onabort=function(){u&&(n(new Lt("Request aborted",Lt.ECONNABORTED,t,u)),u=null)},u.onerror=function(){n(new Lt("Network Error",Lt.ERR_NETWORK,t,u)),u=null},u.ontimeout=function(){let x=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const E=r.transitional||$p;r.timeoutErrorMessage&&(x=r.timeoutErrorMessage),n(new Lt(x,E.clarifyTimeoutError?Lt.ETIMEDOUT:Lt.ECONNABORTED,t,u)),u=null},f===void 0&&d.setContentType(null),"setRequestHeader"in u&&Se.forEach(d.toJSON(),function(x,E){u.setRequestHeader(E,x)}),Se.isUndefined(r.withCredentials)||(u.withCredentials=!!r.withCredentials),p&&p!=="json"&&(u.responseType=r.responseType),h&&([a,l]=Sl(h,!0),u.addEventListener("progress",a)),b&&u.upload&&([s,c]=Sl(b),u.upload.addEventListener("progress",s),u.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(g=x=>{u&&(n(!x||x.type?new qs(null,t,u):x),u.abort(),u=null)},r.cancelToken&&r.cancelToken.subscribe(g),r.signal&&(r.signal.aborted?g():r.signal.addEventListener("abort",g)));const w=Lx(r.url);if(w&&Sr.protocols.indexOf(w)===-1){n(new Lt("Unsupported protocol "+w+":",Lt.ERR_BAD_REQUEST,t));return}u.send(f||null)})},jx=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,f;const d=function(g){if(!f){f=!0,b();const s=g instanceof Error?g:this.reason;r.abort(s instanceof Lt?s:new qs(s instanceof Error?s.message:s))}};let p=e&&setTimeout(()=>{p=null,d(new Lt(`timeout ${e} of ms exceeded`,Lt.ETIMEDOUT))},e);const b=()=>{t&&(p&&clearTimeout(p),p=null,t.forEach(g=>{g.unsubscribe?g.unsubscribe(d):g.removeEventListener("abort",d)}),t=null)};t.forEach(g=>g.addEventListener("abort",d));const{signal:h}=r;return h.unsubscribe=()=>Se.asap(b),h}},zx=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,f;for(;r<n;)f=r+e,yield t.slice(r,f),r=f},Hx=async function*(t,e){for await(const n of Ux(t))yield*zx(n,e)},Ux=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},Pp=(t,e,n,r)=>{const f=Hx(t,e);let d=0,p,b=h=>{p||(p=!0,r&&r(h))};return new ReadableStream({async pull(h){try{const{done:g,value:s}=await f.next();if(g){b(),h.close();return}let a=s.byteLength;if(n){let c=d+=a;n(c)}h.enqueue(new Uint8Array(s))}catch(g){throw b(g),g}},cancel(h){return b(h),f.return()}},{highWaterMark:2})},Al=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Bp=Al&&typeof ReadableStream=="function",Vx=Al&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),Wp=(t,...e)=>{try{return!!t(...e)}catch{return!1}},qx=Bp&&Wp(()=>{let t=!1;const e=new Request(Sr.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),jp=64*1024,bu=Bp&&Wp(()=>Se.isReadableStream(new Response("").body)),Tl={stream:bu&&(t=>t.body)};Al&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Tl[e]&&(Tl[e]=Se.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new Lt(`Response type '${e}' is not supported`,Lt.ERR_NOT_SUPPORT,r)})})})(new Response);const Kx=async t=>{if(t==null)return 0;if(Se.isBlob(t))return t.size;if(Se.isSpecCompliantForm(t))return(await new Request(Sr.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(Se.isArrayBufferView(t)||Se.isArrayBuffer(t))return t.byteLength;if(Se.isURLSearchParams(t)&&(t=t+""),Se.isString(t))return(await Vx(t)).byteLength},Gx=async(t,e)=>Se.toFiniteNumber(t.getContentLength())??Kx(e),Yx=Al&&(async t=>{let{url:e,method:n,data:r,signal:f,cancelToken:d,timeout:p,onDownloadProgress:b,onUploadProgress:h,responseType:g,headers:s,withCredentials:a="same-origin",fetchOptions:c}=Fp(t);g=g?(g+"").toLowerCase():"text";let l=jx([f,d&&d.toAbortSignal()],p),o;const u=l&&l.unsubscribe&&(()=>{l.unsubscribe()});let m;try{if(h&&qx&&n!=="get"&&n!=="head"&&(m=await Gx(s,r))!==0){let k=new Request(e,{method:"POST",body:r,duplex:"half"}),C;if(Se.isFormData(r)&&(C=k.headers.get("content-type"))&&s.setContentType(C),k.body){const[L,R]=Rp(m,Sl(Op(h)));r=Pp(k.body,jp,L,R)}}Se.isString(a)||(a=a?"include":"omit");const w="credentials"in Request.prototype;o=new Request(e,{...c,signal:l,method:n.toUpperCase(),headers:s.normalize().toJSON(),body:r,duplex:"half",credentials:w?a:void 0});let x=await fetch(o);const E=bu&&(g==="stream"||g==="response");if(bu&&(b||E&&u)){const k={};["status","statusText","headers"].forEach(F=>{k[F]=x[F]});const C=Se.toFiniteNumber(x.headers.get("content-length")),[L,R]=b&&Rp(C,Sl(Op(b),!0))||[];x=new Response(Pp(x.body,jp,L,()=>{R&&R(),u&&u()}),k)}g=g||"text";let T=await Tl[Se.findKey(Tl,g)||"text"](x,t);return!E&&u&&u(),await new Promise((k,C)=>{Lp(k,C,{data:T,headers:qr.from(x.headers),status:x.status,statusText:x.statusText,config:t,request:o})})}catch(w){throw u&&u(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new Lt("Network Error",Lt.ERR_NETWORK,t,o),{cause:w.cause||w}):Lt.from(w,w&&w.code,t,o)}}),wu={http:ux,xhr:Wx,fetch:Yx};Se.forEach(wu,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const zp=t=>`- ${t}`,Xx=t=>Se.isFunction(t)||t===null||t===!1,Hp={getAdapter:t=>{t=Se.isArray(t)?t:[t];const{length:e}=t;let n,r;const f={};for(let d=0;d<e;d++){n=t[d];let p;if(r=n,!Xx(n)&&(r=wu[(p=String(n)).toLowerCase()],r===void 0))throw new Lt(`Unknown adapter '${p}'`);if(r)break;f[p||"#"+d]=r}if(!r){const d=Object.entries(f).map(([b,h])=>`adapter ${b} `+(h===!1?"is not supported by the environment":"is not available in the build"));let p=e?d.length>1?`since :
1394
1394
  `+d.map(zp).join(`
1395
- `):" "+zp(d[0]):"as no adapter specified";throw new Lt("There is no suitable adapter to dispatch the request "+p,"ERR_NOT_SUPPORT")}return r},adapters:bu};function wu(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new qs(null,t)}function Up(t){return wu(t),t.headers=qr.from(t.headers),t.data=vu.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Hp.getAdapter(t.adapter||$a.adapter)(t).then(function(e){return wu(t),e.data=vu.call(t,t.transformResponse,e),e.headers=qr.from(e.headers),e},function(e){return Ip(e)||(wu(t),e&&e.response&&(e.response.data=vu.call(t,t.transformResponse,e.response),e.response.headers=qr.from(e.response.headers))),Promise.reject(e)})}const Vp="1.9.0",$l={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{$l[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const qp={};$l.transitional=function(t,e,n){function r(f,d){return"[Axios v"+Vp+"] Transitional option '"+f+"'"+d+(n?". "+n:"")}return(f,d,p)=>{if(t===!1)throw new Lt(r(d," has been removed"+(e?" in "+e:"")),Lt.ERR_DEPRECATED);return e&&!qp[d]&&(qp[d]=!0,console.warn(r(d," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(f,d,p):!0}},$l.spelling=function(t){return(e,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function Qx(t,e,n){if(typeof t!="object")throw new Lt("options must be an object",Lt.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let f=r.length;for(;f-- >0;){const d=r[f],p=e[d];if(p){const b=t[d],h=b===void 0||p(b,d,t);if(h!==!0)throw new Lt("option "+d+" must be "+h,Lt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Lt("Unknown option "+d,Lt.ERR_BAD_OPTION)}}const Ml={assertOptions:Qx,validators:$l},Qi=Ml.validators;let hs=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Tp,response:new Tp}}async request(t,e){try{return await this._request(t,e)}catch(n){if(n instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const f=r.stack?r.stack.replace(/^.+\n/,""):"";try{n.stack?f&&!String(n.stack).endsWith(f.replace(/^.+\n.+\n/,""))&&(n.stack+=`
1396
- `+f):n.stack=f}catch{}}throw n}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=us(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:f}=e;n!==void 0&&Ml.assertOptions(n,{silentJSONParsing:Qi.transitional(Qi.boolean),forcedJSONParsing:Qi.transitional(Qi.boolean),clarifyTimeoutError:Qi.transitional(Qi.boolean)},!1),r!=null&&(Se.isFunction(r)?e.paramsSerializer={serialize:r}:Ml.assertOptions(r,{encode:Qi.function,serialize:Qi.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),Ml.assertOptions(e,{baseUrl:Qi.spelling("baseURL"),withXsrfToken:Qi.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let d=f&&Se.merge(f.common,f[e.method]);f&&Se.forEach(["delete","get","head","post","put","patch","common"],l=>{delete f[l]}),e.headers=qr.concat(d,f);const p=[];let b=!0;this.interceptors.request.forEach(function(l){typeof l.runWhen=="function"&&l.runWhen(e)===!1||(b=b&&l.synchronous,p.unshift(l.fulfilled,l.rejected))});const h=[];this.interceptors.response.forEach(function(l){h.push(l.fulfilled,l.rejected)});let g,s=0,a;if(!b){const l=[Up.bind(this),void 0];for(l.unshift.apply(l,p),l.push.apply(l,h),a=l.length,g=Promise.resolve(e);s<a;)g=g.then(l[s++],l[s++]);return g}a=p.length;let c=e;for(s=0;s<a;){const l=p[s++],o=p[s++];try{c=l(c)}catch(u){o.call(this,u);break}}try{g=Up.call(this,c)}catch(l){return Promise.reject(l)}for(s=0,a=h.length;s<a;)g=g.then(h[s++],h[s++]);return g}getUri(t){t=us(this.defaults,t);const e=Dp(t.baseURL,t.url,t.allowAbsoluteUrls);return Ap(e,t.params,t.paramsSerializer)}};Se.forEach(["delete","get","head","options"],function(t){hs.prototype[t]=function(e,n){return this.request(us(n||{},{method:t,url:e,data:(n||{}).data}))}}),Se.forEach(["post","put","patch"],function(t){function e(n){return function(r,f,d){return this.request(us(d||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:r,data:f}))}}hs.prototype[t]=e(),hs.prototype[t+"Form"]=e(!0)});let Zx=class Zb{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(f){n=f});const r=this;this.promise.then(f=>{if(!r._listeners)return;let d=r._listeners.length;for(;d-- >0;)r._listeners[d](f);r._listeners=null}),this.promise.then=f=>{let d;const p=new Promise(b=>{r.subscribe(b),d=b}).then(f);return p.cancel=function(){r.unsubscribe(d)},p},e(function(f,d,p){r.reason||(r.reason=new qs(f,d,p),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new Zb(function(n){e=n}),cancel:e}}};function Jx(t){return function(e){return t.apply(null,e)}}function eC(t){return Se.isObject(t)&&t.isAxiosError===!0}const xu={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(xu).forEach(([t,e])=>{xu[e]=t});function Kp(t){const e=new hs(t),n=hp(hs.prototype.request,e);return Se.extend(n,hs.prototype,e,{allOwnKeys:!0}),Se.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return Kp(us(t,r))},n}const Vn=Kp($a);Vn.Axios=hs,Vn.CanceledError=qs,Vn.CancelToken=Zx,Vn.isCancel=Ip,Vn.VERSION=Vp,Vn.toFormData=kl,Vn.AxiosError=Lt,Vn.Cancel=Vn.CanceledError,Vn.all=function(t){return Promise.all(t)},Vn.spread=Jx,Vn.isAxiosError=eC,Vn.mergeConfig=us,Vn.AxiosHeaders=qr,Vn.formToJSON=t=>Mp(Se.isHTMLForm(t)?new FormData(t):t),Vn.getAdapter=Hp.getAdapter,Vn.HttpStatusCode=xu,Vn.default=Vn;const{Axios:QD,AxiosError:ZD,CanceledError:JD,isCancel:eN,CancelToken:tN,VERSION:nN,all:rN,Cancel:iN,isAxiosError:oN,spread:sN,toFormData:aN,AxiosHeaders:lN,HttpStatusCode:cN,formToJSON:uN,getAdapter:hN,mergeConfig:dN}=Vn,Cu=Vn.create({baseURL:location.origin,timeout:6e4,params:{}});Cu.interceptors.response.use(t=>t,t=>{var e,n,r,f,d,p,b,h,g,s,a;if(t.response){if(t.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(o){o&&OpenC3Auth.setTokens()}),t.response.config.headers["Ignore-Errors"]&&t.response.config.headers["Ignore-Errors"].includes(t.response.status.toString()))return Promise.reject(t);let c=`HTTP ${t.response.status} - `;(e=t.response)!=null&&e.statusText&&(c+=`${t.response.statusText} `),(r=(n=t.response)==null?void 0:n.config)!=null&&r.data&&(c+=`${t.response.config.data} `),(d=(f=t.response)==null?void 0:f.data)!=null&&d.message?c+=`${t.response.data.message}`:(b=(p=t.response)==null?void 0:p.data)!=null&&b.exception?c+=`${t.response.data.exception}`:(s=(g=(h=t.response)==null?void 0:h.data)==null?void 0:g.error)!=null&&s.message?(t.response.data.error.class&&(c+=`${t.response.data.error.class} `),c+=`${t.response.data.error.message}`):c+=`${(a=t.response)==null?void 0:a.data}`;const{$cosmosNotify:l}=window;throw l&&l.serious({title:"Network error",body:c}),t}else throw t});const El=async function(t,e,{data:n,params:r={},headers:f,noAuth:d=!1,noScope:p=!1,onUploadProgress:b=!1}={}){if(!d){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}f.Authorization=localStorage.openc3Token}return f.manual=!0,!p&&!r.scope&&(r.scope=window.openc3Scope),Cu({method:t,url:e,data:n,params:r,headers:f,onUploadProgress:b})},ku={Accept:"application/json"},Gp={...ku,"Content-Type":"application/json"},tC=sr("F",{get:function(t,{params:e,headers:n=ku,noScope:r,noAuth:f,onUploadProgress:d}={}){return El("get",t,{params:e,headers:n,noScope:r,noAuth:f,onUploadProgress:d})},put:function(t,{data:e,params:n,headers:r=Gp,noScope:f,noAuth:d,onUploadProgress:p}={}){return El("put",t,{data:e,params:n,headers:r,noScope:f,noAuth:d,onUploadProgress:p})},post:function(t,{data:e,params:n,headers:r=Gp,noScope:f,noAuth:d,onUploadProgress:p}={}){return El("post",t,{data:e,params:n,headers:r,noScope:f,noAuth:d,onUploadProgress:p})},delete:function(t,{params:e,headers:n=ku,noScope:r,noAuth:f,onUploadProgress:d}={}){return El("delete",t,{params:e,headers:n,noScope:r,noAuth:f,onUploadProgress:d})}});let Il=()=>({emit(t,...e){for(let n=this.events[t]||[],r=0,f=n.length;r<f;r++)n[r](...e)},events:{},on(t,e){var n;return((n=this.events)[t]||(n[t]=[])).push(e),()=>{var r;this.events[t]=(r=this.events[t])==null?void 0:r.filter(f=>e!==f)}}});class Ea extends Error{constructor(e,n){e instanceof Error?(super(e.message),this.cause=e):super(e),this.reason=n,this.name="ReasonError"}}class _u extends Ea{constructor(e){super("Rejected",e),this.name="SubscriptionRejectedError"}}class nC extends Ea{constructor(e){super(e||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class Di extends Ea{constructor(e,n){n?super(e,n):super("Disconnected",e),this.name="DisconnectedError"}}class rC extends Di{constructor(e){super(e,"stale_connection"),this.name="StaleConnectionError"}}function Yp(t){return t?`{${Object.keys(t).sort().filter(e=>t[e]!==void 0).map(e=>{let n=JSON.stringify(t[e]);return`${JSON.stringify(e)}:${n}`}).join(",")}}`:""}class iC{constructor(e){this.channel=e,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",e=>{if(e.type==="info"){this._state||(this._state=this.stateFromInfo(e));return}this._state&&(e.type==="join"?this._state[e.id]=e.info:e.type==="leave"&&delete this._state[e.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(e=>e()),this.listeners.length=0}async join(e,n){if(!this._info)return this._info={id:e,info:n},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let e=await this.channel.perform("$presence:leave");return delete this._info,e}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let e=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(e),this._state}finally{delete this._promise}}stateFromInfo(e){return e.records.reduce((n,{id:r,info:f})=>(n[r]=f,n),{})}}const ds=Symbol("state");class Xp{constructor(e={}){this.emitter=Il(),this.params=Object.freeze(e),this.presence=new iC(this),this.initialConnect=!0,this[ds]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=Yp({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[ds]}attached(e){if(this.receiver){if(this.receiver!==e)throw Error("Already connected to a different receiver");return!1}return this.receiver=e,!0}connecting(){this[ds]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[ds]="connected";let e=!1;this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:e})):this.emit("connect",{reconnect:!0,restored:e})}restored(){if(this.state==="connected")throw Error("Already connected");this[ds]="connected";let e=!0,n=!0;this.initialConnect=!1,this.emit("connect",{reconnect:n,restored:e})}disconnected(e){this.state==="disconnected"||this.state==="closed"||(this[ds]="disconnected",this.presence.reset(),this.emit("disconnect",e))}closed(e){this.state!=="closed"&&(this[ds]="closed",delete this.receiver,this.initialConnect=!0,this.presence.dispose(),this.emit("close",e))}disconnect(){this.state==="idle"||this.state==="closed"||this.receiver.unsubscribe(this)}async perform(e,n){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,e,n)}async send(e){return this.perform(void 0,e)}async whisper(e){try{await this.perform("$whisper",e)}catch(n){let r=this.receiver?this.receiver.logger:null;r&&r.warn("whisper failed: ",n)}}receive(e,n){this.emit("message",e,n)}on(e,n){return this.emitter.on(e,n)}once(e,n){let r=this.emitter.on(e,(...f)=>{r(),n(...f)});return r}emit(e,...n){return this.emitter.emit(e,...n)}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((e,n)=>{let r=[()=>delete this._pendingSubscribe];r.push(this.on("connect",()=>{r.forEach(f=>f()),e()})),r.push(this.on("close",f=>{r.forEach(d=>d()),n(f||new Ea("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class oC{constructor(e){this.id=e,this.intent="unsubscribed",this.state="idle",this.channels=[],this.disposed=!1,this._pendings=[]}add(e){this.channels.includes(e)||this.channels.push(e)}remove(e){let n=this.channels.indexOf(e);n>-1&&this.channels.splice(n,1)}notify(e,...n){this.state=e==="restored"?"connected":e,n.length===1?this.channels.forEach(r=>r[e](n[0])):this.channels.forEach(r=>r[e]())}pending(e){this._checkIntent(e);let n=this._pendings[0];return!n||n.intent!==e?Promise.resolve():n.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(e){this._checkIntent(e);let n,r={promise:new Promise(d=>{n=d}),intent:e,release:()=>{this._pendings.splice(this._pendings.indexOf(r),1),n(r)},canceled:!1,acquired:!1},f=this._pendingTop;return this._pendings.push(r),f&&await f.promise,this.gvl&&await this.gvl.acquire(r,e),r.acquired=!0,r}close(e){this.disposed=!0,this.intent=void 0,this.notify("closed",e)}_checkIntent(e){if(!(e==="unsubscribed"||e==="subscribed"))throw Error(`Unknown subscription intent: ${e}`)}get _pendingTop(){return this._pendings.length?this._pendings[this._pendings.length-1]:void 0}_mergeWithPending(e){let n=this._pendingTop;return!n||n.acquired||n.intent!==e?!1:(this._pendings.pop(),n.canceled=!0,!0)}}class sC{constructor(){this.queue=[]}async acquire(e,n){n==="subscribed"&&(this.queue.push(e.promise.then(()=>{this.queue.splice(this.queue.indexOf(e),1)})),this.queue.length>1&&await this.queue[this.queue.length-2])}}class aC{constructor(e){e.concurrentSubscribes===!1&&(this.glv=new sC),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(e){return this._subscriptions[e]}create(e,{subscribe:n,unsubscribe:r}){let f=this._subscriptions[e]=new oC(e);return f.remoteId=this._localToRemote[e],f.subscriber=n,f.unsubscriber=r,f.gvl=this.glv,f}remove(e){delete this._subscriptions[e],delete this._localToRemote[e]}storeRemoteId(e,n){this._localToRemote[e]=n;let r=this.get(e);r&&(r.remoteId=n)}}class lC{constructor(e={}){this.subscriptions=new aC(e),this._pendingMessages=[],this._remoteToLocal={}}subscribe(e,n){this._remoteToLocal[n]=e,this.subscriptions.storeRemoteId(e,n),this.flush(n)}unsubscribe(e){let n=this.subscriptions.get(e);if(!n)return;let r=n.remoteId;r&&delete this._remoteToLocal[r],this.subscriptions.remove(e)}transmit(e,n,r){let f=this._remoteToLocal[e];if(!f){this._pendingMessages.push([e,n,r]);return}let d=this.subscriptions.get(f);d&&d.channels.forEach(p=>{p.receive(n,r)})}notify(e,n,r){let f=this._remoteToLocal[e];if(!f)return;let d=this.subscriptions.get(f);d&&d.channels.forEach(p=>p.emit(n,r))}close(){this._pendingMessages.length=0}get size(){return this.channels.length}get channels(){return this.subscriptions.all().flatMap(e=>e.channels)}flush(e){let n=[];for(let r of this._pendingMessages)r[0]===e?this.transmit(r[0],r[1],r[2]):n.push(r);this._pendingMessages=n}}const Qp={debug:0,info:1,warn:2,error:3};class Zp{constructor(e){this.level=e||"warn"}log(e,n,r){Qp[e]<Qp[this.level]||this.writeLogEntry(e,n,r)}writeLogEntry(){throw Error("Not implemented")}debug(e,n){this.log("debug",e,n)}info(e,n){this.log("info",e,n)}warn(e,n){this.log("warn",e,n)}error(e,n){this.log("error",e,n)}}class Ia extends Zp{writeLogEntry(){}}class cC{encode(e){return JSON.stringify(e)}decode(e){try{return JSON.parse(e)}catch{}}}let uC=0;class Jp{constructor(e={}){let{logger:n}=e;this.logger=n||new Ia,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=e.subscribeCooldownInterval||250,this.subscribeRetryInterval=e.subscribeRetryInterval||5e3}attached(e){this.cable=e}subscribe(e,n){let r={channel:e};n&&Object.assign(r,n);let f=Yp(r);if(this.pendingUnsubscriptions[f]){let p=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${p}`,f),new Promise(b=>{setTimeout(()=>{b(this.subscribe(e,n))},p)})}if(this.pendingSubscriptions[f])return this.logger.warn("subscription is already pending, skipping",f),Promise.reject(Error("Already subscribing"));let d=this.subscribeRetryInterval;return new Promise((p,b)=>{let h=++uC;this.pendingSubscriptions[f]={resolve:p,reject:b,id:h},this.cable.send(this.buildSubscribeRequest(f)),this.maybeRetrySubscribe(h,f,d)})}buildSubscribeRequest(e){return{command:"subscribe",identifier:e}}maybeRetrySubscribe(e,n,r){setTimeout(()=>{let f=this.pendingSubscriptions[n];f&&f.id===e&&(this.logger.warn(`no subscription ack received in ${r}ms, retrying subscribe`,n),this.cable.send(this.buildSubscribeRequest(n)),this.maybeExpireSubscribe(e,n,r))},r)}maybeExpireSubscribe(e,n,r){setTimeout(()=>{let f=this.pendingSubscriptions[n];f&&f.id===e&&(delete this.pendingSubscriptions[n],f.reject(new nC(`Haven't received subscription ack in ${r*2}ms for ${n}`)))},r)}unsubscribe(e){return this.cable.send({command:"unsubscribe",identifier:e}),this.pendingUnsubscriptions[e]=!0,setTimeout(()=>{delete this.pendingUnsubscriptions[e]},this.subscribeCooldownInterval),Promise.resolve()}perform(e,n,r){return n==="$whisper"?this.whisper(e,r):(r||(r={}),r.action=n,this.cable.send({command:"message",identifier:e,data:JSON.stringify(r)}),Promise.resolve())}whisper(e,n){return this.cable.send({command:"whisper",identifier:e,data:n}),Promise.resolve()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:n,identifier:r,message:f,reason:d,reconnect:p}=e;if(n==="ping")return this.cable.keepalive(e.message);if(this.cable.keepalive(),n==="welcome"){let b=e.sid;return b&&this.cable.setSessionId(b),this.cable.connected()}if(n==="disconnect"){let b=new Di(d);this.reset(b),p===!1?this.cable.closed(b):this.cable.disconnected(b);return}if(n==="confirm_subscription"){let b=this.pendingSubscriptions[r];if(!b){this.logger.error("subscription not found, unsubscribing",{type:n,identifier:r}),this.unsubscribe(r);return}return delete this.pendingSubscriptions[r],b.resolve(r)}if(n==="reject_subscription"){let b=this.pendingSubscriptions[r];return b?(delete this.pendingSubscriptions[r],b.reject(new _u)):this.logger.error("subscription not found",{type:n,identifier:r})}if(f)return{identifier:r,message:f};this.logger.warn(`unknown message type: ${n}`,{message:e})}reset(e){for(let n in this.pendingSubscriptions)this.pendingSubscriptions[n].reject(e);this.pendingSubscriptions={}}recoverableClosure(){return!1}}const eg=()=>Date.now()/1e3|0;class hC extends Jp{constructor(e={}){super(e),this.streamsPositions={},this.subscriptionStreams={},this.pendingHistory={},this.pendingPresence={},this.presenceInfo={},this.restoreSince=e.historyTimestamp,this.disableSessionRecovery=e.disableSessionRecovery,this.restoreSince===void 0&&(this.restoreSince=eg()),this.sessionId=void 0,this.sendPongs=e.pongs}reset(e){for(let n in this.pendingPresence)this.pendingPresence[n].reject(e);return this.pendingPresence={},super.reset()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:n,identifier:r,message:f}=e;if(n==="disconnect")return delete this.sessionId,this.cable.setSessionId(""),super.receive(e);if(n==="reject_subscription")return super.receive(e);if(n==="confirm_subscription")return this.subscriptionStreams[r]||(this.subscriptionStreams[r]=new Set),super.receive(e);if(n==="ping")return this.restoreSince&&(this.restoreSince=eg()),this.sendPongs&&this.sendPong(),this.cable.keepalive(e.message);if(this.cable.keepalive(),n==="confirm_history"){this.logger.debug("history result received",e),this.cable.notify("history_received",r);return}if(n==="reject_history"){this.logger.warn("failed to retrieve history",e),this.cable.notify("history_not_found",r);return}if(n==="welcome"){if(this.disableSessionRecovery||(this.sessionId=e.sid,this.sessionId&&this.cable.setSessionId(this.sessionId)),e.restored){let d=e.restored_ids||Object.keys(this.subscriptionStreams);for(let p of d)this.cable.send({identifier:p,command:"history",history:this.historyRequestFor(p)}),this.presenceInfo[p]&&this.cable.send({identifier:p,command:"join",presence:this.presenceInfo[p]});return this.cable.restored(d)}return this.cable.connected(this.sessionId)}if(n==="presence"){let d=f.type;if(d==="info"){let p=this.pendingPresence[r];p&&(delete this.pendingPresence[r],p.resolve(f))}else if(d==="error"){let p=this.pendingPresence[r];p&&(delete this.pendingPresence[r],p.reject(new Error("failed to retrieve presence")))}return{type:n,identifier:r,message:f}}if(f){let d=this.trackStreamPosition(r,e.stream_id,e.epoch,e.offset);return{identifier:r,message:f,meta:d}}this.logger.warn(`unknown message type: ${n}`,{message:e})}perform(e,n,r){switch(n){case"$presence:join":return this.join(e,r);case"$presence:leave":return this.leave(e,r);case"$presence:info":return this.presence(e,r)}return super.perform(e,n,r)}unsubscribe(e){return delete this.presenceInfo[e],super.unsubscribe(e)}buildSubscribeRequest(e){let n=super.buildSubscribeRequest(e),r=this.historyRequestFor(e);r&&(n.history=r,this.pendingHistory[e]=!0);let f=this.presenceInfo[e];return f&&(n.presence=f),n}recoverableClosure(){return!!this.sessionId}historyRequestFor(e){let n={},r=!1;if(this.subscriptionStreams[e])for(let f of this.subscriptionStreams[e]){let d=this.streamsPositions[f];d&&(r=!0,n[f]=d)}if(!(!r&&!this.restoreSince))return{since:this.restoreSince,streams:n}}trackStreamPosition(e,n,r,f){if(!(!n||!r))return this.subscriptionStreams[e]||(this.subscriptionStreams[e]=new Set),this.subscriptionStreams[e].add(n),this.streamsPositions[n]={epoch:r,offset:f},{stream:n,epoch:r,offset:f}}async sendPong(){await new Promise(e=>setTimeout(e,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(e,n){return this.presenceInfo[e]=n,this.cable.send({command:"join",identifier:e,presence:n}),Promise.resolve()}async leave(e,n){return delete this.presenceInfo[e],this.cable.send({command:"leave",identifier:e,presence:n}),Promise.resolve()}presence(e,n){return this.pendingPresence[e]?(this.logger.warn("presence is already pending, skipping",e),Promise.reject(Error("presence request is already pending"))):new Promise((r,f)=>{this.pendingPresence[e]={resolve:r,reject:f},this.cable.send({command:"presence",identifier:e,data:n})})}}class dC extends Ea{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class Su extends Xp{constructor(e,n){super(n),this.channelId=e}set channelId(e){this._channelId=e}get channelId(){return this._channelId}}vl(Su,"identifier","__ghost__");const fC="$pubsub";class Au extends Xp{async perform(e,n){if(e.startsWith("$"))return super.perform(e,n);throw Error("not implemented")}}vl(Au,"identifier",fC);const fs=Symbol("state");let pC=class{constructor({transport:t,protocol:e,encoder:n,logger:r,lazy:f,hubOptions:d,performFailures:p,transportConfigurator:b}){this.emitter=Il(),this.transport=t,this.encoder=n,this.logger=r||new Ia,this.protocol=e,this.performFailures=p||"throw",this.protocol.attached(this),this.hub=new lC(d||{}),this[fs]="idle",this.handleClose=this.handleClose.bind(this),this.handleIncoming=this.handleIncoming.bind(this),this.transportConfigurator=b,this.transport.on("close",this.handleClose),this.transport.on("data",this.handleIncoming),this.initialConnect=!0,this.recovering=!1,f===!1&&this.connect().catch(()=>{})}get state(){return this[fs]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let t=this.state==="idle";this[fs]="connecting";let e=this.pendingConnect();this.logger.debug("connecting");try{this.transportConfigurator&&await this.transportConfigurator(this.transport,{initial:t}),await this.transport.open()}catch(n){this.handleClose(n)}return e}setSessionId(t){this.sessionId=t,this.transport.setParam("sid",t)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[fs]="connected",this.recovering&&this.hub.subscriptions.all().forEach(e=>e.notify("disconnected",new Di("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[fs]="connected",this.hub.subscriptions.all().forEach(r=>{t&&r.remoteId&&t.includes(r.remoteId)?r.notify("restored"):(r.notify("disconnected",new Di("recovery_failed")),this._resubscribe(r))});let e=!this.initialConnect,n=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:e,restored:n})}notify(t,e,n){e&&typeof e!="string"&&(n=e,e=void 0),e?this.hub.notify(e,"info",{type:t,data:n}):this.emit("info",{type:t,data:n})}handleClose(t){this.logger.debug("transport closed",{error:t}),this.disconnected(new Di(t,"transport_closed"))}disconnected(t){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:t}),this[fs]="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 Di?t:new Di(t,void 0)),this.logger.info("closed",{reason:t||"user"}),this[fs]="closed";let n=e||new Di("cable_closed");this.hub.subscriptions.all().forEach(r=>r.notify("disconnected",n)),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 n=this.protocol.receive(e);if(n){this.logger.debug("processed incoming message",n);let{type:r,identifier:f,message:d,meta:p}=n;r?this.hub.notify(f,r,d):this.hub.transmit(f,d,p)}}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 Au({stream_name:t});return this.subscribe(e)}streamFromSigned(t){let e=new Au({signed_stream_name:t});return this.subscribe(e)}subscribeTo(t,e){let n,r;return typeof t=="string"&&(r=t,t=Su),n=r?new t(r,e):new t(e),this.subscribe(n)}subscribe(t){if(!t.attached(this))return t;let e=t.identifier;t.connecting();let n=this.hub.subscriptions.get(e)||this.hub.subscriptions.create(e,{subscribe:r=>this._subscribe(r,t.channelId,t.params),unsubscribe:r=>this._unsubscribe(r)});return n.add(t),n.intent==="subscribed"&&n.state==="connected"&&t.connected(),n.ensureSubscribed(),t}async _resubscribe(t){t.intent!=="subscribed"||!t.channels[0]||(t.notify("connecting"),t.ensureResubscribed())}async _subscribe(t,e,n){let r=t.id;if(this.state==="idle"&&this.connect().catch(()=>{}),this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r});return}this.logger.debug("acquiring subscribe lock",{identifier:r});let f=await t.acquire("subscribed");if(f.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:r}),f.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:r}),t.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),f.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r}),f.release();return}if(t.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:r}),t.notify("connected"),f.release();return}let d={identifier:e,params:n};this.logger.debug("subscribing",d);try{let p=await this.protocol.subscribe(e,n);this.hub.subscribe(r,p),this.logger.debug("subscribed",{...d,remoteId:p}),t.notify("connected")}catch(p){if(p){if(p instanceof _u&&this.logger.warn("rejected",d),p instanceof Di){this.logger.debug("disconnected during subscription; will retry on connect",d),f.release();return}this.logger.error("failed to subscribe",{error:p,...d})}t.close(p),this.hub.unsubscribe(r)}f.release()}unsubscribe(t){let e=t.identifier,n=this.hub.subscriptions.get(e);if(!n)throw Error(`Subscription not found: ${e}`);n.remove(t),t.closed(),n.maybeUnsubscribe()}async _unsubscribe(t){let e=t.id;this.logger.debug("acquiring unsubscribe lock",{identifier:e});let n=await t.acquire("unsubscribed");if(n.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:e}),n.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}),n.release();return}if(t.state==="disconnected"||t.state==="closed"){this.logger.debug(`already ${t.state} connected, skip unsubscribe command`,{identifier:e}),n.release();return}let r=t.remoteId;if(this.logger.debug("unsubscribing...",{remoteId:r}),this.state!=="connected"){this.logger.debug("unsubscribe skipped (cable is not connected)",{id:e}),t.close(),this.hub.unsubscribe(e),n.release();return}try{await this.protocol.unsubscribe(r),this.logger.debug("unsubscribed remotely",{id:e})}catch(f){f&&(f instanceof Di?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:e,error:f}):this.logger.error("unsubscribe failed",{id:e,error:f}))}t.intent==="unsubscribed"?(t.close(),this.hub.unsubscribe(e)):t.state="closed",n.release()}async perform(t,e,n){if(this.performFailures==="throw")return this._perform(t,e,n);try{return await this._perform(t,e,n)}catch(r){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:r});return}}async _perform(t,e,n){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new dC;let r=this.hub.subscriptions.get(t);if(!r)throw Error(`Subscription not found: ${t}`);if(await r.pending("subscribed"),r.intent!=="subscribed")throw Error(`Subscription is closed: ${t}`);let f=r.remoteId,d={id:f,action:e,payload:n};this.logger.debug("perform",d);try{let p=await this.protocol.perform(f,e,n);return p&&this.logger.debug("perform result",{message:p,request:d}),p}catch(p){throw this.logger.error("perform failed",{error:p,request:d}),p}}on(t,e){return this.emitter.on(t,e)}once(t,e){let n=this.emitter.on(t,(...r)=>{n(),e(...r)});return n}emit(t,...e){return this.emitter.emit(t,...e)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((t,e)=>{let n=[()=>delete this._pendingConnect];n.push(this.on("connect",()=>{n.forEach(r=>r()),t()})),n.push(this.on("close",r=>{n.forEach(f=>f()),e(r)})),n.push(this.on("disconnect",r=>{n.forEach(f=>f()),e(r)}))}),this._pendingConnect)}};const gC={maxMissingPings:2,maxReconnectAttempts:1/0},Ks=()=>Date.now(),tg=(t,e)=>{e=e||{};let{backoffRate:n,jitterRatio:r,maxInterval:f}=e;return n=n||2,r===void 0&&(r=.5),d=>{let p=t*n**d,b=p*n,h=p+(b-p)*Math.random(),g=2*(Math.random()-.5)*r;return h=h*(1+g),f&&f<h&&(h=f),h}};let ng=class{constructor({pingInterval:t,...e}){if(this.pingInterval=t,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${t}`);if(e=Object.assign({},gC,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 Ia,this.state="pending_connect",this.attempts=0,this.disconnectedAt=Ks()}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=Ks(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=Ks(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=Ks(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=Ks()})),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=Ks()-this.pingedAt;t>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${t}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new rC))}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)}};class mC{constructor(e,n={}){this.transports=e,this.transport=null,this.emitter=Il(),this.unbind=[],this.logger=n.logger||new Ia}displayName(){return"fallbacked transport"}async open(){for(let e=0;e<this.transports.length;e++){let n=this.transports[e];try{this.transport=n,this.resetListeners(),this.logger.debug(`Trying to connect via ${n.displayName()}`),await n.open(),this.logger.debug(`Connected via ${n.displayName()}`);return}catch(r){this.logger.debug(`Failed to connect via ${n.displayName()}: ${r.message}`)}}throw this.transport=null,this.resetListeners(),new Error("Couldn't connect via any available transport")}send(e){if(!this.transport)throw new Error("No transport is open");this.transport.send(e)}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(e,n){this.transports.forEach(r=>{r.setParam(e,n)})}setToken(e,n){this.transports.forEach(r=>{r.setToken(e,n)})}on(e,n){return this.emitter.on(e,n)}once(e,n){let r=this.emitter.on(e,(...f)=>{r(),n(...f)});return r}get url(){return this.transport?this.transport.url:""}resetListeners(){this.unbind.forEach(e=>e()),this.unbind.length=0,this.transport&&this.unbind.push(this.transport.on("open",()=>{this.emitter.emit("open")}),this.transport.on("data",e=>{this.emitter.emit("data",e)}),this.transport.on("close",e=>{this.emitter.emit("close",e)}),this.transport.on("error",e=>{this.emitter.emit("error",e)}))}}class vC{constructor(e,n={}){this.url=e;let r=n.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=Il();let{format:f,subprotocol:d,authStrategy:p}=n;this.format=f||"text",this.connectionOptions=n.websocketOptions,this.authStrategy=p||"param",this.authProtocol="",this.subprotocol=d}displayName(){return"WebSocket("+this.url+")"}open(){let e=this.subprotocol;return this.authStrategy==="sub-protocol"&&(e=[this.subprotocol,this.authProtocol]),this.connectionOptions?this.ws=new this.Impl(this.url,e,this.connectionOptions):this.ws=new this.Impl(this.url,e),this.ws.binaryType="arraybuffer",this.initListeners(),new Promise((n,r)=>{let f=[];f.push(this.once("open",()=>{f.forEach(d=>d()),n()})),f.push(this.once("close",()=>{f.forEach(d=>d()),r(Error("WS connection closed"))}))})}setURL(e){this.url=e}setParam(e,n){let r=new URL(this.url);r.searchParams.set(e,n);let f=`${r.protocol}//${r.host}${r.pathname}?${r.searchParams}`;this.setURL(f)}setToken(e,n="jid"){if(this.authStrategy==="param")this.setParam(n,e);else if(this.authStrategy==="header"){this.connectionOptions=this.connectionOptions||{},this.connectionOptions.headers=this.connectionOptions.headers||{};let r=`x-${n}`.toLowerCase();r=Object.keys(this.connectionOptions.headers).find(f=>f.toLowerCase()===r)||r,this.connectionOptions.headers[r]=e}else if(this.authStrategy==="sub-protocol")this.authProtocol=`anycable-token.${e}`;else throw new Error("Unknown auth strategy: "+this.authStrategy)}send(e){if(!this.ws||!this.connected)throw Error("WebSocket is not connected");this.ws.send(e)}close(){this.ws?this.onclose():this.connected=!1}on(e,n){return this.emitter.on(e,n)}once(e,n){let r=this.emitter.on(e,(...f)=>{r(),n(...f)});return r}initListeners(){this.ws.onerror=e=>{this.connected&&this.emitter.emit("error",e.error||new Error("WS Error"))},this.ws.onclose=()=>{this.onclose()},this.ws.onmessage=e=>{let n=e.data;this.format==="binary"&&(n=new Uint8Array(n)),this.emitter.emit("data",n)},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")}}const rg={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function yC(t,e){if(typeof t=="object"&&typeof e>"u"&&(e=t,t=void 0),e=e||{},!t&&!e.transport)throw Error("URL or transport must be specified");e=Object.assign({},rg,e);let{protocol:n,websocketImplementation:r,websocketFormat:f,websocketOptions:d,websocketAuthStrategy:p,fallbacks:b,logLevel:h,logger:g,transport:s,encoder:a,lazy:c,monitor:l,pingInterval:o,reconnectStrategy:u,maxMissingPings:m,maxReconnectAttempts:w,subprotocol:x,tokenRefresher:E,historyTimestamp:T,protocolOptions:k,concurrentSubscribes:C,performFailures:L,transportConfigurator:R,auth:F}=e;if(g=g||new Ia(h),typeof n=="string"){x=x||n;let P=n.substring(0,n.lastIndexOf("-")),O=n.substring(n.lastIndexOf("-")+1);if(k=k||{},P==="actioncable-v1")n=new Jp({logger:g,...k});else if(P==="actioncable-v1-ext")n=new hC({logger:g,historyTimestamp:T,...k});else throw Error(`Protocol is not supported yet: ${n}`);if(O==="json")a=a||new cC,f=f||"text";else if(O==="msgpack"){if(f="binary",!a)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(O==="protobuf"){if(f=f||"binary",!a)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: ${n}`)}if(!n)throw Error("Protocol must be specified");s=s||new vC(t,{websocketImplementation:r,websocketOptions:d,subprotocol:x,authStrategy:p,format:f}),b&&(s=new mC([s,...b],{logger:g})),F&&F.token&&s.setToken(F.token,F.param||"jid"),u=u||tg(o),l!==!1&&(l=l||new ng({pingInterval:o,reconnectStrategy:u,maxMissingPings:m,maxReconnectAttempts:w,logger:g}));let I={concurrentSubscribes:C},H=new pC({protocol:n,transport:s,encoder:a,logger:g,lazy:c,hubOptions:I,performFailures:L,transportConfigurator:R});return l&&(l.watch(H),H.monitor=l),E&&bC(H,async()=>{try{await E(s)}catch(P){return g.error("Failed to refresh authentication token: "+P),!1}return H.connect().catch(()=>{}),!0}),H}function bC(t,e){let n=!1;t.on("connect",()=>n=!1),t.on("close",async r=>{if(r){if(n){t.logger.warn("Token auto-refresh is disabled",r);return}r.reason==="token_expired"&&(n=!0,await e())}})}class wC{constructor(e){this.channel=e}notify(e,...n){typeof this[e]=="function"&&this[e](...n)}perform(e,n={}){this.channel.perform(e,n)}send(e){this.channel.send(e)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}}class xC extends Su{constructor(e,n,r){super(e,n),this.subscription=new wC(this),Object.assign(this.subscription,r),this.on("connect",({reconnect:f})=>this.subscription.notify("connected",{reconnected:f})),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",f=>this.subscription.notify("received",f)),this.on("close",f=>{f&&f instanceof _u?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class CC{constructor(e){this.cable=e}create(e,n){let r,f;typeof e=="object"?(r=e.channel,delete e.channel,f=e):(r=e,f={});let d=new xC(r,f,n);return d.subscription.notify("initialized"),this.cable.subscribe(d),d.subscription}findAll(e){return this.cable.hub.channels.filter(n=>n.identifier===e).map(n=>n.subscription)}}class kC{constructor(e){this.cable=e,this.subscriptions=new CC(e)}}class _C extends Zp{writeLogEntry(e,n,r){r?console[e](n,r):console[e](n)}}class SC extends ng{watch(e){super.watch(e),this.initActivityListeners()}initActivityListeners(){if(typeof document<"u"&&typeof window<"u"&&document.addEventListener&&window.addEventListener){let e=()=>{document.hidden||this.reconnectNow()&&this.logger.debug("Trigger reconnect due to visibility change")},n=f=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:f})},r=()=>this.disconnect(new Di("page_frozen"));document.addEventListener("visibilitychange",e,!1),window.addEventListener("focus",n,!1),window.addEventListener("online",n,!1),window.addEventListener("resume",n,!1),window.addEventListener("freeze",r,!1),this.unbind.push(()=>{document.removeEventListener("visibilitychange",e,!1),window.removeEventListener("focus",n,!1),window.removeEventListener("online",n,!1),window.removeEventListener("resume",n,!1),window.removeEventListener("freeze",r,!1)})}}disconnect(e){this.state==="disconnected"||this.state==="closed"||(this.logger.info("Disconnecting",{reason:e.message}),this.cancelReconnect(),this.stopPolling(),this.state="pending_disconnect",this.target.disconnected(e))}}const AC=["cable","action-cable"],TC="/cable",Ll=(t,e)=>{for(let n of AC){let r=t.head.querySelector(`meta[name='${n}-${e}']`);if(r)return r.getAttribute("content")}},ig=t=>t.match(/wss?:\/\//)?t:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${t}`:t,$C=()=>{if(typeof document<"u"&&document.head){let t=Ll(document,"url");if(t)return ig(t)}return ig(TC)},MC=()=>{if(typeof document<"u"&&document.head){let t=Ll(document,"history-timestamp");if(t)return t|0}},EC=()=>{if(typeof document<"u"&&document.head)return Ll(document,"token")},IC=()=>{if(typeof document<"u"&&document.head)return Ll(document,"token-param")};function LC(t,e){typeof t=="object"&&typeof e>"u"&&(e=t,t=void 0),t=t||$C(),e=e||{},e.historyTimestamp||(e.historyTimestamp=MC());let n=EC();if(n){let g=IC();e.auth=Object.assign({token:n,param:g},e.auth||{})}e=Object.assign({},rg,e);let{logLevel:r,logger:f,pingInterval:d,reconnectStrategy:p,maxMissingPings:b,maxReconnectAttempts:h}=e;return f=e.logger=e.logger||new _C(r),p=e.reconnectStrategy=e.reconnectStrategy||tg(d),e.monitor!==!1&&(e.monitor=e.monitor||new SC({pingInterval:d,reconnectStrategy:p,maxMissingPings:b,maxReconnectAttempts:h,logger:f})),yC(t,e)}function RC(t,e){let n=LC(t,e);return new kC(n)}class OC{constructor(e="/openc3-api/cable"){this._cable=null,this._url=e}disconnect(){this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(e,n,r={},f={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(d=>{if(d&&OpenC3Auth.setTokens(),this._cable==null){let p=this._url+"?scope="+encodeURIComponent(window.openc3Scope)+"&authorization="+encodeURIComponent(localStorage.openc3Token);p=new URL(p,document.baseURI).href,this._cable=RC(p)}return this._cable.subscriptions.create({channel:e,...f},r)})}recordPing(){}}sr("P",OC);class DC{constructor(e,n,r="",f=""){this.keyword=e.keyword,this.parameters=e.parameters,this.filename=e.filename,this.line=e.line,this.lineNumber=e.lineNumber,this.message=n,this.usage=r,this.url=f}}sr("e",DC);function Tu(t){return NC.test(t)}const NC=/^-?[0-9]+$/;function og(t){return FC.test(t)}const FC=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function sg(t,e){const n=Number.parseFloat(t),r=String(n),f=ag(t),d=ag(r);return!!(f===d||(e==null?void 0:e.approx)===!0&&!Tu(t)&&d.length>=14&&f.startsWith(d.substring(0,14)))}let La=function(t){return t.underflow="underflow",t.overflow="overflow",t.truncate_integer="truncate_integer",t.truncate_float="truncate_float",t}({});function PC(t){if(sg(t,{approx:!1}))return;if(Tu(t))return La.truncate_integer;const e=Number.parseFloat(t);return Number.isFinite(e)?e===0?La.underflow:La.truncate_float:La.overflow}function ag(t){return t.replace(BC,"").replace(jC,"").replace(zC,"").replace(WC,"")}const BC=/[eE][+-]?\d+$/,WC=/^-?(0*)?/,jC=/\./,zC=/0+$/;class HC{constructor(e){if(vl(this,"isLosslessNumber",!0),!og(e))throw new Error(`Invalid number (value: "${e}")`);this.value=e}valueOf(){const e=PC(this.value);if(e===void 0||e===La.truncate_float)return Number.parseFloat(this.value);if(Tu(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${e} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}}function UC(t){return t&&typeof t=="object"&&t.isLosslessNumber===!0||!1}function VC(t){return new HC(t)}function qC(t,e){return $u({"":t},"",t,e)}function $u(t,e,n,r){return Array.isArray(n)?r.call(t,e,GC(n,r)):n&&typeof n=="object"&&!UC(n)?r.call(t,e,KC(n,r)):r.call(t,e,n)}function KC(t,e){for(const n of Object.keys(t)){const r=$u(t,n,t[n],e);r!==void 0?t[n]=r:delete t[n]}return t}function GC(t,e){for(let n=0;n<t.length;n++)t[n]=$u(t,String(n),t[n],e);return t}function YC(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:VC,r=0;const f=b();return o(f),m(),e?qC(f,e):f;function d(){if(t.charCodeAt(r)===tk){r++,g();const A={};let S=!0;for(;r<t.length&&t.charCodeAt(r)!==cg;){S?S=!1:(c(),g());const D=r,W=s();if(W===void 0){E();return}g(),l();const U=b();if(U===void 0){F();return}Object.prototype.hasOwnProperty.call(A,W)&&!Mu(U,A[W])&&T(W,D+1),A[W]=U}return t.charCodeAt(r)!==cg&&k(),r++,A}}function p(){if(t.charCodeAt(r)===nk){r++,g();const A=[];let S=!0;for(;r<t.length&&t.charCodeAt(r)!==ug;){S?S=!1:c();const D=b();u(D),A.push(D)}return t.charCodeAt(r)!==ug&&C(),r++,A}}function b(){g();const A=s()??a()??d()??p()??h("true",!0)??h("false",!1)??h("null",null);return g(),A}function h(A,S){if(t.slice(r,r+A.length)===A)return r+=A.length,S}function g(){for(;XC(t.charCodeAt(r));)r++}function s(){if(t.charCodeAt(r)===Eu){r++;let A="";for(;r<t.length&&t.charCodeAt(r)!==Eu;){if(t.charCodeAt(r)===ek){const S=t[r+1],D=JC[S];D!==void 0?(A+=D,r++):S==="u"?Rl(t.charCodeAt(r+2))&&Rl(t.charCodeAt(r+3))&&Rl(t.charCodeAt(r+4))&&Rl(t.charCodeAt(r+5))?(A+=String.fromCharCode(Number.parseInt(t.slice(r+2,r+6),16)),r+=5):I(r):R(r)}else ZC(t.charCodeAt(r))?A+=t[r]:L(t[r]);r++}return x(),r++,A}}function a(){const A=r;if(t.charCodeAt(r)===hg&&(r++,w(A)),t.charCodeAt(r)===Iu)r++;else if(QC(t.charCodeAt(r)))for(r++;Ol(t.charCodeAt(r));)r++;if(t.charCodeAt(r)===uk)for(r++,w(A);Ol(t.charCodeAt(r));)r++;if(t.charCodeAt(r)===gk||t.charCodeAt(r)===pk)for(r++,(t.charCodeAt(r)===hg||t.charCodeAt(r)===ak)&&r++,w(A);Ol(t.charCodeAt(r));)r++;if(r>A)return n(t.slice(A,r))}function c(){if(t.charCodeAt(r)!==ck)throw new SyntaxError(`Comma ',' expected after value ${O()}`);r++}function l(){if(t.charCodeAt(r)!==hk)throw new SyntaxError(`Colon ':' expected after property name ${O()}`);r++}function o(A){if(A===void 0)throw new SyntaxError(`JSON value expected ${O()}`)}function u(A){if(A===void 0)throw new SyntaxError(`Array item expected ${O()}`)}function m(){if(r<t.length)throw new SyntaxError(`Expected end of input ${O()}`)}function w(A){if(!Ol(t.charCodeAt(r))){const S=t.slice(A,r);throw new SyntaxError(`Invalid number '${S}', expecting a digit ${O()}`)}}function x(){if(t.charCodeAt(r)!==Eu)throw new SyntaxError(`End of string '"' expected ${O()}`)}function E(){throw new SyntaxError(`Quoted object key expected ${O()}`)}function T(A,S){throw new SyntaxError(`Duplicate key '${A}' encountered at position ${S}`)}function k(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${O()}`)}function C(){throw new SyntaxError(`Array item or end of array ']' expected ${O()}`)}function L(A){throw new SyntaxError(`Invalid character '${A}' ${H()}`)}function R(A){const S=t.slice(A,A+2);throw new SyntaxError(`Invalid escape character '${S}' ${H()}`)}function F(){throw new SyntaxError(`Object value expected after ':' ${H()}`)}function I(A){const S=t.slice(A,A+6);throw new SyntaxError(`Invalid unicode character '${S}' ${H()}`)}function H(){return`at position ${r}`}function P(){return r<t.length?`but got '${t[r]}'`:"but reached end of input"}function O(){return`${P()} ${H()}`}}function XC(t){return t===rk||t===ik||t===ok||t===sk}function Rl(t){return t>=Iu&&t<=Lu||t>=dk&&t<=mk||t>=fk&&t<=vk}function Ol(t){return t>=Iu&&t<=Lu}function QC(t){return t>=lk&&t<=Lu}function ZC(t){return t>=32&&t<=1114111}function Mu(t,e){return t===e?!0:Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&t.every((n,r)=>Mu(n,e[r])):lg(t)&&lg(e)?[...new Set([...Object.keys(t),...Object.keys(e)])].every(n=>Mu(t[n],e[n])):!1}function lg(t){return typeof t=="object"&&t!==null}const JC={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
1397
- `,r:"\r",t:" "},ek=92,tk=123,cg=125,nk=91,ug=93,rk=32,ik=10,ok=9,sk=13,Eu=34,ak=43,hg=45,Iu=48,lk=49,Lu=57,ck=44,uk=46,hk=58,dk=65,fk=97,pk=69,gk=101,mk=70,vk=102;function dg(t,e,n,r){return f(t);function f(h,g){if(Array.isArray(r)){const s=r.find(a=>a.test(h));if(s){const a=s.stringify(h);if(typeof a!="string"||!og(a))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${a})`);return a}}if(typeof h=="boolean"||typeof h=="number"||typeof h=="string"||h===null||h instanceof Date||h instanceof Boolean||h instanceof Number||h instanceof String)return JSON.stringify(h);if(h!=null&&h.isLosslessNumber||typeof h=="bigint")return h.toString();if(Array.isArray(h))return d(h);if(h&&typeof h=="object")return p(h)}function d(h,g){if(h.length===0)return"[]";let s="[";for(let a=0;a<h.length;a++){const c=h[a];typeof c<"u"&&typeof c!="function"?s+=f(c):s+="null",a<h.length-1&&(s+=",")}return s+="]",s}function p(h,g){if(typeof h.toJSON=="function")return dg(h.toJSON(),e,n,void 0);const s=Array.isArray(e)?e.map(String):Object.keys(h);if(s.length===0)return"{}";let a=!0,c="{";for(const l of s){const o=h[l];if(b(l,o)){a?a=!1:c+=",";const u=JSON.stringify(l);c+=`${u}:`,c+=f(o)}}return c+="}",c}function b(h,g){return typeof g<"u"&&typeof g!="function"&&typeof g!="symbol"}}function yk(t){return sg(t)?parseFloat(t):BigInt(t)}class bk{constructor(){vl(this,"id",1)}async exec(e,n,r={},f={},d=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return r.scope=window.openc3Scope,f.manual=!0,(await Cu.post("/openc3-api/api",{jsonrpc:"2.0",method:e,params:n,id:this.id,keyword_params:r},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...f},timeout:d,transformRequest:[(p,b)=>dg(p)],transformResponse:[p=>YC(p,void 0,yk)]})).data.result}catch(p){let b=new Error;throw p.response?(b.name=p.response.data.error.data.class,b.message=p.response.data.error.data.message,b.object=p.response.data.error):p.request?(b.name="Request error",b.message="Request error, no response received"):b.name="Unknown error",b}}decode_openc3_type(e){if(e!==null&&typeof e=="object"&&e.json_class=="Float"&&e.raw){if(e.raw=="NaN")return NaN;if(e.raw=="Infinity")return 1/0;if(e.raw=="-Infinity")return-1/0}return null}encode_openc3_type(e){return Number.isNaN(e)?{json_class:"Float",raw:"NaN"}:e==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:e==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(e=>{e&&(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(e){return this.exec("set_offline_access",[e])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(e,n){return this.exec("map_target_to_interface",[e,n])}connect_interface(e,...n){return n.length>0?this.exec("connect_interface",[e,...n]):this.exec("connect_interface",[e])}disconnect_interface(e){return this.exec("disconnect_interface",[e])}interface_cmd(e,n,...r){return this.exec("interface_cmd",[e,n,...r])}get_all_router_info(){return this.exec("get_all_router_info",[])}connect_router(e){return this.exec("connect_router",[e])}disconnect_router(e){return this.exec("disconnect_router",[e])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(e){return this.exec("get_tlm_cnts",[e])}get_item(e,n,r){return this.exec("get_item",[e,n,r])}get_param(e,n,r){return this.exec("get_param",[e,n,r])}get_parameter(e,n,r){return this.exec("get_param",[e,n,r])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(e){return this.exec("set_limits_set",[e])}get_target(e){return this.exec("get_target",[e])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(e,n){return this.exec("get_tlm",[e,n])}get_telemetry(e,n){return this.exec("get_tlm",[e,n])}get_all_tlm(e){return this.exec("get_all_tlm",[e])}get_all_telemetry(e){return this.exec("get_all_tlm",[e])}get_all_tlm_names(e,n=!1){return this.exec("get_all_tlm_names",[e],{hidden:n})}get_all_telemetry_names(e){return this.exec("get_all_tlm_names",[e])}get_all_tlm_item_names(e){return this.exec("get_all_tlm_item_names",[e])}async get_tlm_packet(e,n,r,f=30){const d=await this.exec("get_tlm_packet",[e,n],{type:r,stale_time:f});if(d!=null){let p=d.length,b=null;for(let h=0;h<p;h++)b=this.decode_openc3_type(d[h][1]),b!==null&&(d[h][1]=b)}return d}get_packet_derived_items(e,n){return this.exec("get_packet_derived_items",[e,n])}get_tlm_buffer(e,n){return this.exec("get_tlm_buffer",[e,n])}async get_tlm_values(e,n=30,r=null){let f={stale_time:n};r!==null&&(f.cache_timeout=r);const d=await this.exec("get_tlm_values",[e],f,{},1e4);let p=d[0].length,b=null;for(let h=0;h<p;h++)b=this.decode_openc3_type(d[0][h]),b!==null&&(d[0][h]=b);return d}get_limits(e,n,r){return this.exec("get_limits",[e,n,r])}async tlm(e,n,r,f="CONVERTED"){let d=null;if(n===void 0)d=await this.exec("tlm",[e]);else if(r===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(n))d=await this.exec("tlm",[e],{type:n});else{let b=new Error;throw b.name="TypeError",b.message=`Invalid data type ${n}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,b}else d=await this.exec("tlm",[e,n,r],{type:f});let p=this.decode_openc3_type(d);return p!==null&&(d=p),d}async inject_tlm(e,n,r=null,f="CONVERTED"){await this.exec("inject_tlm",[e,n,r],{type:f})}set_tlm(e,n,r,f){return this.exec("set_tlm",[e,n,r],{type:f})}override_tlm(e,n,r,f){return this.exec("override_tlm",[e,n,r],{type:f})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(e,n,r,f){return this.exec("normalize_tlm",[e,n,r],{type:f})}get_all_cmds(e){return this.exec("get_all_cmds",[e])}get_all_commands(e){return this.exec("get_all_cmds",[e])}get_all_cmd_names(e,n=!1){return this.exec("get_all_cmd_names",[e],{hidden:n})}get_all_command_names(e){return this.exec("get_all_cmd_names",[e])}get_cmd(e,n){return this.exec("get_cmd",[e,n])}get_command(e,n){return this.exec("get_cmd",[e,n])}get_cmd_cnts(e){return this.exec("get_cmd_cnts",[e])}get_cmd_value(e,n,r,f="CONVERTED"){return this.exec("get_cmd_value",[e,n,r,f])}get_cmd_buffer(e,n){return this.exec("get_cmd_buffer",[e,n])}_cmd(e,n,r,f,d){let p=null;for(let b in f)Object.prototype.hasOwnProperty.call(f,b)&&(p=this.encode_openc3_type(f[b]),p!==null&&(f[b]=p));return this.exec(e,[n,r,f],{},d)}get_cmd_hazardous(e,n,r,f={}){return n===void 0?this.exec("get_cmd_hazardous",e,{},f):this._cmd("get_cmd_hazardous",e,n,r,f)}cmd(e,n,r,f={}){return n===void 0?this.exec("cmd",e,{},f):this._cmd("cmd",e,n,r,f)}cmd_no_range_check(e,n,r,f={}){return n===void 0?this.exec("cmd_no_range_check",e,{},f):this._cmd("cmd_no_range_check",e,n,r,f)}cmd_raw(e,n,r,f={}){return n===void 0?this.exec("cmd_raw",e,{},f):this._cmd("cmd_raw",e,n,r,f)}cmd_raw_no_range_check(e,n,r,f={}){return n===void 0?this.exec("cmd_raw_no_range_check",e,{},f):this._cmd("cmd_raw_no_range_check",e,n,r,f)}cmd_no_hazardous_check(e,n,r,f={}){return n===void 0?this.exec("cmd_no_hazardous_check",e,{},f):this._cmd("cmd_no_hazardous_check",e,n,r,f)}cmd_no_checks(e,n,r,f={}){return n===void 0?this.exec("cmd_no_checks",e,{},f):this._cmd("cmd_no_checks",e,n,r,f)}cmd_raw_no_hazardous_check(e,n,r,f={}){return n===void 0?this.exec("cmd_raw_no_hazardous_check",e,{},f):this._cmd("cmd_raw_no_hazardous_check",e,n,r,f)}cmd_raw_no_checks(e,n,r,f={}){return n===void 0?this.exec("cmd_raw_no_checks",e,{},f):this._cmd("cmd_raw_no_checks",e,n,r,f)}build_cmd(e,n,r){return n===void 0?this.exec("build_cmd",e):this._cmd("build_cmd",e,n,r)}build_command(e,n,r){return n===void 0?this.exec("build_cmd",e):this._cmd("build_cmd",e,n,r)}get_interface_names(){return this.exec("get_interface_names",[])}send_raw(e,n){return this.exec("send_raw",[e,n])}list_configs(e){return this.exec("list_configs",[e])}load_config(e,n){return this.exec("load_config",[e,n])}save_config(e,n,r){return this.exec("save_config",[e,n,r])}delete_config(e,n){return this.exec("delete_config",[e,n])}enable_limits(e,n,r){return this.exec("enable_limits",[e,n,r])}disable_limits(e,n,r){return this.exec("disable_limits",[e,n,r])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(e){return this.exec("get_overall_limits_state",[e])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(e){return this.exec("get_setting",[e])}get_settings(e){return this.exec("get_settings",e)}set_setting(e,n){return this.exec("set_setting",[e,n])}update_news(){return this.exec("update_news",[])}save_setting(e,n){return this.exec("set_setting",[e,n])}get_metrics(){return this.exec("get_metrics",[])}async hashString(e){if(window.isSecureContext){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",n),f=new Uint8Array(r);return Array.from(f).map(d=>d.toString(16).padStart(2,"0")).join("")}}}sr("B",bk);var fg={exports:{}},pg;function wk(){return pg||(pg=1,function(t,e){ace.define("ace/ext/hardwrap",["require","exports","module","ace/range","ace/editor","ace/config"],function(n,r,f){function d(g,s){function a(F,I,H){if(!(F.length<I)){var P=F.slice(0,I),O=F.slice(I),A=/^(?:(\s+)|(\S+)(\s+))/.exec(O),S=/(?:(\s+)|(\s+)(\S+))$/.exec(P),D=0,W=0;if(S&&!S[2]&&(D=I-S[1].length,W=I),A&&!A[2]&&(D||(D=I),W=I+A[1].length),D)return{start:D,end:W};if(S&&S[2]&&S.index>H)return{start:S.index,end:S.index+S[2].length};if(A&&A[2])return D=I+A[2].length,{start:D,end:D+A[3].length}}}for(var c=s.column||g.getOption("printMarginColumn"),l=s.allowMerge!=0,o=Math.min(s.startRow,s.endRow),u=Math.max(s.startRow,s.endRow),m=g.session;o<=u;){var w=m.getLine(o);if(w.length>c){var x=a(w,c,5);if(x){var E=/^\s*/.exec(w)[0];m.replace(new b(o,x.start,o,x.end),`
1398
- `+E)}u++}else if(l&&/\S/.test(w)&&o!=u){var T=m.getLine(o+1);if(T&&/\S/.test(T)){var k=w.replace(/\s+$/,""),C=T.replace(/^\s+/,""),L=k+" "+C,x=a(L,c,5);if(x&&x.start>k.length||L.length<c){var R=new b(o,k.length,o+1,T.length-C.length);m.replace(R," "),o--,u--}else k.length<w.length&&m.remove(new b(o,k.length,o,w.length))}}o++}}function p(g){if(g.command.name=="insertstring"&&/\S/.test(g.args)){var s=g.editor,a=s.selection.cursor;if(a.column<=s.renderer.$printMarginColumn)return;var c=s.session.$undoManager.$lastDelta;d(s,{startRow:a.row,endRow:a.row,allowMerge:!1}),c!=s.session.$undoManager.$lastDelta&&s.session.markUndoGroup()}}var b=n("../range").Range,h=n("../editor").Editor;n("../config").defineOptions(h.prototype,"editor",{hardWrap:{set:function(g){g?this.commands.on("afterExec",p):this.commands.off("afterExec",p)},value:!1}}),r.hardWrap=d}),ace.define("ace/keyboard/vim",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/dom","ace/lib/oop","ace/lib/keys","ace/lib/event","ace/search","ace/lib/useragent","ace/search_highlight","ace/commands/multi_select_commands","ace/mode/text","ace/ext/hardwrap","ace/multi_select"],function(n,r,f){function d(y){return{row:y.line,column:y.ch}}function p(y){return new De(y.row,y.column)}function b(y,$,_){if($.line===_.line&&$.ch>=_.ch-1){var N=y.getLine($.line),B=N.charCodeAt($.ch);55296<=B&&B<=55551&&(_.ch+=1)}return{start:$,end:_}}function h(y){y.setOption("disableInput",!0),y.setOption("showCursorWhenSelecting",!1),je.signal(y,"vim-mode-change",{mode:"normal"}),y.on("cursorActivity",Vo),L(y),je.on(y.getInputField(),"paste",s(y))}function g(y){y.setOption("disableInput",!1),y.off("cursorActivity",Vo),je.off(y.getInputField(),"paste",s(y)),y.state.vim=null,gr&&clearTimeout(gr)}function s(y){var $=y.state.vim;return $.onPasteFn||($.onPasteFn=function(){$.insertMode||(y.setCursor(ge(y.getCursor(),0,1)),zn.enterInsertMode(y,{},$))}),$.onPasteFn}function a(y,$){return $>=y.firstLine()&&$<=y.lastLine()}function c(y){return/^[a-z]$/.test(y)}function l(y){return"()[]{}".indexOf(y)!=-1}function o(y){return pa.test(y)}function u(y){return ln.test(y)}function m(y){return/^\s*$/.test(y)}function w(y){return".?!".indexOf(y)!=-1}function x(y,$){for(var _=0;_<$.length;_++)if($[_]==y)return!0;return!1}function E(y,$,_,N,B){if($===void 0&&!B)throw Error("defaultValue is required unless callback is provided");if(_||(_="string"),Gt[y]={type:_,defaultValue:$,callback:B},N)for(var j=0;j<N.length;j++)Gt[N[j]]=Gt[y];$&&T(y,$)}function T(y,$,_,N){var B=Gt[y];N=N||{};var j=N.scope;if(!B)return new Error("Unknown option: "+y);if(B.type=="boolean"){if($&&$!==!0)return new Error("Invalid argument: "+y+"="+$);$!==!1&&($=!0)}B.callback?(j!=="local"&&B.callback($,void 0),j!=="global"&&_&&B.callback($,_)):(j!=="local"&&(B.value=B.type=="boolean"?!!$:$),j!=="global"&&_&&(_.state.vim.options[y]={value:$}))}function k(y,$,_){var N=Gt[y];_=_||{};var B=_.scope;if(!N)return new Error("Unknown option: "+y);if(N.callback){var j=$&&N.callback(void 0,$);return B!=="global"&&j!==void 0?j:B!=="local"?N.callback():void 0}var j=B!=="global"&&$&&$.state.vim.options[y];return(j||B!=="local"&&N||{}).value}function C(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=Wn()}function L(y){return y.state.vim||(y.state.vim={inputState:new A,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}),y.state.vim}function R(){He={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:ki(),macroModeState:new C,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new K({}),searchHistoryController:new Z,exCommandHistoryController:new Z};for(var y in Gt){var $=Gt[y];$.value=$.defaultValue}}function F(y){function $(Y){typeof Y=="string"?An.value=Y:An=null}if(y[0]=="<"){var _=y.toLowerCase().slice(1,-1),N=_.split("-");if(_=N.pop()||"",_=="lt")y="<";else if(_=="space")y=" ";else if(_=="cr")y=`
1399
- `;else if(_i[_]){var B=An.value,j={key:_i[_],target:{value:B,selectionEnd:B.length,selectionStart:B.length}};An.onKeyDown&&An.onKeyDown(j,An.value,$),An&&An.onKeyUp&&An.onKeyUp(j,An.value,$);return}}if(y==`
1400
- `){var q=An;An=null,q.onClose&&q.onClose(q.value)}else An.value=(An.value||"")+y}function I(y,$,_){var N=fn;if(_){if(Pr.indexOf(_)!=-1)return;Pr.push(_),fn=_.noremap!=0}try{for(var B=L(y),j=/<(?:[CSMA]-)*\w+>|./gi,q;q=j.exec($);){var Y=q[0],Q=B.insertMode;if(An){F(Y);continue}var re=_t.handleKey(y,Y,"mapping");if(!re&&Q&&B.insertMode){if(Y[0]=="<"){var se=Y.toLowerCase().slice(1,-1),ye=se.split("-");if(se=ye.pop()||"",se=="lt")Y="<";else if(se=="space")Y=" ";else if(se=="cr")Y=`
1401
- `;else{if(_i.hasOwnProperty(se)){Y=_i[se],Ko(y,Y);continue}Y=Y[0],j.lastIndex=q.index+1}}y.replaceSelection(Y)}}}finally{if(Pr.pop(),fn=Pr.length?N:!1,!Pr.length&&An){var Ce=An;An=null,Ir(y,Ce)}}}function H(y,$){var _=y.key;if(!Br[_]){_.length>1&&_[0]=="n"&&(_=_.replace("Numpad","")),_=rr[_]||_;var N="";if(y.ctrlKey&&(N+="C-"),y.altKey&&(N+="A-"),y.metaKey&&(N+="M-"),je.isMac&&y.altKey&&!y.metaKey&&!y.ctrlKey&&(N=N.slice(2)),(N||_.length>1)&&y.shiftKey&&(N+="S-"),$&&!$.expectLiteralNext&&_.length==1){if(Qn.keymap&&_ in Qn.keymap)(Qn.remapCtrl!=0||!N)&&(_=Qn.keymap[_]);else if(_.charCodeAt(0)>255){var B=y.code&&y.code.slice(-1)||"";y.shiftKey||(B=B.toLowerCase()),B&&(_=B)}}return N+=_,N.length>1&&(N="<"+N+">"),N}}function P(y,$){Qn.string!==y&&(Qn=O(y)),Qn.remapCtrl=$}function O(y){function $(N){return N.split(/\\?(.)/).filter(Boolean)}var _={};return y?(y.split(/((?:[^\\,]|\\.)+),/).map(function(N){if(N){var B=N.split(/((?:[^\\;]|\\.)+);/);if(B.length==3){var j=$(B[1]),q=$(B[2]);if(j.length!==q.length)return;for(var Y=0;Y<j.length;++Y)_[j[Y]]=q[Y]}else if(B.length==1){var Q=$(N);if(Q.length%2!==0)return;for(var Y=0;Y<Q.length;Y+=2)_[Q[Y]]=Q[Y+1]}}}),{keymap:_,string:y}):{keymap:_,string:""}}function A(){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 S(y,$){y.state.vim.inputState=new A,y.state.vim.expectLiteralNext=!1,je.signal(y,"vim-command-done",$)}function D(){this.removed=[],this.inserted=""}function W(y,$,_){this.clear(),this.keyBuffer=[y||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!$,this.blockwise=!!_}function U(y,$){var _=He.registerController.registers;if(!y||y.length!=1)throw Error("Register name must be 1 character");_[y]=$,an.push(y)}function K(y){this.registers=y,this.unnamedRegister=y['"']=new W,y["."]=new W,y[":"]=new W,y["/"]=new W,y["+"]=new W}function Z(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}function te(y,$){Zr[y]=$}function he(y,$){for(var _=[],N=0;N<$;N++)_.push(y);return _}function ne(y,$){Qo[y]=$}function ae(y,$){zn[y]=$}function ue(y,$,_){var N=y.state.vim,B=N.insertMode||N.visualMode,j=Math.min(Math.max(y.firstLine(),$.line),y.lastLine()),q=y.getLine(j),Y=q.length-1+ +!!B,Q=Math.min(Math.max(0,$.ch),Y),re=q.charCodeAt(Q);if(56320<=re&&re<=57343){var se=1;_&&_.line==j&&_.ch>Q&&(se=-1),Q+=se,Q>Y&&(Q-=2)}return new De(j,Q)}function ce(y){var $={};for(var _ in y)y.hasOwnProperty(_)&&($[_]=y[_]);return $}function ge(y,$,_){return typeof $=="object"&&(_=$.ch,$=$.line),new De(y.line+$,y.ch+_)}function Te(y,$,_,N){N.operator&&(_="operatorPending");for(var B,j=[],q=[],Y=fn?$.length-Co:0,Q=Y;Q<$.length;Q++){var re=$[Q];_=="insert"&&re.context!="insert"||re.context&&re.context!=_||N.operator&&re.type=="action"||!(B=$e(y,re.keys))||(B=="partial"&&j.push(re),B=="full"&&q.push(re))}return{partial:j.length&&j,full:q.length&&q}}function $e(y,$){var _=$.slice(-11)=="<character>",N=$.slice(-10)=="<register>";if(_||N){var B=$.length-(_?11:10),j=y.slice(0,B),q=$.slice(0,B);return j==q&&y.length>B?"full":q.indexOf(j)==0?"partial":!1}return y==$?"full":$.indexOf(y)==0?"partial":!1}function Ee(y){var $=/^.*(<[^>]+>)$/.exec(y),_=$?$[1]:y.slice(-1);if(_.length>1)switch(_){case"<CR>":_=`
1402
- `;break;case"<Space>":_=" ";break;default:_=""}return _}function Ze(y,$,_){return function(){for(var N=0;N<_;N++)$(y)}}function Xe(y){return new De(y.line,y.ch)}function gt(y,$){return y.ch==$.ch&&y.line==$.line}function at(y,$){return y.line<$.line?!0:y.line==$.line&&y.ch<$.ch}function mt(y,$){return arguments.length>2&&($=mt.apply(void 0,Array.prototype.slice.call(arguments,1))),at(y,$)?y:$}function sn(y,$){return arguments.length>2&&($=sn.apply(void 0,Array.prototype.slice.call(arguments,1))),at(y,$)?$:y}function bn(y,$,_){var N=at(y,$),B=at($,_);return N&&B}function Jt(y,$){return y.getLine($).length}function wr(y){return y.trim?y.trim():y.replace(/^\s+|\s+$/g,"")}function wn(y){return y.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function Fn(y,$,_){var N=Jt(y,$),B=new Array(_-N+1).join(" ");y.setCursor(new De($,N)),y.replaceRange(B,y.getCursor())}function Pn(y,$){var _=[],N=y.listSelections(),B=Xe(y.clipPos($)),j=!gt($,B),q=y.getCursor("head"),Y=Ct(N,q),Q=gt(N[Y].head,N[Y].anchor),re=N.length-1,se=re-Y>Y?re:0,ye=N[se].anchor,Ce=Math.min(ye.line,B.line),me=Math.max(ye.line,B.line),be=ye.ch,Oe=B.ch,Re=N[se].head.ch-be,Ge=Oe-be;Re>0&&Ge<=0?(be++,j||Oe--):Re<0&&Ge>=0?(be--,Q||Oe++):Re<0&&Ge==-1&&(be--,Oe++);for(var ht=Ce;ht<=me;ht++){var tt={anchor:new De(ht,be),head:new De(ht,Oe)};_.push(tt)}return y.setSelections(_),$.ch=Oe,ye.ch=be,ye}function nr(y,$,_){for(var N=[],B=0;B<_;B++){var j=ge($,B,0);N.push({anchor:j,head:j})}y.setSelections(N,0)}function Ct(y,$,_){for(var N=0;N<y.length;N++){var B=gt(y[N].anchor,$),j=gt(y[N].head,$);if(B||j)return N}return-1}function Ke(y,$){var _=$.lastSelection,N=function(){var j=y.listSelections(),q=j[0],Y=j[j.length-1],Q=at(q.anchor,q.head)?q.anchor:q.head,re=at(Y.anchor,Y.head)?Y.head:Y.anchor;return[Q,re]},B=function(){var j=y.getCursor(),q=y.getCursor(),Y=_.visualBlock;if(Y){var Q=Y.width,re=Y.height;q=new De(j.line+re,j.ch+Q);for(var se=[],ye=j.line;ye<q.line;ye++){var Ce=new De(ye,j.ch),me=new De(ye,q.ch),be={anchor:Ce,head:me};se.push(be)}y.setSelections(se)}else{var Oe=_.anchorMark.find(),Re=_.headMark.find(),Ge=Re.line-Oe.line,ht=Re.ch-Oe.ch;q={line:q.line+Ge,ch:Ge?q.ch:ht+q.ch},_.visualLine&&(j=new De(j.line,0),q=new De(q.line,Jt(y,q.line))),y.setSelection(j,q)}return[j,q]};return $.visualMode?N():B()}function ke(y,$){var _=$.sel.anchor,N=$.sel.head;$.lastPastedText&&(N=y.posFromIndex(y.indexFromPos(_)+$.lastPastedText.length),$.lastPastedText=null),$.lastSelection={anchorMark:y.setBookmark(_),headMark:y.setBookmark(N),anchor:Xe(_),head:Xe(N),visualMode:$.visualMode,visualLine:$.visualLine,visualBlock:$.visualBlock}}function Ve(y,$,_,N){var B=y.state.vim.sel,j=N?$:B.head,q=N?$:B.anchor,Y;return at(_,$)&&(Y=_,_=$,$=Y),at(j,q)?(j=mt($,j),q=sn(q,_)):(q=mt($,q),j=sn(j,_),j=ge(j,0,-1),j.ch==-1&&j.line!=y.firstLine()&&(j=new De(j.line-1,Jt(y,j.line-1)))),[q,j]}function Je(y,$,B){var N=y.state.vim;$=$||N.sel;var B=B||N.visualLine?"line":N.visualBlock?"block":"char",j=vt(y,$,B);y.setSelections(j.ranges,j.primary)}function vt(y,$,_,N){var B=Xe($.head),j=Xe($.anchor);if(_=="char"){var q=!N&&!at($.head,$.anchor)?1:0,Y=at($.head,$.anchor)?1:0;return B=ge($.head,0,q),j=ge($.anchor,0,Y),{ranges:[{anchor:j,head:B}],primary:0}}if(_=="line"){if(at($.head,$.anchor))B.ch=0,j.ch=Jt(y,j.line);else{j.ch=0;var Q=y.lastLine();B.line>Q&&(B.line=Q),B.ch=Jt(y,B.line)}return{ranges:[{anchor:j,head:B}],primary:0}}if(_=="block"){var re=Math.min(j.line,B.line),se=j.ch,ye=Math.max(j.line,B.line),Ce=B.ch;se<Ce?Ce+=1:se+=1;for(var me=ye-re+1,be=B.line==re?0:me-1,Oe=[],Re=0;Re<me;Re++)Oe.push({anchor:new De(re+Re,se),head:new De(re+Re,Ce)});return{ranges:Oe,primary:be}}}function Tt(y){var $=y.getCursor("head");return y.getSelection().length==1&&($=mt($,y.getCursor("anchor"))),$}function At(y,$){var _=y.state.vim;$!==!1&&y.setCursor(ue(y,_.sel.head)),ke(y,_),_.visualMode=!1,_.visualLine=!1,_.visualBlock=!1,_.insertMode||je.signal(y,"vim-mode-change",{mode:"normal"})}function Pt(y,$,_){var N=y.getRange($,_);if(/\n\s*$/.test(N)){var B=N.split(`
1403
- `);B.pop();for(var j,j=B.pop();B.length>0&&j&&m(j);j=B.pop())_.line--,_.ch=0;j?(_.line--,_.ch=Jt(y,_.line)):_.ch=0}}function Nt(y,$,_){$.ch=0,_.ch=0,_.line++}function pt(y){if(!y)return 0;var $=y.search(/\S/);return $==-1?y.length:$}function kt(y,$,_){var N=$.inclusive,B=$.innerWord,j=$.bigWord,q=$.noSymbol,Y=$.multiline,Q=_||Tt(y),re=y.getLine(Q.line),se=re,ye=Q.line,Ce=ye,me=Q.ch,be,Oe=q?ko[0]:Ci[0];if(B&&/\s/.test(re.charAt(me)))Oe=function(kn){return/\s/.test(kn)};else{for(;!Oe(re.charAt(me));)if(me++,me>=re.length){if(!Y)return null;me--,be=po(y,Q,!0,j,!0);break}j?Oe=Ci[0]:(Oe=ko[0],Oe(re.charAt(me))||(Oe=ko[1]))}for(var Re=me,Ge=me;Oe(re.charAt(Ge))&&Ge>=0;)Ge--;if(Ge++,be)Re=be.to,Ce=be.line,se=y.getLine(Ce),!se&&Re==0&&Re++;else for(;Oe(re.charAt(Re))&&Re<re.length;)Re++;if(N){var ht=Re,tt=Q.ch<=Ge&&/\s/.test(re.charAt(Q.ch));if(!tt)for(;/\s/.test(se.charAt(Re))&&Re<se.length;)Re++;if(ht==Re||tt){for(var st=Ge;/\s/.test(re.charAt(Ge-1))&&Ge>0;)Ge--;!Ge&&!tt&&(Ge=st)}}return{start:new De(ye,Ge),end:new De(Ce,Re)}}function $n(y,$,_){var N=$;if(!je.findMatchingTag||!je.findEnclosingTag)return{start:N,end:N};var B=je.findMatchingTag(y,$)||je.findEnclosingTag(y,$);return!B||!B.open||!B.close?{start:N,end:N}:_?{start:B.open.from,end:B.close.to}:{start:B.open.to,end:B.close.from}}function $r(y,$,_){gt($,_)||He.jumpList.add(y,$,_)}function Yr(y,$){He.lastCharacterSearch.increment=y,He.lastCharacterSearch.forward=$.forward,He.lastCharacterSearch.selectedCharacter=$.selectedCharacter}function Wi(y,$,_,N){var B=Xe(y.getCursor()),j=_?1:-1,q=_?y.lineCount():-1,Y=B.ch,Q=B.line,re=y.getLine(Q),se={lineText:re,nextCh:re.charAt(Y),lastCh:null,index:Y,symb:N,reverseSymb:(_?{")":"(","}":"{"}:{"(":")","{":"}"})[N],forward:_,depth:0,curMoveThrough:!1},ye=ci[N];if(!ye)return B;var Ce=ui[ye].init,me=ui[ye].isComplete;for(Ce&&Ce(se);Q!==q&&$;){if(se.index+=j,se.nextCh=se.lineText.charAt(se.index),!se.nextCh){if(Q+=j,se.lineText=y.getLine(Q)||"",j>0)se.index=0;else{var be=se.lineText.length;se.index=be>0?be-1:0}se.nextCh=se.lineText.charAt(se.index)}me(se)&&(B.line=Q,B.ch=se.index,$--)}return se.nextCh||se.curMoveThrough?new De(Q,se.index):B}function po(y,$,_,N,B){var j=$.line,q=$.ch,Y=y.getLine(j),Q=_?1:-1,re=N?Ci:ko;if(B&&Y==""){if(j+=Q,Y=y.getLine(j),!a(y,j))return null;q=_?0:Y.length}for(;;){if(B&&Y=="")return{from:0,to:0,line:j};for(var se=Q>0?Y.length:-1,ye=se,Ce=se;q!=se;){for(var me=!1,be=0;be<re.length&&!me;++be)if(re[be](Y.charAt(q))){for(ye=q;q!=se&&re[be](Y.charAt(q));)q+=Q;if(Ce=q,me=ye!=Ce,ye==$.ch&&j==$.line&&Ce==ye+Q)continue;return{from:Math.min(ye,Ce+1),to:Math.max(ye,Ce),line:j}}me||(q+=Q)}if(j+=Q,!a(y,j))return null;Y=y.getLine(j),q=Q>0?0:Y.length}}function xr(y,$,_,N,B,j){var q=Xe($),Y=[];(N&&!B||!N&&B)&&_++;for(var Q=!N||!B,re=0;re<_;re++){var se=po(y,$,N,j,Q);if(!se){var ye=Jt(y,y.lastLine());Y.push(N?{line:y.lastLine(),from:ye,to:ye}:{line:0,from:0,to:0});break}Y.push(se),$=new De(se.line,N?se.to-1:se.from)}var Ce=Y.length!=_,me=Y[0],be=Y.pop();return N&&!B?(!Ce&&(me.from!=q.ch||me.line!=q.line)&&(be=Y.pop()),new De(be.line,be.from)):N&&B?new De(be.line,be.to-1):!N&&B?(!Ce&&(me.to!=q.ch||me.line!=q.line)&&(be=Y.pop()),new De(be.line,be.to)):new De(be.line,be.from)}function go(y,$,_,N,B){var j=$,q=new De(j.line+_.repeat-1,1/0),Y=y.clipPos(q);return Y.ch--,B||(N.lastHPos=1/0,N.lastHSPos=y.charCoords(Y,"div").left),q}function Wo(y,$,_,N,B){for(var j=B||y.getCursor(),q=j.ch,Y,Q=0;Q<$;Q++){var re=y.getLine(j.line);if(Y=Ya(q,re,N,_),Y==-1)return null;q=Y}return new De(y.getCursor().line,Y)}function Ga(y,$){var _=y.getCursor().line;return ue(y,new De(_,$-1))}function si(y,$,_,N){!x(_,ao)&&!nn.test(_)||($.marks[_]&&$.marks[_].clear(),$.marks[_]=y.setBookmark(N))}function Ya(y,$,_,N,B){var j;return N?(j=$.indexOf(_,y+1),j!=-1):(j=$.lastIndexOf(_,y-1),j!=-1),j}function ks(y,$,_,N,B){function j(Ge){return!/\S/.test(y.getLine(Ge))}function q(Ge,ht,tt){return tt?j(Ge)!=j(Ge+ht):!j(Ge)&&j(Ge+ht)}function Y(Ge){N=N>0?1:-1;var ht=y.ace.session.getFoldLine(Ge);ht&&Ge+N>ht.start.row&&Ge+N<ht.end.row&&(N=(N>0?ht.end.row:ht.start.row)-Ge)}var Q=$.line,re=y.firstLine(),se=y.lastLine(),ye,Ce,me=Q;if(N){for(;re<=me&&me<=se&&_>0;)Y(me),q(me,N)&&_--,me+=N;return new De(me,0)}var be=y.state.vim;if(be.visualLine&&q(Q,1,!0)){var Oe=be.sel.anchor;q(Oe.line,-1,!0)&&(!B||Oe.line!=Q)&&(Q+=1)}var Re=j(Q);for(me=Q;me<=se&&_;me++)q(me,1,!0)&&(!B||j(me)!=Re)&&_--;for(Ce=new De(me,0),me>se&&!Re?Re=!0:B=!1,me=Q;me>re&&!((!B||j(me)==Re||me==Q)&&q(me,-1,!0));me--);return ye=new De(me,0),{start:ye,end:Ce}}function aa(y,$,_,N,B){function j(re){re.pos+re.dir<0||re.pos+re.dir>=re.line.length?re.line=null:re.pos+=re.dir}function q(re,se,ye,Ce){var me=re.getLine(se),be={line:me,ln:se,pos:ye,dir:Ce};if(be.line==="")return{ln:be.ln,pos:be.pos};var Oe=be.pos;for(j(be);be.line!==null;){if(Oe=be.pos,w(be.line[be.pos])){if(!B)return{ln:be.ln,pos:be.pos+1};for(j(be);be.line!==null&&m(be.line[be.pos]);)Oe=be.pos,j(be);return{ln:be.ln,pos:Oe+1}}j(be)}return{ln:be.ln,pos:Oe+1}}function Y(re,se,ye,Ce){var me=re.getLine(se),be={line:me,ln:se,pos:ye,dir:Ce};if(be.line==="")return{ln:be.ln,pos:be.pos};var Oe=be.pos;for(j(be);be.line!==null;){if(!m(be.line[be.pos])&&!w(be.line[be.pos]))Oe=be.pos;else if(w(be.line[be.pos]))return B?m(be.line[be.pos+1])?{ln:be.ln,pos:be.pos+1}:{ln:be.ln,pos:Oe}:{ln:be.ln,pos:Oe};j(be)}return be.line=me,B&&m(be.line[be.pos])?{ln:be.ln,pos:be.pos}:{ln:be.ln,pos:Oe}}for(var Q={ln:$.line,pos:$.ch};_>0;)N<0?Q=Y(y,Q.ln,Q.pos,N):Q=q(y,Q.ln,Q.pos,N),_--;return new De(Q.ln,Q.pos)}function ji(y,$,_,N){function B(Q,re){if(re.pos+re.dir<0||re.pos+re.dir>=re.line.length){if(re.ln+=re.dir,!a(Q,re.ln)){re.line=null,re.ln=null,re.pos=null;return}re.line=Q.getLine(re.ln),re.pos=re.dir>0?0:re.line.length-1}else re.pos+=re.dir}function j(Q,re,se,ye){var Re=Q.getLine(re),Ce=Re==="",me={line:Re,ln:re,pos:se,dir:ye},be={ln:me.ln,pos:me.pos},Oe=me.line==="";for(B(Q,me);me.line!==null;){if(be.ln=me.ln,be.pos=me.pos,me.line===""&&!Oe)return{ln:me.ln,pos:me.pos};if(Ce&&me.line!==""&&!m(me.line[me.pos]))return{ln:me.ln,pos:me.pos};w(me.line[me.pos])&&!Ce&&(me.pos===me.line.length-1||m(me.line[me.pos+1]))&&(Ce=!0),B(Q,me)}var Re=Q.getLine(be.ln);be.pos=0;for(var Ge=Re.length-1;Ge>=0;--Ge)if(!m(Re[Ge])){be.pos=Ge;break}return be}function q(Q,re,se,ye){var Oe=Q.getLine(re),Ce={line:Oe,ln:re,pos:se,dir:ye},me={ln:Ce.ln,pos:null},be=Ce.line==="";for(B(Q,Ce);Ce.line!==null;){if(Ce.line===""&&!be)return me.pos!==null?me:{ln:Ce.ln,pos:Ce.pos};if(!(!w(Ce.line[Ce.pos])||me.pos===null||Ce.ln===me.ln&&Ce.pos+1===me.pos))return me;Ce.line!==""&&!m(Ce.line[Ce.pos])&&(be=!1,me={ln:Ce.ln,pos:Ce.pos}),B(Q,Ce)}var Oe=Q.getLine(me.ln);me.pos=0;for(var Re=0;Re<Oe.length;++Re)if(!m(Oe[Re])){me.pos=Re;break}return me}for(var Y={ln:$.line,pos:$.ch};_>0;)N<0?Y=q(y,Y.ln,Y.pos,N):Y=j(y,Y.ln,Y.pos,N),_--;return new De(Y.ln,Y.pos)}function Yn(y,$,_,N){var B=$,j,q,Y={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[_],Q={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[_],re=y.getLine(B.line).charAt(B.ch),se=re===Q?1:0;if(j=y.scanForBracket(new De(B.line,B.ch+se),-1,void 0,{bracketRegex:Y}),q=y.scanForBracket(new De(B.line,B.ch+se),1,void 0,{bracketRegex:Y}),!j||!q)return null;if(j=j.pos,q=q.pos,j.line==q.line&&j.ch>q.ch||j.line>q.line){var ye=j;j=q,q=ye}return N?q.ch+=1:j.ch+=1,{start:j,end:q}}function Mr(y,$,_,N){var B=Xe($),j=y.getLine(B.line),q=j.split(""),Y,Q,re,se,ye=q.indexOf(_);if(B.ch<ye)B.ch=ye;else if(ye<B.ch&&q[B.ch]==_){var Ce=/string/.test(y.getTokenTypeAt(ge($,0,1))),me=/string/.test(y.getTokenTypeAt($)),be=Ce&&!me;be||(Q=B.ch,--B.ch)}if(q[B.ch]==_&&!Q)Y=B.ch+1;else for(re=B.ch;re>-1&&!Y;re--)q[re]==_&&(Y=re+1);if(Y&&!Q)for(re=Y,se=q.length;re<se&&!Q;re++)q[re]==_&&(Q=re);return!Y||!Q?{start:B,end:B}:(N&&(--Y,++Q),{start:new De(B.line,Y),end:new De(B.line,Q)})}function zi(){}function Rn(y){var $=y.state.vim;return $.searchState_||($.searchState_=new zi)}function Er(y){return Hi(y,"/")}function no(y){return _s(y,"/")}function Hi(y,$){var _=_s(y,$)||[];if(!_.length)return[];var N=[];if(_[0]===0){for(var B=0;B<_.length;B++)typeof _[B]=="number"&&N.push(y.substring(_[B]+1,_[B+1]));return N}}function _s(y,$){$||($="/");for(var _=!1,N=[],B=0;B<y.length;B++){var j=y.charAt(B);!_&&j==$&&N.push(B),_=!_&&j=="\\"}return N}function la(y){for(var $="|(){",_="}",N=!1,B=[],j=-1;j<y.length;j++){var q=y.charAt(j)||"",Y=y.charAt(j+1)||"",Q=Y&&$.indexOf(Y)!=-1;N?((q!=="\\"||!Q)&&B.push(q),N=!1):q==="\\"?(N=!0,Y&&_.indexOf(Y)!=-1&&(Q=!0),(!Q||Y==="\\")&&B.push(q)):(B.push(q),Q&&Y!=="\\"&&B.push("\\"))}return B.join("")}function Xa(y){for(var $=!1,_=[],N=-1;N<y.length;N++){var B=y.charAt(N)||"",j=y.charAt(N+1)||"";Si[B+j]?(_.push(Si[B+j]),N++):$?(_.push(B),$=!1):B==="\\"?($=!0,o(j)||j==="$"?_.push("$"):j!=="/"&&j!=="\\"&&_.push("\\")):(B==="$"&&_.push("$"),_.push(B),j==="/"&&_.push("\\"))}return _.join("")}function Qa(y){for(var $=new je.StringStream(y),_=[];!$.eol();){for(;$.peek()&&$.peek()!="\\";)_.push($.next());var N=!1;for(var B in pr)if($.match(B,!0)){N=!0,_.push(pr[B]);break}N||_.push($.next())}return _.join("")}function Ui(y,$,_){var N=He.registerController.getRegister("/");if(N.setText(y),y instanceof RegExp)return y;var B=no(y),j,q;if(!B.length)j=y;else{j=y.substring(0,B[0]);var Y=y.substring(B[0]);q=Y.indexOf("i")!=-1}if(!j)return null;k("pcre")||(j=la(j)),_&&($=/^[^A-Z]*$/.test(j));var Q=new RegExp(j,$||q?"im":"m");return Q}function ai(y){typeof y=="string"&&(y=document.createElement(y));for(var $,_=1;_<arguments.length;_++)if($=arguments[_])if(typeof $!="object"&&($=document.createTextNode($)),$.nodeType)y.appendChild($);else for(var N in $)Object.prototype.hasOwnProperty.call($,N)&&(N[0]==="$"?y.style[N.slice(1)]=$[N]:y.setAttribute(N,$[N]));return y}function Kt(y,$){var _=ai("div",{$color:"red",$whiteSpace:"pre",class:"cm-vim-message"},$);y.openNotification?y.openNotification(_,{bottom:!0,duration:5e3}):alert(_.innerText)}function ca(y,$){return ai("div",{$display:"flex"},ai("span",{$fontFamily:"monospace",$whiteSpace:"pre",$flex:1},y,ai("input",{type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false",$width:"100%"})),$&&ai("span",{$color:"#888"},$))}function Ir(y,$){if(Pr.length){$.value||($.value=""),An=$;return}var _=ca($.prefix,$.desc);if(y.openDialog)y.openDialog(_,$.onClose,{onKeyDown:$.onKeyDown,onKeyUp:$.onKeyUp,bottom:!0,selectValueOnOpen:!1,value:$.value});else{var N="";typeof $.prefix!="string"&&$.prefix&&(N+=$.prefix.textContent),$.desc&&(N+=" "+$.desc),$.onClose(prompt(N,""))}}function Xn(y,$){if(y instanceof RegExp&&$ instanceof RegExp){for(var _=["global","multiline","ignoreCase","source"],N=0;N<_.length;N++){var B=_[N];if(y[B]!==$[B])return!1}return!0}return!1}function xn(y,$,_,N){if($){var B=Rn(y),j=Ui($,!!_,!!N);if(j)return bi(y,j),Xn(j,B.getQuery())||B.setQuery(j),j}}function Bn(y){if(y.source.charAt(0)=="^")var $=!0;return{token:function(_){if($&&!_.sol()){_.skipToEnd();return}var N=_.match(y,!1);if(N)return N[0].length==0?(_.next(),"searching"):!_.sol()&&(_.backUp(1),!y.exec(_.next()+N[0]))?(_.next(),null):(_.match(y),"searching");for(;!_.eol()&&(_.next(),!_.match(y,!1)););},query:y}}function bi(y,$){clearTimeout(gr);var _=Rn(y);_.highlightTimeout=gr,gr=setTimeout(function(){if(y.state.vim){var N=Rn(y);N.highlightTimeout=null;var B=N.getOverlay();(!B||$!=B.query)&&(B&&y.removeOverlay(B),B=Bn($),y.addOverlay(B),y.showMatchesOnScrollbar&&(N.getScrollbarAnnotate()&&N.getScrollbarAnnotate().clear(),N.setScrollbarAnnotate(y.showMatchesOnScrollbar($))),N.setOverlay(B))}},50)}function Lr(y,$,_,N){return N===void 0&&(N=1),y.operation(function(){for(var B=y.getCursor(),j=y.getSearchCursor(_,B),q=0;q<N;q++){var Y=j.find($);if(q==0&&Y&&gt(j.from(),B)){var Q=$?j.from():j.to();Y=j.find($),Y&&!Y[0]&&gt(j.from(),Q)&&y.getLine(Q.line).length==Q.ch&&(Y=j.find($))}if(!Y&&(j=y.getSearchCursor(_,$?new De(y.lastLine()):new De(y.firstLine(),0)),!j.find($)))return}return j.from()})}function wi(y,$,_,N,B){return N===void 0&&(N=1),y.operation(function(){var j=y.getCursor(),q=y.getSearchCursor(_,j),Y=q.find(!$);!B.visualMode&&Y&&gt(q.from(),j)&&q.find(!$);for(var Q=0;Q<N;Q++)if(Y=q.find($),!Y&&(q=y.getSearchCursor(_,$?new De(y.lastLine()):new De(y.firstLine(),0)),!q.find($)))return;return[q.from(),q.to()]})}function jo(y){var $=Rn(y);$.highlightTimeout&&(clearTimeout($.highlightTimeout),$.highlightTimeout=null),y.removeOverlay(Rn(y).getOverlay()),$.setOverlay(null),$.getScrollbarAnnotate()&&($.getScrollbarAnnotate().clear(),$.setScrollbarAnnotate(null))}function Ss(y,$,_){return typeof y!="number"&&(y=y.line),$ instanceof Array?x(y,$):typeof _=="number"?y>=$&&y<=_:y==$}function ro(y){var $=y.ace.renderer;return{top:$.getFirstFullyVisibleRow(),bottom:$.getLastFullyVisibleRow()}}function Xr(y,$,_){if(_=="'"||_=="`")return He.jumpList.find(y,-1)||new De(0,0);if(_==".")return mo(y);var N=$.marks[_];return N&&N.find()}function mo(y){if(y.getLastEditEnd)return y.getLastEditEnd();for(var $=y.doc.history.done,_=$.length;_--;)if($[_].changes)return Xe($[_].changes[0].to)}function zo(y,$,_,N,B,j,q,Y,Q){function re(){y.operation(function(){for(;!Oe;)se(),Ce();me()})}function se(){var tt=y.getRange(j.from(),j.to()),st=tt.replace(q,Y),kn=j.to().line;j.replace(st),Ge=j.to().line,B+=Ge-kn,ht=Ge<kn}function ye(){var tt=Re&&Xe(j.to()),st=j.findNext();return st&&!st[0]&&tt&&gt(j.from(),tt)&&(st=j.findNext()),st}function Ce(){for(;ye()&&Ss(j.from(),N,B);)if(!(!_&&j.from().line==Ge&&!ht)){y.scrollIntoView(j.from(),30),y.setSelection(j.from(),j.to()),Re=j.from(),Oe=!1;return}Oe=!0}function me(tt){if(tt&&tt(),y.focus(),Re){y.setCursor(Re);var st=y.state.vim;st.exMode=!1,st.lastHPos=st.lastHSPos=Re.ch}Q&&Q()}function be(tt,st,kn){je.e_stop(tt);var dt=H(tt);switch(dt){case"y":se(),Ce();break;case"n":Ce();break;case"a":var Mn=Q;Q=void 0,y.operation(re),Q=Mn;break;case"l":se();case"q":case"<Esc>":case"<C-c>":case"<C-[>":me(kn)}return Oe&&me(kn),!0}y.state.vim.exMode=!0;var Oe=!1,Re,Ge,ht;if(Ce(),Oe){Kt(y,"No matches for "+q.source);return}if(!$){re(),Q&&Q();return}Ir(y,{prefix:ai("span","replace with ",ai("strong",Y)," (y/n/a/q/l)"),onKeyDown:be})}function Qr(y,$){var _=y.state.vim,N=He.macroModeState,B=He.registerController.getRegister("."),j=N.isPlaying,q=N.lastInsertModeChanges;j||(y.off("change",vo),_.insertEnd&&_.insertEnd.clear(),_.insertEnd=null,je.off(y.getInputField(),"keydown",Ms)),!j&&_.insertModeRepeat>1&&(ua(y,_,_.insertModeRepeat-1,!0),_.lastEditInputState.repeatOverride=_.insertModeRepeat),delete _.insertModeRepeat,_.insertMode=!1,$||y.setCursor(y.getCursor().line,y.getCursor().ch-1),y.setOption("keyMap","vim"),y.setOption("disableInput",!0),y.toggleOverwrite(!1),B.setText(q.changes.join("")),je.signal(y,"vim-mode-change",{mode:"normal"}),N.isRecording&&ur(N)}function Ho(y){On.unshift(y)}function As(y,$,_,N,B){var j={keys:y,type:$};j[$]=_,j[$+"Args"]=N;for(var q in B)j[q]=B[q];Ho(j)}function Ts(y,$,_,N){var B=He.registerController.getRegister(N);if(N==":"){B.keyBuffer[0]&&kr.processCommand(y,B.keyBuffer[0]),_.isPlaying=!1;return}var j=B.keyBuffer,q=0;_.isPlaying=!0,_.replaySearchQueries=B.searchQueries.slice(0);for(var Y=0;Y<j.length;Y++)for(var Q=j[Y],re,se;Q;)if(re=/<\w+-.+?>|<\w+>|./.exec(Q),se=re[0],Q=Q.substring(re.index+se.length),_t.handleKey(y,se,"macro"),$.insertMode){var ye=B.insertModeChanges[q++].changes;He.macroModeState.lastInsertModeChanges.changes=ye,Go(y,ye,1),Qr(y)}_.isPlaying=!1}function Uo(y,$){if(!y.isPlaying){var _=y.latestRegister,N=He.registerController.getRegister(_);N&&N.pushText($)}}function ur(y){if(!y.isPlaying){var $=y.latestRegister,_=He.registerController.getRegister($);_&&_.pushInsertModeChanges&&_.pushInsertModeChanges(y.lastInsertModeChanges)}}function $s(y,$){if(!y.isPlaying){var _=y.latestRegister,N=He.registerController.getRegister(_);N&&N.pushSearchQuery&&N.pushSearchQuery($)}}function vo(y,$){var _=He.macroModeState,N=_.lastInsertModeChanges;if(!_.isPlaying)for(var B=y.state.vim;$;){if(N.expectCursorActivityForChange=!0,N.ignoreCount>1)N.ignoreCount--;else if($.origin=="+input"||$.origin=="paste"||$.origin===void 0){var j=y.listSelections().length;j>1&&(N.ignoreCount=j);var q=$.text.join(`
1404
- `);if(N.maybeReset&&(N.changes=[],N.maybeReset=!1),q)if(y.state.overwrite&&!/\n/.test(q))N.changes.push([q]);else{if(q.length>1){var Y=B&&B.insertEnd&&B.insertEnd.find(),Q=y.getCursor();if(Y&&Y.line==Q.line){var re=Y.ch-Q.ch;re>0&&re<q.length&&(N.changes.push([q,re]),q="")}}q&&N.changes.push(q)}}$=$.next}}function Vo(y){var $=y.state.vim;if($.insertMode){var _=He.macroModeState;if(_.isPlaying)return;var N=_.lastInsertModeChanges;N.expectCursorActivityForChange?N.expectCursorActivityForChange=!1:(N.maybeReset=!0,$.insertEnd&&$.insertEnd.clear(),$.insertEnd=y.setBookmark(y.getCursor(),{insertLeft:!0}))}else y.curOp.isVimOp||qo(y,$)}function qo(y,$,_){var N=y.getCursor("anchor"),B=y.getCursor("head");if($.visualMode&&!y.somethingSelected()?At(y,!1):!$.visualMode&&!$.insertMode&&y.somethingSelected()&&($.visualMode=!0,$.visualLine=!1,je.signal(y,"vim-mode-change",{mode:"visual"})),$.visualMode){var j=at(B,N)?0:-1,q=at(B,N)?-1:0;B=ge(B,0,j),N=ge(N,0,q),$.sel={anchor:N,head:B},si(y,$,"<",mt(B,N)),si(y,$,">",sn(B,N))}else!$.insertMode&&!_&&($.lastHPos=y.getCursor().ch)}function io(y,$){this.keyName=y,this.key=$.key,this.ctrlKey=$.ctrlKey,this.altKey=$.altKey,this.metaKey=$.metaKey,this.shiftKey=$.shiftKey}function Ms(y){var $=He.macroModeState,_=$.lastInsertModeChanges,N=je.keyName?je.keyName(y):y.key;N&&(N.indexOf("Delete")!=-1||N.indexOf("Backspace")!=-1)&&(_.maybeReset&&(_.changes=[],_.maybeReset=!1),_.changes.push(new io(N,y)))}function ua(y,$,_,N){function B(){Y?jn.processAction(y,$,$.lastEditActionCommand):jn.evalInput(y,$)}function j(se){if(q.lastInsertModeChanges.changes.length>0){se=$.lastEditActionCommand?se:1;var ye=q.lastInsertModeChanges;Go(y,ye.changes,se)}}var q=He.macroModeState;q.isPlaying=!0;var Y=!!$.lastEditActionCommand,Q=$.inputState;if($.inputState=$.lastEditInputState,Y&&$.lastEditActionCommand.interlaceInsertRepeat)for(var re=0;re<_;re++)B(),j(1);else N||B(),j(_);$.inputState=Q,$.insertMode&&!N&&Qr(y),q.isPlaying=!1}function Ko(y,$){je.lookupKey($,"vim-insert",function(_){return typeof _=="string"?je.commands[_](y):_(y),!0})}function Go(y,$,_){var N=y.getCursor("head"),B=He.macroModeState.lastInsertModeChanges.visualBlock;B&&(nr(y,N,B+1),_=y.listSelections().length,y.setCursor(N));for(var j=0;j<_;j++){B&&y.setCursor(ge(N,j,0));for(var q=0;q<$.length;q++){var Y=$[q];if(Y instanceof io)Ko(y,Y.keyName);else if(typeof Y=="string")y.replaceSelection(Y);else{var Q=y.getCursor(),re=ge(Q,0,Y[0].length-(Y[1]||0));y.replaceRange(Y[0],Q,Y[1]?Q:re),y.setCursor(re)}}}B&&y.setCursor(ge(N,0,1))}function Es(y,$,_,N){$.length>1&&$[0]=="n"&&($=$.replace("numpad","")),$=Rr[$]||$;var B="";if(_.ctrlKey&&(B+="C-"),_.altKey&&(B+="A-"),(B||$.length>1)&&_.shiftKey&&(B+="S-"),N&&!N.expectLiteralNext&&$.length==1){if(Qn.keymap&&$ in Qn.keymap)(Qn.remapCtrl!==!1||!B)&&($=Qn.keymap[$]);else if($.charCodeAt(0)>255){var j=_.code&&_.code.slice(-1)||"";_.shiftKey||(j=j.toLowerCase()),j&&($=j)}}return B+=$,B.length>1&&(B="<"+B+">"),B}function Yo(y){var $=new y.constructor;return Object.keys(y).forEach(function(_){if(_!="insertEnd"){var N=y[_];Array.isArray(N)?N=N.slice():N&&typeof N=="object"&&N.constructor!=Object&&(N=Yo(N)),$[_]=N}}),y.sel&&($.sel={head:y.sel.head&&Xe(y.sel.head),anchor:y.sel.anchor&&Xe(y.sel.anchor)}),$}function yo(y,$,_){var N=!1,B=_t.maybeInitVimState_(y),j=B.visualBlock||B.wasInVisualBlock,q=y.ace.inMultiSelectMode;if(B.wasInVisualBlock&&!q?B.wasInVisualBlock=!1:q&&B.visualBlock&&(B.wasInVisualBlock=!0),$=="<Esc>"&&!B.insertMode&&!B.visualMode&&q)y.ace.exitMultiSelectMode();else if(j||!q||y.ace.inVirtualSelectionMode)N=_t.handleKey(y,$,_);else{var Y=Yo(B),Q=B.inputState.changeQueueList||[];y.operation(function(){y.curOp.isVimOp=!0;var re=0;y.ace.forEachSelection(function(){var se=y.ace.selection;y.state.vim.lastHPos=se.$desiredColumn==null?se.lead.column:se.$desiredColumn,y.state.vim.inputState.changeQueue=Q[re];var ye=y.getCursor("head"),Ce=y.getCursor("anchor"),me=at(ye,Ce)?0:-1,be=at(ye,Ce)?-1:0;ye=ge(ye,0,me),Ce=ge(Ce,0,be),y.state.vim.sel.head=ye,y.state.vim.sel.anchor=Ce,N=hi(y,$,_),se.$desiredColumn=y.state.vim.lastHPos==-1?null:y.state.vim.lastHPos,y.ace.inVirtualSelectionMode&&(Q[re]=y.state.vim.inputState.changeQueue),y.virtualSelectionMode()&&(y.state.vim=Yo(Y)),re++}),y.curOp.cursorActivity&&!N&&(y.curOp.cursorActivity=!1),B.status=y.state.vim.status,y.state.vim=B,B.inputState.changeQueueList=Q,B.inputState.changeQueue=null},!0)}return N&&!B.visualMode&&!B.insert&&B.visualMode!=y.somethingSelected()&&qo(y,B,!0),N}function xi(y,$){$.off("beforeEndOperation",xi);var _=$.state.cm.vimCmd;_&&$.execCommand(_.exec?_:_.name,_.args),$.curOp=$.prevOp}var hr=n("../range").Range,oo=n("../lib/event_emitter").EventEmitter,Vi=n("../lib/dom"),ha=n("../lib/oop"),Za=n("../lib/keys"),bo=n("../lib/event"),qi=n("../search").Search,wo=n("../lib/useragent"),Xo=n("../search_highlight").SearchHighlight,xo=n("../commands/multi_select_commands"),da=n("../mode/text").Mode.prototype.tokenRe,so=n("../ext/hardwrap").hardWrap;n("../multi_select");var je=function(y){this.ace=y,this.state={},this.marks={},this.options={},this.$uid=0,this.onChange=this.onChange.bind(this),this.onSelectionChange=this.onSelectionChange.bind(this),this.onBeforeEndOperation=this.onBeforeEndOperation.bind(this),this.ace.on("change",this.onChange),this.ace.on("changeSelection",this.onSelectionChange),this.ace.on("beforeEndOperation",this.onBeforeEndOperation)};je.Pos=function(y,$){if(!(this instanceof De))return new De(y,$);this.line=y,this.ch=$},je.defineOption=function(y,$,_){},je.commands={redo:function(y){y.ace.redo()},undo:function(y){y.ace.undo()},newlineAndIndent:function(y){y.ace.insert(`
1395
+ `):" "+zp(d[0]):"as no adapter specified";throw new Lt("There is no suitable adapter to dispatch the request "+p,"ERR_NOT_SUPPORT")}return r},adapters:wu};function xu(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new qs(null,t)}function Up(t){return xu(t),t.headers=qr.from(t.headers),t.data=yu.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Hp.getAdapter(t.adapter||$a.adapter)(t).then(function(e){return xu(t),e.data=yu.call(t,t.transformResponse,e),e.headers=qr.from(e.headers),e},function(e){return Ip(e)||(xu(t),e&&e.response&&(e.response.data=yu.call(t,t.transformResponse,e.response),e.response.headers=qr.from(e.response.headers))),Promise.reject(e)})}const Vp="1.9.0",$l={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{$l[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const qp={};$l.transitional=function(t,e,n){function r(f,d){return"[Axios v"+Vp+"] Transitional option '"+f+"'"+d+(n?". "+n:"")}return(f,d,p)=>{if(t===!1)throw new Lt(r(d," has been removed"+(e?" in "+e:"")),Lt.ERR_DEPRECATED);return e&&!qp[d]&&(qp[d]=!0,console.warn(r(d," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(f,d,p):!0}},$l.spelling=function(t){return(e,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function Qx(t,e,n){if(typeof t!="object")throw new Lt("options must be an object",Lt.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let f=r.length;for(;f-- >0;){const d=r[f],p=e[d];if(p){const b=t[d],h=b===void 0||p(b,d,t);if(h!==!0)throw new Lt("option "+d+" must be "+h,Lt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Lt("Unknown option "+d,Lt.ERR_BAD_OPTION)}}const Ml={assertOptions:Qx,validators:$l},Qi=Ml.validators;let hs=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Tp,response:new Tp}}async request(t,e){try{return await this._request(t,e)}catch(n){if(n instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const f=r.stack?r.stack.replace(/^.+\n/,""):"";try{n.stack?f&&!String(n.stack).endsWith(f.replace(/^.+\n.+\n/,""))&&(n.stack+=`
1396
+ `+f):n.stack=f}catch{}}throw n}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=us(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:f}=e;n!==void 0&&Ml.assertOptions(n,{silentJSONParsing:Qi.transitional(Qi.boolean),forcedJSONParsing:Qi.transitional(Qi.boolean),clarifyTimeoutError:Qi.transitional(Qi.boolean)},!1),r!=null&&(Se.isFunction(r)?e.paramsSerializer={serialize:r}:Ml.assertOptions(r,{encode:Qi.function,serialize:Qi.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),Ml.assertOptions(e,{baseUrl:Qi.spelling("baseURL"),withXsrfToken:Qi.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let d=f&&Se.merge(f.common,f[e.method]);f&&Se.forEach(["delete","get","head","post","put","patch","common"],l=>{delete f[l]}),e.headers=qr.concat(d,f);const p=[];let b=!0;this.interceptors.request.forEach(function(l){typeof l.runWhen=="function"&&l.runWhen(e)===!1||(b=b&&l.synchronous,p.unshift(l.fulfilled,l.rejected))});const h=[];this.interceptors.response.forEach(function(l){h.push(l.fulfilled,l.rejected)});let g,s=0,a;if(!b){const l=[Up.bind(this),void 0];for(l.unshift.apply(l,p),l.push.apply(l,h),a=l.length,g=Promise.resolve(e);s<a;)g=g.then(l[s++],l[s++]);return g}a=p.length;let c=e;for(s=0;s<a;){const l=p[s++],o=p[s++];try{c=l(c)}catch(u){o.call(this,u);break}}try{g=Up.call(this,c)}catch(l){return Promise.reject(l)}for(s=0,a=h.length;s<a;)g=g.then(h[s++],h[s++]);return g}getUri(t){t=us(this.defaults,t);const e=Dp(t.baseURL,t.url,t.allowAbsoluteUrls);return Ap(e,t.params,t.paramsSerializer)}};Se.forEach(["delete","get","head","options"],function(t){hs.prototype[t]=function(e,n){return this.request(us(n||{},{method:t,url:e,data:(n||{}).data}))}}),Se.forEach(["post","put","patch"],function(t){function e(n){return function(r,f,d){return this.request(us(d||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:r,data:f}))}}hs.prototype[t]=e(),hs.prototype[t+"Form"]=e(!0)});let Zx=class Zb{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(f){n=f});const r=this;this.promise.then(f=>{if(!r._listeners)return;let d=r._listeners.length;for(;d-- >0;)r._listeners[d](f);r._listeners=null}),this.promise.then=f=>{let d;const p=new Promise(b=>{r.subscribe(b),d=b}).then(f);return p.cancel=function(){r.unsubscribe(d)},p},e(function(f,d,p){r.reason||(r.reason=new qs(f,d,p),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new Zb(function(n){e=n}),cancel:e}}};function Jx(t){return function(e){return t.apply(null,e)}}function eC(t){return Se.isObject(t)&&t.isAxiosError===!0}const Cu={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Cu).forEach(([t,e])=>{Cu[e]=t});function Kp(t){const e=new hs(t),n=hp(hs.prototype.request,e);return Se.extend(n,hs.prototype,e,{allOwnKeys:!0}),Se.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return Kp(us(t,r))},n}const Vn=Kp($a);Vn.Axios=hs,Vn.CanceledError=qs,Vn.CancelToken=Zx,Vn.isCancel=Ip,Vn.VERSION=Vp,Vn.toFormData=kl,Vn.AxiosError=Lt,Vn.Cancel=Vn.CanceledError,Vn.all=function(t){return Promise.all(t)},Vn.spread=Jx,Vn.isAxiosError=eC,Vn.mergeConfig=us,Vn.AxiosHeaders=qr,Vn.formToJSON=t=>Mp(Se.isHTMLForm(t)?new FormData(t):t),Vn.getAdapter=Hp.getAdapter,Vn.HttpStatusCode=Cu,Vn.default=Vn;const{Axios:QD,AxiosError:ZD,CanceledError:JD,isCancel:eN,CancelToken:tN,VERSION:nN,all:rN,Cancel:iN,isAxiosError:oN,spread:sN,toFormData:aN,AxiosHeaders:lN,HttpStatusCode:cN,formToJSON:uN,getAdapter:hN,mergeConfig:dN}=Vn,ku=Vn.create({baseURL:location.origin,timeout:6e4,params:{}});ku.interceptors.response.use(t=>t,t=>{var e,n,r,f,d,p,b,h,g,s,a;if(t.response){if(t.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(o){o&&OpenC3Auth.setTokens()}),t.response.config.headers["Ignore-Errors"]&&t.response.config.headers["Ignore-Errors"].includes(t.response.status.toString()))return Promise.reject(t);let c=`HTTP ${t.response.status} - `;(e=t.response)!=null&&e.statusText&&(c+=`${t.response.statusText} `),(r=(n=t.response)==null?void 0:n.config)!=null&&r.data&&(c+=`${t.response.config.data} `),(d=(f=t.response)==null?void 0:f.data)!=null&&d.message?c+=`${t.response.data.message}`:(b=(p=t.response)==null?void 0:p.data)!=null&&b.exception?c+=`${t.response.data.exception}`:(s=(g=(h=t.response)==null?void 0:h.data)==null?void 0:g.error)!=null&&s.message?(t.response.data.error.class&&(c+=`${t.response.data.error.class} `),c+=`${t.response.data.error.message}`):c+=`${(a=t.response)==null?void 0:a.data}`;const{$cosmosNotify:l}=window;throw l&&l.serious({title:"Network error",body:c}),t}else throw t});const El=async function(t,e,{data:n,params:r={},headers:f,noAuth:d=!1,noScope:p=!1,onUploadProgress:b=!1}={}){if(!d){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}f.Authorization=localStorage.openc3Token}return f.manual=!0,!p&&!r.scope&&(r.scope=window.openc3Scope),ku({method:t,url:e,data:n,params:r,headers:f,onUploadProgress:b})},_u={Accept:"application/json"},Gp={..._u,"Content-Type":"application/json"},tC=sr("F",{get:function(t,{params:e,headers:n=_u,noScope:r,noAuth:f,onUploadProgress:d}={}){return El("get",t,{params:e,headers:n,noScope:r,noAuth:f,onUploadProgress:d})},put:function(t,{data:e,params:n,headers:r=Gp,noScope:f,noAuth:d,onUploadProgress:p}={}){return El("put",t,{data:e,params:n,headers:r,noScope:f,noAuth:d,onUploadProgress:p})},post:function(t,{data:e,params:n,headers:r=Gp,noScope:f,noAuth:d,onUploadProgress:p}={}){return El("post",t,{data:e,params:n,headers:r,noScope:f,noAuth:d,onUploadProgress:p})},delete:function(t,{params:e,headers:n=_u,noScope:r,noAuth:f,onUploadProgress:d}={}){return El("delete",t,{params:e,headers:n,noScope:r,noAuth:f,onUploadProgress:d})}});let Il=()=>({emit(t,...e){for(let n=this.events[t]||[],r=0,f=n.length;r<f;r++)n[r](...e)},events:{},on(t,e){var n;return((n=this.events)[t]||(n[t]=[])).push(e),()=>{var r;this.events[t]=(r=this.events[t])==null?void 0:r.filter(f=>e!==f)}}});class Ea extends Error{constructor(e,n){e instanceof Error?(super(e.message),this.cause=e):super(e),this.reason=n,this.name="ReasonError"}}class Su extends Ea{constructor(e){super("Rejected",e),this.name="SubscriptionRejectedError"}}class nC extends Ea{constructor(e){super(e||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class Di extends Ea{constructor(e,n){n?super(e,n):super("Disconnected",e),this.name="DisconnectedError"}}class rC extends Di{constructor(e){super(e,"stale_connection"),this.name="StaleConnectionError"}}function Yp(t){return t?`{${Object.keys(t).sort().filter(e=>t[e]!==void 0).map(e=>{let n=JSON.stringify(t[e]);return`${JSON.stringify(e)}:${n}`}).join(",")}}`:""}class iC{constructor(e){this.channel=e,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",e=>{if(e.type==="info"){this._state||(this._state=this.stateFromInfo(e));return}this._state&&(e.type==="join"?this._state[e.id]=e.info:e.type==="leave"&&delete this._state[e.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(e=>e()),this.listeners.length=0}async join(e,n){if(!this._info)return this._info={id:e,info:n},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let e=await this.channel.perform("$presence:leave");return delete this._info,e}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let e=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(e),this._state}finally{delete this._promise}}stateFromInfo(e){return e.records.reduce((n,{id:r,info:f})=>(n[r]=f,n),{})}}const ds=Symbol("state");class Xp{constructor(e={}){this.emitter=Il(),this.params=Object.freeze(e),this.presence=new iC(this),this.initialConnect=!0,this[ds]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=Yp({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[ds]}attached(e){if(this.receiver){if(this.receiver!==e)throw Error("Already connected to a different receiver");return!1}return this.receiver=e,!0}connecting(){this[ds]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[ds]="connected";let e=!1;this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:e})):this.emit("connect",{reconnect:!0,restored:e})}restored(){if(this.state==="connected")throw Error("Already connected");this[ds]="connected";let e=!0,n=!0;this.initialConnect=!1,this.emit("connect",{reconnect:n,restored:e})}disconnected(e){this.state==="disconnected"||this.state==="closed"||(this[ds]="disconnected",this.presence.reset(),this.emit("disconnect",e))}closed(e){this.state!=="closed"&&(this[ds]="closed",delete this.receiver,this.initialConnect=!0,this.presence.dispose(),this.emit("close",e))}disconnect(){this.state==="idle"||this.state==="closed"||this.receiver.unsubscribe(this)}async perform(e,n){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,e,n)}async send(e){return this.perform(void 0,e)}async whisper(e){try{await this.perform("$whisper",e)}catch(n){let r=this.receiver?this.receiver.logger:null;r&&r.warn("whisper failed: ",n)}}receive(e,n){this.emit("message",e,n)}on(e,n){return this.emitter.on(e,n)}once(e,n){let r=this.emitter.on(e,(...f)=>{r(),n(...f)});return r}emit(e,...n){return this.emitter.emit(e,...n)}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((e,n)=>{let r=[()=>delete this._pendingSubscribe];r.push(this.on("connect",()=>{r.forEach(f=>f()),e()})),r.push(this.on("close",f=>{r.forEach(d=>d()),n(f||new Ea("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class oC{constructor(e){this.id=e,this.intent="unsubscribed",this.state="idle",this.channels=[],this.disposed=!1,this._pendings=[]}add(e){this.channels.includes(e)||this.channels.push(e)}remove(e){let n=this.channels.indexOf(e);n>-1&&this.channels.splice(n,1)}notify(e,...n){this.state=e==="restored"?"connected":e,n.length===1?this.channels.forEach(r=>r[e](n[0])):this.channels.forEach(r=>r[e]())}pending(e){this._checkIntent(e);let n=this._pendings[0];return!n||n.intent!==e?Promise.resolve():n.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(e){this._checkIntent(e);let n,r={promise:new Promise(d=>{n=d}),intent:e,release:()=>{this._pendings.splice(this._pendings.indexOf(r),1),n(r)},canceled:!1,acquired:!1},f=this._pendingTop;return this._pendings.push(r),f&&await f.promise,this.gvl&&await this.gvl.acquire(r,e),r.acquired=!0,r}close(e){this.disposed=!0,this.intent=void 0,this.notify("closed",e)}_checkIntent(e){if(!(e==="unsubscribed"||e==="subscribed"))throw Error(`Unknown subscription intent: ${e}`)}get _pendingTop(){return this._pendings.length?this._pendings[this._pendings.length-1]:void 0}_mergeWithPending(e){let n=this._pendingTop;return!n||n.acquired||n.intent!==e?!1:(this._pendings.pop(),n.canceled=!0,!0)}}class sC{constructor(){this.queue=[]}async acquire(e,n){n==="subscribed"&&(this.queue.push(e.promise.then(()=>{this.queue.splice(this.queue.indexOf(e),1)})),this.queue.length>1&&await this.queue[this.queue.length-2])}}class aC{constructor(e){e.concurrentSubscribes===!1&&(this.glv=new sC),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(e){return this._subscriptions[e]}create(e,{subscribe:n,unsubscribe:r}){let f=this._subscriptions[e]=new oC(e);return f.remoteId=this._localToRemote[e],f.subscriber=n,f.unsubscriber=r,f.gvl=this.glv,f}remove(e){delete this._subscriptions[e],delete this._localToRemote[e]}storeRemoteId(e,n){this._localToRemote[e]=n;let r=this.get(e);r&&(r.remoteId=n)}}class lC{constructor(e={}){this.subscriptions=new aC(e),this._pendingMessages=[],this._remoteToLocal={}}subscribe(e,n){this._remoteToLocal[n]=e,this.subscriptions.storeRemoteId(e,n),this.flush(n)}unsubscribe(e){let n=this.subscriptions.get(e);if(!n)return;let r=n.remoteId;r&&delete this._remoteToLocal[r],this.subscriptions.remove(e)}transmit(e,n,r){let f=this._remoteToLocal[e];if(!f){this._pendingMessages.push([e,n,r]);return}let d=this.subscriptions.get(f);d&&d.channels.forEach(p=>{p.receive(n,r)})}notify(e,n,r){let f=this._remoteToLocal[e];if(!f)return;let d=this.subscriptions.get(f);d&&d.channels.forEach(p=>p.emit(n,r))}close(){this._pendingMessages.length=0}get size(){return this.channels.length}get channels(){return this.subscriptions.all().flatMap(e=>e.channels)}flush(e){let n=[];for(let r of this._pendingMessages)r[0]===e?this.transmit(r[0],r[1],r[2]):n.push(r);this._pendingMessages=n}}const Qp={debug:0,info:1,warn:2,error:3};class Zp{constructor(e){this.level=e||"warn"}log(e,n,r){Qp[e]<Qp[this.level]||this.writeLogEntry(e,n,r)}writeLogEntry(){throw Error("Not implemented")}debug(e,n){this.log("debug",e,n)}info(e,n){this.log("info",e,n)}warn(e,n){this.log("warn",e,n)}error(e,n){this.log("error",e,n)}}class Ia extends Zp{writeLogEntry(){}}class cC{encode(e){return JSON.stringify(e)}decode(e){try{return JSON.parse(e)}catch{}}}let uC=0;class Jp{constructor(e={}){let{logger:n}=e;this.logger=n||new Ia,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=e.subscribeCooldownInterval||250,this.subscribeRetryInterval=e.subscribeRetryInterval||5e3}attached(e){this.cable=e}subscribe(e,n){let r={channel:e};n&&Object.assign(r,n);let f=Yp(r);if(this.pendingUnsubscriptions[f]){let p=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${p}`,f),new Promise(b=>{setTimeout(()=>{b(this.subscribe(e,n))},p)})}if(this.pendingSubscriptions[f])return this.logger.warn("subscription is already pending, skipping",f),Promise.reject(Error("Already subscribing"));let d=this.subscribeRetryInterval;return new Promise((p,b)=>{let h=++uC;this.pendingSubscriptions[f]={resolve:p,reject:b,id:h},this.cable.send(this.buildSubscribeRequest(f)),this.maybeRetrySubscribe(h,f,d)})}buildSubscribeRequest(e){return{command:"subscribe",identifier:e}}maybeRetrySubscribe(e,n,r){setTimeout(()=>{let f=this.pendingSubscriptions[n];f&&f.id===e&&(this.logger.warn(`no subscription ack received in ${r}ms, retrying subscribe`,n),this.cable.send(this.buildSubscribeRequest(n)),this.maybeExpireSubscribe(e,n,r))},r)}maybeExpireSubscribe(e,n,r){setTimeout(()=>{let f=this.pendingSubscriptions[n];f&&f.id===e&&(delete this.pendingSubscriptions[n],f.reject(new nC(`Haven't received subscription ack in ${r*2}ms for ${n}`)))},r)}unsubscribe(e){return this.cable.send({command:"unsubscribe",identifier:e}),this.pendingUnsubscriptions[e]=!0,setTimeout(()=>{delete this.pendingUnsubscriptions[e]},this.subscribeCooldownInterval),Promise.resolve()}perform(e,n,r){return n==="$whisper"?this.whisper(e,r):(r||(r={}),r.action=n,this.cable.send({command:"message",identifier:e,data:JSON.stringify(r)}),Promise.resolve())}whisper(e,n){return this.cable.send({command:"whisper",identifier:e,data:n}),Promise.resolve()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:n,identifier:r,message:f,reason:d,reconnect:p}=e;if(n==="ping")return this.cable.keepalive(e.message);if(this.cable.keepalive(),n==="welcome"){let b=e.sid;return b&&this.cable.setSessionId(b),this.cable.connected()}if(n==="disconnect"){let b=new Di(d);this.reset(b),p===!1?this.cable.closed(b):this.cable.disconnected(b);return}if(n==="confirm_subscription"){let b=this.pendingSubscriptions[r];if(!b){this.logger.error("subscription not found, unsubscribing",{type:n,identifier:r}),this.unsubscribe(r);return}return delete this.pendingSubscriptions[r],b.resolve(r)}if(n==="reject_subscription"){let b=this.pendingSubscriptions[r];return b?(delete this.pendingSubscriptions[r],b.reject(new Su)):this.logger.error("subscription not found",{type:n,identifier:r})}if(f)return{identifier:r,message:f};this.logger.warn(`unknown message type: ${n}`,{message:e})}reset(e){for(let n in this.pendingSubscriptions)this.pendingSubscriptions[n].reject(e);this.pendingSubscriptions={}}recoverableClosure(){return!1}}const eg=()=>Date.now()/1e3|0;class hC extends Jp{constructor(e={}){super(e),this.streamsPositions={},this.subscriptionStreams={},this.pendingHistory={},this.pendingPresence={},this.presenceInfo={},this.restoreSince=e.historyTimestamp,this.disableSessionRecovery=e.disableSessionRecovery,this.restoreSince===void 0&&(this.restoreSince=eg()),this.sessionId=void 0,this.sendPongs=e.pongs}reset(e){for(let n in this.pendingPresence)this.pendingPresence[n].reject(e);return this.pendingPresence={},super.reset()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:n,identifier:r,message:f}=e;if(n==="disconnect")return delete this.sessionId,this.cable.setSessionId(""),super.receive(e);if(n==="reject_subscription")return super.receive(e);if(n==="confirm_subscription")return this.subscriptionStreams[r]||(this.subscriptionStreams[r]=new Set),super.receive(e);if(n==="ping")return this.restoreSince&&(this.restoreSince=eg()),this.sendPongs&&this.sendPong(),this.cable.keepalive(e.message);if(this.cable.keepalive(),n==="confirm_history"){this.logger.debug("history result received",e),this.cable.notify("history_received",r);return}if(n==="reject_history"){this.logger.warn("failed to retrieve history",e),this.cable.notify("history_not_found",r);return}if(n==="welcome"){if(this.disableSessionRecovery||(this.sessionId=e.sid,this.sessionId&&this.cable.setSessionId(this.sessionId)),e.restored){let d=e.restored_ids||Object.keys(this.subscriptionStreams);for(let p of d)this.cable.send({identifier:p,command:"history",history:this.historyRequestFor(p)}),this.presenceInfo[p]&&this.cable.send({identifier:p,command:"join",presence:this.presenceInfo[p]});return this.cable.restored(d)}return this.cable.connected(this.sessionId)}if(n==="presence"){let d=f.type;if(d==="info"){let p=this.pendingPresence[r];p&&(delete this.pendingPresence[r],p.resolve(f))}else if(d==="error"){let p=this.pendingPresence[r];p&&(delete this.pendingPresence[r],p.reject(new Error("failed to retrieve presence")))}return{type:n,identifier:r,message:f}}if(f){let d=this.trackStreamPosition(r,e.stream_id,e.epoch,e.offset);return{identifier:r,message:f,meta:d}}this.logger.warn(`unknown message type: ${n}`,{message:e})}perform(e,n,r){switch(n){case"$presence:join":return this.join(e,r);case"$presence:leave":return this.leave(e,r);case"$presence:info":return this.presence(e,r)}return super.perform(e,n,r)}unsubscribe(e){return delete this.presenceInfo[e],super.unsubscribe(e)}buildSubscribeRequest(e){let n=super.buildSubscribeRequest(e),r=this.historyRequestFor(e);r&&(n.history=r,this.pendingHistory[e]=!0);let f=this.presenceInfo[e];return f&&(n.presence=f),n}recoverableClosure(){return!!this.sessionId}historyRequestFor(e){let n={},r=!1;if(this.subscriptionStreams[e])for(let f of this.subscriptionStreams[e]){let d=this.streamsPositions[f];d&&(r=!0,n[f]=d)}if(!(!r&&!this.restoreSince))return{since:this.restoreSince,streams:n}}trackStreamPosition(e,n,r,f){if(!(!n||!r))return this.subscriptionStreams[e]||(this.subscriptionStreams[e]=new Set),this.subscriptionStreams[e].add(n),this.streamsPositions[n]={epoch:r,offset:f},{stream:n,epoch:r,offset:f}}async sendPong(){await new Promise(e=>setTimeout(e,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(e,n){return this.presenceInfo[e]=n,this.cable.send({command:"join",identifier:e,presence:n}),Promise.resolve()}async leave(e,n){return delete this.presenceInfo[e],this.cable.send({command:"leave",identifier:e,presence:n}),Promise.resolve()}presence(e,n){return this.pendingPresence[e]?(this.logger.warn("presence is already pending, skipping",e),Promise.reject(Error("presence request is already pending"))):new Promise((r,f)=>{this.pendingPresence[e]={resolve:r,reject:f},this.cable.send({command:"presence",identifier:e,data:n})})}}class dC extends Ea{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class Au extends Xp{constructor(e,n){super(n),this.channelId=e}set channelId(e){this._channelId=e}get channelId(){return this._channelId}}vl(Au,"identifier","__ghost__");const fC="$pubsub";class Tu extends Xp{async perform(e,n){if(e.startsWith("$"))return super.perform(e,n);throw Error("not implemented")}}vl(Tu,"identifier",fC);const fs=Symbol("state");let pC=class{constructor({transport:t,protocol:e,encoder:n,logger:r,lazy:f,hubOptions:d,performFailures:p,transportConfigurator:b}){this.emitter=Il(),this.transport=t,this.encoder=n,this.logger=r||new Ia,this.protocol=e,this.performFailures=p||"throw",this.protocol.attached(this),this.hub=new lC(d||{}),this[fs]="idle",this.handleClose=this.handleClose.bind(this),this.handleIncoming=this.handleIncoming.bind(this),this.transportConfigurator=b,this.transport.on("close",this.handleClose),this.transport.on("data",this.handleIncoming),this.initialConnect=!0,this.recovering=!1,f===!1&&this.connect().catch(()=>{})}get state(){return this[fs]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let t=this.state==="idle";this[fs]="connecting";let e=this.pendingConnect();this.logger.debug("connecting");try{this.transportConfigurator&&await this.transportConfigurator(this.transport,{initial:t}),await this.transport.open()}catch(n){this.handleClose(n)}return e}setSessionId(t){this.sessionId=t,this.transport.setParam("sid",t)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[fs]="connected",this.recovering&&this.hub.subscriptions.all().forEach(e=>e.notify("disconnected",new Di("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[fs]="connected",this.hub.subscriptions.all().forEach(r=>{t&&r.remoteId&&t.includes(r.remoteId)?r.notify("restored"):(r.notify("disconnected",new Di("recovery_failed")),this._resubscribe(r))});let e=!this.initialConnect,n=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:e,restored:n})}notify(t,e,n){e&&typeof e!="string"&&(n=e,e=void 0),e?this.hub.notify(e,"info",{type:t,data:n}):this.emit("info",{type:t,data:n})}handleClose(t){this.logger.debug("transport closed",{error:t}),this.disconnected(new Di(t,"transport_closed"))}disconnected(t){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:t}),this[fs]="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 Di?t:new Di(t,void 0)),this.logger.info("closed",{reason:t||"user"}),this[fs]="closed";let n=e||new Di("cable_closed");this.hub.subscriptions.all().forEach(r=>r.notify("disconnected",n)),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 n=this.protocol.receive(e);if(n){this.logger.debug("processed incoming message",n);let{type:r,identifier:f,message:d,meta:p}=n;r?this.hub.notify(f,r,d):this.hub.transmit(f,d,p)}}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 Tu({stream_name:t});return this.subscribe(e)}streamFromSigned(t){let e=new Tu({signed_stream_name:t});return this.subscribe(e)}subscribeTo(t,e){let n,r;return typeof t=="string"&&(r=t,t=Au),n=r?new t(r,e):new t(e),this.subscribe(n)}subscribe(t){if(!t.attached(this))return t;let e=t.identifier;t.connecting();let n=this.hub.subscriptions.get(e)||this.hub.subscriptions.create(e,{subscribe:r=>this._subscribe(r,t.channelId,t.params),unsubscribe:r=>this._unsubscribe(r)});return n.add(t),n.intent==="subscribed"&&n.state==="connected"&&t.connected(),n.ensureSubscribed(),t}async _resubscribe(t){t.intent!=="subscribed"||!t.channels[0]||(t.notify("connecting"),t.ensureResubscribed())}async _subscribe(t,e,n){let r=t.id;if(this.state==="idle"&&this.connect().catch(()=>{}),this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r});return}this.logger.debug("acquiring subscribe lock",{identifier:r});let f=await t.acquire("subscribed");if(f.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:r}),f.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:r}),t.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),f.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r}),f.release();return}if(t.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:r}),t.notify("connected"),f.release();return}let d={identifier:e,params:n};this.logger.debug("subscribing",d);try{let p=await this.protocol.subscribe(e,n);this.hub.subscribe(r,p),this.logger.debug("subscribed",{...d,remoteId:p}),t.notify("connected")}catch(p){if(p){if(p instanceof Su&&this.logger.warn("rejected",d),p instanceof Di){this.logger.debug("disconnected during subscription; will retry on connect",d),f.release();return}this.logger.error("failed to subscribe",{error:p,...d})}t.close(p),this.hub.unsubscribe(r)}f.release()}unsubscribe(t){let e=t.identifier,n=this.hub.subscriptions.get(e);if(!n)throw Error(`Subscription not found: ${e}`);n.remove(t),t.closed(),n.maybeUnsubscribe()}async _unsubscribe(t){let e=t.id;this.logger.debug("acquiring unsubscribe lock",{identifier:e});let n=await t.acquire("unsubscribed");if(n.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:e}),n.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}),n.release();return}if(t.state==="disconnected"||t.state==="closed"){this.logger.debug(`already ${t.state} connected, skip unsubscribe command`,{identifier:e}),n.release();return}let r=t.remoteId;if(this.logger.debug("unsubscribing...",{remoteId:r}),this.state!=="connected"){this.logger.debug("unsubscribe skipped (cable is not connected)",{id:e}),t.close(),this.hub.unsubscribe(e),n.release();return}try{await this.protocol.unsubscribe(r),this.logger.debug("unsubscribed remotely",{id:e})}catch(f){f&&(f instanceof Di?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:e,error:f}):this.logger.error("unsubscribe failed",{id:e,error:f}))}t.intent==="unsubscribed"?(t.close(),this.hub.unsubscribe(e)):t.state="closed",n.release()}async perform(t,e,n){if(this.performFailures==="throw")return this._perform(t,e,n);try{return await this._perform(t,e,n)}catch(r){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:r});return}}async _perform(t,e,n){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new dC;let r=this.hub.subscriptions.get(t);if(!r)throw Error(`Subscription not found: ${t}`);if(await r.pending("subscribed"),r.intent!=="subscribed")throw Error(`Subscription is closed: ${t}`);let f=r.remoteId,d={id:f,action:e,payload:n};this.logger.debug("perform",d);try{let p=await this.protocol.perform(f,e,n);return p&&this.logger.debug("perform result",{message:p,request:d}),p}catch(p){throw this.logger.error("perform failed",{error:p,request:d}),p}}on(t,e){return this.emitter.on(t,e)}once(t,e){let n=this.emitter.on(t,(...r)=>{n(),e(...r)});return n}emit(t,...e){return this.emitter.emit(t,...e)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((t,e)=>{let n=[()=>delete this._pendingConnect];n.push(this.on("connect",()=>{n.forEach(r=>r()),t()})),n.push(this.on("close",r=>{n.forEach(f=>f()),e(r)})),n.push(this.on("disconnect",r=>{n.forEach(f=>f()),e(r)}))}),this._pendingConnect)}};const gC={maxMissingPings:2,maxReconnectAttempts:1/0},Ks=()=>Date.now(),tg=(t,e)=>{e=e||{};let{backoffRate:n,jitterRatio:r,maxInterval:f}=e;return n=n||2,r===void 0&&(r=.5),d=>{let p=t*n**d,b=p*n,h=p+(b-p)*Math.random(),g=2*(Math.random()-.5)*r;return h=h*(1+g),f&&f<h&&(h=f),h}};let ng=class{constructor({pingInterval:t,...e}){if(this.pingInterval=t,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${t}`);if(e=Object.assign({},gC,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 Ia,this.state="pending_connect",this.attempts=0,this.disconnectedAt=Ks()}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=Ks(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=Ks(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=Ks(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=Ks()})),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=Ks()-this.pingedAt;t>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${t}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new rC))}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)}};class mC{constructor(e,n={}){this.transports=e,this.transport=null,this.emitter=Il(),this.unbind=[],this.logger=n.logger||new Ia}displayName(){return"fallbacked transport"}async open(){for(let e=0;e<this.transports.length;e++){let n=this.transports[e];try{this.transport=n,this.resetListeners(),this.logger.debug(`Trying to connect via ${n.displayName()}`),await n.open(),this.logger.debug(`Connected via ${n.displayName()}`);return}catch(r){this.logger.debug(`Failed to connect via ${n.displayName()}: ${r.message}`)}}throw this.transport=null,this.resetListeners(),new Error("Couldn't connect via any available transport")}send(e){if(!this.transport)throw new Error("No transport is open");this.transport.send(e)}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(e,n){this.transports.forEach(r=>{r.setParam(e,n)})}setToken(e,n){this.transports.forEach(r=>{r.setToken(e,n)})}on(e,n){return this.emitter.on(e,n)}once(e,n){let r=this.emitter.on(e,(...f)=>{r(),n(...f)});return r}get url(){return this.transport?this.transport.url:""}resetListeners(){this.unbind.forEach(e=>e()),this.unbind.length=0,this.transport&&this.unbind.push(this.transport.on("open",()=>{this.emitter.emit("open")}),this.transport.on("data",e=>{this.emitter.emit("data",e)}),this.transport.on("close",e=>{this.emitter.emit("close",e)}),this.transport.on("error",e=>{this.emitter.emit("error",e)}))}}class vC{constructor(e,n={}){this.url=e;let r=n.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=Il();let{format:f,subprotocol:d,authStrategy:p}=n;this.format=f||"text",this.connectionOptions=n.websocketOptions,this.authStrategy=p||"param",this.authProtocol="",this.subprotocol=d}displayName(){return"WebSocket("+this.url+")"}open(){let e=this.subprotocol;return this.authStrategy==="sub-protocol"&&(e=[this.subprotocol,this.authProtocol]),this.connectionOptions?this.ws=new this.Impl(this.url,e,this.connectionOptions):this.ws=new this.Impl(this.url,e),this.ws.binaryType="arraybuffer",this.initListeners(),new Promise((n,r)=>{let f=[];f.push(this.once("open",()=>{f.forEach(d=>d()),n()})),f.push(this.once("close",()=>{f.forEach(d=>d()),r(Error("WS connection closed"))}))})}setURL(e){this.url=e}setParam(e,n){let r=new URL(this.url);r.searchParams.set(e,n);let f=`${r.protocol}//${r.host}${r.pathname}?${r.searchParams}`;this.setURL(f)}setToken(e,n="jid"){if(this.authStrategy==="param")this.setParam(n,e);else if(this.authStrategy==="header"){this.connectionOptions=this.connectionOptions||{},this.connectionOptions.headers=this.connectionOptions.headers||{};let r=`x-${n}`.toLowerCase();r=Object.keys(this.connectionOptions.headers).find(f=>f.toLowerCase()===r)||r,this.connectionOptions.headers[r]=e}else if(this.authStrategy==="sub-protocol")this.authProtocol=`anycable-token.${e}`;else throw new Error("Unknown auth strategy: "+this.authStrategy)}send(e){if(!this.ws||!this.connected)throw Error("WebSocket is not connected");this.ws.send(e)}close(){this.ws?this.onclose():this.connected=!1}on(e,n){return this.emitter.on(e,n)}once(e,n){let r=this.emitter.on(e,(...f)=>{r(),n(...f)});return r}initListeners(){this.ws.onerror=e=>{this.connected&&this.emitter.emit("error",e.error||new Error("WS Error"))},this.ws.onclose=()=>{this.onclose()},this.ws.onmessage=e=>{let n=e.data;this.format==="binary"&&(n=new Uint8Array(n)),this.emitter.emit("data",n)},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")}}const rg={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function yC(t,e){if(typeof t=="object"&&typeof e>"u"&&(e=t,t=void 0),e=e||{},!t&&!e.transport)throw Error("URL or transport must be specified");e=Object.assign({},rg,e);let{protocol:n,websocketImplementation:r,websocketFormat:f,websocketOptions:d,websocketAuthStrategy:p,fallbacks:b,logLevel:h,logger:g,transport:s,encoder:a,lazy:c,monitor:l,pingInterval:o,reconnectStrategy:u,maxMissingPings:m,maxReconnectAttempts:w,subprotocol:x,tokenRefresher:E,historyTimestamp:T,protocolOptions:k,concurrentSubscribes:C,performFailures:L,transportConfigurator:R,auth:F}=e;if(g=g||new Ia(h),typeof n=="string"){x=x||n;let P=n.substring(0,n.lastIndexOf("-")),O=n.substring(n.lastIndexOf("-")+1);if(k=k||{},P==="actioncable-v1")n=new Jp({logger:g,...k});else if(P==="actioncable-v1-ext")n=new hC({logger:g,historyTimestamp:T,...k});else throw Error(`Protocol is not supported yet: ${n}`);if(O==="json")a=a||new cC,f=f||"text";else if(O==="msgpack"){if(f="binary",!a)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(O==="protobuf"){if(f=f||"binary",!a)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: ${n}`)}if(!n)throw Error("Protocol must be specified");s=s||new vC(t,{websocketImplementation:r,websocketOptions:d,subprotocol:x,authStrategy:p,format:f}),b&&(s=new mC([s,...b],{logger:g})),F&&F.token&&s.setToken(F.token,F.param||"jid"),u=u||tg(o),l!==!1&&(l=l||new ng({pingInterval:o,reconnectStrategy:u,maxMissingPings:m,maxReconnectAttempts:w,logger:g}));let I={concurrentSubscribes:C},H=new pC({protocol:n,transport:s,encoder:a,logger:g,lazy:c,hubOptions:I,performFailures:L,transportConfigurator:R});return l&&(l.watch(H),H.monitor=l),E&&bC(H,async()=>{try{await E(s)}catch(P){return g.error("Failed to refresh authentication token: "+P),!1}return H.connect().catch(()=>{}),!0}),H}function bC(t,e){let n=!1;t.on("connect",()=>n=!1),t.on("close",async r=>{if(r){if(n){t.logger.warn("Token auto-refresh is disabled",r);return}r.reason==="token_expired"&&(n=!0,await e())}})}class wC{constructor(e){this.channel=e}notify(e,...n){typeof this[e]=="function"&&this[e](...n)}perform(e,n={}){this.channel.perform(e,n)}send(e){this.channel.send(e)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}}class xC extends Au{constructor(e,n,r){super(e,n),this.subscription=new wC(this),Object.assign(this.subscription,r),this.on("connect",({reconnect:f})=>this.subscription.notify("connected",{reconnected:f})),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",f=>this.subscription.notify("received",f)),this.on("close",f=>{f&&f instanceof Su?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class CC{constructor(e){this.cable=e}create(e,n){let r,f;typeof e=="object"?(r=e.channel,delete e.channel,f=e):(r=e,f={});let d=new xC(r,f,n);return d.subscription.notify("initialized"),this.cable.subscribe(d),d.subscription}findAll(e){return this.cable.hub.channels.filter(n=>n.identifier===e).map(n=>n.subscription)}}class kC{constructor(e){this.cable=e,this.subscriptions=new CC(e)}}class _C extends Zp{writeLogEntry(e,n,r){r?console[e](n,r):console[e](n)}}class SC extends ng{watch(e){super.watch(e),this.initActivityListeners()}initActivityListeners(){if(typeof document<"u"&&typeof window<"u"&&document.addEventListener&&window.addEventListener){let e=()=>{document.hidden||this.reconnectNow()&&this.logger.debug("Trigger reconnect due to visibility change")},n=f=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:f})},r=()=>this.disconnect(new Di("page_frozen"));document.addEventListener("visibilitychange",e,!1),window.addEventListener("focus",n,!1),window.addEventListener("online",n,!1),window.addEventListener("resume",n,!1),window.addEventListener("freeze",r,!1),this.unbind.push(()=>{document.removeEventListener("visibilitychange",e,!1),window.removeEventListener("focus",n,!1),window.removeEventListener("online",n,!1),window.removeEventListener("resume",n,!1),window.removeEventListener("freeze",r,!1)})}}disconnect(e){this.state==="disconnected"||this.state==="closed"||(this.logger.info("Disconnecting",{reason:e.message}),this.cancelReconnect(),this.stopPolling(),this.state="pending_disconnect",this.target.disconnected(e))}}const AC=["cable","action-cable"],TC="/cable",Ll=(t,e)=>{for(let n of AC){let r=t.head.querySelector(`meta[name='${n}-${e}']`);if(r)return r.getAttribute("content")}},ig=t=>t.match(/wss?:\/\//)?t:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${t}`:t,$C=()=>{if(typeof document<"u"&&document.head){let t=Ll(document,"url");if(t)return ig(t)}return ig(TC)},MC=()=>{if(typeof document<"u"&&document.head){let t=Ll(document,"history-timestamp");if(t)return t|0}},EC=()=>{if(typeof document<"u"&&document.head)return Ll(document,"token")},IC=()=>{if(typeof document<"u"&&document.head)return Ll(document,"token-param")};function LC(t,e){typeof t=="object"&&typeof e>"u"&&(e=t,t=void 0),t=t||$C(),e=e||{},e.historyTimestamp||(e.historyTimestamp=MC());let n=EC();if(n){let g=IC();e.auth=Object.assign({token:n,param:g},e.auth||{})}e=Object.assign({},rg,e);let{logLevel:r,logger:f,pingInterval:d,reconnectStrategy:p,maxMissingPings:b,maxReconnectAttempts:h}=e;return f=e.logger=e.logger||new _C(r),p=e.reconnectStrategy=e.reconnectStrategy||tg(d),e.monitor!==!1&&(e.monitor=e.monitor||new SC({pingInterval:d,reconnectStrategy:p,maxMissingPings:b,maxReconnectAttempts:h,logger:f})),yC(t,e)}function RC(t,e){let n=LC(t,e);return new kC(n)}class OC{constructor(e="/openc3-api/cable"){this._cable=null,this._url=e}disconnect(){this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(e,n,r={},f={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(d=>{if(d&&OpenC3Auth.setTokens(),this._cable==null){let p=this._url+"?scope="+encodeURIComponent(window.openc3Scope)+"&authorization="+encodeURIComponent(localStorage.openc3Token);p=new URL(p,document.baseURI).href,this._cable=RC(p)}return this._cable.subscriptions.create({channel:e,...f},r)})}recordPing(){}}sr("P",OC);class DC{constructor(e,n,r="",f=""){this.keyword=e.keyword,this.parameters=e.parameters,this.filename=e.filename,this.line=e.line,this.lineNumber=e.lineNumber,this.message=n,this.usage=r,this.url=f}}sr("e",DC);function Rl(t){return NC.test(t)}const NC=/^-?[0-9]+$/;function og(t){return FC.test(t)}const FC=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function sg(t,e){const n=Number.parseFloat(t),r=String(n),f=ag(t),d=ag(r);return!!(f===d||(e==null?void 0:e.approx)===!0&&!Rl(t)&&d.length>=14&&f.startsWith(d.substring(0,14)))}let La=function(t){return t.underflow="underflow",t.overflow="overflow",t.truncate_integer="truncate_integer",t.truncate_float="truncate_float",t}({});function PC(t){if(sg(t,{approx:!1}))return;if(Rl(t))return La.truncate_integer;const e=Number.parseFloat(t);return Number.isFinite(e)?e===0?La.underflow:La.truncate_float:La.overflow}function ag(t){return t.replace(BC,"").replace(jC,"").replace(zC,"").replace(WC,"")}const BC=/[eE][+-]?\d+$/,WC=/^-?(0*)?/,jC=/\./,zC=/0+$/;class HC{constructor(e){if(vl(this,"isLosslessNumber",!0),!og(e))throw new Error(`Invalid number (value: "${e}")`);this.value=e}valueOf(){const e=PC(this.value);if(e===void 0||e===La.truncate_float)return Number.parseFloat(this.value);if(Rl(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${e} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}}function UC(t){return t&&typeof t=="object"&&t.isLosslessNumber===!0||!1}function VC(t){return new HC(t)}function qC(t,e){return $u({"":t},"",t,e)}function $u(t,e,n,r){return Array.isArray(n)?r.call(t,e,GC(n,r)):n&&typeof n=="object"&&!UC(n)?r.call(t,e,KC(n,r)):r.call(t,e,n)}function KC(t,e){for(const n of Object.keys(t)){const r=$u(t,n,t[n],e);r!==void 0?t[n]=r:delete t[n]}return t}function GC(t,e){for(let n=0;n<t.length;n++)t[n]=$u(t,String(n),t[n],e);return t}function YC(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:VC,r=0;const f=b();return o(f),m(),e?qC(f,e):f;function d(){if(t.charCodeAt(r)===tk){r++,g();const A={};let S=!0;for(;r<t.length&&t.charCodeAt(r)!==cg;){S?S=!1:(c(),g());const D=r,W=s();if(W===void 0){E();return}g(),l();const U=b();if(U===void 0){F();return}Object.prototype.hasOwnProperty.call(A,W)&&!Mu(U,A[W])&&T(W,D+1),A[W]=U}return t.charCodeAt(r)!==cg&&k(),r++,A}}function p(){if(t.charCodeAt(r)===nk){r++,g();const A=[];let S=!0;for(;r<t.length&&t.charCodeAt(r)!==ug;){S?S=!1:c();const D=b();u(D),A.push(D)}return t.charCodeAt(r)!==ug&&C(),r++,A}}function b(){g();const A=s()??a()??d()??p()??h("true",!0)??h("false",!1)??h("null",null);return g(),A}function h(A,S){if(t.slice(r,r+A.length)===A)return r+=A.length,S}function g(){for(;XC(t.charCodeAt(r));)r++}function s(){if(t.charCodeAt(r)===Eu){r++;let A="";for(;r<t.length&&t.charCodeAt(r)!==Eu;){if(t.charCodeAt(r)===ek){const S=t[r+1],D=JC[S];D!==void 0?(A+=D,r++):S==="u"?Ol(t.charCodeAt(r+2))&&Ol(t.charCodeAt(r+3))&&Ol(t.charCodeAt(r+4))&&Ol(t.charCodeAt(r+5))?(A+=String.fromCharCode(Number.parseInt(t.slice(r+2,r+6),16)),r+=5):I(r):R(r)}else ZC(t.charCodeAt(r))?A+=t[r]:L(t[r]);r++}return x(),r++,A}}function a(){const A=r;if(t.charCodeAt(r)===hg&&(r++,w(A)),t.charCodeAt(r)===Iu)r++;else if(QC(t.charCodeAt(r)))for(r++;Dl(t.charCodeAt(r));)r++;if(t.charCodeAt(r)===uk)for(r++,w(A);Dl(t.charCodeAt(r));)r++;if(t.charCodeAt(r)===gk||t.charCodeAt(r)===pk)for(r++,(t.charCodeAt(r)===hg||t.charCodeAt(r)===ak)&&r++,w(A);Dl(t.charCodeAt(r));)r++;if(r>A)return n(t.slice(A,r))}function c(){if(t.charCodeAt(r)!==ck)throw new SyntaxError(`Comma ',' expected after value ${O()}`);r++}function l(){if(t.charCodeAt(r)!==hk)throw new SyntaxError(`Colon ':' expected after property name ${O()}`);r++}function o(A){if(A===void 0)throw new SyntaxError(`JSON value expected ${O()}`)}function u(A){if(A===void 0)throw new SyntaxError(`Array item expected ${O()}`)}function m(){if(r<t.length)throw new SyntaxError(`Expected end of input ${O()}`)}function w(A){if(!Dl(t.charCodeAt(r))){const S=t.slice(A,r);throw new SyntaxError(`Invalid number '${S}', expecting a digit ${O()}`)}}function x(){if(t.charCodeAt(r)!==Eu)throw new SyntaxError(`End of string '"' expected ${O()}`)}function E(){throw new SyntaxError(`Quoted object key expected ${O()}`)}function T(A,S){throw new SyntaxError(`Duplicate key '${A}' encountered at position ${S}`)}function k(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${O()}`)}function C(){throw new SyntaxError(`Array item or end of array ']' expected ${O()}`)}function L(A){throw new SyntaxError(`Invalid character '${A}' ${H()}`)}function R(A){const S=t.slice(A,A+2);throw new SyntaxError(`Invalid escape character '${S}' ${H()}`)}function F(){throw new SyntaxError(`Object value expected after ':' ${H()}`)}function I(A){const S=t.slice(A,A+6);throw new SyntaxError(`Invalid unicode character '${S}' ${H()}`)}function H(){return`at position ${r}`}function P(){return r<t.length?`but got '${t[r]}'`:"but reached end of input"}function O(){return`${P()} ${H()}`}}function XC(t){return t===rk||t===ik||t===ok||t===sk}function Ol(t){return t>=Iu&&t<=Lu||t>=dk&&t<=mk||t>=fk&&t<=vk}function Dl(t){return t>=Iu&&t<=Lu}function QC(t){return t>=lk&&t<=Lu}function ZC(t){return t>=32&&t<=1114111}function Mu(t,e){return t===e?!0:Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&t.every((n,r)=>Mu(n,e[r])):lg(t)&&lg(e)?[...new Set([...Object.keys(t),...Object.keys(e)])].every(n=>Mu(t[n],e[n])):!1}function lg(t){return typeof t=="object"&&t!==null}const JC={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
1397
+ `,r:"\r",t:" "},ek=92,tk=123,cg=125,nk=91,ug=93,rk=32,ik=10,ok=9,sk=13,Eu=34,ak=43,hg=45,Iu=48,lk=49,Lu=57,ck=44,uk=46,hk=58,dk=65,fk=97,pk=69,gk=101,mk=70,vk=102;function dg(t,e,n,r){return f(t);function f(h,g){if(Array.isArray(r)){const s=r.find(a=>a.test(h));if(s){const a=s.stringify(h);if(typeof a!="string"||!og(a))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${a})`);return a}}if(typeof h=="boolean"||typeof h=="number"||typeof h=="string"||h===null||h instanceof Date||h instanceof Boolean||h instanceof Number||h instanceof String)return JSON.stringify(h);if(h!=null&&h.isLosslessNumber||typeof h=="bigint")return h.toString();if(Array.isArray(h))return d(h);if(h&&typeof h=="object")return p(h)}function d(h,g){if(h.length===0)return"[]";let s="[";for(let a=0;a<h.length;a++){const c=h[a];typeof c<"u"&&typeof c!="function"?s+=f(c):s+="null",a<h.length-1&&(s+=",")}return s+="]",s}function p(h,g){if(typeof h.toJSON=="function")return dg(h.toJSON(),e,n,void 0);const s=Array.isArray(e)?e.map(String):Object.keys(h);if(s.length===0)return"{}";let a=!0,c="{";for(const l of s){const o=h[l];if(b(l,o)){a?a=!1:c+=",";const u=JSON.stringify(l);c+=`${u}:`,c+=f(o)}}return c+="}",c}function b(h,g){return typeof g<"u"&&typeof g!="function"&&typeof g!="symbol"}}function yk(t){return Rl(t)&&!sg(t)?BigInt(t):parseFloat(t)}class bk{constructor(){vl(this,"id",1)}async exec(e,n,r={},f={},d=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return r.scope=window.openc3Scope,f.manual=!0,(await ku.post("/openc3-api/api",{jsonrpc:"2.0",method:e,params:n,id:this.id,keyword_params:r},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...f},timeout:d,transformRequest:[(p,b)=>dg(p)],transformResponse:[p=>YC(p,void 0,yk)]})).data.result}catch(p){let b=new Error;throw p.response?(b.name=p.response.data.error.data.class,b.message=p.response.data.error.data.message,b.object=p.response.data.error):p.request?(b.name="Request error",b.message="Request error, no response received"):b=p,b}}decode_openc3_type(e){if(e!==null&&typeof e=="object"&&e.json_class=="Float"&&e.raw){if(e.raw=="NaN")return NaN;if(e.raw=="Infinity")return 1/0;if(e.raw=="-Infinity")return-1/0}return null}encode_openc3_type(e){return Number.isNaN(e)?{json_class:"Float",raw:"NaN"}:e==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:e==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(e=>{e&&(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(e){return this.exec("set_offline_access",[e])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(e,n){return this.exec("map_target_to_interface",[e,n])}connect_interface(e,...n){return n.length>0?this.exec("connect_interface",[e,...n]):this.exec("connect_interface",[e])}disconnect_interface(e){return this.exec("disconnect_interface",[e])}interface_cmd(e,n,...r){return this.exec("interface_cmd",[e,n,...r])}get_all_router_info(){return this.exec("get_all_router_info",[])}connect_router(e){return this.exec("connect_router",[e])}disconnect_router(e){return this.exec("disconnect_router",[e])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(e){return this.exec("get_tlm_cnts",[e])}get_item(e,n,r){return this.exec("get_item",[e,n,r])}get_param(e,n,r){return this.exec("get_param",[e,n,r])}get_parameter(e,n,r){return this.exec("get_param",[e,n,r])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(e){return this.exec("set_limits_set",[e])}get_target(e){return this.exec("get_target",[e])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(e,n){return this.exec("get_tlm",[e,n])}get_telemetry(e,n){return this.exec("get_tlm",[e,n])}get_all_tlm(e){return this.exec("get_all_tlm",[e])}get_all_telemetry(e){return this.exec("get_all_tlm",[e])}get_all_tlm_names(e,n=!1){return this.exec("get_all_tlm_names",[e],{hidden:n})}get_all_telemetry_names(e){return this.exec("get_all_tlm_names",[e])}get_all_tlm_item_names(e){return this.exec("get_all_tlm_item_names",[e])}async get_tlm_packet(e,n,r,f=30){const d=await this.exec("get_tlm_packet",[e,n],{type:r,stale_time:f});if(d!=null){let p=d.length,b=null;for(let h=0;h<p;h++)b=this.decode_openc3_type(d[h][1]),b!==null&&(d[h][1]=b)}return d}get_packet_derived_items(e,n){return this.exec("get_packet_derived_items",[e,n])}get_tlm_buffer(e,n){return this.exec("get_tlm_buffer",[e,n])}async get_tlm_values(e,n=30,r=null){let f={stale_time:n};r!==null&&(f.cache_timeout=r);const d=await this.exec("get_tlm_values",[e],f,{},1e4);let p=d[0].length,b=null;for(let h=0;h<p;h++)b=this.decode_openc3_type(d[0][h]),b!==null&&(d[0][h]=b);return d}get_limits(e,n,r){return this.exec("get_limits",[e,n,r])}async tlm(e,n,r,f="CONVERTED"){let d=null;if(n===void 0)d=await this.exec("tlm",[e]);else if(r===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(n))d=await this.exec("tlm",[e],{type:n});else{let b=new Error;throw b.name="TypeError",b.message=`Invalid data type ${n}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,b}else d=await this.exec("tlm",[e,n,r],{type:f});let p=this.decode_openc3_type(d);return p!==null&&(d=p),d}async inject_tlm(e,n,r=null,f="CONVERTED"){await this.exec("inject_tlm",[e,n,r],{type:f})}set_tlm(e,n,r,f){return this.exec("set_tlm",[e,n,r],{type:f})}override_tlm(e,n,r,f){return this.exec("override_tlm",[e,n,r],{type:f})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(e,n,r,f){return this.exec("normalize_tlm",[e,n,r],{type:f})}get_all_cmds(e){return this.exec("get_all_cmds",[e])}get_all_commands(e){return this.exec("get_all_cmds",[e])}get_all_cmd_names(e,n=!1){return this.exec("get_all_cmd_names",[e],{hidden:n})}get_all_command_names(e){return this.exec("get_all_cmd_names",[e])}get_cmd(e,n){return this.exec("get_cmd",[e,n])}get_command(e,n){return this.exec("get_cmd",[e,n])}get_cmd_cnts(e){return this.exec("get_cmd_cnts",[e])}get_cmd_value(e,n,r,f="CONVERTED"){return this.exec("get_cmd_value",[e,n,r,f])}get_cmd_buffer(e,n){return this.exec("get_cmd_buffer",[e,n])}_cmd(e,n,r,f,d){let p=null;for(let b in f)Object.prototype.hasOwnProperty.call(f,b)&&(p=this.encode_openc3_type(f[b]),p!==null&&(f[b]=p));return this.exec(e,[n,r,f],{},d)}get_cmd_hazardous(e,n,r,f={}){return n===void 0?this.exec("get_cmd_hazardous",e,{},f):this._cmd("get_cmd_hazardous",e,n,r,f)}cmd(e,n,r,f={}){return n===void 0?this.exec("cmd",e,{},f):this._cmd("cmd",e,n,r,f)}cmd_no_range_check(e,n,r,f={}){return n===void 0?this.exec("cmd_no_range_check",e,{},f):this._cmd("cmd_no_range_check",e,n,r,f)}cmd_raw(e,n,r,f={}){return n===void 0?this.exec("cmd_raw",e,{},f):this._cmd("cmd_raw",e,n,r,f)}cmd_raw_no_range_check(e,n,r,f={}){return n===void 0?this.exec("cmd_raw_no_range_check",e,{},f):this._cmd("cmd_raw_no_range_check",e,n,r,f)}cmd_no_hazardous_check(e,n,r,f={}){return n===void 0?this.exec("cmd_no_hazardous_check",e,{},f):this._cmd("cmd_no_hazardous_check",e,n,r,f)}cmd_no_checks(e,n,r,f={}){return n===void 0?this.exec("cmd_no_checks",e,{},f):this._cmd("cmd_no_checks",e,n,r,f)}cmd_raw_no_hazardous_check(e,n,r,f={}){return n===void 0?this.exec("cmd_raw_no_hazardous_check",e,{},f):this._cmd("cmd_raw_no_hazardous_check",e,n,r,f)}cmd_raw_no_checks(e,n,r,f={}){return n===void 0?this.exec("cmd_raw_no_checks",e,{},f):this._cmd("cmd_raw_no_checks",e,n,r,f)}build_cmd(e,n,r){return n===void 0?this.exec("build_cmd",e):this._cmd("build_cmd",e,n,r)}build_command(e,n,r){return n===void 0?this.exec("build_cmd",e):this._cmd("build_cmd",e,n,r)}get_interface_names(){return this.exec("get_interface_names",[])}send_raw(e,n){return this.exec("send_raw",[e,n])}list_configs(e){return this.exec("list_configs",[e])}load_config(e,n){return this.exec("load_config",[e,n])}save_config(e,n,r){return this.exec("save_config",[e,n,r])}delete_config(e,n){return this.exec("delete_config",[e,n])}enable_limits(e,n,r){return this.exec("enable_limits",[e,n,r])}disable_limits(e,n,r){return this.exec("disable_limits",[e,n,r])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(e){return this.exec("get_overall_limits_state",[e])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(e){return this.exec("get_setting",[e])}get_settings(e){return this.exec("get_settings",e)}set_setting(e,n){return this.exec("set_setting",[e,n])}update_news(){return this.exec("update_news",[])}save_setting(e,n){return this.exec("set_setting",[e,n])}get_metrics(){return this.exec("get_metrics",[])}async hashString(e){if(window.isSecureContext){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",n),f=new Uint8Array(r);return Array.from(f).map(d=>d.toString(16).padStart(2,"0")).join("")}}}sr("B",bk);var fg={exports:{}},pg;function wk(){return pg||(pg=1,function(t,e){ace.define("ace/ext/hardwrap",["require","exports","module","ace/range","ace/editor","ace/config"],function(n,r,f){function d(g,s){function a(F,I,H){if(!(F.length<I)){var P=F.slice(0,I),O=F.slice(I),A=/^(?:(\s+)|(\S+)(\s+))/.exec(O),S=/(?:(\s+)|(\s+)(\S+))$/.exec(P),D=0,W=0;if(S&&!S[2]&&(D=I-S[1].length,W=I),A&&!A[2]&&(D||(D=I),W=I+A[1].length),D)return{start:D,end:W};if(S&&S[2]&&S.index>H)return{start:S.index,end:S.index+S[2].length};if(A&&A[2])return D=I+A[2].length,{start:D,end:D+A[3].length}}}for(var c=s.column||g.getOption("printMarginColumn"),l=s.allowMerge!=0,o=Math.min(s.startRow,s.endRow),u=Math.max(s.startRow,s.endRow),m=g.session;o<=u;){var w=m.getLine(o);if(w.length>c){var x=a(w,c,5);if(x){var E=/^\s*/.exec(w)[0];m.replace(new b(o,x.start,o,x.end),`
1398
+ `+E)}u++}else if(l&&/\S/.test(w)&&o!=u){var T=m.getLine(o+1);if(T&&/\S/.test(T)){var k=w.replace(/\s+$/,""),C=T.replace(/^\s+/,""),L=k+" "+C,x=a(L,c,5);if(x&&x.start>k.length||L.length<c){var R=new b(o,k.length,o+1,T.length-C.length);m.replace(R," "),o--,u--}else k.length<w.length&&m.remove(new b(o,k.length,o,w.length))}}o++}}function p(g){if(g.command.name=="insertstring"&&/\S/.test(g.args)){var s=g.editor,a=s.selection.cursor;if(a.column<=s.renderer.$printMarginColumn)return;var c=s.session.$undoManager.$lastDelta;d(s,{startRow:a.row,endRow:a.row,allowMerge:!1}),c!=s.session.$undoManager.$lastDelta&&s.session.markUndoGroup()}}var b=n("../range").Range,h=n("../editor").Editor;n("../config").defineOptions(h.prototype,"editor",{hardWrap:{set:function(g){g?this.commands.on("afterExec",p):this.commands.off("afterExec",p)},value:!1}}),r.hardWrap=d}),ace.define("ace/keyboard/vim",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/dom","ace/lib/oop","ace/lib/keys","ace/lib/event","ace/search","ace/lib/useragent","ace/search_highlight","ace/commands/multi_select_commands","ace/mode/text","ace/ext/hardwrap","ace/multi_select"],function(n,r,f){function d(y){return{row:y.line,column:y.ch}}function p(y){return new De(y.row,y.column)}function b(y,$,_){if($.line===_.line&&$.ch>=_.ch-1){var N=y.getLine($.line),B=N.charCodeAt($.ch);55296<=B&&B<=55551&&(_.ch+=1)}return{start:$,end:_}}function h(y){y.setOption("disableInput",!0),y.setOption("showCursorWhenSelecting",!1),je.signal(y,"vim-mode-change",{mode:"normal"}),y.on("cursorActivity",Vo),L(y),je.on(y.getInputField(),"paste",s(y))}function g(y){y.setOption("disableInput",!1),y.off("cursorActivity",Vo),je.off(y.getInputField(),"paste",s(y)),y.state.vim=null,gr&&clearTimeout(gr)}function s(y){var $=y.state.vim;return $.onPasteFn||($.onPasteFn=function(){$.insertMode||(y.setCursor(ge(y.getCursor(),0,1)),zn.enterInsertMode(y,{},$))}),$.onPasteFn}function a(y,$){return $>=y.firstLine()&&$<=y.lastLine()}function c(y){return/^[a-z]$/.test(y)}function l(y){return"()[]{}".indexOf(y)!=-1}function o(y){return pa.test(y)}function u(y){return ln.test(y)}function m(y){return/^\s*$/.test(y)}function w(y){return".?!".indexOf(y)!=-1}function x(y,$){for(var _=0;_<$.length;_++)if($[_]==y)return!0;return!1}function E(y,$,_,N,B){if($===void 0&&!B)throw Error("defaultValue is required unless callback is provided");if(_||(_="string"),Gt[y]={type:_,defaultValue:$,callback:B},N)for(var j=0;j<N.length;j++)Gt[N[j]]=Gt[y];$&&T(y,$)}function T(y,$,_,N){var B=Gt[y];N=N||{};var j=N.scope;if(!B)return new Error("Unknown option: "+y);if(B.type=="boolean"){if($&&$!==!0)return new Error("Invalid argument: "+y+"="+$);$!==!1&&($=!0)}B.callback?(j!=="local"&&B.callback($,void 0),j!=="global"&&_&&B.callback($,_)):(j!=="local"&&(B.value=B.type=="boolean"?!!$:$),j!=="global"&&_&&(_.state.vim.options[y]={value:$}))}function k(y,$,_){var N=Gt[y];_=_||{};var B=_.scope;if(!N)return new Error("Unknown option: "+y);if(N.callback){var j=$&&N.callback(void 0,$);return B!=="global"&&j!==void 0?j:B!=="local"?N.callback():void 0}var j=B!=="global"&&$&&$.state.vim.options[y];return(j||B!=="local"&&N||{}).value}function C(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=Wn()}function L(y){return y.state.vim||(y.state.vim={inputState:new A,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}),y.state.vim}function R(){He={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:_i(),macroModeState:new C,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new K({}),searchHistoryController:new Z,exCommandHistoryController:new Z};for(var y in Gt){var $=Gt[y];$.value=$.defaultValue}}function F(y){function $(Y){typeof Y=="string"?An.value=Y:An=null}if(y[0]=="<"){var _=y.toLowerCase().slice(1,-1),N=_.split("-");if(_=N.pop()||"",_=="lt")y="<";else if(_=="space")y=" ";else if(_=="cr")y=`
1399
+ `;else if(Si[_]){var B=An.value,j={key:Si[_],target:{value:B,selectionEnd:B.length,selectionStart:B.length}};An.onKeyDown&&An.onKeyDown(j,An.value,$),An&&An.onKeyUp&&An.onKeyUp(j,An.value,$);return}}if(y==`
1400
+ `){var q=An;An=null,q.onClose&&q.onClose(q.value)}else An.value=(An.value||"")+y}function I(y,$,_){var N=pn;if(_){if(Pr.indexOf(_)!=-1)return;Pr.push(_),pn=_.noremap!=0}try{for(var B=L(y),j=/<(?:[CSMA]-)*\w+>|./gi,q;q=j.exec($);){var Y=q[0],Q=B.insertMode;if(An){F(Y);continue}var re=_t.handleKey(y,Y,"mapping");if(!re&&Q&&B.insertMode){if(Y[0]=="<"){var se=Y.toLowerCase().slice(1,-1),ye=se.split("-");if(se=ye.pop()||"",se=="lt")Y="<";else if(se=="space")Y=" ";else if(se=="cr")Y=`
1401
+ `;else{if(Si.hasOwnProperty(se)){Y=Si[se],Ko(y,Y);continue}Y=Y[0],j.lastIndex=q.index+1}}y.replaceSelection(Y)}}}finally{if(Pr.pop(),pn=Pr.length?N:!1,!Pr.length&&An){var Ce=An;An=null,Ir(y,Ce)}}}function H(y,$){var _=y.key;if(!Br[_]){_.length>1&&_[0]=="n"&&(_=_.replace("Numpad","")),_=rr[_]||_;var N="";if(y.ctrlKey&&(N+="C-"),y.altKey&&(N+="A-"),y.metaKey&&(N+="M-"),je.isMac&&y.altKey&&!y.metaKey&&!y.ctrlKey&&(N=N.slice(2)),(N||_.length>1)&&y.shiftKey&&(N+="S-"),$&&!$.expectLiteralNext&&_.length==1){if(Qn.keymap&&_ in Qn.keymap)(Qn.remapCtrl!=0||!N)&&(_=Qn.keymap[_]);else if(_.charCodeAt(0)>255){var B=y.code&&y.code.slice(-1)||"";y.shiftKey||(B=B.toLowerCase()),B&&(_=B)}}return N+=_,N.length>1&&(N="<"+N+">"),N}}function P(y,$){Qn.string!==y&&(Qn=O(y)),Qn.remapCtrl=$}function O(y){function $(N){return N.split(/\\?(.)/).filter(Boolean)}var _={};return y?(y.split(/((?:[^\\,]|\\.)+),/).map(function(N){if(N){var B=N.split(/((?:[^\\;]|\\.)+);/);if(B.length==3){var j=$(B[1]),q=$(B[2]);if(j.length!==q.length)return;for(var Y=0;Y<j.length;++Y)_[j[Y]]=q[Y]}else if(B.length==1){var Q=$(N);if(Q.length%2!==0)return;for(var Y=0;Y<Q.length;Y+=2)_[Q[Y]]=Q[Y+1]}}}),{keymap:_,string:y}):{keymap:_,string:""}}function A(){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 S(y,$){y.state.vim.inputState=new A,y.state.vim.expectLiteralNext=!1,je.signal(y,"vim-command-done",$)}function D(){this.removed=[],this.inserted=""}function W(y,$,_){this.clear(),this.keyBuffer=[y||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!$,this.blockwise=!!_}function U(y,$){var _=He.registerController.registers;if(!y||y.length!=1)throw Error("Register name must be 1 character");_[y]=$,an.push(y)}function K(y){this.registers=y,this.unnamedRegister=y['"']=new W,y["."]=new W,y[":"]=new W,y["/"]=new W,y["+"]=new W}function Z(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}function te(y,$){Zr[y]=$}function he(y,$){for(var _=[],N=0;N<$;N++)_.push(y);return _}function ne(y,$){Qo[y]=$}function ae(y,$){zn[y]=$}function ue(y,$,_){var N=y.state.vim,B=N.insertMode||N.visualMode,j=Math.min(Math.max(y.firstLine(),$.line),y.lastLine()),q=y.getLine(j),Y=q.length-1+ +!!B,Q=Math.min(Math.max(0,$.ch),Y),re=q.charCodeAt(Q);if(56320<=re&&re<=57343){var se=1;_&&_.line==j&&_.ch>Q&&(se=-1),Q+=se,Q>Y&&(Q-=2)}return new De(j,Q)}function ce(y){var $={};for(var _ in y)y.hasOwnProperty(_)&&($[_]=y[_]);return $}function ge(y,$,_){return typeof $=="object"&&(_=$.ch,$=$.line),new De(y.line+$,y.ch+_)}function Te(y,$,_,N){N.operator&&(_="operatorPending");for(var B,j=[],q=[],Y=pn?$.length-Co:0,Q=Y;Q<$.length;Q++){var re=$[Q];_=="insert"&&re.context!="insert"||re.context&&re.context!=_||N.operator&&re.type=="action"||!(B=$e(y,re.keys))||(B=="partial"&&j.push(re),B=="full"&&q.push(re))}return{partial:j.length&&j,full:q.length&&q}}function $e(y,$){var _=$.slice(-11)=="<character>",N=$.slice(-10)=="<register>";if(_||N){var B=$.length-(_?11:10),j=y.slice(0,B),q=$.slice(0,B);return j==q&&y.length>B?"full":q.indexOf(j)==0?"partial":!1}return y==$?"full":$.indexOf(y)==0?"partial":!1}function Ee(y){var $=/^.*(<[^>]+>)$/.exec(y),_=$?$[1]:y.slice(-1);if(_.length>1)switch(_){case"<CR>":_=`
1402
+ `;break;case"<Space>":_=" ";break;default:_=""}return _}function Ze(y,$,_){return function(){for(var N=0;N<_;N++)$(y)}}function Xe(y){return new De(y.line,y.ch)}function gt(y,$){return y.ch==$.ch&&y.line==$.line}function lt(y,$){return y.line<$.line?!0:y.line==$.line&&y.ch<$.ch}function mt(y,$){return arguments.length>2&&($=mt.apply(void 0,Array.prototype.slice.call(arguments,1))),lt(y,$)?y:$}function sn(y,$){return arguments.length>2&&($=sn.apply(void 0,Array.prototype.slice.call(arguments,1))),lt(y,$)?$:y}function wn(y,$,_){var N=lt(y,$),B=lt($,_);return N&&B}function Jt(y,$){return y.getLine($).length}function wr(y){return y.trim?y.trim():y.replace(/^\s+|\s+$/g,"")}function xn(y){return y.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function Fn(y,$,_){var N=Jt(y,$),B=new Array(_-N+1).join(" ");y.setCursor(new De($,N)),y.replaceRange(B,y.getCursor())}function Pn(y,$){var _=[],N=y.listSelections(),B=Xe(y.clipPos($)),j=!gt($,B),q=y.getCursor("head"),Y=Ct(N,q),Q=gt(N[Y].head,N[Y].anchor),re=N.length-1,se=re-Y>Y?re:0,ye=N[se].anchor,Ce=Math.min(ye.line,B.line),me=Math.max(ye.line,B.line),be=ye.ch,Oe=B.ch,Re=N[se].head.ch-be,Ge=Oe-be;Re>0&&Ge<=0?(be++,j||Oe--):Re<0&&Ge>=0?(be--,Q||Oe++):Re<0&&Ge==-1&&(be--,Oe++);for(var ht=Ce;ht<=me;ht++){var tt={anchor:new De(ht,be),head:new De(ht,Oe)};_.push(tt)}return y.setSelections(_),$.ch=Oe,ye.ch=be,ye}function nr(y,$,_){for(var N=[],B=0;B<_;B++){var j=ge($,B,0);N.push({anchor:j,head:j})}y.setSelections(N,0)}function Ct(y,$,_){for(var N=0;N<y.length;N++){var B=gt(y[N].anchor,$),j=gt(y[N].head,$);if(B||j)return N}return-1}function Ke(y,$){var _=$.lastSelection,N=function(){var j=y.listSelections(),q=j[0],Y=j[j.length-1],Q=lt(q.anchor,q.head)?q.anchor:q.head,re=lt(Y.anchor,Y.head)?Y.head:Y.anchor;return[Q,re]},B=function(){var j=y.getCursor(),q=y.getCursor(),Y=_.visualBlock;if(Y){var Q=Y.width,re=Y.height;q=new De(j.line+re,j.ch+Q);for(var se=[],ye=j.line;ye<q.line;ye++){var Ce=new De(ye,j.ch),me=new De(ye,q.ch),be={anchor:Ce,head:me};se.push(be)}y.setSelections(se)}else{var Oe=_.anchorMark.find(),Re=_.headMark.find(),Ge=Re.line-Oe.line,ht=Re.ch-Oe.ch;q={line:q.line+Ge,ch:Ge?q.ch:ht+q.ch},_.visualLine&&(j=new De(j.line,0),q=new De(q.line,Jt(y,q.line))),y.setSelection(j,q)}return[j,q]};return $.visualMode?N():B()}function ke(y,$){var _=$.sel.anchor,N=$.sel.head;$.lastPastedText&&(N=y.posFromIndex(y.indexFromPos(_)+$.lastPastedText.length),$.lastPastedText=null),$.lastSelection={anchorMark:y.setBookmark(_),headMark:y.setBookmark(N),anchor:Xe(_),head:Xe(N),visualMode:$.visualMode,visualLine:$.visualLine,visualBlock:$.visualBlock}}function Ve(y,$,_,N){var B=y.state.vim.sel,j=N?$:B.head,q=N?$:B.anchor,Y;return lt(_,$)&&(Y=_,_=$,$=Y),lt(j,q)?(j=mt($,j),q=sn(q,_)):(q=mt($,q),j=sn(j,_),j=ge(j,0,-1),j.ch==-1&&j.line!=y.firstLine()&&(j=new De(j.line-1,Jt(y,j.line-1)))),[q,j]}function Je(y,$,B){var N=y.state.vim;$=$||N.sel;var B=B||N.visualLine?"line":N.visualBlock?"block":"char",j=vt(y,$,B);y.setSelections(j.ranges,j.primary)}function vt(y,$,_,N){var B=Xe($.head),j=Xe($.anchor);if(_=="char"){var q=!N&&!lt($.head,$.anchor)?1:0,Y=lt($.head,$.anchor)?1:0;return B=ge($.head,0,q),j=ge($.anchor,0,Y),{ranges:[{anchor:j,head:B}],primary:0}}if(_=="line"){if(lt($.head,$.anchor))B.ch=0,j.ch=Jt(y,j.line);else{j.ch=0;var Q=y.lastLine();B.line>Q&&(B.line=Q),B.ch=Jt(y,B.line)}return{ranges:[{anchor:j,head:B}],primary:0}}if(_=="block"){var re=Math.min(j.line,B.line),se=j.ch,ye=Math.max(j.line,B.line),Ce=B.ch;se<Ce?Ce+=1:se+=1;for(var me=ye-re+1,be=B.line==re?0:me-1,Oe=[],Re=0;Re<me;Re++)Oe.push({anchor:new De(re+Re,se),head:new De(re+Re,Ce)});return{ranges:Oe,primary:be}}}function Tt(y){var $=y.getCursor("head");return y.getSelection().length==1&&($=mt($,y.getCursor("anchor"))),$}function At(y,$){var _=y.state.vim;$!==!1&&y.setCursor(ue(y,_.sel.head)),ke(y,_),_.visualMode=!1,_.visualLine=!1,_.visualBlock=!1,_.insertMode||je.signal(y,"vim-mode-change",{mode:"normal"})}function Bt(y,$,_){var N=y.getRange($,_);if(/\n\s*$/.test(N)){var B=N.split(`
1403
+ `);B.pop();for(var j,j=B.pop();B.length>0&&j&&m(j);j=B.pop())_.line--,_.ch=0;j?(_.line--,_.ch=Jt(y,_.line)):_.ch=0}}function Nt(y,$,_){$.ch=0,_.ch=0,_.line++}function pt(y){if(!y)return 0;var $=y.search(/\S/);return $==-1?y.length:$}function kt(y,$,_){var N=$.inclusive,B=$.innerWord,j=$.bigWord,q=$.noSymbol,Y=$.multiline,Q=_||Tt(y),re=y.getLine(Q.line),se=re,ye=Q.line,Ce=ye,me=Q.ch,be,Oe=q?ko[0]:ki[0];if(B&&/\s/.test(re.charAt(me)))Oe=function(_n){return/\s/.test(_n)};else{for(;!Oe(re.charAt(me));)if(me++,me>=re.length){if(!Y)return null;me--,be=po(y,Q,!0,j,!0);break}j?Oe=ki[0]:(Oe=ko[0],Oe(re.charAt(me))||(Oe=ko[1]))}for(var Re=me,Ge=me;Oe(re.charAt(Ge))&&Ge>=0;)Ge--;if(Ge++,be)Re=be.to,Ce=be.line,se=y.getLine(Ce),!se&&Re==0&&Re++;else for(;Oe(re.charAt(Re))&&Re<re.length;)Re++;if(N){var ht=Re,tt=Q.ch<=Ge&&/\s/.test(re.charAt(Q.ch));if(!tt)for(;/\s/.test(se.charAt(Re))&&Re<se.length;)Re++;if(ht==Re||tt){for(var at=Ge;/\s/.test(re.charAt(Ge-1))&&Ge>0;)Ge--;!Ge&&!tt&&(Ge=at)}}return{start:new De(ye,Ge),end:new De(Ce,Re)}}function $n(y,$,_){var N=$;if(!je.findMatchingTag||!je.findEnclosingTag)return{start:N,end:N};var B=je.findMatchingTag(y,$)||je.findEnclosingTag(y,$);return!B||!B.open||!B.close?{start:N,end:N}:_?{start:B.open.from,end:B.close.to}:{start:B.open.to,end:B.close.from}}function $r(y,$,_){gt($,_)||He.jumpList.add(y,$,_)}function Yr(y,$){He.lastCharacterSearch.increment=y,He.lastCharacterSearch.forward=$.forward,He.lastCharacterSearch.selectedCharacter=$.selectedCharacter}function Wi(y,$,_,N){var B=Xe(y.getCursor()),j=_?1:-1,q=_?y.lineCount():-1,Y=B.ch,Q=B.line,re=y.getLine(Q),se={lineText:re,nextCh:re.charAt(Y),lastCh:null,index:Y,symb:N,reverseSymb:(_?{")":"(","}":"{"}:{"(":")","{":"}"})[N],forward:_,depth:0,curMoveThrough:!1},ye=ui[N];if(!ye)return B;var Ce=hi[ye].init,me=hi[ye].isComplete;for(Ce&&Ce(se);Q!==q&&$;){if(se.index+=j,se.nextCh=se.lineText.charAt(se.index),!se.nextCh){if(Q+=j,se.lineText=y.getLine(Q)||"",j>0)se.index=0;else{var be=se.lineText.length;se.index=be>0?be-1:0}se.nextCh=se.lineText.charAt(se.index)}me(se)&&(B.line=Q,B.ch=se.index,$--)}return se.nextCh||se.curMoveThrough?new De(Q,se.index):B}function po(y,$,_,N,B){var j=$.line,q=$.ch,Y=y.getLine(j),Q=_?1:-1,re=N?ki:ko;if(B&&Y==""){if(j+=Q,Y=y.getLine(j),!a(y,j))return null;q=_?0:Y.length}for(;;){if(B&&Y=="")return{from:0,to:0,line:j};for(var se=Q>0?Y.length:-1,ye=se,Ce=se;q!=se;){for(var me=!1,be=0;be<re.length&&!me;++be)if(re[be](Y.charAt(q))){for(ye=q;q!=se&&re[be](Y.charAt(q));)q+=Q;if(Ce=q,me=ye!=Ce,ye==$.ch&&j==$.line&&Ce==ye+Q)continue;return{from:Math.min(ye,Ce+1),to:Math.max(ye,Ce),line:j}}me||(q+=Q)}if(j+=Q,!a(y,j))return null;Y=y.getLine(j),q=Q>0?0:Y.length}}function xr(y,$,_,N,B,j){var q=Xe($),Y=[];(N&&!B||!N&&B)&&_++;for(var Q=!N||!B,re=0;re<_;re++){var se=po(y,$,N,j,Q);if(!se){var ye=Jt(y,y.lastLine());Y.push(N?{line:y.lastLine(),from:ye,to:ye}:{line:0,from:0,to:0});break}Y.push(se),$=new De(se.line,N?se.to-1:se.from)}var Ce=Y.length!=_,me=Y[0],be=Y.pop();return N&&!B?(!Ce&&(me.from!=q.ch||me.line!=q.line)&&(be=Y.pop()),new De(be.line,be.from)):N&&B?new De(be.line,be.to-1):!N&&B?(!Ce&&(me.to!=q.ch||me.line!=q.line)&&(be=Y.pop()),new De(be.line,be.to)):new De(be.line,be.from)}function go(y,$,_,N,B){var j=$,q=new De(j.line+_.repeat-1,1/0),Y=y.clipPos(q);return Y.ch--,B||(N.lastHPos=1/0,N.lastHSPos=y.charCoords(Y,"div").left),q}function Wo(y,$,_,N,B){for(var j=B||y.getCursor(),q=j.ch,Y,Q=0;Q<$;Q++){var re=y.getLine(j.line);if(Y=Ya(q,re,N,_),Y==-1)return null;q=Y}return new De(y.getCursor().line,Y)}function Ga(y,$){var _=y.getCursor().line;return ue(y,new De(_,$-1))}function ai(y,$,_,N){!x(_,ao)&&!nn.test(_)||($.marks[_]&&$.marks[_].clear(),$.marks[_]=y.setBookmark(N))}function Ya(y,$,_,N,B){var j;return N?(j=$.indexOf(_,y+1),j!=-1):(j=$.lastIndexOf(_,y-1),j!=-1),j}function ks(y,$,_,N,B){function j(Ge){return!/\S/.test(y.getLine(Ge))}function q(Ge,ht,tt){return tt?j(Ge)!=j(Ge+ht):!j(Ge)&&j(Ge+ht)}function Y(Ge){N=N>0?1:-1;var ht=y.ace.session.getFoldLine(Ge);ht&&Ge+N>ht.start.row&&Ge+N<ht.end.row&&(N=(N>0?ht.end.row:ht.start.row)-Ge)}var Q=$.line,re=y.firstLine(),se=y.lastLine(),ye,Ce,me=Q;if(N){for(;re<=me&&me<=se&&_>0;)Y(me),q(me,N)&&_--,me+=N;return new De(me,0)}var be=y.state.vim;if(be.visualLine&&q(Q,1,!0)){var Oe=be.sel.anchor;q(Oe.line,-1,!0)&&(!B||Oe.line!=Q)&&(Q+=1)}var Re=j(Q);for(me=Q;me<=se&&_;me++)q(me,1,!0)&&(!B||j(me)!=Re)&&_--;for(Ce=new De(me,0),me>se&&!Re?Re=!0:B=!1,me=Q;me>re&&!((!B||j(me)==Re||me==Q)&&q(me,-1,!0));me--);return ye=new De(me,0),{start:ye,end:Ce}}function aa(y,$,_,N,B){function j(re){re.pos+re.dir<0||re.pos+re.dir>=re.line.length?re.line=null:re.pos+=re.dir}function q(re,se,ye,Ce){var me=re.getLine(se),be={line:me,ln:se,pos:ye,dir:Ce};if(be.line==="")return{ln:be.ln,pos:be.pos};var Oe=be.pos;for(j(be);be.line!==null;){if(Oe=be.pos,w(be.line[be.pos])){if(!B)return{ln:be.ln,pos:be.pos+1};for(j(be);be.line!==null&&m(be.line[be.pos]);)Oe=be.pos,j(be);return{ln:be.ln,pos:Oe+1}}j(be)}return{ln:be.ln,pos:Oe+1}}function Y(re,se,ye,Ce){var me=re.getLine(se),be={line:me,ln:se,pos:ye,dir:Ce};if(be.line==="")return{ln:be.ln,pos:be.pos};var Oe=be.pos;for(j(be);be.line!==null;){if(!m(be.line[be.pos])&&!w(be.line[be.pos]))Oe=be.pos;else if(w(be.line[be.pos]))return B?m(be.line[be.pos+1])?{ln:be.ln,pos:be.pos+1}:{ln:be.ln,pos:Oe}:{ln:be.ln,pos:Oe};j(be)}return be.line=me,B&&m(be.line[be.pos])?{ln:be.ln,pos:be.pos}:{ln:be.ln,pos:Oe}}for(var Q={ln:$.line,pos:$.ch};_>0;)N<0?Q=Y(y,Q.ln,Q.pos,N):Q=q(y,Q.ln,Q.pos,N),_--;return new De(Q.ln,Q.pos)}function ji(y,$,_,N){function B(Q,re){if(re.pos+re.dir<0||re.pos+re.dir>=re.line.length){if(re.ln+=re.dir,!a(Q,re.ln)){re.line=null,re.ln=null,re.pos=null;return}re.line=Q.getLine(re.ln),re.pos=re.dir>0?0:re.line.length-1}else re.pos+=re.dir}function j(Q,re,se,ye){var Re=Q.getLine(re),Ce=Re==="",me={line:Re,ln:re,pos:se,dir:ye},be={ln:me.ln,pos:me.pos},Oe=me.line==="";for(B(Q,me);me.line!==null;){if(be.ln=me.ln,be.pos=me.pos,me.line===""&&!Oe)return{ln:me.ln,pos:me.pos};if(Ce&&me.line!==""&&!m(me.line[me.pos]))return{ln:me.ln,pos:me.pos};w(me.line[me.pos])&&!Ce&&(me.pos===me.line.length-1||m(me.line[me.pos+1]))&&(Ce=!0),B(Q,me)}var Re=Q.getLine(be.ln);be.pos=0;for(var Ge=Re.length-1;Ge>=0;--Ge)if(!m(Re[Ge])){be.pos=Ge;break}return be}function q(Q,re,se,ye){var Oe=Q.getLine(re),Ce={line:Oe,ln:re,pos:se,dir:ye},me={ln:Ce.ln,pos:null},be=Ce.line==="";for(B(Q,Ce);Ce.line!==null;){if(Ce.line===""&&!be)return me.pos!==null?me:{ln:Ce.ln,pos:Ce.pos};if(!(!w(Ce.line[Ce.pos])||me.pos===null||Ce.ln===me.ln&&Ce.pos+1===me.pos))return me;Ce.line!==""&&!m(Ce.line[Ce.pos])&&(be=!1,me={ln:Ce.ln,pos:Ce.pos}),B(Q,Ce)}var Oe=Q.getLine(me.ln);me.pos=0;for(var Re=0;Re<Oe.length;++Re)if(!m(Oe[Re])){me.pos=Re;break}return me}for(var Y={ln:$.line,pos:$.ch};_>0;)N<0?Y=q(y,Y.ln,Y.pos,N):Y=j(y,Y.ln,Y.pos,N),_--;return new De(Y.ln,Y.pos)}function Yn(y,$,_,N){var B=$,j,q,Y={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[_],Q={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[_],re=y.getLine(B.line).charAt(B.ch),se=re===Q?1:0;if(j=y.scanForBracket(new De(B.line,B.ch+se),-1,void 0,{bracketRegex:Y}),q=y.scanForBracket(new De(B.line,B.ch+se),1,void 0,{bracketRegex:Y}),!j||!q)return null;if(j=j.pos,q=q.pos,j.line==q.line&&j.ch>q.ch||j.line>q.line){var ye=j;j=q,q=ye}return N?q.ch+=1:j.ch+=1,{start:j,end:q}}function Mr(y,$,_,N){var B=Xe($),j=y.getLine(B.line),q=j.split(""),Y,Q,re,se,ye=q.indexOf(_);if(B.ch<ye)B.ch=ye;else if(ye<B.ch&&q[B.ch]==_){var Ce=/string/.test(y.getTokenTypeAt(ge($,0,1))),me=/string/.test(y.getTokenTypeAt($)),be=Ce&&!me;be||(Q=B.ch,--B.ch)}if(q[B.ch]==_&&!Q)Y=B.ch+1;else for(re=B.ch;re>-1&&!Y;re--)q[re]==_&&(Y=re+1);if(Y&&!Q)for(re=Y,se=q.length;re<se&&!Q;re++)q[re]==_&&(Q=re);return!Y||!Q?{start:B,end:B}:(N&&(--Y,++Q),{start:new De(B.line,Y),end:new De(B.line,Q)})}function zi(){}function Rn(y){var $=y.state.vim;return $.searchState_||($.searchState_=new zi)}function Er(y){return Hi(y,"/")}function no(y){return _s(y,"/")}function Hi(y,$){var _=_s(y,$)||[];if(!_.length)return[];var N=[];if(_[0]===0){for(var B=0;B<_.length;B++)typeof _[B]=="number"&&N.push(y.substring(_[B]+1,_[B+1]));return N}}function _s(y,$){$||($="/");for(var _=!1,N=[],B=0;B<y.length;B++){var j=y.charAt(B);!_&&j==$&&N.push(B),_=!_&&j=="\\"}return N}function la(y){for(var $="|(){",_="}",N=!1,B=[],j=-1;j<y.length;j++){var q=y.charAt(j)||"",Y=y.charAt(j+1)||"",Q=Y&&$.indexOf(Y)!=-1;N?((q!=="\\"||!Q)&&B.push(q),N=!1):q==="\\"?(N=!0,Y&&_.indexOf(Y)!=-1&&(Q=!0),(!Q||Y==="\\")&&B.push(q)):(B.push(q),Q&&Y!=="\\"&&B.push("\\"))}return B.join("")}function Xa(y){for(var $=!1,_=[],N=-1;N<y.length;N++){var B=y.charAt(N)||"",j=y.charAt(N+1)||"";Ai[B+j]?(_.push(Ai[B+j]),N++):$?(_.push(B),$=!1):B==="\\"?($=!0,o(j)||j==="$"?_.push("$"):j!=="/"&&j!=="\\"&&_.push("\\")):(B==="$"&&_.push("$"),_.push(B),j==="/"&&_.push("\\"))}return _.join("")}function Qa(y){for(var $=new je.StringStream(y),_=[];!$.eol();){for(;$.peek()&&$.peek()!="\\";)_.push($.next());var N=!1;for(var B in pr)if($.match(B,!0)){N=!0,_.push(pr[B]);break}N||_.push($.next())}return _.join("")}function Ui(y,$,_){var N=He.registerController.getRegister("/");if(N.setText(y),y instanceof RegExp)return y;var B=no(y),j,q;if(!B.length)j=y;else{j=y.substring(0,B[0]);var Y=y.substring(B[0]);q=Y.indexOf("i")!=-1}if(!j)return null;k("pcre")||(j=la(j)),_&&($=/^[^A-Z]*$/.test(j));var Q=new RegExp(j,$||q?"im":"m");return Q}function li(y){typeof y=="string"&&(y=document.createElement(y));for(var $,_=1;_<arguments.length;_++)if($=arguments[_])if(typeof $!="object"&&($=document.createTextNode($)),$.nodeType)y.appendChild($);else for(var N in $)Object.prototype.hasOwnProperty.call($,N)&&(N[0]==="$"?y.style[N.slice(1)]=$[N]:y.setAttribute(N,$[N]));return y}function Kt(y,$){var _=li("div",{$color:"red",$whiteSpace:"pre",class:"cm-vim-message"},$);y.openNotification?y.openNotification(_,{bottom:!0,duration:5e3}):alert(_.innerText)}function ca(y,$){return li("div",{$display:"flex"},li("span",{$fontFamily:"monospace",$whiteSpace:"pre",$flex:1},y,li("input",{type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false",$width:"100%"})),$&&li("span",{$color:"#888"},$))}function Ir(y,$){if(Pr.length){$.value||($.value=""),An=$;return}var _=ca($.prefix,$.desc);if(y.openDialog)y.openDialog(_,$.onClose,{onKeyDown:$.onKeyDown,onKeyUp:$.onKeyUp,bottom:!0,selectValueOnOpen:!1,value:$.value});else{var N="";typeof $.prefix!="string"&&$.prefix&&(N+=$.prefix.textContent),$.desc&&(N+=" "+$.desc),$.onClose(prompt(N,""))}}function Xn(y,$){if(y instanceof RegExp&&$ instanceof RegExp){for(var _=["global","multiline","ignoreCase","source"],N=0;N<_.length;N++){var B=_[N];if(y[B]!==$[B])return!1}return!0}return!1}function Cn(y,$,_,N){if($){var B=Rn(y),j=Ui($,!!_,!!N);if(j)return wi(y,j),Xn(j,B.getQuery())||B.setQuery(j),j}}function Bn(y){if(y.source.charAt(0)=="^")var $=!0;return{token:function(_){if($&&!_.sol()){_.skipToEnd();return}var N=_.match(y,!1);if(N)return N[0].length==0?(_.next(),"searching"):!_.sol()&&(_.backUp(1),!y.exec(_.next()+N[0]))?(_.next(),null):(_.match(y),"searching");for(;!_.eol()&&(_.next(),!_.match(y,!1)););},query:y}}function wi(y,$){clearTimeout(gr);var _=Rn(y);_.highlightTimeout=gr,gr=setTimeout(function(){if(y.state.vim){var N=Rn(y);N.highlightTimeout=null;var B=N.getOverlay();(!B||$!=B.query)&&(B&&y.removeOverlay(B),B=Bn($),y.addOverlay(B),y.showMatchesOnScrollbar&&(N.getScrollbarAnnotate()&&N.getScrollbarAnnotate().clear(),N.setScrollbarAnnotate(y.showMatchesOnScrollbar($))),N.setOverlay(B))}},50)}function Lr(y,$,_,N){return N===void 0&&(N=1),y.operation(function(){for(var B=y.getCursor(),j=y.getSearchCursor(_,B),q=0;q<N;q++){var Y=j.find($);if(q==0&&Y&&gt(j.from(),B)){var Q=$?j.from():j.to();Y=j.find($),Y&&!Y[0]&&gt(j.from(),Q)&&y.getLine(Q.line).length==Q.ch&&(Y=j.find($))}if(!Y&&(j=y.getSearchCursor(_,$?new De(y.lastLine()):new De(y.firstLine(),0)),!j.find($)))return}return j.from()})}function xi(y,$,_,N,B){return N===void 0&&(N=1),y.operation(function(){var j=y.getCursor(),q=y.getSearchCursor(_,j),Y=q.find(!$);!B.visualMode&&Y&&gt(q.from(),j)&&q.find(!$);for(var Q=0;Q<N;Q++)if(Y=q.find($),!Y&&(q=y.getSearchCursor(_,$?new De(y.lastLine()):new De(y.firstLine(),0)),!q.find($)))return;return[q.from(),q.to()]})}function jo(y){var $=Rn(y);$.highlightTimeout&&(clearTimeout($.highlightTimeout),$.highlightTimeout=null),y.removeOverlay(Rn(y).getOverlay()),$.setOverlay(null),$.getScrollbarAnnotate()&&($.getScrollbarAnnotate().clear(),$.setScrollbarAnnotate(null))}function Ss(y,$,_){return typeof y!="number"&&(y=y.line),$ instanceof Array?x(y,$):typeof _=="number"?y>=$&&y<=_:y==$}function ro(y){var $=y.ace.renderer;return{top:$.getFirstFullyVisibleRow(),bottom:$.getLastFullyVisibleRow()}}function Xr(y,$,_){if(_=="'"||_=="`")return He.jumpList.find(y,-1)||new De(0,0);if(_==".")return mo(y);var N=$.marks[_];return N&&N.find()}function mo(y){if(y.getLastEditEnd)return y.getLastEditEnd();for(var $=y.doc.history.done,_=$.length;_--;)if($[_].changes)return Xe($[_].changes[0].to)}function zo(y,$,_,N,B,j,q,Y,Q){function re(){y.operation(function(){for(;!Oe;)se(),Ce();me()})}function se(){var tt=y.getRange(j.from(),j.to()),at=tt.replace(q,Y),_n=j.to().line;j.replace(at),Ge=j.to().line,B+=Ge-_n,ht=Ge<_n}function ye(){var tt=Re&&Xe(j.to()),at=j.findNext();return at&&!at[0]&&tt&&gt(j.from(),tt)&&(at=j.findNext()),at}function Ce(){for(;ye()&&Ss(j.from(),N,B);)if(!(!_&&j.from().line==Ge&&!ht)){y.scrollIntoView(j.from(),30),y.setSelection(j.from(),j.to()),Re=j.from(),Oe=!1;return}Oe=!0}function me(tt){if(tt&&tt(),y.focus(),Re){y.setCursor(Re);var at=y.state.vim;at.exMode=!1,at.lastHPos=at.lastHSPos=Re.ch}Q&&Q()}function be(tt,at,_n){je.e_stop(tt);var dt=H(tt);switch(dt){case"y":se(),Ce();break;case"n":Ce();break;case"a":var Mn=Q;Q=void 0,y.operation(re),Q=Mn;break;case"l":se();case"q":case"<Esc>":case"<C-c>":case"<C-[>":me(_n)}return Oe&&me(_n),!0}y.state.vim.exMode=!0;var Oe=!1,Re,Ge,ht;if(Ce(),Oe){Kt(y,"No matches for "+q.source);return}if(!$){re(),Q&&Q();return}Ir(y,{prefix:li("span","replace with ",li("strong",Y)," (y/n/a/q/l)"),onKeyDown:be})}function Qr(y,$){var _=y.state.vim,N=He.macroModeState,B=He.registerController.getRegister("."),j=N.isPlaying,q=N.lastInsertModeChanges;j||(y.off("change",vo),_.insertEnd&&_.insertEnd.clear(),_.insertEnd=null,je.off(y.getInputField(),"keydown",Ms)),!j&&_.insertModeRepeat>1&&(ua(y,_,_.insertModeRepeat-1,!0),_.lastEditInputState.repeatOverride=_.insertModeRepeat),delete _.insertModeRepeat,_.insertMode=!1,$||y.setCursor(y.getCursor().line,y.getCursor().ch-1),y.setOption("keyMap","vim"),y.setOption("disableInput",!0),y.toggleOverwrite(!1),B.setText(q.changes.join("")),je.signal(y,"vim-mode-change",{mode:"normal"}),N.isRecording&&ur(N)}function Ho(y){On.unshift(y)}function As(y,$,_,N,B){var j={keys:y,type:$};j[$]=_,j[$+"Args"]=N;for(var q in B)j[q]=B[q];Ho(j)}function Ts(y,$,_,N){var B=He.registerController.getRegister(N);if(N==":"){B.keyBuffer[0]&&kr.processCommand(y,B.keyBuffer[0]),_.isPlaying=!1;return}var j=B.keyBuffer,q=0;_.isPlaying=!0,_.replaySearchQueries=B.searchQueries.slice(0);for(var Y=0;Y<j.length;Y++)for(var Q=j[Y],re,se;Q;)if(re=/<\w+-.+?>|<\w+>|./.exec(Q),se=re[0],Q=Q.substring(re.index+se.length),_t.handleKey(y,se,"macro"),$.insertMode){var ye=B.insertModeChanges[q++].changes;He.macroModeState.lastInsertModeChanges.changes=ye,Go(y,ye,1),Qr(y)}_.isPlaying=!1}function Uo(y,$){if(!y.isPlaying){var _=y.latestRegister,N=He.registerController.getRegister(_);N&&N.pushText($)}}function ur(y){if(!y.isPlaying){var $=y.latestRegister,_=He.registerController.getRegister($);_&&_.pushInsertModeChanges&&_.pushInsertModeChanges(y.lastInsertModeChanges)}}function $s(y,$){if(!y.isPlaying){var _=y.latestRegister,N=He.registerController.getRegister(_);N&&N.pushSearchQuery&&N.pushSearchQuery($)}}function vo(y,$){var _=He.macroModeState,N=_.lastInsertModeChanges;if(!_.isPlaying)for(var B=y.state.vim;$;){if(N.expectCursorActivityForChange=!0,N.ignoreCount>1)N.ignoreCount--;else if($.origin=="+input"||$.origin=="paste"||$.origin===void 0){var j=y.listSelections().length;j>1&&(N.ignoreCount=j);var q=$.text.join(`
1404
+ `);if(N.maybeReset&&(N.changes=[],N.maybeReset=!1),q)if(y.state.overwrite&&!/\n/.test(q))N.changes.push([q]);else{if(q.length>1){var Y=B&&B.insertEnd&&B.insertEnd.find(),Q=y.getCursor();if(Y&&Y.line==Q.line){var re=Y.ch-Q.ch;re>0&&re<q.length&&(N.changes.push([q,re]),q="")}}q&&N.changes.push(q)}}$=$.next}}function Vo(y){var $=y.state.vim;if($.insertMode){var _=He.macroModeState;if(_.isPlaying)return;var N=_.lastInsertModeChanges;N.expectCursorActivityForChange?N.expectCursorActivityForChange=!1:(N.maybeReset=!0,$.insertEnd&&$.insertEnd.clear(),$.insertEnd=y.setBookmark(y.getCursor(),{insertLeft:!0}))}else y.curOp.isVimOp||qo(y,$)}function qo(y,$,_){var N=y.getCursor("anchor"),B=y.getCursor("head");if($.visualMode&&!y.somethingSelected()?At(y,!1):!$.visualMode&&!$.insertMode&&y.somethingSelected()&&($.visualMode=!0,$.visualLine=!1,je.signal(y,"vim-mode-change",{mode:"visual"})),$.visualMode){var j=lt(B,N)?0:-1,q=lt(B,N)?-1:0;B=ge(B,0,j),N=ge(N,0,q),$.sel={anchor:N,head:B},ai(y,$,"<",mt(B,N)),ai(y,$,">",sn(B,N))}else!$.insertMode&&!_&&($.lastHPos=y.getCursor().ch)}function io(y,$){this.keyName=y,this.key=$.key,this.ctrlKey=$.ctrlKey,this.altKey=$.altKey,this.metaKey=$.metaKey,this.shiftKey=$.shiftKey}function Ms(y){var $=He.macroModeState,_=$.lastInsertModeChanges,N=je.keyName?je.keyName(y):y.key;N&&(N.indexOf("Delete")!=-1||N.indexOf("Backspace")!=-1)&&(_.maybeReset&&(_.changes=[],_.maybeReset=!1),_.changes.push(new io(N,y)))}function ua(y,$,_,N){function B(){Y?jn.processAction(y,$,$.lastEditActionCommand):jn.evalInput(y,$)}function j(se){if(q.lastInsertModeChanges.changes.length>0){se=$.lastEditActionCommand?se:1;var ye=q.lastInsertModeChanges;Go(y,ye.changes,se)}}var q=He.macroModeState;q.isPlaying=!0;var Y=!!$.lastEditActionCommand,Q=$.inputState;if($.inputState=$.lastEditInputState,Y&&$.lastEditActionCommand.interlaceInsertRepeat)for(var re=0;re<_;re++)B(),j(1);else N||B(),j(_);$.inputState=Q,$.insertMode&&!N&&Qr(y),q.isPlaying=!1}function Ko(y,$){je.lookupKey($,"vim-insert",function(_){return typeof _=="string"?je.commands[_](y):_(y),!0})}function Go(y,$,_){var N=y.getCursor("head"),B=He.macroModeState.lastInsertModeChanges.visualBlock;B&&(nr(y,N,B+1),_=y.listSelections().length,y.setCursor(N));for(var j=0;j<_;j++){B&&y.setCursor(ge(N,j,0));for(var q=0;q<$.length;q++){var Y=$[q];if(Y instanceof io)Ko(y,Y.keyName);else if(typeof Y=="string")y.replaceSelection(Y);else{var Q=y.getCursor(),re=ge(Q,0,Y[0].length-(Y[1]||0));y.replaceRange(Y[0],Q,Y[1]?Q:re),y.setCursor(re)}}}B&&y.setCursor(ge(N,0,1))}function Es(y,$,_,N){$.length>1&&$[0]=="n"&&($=$.replace("numpad","")),$=Rr[$]||$;var B="";if(_.ctrlKey&&(B+="C-"),_.altKey&&(B+="A-"),(B||$.length>1)&&_.shiftKey&&(B+="S-"),N&&!N.expectLiteralNext&&$.length==1){if(Qn.keymap&&$ in Qn.keymap)(Qn.remapCtrl!==!1||!B)&&($=Qn.keymap[$]);else if($.charCodeAt(0)>255){var j=_.code&&_.code.slice(-1)||"";_.shiftKey||(j=j.toLowerCase()),j&&($=j)}}return B+=$,B.length>1&&(B="<"+B+">"),B}function Yo(y){var $=new y.constructor;return Object.keys(y).forEach(function(_){if(_!="insertEnd"){var N=y[_];Array.isArray(N)?N=N.slice():N&&typeof N=="object"&&N.constructor!=Object&&(N=Yo(N)),$[_]=N}}),y.sel&&($.sel={head:y.sel.head&&Xe(y.sel.head),anchor:y.sel.anchor&&Xe(y.sel.anchor)}),$}function yo(y,$,_){var N=!1,B=_t.maybeInitVimState_(y),j=B.visualBlock||B.wasInVisualBlock,q=y.ace.inMultiSelectMode;if(B.wasInVisualBlock&&!q?B.wasInVisualBlock=!1:q&&B.visualBlock&&(B.wasInVisualBlock=!0),$=="<Esc>"&&!B.insertMode&&!B.visualMode&&q)y.ace.exitMultiSelectMode();else if(j||!q||y.ace.inVirtualSelectionMode)N=_t.handleKey(y,$,_);else{var Y=Yo(B),Q=B.inputState.changeQueueList||[];y.operation(function(){y.curOp.isVimOp=!0;var re=0;y.ace.forEachSelection(function(){var se=y.ace.selection;y.state.vim.lastHPos=se.$desiredColumn==null?se.lead.column:se.$desiredColumn,y.state.vim.inputState.changeQueue=Q[re];var ye=y.getCursor("head"),Ce=y.getCursor("anchor"),me=lt(ye,Ce)?0:-1,be=lt(ye,Ce)?-1:0;ye=ge(ye,0,me),Ce=ge(Ce,0,be),y.state.vim.sel.head=ye,y.state.vim.sel.anchor=Ce,N=di(y,$,_),se.$desiredColumn=y.state.vim.lastHPos==-1?null:y.state.vim.lastHPos,y.ace.inVirtualSelectionMode&&(Q[re]=y.state.vim.inputState.changeQueue),y.virtualSelectionMode()&&(y.state.vim=Yo(Y)),re++}),y.curOp.cursorActivity&&!N&&(y.curOp.cursorActivity=!1),B.status=y.state.vim.status,y.state.vim=B,B.inputState.changeQueueList=Q,B.inputState.changeQueue=null},!0)}return N&&!B.visualMode&&!B.insert&&B.visualMode!=y.somethingSelected()&&qo(y,B,!0),N}function Ci(y,$){$.off("beforeEndOperation",Ci);var _=$.state.cm.vimCmd;_&&$.execCommand(_.exec?_:_.name,_.args),$.curOp=$.prevOp}var hr=n("../range").Range,oo=n("../lib/event_emitter").EventEmitter,Vi=n("../lib/dom"),ha=n("../lib/oop"),Za=n("../lib/keys"),bo=n("../lib/event"),qi=n("../search").Search,wo=n("../lib/useragent"),Xo=n("../search_highlight").SearchHighlight,xo=n("../commands/multi_select_commands"),da=n("../mode/text").Mode.prototype.tokenRe,so=n("../ext/hardwrap").hardWrap;n("../multi_select");var je=function(y){this.ace=y,this.state={},this.marks={},this.options={},this.$uid=0,this.onChange=this.onChange.bind(this),this.onSelectionChange=this.onSelectionChange.bind(this),this.onBeforeEndOperation=this.onBeforeEndOperation.bind(this),this.ace.on("change",this.onChange),this.ace.on("changeSelection",this.onSelectionChange),this.ace.on("beforeEndOperation",this.onBeforeEndOperation)};je.Pos=function(y,$){if(!(this instanceof De))return new De(y,$);this.line=y,this.ch=$},je.defineOption=function(y,$,_){},je.commands={redo:function(y){y.ace.redo()},undo:function(y){y.ace.undo()},newlineAndIndent:function(y){y.ace.insert(`
1405
1405
  `)},goLineLeft:function(y){y.ace.selection.moveCursorLineStart()},goLineRight:function(y){y.ace.selection.moveCursorLineEnd()}},je.keyMap={},je.addClass=je.rmClass=function(){},je.e_stop=je.e_preventDefault=bo.stopEvent,je.keyName=function(y){var $=Za[y.keyCode]||y.key||"";return $.length==1&&($=$.toUpperCase()),$=bo.getModifierString(y).replace(/(^|-)\w/g,function(_){return _.toUpperCase()})+$,$},je.keyMap.default=function(y){return function($){var _=$.ace.commands.commandKeyBinding[y.toLowerCase()];return _&&$.ace.execCommand(_)!==!1}},je.lookupKey=function y($,_,N){_||(_="default"),typeof _=="string"&&(_=je.keyMap[_]||je.keyMap.default);var B=typeof _=="function"?_($):_[$];if(B===!1)return"nothing";if(B==="...")return"multi";if(B!=null&&N(B))return"handled";if(_.fallthrough){if(!Array.isArray(_.fallthrough))return y($,_.fallthrough,N);for(var j=0;j<_.fallthrough.length;j++){var q=y($,_.fallthrough[j],N);if(q)return q}}},je.findMatchingTag=function(y,$){return y.findMatchingTag($)},je.findEnclosingTag=function(y,$){},je.signal=function(y,$,_){return y._signal($,_)},je.on=bo.addListener,je.off=bo.removeListener,je.isWordChar=function(y){return y<""?/^\w$/.test(y):(da.lastIndex=0,da.test(y))},(function(){ha.implement(je.prototype,oo),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(_){this.$lineHandleChanges&&this.$lineHandleChanges.push(_);var N={text:_.action[0]=="i"?_.lines:[]},B=this.curOp=this.curOp||{};B.changeHandlers||(B.changeHandlers=this._eventRegistry.change&&this._eventRegistry.change.slice()),B.lastChange?B.lastChange.next=B.lastChange=N:B.lastChange=B.change=N,this.$updateMarkers(_)},this.onSelectionChange=function(){var _=this.curOp=this.curOp||{};_.cursorActivityHandlers||(_.cursorActivityHandlers=this._eventRegistry.cursorActivity&&this._eventRegistry.cursorActivity.slice()),this.curOp.cursorActivity=!0,this.ace.inMultiSelectMode&&this.ace.keyBinding.removeKeyboardHandler(xo.keyboardHandler)},this.operation=function(_,N){if(!N&&this.curOp||N&&this.curOp&&this.curOp.force)return _();if((N||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),!this.ace.curOp){var B=this.ace.prevOp;this.ace.startOperation({command:{name:"vim",scrollIntoView:"cursor"}})}var j=this.curOp=this.curOp||{};this.curOp.force=N;var q=_();return this.ace.curOp&&this.ace.curOp.command.name=="vim"&&(this.state.dialog&&(this.ace.curOp.command.scrollIntoView=this.ace.curOp.vimDialogScroll),this.ace.endOperation(),!j.cursorActivity&&!j.lastChange&&B&&(this.ace.prevOp=B)),(N||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),q},this.onBeforeEndOperation=function(){var _=this.curOp;_&&(_.change&&this.signal("change",_.change,_),_&&_.cursorActivity&&this.signal("cursorActivity",null,_),this.curOp=null)},this.signal=function(_,N,B){var j=B?B[_+"Handlers"]:(this._eventRegistry||{})[_];if(j){j=j.slice();for(var q=0;q<j.length;q++)j[q](this,N)}},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(_,N){typeof _=="object"&&(N=_.ch,_=_.line);var B=!this.curOp&&!this.ace.inVirtualSelectionMode;this.ace.inVirtualSelectionMode||this.ace.exitMultiSelectMode(),this.ace.session.unfold({row:_,column:N}),this.ace.selection.moveTo(_,N),B&&(this.ace.renderer.scrollCursorIntoView(),this.ace.endOperation())},this.getCursor=function(_){var N=this.ace.selection,B=_=="anchor"?N.isEmpty()?N.lead:N.anchor:_=="head"||!_?N.lead:N.getRange()[_];return p(B)},this.listSelections=function(_){var N=this.ace.multiSelect.rangeList.ranges;return!N.length||this.ace.inVirtualSelectionMode?[{anchor:this.getCursor("anchor"),head:this.getCursor("head")}]:N.map(function(B){return{anchor:this.clipPos(p(B.cursor==B.end?B.start:B.end)),head:this.clipPos(p(B.cursor))}},this)},this.setSelections=function(_,N){var B=this.ace.multiSelect,j=_.map(function(re){var se=d(re.anchor),ye=d(re.head),Ce=hr.comparePoints(se,ye)<0?new hr.fromPoints(se,ye):new hr.fromPoints(ye,se);return Ce.cursor=hr.comparePoints(Ce.start,ye)?Ce.end:Ce.start,Ce});if(this.ace.inVirtualSelectionMode){this.ace.selection.fromOrientedRange(j[0]);return}N?j[N]&&j.push(j.splice(N,1)[0]):j=j.reverse(),B.toSingleRange(j[0].clone());for(var q=this.ace.session,Y=0;Y<j.length;Y++){var Q=q.$clipRangeToDocument(j[Y]);B.addRange(Q)}},this.setSelection=function(_,N,B){var j=this.ace.selection;j.moveTo(_.line,_.ch),j.selectTo(N.line,N.ch),B&&B.origin=="*mouse"&&this.onBeforeEndOperation()},this.somethingSelected=function(_){return!this.ace.selection.isEmpty()},this.clipPos=function(_){var N=this.ace.session.$clipPositionToDocument(_.line,_.ch);return p(N)},this.foldCode=function(_){this.ace.session.$toggleFoldWidget(_.line,{})},this.markText=function(_){return{clear:function(){},find:function(){}}},this.$updateMarkers=function(_){var N=_.action=="insert",B=_.start,j=_.end,q=(j.row-B.row)*(N?1:-1),Y=(j.column-B.column)*(N?1:-1);N&&(j=B);for(var Q in this.marks){var re=this.marks[Q],se=hr.comparePoints(re,B);if(!(se<0)){if(se===0&&N)if(!re.$insertRight)se=1;else{if(re.bias!=1){re.bias=-1;continue}se=1}var ye=N?se:hr.comparePoints(re,j);if(ye>0){re.row+=q,re.column+=re.row==j.row?Y:0;continue}!N&&ye<=0&&(re.row=B.row,re.column=B.column,ye===0&&(re.bias=1))}}};var y=function(_,N,B,j){this.cm=_,this.id=N,this.row=B,this.column=j,_.marks[this.id]=this};y.prototype.clear=function(){delete this.cm.marks[this.id]},y.prototype.find=function(){return p(this)},this.setBookmark=function(_,N){var B=new y(this,this.$uid++,_.line,_.ch);return(!N||!N.insertLeft)&&(B.$insertRight=!0),this.marks[B.id]=B,B},this.moveH=function(_,N){if(N=="char"){var B=this.ace.selection;B.clearSelection(),B.moveCursorBy(0,_)}},this.findPosV=function(_,N,B,j){if(B=="page"){var q=this.ace.renderer,Y=q.layerConfig;N*=Math.floor(Y.height/Y.lineHeight),B="line"}if(B=="line"){var Q=this.ace.session.documentToScreenPosition(_.line,_.ch);j!=null&&(Q.column=j),Q.row+=N,Q.row=Math.min(Math.max(0,Q.row),this.ace.session.getScreenLength()-1);var re=this.ace.session.screenToDocumentPosition(Q.row,Q.column);return p(re)}debugger},this.charCoords=function(_,N){if(N=="div"||!N){var B=this.ace.session.documentToScreenPosition(_.line,_.ch);return{left:B.column,top:B.row}}if(N=="local"){var j=this.ace.renderer,B=this.ace.session.documentToScreenPosition(_.line,_.ch),q=j.layerConfig.lineHeight,Y=j.layerConfig.characterWidth,Q=q*B.row;return{left:B.column*Y,top:Q,bottom:Q+q}}},this.coordsChar=function(_,N){var B=this.ace.renderer;if(N=="local"){var j=Math.max(0,Math.floor(_.top/B.lineHeight)),q=Math.max(0,Math.floor(_.left/B.characterWidth)),Y=B.session.screenToDocumentPosition(j,q);return p(Y)}if(N=="div")throw"not implemented"},this.getSearchCursor=function(_,N,B){var j=!1,q=!1;_ instanceof RegExp&&!_.global&&(j=!_.ignoreCase,_=_.source,q=!0),_=="\\n"&&(_=`
1406
1406
  `,q=!1);var Y=new qi;N.ch==null&&(N.ch=Number.MAX_VALUE);var Q={row:N.line,column:N.ch},re=this,se=null;return{findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(ye){Y.setOptions({needle:_,caseSensitive:j,wrap:!1,backwards:ye,regExp:q,start:se||Q});var Ce=Y.find(re.ace.session);return se=Ce,se&&[!se.isEmpty()]},from:function(){return se&&p(se.start)},to:function(){return se&&p(se.end)},replace:function(ye){se&&(se.end=re.ace.session.doc.replace(se,ye))}}},this.scrollTo=function(_,N){var B=this.ace.renderer,j=B.layerConfig,q=j.maxHeight;q-=(B.$size.scrollerHeight-B.lineHeight)*B.$scrollPastEnd,N!=null&&this.ace.session.setScrollTop(Math.max(0,Math.min(N,q))),_!=null&&this.ace.session.setScrollLeft(Math.max(0,Math.min(_,j.width)))},this.scrollInfo=function(){return 0},this.scrollIntoView=function(_,N){if(_){var B=this.ace.renderer,j={top:0,bottom:N};B.scrollCursorIntoView(d(_),B.lineHeight*2/B.$size.scrollerHeight,j)}},this.getLine=function(_){return this.ace.session.getLine(_)},this.getRange=function(_,N){return this.ace.session.getTextRange(new hr(_.line,_.ch,N.line,N.ch))},this.replaceRange=function(_,N,B){B||(B=N);var j=new hr(N.line,N.ch,B.line,B.ch);return this.ace.session.$clipRangeToDocument(j),this.ace.session.replace(j,_)},this.replaceSelection=this.replaceSelections=function(_){var N=Array.isArray(_)&&_,B=this.ace.selection;if(this.ace.inVirtualSelectionMode){this.ace.session.replace(B.getRange(),N?_[0]||"":_);return}B.inVirtualSelectionMode=!0;var j=B.rangeList.ranges;j.length||(j=[this.ace.multiSelect.getRange()]);for(var q=j.length;q--;)this.ace.session.replace(j[q],N?_[q]||"":_);B.inVirtualSelectionMode=!1},this.getSelection=function(){return this.ace.getSelectedText()},this.getSelections=function(){return this.listSelections().map(function(_){return this.getRange(_.anchor,_.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(_,N){switch(this.state[_]=N,_){case"indentWithTabs":_=$[_],N=!N;break;case"keyMap":this.state.$keyMap=N;return;default:_=$[_]}_&&this.ace.setOption(_,N)},this.getOption=function(_){var N,B=$[_];switch(B&&(N=this.ace.getOption(B)),_){case"indentWithTabs":return _=$[_],!N;case"keyMap":return this.state.$keyMap||"vim"}return B?N:this.state[_]},this.toggleOverwrite=function(_){return this.state.overwrite=_,this.ace.setOverwrite(_)},this.addOverlay=function(_){if(!this.$searchHighlight||!this.$searchHighlight.session){var N=new Xo(null,"ace_highlight-marker","text"),B=this.ace.session.addDynamicMarker(N);N.id=B.id,N.session=this.ace.session,N.destroy=function(q){N.session.off("change",N.updateOnChange),N.session.off("changeEditor",N.destroy),N.session.removeMarker(N.id),N.session=null},N.updateOnChange=function(q){var Y=q.start.row;Y==q.end.row?N.cache[Y]=void 0:N.cache.splice(Y,N.cache.length)},N.session.on("changeEditor",N.destroy),N.session.on("change",N.updateOnChange)}var j=new RegExp(_.query.source,"gmi");this.$searchHighlight=_.highlight=N,this.$searchHighlight.setRegexp(j),this.ace.renderer.updateBackMarkers()},this.removeOverlay=function(_){this.$searchHighlight&&this.$searchHighlight.session&&this.$searchHighlight.destroy()},this.getScrollInfo=function(){var _=this.ace.renderer,N=_.layerConfig;return{left:_.scrollLeft,top:_.scrollTop,height:N.maxHeight,width:N.width,clientHeight:N.height,clientWidth:N.width}},this.getValue=function(){return this.ace.getValue()},this.setValue=function(_){return this.ace.setValue(_,-1)},this.getTokenTypeAt=function(_){var N=this.ace.session.getTokenAt(_.line,_.ch);return N&&/comment|string/.test(N.type)?"string":""},this.findMatchingBracket=function(_){var N=this.ace.session.findMatchingBracket(d(_));return{to:N&&p(N)}},this.findMatchingTag=function(_){var N=this.ace.session.getMatchingTags(d(_));if(N)return{open:{from:p(N.openTag.start),to:p(N.openTag.end)},close:{from:p(N.closeTag.start),to:p(N.closeTag.end)}}},this.indentLine=function(_,N){N===!0?this.ace.session.indentRows(_,_," "):N===!1&&this.ace.session.outdentRows(new hr(_,0,_,0))},this.indexFromPos=function(_){return this.ace.session.doc.positionToIndex(d(_))},this.posFromIndex=function(_){return p(this.ace.session.doc.indexToPosition(_))},this.focus=function(_){return this.ace.textInput.focus()},this.blur=function(_){return this.ace.blur()},this.defaultTextHeight=function(_){return this.ace.renderer.layerConfig.lineHeight},this.scanForBracket=function(_,N,B,j){var q=j.bracketRegex.source,Y=/paren|text|operator|tag/;if(N==1)var Q=this.ace.session.$findClosingBracket(q.slice(1,2),d(_),Y);else{var Q=this.ace.session.$findOpeningBracket(q.slice(-2,-1),{row:_.line,column:_.ch+1},Y);!Q&&j.bracketRegex&&j.bracketRegex.test(this.getLine(_.line)[_.ch-1])&&(Q={row:_.line,column:_.ch-1})}return Q&&{pos:p(Q)}},this.refresh=function(){return this.ace.resize(!0)},this.getMode=function(){return{name:this.getOption("mode")}},this.execCommand=function(_){if(je.commands.hasOwnProperty(_))return je.commands[_](this);if(_=="indentAuto")return this.ace.execCommand("autoindent");console.log(_+" is not implemented")},this.getLineNumber=function(_){var N=this.$lineHandleChanges;if(!N)return null;for(var B=_.row,j=0;j<N.length;j++){var q=N[j];if(q.start.row!=q.end.row){if(q.action[0]=="i")q.start.row<B&&(B+=q.end.row-q.start.row);else if(q.start.row<B){if(B<q.end.row||B==q.end.row&&q.start.column>0)return null;B-=q.end.row-q.start.row}}}return B},this.getLineHandle=function(_){return this.$lineHandleChanges||(this.$lineHandleChanges=[]),{text:this.ace.session.getLine(_),row:_}},this.releaseLineHandles=function(){this.$lineHandleChanges=void 0},this.getLastEditEnd=function(){var _=this.ace.session.$undoManager;if(_&&_.$lastDelta)return p(_.$lastDelta.end)}}).call(je.prototype);var fa=je.StringStream=function(y,$){this.pos=this.start=0,this.string=y,this.tabSize=$||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};fa.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(y){var $=this.string.charAt(this.pos);if(typeof y=="string")var _=$==y;else var _=$&&(y.test?y.test($):y($));if(_)return++this.pos,$},eatWhile:function(y){for(var $=this.pos;this.eat(y););return this.pos>$},eatSpace:function(){for(var y=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>y},skipToEnd:function(){this.pos=this.string.length},skipTo:function(y){var $=this.string.indexOf(y,this.pos);if($>-1)return this.pos=$,!0},backUp:function(y){this.pos-=y},column:function(){throw"not implemented"},indentation:function(){throw"not implemented"},match:function(y,$,_){if(typeof y!="string"){var N=this.string.slice(this.pos).match(y);return N&&N.index>0?null:(N&&$!==!1&&(this.pos+=N[0].length),N)}var B=function(q){return _?q.toLowerCase():q},j=this.string.substr(this.pos,y.length);if(B(j)==B(y))return $!==!1&&(this.pos+=y.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(y,$){this.lineStart+=y;try{return $()}finally{this.lineStart-=y}}},je.defineExtension=function(y,$){je.prototype[y]=$},Vi.importCssString(`.normal-mode .ace_cursor{
1407
1407
  border: none;
@@ -1436,46 +1436,46 @@ System.register(["vue","vue-router","single-spa","vuex","vuetify"],function(sr,r
1436
1436
  width: 20em;
1437
1437
  color: inherit;
1438
1438
  font-family: monospace;
1439
- }`,"vimMode",!1),function(){function y(_,N,B){var j=_.ace.container,q;return q=j.appendChild(document.createElement("div")),B?q.className="ace_dialog ace_dialog-bottom":q.className="ace_dialog ace_dialog-top",typeof N=="string"?q.innerHTML=N:q.appendChild(N),q}function $(_,N){_.state.currentNotificationClose&&_.state.currentNotificationClose(),_.state.currentNotificationClose=N}je.defineExtension("openDialog",function(_,N,B){function j(ye){if(typeof ye=="string")re.value=ye;else{if(Y||ye&&ye.type=="blur"&&document.activeElement===re)return;Q.state.dialog==q&&(Q.state.dialog=null,Q.focus()),Y=!0,q.remove(),B.onClose&&B.onClose(q);var Ce=Q;Ce.state.vim&&(Ce.state.vim.status=null,Ce.ace._signal("changeStatus"),Ce.ace.renderer.$loop.schedule(Ce.ace.renderer.CHANGE_CURSOR))}}if(!this.virtualSelectionMode()){B||(B={}),$(this,null);var q=y(this,_,B.bottom),Y=!1,Q=this;this.state.dialog=q;var re=q.getElementsByTagName("input")[0],se;return re?(B.value&&(re.value=B.value,B.selectValueOnOpen!==!1&&re.select()),B.onInput&&je.on(re,"input",function(ye){B.onInput(ye,re.value,j)}),B.onKeyUp&&je.on(re,"keyup",function(ye){B.onKeyUp(ye,re.value,j)}),je.on(re,"keydown",function(ye){B&&B.onKeyDown&&B.onKeyDown(ye,re.value,j)||(ye.keyCode==13&&N(re.value),(ye.keyCode==27||B.closeOnEnter!==!1&&ye.keyCode==13)&&(je.e_stop(ye),j()))}),B.closeOnBlur!==!1&&je.on(re,"blur",j),re.focus()):(se=q.getElementsByTagName("button")[0])&&(je.on(se,"click",function(){j(),Q.focus()}),B.closeOnBlur!==!1&&je.on(se,"blur",j),se.focus()),j}}),je.defineExtension("openNotification",function(_,N){function B(){q||(q=!0,clearTimeout(Y),j.remove())}if(!this.virtualSelectionMode()){$(this,B);var j=y(this,_,N&&N.bottom),q=!1,Y,Q=N&&typeof N.duration<"u"?N.duration:5e3;return je.on(j,"click",function(re){je.e_preventDefault(re),B()}),Q&&(Y=setTimeout(B,Q)),B}})}();var De=je.Pos,On=[{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"}],Co=On.length,li=[{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"}],Qn=O(""),pa=/[\d]/,ko=[je.isWordChar,function(y){return y&&!je.isWordChar(y)&&!/\s/.test(y)}],Ci=[function(y){return/\S/.test(y)}],ao=["<",">"],an=["-",'"',".",":","_","/","+"],nn=/^\w$/,ln;try{ln=new RegExp("^[\\p{Lu}]$","u")}catch{ln=/^[A-Z]$/}var Gt={};E("filetype",void 0,"string",["ft"],function(y,$){if($!==void 0){if(y===void 0){var _=$.getOption("mode");return _=="null"?"":_}var _=y==""?"null":y;$.setOption("mode",_)}}),E("textwidth",80,"number",["tw"],function(y,$){if($!==void 0){if(y===void 0){var _=$.getOption("textwidth");return _}var N=Math.round(y);N>1&&$.setOption("textwidth",N)}});var ki=function(){function y(Q,re,se){function ye(Oe){var Re=++B%N,Ge=Y[Re];Ge&&Ge.clear(),Y[Re]=Q.setBookmark(Oe)}var Ce=B%N,me=Y[Ce];if(me){var be=me.find();be&&!gt(be,re)&&ye(re)}else ye(re);ye(se),j=B,q=B-N+1,q<0&&(q=0)}function $(Q,re){B+=re,B>j?B=j:B<q&&(B=q);var se=Y[(N+B)%N];if(se&&!se.find()){var ye=re>0?1:-1,Ce,me=Q.getCursor();do if(B+=ye,se=Y[(N+B)%N],se&&(Ce=se.find())&&!gt(me,Ce))break;while(B<j&&B>q)}return se}function _(Q,re){var se=B,ye=$(Q,re);return B=se,ye&&ye.find()}var N=100,B=-1,j=0,q=0,Y=new Array(N);return{cachedCursor:void 0,add:y,find:_,move:$}},Wn=function(y){return y?{changes:y.changes,expectCursorActivityForChange:y.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};C.prototype={exitMacroRecordMode:function(){var y=He.macroModeState;y.onRecordingDone&&y.onRecordingDone(),y.onRecordingDone=void 0,y.isRecording=!1},enterMacroRecordMode:function(y,$){var _=He.registerController.getRegister($);if(_){if(_.clear(),this.latestRegister=$,y.openDialog){var N=ai("span",{class:"cm-vim-message"},"recording @"+$);this.onRecordingDone=y.openDialog(N,null,{bottom:!0})}this.isRecording=!0}}};var He,Cn,_t={enterVimMode:h,leaveVimMode:g,buildKeyMap:function(){},getRegisterController:function(){return He.registerController},resetVimGlobalState_:R,getVimGlobalState_:function(){return He},maybeInitVimState_:L,suppressErrorLogging:!1,InsertModeKey:io,map:function(y,$,_){kr.map(y,$,_)},unmap:function(y,$){return kr.unmap(y,$)},noremap:function(y,$,_){kr.map(y,$,_,!0)},mapclear:function(y){var $=On.length,_=Co,N=On.slice(0,$-_);if(On=On.slice($-_),y)for(var B=N.length-1;B>=0;B--){var j=N[B];if(y!==j.context)if(j.context)this._mapCommand(j);else{var q=["normal","insert","visual"];for(var Y in q)if(q[Y]!==y){var Q={};for(var re in j)Q[re]=j[re];Q.context=q[Y],this._mapCommand(Q)}}}},langmap:P,vimKeyFromEvent:H,setOption:T,getOption:k,defineOption:E,defineEx:function(y,$,_){if(!$)$=y;else if(y.indexOf($)!==0)throw new Error('(Vim.defineEx) "'+$+'" is not a prefix of "'+y+'", command not registered');Is[y]=_,kr.commandMap_[$]={name:y,shortName:$,type:"api"}},handleKey:function(y,$,_){var N=this.findKey(y,$,_);if(typeof N=="function")return N()},multiSelectHandleKey:yo,findKey:function(y,$,_){function N(){var re=He.macroModeState;if(re.isRecording){if($=="q")return re.exitMacroRecordMode(),S(y),!0;_!="mapping"&&Uo(re,$)}}function B(){if($=="<Esc>"){if(Y.visualMode)At(y);else{if(!Y.insertMode)return;Qr(y)}return S(y),!0}}function j(){if(B())return!0;Y.inputState.keyBuffer.push($);var re=Y.inputState.keyBuffer.join(""),se=$.length==1,ye=jn.matchCommand(re,On,Y.inputState,"insert"),Ce=Y.inputState.changeQueue;if(ye.type=="none")return S(y),!1;if(ye.type=="partial"){if(ye.expectLiteralNext&&(Y.expectLiteralNext=!0),Cn&&window.clearTimeout(Cn),Cn=se&&window.setTimeout(function(){Y.insertMode&&Y.inputState.keyBuffer.length&&S(y)},k("insertModeEscKeysTimeout")),se){var me=y.listSelections();(!Ce||Ce.removed.length!=me.length)&&(Ce=Y.inputState.changeQueue=new D),Ce.inserted+=$;for(var be=0;be<me.length;be++){var Oe=mt(me[be].anchor,me[be].head),Re=sn(me[be].anchor,me[be].head),Ge=y.getRange(Oe,y.state.overwrite?ge(Re,0,1):Re);Ce.removed[be]=(Ce.removed[be]||"")+Ge}}return!se}if(Y.expectLiteralNext=!1,Cn&&window.clearTimeout(Cn),ye.command&&Ce){for(var me=y.listSelections(),be=0;be<me.length;be++){var ht=me[be].head;y.replaceRange(Ce.removed[be]||"",ge(ht,0,-Ce.inserted.length),ht,"+input")}He.macroModeState.lastInsertModeChanges.changes.pop()}return ye.command||S(y),ye.command}function q(){if(N()||B())return!0;Y.inputState.keyBuffer.push($);var re=Y.inputState.keyBuffer.join("");if(/^[1-9]\d*$/.test(re))return!0;var se=/^(\d*)(.*)$/.exec(re);if(!se)return S(y),!1;var ye=Y.visualMode?"visual":"normal",Ce=se[2]||se[1];Y.inputState.operatorShortcut&&Y.inputState.operatorShortcut.slice(-1)==Ce&&(Ce=Y.inputState.operatorShortcut);var me=jn.matchCommand(Ce,On,Y.inputState,ye);return me.type=="none"?(S(y),!1):me.type=="partial"?(me.expectLiteralNext&&(Y.expectLiteralNext=!0),!0):me.type=="clear"?(S(y),!0):(Y.expectLiteralNext=!1,Y.inputState.keyBuffer.length=0,se=/^(\d*)(.*)$/.exec(re),se[1]&&se[1]!="0"&&Y.inputState.pushRepeatDigit(se[1]),me.command)}var Y=L(y),Q;return Y.insertMode?Q=j():Q=q(),Q===!1?!Y.insertMode&&$.length===1?function(){return!0}:void 0:Q===!0?function(){return!0}:function(){if(!((Q.operator||Q.isEdit)&&y.getOption("readOnly")))return y.operation(function(){y.curOp.isVimOp=!0;try{Q.type=="keyToKey"?I(y,Q.toKeys,Q):jn.processCommand(y,Y,Q)}catch(re){throw y.state.vim=void 0,L(y),_t.suppressErrorLogging||console.log(re),re}return!0})}},handleEx:function(y,$){kr.processCommand(y,$)},defineMotion:te,defineAction:ae,defineOperator:ne,mapCommand:As,_mapCommand:Ho,defineRegister:U,exitVisualMode:At,exitInsertMode:Qr},Pr=[],fn=!1,An,rr={Return:"CR",Backspace:"BS",Delete:"Del",Escape:"Esc",Insert:"Ins",ArrowLeft:"Left",ArrowRight:"Right",ArrowUp:"Up",ArrowDown:"Down",Enter:"CR"," ":"Space"},Br={Shift:1,Alt:1,Command:1,Control:1,CapsLock:1,AltGraph:1,Dead:1,Unidentified:1},_i={};"Left|Right|Up|Down|End|Home".split("|").concat(Object.keys(rr)).forEach(function(y){_i[(rr[y]||"").toLowerCase()]=_i[y.toLowerCase()]=y}),E("langmap",void 0,"string",["lmap"],function(y,$){if(y===void 0)return Qn.string;P(y)}),A.prototype.pushRepeatDigit=function(y){this.operator?this.motionRepeat=this.motionRepeat.concat(y):this.prefixRepeat=this.prefixRepeat.concat(y)},A.prototype.getRepeat=function(){var y=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(y=1,this.prefixRepeat.length>0&&(y*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(y*=parseInt(this.motionRepeat.join(""),10))),y},W.prototype={setText:function(y,$,_){this.keyBuffer=[y||""],this.linewise=!!$,this.blockwise=!!_},pushText:function(y,$){$&&(this.linewise||this.keyBuffer.push(`
1439
+ }`,"vimMode",!1),function(){function y(_,N,B){var j=_.ace.container,q;return q=j.appendChild(document.createElement("div")),B?q.className="ace_dialog ace_dialog-bottom":q.className="ace_dialog ace_dialog-top",typeof N=="string"?q.innerHTML=N:q.appendChild(N),q}function $(_,N){_.state.currentNotificationClose&&_.state.currentNotificationClose(),_.state.currentNotificationClose=N}je.defineExtension("openDialog",function(_,N,B){function j(ye){if(typeof ye=="string")re.value=ye;else{if(Y||ye&&ye.type=="blur"&&document.activeElement===re)return;Q.state.dialog==q&&(Q.state.dialog=null,Q.focus()),Y=!0,q.remove(),B.onClose&&B.onClose(q);var Ce=Q;Ce.state.vim&&(Ce.state.vim.status=null,Ce.ace._signal("changeStatus"),Ce.ace.renderer.$loop.schedule(Ce.ace.renderer.CHANGE_CURSOR))}}if(!this.virtualSelectionMode()){B||(B={}),$(this,null);var q=y(this,_,B.bottom),Y=!1,Q=this;this.state.dialog=q;var re=q.getElementsByTagName("input")[0],se;return re?(B.value&&(re.value=B.value,B.selectValueOnOpen!==!1&&re.select()),B.onInput&&je.on(re,"input",function(ye){B.onInput(ye,re.value,j)}),B.onKeyUp&&je.on(re,"keyup",function(ye){B.onKeyUp(ye,re.value,j)}),je.on(re,"keydown",function(ye){B&&B.onKeyDown&&B.onKeyDown(ye,re.value,j)||(ye.keyCode==13&&N(re.value),(ye.keyCode==27||B.closeOnEnter!==!1&&ye.keyCode==13)&&(je.e_stop(ye),j()))}),B.closeOnBlur!==!1&&je.on(re,"blur",j),re.focus()):(se=q.getElementsByTagName("button")[0])&&(je.on(se,"click",function(){j(),Q.focus()}),B.closeOnBlur!==!1&&je.on(se,"blur",j),se.focus()),j}}),je.defineExtension("openNotification",function(_,N){function B(){q||(q=!0,clearTimeout(Y),j.remove())}if(!this.virtualSelectionMode()){$(this,B);var j=y(this,_,N&&N.bottom),q=!1,Y,Q=N&&typeof N.duration<"u"?N.duration:5e3;return je.on(j,"click",function(re){je.e_preventDefault(re),B()}),Q&&(Y=setTimeout(B,Q)),B}})}();var De=je.Pos,On=[{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"}],Co=On.length,ci=[{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"}],Qn=O(""),pa=/[\d]/,ko=[je.isWordChar,function(y){return y&&!je.isWordChar(y)&&!/\s/.test(y)}],ki=[function(y){return/\S/.test(y)}],ao=["<",">"],an=["-",'"',".",":","_","/","+"],nn=/^\w$/,ln;try{ln=new RegExp("^[\\p{Lu}]$","u")}catch{ln=/^[A-Z]$/}var Gt={};E("filetype",void 0,"string",["ft"],function(y,$){if($!==void 0){if(y===void 0){var _=$.getOption("mode");return _=="null"?"":_}var _=y==""?"null":y;$.setOption("mode",_)}}),E("textwidth",80,"number",["tw"],function(y,$){if($!==void 0){if(y===void 0){var _=$.getOption("textwidth");return _}var N=Math.round(y);N>1&&$.setOption("textwidth",N)}});var _i=function(){function y(Q,re,se){function ye(Oe){var Re=++B%N,Ge=Y[Re];Ge&&Ge.clear(),Y[Re]=Q.setBookmark(Oe)}var Ce=B%N,me=Y[Ce];if(me){var be=me.find();be&&!gt(be,re)&&ye(re)}else ye(re);ye(se),j=B,q=B-N+1,q<0&&(q=0)}function $(Q,re){B+=re,B>j?B=j:B<q&&(B=q);var se=Y[(N+B)%N];if(se&&!se.find()){var ye=re>0?1:-1,Ce,me=Q.getCursor();do if(B+=ye,se=Y[(N+B)%N],se&&(Ce=se.find())&&!gt(me,Ce))break;while(B<j&&B>q)}return se}function _(Q,re){var se=B,ye=$(Q,re);return B=se,ye&&ye.find()}var N=100,B=-1,j=0,q=0,Y=new Array(N);return{cachedCursor:void 0,add:y,find:_,move:$}},Wn=function(y){return y?{changes:y.changes,expectCursorActivityForChange:y.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};C.prototype={exitMacroRecordMode:function(){var y=He.macroModeState;y.onRecordingDone&&y.onRecordingDone(),y.onRecordingDone=void 0,y.isRecording=!1},enterMacroRecordMode:function(y,$){var _=He.registerController.getRegister($);if(_){if(_.clear(),this.latestRegister=$,y.openDialog){var N=li("span",{class:"cm-vim-message"},"recording @"+$);this.onRecordingDone=y.openDialog(N,null,{bottom:!0})}this.isRecording=!0}}};var He,kn,_t={enterVimMode:h,leaveVimMode:g,buildKeyMap:function(){},getRegisterController:function(){return He.registerController},resetVimGlobalState_:R,getVimGlobalState_:function(){return He},maybeInitVimState_:L,suppressErrorLogging:!1,InsertModeKey:io,map:function(y,$,_){kr.map(y,$,_)},unmap:function(y,$){return kr.unmap(y,$)},noremap:function(y,$,_){kr.map(y,$,_,!0)},mapclear:function(y){var $=On.length,_=Co,N=On.slice(0,$-_);if(On=On.slice($-_),y)for(var B=N.length-1;B>=0;B--){var j=N[B];if(y!==j.context)if(j.context)this._mapCommand(j);else{var q=["normal","insert","visual"];for(var Y in q)if(q[Y]!==y){var Q={};for(var re in j)Q[re]=j[re];Q.context=q[Y],this._mapCommand(Q)}}}},langmap:P,vimKeyFromEvent:H,setOption:T,getOption:k,defineOption:E,defineEx:function(y,$,_){if(!$)$=y;else if(y.indexOf($)!==0)throw new Error('(Vim.defineEx) "'+$+'" is not a prefix of "'+y+'", command not registered');Is[y]=_,kr.commandMap_[$]={name:y,shortName:$,type:"api"}},handleKey:function(y,$,_){var N=this.findKey(y,$,_);if(typeof N=="function")return N()},multiSelectHandleKey:yo,findKey:function(y,$,_){function N(){var re=He.macroModeState;if(re.isRecording){if($=="q")return re.exitMacroRecordMode(),S(y),!0;_!="mapping"&&Uo(re,$)}}function B(){if($=="<Esc>"){if(Y.visualMode)At(y);else{if(!Y.insertMode)return;Qr(y)}return S(y),!0}}function j(){if(B())return!0;Y.inputState.keyBuffer.push($);var re=Y.inputState.keyBuffer.join(""),se=$.length==1,ye=jn.matchCommand(re,On,Y.inputState,"insert"),Ce=Y.inputState.changeQueue;if(ye.type=="none")return S(y),!1;if(ye.type=="partial"){if(ye.expectLiteralNext&&(Y.expectLiteralNext=!0),kn&&window.clearTimeout(kn),kn=se&&window.setTimeout(function(){Y.insertMode&&Y.inputState.keyBuffer.length&&S(y)},k("insertModeEscKeysTimeout")),se){var me=y.listSelections();(!Ce||Ce.removed.length!=me.length)&&(Ce=Y.inputState.changeQueue=new D),Ce.inserted+=$;for(var be=0;be<me.length;be++){var Oe=mt(me[be].anchor,me[be].head),Re=sn(me[be].anchor,me[be].head),Ge=y.getRange(Oe,y.state.overwrite?ge(Re,0,1):Re);Ce.removed[be]=(Ce.removed[be]||"")+Ge}}return!se}if(Y.expectLiteralNext=!1,kn&&window.clearTimeout(kn),ye.command&&Ce){for(var me=y.listSelections(),be=0;be<me.length;be++){var ht=me[be].head;y.replaceRange(Ce.removed[be]||"",ge(ht,0,-Ce.inserted.length),ht,"+input")}He.macroModeState.lastInsertModeChanges.changes.pop()}return ye.command||S(y),ye.command}function q(){if(N()||B())return!0;Y.inputState.keyBuffer.push($);var re=Y.inputState.keyBuffer.join("");if(/^[1-9]\d*$/.test(re))return!0;var se=/^(\d*)(.*)$/.exec(re);if(!se)return S(y),!1;var ye=Y.visualMode?"visual":"normal",Ce=se[2]||se[1];Y.inputState.operatorShortcut&&Y.inputState.operatorShortcut.slice(-1)==Ce&&(Ce=Y.inputState.operatorShortcut);var me=jn.matchCommand(Ce,On,Y.inputState,ye);return me.type=="none"?(S(y),!1):me.type=="partial"?(me.expectLiteralNext&&(Y.expectLiteralNext=!0),!0):me.type=="clear"?(S(y),!0):(Y.expectLiteralNext=!1,Y.inputState.keyBuffer.length=0,se=/^(\d*)(.*)$/.exec(re),se[1]&&se[1]!="0"&&Y.inputState.pushRepeatDigit(se[1]),me.command)}var Y=L(y),Q;return Y.insertMode?Q=j():Q=q(),Q===!1?!Y.insertMode&&$.length===1?function(){return!0}:void 0:Q===!0?function(){return!0}:function(){if(!((Q.operator||Q.isEdit)&&y.getOption("readOnly")))return y.operation(function(){y.curOp.isVimOp=!0;try{Q.type=="keyToKey"?I(y,Q.toKeys,Q):jn.processCommand(y,Y,Q)}catch(re){throw y.state.vim=void 0,L(y),_t.suppressErrorLogging||console.log(re),re}return!0})}},handleEx:function(y,$){kr.processCommand(y,$)},defineMotion:te,defineAction:ae,defineOperator:ne,mapCommand:As,_mapCommand:Ho,defineRegister:U,exitVisualMode:At,exitInsertMode:Qr},Pr=[],pn=!1,An,rr={Return:"CR",Backspace:"BS",Delete:"Del",Escape:"Esc",Insert:"Ins",ArrowLeft:"Left",ArrowRight:"Right",ArrowUp:"Up",ArrowDown:"Down",Enter:"CR"," ":"Space"},Br={Shift:1,Alt:1,Command:1,Control:1,CapsLock:1,AltGraph:1,Dead:1,Unidentified:1},Si={};"Left|Right|Up|Down|End|Home".split("|").concat(Object.keys(rr)).forEach(function(y){Si[(rr[y]||"").toLowerCase()]=Si[y.toLowerCase()]=y}),E("langmap",void 0,"string",["lmap"],function(y,$){if(y===void 0)return Qn.string;P(y)}),A.prototype.pushRepeatDigit=function(y){this.operator?this.motionRepeat=this.motionRepeat.concat(y):this.prefixRepeat=this.prefixRepeat.concat(y)},A.prototype.getRepeat=function(){var y=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(y=1,this.prefixRepeat.length>0&&(y*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(y*=parseInt(this.motionRepeat.join(""),10))),y},W.prototype={setText:function(y,$,_){this.keyBuffer=[y||""],this.linewise=!!$,this.blockwise=!!_},pushText:function(y,$){$&&(this.linewise||this.keyBuffer.push(`
1440
1440
  `),this.linewise=!0),this.keyBuffer.push(y)},pushInsertModeChanges:function(y){this.insertModeChanges.push(Wn(y))},pushSearchQuery:function(y){this.searchQueries.push(y)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},K.prototype={pushText:function(y,$,_,N,B){if(y!=="_"){N&&_.charAt(_.length-1)!==`
1441
1441
  `&&(_+=`
1442
1442
  `);var j=this.isValidRegister(y)?this.getRegister(y):null;if(!j){switch($){case"yank":this.registers[0]=new W(_,N,B);break;case"delete":case"change":_.indexOf(`
1443
- `)==-1?this.registers["-"]=new W(_,N):(this.shiftNumericRegisters_(),this.registers[1]=new W(_,N))}this.unnamedRegister.setText(_,N,B);return}var q=u(y);q?j.pushText(_,N):j.setText(_,N,B),y==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"&&navigator.clipboard.writeText(_),this.unnamedRegister.setText(j.toString(),N)}},getRegister:function(y){return this.isValidRegister(y)?(y=y.toLowerCase(),this.registers[y]||(this.registers[y]=new W),this.registers[y]):this.unnamedRegister},isValidRegister:function(y){return y&&(x(y,an)||nn.test(y))},shiftNumericRegisters_:function(){for(var y=9;y>=2;y--)this.registers[y]=this.getRegister(""+(y-1))}},Z.prototype={nextMatch:function(y,$){var _=this.historyBuffer,N=$?-1:1;this.initialPrefix===null&&(this.initialPrefix=y);for(var B=this.iterator+N;$?B>=0:B<_.length;B+=N)for(var j=_[B],q=0;q<=j.length;q++)if(this.initialPrefix==j.substring(0,q))return this.iterator=B,j;if(B>=_.length)return this.iterator=_.length,this.initialPrefix;if(B<0)return y},pushInput:function(y){var $=this.historyBuffer.indexOf(y);$>-1&&this.historyBuffer.splice($,1),y.length&&this.historyBuffer.push(y)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var jn={matchCommand:function(y,$,_,N){var B=Te(y,$,N,_);if(!B.full&&!B.partial)return{type:"none"};if(!B.full&&B.partial)return{type:"partial",expectLiteralNext:B.partial.length==1&&B.partial[0].keys.slice(-11)=="<character>"};for(var j,q=0;q<B.full.length;q++){var Y=B.full[q];j||(j=Y)}if(j.keys.slice(-11)=="<character>"||j.keys.slice(-10)=="<register>"){var Q=Ee(y);if(!Q||Q.length>1)return{type:"clear"};_.selectedCharacter=Q}return{type:"full",command:j}},processCommand:function(y,$,_){switch($.inputState.repeatOverride=_.repeatOverride,_.type){case"motion":this.processMotion(y,$,_);break;case"operator":this.processOperator(y,$,_);break;case"operatorMotion":this.processOperatorMotion(y,$,_);break;case"action":this.processAction(y,$,_);break;case"search":this.processSearch(y,$,_);break;case"ex":case"keyToEx":this.processEx(y,$,_);break}},processMotion:function(y,$,_){$.inputState.motion=_.motion,$.inputState.motionArgs=ce(_.motionArgs),this.evalInput(y,$)},processOperator:function(y,$,_){var N=$.inputState;if(N.operator){if(N.operator==_.operator){N.motion="expandToLine",N.motionArgs={linewise:!0},this.evalInput(y,$);return}S(y)}N.operator=_.operator,N.operatorArgs=ce(_.operatorArgs),_.keys.length>1&&(N.operatorShortcut=_.keys),_.exitVisualBlock&&($.visualBlock=!1,Je(y)),$.visualMode&&this.evalInput(y,$)},processOperatorMotion:function(y,$,_){var N=$.visualMode,B=ce(_.operatorMotionArgs);B&&N&&B.visualLine&&($.visualLine=!0),this.processOperator(y,$,_),N||this.processMotion(y,$,_)},processAction:function(y,$,_){var N=$.inputState,B=N.getRepeat(),j=!!B,q=ce(_.actionArgs)||{};N.selectedCharacter&&(q.selectedCharacter=N.selectedCharacter),_.operator&&this.processOperator(y,$,_),_.motion&&this.processMotion(y,$,_),(_.motion||_.operator)&&this.evalInput(y,$),q.repeat=B||1,q.repeatIsExplicit=j,q.registerName=N.registerName,S(y),$.lastMotion=null,_.isEdit&&this.recordLastEdit($,N,_),zn[_.action](y,q,$)},processSearch:function(y,$,_){function N(Re,Ge,ht){He.searchHistoryController.pushInput(Re),He.searchHistoryController.reset();try{xn(y,Re,Ge,ht)}catch{Kt(y,"Invalid regex: "+Re),S(y);return}jn.processMotion(y,$,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:_.searchArgs.toJumplist}})}function B(Re){N(Re,!0,!0);var Ge=He.macroModeState;Ge.isRecording&&$s(Ge,Re)}function j(Re,Ge,ht){var tt=H(Re),st,kn;tt=="<Up>"||tt=="<Down>"?(st=tt=="<Up>",kn=Re.target?Re.target.selectionEnd:0,Ge=He.searchHistoryController.nextMatch(Ge,st)||"",ht(Ge),kn&&Re.target&&(Re.target.selectionEnd=Re.target.selectionStart=Math.min(kn,Re.target.value.length))):tt&&tt!="<Left>"&&tt!="<Right>"&&He.searchHistoryController.reset();var dt;try{dt=xn(y,Ge,!0,!0)}catch{}dt?y.scrollIntoView(Lr(y,!Y,dt),30):(jo(y),y.scrollTo(ye.left,ye.top))}function q(Re,Ge,ht){var tt=H(Re);tt=="<Esc>"||tt=="<C-c>"||tt=="<C-[>"||tt=="<BS>"&&Ge==""?(He.searchHistoryController.pushInput(Ge),He.searchHistoryController.reset(),xn(y,se),jo(y),y.scrollTo(ye.left,ye.top),je.e_stop(Re),S(y),ht(),y.focus()):tt=="<Up>"||tt=="<Down>"?je.e_stop(Re):tt=="<C-u>"&&(je.e_stop(Re),ht(""))}if(y.getSearchCursor){var Y=_.searchArgs.forward,Q=_.searchArgs.wholeWordOnly;Rn(y).setReversed(!Y);var re=Y?"/":"?",se=Rn(y).getQuery(),ye=y.getScrollInfo();switch(_.searchArgs.querySrc){case"prompt":var Ce=He.macroModeState;if(Ce.isPlaying){var Oe=Ce.replaySearchQueries.shift();N(Oe,!0,!1)}else Ir(y,{onClose:B,prefix:re,desc:"(JavaScript regexp)",onKeyUp:j,onKeyDown:q});break;case"wordUnderCursor":var me=kt(y,{noSymbol:!0}),be=!0;if(me||(me=kt(y,{noSymbol:!1}),be=!1),!me){Kt(y,"No word under cursor"),S(y);return}var Oe=y.getLine(me.start.line).substring(me.start.ch,me.end.ch);be&&Q?Oe="\\b"+Oe+"\\b":Oe=wn(Oe),He.jumpList.cachedCursor=y.getCursor(),y.setCursor(me.start),N(Oe,!0,!1)}}},processEx:function(y,$,_){function N(j){He.exCommandHistoryController.pushInput(j),He.exCommandHistoryController.reset(),kr.processCommand(y,j),y.state.vim&&S(y)}function B(j,q,Y){var Q=H(j),re,se;(Q=="<Esc>"||Q=="<C-c>"||Q=="<C-[>"||Q=="<BS>"&&q=="")&&(He.exCommandHistoryController.pushInput(q),He.exCommandHistoryController.reset(),je.e_stop(j),S(y),Y(),y.focus()),Q=="<Up>"||Q=="<Down>"?(je.e_stop(j),re=Q=="<Up>",se=j.target?j.target.selectionEnd:0,q=He.exCommandHistoryController.nextMatch(q,re)||"",Y(q),se&&j.target&&(j.target.selectionEnd=j.target.selectionStart=Math.min(se,j.target.value.length))):Q=="<C-u>"?(je.e_stop(j),Y("")):Q&&Q!="<Left>"&&Q!="<Right>"&&He.exCommandHistoryController.reset()}_.type=="keyToEx"?kr.processCommand(y,_.exArgs.input):$.visualMode?Ir(y,{onClose:N,prefix:":",value:"'<,'>",onKeyDown:B,selectValueOnOpen:!1}):Ir(y,{onClose:N,prefix:":",onKeyDown:B})},evalInput:function(y,$){var _=$.inputState,N=_.motion,B=_.motionArgs||{},j=_.operator,q=_.operatorArgs||{},Y=_.registerName,Q=$.sel,re=Xe($.visualMode?ue(y,Q.head):y.getCursor("head")),se=Xe($.visualMode?ue(y,Q.anchor):y.getCursor("anchor")),ye=Xe(re),Ce=Xe(se),me,be,Oe;if(j&&this.recordLastEdit($,_),_.repeatOverride!==void 0?Oe=_.repeatOverride:Oe=_.getRepeat(),Oe>0&&B.explicitRepeat?B.repeatIsExplicit=!0:(B.noRepeat||!B.explicitRepeat&&Oe===0)&&(Oe=1,B.repeatIsExplicit=!1),_.selectedCharacter&&(B.selectedCharacter=q.selectedCharacter=_.selectedCharacter),B.repeat=Oe,S(y),N){var Re=Zr[N](y,re,B,$,_);if($.lastMotion=Zr[N],!Re)return;if(B.toJumplist){!j&&y.ace.curOp!=null&&(y.ace.curOp.command.scrollIntoView="center-animate");var Ge=He.jumpList,ht=Ge.cachedCursor;ht?($r(y,ht,Re),delete Ge.cachedCursor):$r(y,re,Re)}Re instanceof Array?(be=Re[0],me=Re[1]):me=Re,me||(me=Xe(re)),$.visualMode?((!$.visualBlock||me.ch!==1/0)&&(me=ue(y,me,ye)),be&&(be=ue(y,be)),be=be||Ce,Q.anchor=be,Q.head=me,Je(y),si(y,$,"<",at(be,me)?be:me),si(y,$,">",at(be,me)?me:be)):j||(y.ace.curOp&&(y.ace.curOp.vimDialogScroll="center-animate"),me=ue(y,me,ye),y.setCursor(me.line,me.ch))}if(j){if(q.lastSel){be=Ce;var tt=q.lastSel,st=Math.abs(tt.head.line-tt.anchor.line),kn=Math.abs(tt.head.ch-tt.anchor.ch);tt.visualLine?me=new De(Ce.line+st,Ce.ch):tt.visualBlock?me=new De(Ce.line+st,Ce.ch+kn):tt.head.line==tt.anchor.line?me=new De(Ce.line,Ce.ch+kn):me=new De(Ce.line+st,Ce.ch),$.visualMode=!0,$.visualLine=tt.visualLine,$.visualBlock=tt.visualBlock,Q=$.sel={anchor:be,head:me},Je(y)}else $.visualMode&&(q.lastSel={anchor:Xe(Q.anchor),head:Xe(Q.head),visualBlock:$.visualBlock,visualLine:$.visualLine});var dt,Mn,$t,Ot,ir;if($.visualMode){dt=mt(Q.head,Q.anchor),Mn=sn(Q.head,Q.anchor),$t=$.visualLine||q.linewise,Ot=$.visualBlock?"block":$t?"line":"char";var mr=b(y,dt,Mn);if(ir=vt(y,{anchor:mr.start,head:mr.end},Ot),$t){var En=ir.ranges;if(Ot=="block")for(var V=0;V<En.length;V++)En[V].head.ch=Jt(y,En[V].head.line);else Ot=="line"&&(En[0].head=new De(En[0].head.line+1,0))}}else{if(dt=Xe(be||Ce),Mn=Xe(me||ye),at(Mn,dt)){var X=dt;dt=Mn,Mn=X}$t=B.linewise||q.linewise,$t?Nt(y,dt,Mn):B.forward&&Pt(y,dt,Mn),Ot="char";var ie=!B.inclusive||$t,mr=b(y,dt,Mn);ir=vt(y,{anchor:mr.start,head:mr.end},Ot,ie)}y.setSelections(ir.ranges,ir.primary),$.lastMotion=null,q.repeat=Oe,q.registerName=Y,q.linewise=$t;var oe=Qo[j](y,q,ir.ranges,Ce,me);$.visualMode&&At(y,oe!=null),oe&&y.setCursor(oe)}},recordLastEdit:function(y,$,_){var N=He.macroModeState;N.isPlaying||(y.lastEditInputState=$,y.lastEditActionCommand=_,N.lastInsertModeChanges.changes=[],N.lastInsertModeChanges.expectCursorActivityForChange=!1,N.lastInsertModeChanges.visualBlock=y.visualBlock?y.sel.head.line-y.sel.anchor.line:0)}},Zr={moveToTopLine:function(y,$,_){var N=ro(y).top+_.repeat-1;return new De(N,pt(y.getLine(N)))},moveToMiddleLine:function(y){var $=ro(y),_=Math.floor(($.top+$.bottom)*.5);return new De(_,pt(y.getLine(_)))},moveToBottomLine:function(y,$,_){var N=ro(y).bottom-_.repeat+1;return new De(N,pt(y.getLine(N)))},expandToLine:function(y,$,_){var N=$;return new De(N.line+_.repeat-1,1/0)},findNext:function(y,$,_){var N=Rn(y),B=N.getQuery();if(B){var j=!_.forward;return j=N.isReversed()?!j:j,bi(y,B),Lr(y,j,B,_.repeat)}},findAndSelectNextInclusive:function(y,$,_,N,B){var j=Rn(y),q=j.getQuery();if(q){var Y=!_.forward;Y=j.isReversed()?!Y:Y;var Q=wi(y,Y,q,_.repeat,N);if(Q){if(B.operator)return Q;var re=Q[0],se=new De(Q[1].line,Q[1].ch-1);if(N.visualMode){(N.visualLine||N.visualBlock)&&(N.visualLine=!1,N.visualBlock=!1,je.signal(y,"vim-mode-change",{mode:"visual",subMode:""}));var ye=N.sel.anchor;if(ye)return j.isReversed()?_.forward?[ye,re]:[ye,se]:_.forward?[ye,se]:[ye,re]}else N.visualMode=!0,N.visualLine=!1,N.visualBlock=!1,je.signal(y,"vim-mode-change",{mode:"visual",subMode:""});return Y?[se,re]:[re,se]}}},goToMark:function(y,$,_,N){var B=Xr(y,N,_.selectedCharacter);return B?_.linewise?{line:B.line,ch:pt(y.getLine(B.line))}:B:null},moveToOtherHighlightedEnd:function(y,$,_,N){if(N.visualBlock&&_.sameLine){var B=N.sel;return[ue(y,new De(B.anchor.line,B.head.ch)),ue(y,new De(B.head.line,B.anchor.ch))]}return[N.sel.head,N.sel.anchor]},jumpToMark:function(y,$,_,N){for(var B=$,j=0;j<_.repeat;j++){var q=B;for(var Y in N.marks)if(c(Y)){var Q=N.marks[Y].find(),re=_.forward?at(Q,q):at(q,Q);if(!re&&!(_.linewise&&Q.line==q.line)){var se=gt(q,B),ye=_.forward?bn(q,Q,B):bn(B,Q,q);(se||ye)&&(B=Q)}}}return _.linewise&&(B=new De(B.line,pt(y.getLine(B.line)))),B},moveByCharacters:function(y,$,_){var N=$,B=_.repeat,j=_.forward?N.ch+B:N.ch-B;return new De(N.line,j)},moveByLines:function(y,$,_,N){var B=$,j=B.ch;switch(N.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:j=N.lastHPos;break;default:N.lastHPos=j}var q=_.repeat+(_.repeatOffset||0),Y=_.forward?B.line+q:B.line-q,Q=y.firstLine(),re=y.lastLine();if(Y<Q&&B.line==Q)return this.moveToStartOfLine(y,$,_,N);if(Y>re&&B.line==re)return go(y,$,_,N,!0);var se=y.ace.session.getFoldLine(Y);return se&&(_.forward?Y>se.start.row&&(Y=se.end.row+1):Y=se.start.row),_.toFirstChar&&(j=pt(y.getLine(Y)),N.lastHPos=j),N.lastHSPos=y.charCoords(new De(Y,j),"div").left,new De(Y,j)},moveByDisplayLines:function(y,$,_,N){var B=$;switch(N.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:N.lastHSPos=y.charCoords(B,"div").left}var j=_.repeat,Q=y.findPosV(B,_.forward?j:-j,"line",N.lastHSPos);if(Q.hitSide)if(_.forward)var q=y.charCoords(Q,"div"),Y={top:q.top+8,left:N.lastHSPos},Q=y.coordsChar(Y,"div");else{var re=y.charCoords(new De(y.firstLine(),0),"div");re.left=N.lastHSPos,Q=y.coordsChar(re,"div")}return N.lastHPos=Q.ch,Q},moveByPage:function(y,$,_){var N=$,B=_.repeat;return y.findPosV(N,_.forward?B:-B,"page")},moveByParagraph:function(y,$,_){var N=_.forward?1:-1;return ks(y,$,_.repeat,N)},moveBySentence:function(y,$,_){var N=_.forward?1:-1;return ji(y,$,_.repeat,N)},moveByScroll:function(y,$,_,N){var B=y.getScrollInfo(),j=null,q=_.repeat;q||(q=B.clientHeight/(2*y.defaultTextHeight()));var Y=y.charCoords($,"local");if(_.repeat=q,j=Zr.moveByDisplayLines(y,$,_,N),!j)return null;var Q=y.charCoords(j,"local");return y.scrollTo(null,B.top+Q.top-Y.top),j},moveByWords:function(y,$,_){return xr(y,$,_.repeat,!!_.forward,!!_.wordEnd,!!_.bigWord)},moveTillCharacter:function(y,$,_){var N=_.repeat,B=Wo(y,N,_.forward,_.selectedCharacter,$),j=_.forward?-1:1;return Yr(j,_),B?(B.ch+=j,B):null},moveToCharacter:function(y,$,_){var N=_.repeat;return Yr(0,_),Wo(y,N,_.forward,_.selectedCharacter,$)||$},moveToSymbol:function(y,$,_){var N=_.repeat;return Wi(y,N,_.forward,_.selectedCharacter)||$},moveToColumn:function(y,$,_,N){var B=_.repeat;return N.lastHPos=B-1,N.lastHSPos=y.charCoords($,"div").left,Ga(y,B)},moveToEol:function(y,$,_,N){return go(y,$,_,N,!1)},moveToFirstNonWhiteSpaceCharacter:function(y,$){var _=$;return new De(_.line,pt(y.getLine(_.line)))},moveToMatchedSymbol:function(y,$){for(var _=$,N=_.line,B=_.ch,j=y.getLine(N),q;B<j.length;B++)if(q=j.charAt(B),q&&l(q)){var Y=y.getTokenTypeAt(new De(N,B+1));if(Y!=="string"&&Y!=="comment")break}if(B<j.length){var Q=/[<>]/.test(j[B])?/[(){}[\]<>]/:/[(){}[\]]/,re=y.findMatchingBracket(new De(N,B+1),{bracketRegex:Q});return re.to}return _},moveToStartOfLine:function(y,$){return new De($.line,0)},moveToLineOrEdgeOfDocument:function(y,$,_){var N=_.forward?y.lastLine():y.firstLine();return _.repeatIsExplicit&&(N=_.repeat-y.getOption("firstLineNumber")),new De(N,pt(y.getLine(N)))},moveToStartOfDisplayLine:function(y){return y.execCommand("goLineLeft"),y.getCursor()},moveToEndOfDisplayLine:function(y){y.execCommand("goLineRight");var $=y.getCursor();return $.sticky=="before"&&$.ch--,$},textObjectManipulation:function(y,$,_,N){var B={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},j={"'":!0,'"':!0,"`":!0},q=_.selectedCharacter;q=="b"?q="(":q=="B"&&(q="{");var Y=!_.textObjectInner,Q,re;if(B[q]){if(re=!0,Q=Yn(y,$,q,Y),!Q){var se=y.getSearchCursor(new RegExp("\\"+q,"g"),$);se.find()&&(Q=Yn(y,se.from(),q,Y))}}else if(j[q])re=!0,Q=Mr(y,$,q,Y);else if(q==="W"||q==="w")for(var ye=_.repeat||1;ye-- >0;){var Ce=kt(y,{inclusive:Y,innerWord:!Y,bigWord:q==="W",noSymbol:q==="W",multiline:!0},Q&&Q.end);Ce&&(Q||(Q=Ce),Q.end=Ce.end)}else if(q==="p")if(Q=ks(y,$,_.repeat,0,Y),_.linewise=!0,N.visualMode)N.visualLine||(N.visualLine=!0);else{var me=N.inputState.operatorArgs;me&&(me.linewise=!0),Q.end.line--}else if(q==="t")Q=$n(y,$,Y);else if(q==="s"){var be=y.getLine($.line);$.ch>0&&w(be[$.ch])&&($.ch-=1);var Oe=aa(y,$,_.repeat,1,Y),Re=aa(y,$,_.repeat,-1,Y);m(y.getLine(Re.line)[Re.ch])&&m(y.getLine(Oe.line)[Oe.ch-1])&&(Re={line:Re.line,ch:Re.ch+1}),Q={start:Re,end:Oe}}return Q?y.state.vim.visualMode?Ve(y,Q.start,Q.end,re):[Q.start,Q.end]:null},repeatLastCharacterSearch:function(y,$,_){var N=He.lastCharacterSearch,B=_.repeat,j=_.forward===N.forward,q=(N.increment?1:0)*(j?-1:1);y.moveH(-q,"char"),_.inclusive=!!j;var Y=Wo(y,B,j,N.selectedCharacter);return Y?(Y.ch+=q,Y):(y.moveH(q,"char"),$)}},Qo={change:function(y,$,_){var N,B,j=y.state.vim,q=_[0].anchor,Y=_[0].head;if(j.visualMode)if($.fullLine)Y.ch=Number.MAX_VALUE,Y.line--,y.setSelection(q,Y),B=y.getSelection(),y.replaceSelection(""),N=q;else{B=y.getSelection();var Q=he("",_.length);y.replaceSelections(Q),N=mt(_[0].head,_[0].anchor)}else{B=y.getRange(q,Y);var re=j.lastEditInputState||{};if(re.motion=="moveByWords"&&!m(B)){var se=/\s+$/.exec(B);se&&re.motionArgs&&re.motionArgs.forward&&(Y=ge(Y,0,-se[0].length),B=B.slice(0,-se[0].length))}$.linewise&&(q=new De(q.line,pt(y.getLine(q.line))),Y.line>q.line&&(Y=new De(Y.line-1,Number.MAX_VALUE))),y.replaceRange("",q,Y),N=q}He.registerController.pushText($.registerName,"change",B,$.linewise,_.length>1),zn.enterInsertMode(y,{head:N},y.state.vim)},delete:function(y,$,_){var N,B,j=y.state.vim;if(j.visualBlock){B=y.getSelection();var q=he("",_.length);y.replaceSelections(q),N=mt(_[0].head,_[0].anchor)}else{var Y=_[0].anchor,Q=_[0].head;$.linewise&&Q.line!=y.firstLine()&&Y.line==y.lastLine()&&Y.line==Q.line-1&&(Y.line==y.firstLine()?Y.ch=0:Y=new De(Y.line-1,Jt(y,Y.line-1))),B=y.getRange(Y,Q),y.replaceRange("",Y,Q),N=Y,$.linewise&&(N=Zr.moveToFirstNonWhiteSpaceCharacter(y,Y))}return He.registerController.pushText($.registerName,"delete",B,$.linewise,j.visualBlock),ue(y,N)},indent:function(y,$,_){var N=y.state.vim,B=N.visualMode?$.repeat:1;if(N.visualBlock){for(var j=y.getOption("tabSize"),q=y.getOption("indentWithTabs")?" ":" ".repeat(j),Y,Q=_.length-1;Q>=0;Q--)if(Y=mt(_[Q].anchor,_[Q].head),$.indentRight)y.replaceRange(q.repeat(B),Y,Y);else{for(var re=y.getLine(Y.line),se=0,ye=0;ye<B;ye++){var Ce=re[Y.ch+se];if(Ce==" ")se++;else{if(Ce!=" ")break;se++;for(var me=1;me<q.length&&(Ce=re[Y.ch+se],Ce===" ");me++)se++}}y.replaceRange("",Y,ge(Y,0,se))}return Y}if(y.indentMore)for(var ye=0;ye<B;ye++)$.indentRight?y.indentMore():y.indentLess();else{var be=_[0].anchor.line,Oe=N.visualBlock?_[_.length-1].anchor.line:_[0].head.line;$.linewise&&Oe--;for(var Q=be;Q<=Oe;Q++)for(var ye=0;ye<B;ye++)y.indentLine(Q,$.indentRight)}return Zr.moveToFirstNonWhiteSpaceCharacter(y,_[0].anchor)},indentAuto:function(y,$,_){return y.execCommand("indentAuto"),Zr.moveToFirstNonWhiteSpaceCharacter(y,_[0].anchor)},hardWrap:function(y,$,_,N,B){if(y.hardWrap){var j=_[0].anchor.line,q=_[0].head.line;$.linewise&&q--;var Y=y.hardWrap({from:j,to:q});return Y>j&&$.linewise&&Y--,$.keepCursor?N:new De(Y,0)}},changeCase:function(y,$,_,N,B){for(var j=y.getSelections(),q=[],Y=$.toLower,Q=0;Q<j.length;Q++){var re=j[Q],se="";if(Y===!0)se=re.toLowerCase();else if(Y===!1)se=re.toUpperCase();else for(var ye=0;ye<re.length;ye++){var Ce=re.charAt(ye);se+=u(Ce)?Ce.toLowerCase():Ce.toUpperCase()}q.push(se)}return y.replaceSelections(q),$.shouldMoveCursor?B:!y.state.vim.visualMode&&$.linewise&&_[0].anchor.line+1==_[0].head.line?Zr.moveToFirstNonWhiteSpaceCharacter(y,N):$.linewise?N:mt(_[0].anchor,_[0].head)},yank:function(y,$,_,N){var B=y.state.vim,j=y.getSelection(),q=B.visualMode?mt(B.sel.anchor,B.sel.head,_[0].head,_[0].anchor):N;return He.registerController.pushText($.registerName,"yank",j,$.linewise,B.visualBlock),q}},zn={jumpListWalk:function(y,$,_){if(!_.visualMode){var N=$.repeat,B=$.forward,j=He.jumpList,q=j.move(y,B?N:-N),Y=q?q.find():void 0;Y=Y||y.getCursor(),y.setCursor(Y),y.ace.curOp.command.scrollIntoView="center-animate"}},scroll:function(y,$,_){if(!_.visualMode){var N=$.repeat||1,B=y.defaultTextHeight(),j=y.getScrollInfo().top,q=B*N,Y=$.forward?j+q:j-q,Q=Xe(y.getCursor()),re=y.charCoords(Q,"local");if($.forward)Y>re.top?(Q.line+=(Y-re.top)/B,Q.line=Math.ceil(Q.line),y.setCursor(Q),re=y.charCoords(Q,"local"),y.scrollTo(null,re.top)):y.scrollTo(null,Y);else{var se=Y+y.getScrollInfo().clientHeight;se<re.bottom?(Q.line-=(re.bottom-se)/B,Q.line=Math.floor(Q.line),y.setCursor(Q),re=y.charCoords(Q,"local"),y.scrollTo(null,re.bottom-y.getScrollInfo().clientHeight)):y.scrollTo(null,Y)}}},scrollToCursor:function(y,$){var _=y.getCursor().line,N=y.charCoords(new De(_,0),"local"),B=y.getScrollInfo().clientHeight,j=N.top;switch($.position){case"center":j=N.bottom-B/2;break;case"bottom":var q=new De(_,y.getLine(_).length-1),Y=y.charCoords(q,"local"),Q=Y.bottom-j;j=j-B+Q}y.scrollTo(null,j)},replayMacro:function(y,$,_){var N=$.selectedCharacter,B=$.repeat,j=He.macroModeState;for(N=="@"?N=j.latestRegister:j.latestRegister=N;B--;)Ts(y,_,j,N)},enterMacroRecordMode:function(y,$){var _=He.macroModeState,N=$.selectedCharacter;He.registerController.isValidRegister(N)&&_.enterMacroRecordMode(y,N)},toggleOverwrite:function(y){y.state.overwrite?(y.toggleOverwrite(!1),y.setOption("keyMap","vim-insert"),je.signal(y,"vim-mode-change",{mode:"insert"})):(y.toggleOverwrite(!0),y.setOption("keyMap","vim-replace"),je.signal(y,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(y,$,_){if(!y.getOption("readOnly")){_.insertMode=!0,_.insertModeRepeat=$&&$.repeat||1;var N=$?$.insertAt:null,B=_.sel,j=$.head||y.getCursor("head"),q=y.listSelections().length;if(N=="eol")j=new De(j.line,Jt(y,j.line));else if(N=="bol")j=new De(j.line,0);else if(N=="charAfter"){var Y=b(y,j,ge(j,0,1));j=Y.end}else if(N=="firstNonBlank"){var Y=b(y,j,Zr.moveToFirstNonWhiteSpaceCharacter(y,j));j=Y.end}else if(N=="startOfSelectedArea"){if(!_.visualMode)return;_.visualBlock?(j=new De(Math.min(B.head.line,B.anchor.line),Math.min(B.head.ch,B.anchor.ch)),q=Math.abs(B.head.line-B.anchor.line)+1):B.head.line<B.anchor.line?j=B.head:j=new De(B.anchor.line,0)}else if(N=="endOfSelectedArea"){if(!_.visualMode)return;_.visualBlock?(j=new De(Math.min(B.head.line,B.anchor.line),Math.max(B.head.ch,B.anchor.ch)+1),q=Math.abs(B.head.line-B.anchor.line)+1):B.head.line>=B.anchor.line?j=ge(B.head,0,1):j=new De(B.anchor.line,0)}else if(N=="inplace"){if(_.visualMode)return}else N=="lastEdit"&&(j=mo(y)||j);y.setOption("disableInput",!1),$&&$.replace?(y.toggleOverwrite(!0),y.setOption("keyMap","vim-replace"),je.signal(y,"vim-mode-change",{mode:"replace"})):(y.toggleOverwrite(!1),y.setOption("keyMap","vim-insert"),je.signal(y,"vim-mode-change",{mode:"insert"})),He.macroModeState.isPlaying||(y.on("change",vo),_.insertEnd&&_.insertEnd.clear(),_.insertEnd=y.setBookmark(j,{insertLeft:!0}),je.on(y.getInputField(),"keydown",Ms)),_.visualMode&&At(y),nr(y,j,q)}},toggleVisualMode:function(y,$,_){var N=$.repeat,B=y.getCursor(),j;if(_.visualMode)_.visualLine^$.linewise||_.visualBlock^$.blockwise?(_.visualLine=!!$.linewise,_.visualBlock=!!$.blockwise,je.signal(y,"vim-mode-change",{mode:"visual",subMode:_.visualLine?"linewise":_.visualBlock?"blockwise":""}),Je(y)):At(y);else{_.visualMode=!0,_.visualLine=!!$.linewise,_.visualBlock=!!$.blockwise,j=ue(y,new De(B.line,B.ch+N-1));var q=b(y,B,j);_.sel={anchor:q.start,head:q.end},je.signal(y,"vim-mode-change",{mode:"visual",subMode:_.visualLine?"linewise":_.visualBlock?"blockwise":""}),Je(y),si(y,_,"<",mt(B,j)),si(y,_,">",sn(B,j))}},reselectLastSelection:function(y,$,_){var N=_.lastSelection;if(_.visualMode&&ke(y,_),N){var B=N.anchorMark.find(),j=N.headMark.find();if(!B||!j)return;_.sel={anchor:B,head:j},_.visualMode=!0,_.visualLine=N.visualLine,_.visualBlock=N.visualBlock,Je(y),si(y,_,"<",mt(B,j)),si(y,_,">",sn(B,j)),je.signal(y,"vim-mode-change",{mode:"visual",subMode:_.visualLine?"linewise":_.visualBlock?"blockwise":""})}},joinLines:function(y,$,_){var N,B;if(_.visualMode){if(N=y.getCursor("anchor"),B=y.getCursor("head"),at(B,N)){var j=B;B=N,N=j}B.ch=Jt(y,B.line)-1}else{var q=Math.max($.repeat,2);N=y.getCursor(),B=ue(y,new De(N.line+q-1,1/0))}for(var Y=0,Q=N.line;Q<B.line;Q++){Y=Jt(y,N.line);var re="",se=0;if(!$.keepSpaces){var ye=y.getLine(N.line+1);se=ye.search(/\S/),se==-1?se=ye.length:re=" "}y.replaceRange(re,new De(N.line,Y),new De(N.line+1,se))}var Ce=ue(y,new De(N.line,Y));_.visualMode&&At(y,!1),y.setCursor(Ce)},newLineAndEnterInsertMode:function(y,$,_){_.insertMode=!0;var N=Xe(y.getCursor());if(N.line===y.firstLine()&&!$.after)y.replaceRange(`
1443
+ `)==-1?this.registers["-"]=new W(_,N):(this.shiftNumericRegisters_(),this.registers[1]=new W(_,N))}this.unnamedRegister.setText(_,N,B);return}var q=u(y);q?j.pushText(_,N):j.setText(_,N,B),y==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"&&navigator.clipboard.writeText(_),this.unnamedRegister.setText(j.toString(),N)}},getRegister:function(y){return this.isValidRegister(y)?(y=y.toLowerCase(),this.registers[y]||(this.registers[y]=new W),this.registers[y]):this.unnamedRegister},isValidRegister:function(y){return y&&(x(y,an)||nn.test(y))},shiftNumericRegisters_:function(){for(var y=9;y>=2;y--)this.registers[y]=this.getRegister(""+(y-1))}},Z.prototype={nextMatch:function(y,$){var _=this.historyBuffer,N=$?-1:1;this.initialPrefix===null&&(this.initialPrefix=y);for(var B=this.iterator+N;$?B>=0:B<_.length;B+=N)for(var j=_[B],q=0;q<=j.length;q++)if(this.initialPrefix==j.substring(0,q))return this.iterator=B,j;if(B>=_.length)return this.iterator=_.length,this.initialPrefix;if(B<0)return y},pushInput:function(y){var $=this.historyBuffer.indexOf(y);$>-1&&this.historyBuffer.splice($,1),y.length&&this.historyBuffer.push(y)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var jn={matchCommand:function(y,$,_,N){var B=Te(y,$,N,_);if(!B.full&&!B.partial)return{type:"none"};if(!B.full&&B.partial)return{type:"partial",expectLiteralNext:B.partial.length==1&&B.partial[0].keys.slice(-11)=="<character>"};for(var j,q=0;q<B.full.length;q++){var Y=B.full[q];j||(j=Y)}if(j.keys.slice(-11)=="<character>"||j.keys.slice(-10)=="<register>"){var Q=Ee(y);if(!Q||Q.length>1)return{type:"clear"};_.selectedCharacter=Q}return{type:"full",command:j}},processCommand:function(y,$,_){switch($.inputState.repeatOverride=_.repeatOverride,_.type){case"motion":this.processMotion(y,$,_);break;case"operator":this.processOperator(y,$,_);break;case"operatorMotion":this.processOperatorMotion(y,$,_);break;case"action":this.processAction(y,$,_);break;case"search":this.processSearch(y,$,_);break;case"ex":case"keyToEx":this.processEx(y,$,_);break}},processMotion:function(y,$,_){$.inputState.motion=_.motion,$.inputState.motionArgs=ce(_.motionArgs),this.evalInput(y,$)},processOperator:function(y,$,_){var N=$.inputState;if(N.operator){if(N.operator==_.operator){N.motion="expandToLine",N.motionArgs={linewise:!0},this.evalInput(y,$);return}S(y)}N.operator=_.operator,N.operatorArgs=ce(_.operatorArgs),_.keys.length>1&&(N.operatorShortcut=_.keys),_.exitVisualBlock&&($.visualBlock=!1,Je(y)),$.visualMode&&this.evalInput(y,$)},processOperatorMotion:function(y,$,_){var N=$.visualMode,B=ce(_.operatorMotionArgs);B&&N&&B.visualLine&&($.visualLine=!0),this.processOperator(y,$,_),N||this.processMotion(y,$,_)},processAction:function(y,$,_){var N=$.inputState,B=N.getRepeat(),j=!!B,q=ce(_.actionArgs)||{};N.selectedCharacter&&(q.selectedCharacter=N.selectedCharacter),_.operator&&this.processOperator(y,$,_),_.motion&&this.processMotion(y,$,_),(_.motion||_.operator)&&this.evalInput(y,$),q.repeat=B||1,q.repeatIsExplicit=j,q.registerName=N.registerName,S(y),$.lastMotion=null,_.isEdit&&this.recordLastEdit($,N,_),zn[_.action](y,q,$)},processSearch:function(y,$,_){function N(Re,Ge,ht){He.searchHistoryController.pushInput(Re),He.searchHistoryController.reset();try{Cn(y,Re,Ge,ht)}catch{Kt(y,"Invalid regex: "+Re),S(y);return}jn.processMotion(y,$,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:_.searchArgs.toJumplist}})}function B(Re){N(Re,!0,!0);var Ge=He.macroModeState;Ge.isRecording&&$s(Ge,Re)}function j(Re,Ge,ht){var tt=H(Re),at,_n;tt=="<Up>"||tt=="<Down>"?(at=tt=="<Up>",_n=Re.target?Re.target.selectionEnd:0,Ge=He.searchHistoryController.nextMatch(Ge,at)||"",ht(Ge),_n&&Re.target&&(Re.target.selectionEnd=Re.target.selectionStart=Math.min(_n,Re.target.value.length))):tt&&tt!="<Left>"&&tt!="<Right>"&&He.searchHistoryController.reset();var dt;try{dt=Cn(y,Ge,!0,!0)}catch{}dt?y.scrollIntoView(Lr(y,!Y,dt),30):(jo(y),y.scrollTo(ye.left,ye.top))}function q(Re,Ge,ht){var tt=H(Re);tt=="<Esc>"||tt=="<C-c>"||tt=="<C-[>"||tt=="<BS>"&&Ge==""?(He.searchHistoryController.pushInput(Ge),He.searchHistoryController.reset(),Cn(y,se),jo(y),y.scrollTo(ye.left,ye.top),je.e_stop(Re),S(y),ht(),y.focus()):tt=="<Up>"||tt=="<Down>"?je.e_stop(Re):tt=="<C-u>"&&(je.e_stop(Re),ht(""))}if(y.getSearchCursor){var Y=_.searchArgs.forward,Q=_.searchArgs.wholeWordOnly;Rn(y).setReversed(!Y);var re=Y?"/":"?",se=Rn(y).getQuery(),ye=y.getScrollInfo();switch(_.searchArgs.querySrc){case"prompt":var Ce=He.macroModeState;if(Ce.isPlaying){var Oe=Ce.replaySearchQueries.shift();N(Oe,!0,!1)}else Ir(y,{onClose:B,prefix:re,desc:"(JavaScript regexp)",onKeyUp:j,onKeyDown:q});break;case"wordUnderCursor":var me=kt(y,{noSymbol:!0}),be=!0;if(me||(me=kt(y,{noSymbol:!1}),be=!1),!me){Kt(y,"No word under cursor"),S(y);return}var Oe=y.getLine(me.start.line).substring(me.start.ch,me.end.ch);be&&Q?Oe="\\b"+Oe+"\\b":Oe=xn(Oe),He.jumpList.cachedCursor=y.getCursor(),y.setCursor(me.start),N(Oe,!0,!1)}}},processEx:function(y,$,_){function N(j){He.exCommandHistoryController.pushInput(j),He.exCommandHistoryController.reset(),kr.processCommand(y,j),y.state.vim&&S(y)}function B(j,q,Y){var Q=H(j),re,se;(Q=="<Esc>"||Q=="<C-c>"||Q=="<C-[>"||Q=="<BS>"&&q=="")&&(He.exCommandHistoryController.pushInput(q),He.exCommandHistoryController.reset(),je.e_stop(j),S(y),Y(),y.focus()),Q=="<Up>"||Q=="<Down>"?(je.e_stop(j),re=Q=="<Up>",se=j.target?j.target.selectionEnd:0,q=He.exCommandHistoryController.nextMatch(q,re)||"",Y(q),se&&j.target&&(j.target.selectionEnd=j.target.selectionStart=Math.min(se,j.target.value.length))):Q=="<C-u>"?(je.e_stop(j),Y("")):Q&&Q!="<Left>"&&Q!="<Right>"&&He.exCommandHistoryController.reset()}_.type=="keyToEx"?kr.processCommand(y,_.exArgs.input):$.visualMode?Ir(y,{onClose:N,prefix:":",value:"'<,'>",onKeyDown:B,selectValueOnOpen:!1}):Ir(y,{onClose:N,prefix:":",onKeyDown:B})},evalInput:function(y,$){var _=$.inputState,N=_.motion,B=_.motionArgs||{},j=_.operator,q=_.operatorArgs||{},Y=_.registerName,Q=$.sel,re=Xe($.visualMode?ue(y,Q.head):y.getCursor("head")),se=Xe($.visualMode?ue(y,Q.anchor):y.getCursor("anchor")),ye=Xe(re),Ce=Xe(se),me,be,Oe;if(j&&this.recordLastEdit($,_),_.repeatOverride!==void 0?Oe=_.repeatOverride:Oe=_.getRepeat(),Oe>0&&B.explicitRepeat?B.repeatIsExplicit=!0:(B.noRepeat||!B.explicitRepeat&&Oe===0)&&(Oe=1,B.repeatIsExplicit=!1),_.selectedCharacter&&(B.selectedCharacter=q.selectedCharacter=_.selectedCharacter),B.repeat=Oe,S(y),N){var Re=Zr[N](y,re,B,$,_);if($.lastMotion=Zr[N],!Re)return;if(B.toJumplist){!j&&y.ace.curOp!=null&&(y.ace.curOp.command.scrollIntoView="center-animate");var Ge=He.jumpList,ht=Ge.cachedCursor;ht?($r(y,ht,Re),delete Ge.cachedCursor):$r(y,re,Re)}Re instanceof Array?(be=Re[0],me=Re[1]):me=Re,me||(me=Xe(re)),$.visualMode?((!$.visualBlock||me.ch!==1/0)&&(me=ue(y,me,ye)),be&&(be=ue(y,be)),be=be||Ce,Q.anchor=be,Q.head=me,Je(y),ai(y,$,"<",lt(be,me)?be:me),ai(y,$,">",lt(be,me)?me:be)):j||(y.ace.curOp&&(y.ace.curOp.vimDialogScroll="center-animate"),me=ue(y,me,ye),y.setCursor(me.line,me.ch))}if(j){if(q.lastSel){be=Ce;var tt=q.lastSel,at=Math.abs(tt.head.line-tt.anchor.line),_n=Math.abs(tt.head.ch-tt.anchor.ch);tt.visualLine?me=new De(Ce.line+at,Ce.ch):tt.visualBlock?me=new De(Ce.line+at,Ce.ch+_n):tt.head.line==tt.anchor.line?me=new De(Ce.line,Ce.ch+_n):me=new De(Ce.line+at,Ce.ch),$.visualMode=!0,$.visualLine=tt.visualLine,$.visualBlock=tt.visualBlock,Q=$.sel={anchor:be,head:me},Je(y)}else $.visualMode&&(q.lastSel={anchor:Xe(Q.anchor),head:Xe(Q.head),visualBlock:$.visualBlock,visualLine:$.visualLine});var dt,Mn,$t,Ot,ir;if($.visualMode){dt=mt(Q.head,Q.anchor),Mn=sn(Q.head,Q.anchor),$t=$.visualLine||q.linewise,Ot=$.visualBlock?"block":$t?"line":"char";var mr=b(y,dt,Mn);if(ir=vt(y,{anchor:mr.start,head:mr.end},Ot),$t){var En=ir.ranges;if(Ot=="block")for(var V=0;V<En.length;V++)En[V].head.ch=Jt(y,En[V].head.line);else Ot=="line"&&(En[0].head=new De(En[0].head.line+1,0))}}else{if(dt=Xe(be||Ce),Mn=Xe(me||ye),lt(Mn,dt)){var X=dt;dt=Mn,Mn=X}$t=B.linewise||q.linewise,$t?Nt(y,dt,Mn):B.forward&&Bt(y,dt,Mn),Ot="char";var ie=!B.inclusive||$t,mr=b(y,dt,Mn);ir=vt(y,{anchor:mr.start,head:mr.end},Ot,ie)}y.setSelections(ir.ranges,ir.primary),$.lastMotion=null,q.repeat=Oe,q.registerName=Y,q.linewise=$t;var oe=Qo[j](y,q,ir.ranges,Ce,me);$.visualMode&&At(y,oe!=null),oe&&y.setCursor(oe)}},recordLastEdit:function(y,$,_){var N=He.macroModeState;N.isPlaying||(y.lastEditInputState=$,y.lastEditActionCommand=_,N.lastInsertModeChanges.changes=[],N.lastInsertModeChanges.expectCursorActivityForChange=!1,N.lastInsertModeChanges.visualBlock=y.visualBlock?y.sel.head.line-y.sel.anchor.line:0)}},Zr={moveToTopLine:function(y,$,_){var N=ro(y).top+_.repeat-1;return new De(N,pt(y.getLine(N)))},moveToMiddleLine:function(y){var $=ro(y),_=Math.floor(($.top+$.bottom)*.5);return new De(_,pt(y.getLine(_)))},moveToBottomLine:function(y,$,_){var N=ro(y).bottom-_.repeat+1;return new De(N,pt(y.getLine(N)))},expandToLine:function(y,$,_){var N=$;return new De(N.line+_.repeat-1,1/0)},findNext:function(y,$,_){var N=Rn(y),B=N.getQuery();if(B){var j=!_.forward;return j=N.isReversed()?!j:j,wi(y,B),Lr(y,j,B,_.repeat)}},findAndSelectNextInclusive:function(y,$,_,N,B){var j=Rn(y),q=j.getQuery();if(q){var Y=!_.forward;Y=j.isReversed()?!Y:Y;var Q=xi(y,Y,q,_.repeat,N);if(Q){if(B.operator)return Q;var re=Q[0],se=new De(Q[1].line,Q[1].ch-1);if(N.visualMode){(N.visualLine||N.visualBlock)&&(N.visualLine=!1,N.visualBlock=!1,je.signal(y,"vim-mode-change",{mode:"visual",subMode:""}));var ye=N.sel.anchor;if(ye)return j.isReversed()?_.forward?[ye,re]:[ye,se]:_.forward?[ye,se]:[ye,re]}else N.visualMode=!0,N.visualLine=!1,N.visualBlock=!1,je.signal(y,"vim-mode-change",{mode:"visual",subMode:""});return Y?[se,re]:[re,se]}}},goToMark:function(y,$,_,N){var B=Xr(y,N,_.selectedCharacter);return B?_.linewise?{line:B.line,ch:pt(y.getLine(B.line))}:B:null},moveToOtherHighlightedEnd:function(y,$,_,N){if(N.visualBlock&&_.sameLine){var B=N.sel;return[ue(y,new De(B.anchor.line,B.head.ch)),ue(y,new De(B.head.line,B.anchor.ch))]}return[N.sel.head,N.sel.anchor]},jumpToMark:function(y,$,_,N){for(var B=$,j=0;j<_.repeat;j++){var q=B;for(var Y in N.marks)if(c(Y)){var Q=N.marks[Y].find(),re=_.forward?lt(Q,q):lt(q,Q);if(!re&&!(_.linewise&&Q.line==q.line)){var se=gt(q,B),ye=_.forward?wn(q,Q,B):wn(B,Q,q);(se||ye)&&(B=Q)}}}return _.linewise&&(B=new De(B.line,pt(y.getLine(B.line)))),B},moveByCharacters:function(y,$,_){var N=$,B=_.repeat,j=_.forward?N.ch+B:N.ch-B;return new De(N.line,j)},moveByLines:function(y,$,_,N){var B=$,j=B.ch;switch(N.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:j=N.lastHPos;break;default:N.lastHPos=j}var q=_.repeat+(_.repeatOffset||0),Y=_.forward?B.line+q:B.line-q,Q=y.firstLine(),re=y.lastLine();if(Y<Q&&B.line==Q)return this.moveToStartOfLine(y,$,_,N);if(Y>re&&B.line==re)return go(y,$,_,N,!0);var se=y.ace.session.getFoldLine(Y);return se&&(_.forward?Y>se.start.row&&(Y=se.end.row+1):Y=se.start.row),_.toFirstChar&&(j=pt(y.getLine(Y)),N.lastHPos=j),N.lastHSPos=y.charCoords(new De(Y,j),"div").left,new De(Y,j)},moveByDisplayLines:function(y,$,_,N){var B=$;switch(N.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:N.lastHSPos=y.charCoords(B,"div").left}var j=_.repeat,Q=y.findPosV(B,_.forward?j:-j,"line",N.lastHSPos);if(Q.hitSide)if(_.forward)var q=y.charCoords(Q,"div"),Y={top:q.top+8,left:N.lastHSPos},Q=y.coordsChar(Y,"div");else{var re=y.charCoords(new De(y.firstLine(),0),"div");re.left=N.lastHSPos,Q=y.coordsChar(re,"div")}return N.lastHPos=Q.ch,Q},moveByPage:function(y,$,_){var N=$,B=_.repeat;return y.findPosV(N,_.forward?B:-B,"page")},moveByParagraph:function(y,$,_){var N=_.forward?1:-1;return ks(y,$,_.repeat,N)},moveBySentence:function(y,$,_){var N=_.forward?1:-1;return ji(y,$,_.repeat,N)},moveByScroll:function(y,$,_,N){var B=y.getScrollInfo(),j=null,q=_.repeat;q||(q=B.clientHeight/(2*y.defaultTextHeight()));var Y=y.charCoords($,"local");if(_.repeat=q,j=Zr.moveByDisplayLines(y,$,_,N),!j)return null;var Q=y.charCoords(j,"local");return y.scrollTo(null,B.top+Q.top-Y.top),j},moveByWords:function(y,$,_){return xr(y,$,_.repeat,!!_.forward,!!_.wordEnd,!!_.bigWord)},moveTillCharacter:function(y,$,_){var N=_.repeat,B=Wo(y,N,_.forward,_.selectedCharacter,$),j=_.forward?-1:1;return Yr(j,_),B?(B.ch+=j,B):null},moveToCharacter:function(y,$,_){var N=_.repeat;return Yr(0,_),Wo(y,N,_.forward,_.selectedCharacter,$)||$},moveToSymbol:function(y,$,_){var N=_.repeat;return Wi(y,N,_.forward,_.selectedCharacter)||$},moveToColumn:function(y,$,_,N){var B=_.repeat;return N.lastHPos=B-1,N.lastHSPos=y.charCoords($,"div").left,Ga(y,B)},moveToEol:function(y,$,_,N){return go(y,$,_,N,!1)},moveToFirstNonWhiteSpaceCharacter:function(y,$){var _=$;return new De(_.line,pt(y.getLine(_.line)))},moveToMatchedSymbol:function(y,$){for(var _=$,N=_.line,B=_.ch,j=y.getLine(N),q;B<j.length;B++)if(q=j.charAt(B),q&&l(q)){var Y=y.getTokenTypeAt(new De(N,B+1));if(Y!=="string"&&Y!=="comment")break}if(B<j.length){var Q=/[<>]/.test(j[B])?/[(){}[\]<>]/:/[(){}[\]]/,re=y.findMatchingBracket(new De(N,B+1),{bracketRegex:Q});return re.to}return _},moveToStartOfLine:function(y,$){return new De($.line,0)},moveToLineOrEdgeOfDocument:function(y,$,_){var N=_.forward?y.lastLine():y.firstLine();return _.repeatIsExplicit&&(N=_.repeat-y.getOption("firstLineNumber")),new De(N,pt(y.getLine(N)))},moveToStartOfDisplayLine:function(y){return y.execCommand("goLineLeft"),y.getCursor()},moveToEndOfDisplayLine:function(y){y.execCommand("goLineRight");var $=y.getCursor();return $.sticky=="before"&&$.ch--,$},textObjectManipulation:function(y,$,_,N){var B={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},j={"'":!0,'"':!0,"`":!0},q=_.selectedCharacter;q=="b"?q="(":q=="B"&&(q="{");var Y=!_.textObjectInner,Q,re;if(B[q]){if(re=!0,Q=Yn(y,$,q,Y),!Q){var se=y.getSearchCursor(new RegExp("\\"+q,"g"),$);se.find()&&(Q=Yn(y,se.from(),q,Y))}}else if(j[q])re=!0,Q=Mr(y,$,q,Y);else if(q==="W"||q==="w")for(var ye=_.repeat||1;ye-- >0;){var Ce=kt(y,{inclusive:Y,innerWord:!Y,bigWord:q==="W",noSymbol:q==="W",multiline:!0},Q&&Q.end);Ce&&(Q||(Q=Ce),Q.end=Ce.end)}else if(q==="p")if(Q=ks(y,$,_.repeat,0,Y),_.linewise=!0,N.visualMode)N.visualLine||(N.visualLine=!0);else{var me=N.inputState.operatorArgs;me&&(me.linewise=!0),Q.end.line--}else if(q==="t")Q=$n(y,$,Y);else if(q==="s"){var be=y.getLine($.line);$.ch>0&&w(be[$.ch])&&($.ch-=1);var Oe=aa(y,$,_.repeat,1,Y),Re=aa(y,$,_.repeat,-1,Y);m(y.getLine(Re.line)[Re.ch])&&m(y.getLine(Oe.line)[Oe.ch-1])&&(Re={line:Re.line,ch:Re.ch+1}),Q={start:Re,end:Oe}}return Q?y.state.vim.visualMode?Ve(y,Q.start,Q.end,re):[Q.start,Q.end]:null},repeatLastCharacterSearch:function(y,$,_){var N=He.lastCharacterSearch,B=_.repeat,j=_.forward===N.forward,q=(N.increment?1:0)*(j?-1:1);y.moveH(-q,"char"),_.inclusive=!!j;var Y=Wo(y,B,j,N.selectedCharacter);return Y?(Y.ch+=q,Y):(y.moveH(q,"char"),$)}},Qo={change:function(y,$,_){var N,B,j=y.state.vim,q=_[0].anchor,Y=_[0].head;if(j.visualMode)if($.fullLine)Y.ch=Number.MAX_VALUE,Y.line--,y.setSelection(q,Y),B=y.getSelection(),y.replaceSelection(""),N=q;else{B=y.getSelection();var Q=he("",_.length);y.replaceSelections(Q),N=mt(_[0].head,_[0].anchor)}else{B=y.getRange(q,Y);var re=j.lastEditInputState||{};if(re.motion=="moveByWords"&&!m(B)){var se=/\s+$/.exec(B);se&&re.motionArgs&&re.motionArgs.forward&&(Y=ge(Y,0,-se[0].length),B=B.slice(0,-se[0].length))}$.linewise&&(q=new De(q.line,pt(y.getLine(q.line))),Y.line>q.line&&(Y=new De(Y.line-1,Number.MAX_VALUE))),y.replaceRange("",q,Y),N=q}He.registerController.pushText($.registerName,"change",B,$.linewise,_.length>1),zn.enterInsertMode(y,{head:N},y.state.vim)},delete:function(y,$,_){var N,B,j=y.state.vim;if(j.visualBlock){B=y.getSelection();var q=he("",_.length);y.replaceSelections(q),N=mt(_[0].head,_[0].anchor)}else{var Y=_[0].anchor,Q=_[0].head;$.linewise&&Q.line!=y.firstLine()&&Y.line==y.lastLine()&&Y.line==Q.line-1&&(Y.line==y.firstLine()?Y.ch=0:Y=new De(Y.line-1,Jt(y,Y.line-1))),B=y.getRange(Y,Q),y.replaceRange("",Y,Q),N=Y,$.linewise&&(N=Zr.moveToFirstNonWhiteSpaceCharacter(y,Y))}return He.registerController.pushText($.registerName,"delete",B,$.linewise,j.visualBlock),ue(y,N)},indent:function(y,$,_){var N=y.state.vim,B=N.visualMode?$.repeat:1;if(N.visualBlock){for(var j=y.getOption("tabSize"),q=y.getOption("indentWithTabs")?" ":" ".repeat(j),Y,Q=_.length-1;Q>=0;Q--)if(Y=mt(_[Q].anchor,_[Q].head),$.indentRight)y.replaceRange(q.repeat(B),Y,Y);else{for(var re=y.getLine(Y.line),se=0,ye=0;ye<B;ye++){var Ce=re[Y.ch+se];if(Ce==" ")se++;else{if(Ce!=" ")break;se++;for(var me=1;me<q.length&&(Ce=re[Y.ch+se],Ce===" ");me++)se++}}y.replaceRange("",Y,ge(Y,0,se))}return Y}if(y.indentMore)for(var ye=0;ye<B;ye++)$.indentRight?y.indentMore():y.indentLess();else{var be=_[0].anchor.line,Oe=N.visualBlock?_[_.length-1].anchor.line:_[0].head.line;$.linewise&&Oe--;for(var Q=be;Q<=Oe;Q++)for(var ye=0;ye<B;ye++)y.indentLine(Q,$.indentRight)}return Zr.moveToFirstNonWhiteSpaceCharacter(y,_[0].anchor)},indentAuto:function(y,$,_){return y.execCommand("indentAuto"),Zr.moveToFirstNonWhiteSpaceCharacter(y,_[0].anchor)},hardWrap:function(y,$,_,N,B){if(y.hardWrap){var j=_[0].anchor.line,q=_[0].head.line;$.linewise&&q--;var Y=y.hardWrap({from:j,to:q});return Y>j&&$.linewise&&Y--,$.keepCursor?N:new De(Y,0)}},changeCase:function(y,$,_,N,B){for(var j=y.getSelections(),q=[],Y=$.toLower,Q=0;Q<j.length;Q++){var re=j[Q],se="";if(Y===!0)se=re.toLowerCase();else if(Y===!1)se=re.toUpperCase();else for(var ye=0;ye<re.length;ye++){var Ce=re.charAt(ye);se+=u(Ce)?Ce.toLowerCase():Ce.toUpperCase()}q.push(se)}return y.replaceSelections(q),$.shouldMoveCursor?B:!y.state.vim.visualMode&&$.linewise&&_[0].anchor.line+1==_[0].head.line?Zr.moveToFirstNonWhiteSpaceCharacter(y,N):$.linewise?N:mt(_[0].anchor,_[0].head)},yank:function(y,$,_,N){var B=y.state.vim,j=y.getSelection(),q=B.visualMode?mt(B.sel.anchor,B.sel.head,_[0].head,_[0].anchor):N;return He.registerController.pushText($.registerName,"yank",j,$.linewise,B.visualBlock),q}},zn={jumpListWalk:function(y,$,_){if(!_.visualMode){var N=$.repeat,B=$.forward,j=He.jumpList,q=j.move(y,B?N:-N),Y=q?q.find():void 0;Y=Y||y.getCursor(),y.setCursor(Y),y.ace.curOp.command.scrollIntoView="center-animate"}},scroll:function(y,$,_){if(!_.visualMode){var N=$.repeat||1,B=y.defaultTextHeight(),j=y.getScrollInfo().top,q=B*N,Y=$.forward?j+q:j-q,Q=Xe(y.getCursor()),re=y.charCoords(Q,"local");if($.forward)Y>re.top?(Q.line+=(Y-re.top)/B,Q.line=Math.ceil(Q.line),y.setCursor(Q),re=y.charCoords(Q,"local"),y.scrollTo(null,re.top)):y.scrollTo(null,Y);else{var se=Y+y.getScrollInfo().clientHeight;se<re.bottom?(Q.line-=(re.bottom-se)/B,Q.line=Math.floor(Q.line),y.setCursor(Q),re=y.charCoords(Q,"local"),y.scrollTo(null,re.bottom-y.getScrollInfo().clientHeight)):y.scrollTo(null,Y)}}},scrollToCursor:function(y,$){var _=y.getCursor().line,N=y.charCoords(new De(_,0),"local"),B=y.getScrollInfo().clientHeight,j=N.top;switch($.position){case"center":j=N.bottom-B/2;break;case"bottom":var q=new De(_,y.getLine(_).length-1),Y=y.charCoords(q,"local"),Q=Y.bottom-j;j=j-B+Q}y.scrollTo(null,j)},replayMacro:function(y,$,_){var N=$.selectedCharacter,B=$.repeat,j=He.macroModeState;for(N=="@"?N=j.latestRegister:j.latestRegister=N;B--;)Ts(y,_,j,N)},enterMacroRecordMode:function(y,$){var _=He.macroModeState,N=$.selectedCharacter;He.registerController.isValidRegister(N)&&_.enterMacroRecordMode(y,N)},toggleOverwrite:function(y){y.state.overwrite?(y.toggleOverwrite(!1),y.setOption("keyMap","vim-insert"),je.signal(y,"vim-mode-change",{mode:"insert"})):(y.toggleOverwrite(!0),y.setOption("keyMap","vim-replace"),je.signal(y,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(y,$,_){if(!y.getOption("readOnly")){_.insertMode=!0,_.insertModeRepeat=$&&$.repeat||1;var N=$?$.insertAt:null,B=_.sel,j=$.head||y.getCursor("head"),q=y.listSelections().length;if(N=="eol")j=new De(j.line,Jt(y,j.line));else if(N=="bol")j=new De(j.line,0);else if(N=="charAfter"){var Y=b(y,j,ge(j,0,1));j=Y.end}else if(N=="firstNonBlank"){var Y=b(y,j,Zr.moveToFirstNonWhiteSpaceCharacter(y,j));j=Y.end}else if(N=="startOfSelectedArea"){if(!_.visualMode)return;_.visualBlock?(j=new De(Math.min(B.head.line,B.anchor.line),Math.min(B.head.ch,B.anchor.ch)),q=Math.abs(B.head.line-B.anchor.line)+1):B.head.line<B.anchor.line?j=B.head:j=new De(B.anchor.line,0)}else if(N=="endOfSelectedArea"){if(!_.visualMode)return;_.visualBlock?(j=new De(Math.min(B.head.line,B.anchor.line),Math.max(B.head.ch,B.anchor.ch)+1),q=Math.abs(B.head.line-B.anchor.line)+1):B.head.line>=B.anchor.line?j=ge(B.head,0,1):j=new De(B.anchor.line,0)}else if(N=="inplace"){if(_.visualMode)return}else N=="lastEdit"&&(j=mo(y)||j);y.setOption("disableInput",!1),$&&$.replace?(y.toggleOverwrite(!0),y.setOption("keyMap","vim-replace"),je.signal(y,"vim-mode-change",{mode:"replace"})):(y.toggleOverwrite(!1),y.setOption("keyMap","vim-insert"),je.signal(y,"vim-mode-change",{mode:"insert"})),He.macroModeState.isPlaying||(y.on("change",vo),_.insertEnd&&_.insertEnd.clear(),_.insertEnd=y.setBookmark(j,{insertLeft:!0}),je.on(y.getInputField(),"keydown",Ms)),_.visualMode&&At(y),nr(y,j,q)}},toggleVisualMode:function(y,$,_){var N=$.repeat,B=y.getCursor(),j;if(_.visualMode)_.visualLine^$.linewise||_.visualBlock^$.blockwise?(_.visualLine=!!$.linewise,_.visualBlock=!!$.blockwise,je.signal(y,"vim-mode-change",{mode:"visual",subMode:_.visualLine?"linewise":_.visualBlock?"blockwise":""}),Je(y)):At(y);else{_.visualMode=!0,_.visualLine=!!$.linewise,_.visualBlock=!!$.blockwise,j=ue(y,new De(B.line,B.ch+N-1));var q=b(y,B,j);_.sel={anchor:q.start,head:q.end},je.signal(y,"vim-mode-change",{mode:"visual",subMode:_.visualLine?"linewise":_.visualBlock?"blockwise":""}),Je(y),ai(y,_,"<",mt(B,j)),ai(y,_,">",sn(B,j))}},reselectLastSelection:function(y,$,_){var N=_.lastSelection;if(_.visualMode&&ke(y,_),N){var B=N.anchorMark.find(),j=N.headMark.find();if(!B||!j)return;_.sel={anchor:B,head:j},_.visualMode=!0,_.visualLine=N.visualLine,_.visualBlock=N.visualBlock,Je(y),ai(y,_,"<",mt(B,j)),ai(y,_,">",sn(B,j)),je.signal(y,"vim-mode-change",{mode:"visual",subMode:_.visualLine?"linewise":_.visualBlock?"blockwise":""})}},joinLines:function(y,$,_){var N,B;if(_.visualMode){if(N=y.getCursor("anchor"),B=y.getCursor("head"),lt(B,N)){var j=B;B=N,N=j}B.ch=Jt(y,B.line)-1}else{var q=Math.max($.repeat,2);N=y.getCursor(),B=ue(y,new De(N.line+q-1,1/0))}for(var Y=0,Q=N.line;Q<B.line;Q++){Y=Jt(y,N.line);var re="",se=0;if(!$.keepSpaces){var ye=y.getLine(N.line+1);se=ye.search(/\S/),se==-1?se=ye.length:re=" "}y.replaceRange(re,new De(N.line,Y),new De(N.line+1,se))}var Ce=ue(y,new De(N.line,Y));_.visualMode&&At(y,!1),y.setCursor(Ce)},newLineAndEnterInsertMode:function(y,$,_){_.insertMode=!0;var N=Xe(y.getCursor());if(N.line===y.firstLine()&&!$.after)y.replaceRange(`
1444
1444
  `,new De(y.firstLine(),0)),y.setCursor(y.firstLine(),0);else{N.line=$.after?N.line:N.line-1,N.ch=Jt(y,N.line),y.setCursor(N);var B=je.commands.newlineAndIndentContinueComment||je.commands.newlineAndIndent;B(y)}this.enterInsertMode(y,{repeat:$.repeat},_)},paste:function(y,$,_){var N=this,B=He.registerController.getRegister($.registerName),j=function(){var q=B.toString();N.continuePaste(y,$,_,q,B)};$.registerName==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"?navigator.clipboard.readText().then(function(q){N.continuePaste(y,$,_,q,B)},function(){j()}):j()},continuePaste:function(y,$,_,N,B){var j=Xe(y.getCursor());if(N){if($.matchIndent){var q=y.getOption("tabSize"),Y=function(En){var V=En.split(" ").length-1,X=En.split(" ").length-1;return V*q+X*1},Q=y.getLine(y.getCursor().line),re=Y(Q.match(/^\s*/)[0]),se=N.replace(/\n$/,""),ye=N!==se,Ce=Y(N.match(/^\s*/)[0]),N=se.replace(/^\s*/gm,function(En){var V=re+(Y(En)-Ce);if(V<0)return"";if(y.getOption("indentWithTabs")){var X=Math.floor(V/q);return Array(X+1).join(" ")}return Array(V+1).join(" ")});N+=ye?`
1445
1445
  `:""}if($.repeat>1)var N=Array($.repeat+1).join(N);var me=B.linewise,be=B.blockwise;if(be){N=N.split(`
1446
1446
  `),me&&N.pop();for(var Oe=0;Oe<N.length;Oe++)N[Oe]=N[Oe]==""?" ":N[Oe];j.ch+=$.after?1:0,j.ch=Math.min(Jt(y,j.line),j.ch)}else me?_.visualMode?N=_.visualLine?N.slice(0,-1):`
1447
1447
  `+N.slice(0,N.length-1)+`
1448
1448
  `:$.after?(N=`
1449
- `+N.slice(0,N.length-1),j.ch=Jt(y,j.line)):j.ch=0:j.ch+=$.after?1:0;var Re;if(_.visualMode){_.lastPastedText=N;var Ge,ht=Ke(y,_),tt=ht[0],st=ht[1],kn=y.getSelection(),dt=y.listSelections(),Mn=new Array(dt.length).join("1").split("1");_.lastSelection&&(Ge=_.lastSelection.headMark.find()),He.registerController.unnamedRegister.setText(kn),be?(y.replaceSelections(Mn),st=new De(tt.line+N.length-1,tt.ch),y.setCursor(tt),Pn(y,st),y.replaceSelections(N),Re=tt):_.visualBlock?(y.replaceSelections(Mn),y.setCursor(tt),y.replaceRange(N,tt,tt),Re=tt):(y.replaceRange(N,tt,st),Re=y.posFromIndex(y.indexFromPos(tt)+N.length-1)),Ge&&(_.lastSelection.headMark=y.setBookmark(Ge)),me&&(Re.ch=0)}else if(be){y.setCursor(j);for(var Oe=0;Oe<N.length;Oe++){var $t=j.line+Oe;$t>y.lastLine()&&y.replaceRange(`
1450
- `,new De($t,0));var Ot=Jt(y,$t);Ot<j.ch&&Fn(y,$t,j.ch)}y.setCursor(j),Pn(y,new De(j.line+N.length-1,j.ch)),y.replaceSelections(N),Re=j}else if(y.replaceRange(N,j),me){var $t=$.after?j.line+1:j.line;Re=new De($t,pt(y.getLine($t)))}else Re=Xe(j),/\n/.test(N)||(Re.ch+=N.length-($.after?1:0));_.visualMode&&At(y,!1),y.setCursor(Re)}},undo:function(y,$){y.operation(function(){Ze(y,je.commands.undo,$.repeat)(),y.setCursor(ue(y,y.getCursor("start")))})},redo:function(y,$){Ze(y,je.commands.redo,$.repeat)()},setRegister:function(y,$,_){_.inputState.registerName=$.selectedCharacter},insertRegister:function(y,$,_){var N=$.selectedCharacter,B=He.registerController.getRegister(N),j=B&&B.toString();j&&y.replaceSelection(j)},oneNormalCommand:function(y,$,_){Qr(y,!0),_.insertModeReturn=!0,je.on(y,"vim-command-done",function N(){_.visualMode||(_.insertModeReturn&&(_.insertModeReturn=!1,_.insertMode||zn.enterInsertMode(y,{},_)),je.off(y,"vim-command-done",N))})},setMark:function(y,$,_){var N=$.selectedCharacter;si(y,_,N,y.getCursor())},replace:function(y,$,_){var N=$.selectedCharacter,B=y.getCursor(),j,q,Y=y.listSelections();if(_.visualMode)B=y.getCursor("start"),q=y.getCursor("end");else{var Q=y.getLine(B.line);j=B.ch+$.repeat,j>Q.length&&(j=Q.length),q=new De(B.line,j)}var re=b(y,B,q);if(B=re.start,q=re.end,N==`
1449
+ `+N.slice(0,N.length-1),j.ch=Jt(y,j.line)):j.ch=0:j.ch+=$.after?1:0;var Re;if(_.visualMode){_.lastPastedText=N;var Ge,ht=Ke(y,_),tt=ht[0],at=ht[1],_n=y.getSelection(),dt=y.listSelections(),Mn=new Array(dt.length).join("1").split("1");_.lastSelection&&(Ge=_.lastSelection.headMark.find()),He.registerController.unnamedRegister.setText(_n),be?(y.replaceSelections(Mn),at=new De(tt.line+N.length-1,tt.ch),y.setCursor(tt),Pn(y,at),y.replaceSelections(N),Re=tt):_.visualBlock?(y.replaceSelections(Mn),y.setCursor(tt),y.replaceRange(N,tt,tt),Re=tt):(y.replaceRange(N,tt,at),Re=y.posFromIndex(y.indexFromPos(tt)+N.length-1)),Ge&&(_.lastSelection.headMark=y.setBookmark(Ge)),me&&(Re.ch=0)}else if(be){y.setCursor(j);for(var Oe=0;Oe<N.length;Oe++){var $t=j.line+Oe;$t>y.lastLine()&&y.replaceRange(`
1450
+ `,new De($t,0));var Ot=Jt(y,$t);Ot<j.ch&&Fn(y,$t,j.ch)}y.setCursor(j),Pn(y,new De(j.line+N.length-1,j.ch)),y.replaceSelections(N),Re=j}else if(y.replaceRange(N,j),me){var $t=$.after?j.line+1:j.line;Re=new De($t,pt(y.getLine($t)))}else Re=Xe(j),/\n/.test(N)||(Re.ch+=N.length-($.after?1:0));_.visualMode&&At(y,!1),y.setCursor(Re)}},undo:function(y,$){y.operation(function(){Ze(y,je.commands.undo,$.repeat)(),y.setCursor(ue(y,y.getCursor("start")))})},redo:function(y,$){Ze(y,je.commands.redo,$.repeat)()},setRegister:function(y,$,_){_.inputState.registerName=$.selectedCharacter},insertRegister:function(y,$,_){var N=$.selectedCharacter,B=He.registerController.getRegister(N),j=B&&B.toString();j&&y.replaceSelection(j)},oneNormalCommand:function(y,$,_){Qr(y,!0),_.insertModeReturn=!0,je.on(y,"vim-command-done",function N(){_.visualMode||(_.insertModeReturn&&(_.insertModeReturn=!1,_.insertMode||zn.enterInsertMode(y,{},_)),je.off(y,"vim-command-done",N))})},setMark:function(y,$,_){var N=$.selectedCharacter;ai(y,_,N,y.getCursor())},replace:function(y,$,_){var N=$.selectedCharacter,B=y.getCursor(),j,q,Y=y.listSelections();if(_.visualMode)B=y.getCursor("start"),q=y.getCursor("end");else{var Q=y.getLine(B.line);j=B.ch+$.repeat,j>Q.length&&(j=Q.length),q=new De(B.line,j)}var re=b(y,B,q);if(B=re.start,q=re.end,N==`
1451
1451
  `)_.visualMode||y.replaceRange("",B,q),(je.commands.newlineAndIndentContinueComment||je.commands.newlineAndIndent)(y);else{var se=y.getRange(B,q);if(se=se.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,N),se=se.replace(/[^\n]/g,N),_.visualBlock){var ye=new Array(y.getOption("tabSize")+1).join(" ");se=y.getSelection(),se=se.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,N),se=se.replace(/\t/g,ye).replace(/[^\n]/g,N).split(`
1452
- `),y.replaceSelections(se)}else y.replaceRange(se,B,q);_.visualMode?(B=at(Y[0].anchor,Y[0].head)?Y[0].anchor:Y[0].head,y.setCursor(B),At(y,!1)):y.setCursor(ge(q,0,-1))}},incrementNumberToken:function(y,$){for(var _=y.getCursor(),N=y.getLine(_.line),B=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi,j,q,Y,Q;(j=B.exec(N))!==null&&(q=j.index,Y=q+j[0].length,!(_.ch<Y)););if(!(!$.backtrack&&Y<=_.ch)&&j){var re=j[2]||j[4],se=j[3]||j[5],ye=$.increase?1:-1,Ce={"0b":2,0:8,"":10,"0x":16}[re.toLowerCase()],me=parseInt(j[1]+se,Ce)+ye*$.repeat;Q=me.toString(Ce);var be=re?new Array(se.length-Q.length+1+j[1].length).join("0"):"";Q.charAt(0)==="-"?Q="-"+re+be+Q.substr(1):Q=re+be+Q;var Oe=new De(_.line,q),Re=new De(_.line,Y);y.replaceRange(Q,Oe,Re),y.setCursor(new De(_.line,q+Q.length-1))}},repeatLastEdit:function(y,$,_){var N=_.lastEditInputState;if(N){var B=$.repeat;B&&$.repeatIsExplicit?_.lastEditInputState.repeatOverride=B:B=_.lastEditInputState.repeatOverride||B,ua(y,_,B,!1)}},indent:function(y,$){y.indentLine(y.getCursor().line,$.indentRight)},exitInsertMode:Qr},ci={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},ui={bracket:{isComplete:function(y){if(y.nextCh===y.symb){if(y.depth++,y.depth>=1)return!0}else y.nextCh===y.reverseSymb&&y.depth--;return!1}},section:{init:function(y){y.curMoveThrough=!0,y.symb=(y.forward?"]":"[")===y.symb?"{":"}"},isComplete:function(y){return y.index===0&&y.nextCh===y.symb}},comment:{isComplete:function(y){var $=y.lastCh==="*"&&y.nextCh==="/";return y.lastCh=y.nextCh,$}},method:{init:function(y){y.symb=y.symb==="m"?"{":"}",y.reverseSymb=y.symb==="{"?"}":"{"},isComplete:function(y){return y.nextCh===y.symb}},preprocess:{init:function(y){y.index=0},isComplete:function(y){if(y.nextCh==="#"){var $=y.lineText.match(/^#(\w+)/)[1];if($==="endif"){if(y.forward&&y.depth===0)return!0;y.depth++}else if($==="if"){if(!y.forward&&y.depth===0)return!0;y.depth--}if($==="else"&&y.depth===0)return!0}return!1}}};E("pcre",!0,"boolean"),zi.prototype={getQuery:function(){return He.query},setQuery:function(y){He.query=y},getOverlay:function(){return this.searchOverlay},setOverlay:function(y){this.searchOverlay=y},isReversed:function(){return He.isReversed},setReversed:function(y){He.isReversed=y},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(y){this.annotate=y}};var Si={"\\n":`
1452
+ `),y.replaceSelections(se)}else y.replaceRange(se,B,q);_.visualMode?(B=lt(Y[0].anchor,Y[0].head)?Y[0].anchor:Y[0].head,y.setCursor(B),At(y,!1)):y.setCursor(ge(q,0,-1))}},incrementNumberToken:function(y,$){for(var _=y.getCursor(),N=y.getLine(_.line),B=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi,j,q,Y,Q;(j=B.exec(N))!==null&&(q=j.index,Y=q+j[0].length,!(_.ch<Y)););if(!(!$.backtrack&&Y<=_.ch)&&j){var re=j[2]||j[4],se=j[3]||j[5],ye=$.increase?1:-1,Ce={"0b":2,0:8,"":10,"0x":16}[re.toLowerCase()],me=parseInt(j[1]+se,Ce)+ye*$.repeat;Q=me.toString(Ce);var be=re?new Array(se.length-Q.length+1+j[1].length).join("0"):"";Q.charAt(0)==="-"?Q="-"+re+be+Q.substr(1):Q=re+be+Q;var Oe=new De(_.line,q),Re=new De(_.line,Y);y.replaceRange(Q,Oe,Re),y.setCursor(new De(_.line,q+Q.length-1))}},repeatLastEdit:function(y,$,_){var N=_.lastEditInputState;if(N){var B=$.repeat;B&&$.repeatIsExplicit?_.lastEditInputState.repeatOverride=B:B=_.lastEditInputState.repeatOverride||B,ua(y,_,B,!1)}},indent:function(y,$){y.indentLine(y.getCursor().line,$.indentRight)},exitInsertMode:Qr},ui={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},hi={bracket:{isComplete:function(y){if(y.nextCh===y.symb){if(y.depth++,y.depth>=1)return!0}else y.nextCh===y.reverseSymb&&y.depth--;return!1}},section:{init:function(y){y.curMoveThrough=!0,y.symb=(y.forward?"]":"[")===y.symb?"{":"}"},isComplete:function(y){return y.index===0&&y.nextCh===y.symb}},comment:{isComplete:function(y){var $=y.lastCh==="*"&&y.nextCh==="/";return y.lastCh=y.nextCh,$}},method:{init:function(y){y.symb=y.symb==="m"?"{":"}",y.reverseSymb=y.symb==="{"?"}":"{"},isComplete:function(y){return y.nextCh===y.symb}},preprocess:{init:function(y){y.index=0},isComplete:function(y){if(y.nextCh==="#"){var $=y.lineText.match(/^#(\w+)/)[1];if($==="endif"){if(y.forward&&y.depth===0)return!0;y.depth++}else if($==="if"){if(!y.forward&&y.depth===0)return!0;y.depth--}if($==="else"&&y.depth===0)return!0}return!1}}};E("pcre",!0,"boolean"),zi.prototype={getQuery:function(){return He.query},setQuery:function(y){He.query=y},getOverlay:function(){return this.searchOverlay},setOverlay:function(y){this.searchOverlay=y},isReversed:function(){return He.isReversed},setReversed:function(y){He.isReversed=y},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(y){this.annotate=y}};var Ai={"\\n":`
1453
1453
  `,"\\r":"\r","\\t":" "},pr={"\\/":"/","\\\\":"\\","\\n":`
1454
- `,"\\r":"\r","\\t":" ","\\&":"&"},gr=0,Cr=function(){this.buildCommandMap_()};Cr.prototype={processCommand:function(y,$,_){var N=this;y.operation(function(){y.curOp.isVimOp=!0,N._processCommand(y,$,_)})},_processCommand:function(y,$,_){var N=y.state.vim,B=He.registerController.getRegister(":"),j=B.toString(),q=new je.StringStream($);B.setText($);var Y=_||{};Y.input=$;try{this.parseInput_(y,q,Y)}catch(se){throw Kt(y,se.toString()),se}N.visualMode&&At(y);var Q,re;if(!Y.commandName)Y.line!==void 0&&(re="move");else if(Q=this.matchCommand_(Y.commandName),Q){if(re=Q.name,Q.excludeFromCommandHistory&&B.setText(j),this.parseCommandArgs_(q,Y,Q),Q.type=="exToKey"){I(y,Q.toKeys,Q);return}if(Q.type=="exToEx"){this.processCommand(y,Q.toInput);return}}if(!re){Kt(y,'Not an editor command ":'+$+'"');return}try{Is[re](y,Y),(!Q||!Q.possiblyAsync)&&Y.callback&&Y.callback()}catch(se){throw Kt(y,se.toString()),se}},parseInput_:function(y,$,_){if($.eatWhile(":"),$.eat("%")?(_.line=y.firstLine(),_.lineEnd=y.lastLine()):(_.line=this.parseLineSpec_(y,$),_.line!==void 0&&$.eat(",")&&(_.lineEnd=this.parseLineSpec_(y,$))),_.line==null)if(y.state.vim.visualMode){var N=Xr(y,y.state.vim,"<");_.selectionLine=N&&N.line,N=Xr(y,y.state.vim,">"),_.selectionLineEnd=N&&N.line}else _.selectionLine=y.getCursor().line;else _.selectionLine=_.line,_.selectionLineEnd=_.lineEnd;var B=$.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return B?_.commandName=B[1]:_.commandName=$.match(/.*/)[0],_},parseLineSpec_:function(y,$){var _=$.match(/^(\d+)/);if(_)return parseInt(_[1],10)-1;switch($.next()){case".":return this.parseLineSpecOffset_($,y.getCursor().line);case"$":return this.parseLineSpecOffset_($,y.lastLine());case"'":var N=$.next(),B=Xr(y,y.state.vim,N);if(!B)throw new Error("Mark not set");return this.parseLineSpecOffset_($,B.line);case"-":case"+":return $.backUp(1),this.parseLineSpecOffset_($,y.getCursor().line);default:return $.backUp(1),void 0}},parseLineSpecOffset_:function(y,$){var _=y.match(/^([+-])?(\d+)/);if(_){var N=parseInt(_[2],10);_[1]=="-"?$-=N:$+=N}return $},parseCommandArgs_:function(y,$,_){if(!y.eol()){$.argString=y.match(/.*/)[0];var N=_.argDelimiter||/\s+/,B=wr($.argString).split(N);B.length&&B[0]&&($.args=B)}},matchCommand_:function(y){for(var $=y.length;$>0;$--){var _=y.substring(0,$);if(this.commandMap_[_]){var N=this.commandMap_[_];if(N.name.indexOf(y)===0)return N}}return null},buildCommandMap_:function(){this.commandMap_={};for(var y=0;y<li.length;y++){var $=li[y],_=$.shortName||$.name;this.commandMap_[_]=$}},map:function(y,$,_,N){if(y!=":"&&y.charAt(0)==":"){if(_)throw Error("Mode not supported for ex mappings");var B=y.substring(1);$!=":"&&$.charAt(0)==":"?this.commandMap_[B]={name:B,type:"exToEx",toInput:$.substring(1),user:!0}:this.commandMap_[B]={name:B,type:"exToKey",toKeys:$,user:!0}}else{var j={keys:y,type:"keyToKey",toKeys:$,noremap:!!N};_&&(j.context=_),On.unshift(j)}},unmap:function(y,$){if(y!=":"&&y.charAt(0)==":"){if($)throw Error("Mode not supported for ex mappings");var _=y.substring(1);if(this.commandMap_[_]&&this.commandMap_[_].user)return delete this.commandMap_[_],!0}else for(var N=y,B=0;B<On.length;B++)if(N==On[B].keys&&On[B].context===$)return On.splice(B,1),!0}};var Is={colorscheme:function(y,$){if(!$.args||$.args.length<1){Kt(y,y.getOption("theme"));return}y.setOption("theme",$.args[0])},map:function(y,$,_,N){var B=$.args;if(!B||B.length<2){y&&Kt(y,"Invalid mapping: "+$.input);return}kr.map(B[0],B[1],_,N)},imap:function(y,$){this.map(y,$,"insert")},nmap:function(y,$){this.map(y,$,"normal")},vmap:function(y,$){this.map(y,$,"visual")},omap:function(y,$){this.map(y,$,"operatorPending")},noremap:function(y,$){this.map(y,$,void 0,!0)},inoremap:function(y,$){this.map(y,$,"insert",!0)},nnoremap:function(y,$){this.map(y,$,"normal",!0)},vnoremap:function(y,$){this.map(y,$,"visual",!0)},onoremap:function(y,$){this.map(y,$,"operatorPending",!0)},unmap:function(y,$,_){var N=$.args;(!N||N.length<1||!kr.unmap(N[0],_))&&y&&Kt(y,"No such mapping: "+$.input)},mapclear:function(y,$){_t.mapclear()},imapclear:function(y,$){_t.mapclear("insert")},nmapclear:function(y,$){_t.mapclear("normal")},vmapclear:function(y,$){_t.mapclear("visual")},omapclear:function(y,$){_t.mapclear("operatorPending")},move:function(y,$){jn.processCommand(y,y.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:$.line+1})},set:function(y,$){var _=$.args,N=$.setCfg||{};if(!_||_.length<1){y&&Kt(y,"Invalid mapping: "+$.input);return}var B=_[0].split("="),j=B[0],q=B[1],Y=!1,Q=!1;if(j.charAt(j.length-1)=="?"){if(q)throw Error("Trailing characters: "+$.argString);j=j.substring(0,j.length-1),Y=!0}else j.charAt(j.length-1)=="!"&&(j=j.substring(0,j.length-1),Q=!0);q===void 0&&j.substring(0,2)=="no"&&(j=j.substring(2),q=!1);var re=Gt[j]&&Gt[j].type=="boolean";if(re&&(Q?q=!k(j,y,N):q==null&&(q=!0)),!re&&q===void 0||Y){var se=k(j,y,N);se instanceof Error?Kt(y,se.message):se===!0||se===!1?Kt(y," "+(se?"":"no")+j):Kt(y," "+j+"="+se)}else{var ye=T(j,q,y,N);ye instanceof Error&&Kt(y,ye.message)}},setlocal:function(y,$){$.setCfg={scope:"local"},this.set(y,$)},setglobal:function(y,$){$.setCfg={scope:"global"},this.set(y,$)},registers:function(y,$){var _=$.args,N=He.registerController.registers,B=`----------Registers----------
1454
+ `,"\\r":"\r","\\t":" ","\\&":"&"},gr=0,Cr=function(){this.buildCommandMap_()};Cr.prototype={processCommand:function(y,$,_){var N=this;y.operation(function(){y.curOp.isVimOp=!0,N._processCommand(y,$,_)})},_processCommand:function(y,$,_){var N=y.state.vim,B=He.registerController.getRegister(":"),j=B.toString(),q=new je.StringStream($);B.setText($);var Y=_||{};Y.input=$;try{this.parseInput_(y,q,Y)}catch(se){throw Kt(y,se.toString()),se}N.visualMode&&At(y);var Q,re;if(!Y.commandName)Y.line!==void 0&&(re="move");else if(Q=this.matchCommand_(Y.commandName),Q){if(re=Q.name,Q.excludeFromCommandHistory&&B.setText(j),this.parseCommandArgs_(q,Y,Q),Q.type=="exToKey"){I(y,Q.toKeys,Q);return}if(Q.type=="exToEx"){this.processCommand(y,Q.toInput);return}}if(!re){Kt(y,'Not an editor command ":'+$+'"');return}try{Is[re](y,Y),(!Q||!Q.possiblyAsync)&&Y.callback&&Y.callback()}catch(se){throw Kt(y,se.toString()),se}},parseInput_:function(y,$,_){if($.eatWhile(":"),$.eat("%")?(_.line=y.firstLine(),_.lineEnd=y.lastLine()):(_.line=this.parseLineSpec_(y,$),_.line!==void 0&&$.eat(",")&&(_.lineEnd=this.parseLineSpec_(y,$))),_.line==null)if(y.state.vim.visualMode){var N=Xr(y,y.state.vim,"<");_.selectionLine=N&&N.line,N=Xr(y,y.state.vim,">"),_.selectionLineEnd=N&&N.line}else _.selectionLine=y.getCursor().line;else _.selectionLine=_.line,_.selectionLineEnd=_.lineEnd;var B=$.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return B?_.commandName=B[1]:_.commandName=$.match(/.*/)[0],_},parseLineSpec_:function(y,$){var _=$.match(/^(\d+)/);if(_)return parseInt(_[1],10)-1;switch($.next()){case".":return this.parseLineSpecOffset_($,y.getCursor().line);case"$":return this.parseLineSpecOffset_($,y.lastLine());case"'":var N=$.next(),B=Xr(y,y.state.vim,N);if(!B)throw new Error("Mark not set");return this.parseLineSpecOffset_($,B.line);case"-":case"+":return $.backUp(1),this.parseLineSpecOffset_($,y.getCursor().line);default:return $.backUp(1),void 0}},parseLineSpecOffset_:function(y,$){var _=y.match(/^([+-])?(\d+)/);if(_){var N=parseInt(_[2],10);_[1]=="-"?$-=N:$+=N}return $},parseCommandArgs_:function(y,$,_){if(!y.eol()){$.argString=y.match(/.*/)[0];var N=_.argDelimiter||/\s+/,B=wr($.argString).split(N);B.length&&B[0]&&($.args=B)}},matchCommand_:function(y){for(var $=y.length;$>0;$--){var _=y.substring(0,$);if(this.commandMap_[_]){var N=this.commandMap_[_];if(N.name.indexOf(y)===0)return N}}return null},buildCommandMap_:function(){this.commandMap_={};for(var y=0;y<ci.length;y++){var $=ci[y],_=$.shortName||$.name;this.commandMap_[_]=$}},map:function(y,$,_,N){if(y!=":"&&y.charAt(0)==":"){if(_)throw Error("Mode not supported for ex mappings");var B=y.substring(1);$!=":"&&$.charAt(0)==":"?this.commandMap_[B]={name:B,type:"exToEx",toInput:$.substring(1),user:!0}:this.commandMap_[B]={name:B,type:"exToKey",toKeys:$,user:!0}}else{var j={keys:y,type:"keyToKey",toKeys:$,noremap:!!N};_&&(j.context=_),On.unshift(j)}},unmap:function(y,$){if(y!=":"&&y.charAt(0)==":"){if($)throw Error("Mode not supported for ex mappings");var _=y.substring(1);if(this.commandMap_[_]&&this.commandMap_[_].user)return delete this.commandMap_[_],!0}else for(var N=y,B=0;B<On.length;B++)if(N==On[B].keys&&On[B].context===$)return On.splice(B,1),!0}};var Is={colorscheme:function(y,$){if(!$.args||$.args.length<1){Kt(y,y.getOption("theme"));return}y.setOption("theme",$.args[0])},map:function(y,$,_,N){var B=$.args;if(!B||B.length<2){y&&Kt(y,"Invalid mapping: "+$.input);return}kr.map(B[0],B[1],_,N)},imap:function(y,$){this.map(y,$,"insert")},nmap:function(y,$){this.map(y,$,"normal")},vmap:function(y,$){this.map(y,$,"visual")},omap:function(y,$){this.map(y,$,"operatorPending")},noremap:function(y,$){this.map(y,$,void 0,!0)},inoremap:function(y,$){this.map(y,$,"insert",!0)},nnoremap:function(y,$){this.map(y,$,"normal",!0)},vnoremap:function(y,$){this.map(y,$,"visual",!0)},onoremap:function(y,$){this.map(y,$,"operatorPending",!0)},unmap:function(y,$,_){var N=$.args;(!N||N.length<1||!kr.unmap(N[0],_))&&y&&Kt(y,"No such mapping: "+$.input)},mapclear:function(y,$){_t.mapclear()},imapclear:function(y,$){_t.mapclear("insert")},nmapclear:function(y,$){_t.mapclear("normal")},vmapclear:function(y,$){_t.mapclear("visual")},omapclear:function(y,$){_t.mapclear("operatorPending")},move:function(y,$){jn.processCommand(y,y.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:$.line+1})},set:function(y,$){var _=$.args,N=$.setCfg||{};if(!_||_.length<1){y&&Kt(y,"Invalid mapping: "+$.input);return}var B=_[0].split("="),j=B[0],q=B[1],Y=!1,Q=!1;if(j.charAt(j.length-1)=="?"){if(q)throw Error("Trailing characters: "+$.argString);j=j.substring(0,j.length-1),Y=!0}else j.charAt(j.length-1)=="!"&&(j=j.substring(0,j.length-1),Q=!0);q===void 0&&j.substring(0,2)=="no"&&(j=j.substring(2),q=!1);var re=Gt[j]&&Gt[j].type=="boolean";if(re&&(Q?q=!k(j,y,N):q==null&&(q=!0)),!re&&q===void 0||Y){var se=k(j,y,N);se instanceof Error?Kt(y,se.message):se===!0||se===!1?Kt(y," "+(se?"":"no")+j):Kt(y," "+j+"="+se)}else{var ye=T(j,q,y,N);ye instanceof Error&&Kt(y,ye.message)}},setlocal:function(y,$){$.setCfg={scope:"local"},this.set(y,$)},setglobal:function(y,$){$.setCfg={scope:"global"},this.set(y,$)},registers:function(y,$){var _=$.args,N=He.registerController.registers,B=`----------Registers----------
1455
1455
 
1456
1456
  `;if(_){var j;_=_.join("");for(var q=0;q<_.length;q++)if(j=_.charAt(q),!!He.registerController.isValidRegister(j)){var Y=N[j]||new W;B+='"'+j+" "+Y.toString()+`
1457
1457
  `}}else for(var j in N){var Q=N[j].toString();Q.length&&(B+='"'+j+" "+Q+`
1458
1458
  `)}Kt(y,B)},sort:function(y,$){function _(){if($.argString){var $t=new je.StringStream($.argString);if($t.eat("!")&&(j=!0),$t.eol())return;if(!$t.eatSpace())return"Invalid arguments";var Ot=$t.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!Ot&&!$t.eol())return"Invalid arguments";if(Ot[1]){q=Ot[1].indexOf("i")!=-1,Y=Ot[1].indexOf("u")!=-1;var ir=Ot[1].indexOf("d")!=-1||Ot[1].indexOf("n")!=-1&&1,mr=Ot[1].indexOf("x")!=-1&&1,En=Ot[1].indexOf("o")!=-1&&1;if(ir+mr+En>1)return"Invalid arguments";Q=ir&&"decimal"||mr&&"hex"||En&&"octal"}Ot[2]&&(re=new RegExp(Ot[2].substr(1,Ot[2].length-2),q?"i":""))}}function N($t,Ot){if(j){var ir;ir=$t,$t=Ot,Ot=ir}q&&($t=$t.toLowerCase(),Ot=Ot.toLowerCase());var mr=Q&&Re.exec($t),En=Q&&Re.exec(Ot);return mr?(mr=parseInt((mr[1]+mr[2]).toLowerCase(),Ge),En=parseInt((En[1]+En[2]).toLowerCase(),Ge),mr-En):$t<Ot?-1:1}function B($t,Ot){if(j){var ir;ir=$t,$t=Ot,Ot=ir}return q&&($t[0]=$t[0].toLowerCase(),Ot[0]=Ot[0].toLowerCase()),$t[0]<Ot[0]?-1:1}var j,q,Y,Q,re,se=_();if(se){Kt(y,se+": "+$.argString);return}var ye=$.line||y.firstLine(),Ce=$.lineEnd||$.line||y.lastLine();if(ye!=Ce){var me=new De(ye,0),be=new De(Ce,Jt(y,Ce)),Oe=y.getRange(me,be).split(`
1459
- `),Re=re||(Q=="decimal"?/(-?)([\d]+)/:Q=="hex"?/(-?)(?:0x)?([0-9a-f]+)/i:Q=="octal"?/([0-7]+)/:null),Ge=Q=="decimal"?10:Q=="hex"?16:Q=="octal"?8:null,ht=[],tt=[];if(Q||re)for(var st=0;st<Oe.length;st++){var kn=re?Oe[st].match(re):null;kn&&kn[0]!=""?ht.push(kn):!re&&Re.exec(Oe[st])?ht.push(Oe[st]):tt.push(Oe[st])}else tt=Oe;if(ht.sort(re?B:N),re)for(var st=0;st<ht.length;st++)ht[st]=ht[st].input;else Q||tt.sort(N);if(Oe=j?ht.concat(tt):tt.concat(ht),Y){var dt=Oe,Mn;Oe=[];for(var st=0;st<dt.length;st++)dt[st]!=Mn&&Oe.push(dt[st]),Mn=dt[st]}y.replaceRange(Oe.join(`
1460
- `),me,be)}},vglobal:function(y,$){this.global(y,$)},normal:function(y,$){var _=$.argString;if(_&&_[0]=="!"&&(_=_.slice(1),fn=!0),_=_.trimStart(),!_){Kt(y,"Argument is required.");return}var N=$.line;if(typeof N=="number")for(var B=isNaN($.lineEnd)?N:$.lineEnd,j=N;j<=B;j++)y.setCursor(j,0),I(y,$.argString.trimStart()),y.state.vim.insertMode&&Qr(y,!0);else I(y,$.argString.trimStart()),y.state.vim.insertMode&&Qr(y,!0)},global:function(y,$){var _=$.argString;if(!_){Kt(y,"Regular Expression missing from global");return}var N=$.commandName[0]==="v";_[0]==="!"&&$.commandName[0]==="g"&&(N=!0,_=_.slice(1));var B=$.line!==void 0?$.line:y.firstLine(),j=$.lineEnd||$.line||y.lastLine(),q=Er(_),Y=_,Q;if(q.length&&(Y=q[0],Q=q.slice(1,q.length).join("/")),Y)try{xn(y,Y,!0,!0)}catch{Kt(y,"Invalid regex: "+Y);return}for(var re=Rn(y).getQuery(),se=[],ye=B;ye<=j;ye++){var Ce=y.getLine(ye),me=re.test(Ce);me!==N&&se.push(Q?y.getLineHandle(ye):Ce)}if(!Q){Kt(y,se.join(`
1461
- `));return}var be=0,Oe=function(){if(be<se.length){var Re=se[be++],Ge=y.getLineNumber(Re);if(Ge==null){Oe();return}var ht=Ge+1+Q;kr.processCommand(y,ht,{callback:Oe})}else y.releaseLineHandles&&y.releaseLineHandles()};Oe()},substitute:function(y,$){if(!y.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var _=$.argString,N=_?Hi(_,_[0]):[],B,j="",q,Y,Q,re=!1,se=!1;if(N.length)B=N[0],k("pcre")&&B!==""&&(B=new RegExp(B).source),j=N[1],j!==void 0&&(k("pcre")?j=Qa(j.replace(/([^\\])&/g,"$1$$&")):j=Xa(j),He.lastSubstituteReplacePart=j),q=N[2]?N[2].split(" "):[];else if(_&&_.length){Kt(y,"Substitutions should be of the form :s/pattern/replace/");return}if(q&&(Y=q[0],Q=parseInt(q[1]),Y&&(Y.indexOf("c")!=-1&&(re=!0),Y.indexOf("g")!=-1&&(se=!0),k("pcre")?B=B+"/"+Y:B=B.replace(/\//g,"\\/")+"/"+Y)),B)try{xn(y,B,!0,!0)}catch{Kt(y,"Invalid regex: "+B);return}if(j=j||He.lastSubstituteReplacePart,j===void 0){Kt(y,"No previous substitute regular expression");return}var ye=Rn(y),Ce=ye.getQuery(),me=$.line!==void 0?$.line:y.getCursor().line,be=$.lineEnd||me;me==y.firstLine()&&be==y.lastLine()&&(be=1/0),Q&&(me=be,be=me+Q-1);var Oe=ue(y,new De(me,0)),Re=y.getSearchCursor(Ce,Oe);zo(y,re,se,me,be,Re,Ce,j,$.callback)},startinsert:function(y,$){I(y,$.argString=="!"?"A":"i",{})},redo:je.commands.redo,undo:je.commands.undo,write:function(y){je.commands.save?je.commands.save(y):y.save&&y.save()},nohlsearch:function(y){jo(y)},yank:function(y){var $=Xe(y.getCursor()),_=$.line,N=y.getLine(_);He.registerController.pushText("0","yank",N,!0,!0)},delete:function(y,$){var _=$.selectionLine,N=isNaN($.selectionLineEnd)?_:$.selectionLineEnd;Qo.delete(y,{linewise:!0},[{anchor:new De(_,0),head:new De(N+1,0)}])},join:function(y,$){var _=$.selectionLine,N=isNaN($.selectionLineEnd)?_:$.selectionLineEnd;y.setCursor(new De(_,0)),zn.joinLines(y,{repeat:N-_},y.state.vim)},delmarks:function(y,$){if(!$.argString||!wr($.argString)){Kt(y,"Argument required");return}for(var _=y.state.vim,N=new je.StringStream(wr($.argString));!N.eol();){N.eatSpace();var B=N.pos;if(!N.match(/[a-zA-Z]/,!1)){Kt(y,"Invalid argument: "+$.argString.substring(B));return}var j=N.next();if(N.match("-",!0)){if(!N.match(/[a-zA-Z]/,!1)){Kt(y,"Invalid argument: "+$.argString.substring(B));return}var q=j,Y=N.next();if(!(c(q)&&c(Y)||u(q)&&u(Y))){Kt(y,"Invalid argument: "+q+"-");return}var Q=q.charCodeAt(0),re=Y.charCodeAt(0);if(Q>=re){Kt(y,"Invalid argument: "+$.argString.substring(B));return}for(var se=0;se<=re-Q;se++){var ye=String.fromCharCode(Q+se);delete _.marks[ye]}}else delete _.marks[j]}}},kr=new Cr;E("insertModeEscKeysTimeout",200,"number"),je.Vim=_t;var Rr={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"},hi=_t.handleKey.bind(_t);_t.handleKey=function(y,$,_){return y.operation(function(){return hi(y,$,_)},!0)},R(),r.CodeMirror=je;var di=_t.maybeInitVimState_;r.handler={$id:"ace/keyboard/vim",drawCursor:function(y,$,_,N,B){var j=this.state.vim||{},q=_.characterWidth,Y=_.lineHeight,Q=$.top,re=$.left;if(!j.insertMode){var se=N.cursor?hr.comparePoints(N.cursor,N.start)<=0:B.selection.isBackwards()||B.selection.isEmpty();!se&&re>q&&(re-=q)}!j.insertMode&&j.status&&(Y/=2,Q+=Y),Vi.translate(y,re,Q),Vi.setStyle(y.style,"width",q+"px"),Vi.setStyle(y.style,"height",Y+"px")},$getDirectionForHighlight:function(y){var $=y.state.cm,_=di($);if(!_.insertMode)return y.session.selection.isBackwards()||y.session.selection.isEmpty()},handleKeyboard:function(y,$,_,N,B){var j=y.editor,q=j.state.cm,Y=di(q);if(N!=-1){if(Y.insertMode||($==-1?(_.charCodeAt(0)>255&&y.inputKey&&(_=y.inputKey,_&&y.inputHash==4&&(_=_.toUpperCase())),y.inputChar=_):$==4||$==0?y.inputKey==_&&y.inputHash==$&&y.inputChar?(_=y.inputChar,$=-1):(y.inputChar=null,y.inputKey=_,y.inputHash=$):y.inputChar=y.inputKey=null),q.state.overwrite&&Y.insertMode&&_=="backspace"&&$==0)return{command:"gotoleft"};if(_=="c"&&$==1&&!wo.isMac&&j.getCopyText())return j.once("copy",function(){Y.insertMode?j.selection.clearSelection():q.operation(function(){At(q)})}),{command:"null",passEvent:!0};if(_=="esc"&&!Y.insertMode&&!Y.visualMode&&!q.ace.inMultiSelectMode){var Q=Rn(q),re=Q.getOverlay();re&&q.removeOverlay(re)}if($==-1||$&1||$===0&&_.length>1){var se=Y.insertMode,ye=Es($,_,B||{},Y);Y.status==null&&(Y.status="");var Ce=yo(q,ye,"user");return Y=di(q),Ce&&Y.status!=null?Y.status+=ye:Y.status==null&&(Y.status=""),q._signal("changeStatus"),!Ce&&($!=-1||se)?void 0:{command:"null",passEvent:!Ce}}}},attach:function(y){function $(){var N=di(_).insertMode;_.ace.renderer.setStyle("normal-mode",!N),y.textInput.setCommandMode(!N),y.renderer.$keepTextAreaAtCursor=N,y.renderer.$blockCursor=!N}y.state||(y.state={});var _=new je(y);y.state.cm=_,y.$vimModeHandler=this,h(_),di(_).status=null,_.on("vim-command-done",function(){_.virtualSelectionMode()||(di(_).status=null,_.ace._signal("changeStatus"),_.ace.session.markUndoGroup())}),_.on("changeStatus",function(){_.ace.renderer.updateCursor(),_.ace._signal("changeStatus")}),_.on("vim-mode-change",function(){_.virtualSelectionMode()||($(),_._signal("changeStatus"))}),$(),y.renderer.$cursorLayer.drawCursor=this.drawCursor.bind(_)},detach:function(y){var $=y.state.cm;g($),$.destroy(),y.state.cm=null,y.$vimModeHandler=null,y.renderer.$cursorLayer.drawCursor=null,y.renderer.setStyle("normal-mode",!1),y.textInput.setCommandMode(!1),y.renderer.$keepTextAreaAtCursor=!0},getStatusText:function(y){var $=y.state.cm,_=di($);if(_.insertMode)return"INSERT";var N="";return _.visualMode&&(N+="VISUAL",_.visualLine&&(N+=" LINE"),_.visualBlock&&(N+=" BLOCK")),_.status&&(N+=(N?" ":"")+_.status),N}},_t.defineOption({name:"wrap",set:function(y,$){$&&$.ace.setOption("wrap",y)},type:"boolean"},!1),_t.defineEx("write","w",function(){console.log(":write is not implemented")}),On.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"}}),On.push({keys:"gq",type:"operator",operator:"hardWrap"}),_t.defineOperator("hardWrap",function(y,$,_,N,B){var j=_[0].anchor.line,q=_[0].head.line;return $.linewise&&q--,so(y.ace,{startRow:j,endRow:q}),De(q,0)}),E("textwidth",void 0,"number",["tw"],function(y,$){if($!==void 0){if(y===void 0){var _=$.ace.getOption("printMarginColumn");return _}var N=Math.round(y);N>1&&$.ace.setOption("printMarginColumn",N)}}),zn.aceCommand=function(y,$,_){y.vimCmd=$,y.ace.inVirtualSelectionMode?y.ace.on("beforeEndOperation",xi):xi(null,y.ace)},zn.fold=function(y,$,_){y.ace.execCommand(["toggleFoldWidget","toggleFoldWidget","foldOther","unfoldall"][($.all?2:0)+($.open?1:0)])},Co=On.length,r.handler.defaultKeymap=On,r.handler.actions=zn,r.Vim=_t}),function(){ace.require(["ace/keyboard/vim"],function(n){t&&(t.exports=n)})}()}(fg)),fg.exports}wk();var Dl={exports:{}};/**
1459
+ `),Re=re||(Q=="decimal"?/(-?)([\d]+)/:Q=="hex"?/(-?)(?:0x)?([0-9a-f]+)/i:Q=="octal"?/([0-7]+)/:null),Ge=Q=="decimal"?10:Q=="hex"?16:Q=="octal"?8:null,ht=[],tt=[];if(Q||re)for(var at=0;at<Oe.length;at++){var _n=re?Oe[at].match(re):null;_n&&_n[0]!=""?ht.push(_n):!re&&Re.exec(Oe[at])?ht.push(Oe[at]):tt.push(Oe[at])}else tt=Oe;if(ht.sort(re?B:N),re)for(var at=0;at<ht.length;at++)ht[at]=ht[at].input;else Q||tt.sort(N);if(Oe=j?ht.concat(tt):tt.concat(ht),Y){var dt=Oe,Mn;Oe=[];for(var at=0;at<dt.length;at++)dt[at]!=Mn&&Oe.push(dt[at]),Mn=dt[at]}y.replaceRange(Oe.join(`
1460
+ `),me,be)}},vglobal:function(y,$){this.global(y,$)},normal:function(y,$){var _=$.argString;if(_&&_[0]=="!"&&(_=_.slice(1),pn=!0),_=_.trimStart(),!_){Kt(y,"Argument is required.");return}var N=$.line;if(typeof N=="number")for(var B=isNaN($.lineEnd)?N:$.lineEnd,j=N;j<=B;j++)y.setCursor(j,0),I(y,$.argString.trimStart()),y.state.vim.insertMode&&Qr(y,!0);else I(y,$.argString.trimStart()),y.state.vim.insertMode&&Qr(y,!0)},global:function(y,$){var _=$.argString;if(!_){Kt(y,"Regular Expression missing from global");return}var N=$.commandName[0]==="v";_[0]==="!"&&$.commandName[0]==="g"&&(N=!0,_=_.slice(1));var B=$.line!==void 0?$.line:y.firstLine(),j=$.lineEnd||$.line||y.lastLine(),q=Er(_),Y=_,Q;if(q.length&&(Y=q[0],Q=q.slice(1,q.length).join("/")),Y)try{Cn(y,Y,!0,!0)}catch{Kt(y,"Invalid regex: "+Y);return}for(var re=Rn(y).getQuery(),se=[],ye=B;ye<=j;ye++){var Ce=y.getLine(ye),me=re.test(Ce);me!==N&&se.push(Q?y.getLineHandle(ye):Ce)}if(!Q){Kt(y,se.join(`
1461
+ `));return}var be=0,Oe=function(){if(be<se.length){var Re=se[be++],Ge=y.getLineNumber(Re);if(Ge==null){Oe();return}var ht=Ge+1+Q;kr.processCommand(y,ht,{callback:Oe})}else y.releaseLineHandles&&y.releaseLineHandles()};Oe()},substitute:function(y,$){if(!y.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var _=$.argString,N=_?Hi(_,_[0]):[],B,j="",q,Y,Q,re=!1,se=!1;if(N.length)B=N[0],k("pcre")&&B!==""&&(B=new RegExp(B).source),j=N[1],j!==void 0&&(k("pcre")?j=Qa(j.replace(/([^\\])&/g,"$1$$&")):j=Xa(j),He.lastSubstituteReplacePart=j),q=N[2]?N[2].split(" "):[];else if(_&&_.length){Kt(y,"Substitutions should be of the form :s/pattern/replace/");return}if(q&&(Y=q[0],Q=parseInt(q[1]),Y&&(Y.indexOf("c")!=-1&&(re=!0),Y.indexOf("g")!=-1&&(se=!0),k("pcre")?B=B+"/"+Y:B=B.replace(/\//g,"\\/")+"/"+Y)),B)try{Cn(y,B,!0,!0)}catch{Kt(y,"Invalid regex: "+B);return}if(j=j||He.lastSubstituteReplacePart,j===void 0){Kt(y,"No previous substitute regular expression");return}var ye=Rn(y),Ce=ye.getQuery(),me=$.line!==void 0?$.line:y.getCursor().line,be=$.lineEnd||me;me==y.firstLine()&&be==y.lastLine()&&(be=1/0),Q&&(me=be,be=me+Q-1);var Oe=ue(y,new De(me,0)),Re=y.getSearchCursor(Ce,Oe);zo(y,re,se,me,be,Re,Ce,j,$.callback)},startinsert:function(y,$){I(y,$.argString=="!"?"A":"i",{})},redo:je.commands.redo,undo:je.commands.undo,write:function(y){je.commands.save?je.commands.save(y):y.save&&y.save()},nohlsearch:function(y){jo(y)},yank:function(y){var $=Xe(y.getCursor()),_=$.line,N=y.getLine(_);He.registerController.pushText("0","yank",N,!0,!0)},delete:function(y,$){var _=$.selectionLine,N=isNaN($.selectionLineEnd)?_:$.selectionLineEnd;Qo.delete(y,{linewise:!0},[{anchor:new De(_,0),head:new De(N+1,0)}])},join:function(y,$){var _=$.selectionLine,N=isNaN($.selectionLineEnd)?_:$.selectionLineEnd;y.setCursor(new De(_,0)),zn.joinLines(y,{repeat:N-_},y.state.vim)},delmarks:function(y,$){if(!$.argString||!wr($.argString)){Kt(y,"Argument required");return}for(var _=y.state.vim,N=new je.StringStream(wr($.argString));!N.eol();){N.eatSpace();var B=N.pos;if(!N.match(/[a-zA-Z]/,!1)){Kt(y,"Invalid argument: "+$.argString.substring(B));return}var j=N.next();if(N.match("-",!0)){if(!N.match(/[a-zA-Z]/,!1)){Kt(y,"Invalid argument: "+$.argString.substring(B));return}var q=j,Y=N.next();if(!(c(q)&&c(Y)||u(q)&&u(Y))){Kt(y,"Invalid argument: "+q+"-");return}var Q=q.charCodeAt(0),re=Y.charCodeAt(0);if(Q>=re){Kt(y,"Invalid argument: "+$.argString.substring(B));return}for(var se=0;se<=re-Q;se++){var ye=String.fromCharCode(Q+se);delete _.marks[ye]}}else delete _.marks[j]}}},kr=new Cr;E("insertModeEscKeysTimeout",200,"number"),je.Vim=_t;var Rr={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"},di=_t.handleKey.bind(_t);_t.handleKey=function(y,$,_){return y.operation(function(){return di(y,$,_)},!0)},R(),r.CodeMirror=je;var fi=_t.maybeInitVimState_;r.handler={$id:"ace/keyboard/vim",drawCursor:function(y,$,_,N,B){var j=this.state.vim||{},q=_.characterWidth,Y=_.lineHeight,Q=$.top,re=$.left;if(!j.insertMode){var se=N.cursor?hr.comparePoints(N.cursor,N.start)<=0:B.selection.isBackwards()||B.selection.isEmpty();!se&&re>q&&(re-=q)}!j.insertMode&&j.status&&(Y/=2,Q+=Y),Vi.translate(y,re,Q),Vi.setStyle(y.style,"width",q+"px"),Vi.setStyle(y.style,"height",Y+"px")},$getDirectionForHighlight:function(y){var $=y.state.cm,_=fi($);if(!_.insertMode)return y.session.selection.isBackwards()||y.session.selection.isEmpty()},handleKeyboard:function(y,$,_,N,B){var j=y.editor,q=j.state.cm,Y=fi(q);if(N!=-1){if(Y.insertMode||($==-1?(_.charCodeAt(0)>255&&y.inputKey&&(_=y.inputKey,_&&y.inputHash==4&&(_=_.toUpperCase())),y.inputChar=_):$==4||$==0?y.inputKey==_&&y.inputHash==$&&y.inputChar?(_=y.inputChar,$=-1):(y.inputChar=null,y.inputKey=_,y.inputHash=$):y.inputChar=y.inputKey=null),q.state.overwrite&&Y.insertMode&&_=="backspace"&&$==0)return{command:"gotoleft"};if(_=="c"&&$==1&&!wo.isMac&&j.getCopyText())return j.once("copy",function(){Y.insertMode?j.selection.clearSelection():q.operation(function(){At(q)})}),{command:"null",passEvent:!0};if(_=="esc"&&!Y.insertMode&&!Y.visualMode&&!q.ace.inMultiSelectMode){var Q=Rn(q),re=Q.getOverlay();re&&q.removeOverlay(re)}if($==-1||$&1||$===0&&_.length>1){var se=Y.insertMode,ye=Es($,_,B||{},Y);Y.status==null&&(Y.status="");var Ce=yo(q,ye,"user");return Y=fi(q),Ce&&Y.status!=null?Y.status+=ye:Y.status==null&&(Y.status=""),q._signal("changeStatus"),!Ce&&($!=-1||se)?void 0:{command:"null",passEvent:!Ce}}}},attach:function(y){function $(){var N=fi(_).insertMode;_.ace.renderer.setStyle("normal-mode",!N),y.textInput.setCommandMode(!N),y.renderer.$keepTextAreaAtCursor=N,y.renderer.$blockCursor=!N}y.state||(y.state={});var _=new je(y);y.state.cm=_,y.$vimModeHandler=this,h(_),fi(_).status=null,_.on("vim-command-done",function(){_.virtualSelectionMode()||(fi(_).status=null,_.ace._signal("changeStatus"),_.ace.session.markUndoGroup())}),_.on("changeStatus",function(){_.ace.renderer.updateCursor(),_.ace._signal("changeStatus")}),_.on("vim-mode-change",function(){_.virtualSelectionMode()||($(),_._signal("changeStatus"))}),$(),y.renderer.$cursorLayer.drawCursor=this.drawCursor.bind(_)},detach:function(y){var $=y.state.cm;g($),$.destroy(),y.state.cm=null,y.$vimModeHandler=null,y.renderer.$cursorLayer.drawCursor=null,y.renderer.setStyle("normal-mode",!1),y.textInput.setCommandMode(!1),y.renderer.$keepTextAreaAtCursor=!0},getStatusText:function(y){var $=y.state.cm,_=fi($);if(_.insertMode)return"INSERT";var N="";return _.visualMode&&(N+="VISUAL",_.visualLine&&(N+=" LINE"),_.visualBlock&&(N+=" BLOCK")),_.status&&(N+=(N?" ":"")+_.status),N}},_t.defineOption({name:"wrap",set:function(y,$){$&&$.ace.setOption("wrap",y)},type:"boolean"},!1),_t.defineEx("write","w",function(){console.log(":write is not implemented")}),On.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"}}),On.push({keys:"gq",type:"operator",operator:"hardWrap"}),_t.defineOperator("hardWrap",function(y,$,_,N,B){var j=_[0].anchor.line,q=_[0].head.line;return $.linewise&&q--,so(y.ace,{startRow:j,endRow:q}),De(q,0)}),E("textwidth",void 0,"number",["tw"],function(y,$){if($!==void 0){if(y===void 0){var _=$.ace.getOption("printMarginColumn");return _}var N=Math.round(y);N>1&&$.ace.setOption("printMarginColumn",N)}}),zn.aceCommand=function(y,$,_){y.vimCmd=$,y.ace.inVirtualSelectionMode?y.ace.on("beforeEndOperation",Ci):Ci(null,y.ace)},zn.fold=function(y,$,_){y.ace.execCommand(["toggleFoldWidget","toggleFoldWidget","foldOther","unfoldall"][($.all?2:0)+($.open?1:0)])},Co=On.length,r.handler.defaultKeymap=On,r.handler.actions=zn,r.Vim=_t}),function(){ace.require(["ace/keyboard/vim"],function(n){t&&(t.exports=n)})}()}(fg)),fg.exports}wk();var Nl={exports:{}};/**
1462
1462
  * @license
1463
1463
  * Lodash <https://lodash.com/>
1464
1464
  * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
1465
1465
  * Released under MIT license <https://lodash.com/license>
1466
1466
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
1467
1467
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
1468
- */var xk=Dl.exports,gg;function Ck(){return gg||(gg=1,function(t,e){(function(){var n,r="4.17.21",f=200,d="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",p="Expected a function",b="Invalid `variable` option passed into `_.template`",h="__lodash_hash_undefined__",g=500,s="__lodash_placeholder__",a=1,c=2,l=4,o=1,u=2,m=1,w=2,x=4,E=8,T=16,k=32,C=64,L=128,R=256,F=512,I=30,H="...",P=800,O=16,A=1,S=2,D=3,W=1/0,U=9007199254740991,K=17976931348623157e292,Z=NaN,te=4294967295,he=te-1,ne=te>>>1,ae=[["ary",L],["bind",m],["bindKey",w],["curry",E],["curryRight",T],["flip",F],["partial",k],["partialRight",C],["rearg",R]],ue="[object Arguments]",ce="[object Array]",ge="[object AsyncFunction]",Te="[object Boolean]",$e="[object Date]",Ee="[object DOMException]",Ze="[object Error]",Xe="[object Function]",gt="[object GeneratorFunction]",at="[object Map]",mt="[object Number]",sn="[object Null]",bn="[object Object]",Jt="[object Promise]",wr="[object Proxy]",wn="[object RegExp]",Fn="[object Set]",Pn="[object String]",nr="[object Symbol]",Ct="[object Undefined]",Ke="[object WeakMap]",ke="[object WeakSet]",Ve="[object ArrayBuffer]",Je="[object DataView]",vt="[object Float32Array]",Tt="[object Float64Array]",At="[object Int8Array]",Pt="[object Int16Array]",Nt="[object Int32Array]",pt="[object Uint8Array]",kt="[object Uint8ClampedArray]",$n="[object Uint16Array]",$r="[object Uint32Array]",Yr=/\b__p \+= '';/g,Wi=/\b(__p \+=) '' \+/g,po=/(__e\(.*?\)|\b__t\)) \+\n'';/g,xr=/&(?:amp|lt|gt|quot|#39);/g,go=/[&<>"']/g,Wo=RegExp(xr.source),Ga=RegExp(go.source),si=/<%-([\s\S]+?)%>/g,Ya=/<%([\s\S]+?)%>/g,ks=/<%=([\s\S]+?)%>/g,aa=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ji=/^\w*$/,Yn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Mr=/[\\^$.*+?()[\]{}|]/g,zi=RegExp(Mr.source),Rn=/^\s+/,Er=/\s/,no=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Hi=/\{\n\/\* \[wrapped with (.+)\] \*/,_s=/,? & /,la=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Xa=/[()=,{}\[\]\/\s]/,Qa=/\\(\\)?/g,Ui=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ai=/\w*$/,Kt=/^[-+]0x[0-9a-f]+$/i,ca=/^0b[01]+$/i,Ir=/^\[object .+?Constructor\]$/,Xn=/^0o[0-7]+$/i,xn=/^(?:0|[1-9]\d*)$/,Bn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,bi=/($^)/,Lr=/['\n\r\u2028\u2029\\]/g,wi="\\ud800-\\udfff",jo="\\u0300-\\u036f",Ss="\\ufe20-\\ufe2f",ro="\\u20d0-\\u20ff",Xr=jo+Ss+ro,mo="\\u2700-\\u27bf",zo="a-z\\xdf-\\xf6\\xf8-\\xff",Qr="\\xac\\xb1\\xd7\\xf7",Ho="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",As="\\u2000-\\u206f",Ts=" \\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",Uo="A-Z\\xc0-\\xd6\\xd8-\\xde",ur="\\ufe0e\\ufe0f",$s=Qr+Ho+As+Ts,vo="['’]",Vo="["+wi+"]",qo="["+$s+"]",io="["+Xr+"]",Ms="\\d+",ua="["+mo+"]",Ko="["+zo+"]",Go="[^"+wi+$s+Ms+mo+zo+Uo+"]",Es="\\ud83c[\\udffb-\\udfff]",Yo="(?:"+io+"|"+Es+")",yo="[^"+wi+"]",xi="(?:\\ud83c[\\udde6-\\uddff]){2}",hr="[\\ud800-\\udbff][\\udc00-\\udfff]",oo="["+Uo+"]",Vi="\\u200d",ha="(?:"+Ko+"|"+Go+")",Za="(?:"+oo+"|"+Go+")",bo="(?:"+vo+"(?:d|ll|m|re|s|t|ve))?",qi="(?:"+vo+"(?:D|LL|M|RE|S|T|VE))?",wo=Yo+"?",Xo="["+ur+"]?",xo="(?:"+Vi+"(?:"+[yo,xi,hr].join("|")+")"+Xo+wo+")*",da="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",so="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",je=Xo+wo+xo,fa="(?:"+[ua,xi,hr].join("|")+")"+je,De="(?:"+[yo+io+"?",io,xi,hr,Vo].join("|")+")",On=RegExp(vo,"g"),Co=RegExp(io,"g"),li=RegExp(Es+"(?="+Es+")|"+De+je,"g"),Qn=RegExp([oo+"?"+Ko+"+"+bo+"(?="+[qo,oo,"$"].join("|")+")",Za+"+"+qi+"(?="+[qo,oo+ha,"$"].join("|")+")",oo+"?"+ha+"+"+bo,oo+"+"+qi,so,da,Ms,fa].join("|"),"g"),pa=RegExp("["+Vi+wi+Xr+ur+"]"),ko=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ci=["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"],ao=-1,an={};an[vt]=an[Tt]=an[At]=an[Pt]=an[Nt]=an[pt]=an[kt]=an[$n]=an[$r]=!0,an[ue]=an[ce]=an[Ve]=an[Te]=an[Je]=an[$e]=an[Ze]=an[Xe]=an[at]=an[mt]=an[bn]=an[wn]=an[Fn]=an[Pn]=an[Ke]=!1;var nn={};nn[ue]=nn[ce]=nn[Ve]=nn[Je]=nn[Te]=nn[$e]=nn[vt]=nn[Tt]=nn[At]=nn[Pt]=nn[Nt]=nn[at]=nn[mt]=nn[bn]=nn[wn]=nn[Fn]=nn[Pn]=nn[nr]=nn[pt]=nn[kt]=nn[$n]=nn[$r]=!0,nn[Ze]=nn[Xe]=nn[Ke]=!1;var ln={À:"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"},Gt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ki={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Wn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},He=parseFloat,Cn=parseInt,_t=typeof Fo=="object"&&Fo&&Fo.Object===Object&&Fo,Pr=typeof self=="object"&&self&&self.Object===Object&&self,fn=_t||Pr||Function("return this")(),An=e&&!e.nodeType&&e,rr=An&&!0&&t&&!t.nodeType&&t,Br=rr&&rr.exports===An,_i=Br&&_t.process,jn=function(){try{var fe=rr&&rr.require&&rr.require("util").types;return fe||_i&&_i.binding&&_i.binding("util")}catch{}}(),Zr=jn&&jn.isArrayBuffer,Qo=jn&&jn.isDate,zn=jn&&jn.isMap,ci=jn&&jn.isRegExp,ui=jn&&jn.isSet,Si=jn&&jn.isTypedArray;function pr(fe,_e,xe){switch(xe.length){case 0:return fe.call(_e);case 1:return fe.call(_e,xe[0]);case 2:return fe.call(_e,xe[0],xe[1]);case 3:return fe.call(_e,xe[0],xe[1],xe[2])}return fe.apply(_e,xe)}function gr(fe,_e,xe,qe){for(var ft=-1,Dt=fe==null?0:fe.length;++ft<Dt;){var en=fe[ft];_e(qe,en,xe(en),fe)}return qe}function Cr(fe,_e){for(var xe=-1,qe=fe==null?0:fe.length;++xe<qe&&_e(fe[xe],xe,fe)!==!1;);return fe}function Is(fe,_e){for(var xe=fe==null?0:fe.length;xe--&&_e(fe[xe],xe,fe)!==!1;);return fe}function kr(fe,_e){for(var xe=-1,qe=fe==null?0:fe.length;++xe<qe;)if(!_e(fe[xe],xe,fe))return!1;return!0}function Rr(fe,_e){for(var xe=-1,qe=fe==null?0:fe.length,ft=0,Dt=[];++xe<qe;){var en=fe[xe];_e(en,xe,fe)&&(Dt[ft++]=en)}return Dt}function hi(fe,_e){var xe=fe==null?0:fe.length;return!!xe&&se(fe,_e,0)>-1}function di(fe,_e,xe){for(var qe=-1,ft=fe==null?0:fe.length;++qe<ft;)if(xe(_e,fe[qe]))return!0;return!1}function y(fe,_e){for(var xe=-1,qe=fe==null?0:fe.length,ft=Array(qe);++xe<qe;)ft[xe]=_e(fe[xe],xe,fe);return ft}function $(fe,_e){for(var xe=-1,qe=_e.length,ft=fe.length;++xe<qe;)fe[ft+xe]=_e[xe];return fe}function _(fe,_e,xe,qe){var ft=-1,Dt=fe==null?0:fe.length;for(qe&&Dt&&(xe=fe[++ft]);++ft<Dt;)xe=_e(xe,fe[ft],ft,fe);return xe}function N(fe,_e,xe,qe){var ft=fe==null?0:fe.length;for(qe&&ft&&(xe=fe[--ft]);ft--;)xe=_e(xe,fe[ft],ft,fe);return xe}function B(fe,_e){for(var xe=-1,qe=fe==null?0:fe.length;++xe<qe;)if(_e(fe[xe],xe,fe))return!0;return!1}var j=be("length");function q(fe){return fe.split("")}function Y(fe){return fe.match(la)||[]}function Q(fe,_e,xe){var qe;return xe(fe,function(ft,Dt,en){if(_e(ft,Dt,en))return qe=Dt,!1}),qe}function re(fe,_e,xe,qe){for(var ft=fe.length,Dt=xe+(qe?1:-1);qe?Dt--:++Dt<ft;)if(_e(fe[Dt],Dt,fe))return Dt;return-1}function se(fe,_e,xe){return _e===_e?nt(fe,_e,xe):re(fe,Ce,xe)}function ye(fe,_e,xe,qe){for(var ft=xe-1,Dt=fe.length;++ft<Dt;)if(qe(fe[ft],_e))return ft;return-1}function Ce(fe){return fe!==fe}function me(fe,_e){var xe=fe==null?0:fe.length;return xe?ht(fe,_e)/xe:Z}function be(fe){return function(_e){return _e==null?n:_e[fe]}}function Oe(fe){return function(_e){return fe==null?n:fe[_e]}}function Re(fe,_e,xe,qe,ft){return ft(fe,function(Dt,en,Bt){xe=qe?(qe=!1,Dt):_e(xe,Dt,en,Bt)}),xe}function Ge(fe,_e){var xe=fe.length;for(fe.sort(_e);xe--;)fe[xe]=fe[xe].value;return fe}function ht(fe,_e){for(var xe,qe=-1,ft=fe.length;++qe<ft;){var Dt=_e(fe[qe]);Dt!==n&&(xe=xe===n?Dt:xe+Dt)}return xe}function tt(fe,_e){for(var xe=-1,qe=Array(fe);++xe<fe;)qe[xe]=_e(xe);return qe}function st(fe,_e){return y(_e,function(xe){return[xe,fe[xe]]})}function kn(fe){return fe&&fe.slice(0,jt(fe)+1).replace(Rn,"")}function dt(fe){return function(_e){return fe(_e)}}function Mn(fe,_e){return y(_e,function(xe){return fe[xe]})}function $t(fe,_e){return fe.has(_e)}function Ot(fe,_e){for(var xe=-1,qe=fe.length;++xe<qe&&se(_e,fe[xe],0)>-1;);return xe}function ir(fe,_e){for(var xe=fe.length;xe--&&se(_e,fe[xe],0)>-1;);return xe}function mr(fe,_e){for(var xe=fe.length,qe=0;xe--;)fe[xe]===_e&&++qe;return qe}var En=Oe(ln),V=Oe(Gt);function X(fe){return"\\"+Wn[fe]}function ie(fe,_e){return fe==null?n:fe[_e]}function oe(fe){return pa.test(fe)}function pe(fe){return ko.test(fe)}function we(fe){for(var _e,xe=[];!(_e=fe.next()).done;)xe.push(_e.value);return xe}function Me(fe){var _e=-1,xe=Array(fe.size);return fe.forEach(function(qe,ft){xe[++_e]=[ft,qe]}),xe}function Be(fe,_e){return function(xe){return fe(_e(xe))}}function ze(fe,_e){for(var xe=-1,qe=fe.length,ft=0,Dt=[];++xe<qe;){var en=fe[xe];(en===_e||en===s)&&(fe[xe]=s,Dt[ft++]=xe)}return Dt}function Ye(fe){var _e=-1,xe=Array(fe.size);return fe.forEach(function(qe){xe[++_e]=qe}),xe}function et(fe){var _e=-1,xe=Array(fe.size);return fe.forEach(function(qe){xe[++_e]=[qe,qe]}),xe}function nt(fe,_e,xe){for(var qe=xe-1,ft=fe.length;++qe<ft;)if(fe[qe]===_e)return qe;return-1}function St(fe,_e,xe){for(var qe=xe+1;qe--;)if(fe[qe]===_e)return qe;return qe}function Ut(fe){return oe(fe)?ut(fe):j(fe)}function Mt(fe){return oe(fe)?vn(fe):q(fe)}function jt(fe){for(var _e=fe.length;_e--&&Er.test(fe.charAt(_e)););return _e}var yt=Oe(ki);function ut(fe){for(var _e=li.lastIndex=0;li.test(fe);)++_e;return _e}function vn(fe){return fe.match(li)||[]}function In(fe){return fe.match(Qn)||[]}var or=function fe(_e){_e=_e==null?fn:Qt.defaults(fn.Object(),_e,Qt.pick(fn,Ci));var xe=_e.Array,qe=_e.Date,ft=_e.Error,Dt=_e.Function,en=_e.Math,Bt=_e.Object,Wr=_e.RegExp,Ai=_e.String,pn=_e.TypeError,vr=xe.prototype,_o=Dt.prototype,Hn=Bt.prototype,Ls=_e["__core-js_shared__"],xc=_o.toString,dn=Hn.hasOwnProperty,HE=0,c0=function(){var i=/[^.]+$/.exec(Ls&&Ls.keys&&Ls.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}(),Cc=Hn.toString,UE=xc.call(Bt),VE=fn._,qE=Wr("^"+xc.call(dn).replace(Mr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),kc=Br?_e.Buffer:n,Zo=_e.Symbol,_c=_e.Uint8Array,u0=kc?kc.allocUnsafe:n,Sc=Be(Bt.getPrototypeOf,Bt),h0=Bt.create,d0=Hn.propertyIsEnumerable,Ac=vr.splice,f0=Zo?Zo.isConcatSpreadable:n,Ja=Zo?Zo.iterator:n,Rs=Zo?Zo.toStringTag:n,Tc=function(){try{var i=Ps(Bt,"defineProperty");return i({},"",{}),i}catch{}}(),KE=_e.clearTimeout!==fn.clearTimeout&&_e.clearTimeout,GE=qe&&qe.now!==fn.Date.now&&qe.now,YE=_e.setTimeout!==fn.setTimeout&&_e.setTimeout,$c=en.ceil,Mc=en.floor,bd=Bt.getOwnPropertySymbols,XE=kc?kc.isBuffer:n,p0=_e.isFinite,QE=vr.join,ZE=Be(Bt.keys,Bt),dr=en.max,Or=en.min,JE=qe.now,eI=_e.parseInt,g0=en.random,tI=vr.reverse,wd=Ps(_e,"DataView"),el=Ps(_e,"Map"),xd=Ps(_e,"Promise"),ga=Ps(_e,"Set"),tl=Ps(_e,"WeakMap"),nl=Ps(Bt,"create"),Ec=tl&&new tl,ma={},nI=Bs(wd),rI=Bs(el),iI=Bs(xd),oI=Bs(ga),sI=Bs(tl),Ic=Zo?Zo.prototype:n,rl=Ic?Ic.valueOf:n,m0=Ic?Ic.toString:n;function J(i){if(Un(i)&&!It(i)&&!(i instanceof Yt)){if(i instanceof Ti)return i;if(dn.call(i,"__wrapped__"))return vb(i)}return new Ti(i)}var va=function(){function i(){}return function(v){if(!Dn(v))return{};if(h0)return h0(v);i.prototype=v;var M=new i;return i.prototype=n,M}}();function Lc(){}function Ti(i,v){this.__wrapped__=i,this.__actions__=[],this.__chain__=!!v,this.__index__=0,this.__values__=n}J.templateSettings={escape:si,evaluate:Ya,interpolate:ks,variable:"",imports:{_:J}},J.prototype=Lc.prototype,J.prototype.constructor=J,Ti.prototype=va(Lc.prototype),Ti.prototype.constructor=Ti;function Yt(i){this.__wrapped__=i,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=te,this.__views__=[]}function aI(){var i=new Yt(this.__wrapped__);return i.__actions__=Jr(this.__actions__),i.__dir__=this.__dir__,i.__filtered__=this.__filtered__,i.__iteratees__=Jr(this.__iteratees__),i.__takeCount__=this.__takeCount__,i.__views__=Jr(this.__views__),i}function lI(){if(this.__filtered__){var i=new Yt(this);i.__dir__=-1,i.__filtered__=!0}else i=this.clone(),i.__dir__*=-1;return i}function cI(){var i=this.__wrapped__.value(),v=this.__dir__,M=It(i),z=v<0,G=M?i.length:0,ee=xL(0,G,this.__views__),le=ee.start,de=ee.end,ve=de-le,Ie=z?de:le-1,Le=this.__iteratees__,Ne=Le.length,Qe=0,ct=Or(ve,this.__takeCount__);if(!M||!z&&G==ve&&ct==ve)return W0(i,this.__actions__);var wt=[];e:for(;ve--&&Qe<ct;){Ie+=v;for(var Wt=-1,xt=i[Ie];++Wt<Ne;){var Vt=Le[Wt],Zt=Vt.iteratee,gi=Vt.type,Hr=Zt(xt);if(gi==S)xt=Hr;else if(!Hr){if(gi==A)continue e;break e}}wt[Qe++]=xt}return wt}Yt.prototype=va(Lc.prototype),Yt.prototype.constructor=Yt;function Os(i){var v=-1,M=i==null?0:i.length;for(this.clear();++v<M;){var z=i[v];this.set(z[0],z[1])}}function uI(){this.__data__=nl?nl(null):{},this.size=0}function hI(i){var v=this.has(i)&&delete this.__data__[i];return this.size-=v?1:0,v}function dI(i){var v=this.__data__;if(nl){var M=v[i];return M===h?n:M}return dn.call(v,i)?v[i]:n}function fI(i){var v=this.__data__;return nl?v[i]!==n:dn.call(v,i)}function pI(i,v){var M=this.__data__;return this.size+=this.has(i)?0:1,M[i]=nl&&v===n?h:v,this}Os.prototype.clear=uI,Os.prototype.delete=hI,Os.prototype.get=dI,Os.prototype.has=fI,Os.prototype.set=pI;function So(i){var v=-1,M=i==null?0:i.length;for(this.clear();++v<M;){var z=i[v];this.set(z[0],z[1])}}function gI(){this.__data__=[],this.size=0}function mI(i){var v=this.__data__,M=Rc(v,i);if(M<0)return!1;var z=v.length-1;return M==z?v.pop():Ac.call(v,M,1),--this.size,!0}function vI(i){var v=this.__data__,M=Rc(v,i);return M<0?n:v[M][1]}function yI(i){return Rc(this.__data__,i)>-1}function bI(i,v){var M=this.__data__,z=Rc(M,i);return z<0?(++this.size,M.push([i,v])):M[z][1]=v,this}So.prototype.clear=gI,So.prototype.delete=mI,So.prototype.get=vI,So.prototype.has=yI,So.prototype.set=bI;function Ao(i){var v=-1,M=i==null?0:i.length;for(this.clear();++v<M;){var z=i[v];this.set(z[0],z[1])}}function wI(){this.size=0,this.__data__={hash:new Os,map:new(el||So),string:new Os}}function xI(i){var v=Vc(this,i).delete(i);return this.size-=v?1:0,v}function CI(i){return Vc(this,i).get(i)}function kI(i){return Vc(this,i).has(i)}function _I(i,v){var M=Vc(this,i),z=M.size;return M.set(i,v),this.size+=M.size==z?0:1,this}Ao.prototype.clear=wI,Ao.prototype.delete=xI,Ao.prototype.get=CI,Ao.prototype.has=kI,Ao.prototype.set=_I;function Ds(i){var v=-1,M=i==null?0:i.length;for(this.__data__=new Ao;++v<M;)this.add(i[v])}function SI(i){return this.__data__.set(i,h),this}function AI(i){return this.__data__.has(i)}Ds.prototype.add=Ds.prototype.push=SI,Ds.prototype.has=AI;function Ki(i){var v=this.__data__=new So(i);this.size=v.size}function TI(){this.__data__=new So,this.size=0}function $I(i){var v=this.__data__,M=v.delete(i);return this.size=v.size,M}function MI(i){return this.__data__.get(i)}function EI(i){return this.__data__.has(i)}function II(i,v){var M=this.__data__;if(M instanceof So){var z=M.__data__;if(!el||z.length<f-1)return z.push([i,v]),this.size=++M.size,this;M=this.__data__=new Ao(z)}return M.set(i,v),this.size=M.size,this}Ki.prototype.clear=TI,Ki.prototype.delete=$I,Ki.prototype.get=MI,Ki.prototype.has=EI,Ki.prototype.set=II;function v0(i,v){var M=It(i),z=!M&&Ws(i),G=!M&&!z&&rs(i),ee=!M&&!z&&!G&&xa(i),le=M||z||G||ee,de=le?tt(i.length,Ai):[],ve=de.length;for(var Ie in i)(v||dn.call(i,Ie))&&!(le&&(Ie=="length"||G&&(Ie=="offset"||Ie=="parent")||ee&&(Ie=="buffer"||Ie=="byteLength"||Ie=="byteOffset")||Eo(Ie,ve)))&&de.push(Ie);return de}function y0(i){var v=i.length;return v?i[Ld(0,v-1)]:n}function LI(i,v){return qc(Jr(i),Ns(v,0,i.length))}function RI(i){return qc(Jr(i))}function Cd(i,v,M){(M!==n&&!Gi(i[v],M)||M===n&&!(v in i))&&To(i,v,M)}function il(i,v,M){var z=i[v];(!(dn.call(i,v)&&Gi(z,M))||M===n&&!(v in i))&&To(i,v,M)}function Rc(i,v){for(var M=i.length;M--;)if(Gi(i[M][0],v))return M;return-1}function OI(i,v,M,z){return Jo(i,function(G,ee,le){v(z,G,M(G),le)}),z}function b0(i,v){return i&&co(v,yr(v),i)}function DI(i,v){return i&&co(v,ti(v),i)}function To(i,v,M){v=="__proto__"&&Tc?Tc(i,v,{configurable:!0,enumerable:!0,value:M,writable:!0}):i[v]=M}function kd(i,v){for(var M=-1,z=v.length,G=xe(z),ee=i==null;++M<z;)G[M]=ee?n:rf(i,v[M]);return G}function Ns(i,v,M){return i===i&&(M!==n&&(i=i<=M?i:M),v!==n&&(i=i>=v?i:v)),i}function $i(i,v,M,z,G,ee){var le,de=v&a,ve=v&c,Ie=v&l;if(M&&(le=G?M(i,z,G,ee):M(i)),le!==n)return le;if(!Dn(i))return i;var Le=It(i);if(Le){if(le=kL(i),!de)return Jr(i,le)}else{var Ne=Dr(i),Qe=Ne==Xe||Ne==gt;if(rs(i))return H0(i,de);if(Ne==bn||Ne==ue||Qe&&!G){if(le=ve||Qe?{}:lb(i),!de)return ve?dL(i,DI(le,i)):hL(i,b0(le,i))}else{if(!nn[Ne])return G?i:{};le=_L(i,Ne,de)}}ee||(ee=new Ki);var ct=ee.get(i);if(ct)return ct;ee.set(i,le),Fb(i)?i.forEach(function(xt){le.add($i(xt,v,M,xt,i,ee))}):Db(i)&&i.forEach(function(xt,Vt){le.set(Vt,$i(xt,v,M,Vt,i,ee))});var wt=Ie?ve?Hd:zd:ve?ti:yr,Wt=Le?n:wt(i);return Cr(Wt||i,function(xt,Vt){Wt&&(Vt=xt,xt=i[Vt]),il(le,Vt,$i(xt,v,M,Vt,i,ee))}),le}function NI(i){var v=yr(i);return function(M){return w0(M,i,v)}}function w0(i,v,M){var z=M.length;if(i==null)return!z;for(i=Bt(i);z--;){var G=M[z],ee=v[G],le=i[G];if(le===n&&!(G in i)||!ee(le))return!1}return!0}function x0(i,v,M){if(typeof i!="function")throw new pn(p);return hl(function(){i.apply(n,M)},v)}function ol(i,v,M,z){var G=-1,ee=hi,le=!0,de=i.length,ve=[],Ie=v.length;if(!de)return ve;M&&(v=y(v,dt(M))),z?(ee=di,le=!1):v.length>=f&&(ee=$t,le=!1,v=new Ds(v));e:for(;++G<de;){var Le=i[G],Ne=M==null?Le:M(Le);if(Le=z||Le!==0?Le:0,le&&Ne===Ne){for(var Qe=Ie;Qe--;)if(v[Qe]===Ne)continue e;ve.push(Le)}else ee(v,Ne,z)||ve.push(Le)}return ve}var Jo=G0(lo),C0=G0(Sd,!0);function FI(i,v){var M=!0;return Jo(i,function(z,G,ee){return M=!!v(z,G,ee),M}),M}function Oc(i,v,M){for(var z=-1,G=i.length;++z<G;){var ee=i[z],le=v(ee);if(le!=null&&(de===n?le===le&&!pi(le):M(le,de)))var de=le,ve=ee}return ve}function PI(i,v,M,z){var G=i.length;for(M=Ft(M),M<0&&(M=-M>G?0:G+M),z=z===n||z>G?G:Ft(z),z<0&&(z+=G),z=M>z?0:Bb(z);M<z;)i[M++]=v;return i}function k0(i,v){var M=[];return Jo(i,function(z,G,ee){v(z,G,ee)&&M.push(z)}),M}function _r(i,v,M,z,G){var ee=-1,le=i.length;for(M||(M=AL),G||(G=[]);++ee<le;){var de=i[ee];v>0&&M(de)?v>1?_r(de,v-1,M,z,G):$(G,de):z||(G[G.length]=de)}return G}var _d=Y0(),_0=Y0(!0);function lo(i,v){return i&&_d(i,v,yr)}function Sd(i,v){return i&&_0(i,v,yr)}function Dc(i,v){return Rr(v,function(M){return Io(i[M])})}function Fs(i,v){v=ts(v,i);for(var M=0,z=v.length;i!=null&&M<z;)i=i[uo(v[M++])];return M&&M==z?i:n}function S0(i,v,M){var z=v(i);return It(i)?z:$(z,M(i))}function jr(i){return i==null?i===n?Ct:sn:Rs&&Rs in Bt(i)?wL(i):RL(i)}function Ad(i,v){return i>v}function BI(i,v){return i!=null&&dn.call(i,v)}function WI(i,v){return i!=null&&v in Bt(i)}function jI(i,v,M){return i>=Or(v,M)&&i<dr(v,M)}function Td(i,v,M){for(var z=M?di:hi,G=i[0].length,ee=i.length,le=ee,de=xe(ee),ve=1/0,Ie=[];le--;){var Le=i[le];le&&v&&(Le=y(Le,dt(v))),ve=Or(Le.length,ve),de[le]=!M&&(v||G>=120&&Le.length>=120)?new Ds(le&&Le):n}Le=i[0];var Ne=-1,Qe=de[0];e:for(;++Ne<G&&Ie.length<ve;){var ct=Le[Ne],wt=v?v(ct):ct;if(ct=M||ct!==0?ct:0,!(Qe?$t(Qe,wt):z(Ie,wt,M))){for(le=ee;--le;){var Wt=de[le];if(!(Wt?$t(Wt,wt):z(i[le],wt,M)))continue e}Qe&&Qe.push(wt),Ie.push(ct)}}return Ie}function zI(i,v,M,z){return lo(i,function(G,ee,le){v(z,M(G),ee,le)}),z}function sl(i,v,M){v=ts(v,i),i=db(i,v);var z=i==null?i:i[uo(Ei(v))];return z==null?n:pr(z,i,M)}function A0(i){return Un(i)&&jr(i)==ue}function HI(i){return Un(i)&&jr(i)==Ve}function UI(i){return Un(i)&&jr(i)==$e}function al(i,v,M,z,G){return i===v?!0:i==null||v==null||!Un(i)&&!Un(v)?i!==i&&v!==v:VI(i,v,M,z,al,G)}function VI(i,v,M,z,G,ee){var le=It(i),de=It(v),ve=le?ce:Dr(i),Ie=de?ce:Dr(v);ve=ve==ue?bn:ve,Ie=Ie==ue?bn:Ie;var Le=ve==bn,Ne=Ie==bn,Qe=ve==Ie;if(Qe&&rs(i)){if(!rs(v))return!1;le=!0,Le=!1}if(Qe&&!Le)return ee||(ee=new Ki),le||xa(i)?ob(i,v,M,z,G,ee):yL(i,v,ve,M,z,G,ee);if(!(M&o)){var ct=Le&&dn.call(i,"__wrapped__"),wt=Ne&&dn.call(v,"__wrapped__");if(ct||wt){var Wt=ct?i.value():i,xt=wt?v.value():v;return ee||(ee=new Ki),G(Wt,xt,M,z,ee)}}return Qe?(ee||(ee=new Ki),bL(i,v,M,z,G,ee)):!1}function qI(i){return Un(i)&&Dr(i)==at}function $d(i,v,M,z){var G=M.length,ee=G,le=!z;if(i==null)return!ee;for(i=Bt(i);G--;){var de=M[G];if(le&&de[2]?de[1]!==i[de[0]]:!(de[0]in i))return!1}for(;++G<ee;){de=M[G];var ve=de[0],Ie=i[ve],Le=de[1];if(le&&de[2]){if(Ie===n&&!(ve in i))return!1}else{var Ne=new Ki;if(z)var Qe=z(Ie,Le,ve,i,v,Ne);if(!(Qe===n?al(Le,Ie,o|u,z,Ne):Qe))return!1}}return!0}function T0(i){if(!Dn(i)||$L(i))return!1;var v=Io(i)?qE:Ir;return v.test(Bs(i))}function KI(i){return Un(i)&&jr(i)==wn}function GI(i){return Un(i)&&Dr(i)==Fn}function YI(i){return Un(i)&&Zc(i.length)&&!!an[jr(i)]}function $0(i){return typeof i=="function"?i:i==null?ni:typeof i=="object"?It(i)?I0(i[0],i[1]):E0(i):Xb(i)}function Md(i){if(!ul(i))return ZE(i);var v=[];for(var M in Bt(i))dn.call(i,M)&&M!="constructor"&&v.push(M);return v}function XI(i){if(!Dn(i))return LL(i);var v=ul(i),M=[];for(var z in i)z=="constructor"&&(v||!dn.call(i,z))||M.push(z);return M}function Ed(i,v){return i<v}function M0(i,v){var M=-1,z=ei(i)?xe(i.length):[];return Jo(i,function(G,ee,le){z[++M]=v(G,ee,le)}),z}function E0(i){var v=Vd(i);return v.length==1&&v[0][2]?ub(v[0][0],v[0][1]):function(M){return M===i||$d(M,i,v)}}function I0(i,v){return Kd(i)&&cb(v)?ub(uo(i),v):function(M){var z=rf(M,i);return z===n&&z===v?of(M,i):al(v,z,o|u)}}function Nc(i,v,M,z,G){i!==v&&_d(v,function(ee,le){if(G||(G=new Ki),Dn(ee))QI(i,v,le,M,Nc,z,G);else{var de=z?z(Yd(i,le),ee,le+"",i,v,G):n;de===n&&(de=ee),Cd(i,le,de)}},ti)}function QI(i,v,M,z,G,ee,le){var de=Yd(i,M),ve=Yd(v,M),Ie=le.get(ve);if(Ie){Cd(i,M,Ie);return}var Le=ee?ee(de,ve,M+"",i,v,le):n,Ne=Le===n;if(Ne){var Qe=It(ve),ct=!Qe&&rs(ve),wt=!Qe&&!ct&&xa(ve);Le=ve,Qe||ct||wt?It(de)?Le=de:Zn(de)?Le=Jr(de):ct?(Ne=!1,Le=H0(ve,!0)):wt?(Ne=!1,Le=U0(ve,!0)):Le=[]:dl(ve)||Ws(ve)?(Le=de,Ws(de)?Le=Wb(de):(!Dn(de)||Io(de))&&(Le=lb(ve))):Ne=!1}Ne&&(le.set(ve,Le),G(Le,ve,z,ee,le),le.delete(ve)),Cd(i,M,Le)}function L0(i,v){var M=i.length;if(M)return v+=v<0?M:0,Eo(v,M)?i[v]:n}function R0(i,v,M){v.length?v=y(v,function(ee){return It(ee)?function(le){return Fs(le,ee.length===1?ee[0]:ee)}:ee}):v=[ni];var z=-1;v=y(v,dt(bt()));var G=M0(i,function(ee,le,de){var ve=y(v,function(Ie){return Ie(ee)});return{criteria:ve,index:++z,value:ee}});return Ge(G,function(ee,le){return uL(ee,le,M)})}function ZI(i,v){return O0(i,v,function(M,z){return of(i,z)})}function O0(i,v,M){for(var z=-1,G=v.length,ee={};++z<G;){var le=v[z],de=Fs(i,le);M(de,le)&&ll(ee,ts(le,i),de)}return ee}function JI(i){return function(v){return Fs(v,i)}}function Id(i,v,M,z){var G=z?ye:se,ee=-1,le=v.length,de=i;for(i===v&&(v=Jr(v)),M&&(de=y(i,dt(M)));++ee<le;)for(var ve=0,Ie=v[ee],Le=M?M(Ie):Ie;(ve=G(de,Le,ve,z))>-1;)de!==i&&Ac.call(de,ve,1),Ac.call(i,ve,1);return i}function D0(i,v){for(var M=i?v.length:0,z=M-1;M--;){var G=v[M];if(M==z||G!==ee){var ee=G;Eo(G)?Ac.call(i,G,1):Dd(i,G)}}return i}function Ld(i,v){return i+Mc(g0()*(v-i+1))}function eL(i,v,M,z){for(var G=-1,ee=dr($c((v-i)/(M||1)),0),le=xe(ee);ee--;)le[z?ee:++G]=i,i+=M;return le}function Rd(i,v){var M="";if(!i||v<1||v>U)return M;do v%2&&(M+=i),v=Mc(v/2),v&&(i+=i);while(v);return M}function zt(i,v){return Xd(hb(i,v,ni),i+"")}function tL(i){return y0(Ca(i))}function nL(i,v){var M=Ca(i);return qc(M,Ns(v,0,M.length))}function ll(i,v,M,z){if(!Dn(i))return i;v=ts(v,i);for(var G=-1,ee=v.length,le=ee-1,de=i;de!=null&&++G<ee;){var ve=uo(v[G]),Ie=M;if(ve==="__proto__"||ve==="constructor"||ve==="prototype")return i;if(G!=le){var Le=de[ve];Ie=z?z(Le,ve,de):n,Ie===n&&(Ie=Dn(Le)?Le:Eo(v[G+1])?[]:{})}il(de,ve,Ie),de=de[ve]}return i}var N0=Ec?function(i,v){return Ec.set(i,v),i}:ni,rL=Tc?function(i,v){return Tc(i,"toString",{configurable:!0,enumerable:!1,value:af(v),writable:!0})}:ni;function iL(i){return qc(Ca(i))}function Mi(i,v,M){var z=-1,G=i.length;v<0&&(v=-v>G?0:G+v),M=M>G?G:M,M<0&&(M+=G),G=v>M?0:M-v>>>0,v>>>=0;for(var ee=xe(G);++z<G;)ee[z]=i[z+v];return ee}function oL(i,v){var M;return Jo(i,function(z,G,ee){return M=v(z,G,ee),!M}),!!M}function Fc(i,v,M){var z=0,G=i==null?z:i.length;if(typeof v=="number"&&v===v&&G<=ne){for(;z<G;){var ee=z+G>>>1,le=i[ee];le!==null&&!pi(le)&&(M?le<=v:le<v)?z=ee+1:G=ee}return G}return Od(i,v,ni,M)}function Od(i,v,M,z){var G=0,ee=i==null?0:i.length;if(ee===0)return 0;v=M(v);for(var le=v!==v,de=v===null,ve=pi(v),Ie=v===n;G<ee;){var Le=Mc((G+ee)/2),Ne=M(i[Le]),Qe=Ne!==n,ct=Ne===null,wt=Ne===Ne,Wt=pi(Ne);if(le)var xt=z||wt;else Ie?xt=wt&&(z||Qe):de?xt=wt&&Qe&&(z||!ct):ve?xt=wt&&Qe&&!ct&&(z||!Wt):ct||Wt?xt=!1:xt=z?Ne<=v:Ne<v;xt?G=Le+1:ee=Le}return Or(ee,he)}function F0(i,v){for(var M=-1,z=i.length,G=0,ee=[];++M<z;){var le=i[M],de=v?v(le):le;if(!M||!Gi(de,ve)){var ve=de;ee[G++]=le===0?0:le}}return ee}function P0(i){return typeof i=="number"?i:pi(i)?Z:+i}function fi(i){if(typeof i=="string")return i;if(It(i))return y(i,fi)+"";if(pi(i))return m0?m0.call(i):"";var v=i+"";return v=="0"&&1/i==-1/0?"-0":v}function es(i,v,M){var z=-1,G=hi,ee=i.length,le=!0,de=[],ve=de;if(M)le=!1,G=di;else if(ee>=f){var Ie=v?null:mL(i);if(Ie)return Ye(Ie);le=!1,G=$t,ve=new Ds}else ve=v?[]:de;e:for(;++z<ee;){var Le=i[z],Ne=v?v(Le):Le;if(Le=M||Le!==0?Le:0,le&&Ne===Ne){for(var Qe=ve.length;Qe--;)if(ve[Qe]===Ne)continue e;v&&ve.push(Ne),de.push(Le)}else G(ve,Ne,M)||(ve!==de&&ve.push(Ne),de.push(Le))}return de}function Dd(i,v){return v=ts(v,i),i=db(i,v),i==null||delete i[uo(Ei(v))]}function B0(i,v,M,z){return ll(i,v,M(Fs(i,v)),z)}function Pc(i,v,M,z){for(var G=i.length,ee=z?G:-1;(z?ee--:++ee<G)&&v(i[ee],ee,i););return M?Mi(i,z?0:ee,z?ee+1:G):Mi(i,z?ee+1:0,z?G:ee)}function W0(i,v){var M=i;return M instanceof Yt&&(M=M.value()),_(v,function(z,G){return G.func.apply(G.thisArg,$([z],G.args))},M)}function Nd(i,v,M){var z=i.length;if(z<2)return z?es(i[0]):[];for(var G=-1,ee=xe(z);++G<z;)for(var le=i[G],de=-1;++de<z;)de!=G&&(ee[G]=ol(ee[G]||le,i[de],v,M));return es(_r(ee,1),v,M)}function j0(i,v,M){for(var z=-1,G=i.length,ee=v.length,le={};++z<G;){var de=z<ee?v[z]:n;M(le,i[z],de)}return le}function Fd(i){return Zn(i)?i:[]}function Pd(i){return typeof i=="function"?i:ni}function ts(i,v){return It(i)?i:Kd(i,v)?[i]:mb(un(i))}var sL=zt;function ns(i,v,M){var z=i.length;return M=M===n?z:M,!v&&M>=z?i:Mi(i,v,M)}var z0=KE||function(i){return fn.clearTimeout(i)};function H0(i,v){if(v)return i.slice();var M=i.length,z=u0?u0(M):new i.constructor(M);return i.copy(z),z}function Bd(i){var v=new i.constructor(i.byteLength);return new _c(v).set(new _c(i)),v}function aL(i,v){var M=v?Bd(i.buffer):i.buffer;return new i.constructor(M,i.byteOffset,i.byteLength)}function lL(i){var v=new i.constructor(i.source,ai.exec(i));return v.lastIndex=i.lastIndex,v}function cL(i){return rl?Bt(rl.call(i)):{}}function U0(i,v){var M=v?Bd(i.buffer):i.buffer;return new i.constructor(M,i.byteOffset,i.length)}function V0(i,v){if(i!==v){var M=i!==n,z=i===null,G=i===i,ee=pi(i),le=v!==n,de=v===null,ve=v===v,Ie=pi(v);if(!de&&!Ie&&!ee&&i>v||ee&&le&&ve&&!de&&!Ie||z&&le&&ve||!M&&ve||!G)return 1;if(!z&&!ee&&!Ie&&i<v||Ie&&M&&G&&!z&&!ee||de&&M&&G||!le&&G||!ve)return-1}return 0}function uL(i,v,M){for(var z=-1,G=i.criteria,ee=v.criteria,le=G.length,de=M.length;++z<le;){var ve=V0(G[z],ee[z]);if(ve){if(z>=de)return ve;var Ie=M[z];return ve*(Ie=="desc"?-1:1)}}return i.index-v.index}function q0(i,v,M,z){for(var G=-1,ee=i.length,le=M.length,de=-1,ve=v.length,Ie=dr(ee-le,0),Le=xe(ve+Ie),Ne=!z;++de<ve;)Le[de]=v[de];for(;++G<le;)(Ne||G<ee)&&(Le[M[G]]=i[G]);for(;Ie--;)Le[de++]=i[G++];return Le}function K0(i,v,M,z){for(var G=-1,ee=i.length,le=-1,de=M.length,ve=-1,Ie=v.length,Le=dr(ee-de,0),Ne=xe(Le+Ie),Qe=!z;++G<Le;)Ne[G]=i[G];for(var ct=G;++ve<Ie;)Ne[ct+ve]=v[ve];for(;++le<de;)(Qe||G<ee)&&(Ne[ct+M[le]]=i[G++]);return Ne}function Jr(i,v){var M=-1,z=i.length;for(v||(v=xe(z));++M<z;)v[M]=i[M];return v}function co(i,v,M,z){var G=!M;M||(M={});for(var ee=-1,le=v.length;++ee<le;){var de=v[ee],ve=z?z(M[de],i[de],de,M,i):n;ve===n&&(ve=i[de]),G?To(M,de,ve):il(M,de,ve)}return M}function hL(i,v){return co(i,qd(i),v)}function dL(i,v){return co(i,sb(i),v)}function Bc(i,v){return function(M,z){var G=It(M)?gr:OI,ee=v?v():{};return G(M,i,bt(z,2),ee)}}function ya(i){return zt(function(v,M){var z=-1,G=M.length,ee=G>1?M[G-1]:n,le=G>2?M[2]:n;for(ee=i.length>3&&typeof ee=="function"?(G--,ee):n,le&&zr(M[0],M[1],le)&&(ee=G<3?n:ee,G=1),v=Bt(v);++z<G;){var de=M[z];de&&i(v,de,z,ee)}return v})}function G0(i,v){return function(M,z){if(M==null)return M;if(!ei(M))return i(M,z);for(var G=M.length,ee=v?G:-1,le=Bt(M);(v?ee--:++ee<G)&&z(le[ee],ee,le)!==!1;);return M}}function Y0(i){return function(v,M,z){for(var G=-1,ee=Bt(v),le=z(v),de=le.length;de--;){var ve=le[i?de:++G];if(M(ee[ve],ve,ee)===!1)break}return v}}function fL(i,v,M){var z=v&m,G=cl(i);function ee(){var le=this&&this!==fn&&this instanceof ee?G:i;return le.apply(z?M:this,arguments)}return ee}function X0(i){return function(v){v=un(v);var M=oe(v)?Mt(v):n,z=M?M[0]:v.charAt(0),G=M?ns(M,1).join(""):v.slice(1);return z[i]()+G}}function ba(i){return function(v){return _(Gb(Kb(v).replace(On,"")),i,"")}}function cl(i){return function(){var v=arguments;switch(v.length){case 0:return new i;case 1:return new i(v[0]);case 2:return new i(v[0],v[1]);case 3:return new i(v[0],v[1],v[2]);case 4:return new i(v[0],v[1],v[2],v[3]);case 5:return new i(v[0],v[1],v[2],v[3],v[4]);case 6:return new i(v[0],v[1],v[2],v[3],v[4],v[5]);case 7:return new i(v[0],v[1],v[2],v[3],v[4],v[5],v[6])}var M=va(i.prototype),z=i.apply(M,v);return Dn(z)?z:M}}function pL(i,v,M){var z=cl(i);function G(){for(var ee=arguments.length,le=xe(ee),de=ee,ve=wa(G);de--;)le[de]=arguments[de];var Ie=ee<3&&le[0]!==ve&&le[ee-1]!==ve?[]:ze(le,ve);if(ee-=Ie.length,ee<M)return tb(i,v,Wc,G.placeholder,n,le,Ie,n,n,M-ee);var Le=this&&this!==fn&&this instanceof G?z:i;return pr(Le,this,le)}return G}function Q0(i){return function(v,M,z){var G=Bt(v);if(!ei(v)){var ee=bt(M,3);v=yr(v),M=function(de){return ee(G[de],de,G)}}var le=i(v,M,z);return le>-1?G[ee?v[le]:le]:n}}function Z0(i){return Mo(function(v){var M=v.length,z=M,G=Ti.prototype.thru;for(i&&v.reverse();z--;){var ee=v[z];if(typeof ee!="function")throw new pn(p);if(G&&!le&&Uc(ee)=="wrapper")var le=new Ti([],!0)}for(z=le?z:M;++z<M;){ee=v[z];var de=Uc(ee),ve=de=="wrapper"?Ud(ee):n;ve&&Gd(ve[0])&&ve[1]==(L|E|k|R)&&!ve[4].length&&ve[9]==1?le=le[Uc(ve[0])].apply(le,ve[3]):le=ee.length==1&&Gd(ee)?le[de]():le.thru(ee)}return function(){var Ie=arguments,Le=Ie[0];if(le&&Ie.length==1&&It(Le))return le.plant(Le).value();for(var Ne=0,Qe=M?v[Ne].apply(this,Ie):Le;++Ne<M;)Qe=v[Ne].call(this,Qe);return Qe}})}function Wc(i,v,M,z,G,ee,le,de,ve,Ie){var Le=v&L,Ne=v&m,Qe=v&w,ct=v&(E|T),wt=v&F,Wt=Qe?n:cl(i);function xt(){for(var Vt=arguments.length,Zt=xe(Vt),gi=Vt;gi--;)Zt[gi]=arguments[gi];if(ct)var Hr=wa(xt),mi=mr(Zt,Hr);if(z&&(Zt=q0(Zt,z,G,ct)),ee&&(Zt=K0(Zt,ee,le,ct)),Vt-=mi,ct&&Vt<Ie){var Jn=ze(Zt,Hr);return tb(i,v,Wc,xt.placeholder,M,Zt,Jn,de,ve,Ie-Vt)}var Yi=Ne?M:this,Ro=Qe?Yi[i]:i;return Vt=Zt.length,de?Zt=OL(Zt,de):wt&&Vt>1&&Zt.reverse(),Le&&ve<Vt&&(Zt.length=ve),this&&this!==fn&&this instanceof xt&&(Ro=Wt||cl(Ro)),Ro.apply(Yi,Zt)}return xt}function J0(i,v){return function(M,z){return zI(M,i,v(z),{})}}function jc(i,v){return function(M,z){var G;if(M===n&&z===n)return v;if(M!==n&&(G=M),z!==n){if(G===n)return z;typeof M=="string"||typeof z=="string"?(M=fi(M),z=fi(z)):(M=P0(M),z=P0(z)),G=i(M,z)}return G}}function Wd(i){return Mo(function(v){return v=y(v,dt(bt())),zt(function(M){var z=this;return i(v,function(G){return pr(G,z,M)})})})}function zc(i,v){v=v===n?" ":fi(v);var M=v.length;if(M<2)return M?Rd(v,i):v;var z=Rd(v,$c(i/Ut(v)));return oe(v)?ns(Mt(z),0,i).join(""):z.slice(0,i)}function gL(i,v,M,z){var G=v&m,ee=cl(i);function le(){for(var de=-1,ve=arguments.length,Ie=-1,Le=z.length,Ne=xe(Le+ve),Qe=this&&this!==fn&&this instanceof le?ee:i;++Ie<Le;)Ne[Ie]=z[Ie];for(;ve--;)Ne[Ie++]=arguments[++de];return pr(Qe,G?M:this,Ne)}return le}function eb(i){return function(v,M,z){return z&&typeof z!="number"&&zr(v,M,z)&&(M=z=n),v=Lo(v),M===n?(M=v,v=0):M=Lo(M),z=z===n?v<M?1:-1:Lo(z),eL(v,M,z,i)}}function Hc(i){return function(v,M){return typeof v=="string"&&typeof M=="string"||(v=Ii(v),M=Ii(M)),i(v,M)}}function tb(i,v,M,z,G,ee,le,de,ve,Ie){var Le=v&E,Ne=Le?le:n,Qe=Le?n:le,ct=Le?ee:n,wt=Le?n:ee;v|=Le?k:C,v&=~(Le?C:k),v&x||(v&=-4);var Wt=[i,v,G,ct,Ne,wt,Qe,de,ve,Ie],xt=M.apply(n,Wt);return Gd(i)&&fb(xt,Wt),xt.placeholder=z,pb(xt,i,v)}function jd(i){var v=en[i];return function(M,z){if(M=Ii(M),z=z==null?0:Or(Ft(z),292),z&&p0(M)){var G=(un(M)+"e").split("e"),ee=v(G[0]+"e"+(+G[1]+z));return G=(un(ee)+"e").split("e"),+(G[0]+"e"+(+G[1]-z))}return v(M)}}var mL=ga&&1/Ye(new ga([,-0]))[1]==W?function(i){return new ga(i)}:uf;function nb(i){return function(v){var M=Dr(v);return M==at?Me(v):M==Fn?et(v):st(v,i(v))}}function $o(i,v,M,z,G,ee,le,de){var ve=v&w;if(!ve&&typeof i!="function")throw new pn(p);var Ie=z?z.length:0;if(Ie||(v&=-97,z=G=n),le=le===n?le:dr(Ft(le),0),de=de===n?de:Ft(de),Ie-=G?G.length:0,v&C){var Le=z,Ne=G;z=G=n}var Qe=ve?n:Ud(i),ct=[i,v,M,z,G,Le,Ne,ee,le,de];if(Qe&&IL(ct,Qe),i=ct[0],v=ct[1],M=ct[2],z=ct[3],G=ct[4],de=ct[9]=ct[9]===n?ve?0:i.length:dr(ct[9]-Ie,0),!de&&v&(E|T)&&(v&=-25),!v||v==m)var wt=fL(i,v,M);else v==E||v==T?wt=pL(i,v,de):(v==k||v==(m|k))&&!G.length?wt=gL(i,v,M,z):wt=Wc.apply(n,ct);var Wt=Qe?N0:fb;return pb(Wt(wt,ct),i,v)}function rb(i,v,M,z){return i===n||Gi(i,Hn[M])&&!dn.call(z,M)?v:i}function ib(i,v,M,z,G,ee){return Dn(i)&&Dn(v)&&(ee.set(v,i),Nc(i,v,n,ib,ee),ee.delete(v)),i}function vL(i){return dl(i)?n:i}function ob(i,v,M,z,G,ee){var le=M&o,de=i.length,ve=v.length;if(de!=ve&&!(le&&ve>de))return!1;var Ie=ee.get(i),Le=ee.get(v);if(Ie&&Le)return Ie==v&&Le==i;var Ne=-1,Qe=!0,ct=M&u?new Ds:n;for(ee.set(i,v),ee.set(v,i);++Ne<de;){var wt=i[Ne],Wt=v[Ne];if(z)var xt=le?z(Wt,wt,Ne,v,i,ee):z(wt,Wt,Ne,i,v,ee);if(xt!==n){if(xt)continue;Qe=!1;break}if(ct){if(!B(v,function(Vt,Zt){if(!$t(ct,Zt)&&(wt===Vt||G(wt,Vt,M,z,ee)))return ct.push(Zt)})){Qe=!1;break}}else if(!(wt===Wt||G(wt,Wt,M,z,ee))){Qe=!1;break}}return ee.delete(i),ee.delete(v),Qe}function yL(i,v,M,z,G,ee,le){switch(M){case Je:if(i.byteLength!=v.byteLength||i.byteOffset!=v.byteOffset)return!1;i=i.buffer,v=v.buffer;case Ve:return!(i.byteLength!=v.byteLength||!ee(new _c(i),new _c(v)));case Te:case $e:case mt:return Gi(+i,+v);case Ze:return i.name==v.name&&i.message==v.message;case wn:case Pn:return i==v+"";case at:var de=Me;case Fn:var ve=z&o;if(de||(de=Ye),i.size!=v.size&&!ve)return!1;var Ie=le.get(i);if(Ie)return Ie==v;z|=u,le.set(i,v);var Le=ob(de(i),de(v),z,G,ee,le);return le.delete(i),Le;case nr:if(rl)return rl.call(i)==rl.call(v)}return!1}function bL(i,v,M,z,G,ee){var le=M&o,de=zd(i),ve=de.length,Ie=zd(v),Le=Ie.length;if(ve!=Le&&!le)return!1;for(var Ne=ve;Ne--;){var Qe=de[Ne];if(!(le?Qe in v:dn.call(v,Qe)))return!1}var ct=ee.get(i),wt=ee.get(v);if(ct&&wt)return ct==v&&wt==i;var Wt=!0;ee.set(i,v),ee.set(v,i);for(var xt=le;++Ne<ve;){Qe=de[Ne];var Vt=i[Qe],Zt=v[Qe];if(z)var gi=le?z(Zt,Vt,Qe,v,i,ee):z(Vt,Zt,Qe,i,v,ee);if(!(gi===n?Vt===Zt||G(Vt,Zt,M,z,ee):gi)){Wt=!1;break}xt||(xt=Qe=="constructor")}if(Wt&&!xt){var Hr=i.constructor,mi=v.constructor;Hr!=mi&&"constructor"in i&&"constructor"in v&&!(typeof Hr=="function"&&Hr instanceof Hr&&typeof mi=="function"&&mi instanceof mi)&&(Wt=!1)}return ee.delete(i),ee.delete(v),Wt}function Mo(i){return Xd(hb(i,n,wb),i+"")}function zd(i){return S0(i,yr,qd)}function Hd(i){return S0(i,ti,sb)}var Ud=Ec?function(i){return Ec.get(i)}:uf;function Uc(i){for(var v=i.name+"",M=ma[v],z=dn.call(ma,v)?M.length:0;z--;){var G=M[z],ee=G.func;if(ee==null||ee==i)return G.name}return v}function wa(i){var v=dn.call(J,"placeholder")?J:i;return v.placeholder}function bt(){var i=J.iteratee||lf;return i=i===lf?$0:i,arguments.length?i(arguments[0],arguments[1]):i}function Vc(i,v){var M=i.__data__;return TL(v)?M[typeof v=="string"?"string":"hash"]:M.map}function Vd(i){for(var v=yr(i),M=v.length;M--;){var z=v[M],G=i[z];v[M]=[z,G,cb(G)]}return v}function Ps(i,v){var M=ie(i,v);return T0(M)?M:n}function wL(i){var v=dn.call(i,Rs),M=i[Rs];try{i[Rs]=n;var z=!0}catch{}var G=Cc.call(i);return z&&(v?i[Rs]=M:delete i[Rs]),G}var qd=bd?function(i){return i==null?[]:(i=Bt(i),Rr(bd(i),function(v){return d0.call(i,v)}))}:hf,sb=bd?function(i){for(var v=[];i;)$(v,qd(i)),i=Sc(i);return v}:hf,Dr=jr;(wd&&Dr(new wd(new ArrayBuffer(1)))!=Je||el&&Dr(new el)!=at||xd&&Dr(xd.resolve())!=Jt||ga&&Dr(new ga)!=Fn||tl&&Dr(new tl)!=Ke)&&(Dr=function(i){var v=jr(i),M=v==bn?i.constructor:n,z=M?Bs(M):"";if(z)switch(z){case nI:return Je;case rI:return at;case iI:return Jt;case oI:return Fn;case sI:return Ke}return v});function xL(i,v,M){for(var z=-1,G=M.length;++z<G;){var ee=M[z],le=ee.size;switch(ee.type){case"drop":i+=le;break;case"dropRight":v-=le;break;case"take":v=Or(v,i+le);break;case"takeRight":i=dr(i,v-le);break}}return{start:i,end:v}}function CL(i){var v=i.match(Hi);return v?v[1].split(_s):[]}function ab(i,v,M){v=ts(v,i);for(var z=-1,G=v.length,ee=!1;++z<G;){var le=uo(v[z]);if(!(ee=i!=null&&M(i,le)))break;i=i[le]}return ee||++z!=G?ee:(G=i==null?0:i.length,!!G&&Zc(G)&&Eo(le,G)&&(It(i)||Ws(i)))}function kL(i){var v=i.length,M=new i.constructor(v);return v&&typeof i[0]=="string"&&dn.call(i,"index")&&(M.index=i.index,M.input=i.input),M}function lb(i){return typeof i.constructor=="function"&&!ul(i)?va(Sc(i)):{}}function _L(i,v,M){var z=i.constructor;switch(v){case Ve:return Bd(i);case Te:case $e:return new z(+i);case Je:return aL(i,M);case vt:case Tt:case At:case Pt:case Nt:case pt:case kt:case $n:case $r:return U0(i,M);case at:return new z;case mt:case Pn:return new z(i);case wn:return lL(i);case Fn:return new z;case nr:return cL(i)}}function SL(i,v){var M=v.length;if(!M)return i;var z=M-1;return v[z]=(M>1?"& ":"")+v[z],v=v.join(M>2?", ":" "),i.replace(no,`{
1468
+ */var xk=Nl.exports,gg;function Ck(){return gg||(gg=1,function(t,e){(function(){var n,r="4.17.21",f=200,d="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",p="Expected a function",b="Invalid `variable` option passed into `_.template`",h="__lodash_hash_undefined__",g=500,s="__lodash_placeholder__",a=1,c=2,l=4,o=1,u=2,m=1,w=2,x=4,E=8,T=16,k=32,C=64,L=128,R=256,F=512,I=30,H="...",P=800,O=16,A=1,S=2,D=3,W=1/0,U=9007199254740991,K=17976931348623157e292,Z=NaN,te=4294967295,he=te-1,ne=te>>>1,ae=[["ary",L],["bind",m],["bindKey",w],["curry",E],["curryRight",T],["flip",F],["partial",k],["partialRight",C],["rearg",R]],ue="[object Arguments]",ce="[object Array]",ge="[object AsyncFunction]",Te="[object Boolean]",$e="[object Date]",Ee="[object DOMException]",Ze="[object Error]",Xe="[object Function]",gt="[object GeneratorFunction]",lt="[object Map]",mt="[object Number]",sn="[object Null]",wn="[object Object]",Jt="[object Promise]",wr="[object Proxy]",xn="[object RegExp]",Fn="[object Set]",Pn="[object String]",nr="[object Symbol]",Ct="[object Undefined]",Ke="[object WeakMap]",ke="[object WeakSet]",Ve="[object ArrayBuffer]",Je="[object DataView]",vt="[object Float32Array]",Tt="[object Float64Array]",At="[object Int8Array]",Bt="[object Int16Array]",Nt="[object Int32Array]",pt="[object Uint8Array]",kt="[object Uint8ClampedArray]",$n="[object Uint16Array]",$r="[object Uint32Array]",Yr=/\b__p \+= '';/g,Wi=/\b(__p \+=) '' \+/g,po=/(__e\(.*?\)|\b__t\)) \+\n'';/g,xr=/&(?:amp|lt|gt|quot|#39);/g,go=/[&<>"']/g,Wo=RegExp(xr.source),Ga=RegExp(go.source),ai=/<%-([\s\S]+?)%>/g,Ya=/<%([\s\S]+?)%>/g,ks=/<%=([\s\S]+?)%>/g,aa=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ji=/^\w*$/,Yn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Mr=/[\\^$.*+?()[\]{}|]/g,zi=RegExp(Mr.source),Rn=/^\s+/,Er=/\s/,no=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Hi=/\{\n\/\* \[wrapped with (.+)\] \*/,_s=/,? & /,la=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Xa=/[()=,{}\[\]\/\s]/,Qa=/\\(\\)?/g,Ui=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,li=/\w*$/,Kt=/^[-+]0x[0-9a-f]+$/i,ca=/^0b[01]+$/i,Ir=/^\[object .+?Constructor\]$/,Xn=/^0o[0-7]+$/i,Cn=/^(?:0|[1-9]\d*)$/,Bn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,wi=/($^)/,Lr=/['\n\r\u2028\u2029\\]/g,xi="\\ud800-\\udfff",jo="\\u0300-\\u036f",Ss="\\ufe20-\\ufe2f",ro="\\u20d0-\\u20ff",Xr=jo+Ss+ro,mo="\\u2700-\\u27bf",zo="a-z\\xdf-\\xf6\\xf8-\\xff",Qr="\\xac\\xb1\\xd7\\xf7",Ho="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",As="\\u2000-\\u206f",Ts=" \\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",Uo="A-Z\\xc0-\\xd6\\xd8-\\xde",ur="\\ufe0e\\ufe0f",$s=Qr+Ho+As+Ts,vo="['’]",Vo="["+xi+"]",qo="["+$s+"]",io="["+Xr+"]",Ms="\\d+",ua="["+mo+"]",Ko="["+zo+"]",Go="[^"+xi+$s+Ms+mo+zo+Uo+"]",Es="\\ud83c[\\udffb-\\udfff]",Yo="(?:"+io+"|"+Es+")",yo="[^"+xi+"]",Ci="(?:\\ud83c[\\udde6-\\uddff]){2}",hr="[\\ud800-\\udbff][\\udc00-\\udfff]",oo="["+Uo+"]",Vi="\\u200d",ha="(?:"+Ko+"|"+Go+")",Za="(?:"+oo+"|"+Go+")",bo="(?:"+vo+"(?:d|ll|m|re|s|t|ve))?",qi="(?:"+vo+"(?:D|LL|M|RE|S|T|VE))?",wo=Yo+"?",Xo="["+ur+"]?",xo="(?:"+Vi+"(?:"+[yo,Ci,hr].join("|")+")"+Xo+wo+")*",da="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",so="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",je=Xo+wo+xo,fa="(?:"+[ua,Ci,hr].join("|")+")"+je,De="(?:"+[yo+io+"?",io,Ci,hr,Vo].join("|")+")",On=RegExp(vo,"g"),Co=RegExp(io,"g"),ci=RegExp(Es+"(?="+Es+")|"+De+je,"g"),Qn=RegExp([oo+"?"+Ko+"+"+bo+"(?="+[qo,oo,"$"].join("|")+")",Za+"+"+qi+"(?="+[qo,oo+ha,"$"].join("|")+")",oo+"?"+ha+"+"+bo,oo+"+"+qi,so,da,Ms,fa].join("|"),"g"),pa=RegExp("["+Vi+xi+Xr+ur+"]"),ko=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ki=["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"],ao=-1,an={};an[vt]=an[Tt]=an[At]=an[Bt]=an[Nt]=an[pt]=an[kt]=an[$n]=an[$r]=!0,an[ue]=an[ce]=an[Ve]=an[Te]=an[Je]=an[$e]=an[Ze]=an[Xe]=an[lt]=an[mt]=an[wn]=an[xn]=an[Fn]=an[Pn]=an[Ke]=!1;var nn={};nn[ue]=nn[ce]=nn[Ve]=nn[Je]=nn[Te]=nn[$e]=nn[vt]=nn[Tt]=nn[At]=nn[Bt]=nn[Nt]=nn[lt]=nn[mt]=nn[wn]=nn[xn]=nn[Fn]=nn[Pn]=nn[nr]=nn[pt]=nn[kt]=nn[$n]=nn[$r]=!0,nn[Ze]=nn[Xe]=nn[Ke]=!1;var ln={À:"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"},Gt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},_i={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Wn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},He=parseFloat,kn=parseInt,_t=typeof Fo=="object"&&Fo&&Fo.Object===Object&&Fo,Pr=typeof self=="object"&&self&&self.Object===Object&&self,pn=_t||Pr||Function("return this")(),An=e&&!e.nodeType&&e,rr=An&&!0&&t&&!t.nodeType&&t,Br=rr&&rr.exports===An,Si=Br&&_t.process,jn=function(){try{var fe=rr&&rr.require&&rr.require("util").types;return fe||Si&&Si.binding&&Si.binding("util")}catch{}}(),Zr=jn&&jn.isArrayBuffer,Qo=jn&&jn.isDate,zn=jn&&jn.isMap,ui=jn&&jn.isRegExp,hi=jn&&jn.isSet,Ai=jn&&jn.isTypedArray;function pr(fe,_e,xe){switch(xe.length){case 0:return fe.call(_e);case 1:return fe.call(_e,xe[0]);case 2:return fe.call(_e,xe[0],xe[1]);case 3:return fe.call(_e,xe[0],xe[1],xe[2])}return fe.apply(_e,xe)}function gr(fe,_e,xe,qe){for(var ft=-1,Dt=fe==null?0:fe.length;++ft<Dt;){var en=fe[ft];_e(qe,en,xe(en),fe)}return qe}function Cr(fe,_e){for(var xe=-1,qe=fe==null?0:fe.length;++xe<qe&&_e(fe[xe],xe,fe)!==!1;);return fe}function Is(fe,_e){for(var xe=fe==null?0:fe.length;xe--&&_e(fe[xe],xe,fe)!==!1;);return fe}function kr(fe,_e){for(var xe=-1,qe=fe==null?0:fe.length;++xe<qe;)if(!_e(fe[xe],xe,fe))return!1;return!0}function Rr(fe,_e){for(var xe=-1,qe=fe==null?0:fe.length,ft=0,Dt=[];++xe<qe;){var en=fe[xe];_e(en,xe,fe)&&(Dt[ft++]=en)}return Dt}function di(fe,_e){var xe=fe==null?0:fe.length;return!!xe&&se(fe,_e,0)>-1}function fi(fe,_e,xe){for(var qe=-1,ft=fe==null?0:fe.length;++qe<ft;)if(xe(_e,fe[qe]))return!0;return!1}function y(fe,_e){for(var xe=-1,qe=fe==null?0:fe.length,ft=Array(qe);++xe<qe;)ft[xe]=_e(fe[xe],xe,fe);return ft}function $(fe,_e){for(var xe=-1,qe=_e.length,ft=fe.length;++xe<qe;)fe[ft+xe]=_e[xe];return fe}function _(fe,_e,xe,qe){var ft=-1,Dt=fe==null?0:fe.length;for(qe&&Dt&&(xe=fe[++ft]);++ft<Dt;)xe=_e(xe,fe[ft],ft,fe);return xe}function N(fe,_e,xe,qe){var ft=fe==null?0:fe.length;for(qe&&ft&&(xe=fe[--ft]);ft--;)xe=_e(xe,fe[ft],ft,fe);return xe}function B(fe,_e){for(var xe=-1,qe=fe==null?0:fe.length;++xe<qe;)if(_e(fe[xe],xe,fe))return!0;return!1}var j=be("length");function q(fe){return fe.split("")}function Y(fe){return fe.match(la)||[]}function Q(fe,_e,xe){var qe;return xe(fe,function(ft,Dt,en){if(_e(ft,Dt,en))return qe=Dt,!1}),qe}function re(fe,_e,xe,qe){for(var ft=fe.length,Dt=xe+(qe?1:-1);qe?Dt--:++Dt<ft;)if(_e(fe[Dt],Dt,fe))return Dt;return-1}function se(fe,_e,xe){return _e===_e?nt(fe,_e,xe):re(fe,Ce,xe)}function ye(fe,_e,xe,qe){for(var ft=xe-1,Dt=fe.length;++ft<Dt;)if(qe(fe[ft],_e))return ft;return-1}function Ce(fe){return fe!==fe}function me(fe,_e){var xe=fe==null?0:fe.length;return xe?ht(fe,_e)/xe:Z}function be(fe){return function(_e){return _e==null?n:_e[fe]}}function Oe(fe){return function(_e){return fe==null?n:fe[_e]}}function Re(fe,_e,xe,qe,ft){return ft(fe,function(Dt,en,Wt){xe=qe?(qe=!1,Dt):_e(xe,Dt,en,Wt)}),xe}function Ge(fe,_e){var xe=fe.length;for(fe.sort(_e);xe--;)fe[xe]=fe[xe].value;return fe}function ht(fe,_e){for(var xe,qe=-1,ft=fe.length;++qe<ft;){var Dt=_e(fe[qe]);Dt!==n&&(xe=xe===n?Dt:xe+Dt)}return xe}function tt(fe,_e){for(var xe=-1,qe=Array(fe);++xe<fe;)qe[xe]=_e(xe);return qe}function at(fe,_e){return y(_e,function(xe){return[xe,fe[xe]]})}function _n(fe){return fe&&fe.slice(0,zt(fe)+1).replace(Rn,"")}function dt(fe){return function(_e){return fe(_e)}}function Mn(fe,_e){return y(_e,function(xe){return fe[xe]})}function $t(fe,_e){return fe.has(_e)}function Ot(fe,_e){for(var xe=-1,qe=fe.length;++xe<qe&&se(_e,fe[xe],0)>-1;);return xe}function ir(fe,_e){for(var xe=fe.length;xe--&&se(_e,fe[xe],0)>-1;);return xe}function mr(fe,_e){for(var xe=fe.length,qe=0;xe--;)fe[xe]===_e&&++qe;return qe}var En=Oe(ln),V=Oe(Gt);function X(fe){return"\\"+Wn[fe]}function ie(fe,_e){return fe==null?n:fe[_e]}function oe(fe){return pa.test(fe)}function pe(fe){return ko.test(fe)}function we(fe){for(var _e,xe=[];!(_e=fe.next()).done;)xe.push(_e.value);return xe}function Me(fe){var _e=-1,xe=Array(fe.size);return fe.forEach(function(qe,ft){xe[++_e]=[ft,qe]}),xe}function Be(fe,_e){return function(xe){return fe(_e(xe))}}function ze(fe,_e){for(var xe=-1,qe=fe.length,ft=0,Dt=[];++xe<qe;){var en=fe[xe];(en===_e||en===s)&&(fe[xe]=s,Dt[ft++]=xe)}return Dt}function Ye(fe){var _e=-1,xe=Array(fe.size);return fe.forEach(function(qe){xe[++_e]=qe}),xe}function et(fe){var _e=-1,xe=Array(fe.size);return fe.forEach(function(qe){xe[++_e]=[qe,qe]}),xe}function nt(fe,_e,xe){for(var qe=xe-1,ft=fe.length;++qe<ft;)if(fe[qe]===_e)return qe;return-1}function St(fe,_e,xe){for(var qe=xe+1;qe--;)if(fe[qe]===_e)return qe;return qe}function Ut(fe){return oe(fe)?ut(fe):j(fe)}function Mt(fe){return oe(fe)?vn(fe):q(fe)}function zt(fe){for(var _e=fe.length;_e--&&Er.test(fe.charAt(_e)););return _e}var yt=Oe(_i);function ut(fe){for(var _e=ci.lastIndex=0;ci.test(fe);)++_e;return _e}function vn(fe){return fe.match(ci)||[]}function In(fe){return fe.match(Qn)||[]}var or=function fe(_e){_e=_e==null?pn:Qt.defaults(pn.Object(),_e,Qt.pick(pn,ki));var xe=_e.Array,qe=_e.Date,ft=_e.Error,Dt=_e.Function,en=_e.Math,Wt=_e.Object,Wr=_e.RegExp,Ti=_e.String,gn=_e.TypeError,vr=xe.prototype,_o=Dt.prototype,Hn=Wt.prototype,Ls=_e["__core-js_shared__"],Cc=_o.toString,fn=Hn.hasOwnProperty,HE=0,c0=function(){var i=/[^.]+$/.exec(Ls&&Ls.keys&&Ls.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}(),kc=Hn.toString,UE=Cc.call(Wt),VE=pn._,qE=Wr("^"+Cc.call(fn).replace(Mr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),_c=Br?_e.Buffer:n,Zo=_e.Symbol,Sc=_e.Uint8Array,u0=_c?_c.allocUnsafe:n,Ac=Be(Wt.getPrototypeOf,Wt),h0=Wt.create,d0=Hn.propertyIsEnumerable,Tc=vr.splice,f0=Zo?Zo.isConcatSpreadable:n,Ja=Zo?Zo.iterator:n,Rs=Zo?Zo.toStringTag:n,$c=function(){try{var i=Ps(Wt,"defineProperty");return i({},"",{}),i}catch{}}(),KE=_e.clearTimeout!==pn.clearTimeout&&_e.clearTimeout,GE=qe&&qe.now!==pn.Date.now&&qe.now,YE=_e.setTimeout!==pn.setTimeout&&_e.setTimeout,Mc=en.ceil,Ec=en.floor,bd=Wt.getOwnPropertySymbols,XE=_c?_c.isBuffer:n,p0=_e.isFinite,QE=vr.join,ZE=Be(Wt.keys,Wt),dr=en.max,Or=en.min,JE=qe.now,eI=_e.parseInt,g0=en.random,tI=vr.reverse,wd=Ps(_e,"DataView"),el=Ps(_e,"Map"),xd=Ps(_e,"Promise"),ga=Ps(_e,"Set"),tl=Ps(_e,"WeakMap"),nl=Ps(Wt,"create"),Ic=tl&&new tl,ma={},nI=Bs(wd),rI=Bs(el),iI=Bs(xd),oI=Bs(ga),sI=Bs(tl),Lc=Zo?Zo.prototype:n,rl=Lc?Lc.valueOf:n,m0=Lc?Lc.toString:n;function J(i){if(Un(i)&&!It(i)&&!(i instanceof Yt)){if(i instanceof $i)return i;if(fn.call(i,"__wrapped__"))return vb(i)}return new $i(i)}var va=function(){function i(){}return function(v){if(!Dn(v))return{};if(h0)return h0(v);i.prototype=v;var M=new i;return i.prototype=n,M}}();function Rc(){}function $i(i,v){this.__wrapped__=i,this.__actions__=[],this.__chain__=!!v,this.__index__=0,this.__values__=n}J.templateSettings={escape:ai,evaluate:Ya,interpolate:ks,variable:"",imports:{_:J}},J.prototype=Rc.prototype,J.prototype.constructor=J,$i.prototype=va(Rc.prototype),$i.prototype.constructor=$i;function Yt(i){this.__wrapped__=i,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=te,this.__views__=[]}function aI(){var i=new Yt(this.__wrapped__);return i.__actions__=Jr(this.__actions__),i.__dir__=this.__dir__,i.__filtered__=this.__filtered__,i.__iteratees__=Jr(this.__iteratees__),i.__takeCount__=this.__takeCount__,i.__views__=Jr(this.__views__),i}function lI(){if(this.__filtered__){var i=new Yt(this);i.__dir__=-1,i.__filtered__=!0}else i=this.clone(),i.__dir__*=-1;return i}function cI(){var i=this.__wrapped__.value(),v=this.__dir__,M=It(i),z=v<0,G=M?i.length:0,ee=xL(0,G,this.__views__),le=ee.start,de=ee.end,ve=de-le,Ie=z?de:le-1,Le=this.__iteratees__,Ne=Le.length,Qe=0,ct=Or(ve,this.__takeCount__);if(!M||!z&&G==ve&&ct==ve)return W0(i,this.__actions__);var wt=[];e:for(;ve--&&Qe<ct;){Ie+=v;for(var jt=-1,xt=i[Ie];++jt<Ne;){var Vt=Le[jt],Zt=Vt.iteratee,mi=Vt.type,Hr=Zt(xt);if(mi==S)xt=Hr;else if(!Hr){if(mi==A)continue e;break e}}wt[Qe++]=xt}return wt}Yt.prototype=va(Rc.prototype),Yt.prototype.constructor=Yt;function Os(i){var v=-1,M=i==null?0:i.length;for(this.clear();++v<M;){var z=i[v];this.set(z[0],z[1])}}function uI(){this.__data__=nl?nl(null):{},this.size=0}function hI(i){var v=this.has(i)&&delete this.__data__[i];return this.size-=v?1:0,v}function dI(i){var v=this.__data__;if(nl){var M=v[i];return M===h?n:M}return fn.call(v,i)?v[i]:n}function fI(i){var v=this.__data__;return nl?v[i]!==n:fn.call(v,i)}function pI(i,v){var M=this.__data__;return this.size+=this.has(i)?0:1,M[i]=nl&&v===n?h:v,this}Os.prototype.clear=uI,Os.prototype.delete=hI,Os.prototype.get=dI,Os.prototype.has=fI,Os.prototype.set=pI;function So(i){var v=-1,M=i==null?0:i.length;for(this.clear();++v<M;){var z=i[v];this.set(z[0],z[1])}}function gI(){this.__data__=[],this.size=0}function mI(i){var v=this.__data__,M=Oc(v,i);if(M<0)return!1;var z=v.length-1;return M==z?v.pop():Tc.call(v,M,1),--this.size,!0}function vI(i){var v=this.__data__,M=Oc(v,i);return M<0?n:v[M][1]}function yI(i){return Oc(this.__data__,i)>-1}function bI(i,v){var M=this.__data__,z=Oc(M,i);return z<0?(++this.size,M.push([i,v])):M[z][1]=v,this}So.prototype.clear=gI,So.prototype.delete=mI,So.prototype.get=vI,So.prototype.has=yI,So.prototype.set=bI;function Ao(i){var v=-1,M=i==null?0:i.length;for(this.clear();++v<M;){var z=i[v];this.set(z[0],z[1])}}function wI(){this.size=0,this.__data__={hash:new Os,map:new(el||So),string:new Os}}function xI(i){var v=qc(this,i).delete(i);return this.size-=v?1:0,v}function CI(i){return qc(this,i).get(i)}function kI(i){return qc(this,i).has(i)}function _I(i,v){var M=qc(this,i),z=M.size;return M.set(i,v),this.size+=M.size==z?0:1,this}Ao.prototype.clear=wI,Ao.prototype.delete=xI,Ao.prototype.get=CI,Ao.prototype.has=kI,Ao.prototype.set=_I;function Ds(i){var v=-1,M=i==null?0:i.length;for(this.__data__=new Ao;++v<M;)this.add(i[v])}function SI(i){return this.__data__.set(i,h),this}function AI(i){return this.__data__.has(i)}Ds.prototype.add=Ds.prototype.push=SI,Ds.prototype.has=AI;function Ki(i){var v=this.__data__=new So(i);this.size=v.size}function TI(){this.__data__=new So,this.size=0}function $I(i){var v=this.__data__,M=v.delete(i);return this.size=v.size,M}function MI(i){return this.__data__.get(i)}function EI(i){return this.__data__.has(i)}function II(i,v){var M=this.__data__;if(M instanceof So){var z=M.__data__;if(!el||z.length<f-1)return z.push([i,v]),this.size=++M.size,this;M=this.__data__=new Ao(z)}return M.set(i,v),this.size=M.size,this}Ki.prototype.clear=TI,Ki.prototype.delete=$I,Ki.prototype.get=MI,Ki.prototype.has=EI,Ki.prototype.set=II;function v0(i,v){var M=It(i),z=!M&&Ws(i),G=!M&&!z&&rs(i),ee=!M&&!z&&!G&&xa(i),le=M||z||G||ee,de=le?tt(i.length,Ti):[],ve=de.length;for(var Ie in i)(v||fn.call(i,Ie))&&!(le&&(Ie=="length"||G&&(Ie=="offset"||Ie=="parent")||ee&&(Ie=="buffer"||Ie=="byteLength"||Ie=="byteOffset")||Eo(Ie,ve)))&&de.push(Ie);return de}function y0(i){var v=i.length;return v?i[Ld(0,v-1)]:n}function LI(i,v){return Kc(Jr(i),Ns(v,0,i.length))}function RI(i){return Kc(Jr(i))}function Cd(i,v,M){(M!==n&&!Gi(i[v],M)||M===n&&!(v in i))&&To(i,v,M)}function il(i,v,M){var z=i[v];(!(fn.call(i,v)&&Gi(z,M))||M===n&&!(v in i))&&To(i,v,M)}function Oc(i,v){for(var M=i.length;M--;)if(Gi(i[M][0],v))return M;return-1}function OI(i,v,M,z){return Jo(i,function(G,ee,le){v(z,G,M(G),le)}),z}function b0(i,v){return i&&co(v,yr(v),i)}function DI(i,v){return i&&co(v,ti(v),i)}function To(i,v,M){v=="__proto__"&&$c?$c(i,v,{configurable:!0,enumerable:!0,value:M,writable:!0}):i[v]=M}function kd(i,v){for(var M=-1,z=v.length,G=xe(z),ee=i==null;++M<z;)G[M]=ee?n:rf(i,v[M]);return G}function Ns(i,v,M){return i===i&&(M!==n&&(i=i<=M?i:M),v!==n&&(i=i>=v?i:v)),i}function Mi(i,v,M,z,G,ee){var le,de=v&a,ve=v&c,Ie=v&l;if(M&&(le=G?M(i,z,G,ee):M(i)),le!==n)return le;if(!Dn(i))return i;var Le=It(i);if(Le){if(le=kL(i),!de)return Jr(i,le)}else{var Ne=Dr(i),Qe=Ne==Xe||Ne==gt;if(rs(i))return H0(i,de);if(Ne==wn||Ne==ue||Qe&&!G){if(le=ve||Qe?{}:lb(i),!de)return ve?dL(i,DI(le,i)):hL(i,b0(le,i))}else{if(!nn[Ne])return G?i:{};le=_L(i,Ne,de)}}ee||(ee=new Ki);var ct=ee.get(i);if(ct)return ct;ee.set(i,le),Fb(i)?i.forEach(function(xt){le.add(Mi(xt,v,M,xt,i,ee))}):Db(i)&&i.forEach(function(xt,Vt){le.set(Vt,Mi(xt,v,M,Vt,i,ee))});var wt=Ie?ve?Hd:zd:ve?ti:yr,jt=Le?n:wt(i);return Cr(jt||i,function(xt,Vt){jt&&(Vt=xt,xt=i[Vt]),il(le,Vt,Mi(xt,v,M,Vt,i,ee))}),le}function NI(i){var v=yr(i);return function(M){return w0(M,i,v)}}function w0(i,v,M){var z=M.length;if(i==null)return!z;for(i=Wt(i);z--;){var G=M[z],ee=v[G],le=i[G];if(le===n&&!(G in i)||!ee(le))return!1}return!0}function x0(i,v,M){if(typeof i!="function")throw new gn(p);return hl(function(){i.apply(n,M)},v)}function ol(i,v,M,z){var G=-1,ee=di,le=!0,de=i.length,ve=[],Ie=v.length;if(!de)return ve;M&&(v=y(v,dt(M))),z?(ee=fi,le=!1):v.length>=f&&(ee=$t,le=!1,v=new Ds(v));e:for(;++G<de;){var Le=i[G],Ne=M==null?Le:M(Le);if(Le=z||Le!==0?Le:0,le&&Ne===Ne){for(var Qe=Ie;Qe--;)if(v[Qe]===Ne)continue e;ve.push(Le)}else ee(v,Ne,z)||ve.push(Le)}return ve}var Jo=G0(lo),C0=G0(Sd,!0);function FI(i,v){var M=!0;return Jo(i,function(z,G,ee){return M=!!v(z,G,ee),M}),M}function Dc(i,v,M){for(var z=-1,G=i.length;++z<G;){var ee=i[z],le=v(ee);if(le!=null&&(de===n?le===le&&!gi(le):M(le,de)))var de=le,ve=ee}return ve}function PI(i,v,M,z){var G=i.length;for(M=Ft(M),M<0&&(M=-M>G?0:G+M),z=z===n||z>G?G:Ft(z),z<0&&(z+=G),z=M>z?0:Bb(z);M<z;)i[M++]=v;return i}function k0(i,v){var M=[];return Jo(i,function(z,G,ee){v(z,G,ee)&&M.push(z)}),M}function _r(i,v,M,z,G){var ee=-1,le=i.length;for(M||(M=AL),G||(G=[]);++ee<le;){var de=i[ee];v>0&&M(de)?v>1?_r(de,v-1,M,z,G):$(G,de):z||(G[G.length]=de)}return G}var _d=Y0(),_0=Y0(!0);function lo(i,v){return i&&_d(i,v,yr)}function Sd(i,v){return i&&_0(i,v,yr)}function Nc(i,v){return Rr(v,function(M){return Io(i[M])})}function Fs(i,v){v=ts(v,i);for(var M=0,z=v.length;i!=null&&M<z;)i=i[uo(v[M++])];return M&&M==z?i:n}function S0(i,v,M){var z=v(i);return It(i)?z:$(z,M(i))}function jr(i){return i==null?i===n?Ct:sn:Rs&&Rs in Wt(i)?wL(i):RL(i)}function Ad(i,v){return i>v}function BI(i,v){return i!=null&&fn.call(i,v)}function WI(i,v){return i!=null&&v in Wt(i)}function jI(i,v,M){return i>=Or(v,M)&&i<dr(v,M)}function Td(i,v,M){for(var z=M?fi:di,G=i[0].length,ee=i.length,le=ee,de=xe(ee),ve=1/0,Ie=[];le--;){var Le=i[le];le&&v&&(Le=y(Le,dt(v))),ve=Or(Le.length,ve),de[le]=!M&&(v||G>=120&&Le.length>=120)?new Ds(le&&Le):n}Le=i[0];var Ne=-1,Qe=de[0];e:for(;++Ne<G&&Ie.length<ve;){var ct=Le[Ne],wt=v?v(ct):ct;if(ct=M||ct!==0?ct:0,!(Qe?$t(Qe,wt):z(Ie,wt,M))){for(le=ee;--le;){var jt=de[le];if(!(jt?$t(jt,wt):z(i[le],wt,M)))continue e}Qe&&Qe.push(wt),Ie.push(ct)}}return Ie}function zI(i,v,M,z){return lo(i,function(G,ee,le){v(z,M(G),ee,le)}),z}function sl(i,v,M){v=ts(v,i),i=db(i,v);var z=i==null?i:i[uo(Ii(v))];return z==null?n:pr(z,i,M)}function A0(i){return Un(i)&&jr(i)==ue}function HI(i){return Un(i)&&jr(i)==Ve}function UI(i){return Un(i)&&jr(i)==$e}function al(i,v,M,z,G){return i===v?!0:i==null||v==null||!Un(i)&&!Un(v)?i!==i&&v!==v:VI(i,v,M,z,al,G)}function VI(i,v,M,z,G,ee){var le=It(i),de=It(v),ve=le?ce:Dr(i),Ie=de?ce:Dr(v);ve=ve==ue?wn:ve,Ie=Ie==ue?wn:Ie;var Le=ve==wn,Ne=Ie==wn,Qe=ve==Ie;if(Qe&&rs(i)){if(!rs(v))return!1;le=!0,Le=!1}if(Qe&&!Le)return ee||(ee=new Ki),le||xa(i)?ob(i,v,M,z,G,ee):yL(i,v,ve,M,z,G,ee);if(!(M&o)){var ct=Le&&fn.call(i,"__wrapped__"),wt=Ne&&fn.call(v,"__wrapped__");if(ct||wt){var jt=ct?i.value():i,xt=wt?v.value():v;return ee||(ee=new Ki),G(jt,xt,M,z,ee)}}return Qe?(ee||(ee=new Ki),bL(i,v,M,z,G,ee)):!1}function qI(i){return Un(i)&&Dr(i)==lt}function $d(i,v,M,z){var G=M.length,ee=G,le=!z;if(i==null)return!ee;for(i=Wt(i);G--;){var de=M[G];if(le&&de[2]?de[1]!==i[de[0]]:!(de[0]in i))return!1}for(;++G<ee;){de=M[G];var ve=de[0],Ie=i[ve],Le=de[1];if(le&&de[2]){if(Ie===n&&!(ve in i))return!1}else{var Ne=new Ki;if(z)var Qe=z(Ie,Le,ve,i,v,Ne);if(!(Qe===n?al(Le,Ie,o|u,z,Ne):Qe))return!1}}return!0}function T0(i){if(!Dn(i)||$L(i))return!1;var v=Io(i)?qE:Ir;return v.test(Bs(i))}function KI(i){return Un(i)&&jr(i)==xn}function GI(i){return Un(i)&&Dr(i)==Fn}function YI(i){return Un(i)&&Jc(i.length)&&!!an[jr(i)]}function $0(i){return typeof i=="function"?i:i==null?ni:typeof i=="object"?It(i)?I0(i[0],i[1]):E0(i):Xb(i)}function Md(i){if(!ul(i))return ZE(i);var v=[];for(var M in Wt(i))fn.call(i,M)&&M!="constructor"&&v.push(M);return v}function XI(i){if(!Dn(i))return LL(i);var v=ul(i),M=[];for(var z in i)z=="constructor"&&(v||!fn.call(i,z))||M.push(z);return M}function Ed(i,v){return i<v}function M0(i,v){var M=-1,z=ei(i)?xe(i.length):[];return Jo(i,function(G,ee,le){z[++M]=v(G,ee,le)}),z}function E0(i){var v=Vd(i);return v.length==1&&v[0][2]?ub(v[0][0],v[0][1]):function(M){return M===i||$d(M,i,v)}}function I0(i,v){return Kd(i)&&cb(v)?ub(uo(i),v):function(M){var z=rf(M,i);return z===n&&z===v?of(M,i):al(v,z,o|u)}}function Fc(i,v,M,z,G){i!==v&&_d(v,function(ee,le){if(G||(G=new Ki),Dn(ee))QI(i,v,le,M,Fc,z,G);else{var de=z?z(Yd(i,le),ee,le+"",i,v,G):n;de===n&&(de=ee),Cd(i,le,de)}},ti)}function QI(i,v,M,z,G,ee,le){var de=Yd(i,M),ve=Yd(v,M),Ie=le.get(ve);if(Ie){Cd(i,M,Ie);return}var Le=ee?ee(de,ve,M+"",i,v,le):n,Ne=Le===n;if(Ne){var Qe=It(ve),ct=!Qe&&rs(ve),wt=!Qe&&!ct&&xa(ve);Le=ve,Qe||ct||wt?It(de)?Le=de:Zn(de)?Le=Jr(de):ct?(Ne=!1,Le=H0(ve,!0)):wt?(Ne=!1,Le=U0(ve,!0)):Le=[]:dl(ve)||Ws(ve)?(Le=de,Ws(de)?Le=Wb(de):(!Dn(de)||Io(de))&&(Le=lb(ve))):Ne=!1}Ne&&(le.set(ve,Le),G(Le,ve,z,ee,le),le.delete(ve)),Cd(i,M,Le)}function L0(i,v){var M=i.length;if(M)return v+=v<0?M:0,Eo(v,M)?i[v]:n}function R0(i,v,M){v.length?v=y(v,function(ee){return It(ee)?function(le){return Fs(le,ee.length===1?ee[0]:ee)}:ee}):v=[ni];var z=-1;v=y(v,dt(bt()));var G=M0(i,function(ee,le,de){var ve=y(v,function(Ie){return Ie(ee)});return{criteria:ve,index:++z,value:ee}});return Ge(G,function(ee,le){return uL(ee,le,M)})}function ZI(i,v){return O0(i,v,function(M,z){return of(i,z)})}function O0(i,v,M){for(var z=-1,G=v.length,ee={};++z<G;){var le=v[z],de=Fs(i,le);M(de,le)&&ll(ee,ts(le,i),de)}return ee}function JI(i){return function(v){return Fs(v,i)}}function Id(i,v,M,z){var G=z?ye:se,ee=-1,le=v.length,de=i;for(i===v&&(v=Jr(v)),M&&(de=y(i,dt(M)));++ee<le;)for(var ve=0,Ie=v[ee],Le=M?M(Ie):Ie;(ve=G(de,Le,ve,z))>-1;)de!==i&&Tc.call(de,ve,1),Tc.call(i,ve,1);return i}function D0(i,v){for(var M=i?v.length:0,z=M-1;M--;){var G=v[M];if(M==z||G!==ee){var ee=G;Eo(G)?Tc.call(i,G,1):Dd(i,G)}}return i}function Ld(i,v){return i+Ec(g0()*(v-i+1))}function eL(i,v,M,z){for(var G=-1,ee=dr(Mc((v-i)/(M||1)),0),le=xe(ee);ee--;)le[z?ee:++G]=i,i+=M;return le}function Rd(i,v){var M="";if(!i||v<1||v>U)return M;do v%2&&(M+=i),v=Ec(v/2),v&&(i+=i);while(v);return M}function Ht(i,v){return Xd(hb(i,v,ni),i+"")}function tL(i){return y0(Ca(i))}function nL(i,v){var M=Ca(i);return Kc(M,Ns(v,0,M.length))}function ll(i,v,M,z){if(!Dn(i))return i;v=ts(v,i);for(var G=-1,ee=v.length,le=ee-1,de=i;de!=null&&++G<ee;){var ve=uo(v[G]),Ie=M;if(ve==="__proto__"||ve==="constructor"||ve==="prototype")return i;if(G!=le){var Le=de[ve];Ie=z?z(Le,ve,de):n,Ie===n&&(Ie=Dn(Le)?Le:Eo(v[G+1])?[]:{})}il(de,ve,Ie),de=de[ve]}return i}var N0=Ic?function(i,v){return Ic.set(i,v),i}:ni,rL=$c?function(i,v){return $c(i,"toString",{configurable:!0,enumerable:!1,value:af(v),writable:!0})}:ni;function iL(i){return Kc(Ca(i))}function Ei(i,v,M){var z=-1,G=i.length;v<0&&(v=-v>G?0:G+v),M=M>G?G:M,M<0&&(M+=G),G=v>M?0:M-v>>>0,v>>>=0;for(var ee=xe(G);++z<G;)ee[z]=i[z+v];return ee}function oL(i,v){var M;return Jo(i,function(z,G,ee){return M=v(z,G,ee),!M}),!!M}function Pc(i,v,M){var z=0,G=i==null?z:i.length;if(typeof v=="number"&&v===v&&G<=ne){for(;z<G;){var ee=z+G>>>1,le=i[ee];le!==null&&!gi(le)&&(M?le<=v:le<v)?z=ee+1:G=ee}return G}return Od(i,v,ni,M)}function Od(i,v,M,z){var G=0,ee=i==null?0:i.length;if(ee===0)return 0;v=M(v);for(var le=v!==v,de=v===null,ve=gi(v),Ie=v===n;G<ee;){var Le=Ec((G+ee)/2),Ne=M(i[Le]),Qe=Ne!==n,ct=Ne===null,wt=Ne===Ne,jt=gi(Ne);if(le)var xt=z||wt;else Ie?xt=wt&&(z||Qe):de?xt=wt&&Qe&&(z||!ct):ve?xt=wt&&Qe&&!ct&&(z||!jt):ct||jt?xt=!1:xt=z?Ne<=v:Ne<v;xt?G=Le+1:ee=Le}return Or(ee,he)}function F0(i,v){for(var M=-1,z=i.length,G=0,ee=[];++M<z;){var le=i[M],de=v?v(le):le;if(!M||!Gi(de,ve)){var ve=de;ee[G++]=le===0?0:le}}return ee}function P0(i){return typeof i=="number"?i:gi(i)?Z:+i}function pi(i){if(typeof i=="string")return i;if(It(i))return y(i,pi)+"";if(gi(i))return m0?m0.call(i):"";var v=i+"";return v=="0"&&1/i==-1/0?"-0":v}function es(i,v,M){var z=-1,G=di,ee=i.length,le=!0,de=[],ve=de;if(M)le=!1,G=fi;else if(ee>=f){var Ie=v?null:mL(i);if(Ie)return Ye(Ie);le=!1,G=$t,ve=new Ds}else ve=v?[]:de;e:for(;++z<ee;){var Le=i[z],Ne=v?v(Le):Le;if(Le=M||Le!==0?Le:0,le&&Ne===Ne){for(var Qe=ve.length;Qe--;)if(ve[Qe]===Ne)continue e;v&&ve.push(Ne),de.push(Le)}else G(ve,Ne,M)||(ve!==de&&ve.push(Ne),de.push(Le))}return de}function Dd(i,v){return v=ts(v,i),i=db(i,v),i==null||delete i[uo(Ii(v))]}function B0(i,v,M,z){return ll(i,v,M(Fs(i,v)),z)}function Bc(i,v,M,z){for(var G=i.length,ee=z?G:-1;(z?ee--:++ee<G)&&v(i[ee],ee,i););return M?Ei(i,z?0:ee,z?ee+1:G):Ei(i,z?ee+1:0,z?G:ee)}function W0(i,v){var M=i;return M instanceof Yt&&(M=M.value()),_(v,function(z,G){return G.func.apply(G.thisArg,$([z],G.args))},M)}function Nd(i,v,M){var z=i.length;if(z<2)return z?es(i[0]):[];for(var G=-1,ee=xe(z);++G<z;)for(var le=i[G],de=-1;++de<z;)de!=G&&(ee[G]=ol(ee[G]||le,i[de],v,M));return es(_r(ee,1),v,M)}function j0(i,v,M){for(var z=-1,G=i.length,ee=v.length,le={};++z<G;){var de=z<ee?v[z]:n;M(le,i[z],de)}return le}function Fd(i){return Zn(i)?i:[]}function Pd(i){return typeof i=="function"?i:ni}function ts(i,v){return It(i)?i:Kd(i,v)?[i]:mb(un(i))}var sL=Ht;function ns(i,v,M){var z=i.length;return M=M===n?z:M,!v&&M>=z?i:Ei(i,v,M)}var z0=KE||function(i){return pn.clearTimeout(i)};function H0(i,v){if(v)return i.slice();var M=i.length,z=u0?u0(M):new i.constructor(M);return i.copy(z),z}function Bd(i){var v=new i.constructor(i.byteLength);return new Sc(v).set(new Sc(i)),v}function aL(i,v){var M=v?Bd(i.buffer):i.buffer;return new i.constructor(M,i.byteOffset,i.byteLength)}function lL(i){var v=new i.constructor(i.source,li.exec(i));return v.lastIndex=i.lastIndex,v}function cL(i){return rl?Wt(rl.call(i)):{}}function U0(i,v){var M=v?Bd(i.buffer):i.buffer;return new i.constructor(M,i.byteOffset,i.length)}function V0(i,v){if(i!==v){var M=i!==n,z=i===null,G=i===i,ee=gi(i),le=v!==n,de=v===null,ve=v===v,Ie=gi(v);if(!de&&!Ie&&!ee&&i>v||ee&&le&&ve&&!de&&!Ie||z&&le&&ve||!M&&ve||!G)return 1;if(!z&&!ee&&!Ie&&i<v||Ie&&M&&G&&!z&&!ee||de&&M&&G||!le&&G||!ve)return-1}return 0}function uL(i,v,M){for(var z=-1,G=i.criteria,ee=v.criteria,le=G.length,de=M.length;++z<le;){var ve=V0(G[z],ee[z]);if(ve){if(z>=de)return ve;var Ie=M[z];return ve*(Ie=="desc"?-1:1)}}return i.index-v.index}function q0(i,v,M,z){for(var G=-1,ee=i.length,le=M.length,de=-1,ve=v.length,Ie=dr(ee-le,0),Le=xe(ve+Ie),Ne=!z;++de<ve;)Le[de]=v[de];for(;++G<le;)(Ne||G<ee)&&(Le[M[G]]=i[G]);for(;Ie--;)Le[de++]=i[G++];return Le}function K0(i,v,M,z){for(var G=-1,ee=i.length,le=-1,de=M.length,ve=-1,Ie=v.length,Le=dr(ee-de,0),Ne=xe(Le+Ie),Qe=!z;++G<Le;)Ne[G]=i[G];for(var ct=G;++ve<Ie;)Ne[ct+ve]=v[ve];for(;++le<de;)(Qe||G<ee)&&(Ne[ct+M[le]]=i[G++]);return Ne}function Jr(i,v){var M=-1,z=i.length;for(v||(v=xe(z));++M<z;)v[M]=i[M];return v}function co(i,v,M,z){var G=!M;M||(M={});for(var ee=-1,le=v.length;++ee<le;){var de=v[ee],ve=z?z(M[de],i[de],de,M,i):n;ve===n&&(ve=i[de]),G?To(M,de,ve):il(M,de,ve)}return M}function hL(i,v){return co(i,qd(i),v)}function dL(i,v){return co(i,sb(i),v)}function Wc(i,v){return function(M,z){var G=It(M)?gr:OI,ee=v?v():{};return G(M,i,bt(z,2),ee)}}function ya(i){return Ht(function(v,M){var z=-1,G=M.length,ee=G>1?M[G-1]:n,le=G>2?M[2]:n;for(ee=i.length>3&&typeof ee=="function"?(G--,ee):n,le&&zr(M[0],M[1],le)&&(ee=G<3?n:ee,G=1),v=Wt(v);++z<G;){var de=M[z];de&&i(v,de,z,ee)}return v})}function G0(i,v){return function(M,z){if(M==null)return M;if(!ei(M))return i(M,z);for(var G=M.length,ee=v?G:-1,le=Wt(M);(v?ee--:++ee<G)&&z(le[ee],ee,le)!==!1;);return M}}function Y0(i){return function(v,M,z){for(var G=-1,ee=Wt(v),le=z(v),de=le.length;de--;){var ve=le[i?de:++G];if(M(ee[ve],ve,ee)===!1)break}return v}}function fL(i,v,M){var z=v&m,G=cl(i);function ee(){var le=this&&this!==pn&&this instanceof ee?G:i;return le.apply(z?M:this,arguments)}return ee}function X0(i){return function(v){v=un(v);var M=oe(v)?Mt(v):n,z=M?M[0]:v.charAt(0),G=M?ns(M,1).join(""):v.slice(1);return z[i]()+G}}function ba(i){return function(v){return _(Gb(Kb(v).replace(On,"")),i,"")}}function cl(i){return function(){var v=arguments;switch(v.length){case 0:return new i;case 1:return new i(v[0]);case 2:return new i(v[0],v[1]);case 3:return new i(v[0],v[1],v[2]);case 4:return new i(v[0],v[1],v[2],v[3]);case 5:return new i(v[0],v[1],v[2],v[3],v[4]);case 6:return new i(v[0],v[1],v[2],v[3],v[4],v[5]);case 7:return new i(v[0],v[1],v[2],v[3],v[4],v[5],v[6])}var M=va(i.prototype),z=i.apply(M,v);return Dn(z)?z:M}}function pL(i,v,M){var z=cl(i);function G(){for(var ee=arguments.length,le=xe(ee),de=ee,ve=wa(G);de--;)le[de]=arguments[de];var Ie=ee<3&&le[0]!==ve&&le[ee-1]!==ve?[]:ze(le,ve);if(ee-=Ie.length,ee<M)return tb(i,v,jc,G.placeholder,n,le,Ie,n,n,M-ee);var Le=this&&this!==pn&&this instanceof G?z:i;return pr(Le,this,le)}return G}function Q0(i){return function(v,M,z){var G=Wt(v);if(!ei(v)){var ee=bt(M,3);v=yr(v),M=function(de){return ee(G[de],de,G)}}var le=i(v,M,z);return le>-1?G[ee?v[le]:le]:n}}function Z0(i){return Mo(function(v){var M=v.length,z=M,G=$i.prototype.thru;for(i&&v.reverse();z--;){var ee=v[z];if(typeof ee!="function")throw new gn(p);if(G&&!le&&Vc(ee)=="wrapper")var le=new $i([],!0)}for(z=le?z:M;++z<M;){ee=v[z];var de=Vc(ee),ve=de=="wrapper"?Ud(ee):n;ve&&Gd(ve[0])&&ve[1]==(L|E|k|R)&&!ve[4].length&&ve[9]==1?le=le[Vc(ve[0])].apply(le,ve[3]):le=ee.length==1&&Gd(ee)?le[de]():le.thru(ee)}return function(){var Ie=arguments,Le=Ie[0];if(le&&Ie.length==1&&It(Le))return le.plant(Le).value();for(var Ne=0,Qe=M?v[Ne].apply(this,Ie):Le;++Ne<M;)Qe=v[Ne].call(this,Qe);return Qe}})}function jc(i,v,M,z,G,ee,le,de,ve,Ie){var Le=v&L,Ne=v&m,Qe=v&w,ct=v&(E|T),wt=v&F,jt=Qe?n:cl(i);function xt(){for(var Vt=arguments.length,Zt=xe(Vt),mi=Vt;mi--;)Zt[mi]=arguments[mi];if(ct)var Hr=wa(xt),vi=mr(Zt,Hr);if(z&&(Zt=q0(Zt,z,G,ct)),ee&&(Zt=K0(Zt,ee,le,ct)),Vt-=vi,ct&&Vt<Ie){var Jn=ze(Zt,Hr);return tb(i,v,jc,xt.placeholder,M,Zt,Jn,de,ve,Ie-Vt)}var Yi=Ne?M:this,Ro=Qe?Yi[i]:i;return Vt=Zt.length,de?Zt=OL(Zt,de):wt&&Vt>1&&Zt.reverse(),Le&&ve<Vt&&(Zt.length=ve),this&&this!==pn&&this instanceof xt&&(Ro=jt||cl(Ro)),Ro.apply(Yi,Zt)}return xt}function J0(i,v){return function(M,z){return zI(M,i,v(z),{})}}function zc(i,v){return function(M,z){var G;if(M===n&&z===n)return v;if(M!==n&&(G=M),z!==n){if(G===n)return z;typeof M=="string"||typeof z=="string"?(M=pi(M),z=pi(z)):(M=P0(M),z=P0(z)),G=i(M,z)}return G}}function Wd(i){return Mo(function(v){return v=y(v,dt(bt())),Ht(function(M){var z=this;return i(v,function(G){return pr(G,z,M)})})})}function Hc(i,v){v=v===n?" ":pi(v);var M=v.length;if(M<2)return M?Rd(v,i):v;var z=Rd(v,Mc(i/Ut(v)));return oe(v)?ns(Mt(z),0,i).join(""):z.slice(0,i)}function gL(i,v,M,z){var G=v&m,ee=cl(i);function le(){for(var de=-1,ve=arguments.length,Ie=-1,Le=z.length,Ne=xe(Le+ve),Qe=this&&this!==pn&&this instanceof le?ee:i;++Ie<Le;)Ne[Ie]=z[Ie];for(;ve--;)Ne[Ie++]=arguments[++de];return pr(Qe,G?M:this,Ne)}return le}function eb(i){return function(v,M,z){return z&&typeof z!="number"&&zr(v,M,z)&&(M=z=n),v=Lo(v),M===n?(M=v,v=0):M=Lo(M),z=z===n?v<M?1:-1:Lo(z),eL(v,M,z,i)}}function Uc(i){return function(v,M){return typeof v=="string"&&typeof M=="string"||(v=Li(v),M=Li(M)),i(v,M)}}function tb(i,v,M,z,G,ee,le,de,ve,Ie){var Le=v&E,Ne=Le?le:n,Qe=Le?n:le,ct=Le?ee:n,wt=Le?n:ee;v|=Le?k:C,v&=~(Le?C:k),v&x||(v&=-4);var jt=[i,v,G,ct,Ne,wt,Qe,de,ve,Ie],xt=M.apply(n,jt);return Gd(i)&&fb(xt,jt),xt.placeholder=z,pb(xt,i,v)}function jd(i){var v=en[i];return function(M,z){if(M=Li(M),z=z==null?0:Or(Ft(z),292),z&&p0(M)){var G=(un(M)+"e").split("e"),ee=v(G[0]+"e"+(+G[1]+z));return G=(un(ee)+"e").split("e"),+(G[0]+"e"+(+G[1]-z))}return v(M)}}var mL=ga&&1/Ye(new ga([,-0]))[1]==W?function(i){return new ga(i)}:uf;function nb(i){return function(v){var M=Dr(v);return M==lt?Me(v):M==Fn?et(v):at(v,i(v))}}function $o(i,v,M,z,G,ee,le,de){var ve=v&w;if(!ve&&typeof i!="function")throw new gn(p);var Ie=z?z.length:0;if(Ie||(v&=-97,z=G=n),le=le===n?le:dr(Ft(le),0),de=de===n?de:Ft(de),Ie-=G?G.length:0,v&C){var Le=z,Ne=G;z=G=n}var Qe=ve?n:Ud(i),ct=[i,v,M,z,G,Le,Ne,ee,le,de];if(Qe&&IL(ct,Qe),i=ct[0],v=ct[1],M=ct[2],z=ct[3],G=ct[4],de=ct[9]=ct[9]===n?ve?0:i.length:dr(ct[9]-Ie,0),!de&&v&(E|T)&&(v&=-25),!v||v==m)var wt=fL(i,v,M);else v==E||v==T?wt=pL(i,v,de):(v==k||v==(m|k))&&!G.length?wt=gL(i,v,M,z):wt=jc.apply(n,ct);var jt=Qe?N0:fb;return pb(jt(wt,ct),i,v)}function rb(i,v,M,z){return i===n||Gi(i,Hn[M])&&!fn.call(z,M)?v:i}function ib(i,v,M,z,G,ee){return Dn(i)&&Dn(v)&&(ee.set(v,i),Fc(i,v,n,ib,ee),ee.delete(v)),i}function vL(i){return dl(i)?n:i}function ob(i,v,M,z,G,ee){var le=M&o,de=i.length,ve=v.length;if(de!=ve&&!(le&&ve>de))return!1;var Ie=ee.get(i),Le=ee.get(v);if(Ie&&Le)return Ie==v&&Le==i;var Ne=-1,Qe=!0,ct=M&u?new Ds:n;for(ee.set(i,v),ee.set(v,i);++Ne<de;){var wt=i[Ne],jt=v[Ne];if(z)var xt=le?z(jt,wt,Ne,v,i,ee):z(wt,jt,Ne,i,v,ee);if(xt!==n){if(xt)continue;Qe=!1;break}if(ct){if(!B(v,function(Vt,Zt){if(!$t(ct,Zt)&&(wt===Vt||G(wt,Vt,M,z,ee)))return ct.push(Zt)})){Qe=!1;break}}else if(!(wt===jt||G(wt,jt,M,z,ee))){Qe=!1;break}}return ee.delete(i),ee.delete(v),Qe}function yL(i,v,M,z,G,ee,le){switch(M){case Je:if(i.byteLength!=v.byteLength||i.byteOffset!=v.byteOffset)return!1;i=i.buffer,v=v.buffer;case Ve:return!(i.byteLength!=v.byteLength||!ee(new Sc(i),new Sc(v)));case Te:case $e:case mt:return Gi(+i,+v);case Ze:return i.name==v.name&&i.message==v.message;case xn:case Pn:return i==v+"";case lt:var de=Me;case Fn:var ve=z&o;if(de||(de=Ye),i.size!=v.size&&!ve)return!1;var Ie=le.get(i);if(Ie)return Ie==v;z|=u,le.set(i,v);var Le=ob(de(i),de(v),z,G,ee,le);return le.delete(i),Le;case nr:if(rl)return rl.call(i)==rl.call(v)}return!1}function bL(i,v,M,z,G,ee){var le=M&o,de=zd(i),ve=de.length,Ie=zd(v),Le=Ie.length;if(ve!=Le&&!le)return!1;for(var Ne=ve;Ne--;){var Qe=de[Ne];if(!(le?Qe in v:fn.call(v,Qe)))return!1}var ct=ee.get(i),wt=ee.get(v);if(ct&&wt)return ct==v&&wt==i;var jt=!0;ee.set(i,v),ee.set(v,i);for(var xt=le;++Ne<ve;){Qe=de[Ne];var Vt=i[Qe],Zt=v[Qe];if(z)var mi=le?z(Zt,Vt,Qe,v,i,ee):z(Vt,Zt,Qe,i,v,ee);if(!(mi===n?Vt===Zt||G(Vt,Zt,M,z,ee):mi)){jt=!1;break}xt||(xt=Qe=="constructor")}if(jt&&!xt){var Hr=i.constructor,vi=v.constructor;Hr!=vi&&"constructor"in i&&"constructor"in v&&!(typeof Hr=="function"&&Hr instanceof Hr&&typeof vi=="function"&&vi instanceof vi)&&(jt=!1)}return ee.delete(i),ee.delete(v),jt}function Mo(i){return Xd(hb(i,n,wb),i+"")}function zd(i){return S0(i,yr,qd)}function Hd(i){return S0(i,ti,sb)}var Ud=Ic?function(i){return Ic.get(i)}:uf;function Vc(i){for(var v=i.name+"",M=ma[v],z=fn.call(ma,v)?M.length:0;z--;){var G=M[z],ee=G.func;if(ee==null||ee==i)return G.name}return v}function wa(i){var v=fn.call(J,"placeholder")?J:i;return v.placeholder}function bt(){var i=J.iteratee||lf;return i=i===lf?$0:i,arguments.length?i(arguments[0],arguments[1]):i}function qc(i,v){var M=i.__data__;return TL(v)?M[typeof v=="string"?"string":"hash"]:M.map}function Vd(i){for(var v=yr(i),M=v.length;M--;){var z=v[M],G=i[z];v[M]=[z,G,cb(G)]}return v}function Ps(i,v){var M=ie(i,v);return T0(M)?M:n}function wL(i){var v=fn.call(i,Rs),M=i[Rs];try{i[Rs]=n;var z=!0}catch{}var G=kc.call(i);return z&&(v?i[Rs]=M:delete i[Rs]),G}var qd=bd?function(i){return i==null?[]:(i=Wt(i),Rr(bd(i),function(v){return d0.call(i,v)}))}:hf,sb=bd?function(i){for(var v=[];i;)$(v,qd(i)),i=Ac(i);return v}:hf,Dr=jr;(wd&&Dr(new wd(new ArrayBuffer(1)))!=Je||el&&Dr(new el)!=lt||xd&&Dr(xd.resolve())!=Jt||ga&&Dr(new ga)!=Fn||tl&&Dr(new tl)!=Ke)&&(Dr=function(i){var v=jr(i),M=v==wn?i.constructor:n,z=M?Bs(M):"";if(z)switch(z){case nI:return Je;case rI:return lt;case iI:return Jt;case oI:return Fn;case sI:return Ke}return v});function xL(i,v,M){for(var z=-1,G=M.length;++z<G;){var ee=M[z],le=ee.size;switch(ee.type){case"drop":i+=le;break;case"dropRight":v-=le;break;case"take":v=Or(v,i+le);break;case"takeRight":i=dr(i,v-le);break}}return{start:i,end:v}}function CL(i){var v=i.match(Hi);return v?v[1].split(_s):[]}function ab(i,v,M){v=ts(v,i);for(var z=-1,G=v.length,ee=!1;++z<G;){var le=uo(v[z]);if(!(ee=i!=null&&M(i,le)))break;i=i[le]}return ee||++z!=G?ee:(G=i==null?0:i.length,!!G&&Jc(G)&&Eo(le,G)&&(It(i)||Ws(i)))}function kL(i){var v=i.length,M=new i.constructor(v);return v&&typeof i[0]=="string"&&fn.call(i,"index")&&(M.index=i.index,M.input=i.input),M}function lb(i){return typeof i.constructor=="function"&&!ul(i)?va(Ac(i)):{}}function _L(i,v,M){var z=i.constructor;switch(v){case Ve:return Bd(i);case Te:case $e:return new z(+i);case Je:return aL(i,M);case vt:case Tt:case At:case Bt:case Nt:case pt:case kt:case $n:case $r:return U0(i,M);case lt:return new z;case mt:case Pn:return new z(i);case xn:return lL(i);case Fn:return new z;case nr:return cL(i)}}function SL(i,v){var M=v.length;if(!M)return i;var z=M-1;return v[z]=(M>1?"& ":"")+v[z],v=v.join(M>2?", ":" "),i.replace(no,`{
1469
1469
  /* [wrapped with `+v+`] */
1470
- `)}function AL(i){return It(i)||Ws(i)||!!(f0&&i&&i[f0])}function Eo(i,v){var M=typeof i;return v=v??U,!!v&&(M=="number"||M!="symbol"&&xn.test(i))&&i>-1&&i%1==0&&i<v}function zr(i,v,M){if(!Dn(M))return!1;var z=typeof v;return(z=="number"?ei(M)&&Eo(v,M.length):z=="string"&&v in M)?Gi(M[v],i):!1}function Kd(i,v){if(It(i))return!1;var M=typeof i;return M=="number"||M=="symbol"||M=="boolean"||i==null||pi(i)?!0:ji.test(i)||!aa.test(i)||v!=null&&i in Bt(v)}function TL(i){var v=typeof i;return v=="string"||v=="number"||v=="symbol"||v=="boolean"?i!=="__proto__":i===null}function Gd(i){var v=Uc(i),M=J[v];if(typeof M!="function"||!(v in Yt.prototype))return!1;if(i===M)return!0;var z=Ud(M);return!!z&&i===z[0]}function $L(i){return!!c0&&c0 in i}var ML=Ls?Io:df;function ul(i){var v=i&&i.constructor,M=typeof v=="function"&&v.prototype||Hn;return i===M}function cb(i){return i===i&&!Dn(i)}function ub(i,v){return function(M){return M==null?!1:M[i]===v&&(v!==n||i in Bt(M))}}function EL(i){var v=Xc(i,function(z){return M.size===g&&M.clear(),z}),M=v.cache;return v}function IL(i,v){var M=i[1],z=v[1],G=M|z,ee=G<(m|w|L),le=z==L&&M==E||z==L&&M==R&&i[7].length<=v[8]||z==(L|R)&&v[7].length<=v[8]&&M==E;if(!(ee||le))return i;z&m&&(i[2]=v[2],G|=M&m?0:x);var de=v[3];if(de){var ve=i[3];i[3]=ve?q0(ve,de,v[4]):de,i[4]=ve?ze(i[3],s):v[4]}return de=v[5],de&&(ve=i[5],i[5]=ve?K0(ve,de,v[6]):de,i[6]=ve?ze(i[5],s):v[6]),de=v[7],de&&(i[7]=de),z&L&&(i[8]=i[8]==null?v[8]:Or(i[8],v[8])),i[9]==null&&(i[9]=v[9]),i[0]=v[0],i[1]=G,i}function LL(i){var v=[];if(i!=null)for(var M in Bt(i))v.push(M);return v}function RL(i){return Cc.call(i)}function hb(i,v,M){return v=dr(v===n?i.length-1:v,0),function(){for(var z=arguments,G=-1,ee=dr(z.length-v,0),le=xe(ee);++G<ee;)le[G]=z[v+G];G=-1;for(var de=xe(v+1);++G<v;)de[G]=z[G];return de[v]=M(le),pr(i,this,de)}}function db(i,v){return v.length<2?i:Fs(i,Mi(v,0,-1))}function OL(i,v){for(var M=i.length,z=Or(v.length,M),G=Jr(i);z--;){var ee=v[z];i[z]=Eo(ee,M)?G[ee]:n}return i}function Yd(i,v){if(!(v==="constructor"&&typeof i[v]=="function")&&v!="__proto__")return i[v]}var fb=gb(N0),hl=YE||function(i,v){return fn.setTimeout(i,v)},Xd=gb(rL);function pb(i,v,M){var z=v+"";return Xd(i,SL(z,DL(CL(z),M)))}function gb(i){var v=0,M=0;return function(){var z=JE(),G=O-(z-M);if(M=z,G>0){if(++v>=P)return arguments[0]}else v=0;return i.apply(n,arguments)}}function qc(i,v){var M=-1,z=i.length,G=z-1;for(v=v===n?z:v;++M<v;){var ee=Ld(M,G),le=i[ee];i[ee]=i[M],i[M]=le}return i.length=v,i}var mb=EL(function(i){var v=[];return i.charCodeAt(0)===46&&v.push(""),i.replace(Yn,function(M,z,G,ee){v.push(G?ee.replace(Qa,"$1"):z||M)}),v});function uo(i){if(typeof i=="string"||pi(i))return i;var v=i+"";return v=="0"&&1/i==-1/0?"-0":v}function Bs(i){if(i!=null){try{return xc.call(i)}catch{}try{return i+""}catch{}}return""}function DL(i,v){return Cr(ae,function(M){var z="_."+M[0];v&M[1]&&!hi(i,z)&&i.push(z)}),i.sort()}function vb(i){if(i instanceof Yt)return i.clone();var v=new Ti(i.__wrapped__,i.__chain__);return v.__actions__=Jr(i.__actions__),v.__index__=i.__index__,v.__values__=i.__values__,v}function NL(i,v,M){(M?zr(i,v,M):v===n)?v=1:v=dr(Ft(v),0);var z=i==null?0:i.length;if(!z||v<1)return[];for(var G=0,ee=0,le=xe($c(z/v));G<z;)le[ee++]=Mi(i,G,G+=v);return le}function FL(i){for(var v=-1,M=i==null?0:i.length,z=0,G=[];++v<M;){var ee=i[v];ee&&(G[z++]=ee)}return G}function PL(){var i=arguments.length;if(!i)return[];for(var v=xe(i-1),M=arguments[0],z=i;z--;)v[z-1]=arguments[z];return $(It(M)?Jr(M):[M],_r(v,1))}var BL=zt(function(i,v){return Zn(i)?ol(i,_r(v,1,Zn,!0)):[]}),WL=zt(function(i,v){var M=Ei(v);return Zn(M)&&(M=n),Zn(i)?ol(i,_r(v,1,Zn,!0),bt(M,2)):[]}),jL=zt(function(i,v){var M=Ei(v);return Zn(M)&&(M=n),Zn(i)?ol(i,_r(v,1,Zn,!0),n,M):[]});function zL(i,v,M){var z=i==null?0:i.length;return z?(v=M||v===n?1:Ft(v),Mi(i,v<0?0:v,z)):[]}function HL(i,v,M){var z=i==null?0:i.length;return z?(v=M||v===n?1:Ft(v),v=z-v,Mi(i,0,v<0?0:v)):[]}function UL(i,v){return i&&i.length?Pc(i,bt(v,3),!0,!0):[]}function VL(i,v){return i&&i.length?Pc(i,bt(v,3),!0):[]}function qL(i,v,M,z){var G=i==null?0:i.length;return G?(M&&typeof M!="number"&&zr(i,v,M)&&(M=0,z=G),PI(i,v,M,z)):[]}function yb(i,v,M){var z=i==null?0:i.length;if(!z)return-1;var G=M==null?0:Ft(M);return G<0&&(G=dr(z+G,0)),re(i,bt(v,3),G)}function bb(i,v,M){var z=i==null?0:i.length;if(!z)return-1;var G=z-1;return M!==n&&(G=Ft(M),G=M<0?dr(z+G,0):Or(G,z-1)),re(i,bt(v,3),G,!0)}function wb(i){var v=i==null?0:i.length;return v?_r(i,1):[]}function KL(i){var v=i==null?0:i.length;return v?_r(i,W):[]}function GL(i,v){var M=i==null?0:i.length;return M?(v=v===n?1:Ft(v),_r(i,v)):[]}function YL(i){for(var v=-1,M=i==null?0:i.length,z={};++v<M;){var G=i[v];z[G[0]]=G[1]}return z}function xb(i){return i&&i.length?i[0]:n}function XL(i,v,M){var z=i==null?0:i.length;if(!z)return-1;var G=M==null?0:Ft(M);return G<0&&(G=dr(z+G,0)),se(i,v,G)}function QL(i){var v=i==null?0:i.length;return v?Mi(i,0,-1):[]}var ZL=zt(function(i){var v=y(i,Fd);return v.length&&v[0]===i[0]?Td(v):[]}),JL=zt(function(i){var v=Ei(i),M=y(i,Fd);return v===Ei(M)?v=n:M.pop(),M.length&&M[0]===i[0]?Td(M,bt(v,2)):[]}),eR=zt(function(i){var v=Ei(i),M=y(i,Fd);return v=typeof v=="function"?v:n,v&&M.pop(),M.length&&M[0]===i[0]?Td(M,n,v):[]});function tR(i,v){return i==null?"":QE.call(i,v)}function Ei(i){var v=i==null?0:i.length;return v?i[v-1]:n}function nR(i,v,M){var z=i==null?0:i.length;if(!z)return-1;var G=z;return M!==n&&(G=Ft(M),G=G<0?dr(z+G,0):Or(G,z-1)),v===v?St(i,v,G):re(i,Ce,G,!0)}function rR(i,v){return i&&i.length?L0(i,Ft(v)):n}var iR=zt(Cb);function Cb(i,v){return i&&i.length&&v&&v.length?Id(i,v):i}function oR(i,v,M){return i&&i.length&&v&&v.length?Id(i,v,bt(M,2)):i}function sR(i,v,M){return i&&i.length&&v&&v.length?Id(i,v,n,M):i}var aR=Mo(function(i,v){var M=i==null?0:i.length,z=kd(i,v);return D0(i,y(v,function(G){return Eo(G,M)?+G:G}).sort(V0)),z});function lR(i,v){var M=[];if(!(i&&i.length))return M;var z=-1,G=[],ee=i.length;for(v=bt(v,3);++z<ee;){var le=i[z];v(le,z,i)&&(M.push(le),G.push(z))}return D0(i,G),M}function Qd(i){return i==null?i:tI.call(i)}function cR(i,v,M){var z=i==null?0:i.length;return z?(M&&typeof M!="number"&&zr(i,v,M)?(v=0,M=z):(v=v==null?0:Ft(v),M=M===n?z:Ft(M)),Mi(i,v,M)):[]}function uR(i,v){return Fc(i,v)}function hR(i,v,M){return Od(i,v,bt(M,2))}function dR(i,v){var M=i==null?0:i.length;if(M){var z=Fc(i,v);if(z<M&&Gi(i[z],v))return z}return-1}function fR(i,v){return Fc(i,v,!0)}function pR(i,v,M){return Od(i,v,bt(M,2),!0)}function gR(i,v){var M=i==null?0:i.length;if(M){var z=Fc(i,v,!0)-1;if(Gi(i[z],v))return z}return-1}function mR(i){return i&&i.length?F0(i):[]}function vR(i,v){return i&&i.length?F0(i,bt(v,2)):[]}function yR(i){var v=i==null?0:i.length;return v?Mi(i,1,v):[]}function bR(i,v,M){return i&&i.length?(v=M||v===n?1:Ft(v),Mi(i,0,v<0?0:v)):[]}function wR(i,v,M){var z=i==null?0:i.length;return z?(v=M||v===n?1:Ft(v),v=z-v,Mi(i,v<0?0:v,z)):[]}function xR(i,v){return i&&i.length?Pc(i,bt(v,3),!1,!0):[]}function CR(i,v){return i&&i.length?Pc(i,bt(v,3)):[]}var kR=zt(function(i){return es(_r(i,1,Zn,!0))}),_R=zt(function(i){var v=Ei(i);return Zn(v)&&(v=n),es(_r(i,1,Zn,!0),bt(v,2))}),SR=zt(function(i){var v=Ei(i);return v=typeof v=="function"?v:n,es(_r(i,1,Zn,!0),n,v)});function AR(i){return i&&i.length?es(i):[]}function TR(i,v){return i&&i.length?es(i,bt(v,2)):[]}function $R(i,v){return v=typeof v=="function"?v:n,i&&i.length?es(i,n,v):[]}function Zd(i){if(!(i&&i.length))return[];var v=0;return i=Rr(i,function(M){if(Zn(M))return v=dr(M.length,v),!0}),tt(v,function(M){return y(i,be(M))})}function kb(i,v){if(!(i&&i.length))return[];var M=Zd(i);return v==null?M:y(M,function(z){return pr(v,n,z)})}var MR=zt(function(i,v){return Zn(i)?ol(i,v):[]}),ER=zt(function(i){return Nd(Rr(i,Zn))}),IR=zt(function(i){var v=Ei(i);return Zn(v)&&(v=n),Nd(Rr(i,Zn),bt(v,2))}),LR=zt(function(i){var v=Ei(i);return v=typeof v=="function"?v:n,Nd(Rr(i,Zn),n,v)}),RR=zt(Zd);function OR(i,v){return j0(i||[],v||[],il)}function DR(i,v){return j0(i||[],v||[],ll)}var NR=zt(function(i){var v=i.length,M=v>1?i[v-1]:n;return M=typeof M=="function"?(i.pop(),M):n,kb(i,M)});function _b(i){var v=J(i);return v.__chain__=!0,v}function FR(i,v){return v(i),i}function Kc(i,v){return v(i)}var PR=Mo(function(i){var v=i.length,M=v?i[0]:0,z=this.__wrapped__,G=function(ee){return kd(ee,i)};return v>1||this.__actions__.length||!(z instanceof Yt)||!Eo(M)?this.thru(G):(z=z.slice(M,+M+(v?1:0)),z.__actions__.push({func:Kc,args:[G],thisArg:n}),new Ti(z,this.__chain__).thru(function(ee){return v&&!ee.length&&ee.push(n),ee}))});function BR(){return _b(this)}function WR(){return new Ti(this.value(),this.__chain__)}function jR(){this.__values__===n&&(this.__values__=Pb(this.value()));var i=this.__index__>=this.__values__.length,v=i?n:this.__values__[this.__index__++];return{done:i,value:v}}function zR(){return this}function HR(i){for(var v,M=this;M instanceof Lc;){var z=vb(M);z.__index__=0,z.__values__=n,v?G.__wrapped__=z:v=z;var G=z;M=M.__wrapped__}return G.__wrapped__=i,v}function UR(){var i=this.__wrapped__;if(i instanceof Yt){var v=i;return this.__actions__.length&&(v=new Yt(this)),v=v.reverse(),v.__actions__.push({func:Kc,args:[Qd],thisArg:n}),new Ti(v,this.__chain__)}return this.thru(Qd)}function VR(){return W0(this.__wrapped__,this.__actions__)}var qR=Bc(function(i,v,M){dn.call(i,M)?++i[M]:To(i,M,1)});function KR(i,v,M){var z=It(i)?kr:FI;return M&&zr(i,v,M)&&(v=n),z(i,bt(v,3))}function GR(i,v){var M=It(i)?Rr:k0;return M(i,bt(v,3))}var YR=Q0(yb),XR=Q0(bb);function QR(i,v){return _r(Gc(i,v),1)}function ZR(i,v){return _r(Gc(i,v),W)}function JR(i,v,M){return M=M===n?1:Ft(M),_r(Gc(i,v),M)}function Sb(i,v){var M=It(i)?Cr:Jo;return M(i,bt(v,3))}function Ab(i,v){var M=It(i)?Is:C0;return M(i,bt(v,3))}var eO=Bc(function(i,v,M){dn.call(i,M)?i[M].push(v):To(i,M,[v])});function tO(i,v,M,z){i=ei(i)?i:Ca(i),M=M&&!z?Ft(M):0;var G=i.length;return M<0&&(M=dr(G+M,0)),Jc(i)?M<=G&&i.indexOf(v,M)>-1:!!G&&se(i,v,M)>-1}var nO=zt(function(i,v,M){var z=-1,G=typeof v=="function",ee=ei(i)?xe(i.length):[];return Jo(i,function(le){ee[++z]=G?pr(v,le,M):sl(le,v,M)}),ee}),rO=Bc(function(i,v,M){To(i,M,v)});function Gc(i,v){var M=It(i)?y:M0;return M(i,bt(v,3))}function iO(i,v,M,z){return i==null?[]:(It(v)||(v=v==null?[]:[v]),M=z?n:M,It(M)||(M=M==null?[]:[M]),R0(i,v,M))}var oO=Bc(function(i,v,M){i[M?0:1].push(v)},function(){return[[],[]]});function sO(i,v,M){var z=It(i)?_:Re,G=arguments.length<3;return z(i,bt(v,4),M,G,Jo)}function aO(i,v,M){var z=It(i)?N:Re,G=arguments.length<3;return z(i,bt(v,4),M,G,C0)}function lO(i,v){var M=It(i)?Rr:k0;return M(i,Qc(bt(v,3)))}function cO(i){var v=It(i)?y0:tL;return v(i)}function uO(i,v,M){(M?zr(i,v,M):v===n)?v=1:v=Ft(v);var z=It(i)?LI:nL;return z(i,v)}function hO(i){var v=It(i)?RI:iL;return v(i)}function dO(i){if(i==null)return 0;if(ei(i))return Jc(i)?Ut(i):i.length;var v=Dr(i);return v==at||v==Fn?i.size:Md(i).length}function fO(i,v,M){var z=It(i)?B:oL;return M&&zr(i,v,M)&&(v=n),z(i,bt(v,3))}var pO=zt(function(i,v){if(i==null)return[];var M=v.length;return M>1&&zr(i,v[0],v[1])?v=[]:M>2&&zr(v[0],v[1],v[2])&&(v=[v[0]]),R0(i,_r(v,1),[])}),Yc=GE||function(){return fn.Date.now()};function gO(i,v){if(typeof v!="function")throw new pn(p);return i=Ft(i),function(){if(--i<1)return v.apply(this,arguments)}}function Tb(i,v,M){return v=M?n:v,v=i&&v==null?i.length:v,$o(i,L,n,n,n,n,v)}function $b(i,v){var M;if(typeof v!="function")throw new pn(p);return i=Ft(i),function(){return--i>0&&(M=v.apply(this,arguments)),i<=1&&(v=n),M}}var Jd=zt(function(i,v,M){var z=m;if(M.length){var G=ze(M,wa(Jd));z|=k}return $o(i,z,v,M,G)}),Mb=zt(function(i,v,M){var z=m|w;if(M.length){var G=ze(M,wa(Mb));z|=k}return $o(v,z,i,M,G)});function Eb(i,v,M){v=M?n:v;var z=$o(i,E,n,n,n,n,n,v);return z.placeholder=Eb.placeholder,z}function Ib(i,v,M){v=M?n:v;var z=$o(i,T,n,n,n,n,n,v);return z.placeholder=Ib.placeholder,z}function Lb(i,v,M){var z,G,ee,le,de,ve,Ie=0,Le=!1,Ne=!1,Qe=!0;if(typeof i!="function")throw new pn(p);v=Ii(v)||0,Dn(M)&&(Le=!!M.leading,Ne="maxWait"in M,ee=Ne?dr(Ii(M.maxWait)||0,v):ee,Qe="trailing"in M?!!M.trailing:Qe);function ct(Jn){var Yi=z,Ro=G;return z=G=n,Ie=Jn,le=i.apply(Ro,Yi),le}function wt(Jn){return Ie=Jn,de=hl(Vt,v),Le?ct(Jn):le}function Wt(Jn){var Yi=Jn-ve,Ro=Jn-Ie,Qb=v-Yi;return Ne?Or(Qb,ee-Ro):Qb}function xt(Jn){var Yi=Jn-ve,Ro=Jn-Ie;return ve===n||Yi>=v||Yi<0||Ne&&Ro>=ee}function Vt(){var Jn=Yc();if(xt(Jn))return Zt(Jn);de=hl(Vt,Wt(Jn))}function Zt(Jn){return de=n,Qe&&z?ct(Jn):(z=G=n,le)}function gi(){de!==n&&z0(de),Ie=0,z=ve=G=de=n}function Hr(){return de===n?le:Zt(Yc())}function mi(){var Jn=Yc(),Yi=xt(Jn);if(z=arguments,G=this,ve=Jn,Yi){if(de===n)return wt(ve);if(Ne)return z0(de),de=hl(Vt,v),ct(ve)}return de===n&&(de=hl(Vt,v)),le}return mi.cancel=gi,mi.flush=Hr,mi}var mO=zt(function(i,v){return x0(i,1,v)}),vO=zt(function(i,v,M){return x0(i,Ii(v)||0,M)});function yO(i){return $o(i,F)}function Xc(i,v){if(typeof i!="function"||v!=null&&typeof v!="function")throw new pn(p);var M=function(){var z=arguments,G=v?v.apply(this,z):z[0],ee=M.cache;if(ee.has(G))return ee.get(G);var le=i.apply(this,z);return M.cache=ee.set(G,le)||ee,le};return M.cache=new(Xc.Cache||Ao),M}Xc.Cache=Ao;function Qc(i){if(typeof i!="function")throw new pn(p);return function(){var v=arguments;switch(v.length){case 0:return!i.call(this);case 1:return!i.call(this,v[0]);case 2:return!i.call(this,v[0],v[1]);case 3:return!i.call(this,v[0],v[1],v[2])}return!i.apply(this,v)}}function bO(i){return $b(2,i)}var wO=sL(function(i,v){v=v.length==1&&It(v[0])?y(v[0],dt(bt())):y(_r(v,1),dt(bt()));var M=v.length;return zt(function(z){for(var G=-1,ee=Or(z.length,M);++G<ee;)z[G]=v[G].call(this,z[G]);return pr(i,this,z)})}),ef=zt(function(i,v){var M=ze(v,wa(ef));return $o(i,k,n,v,M)}),Rb=zt(function(i,v){var M=ze(v,wa(Rb));return $o(i,C,n,v,M)}),xO=Mo(function(i,v){return $o(i,R,n,n,n,v)});function CO(i,v){if(typeof i!="function")throw new pn(p);return v=v===n?v:Ft(v),zt(i,v)}function kO(i,v){if(typeof i!="function")throw new pn(p);return v=v==null?0:dr(Ft(v),0),zt(function(M){var z=M[v],G=ns(M,0,v);return z&&$(G,z),pr(i,this,G)})}function _O(i,v,M){var z=!0,G=!0;if(typeof i!="function")throw new pn(p);return Dn(M)&&(z="leading"in M?!!M.leading:z,G="trailing"in M?!!M.trailing:G),Lb(i,v,{leading:z,maxWait:v,trailing:G})}function SO(i){return Tb(i,1)}function AO(i,v){return ef(Pd(v),i)}function TO(){if(!arguments.length)return[];var i=arguments[0];return It(i)?i:[i]}function $O(i){return $i(i,l)}function MO(i,v){return v=typeof v=="function"?v:n,$i(i,l,v)}function EO(i){return $i(i,a|l)}function IO(i,v){return v=typeof v=="function"?v:n,$i(i,a|l,v)}function LO(i,v){return v==null||w0(i,v,yr(v))}function Gi(i,v){return i===v||i!==i&&v!==v}var RO=Hc(Ad),OO=Hc(function(i,v){return i>=v}),Ws=A0(function(){return arguments}())?A0:function(i){return Un(i)&&dn.call(i,"callee")&&!d0.call(i,"callee")},It=xe.isArray,DO=Zr?dt(Zr):HI;function ei(i){return i!=null&&Zc(i.length)&&!Io(i)}function Zn(i){return Un(i)&&ei(i)}function NO(i){return i===!0||i===!1||Un(i)&&jr(i)==Te}var rs=XE||df,FO=Qo?dt(Qo):UI;function PO(i){return Un(i)&&i.nodeType===1&&!dl(i)}function BO(i){if(i==null)return!0;if(ei(i)&&(It(i)||typeof i=="string"||typeof i.splice=="function"||rs(i)||xa(i)||Ws(i)))return!i.length;var v=Dr(i);if(v==at||v==Fn)return!i.size;if(ul(i))return!Md(i).length;for(var M in i)if(dn.call(i,M))return!1;return!0}function WO(i,v){return al(i,v)}function jO(i,v,M){M=typeof M=="function"?M:n;var z=M?M(i,v):n;return z===n?al(i,v,n,M):!!z}function tf(i){if(!Un(i))return!1;var v=jr(i);return v==Ze||v==Ee||typeof i.message=="string"&&typeof i.name=="string"&&!dl(i)}function zO(i){return typeof i=="number"&&p0(i)}function Io(i){if(!Dn(i))return!1;var v=jr(i);return v==Xe||v==gt||v==ge||v==wr}function Ob(i){return typeof i=="number"&&i==Ft(i)}function Zc(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=U}function Dn(i){var v=typeof i;return i!=null&&(v=="object"||v=="function")}function Un(i){return i!=null&&typeof i=="object"}var Db=zn?dt(zn):qI;function HO(i,v){return i===v||$d(i,v,Vd(v))}function UO(i,v,M){return M=typeof M=="function"?M:n,$d(i,v,Vd(v),M)}function VO(i){return Nb(i)&&i!=+i}function qO(i){if(ML(i))throw new ft(d);return T0(i)}function KO(i){return i===null}function GO(i){return i==null}function Nb(i){return typeof i=="number"||Un(i)&&jr(i)==mt}function dl(i){if(!Un(i)||jr(i)!=bn)return!1;var v=Sc(i);if(v===null)return!0;var M=dn.call(v,"constructor")&&v.constructor;return typeof M=="function"&&M instanceof M&&xc.call(M)==UE}var nf=ci?dt(ci):KI;function YO(i){return Ob(i)&&i>=-9007199254740991&&i<=U}var Fb=ui?dt(ui):GI;function Jc(i){return typeof i=="string"||!It(i)&&Un(i)&&jr(i)==Pn}function pi(i){return typeof i=="symbol"||Un(i)&&jr(i)==nr}var xa=Si?dt(Si):YI;function XO(i){return i===n}function QO(i){return Un(i)&&Dr(i)==Ke}function ZO(i){return Un(i)&&jr(i)==ke}var JO=Hc(Ed),e2=Hc(function(i,v){return i<=v});function Pb(i){if(!i)return[];if(ei(i))return Jc(i)?Mt(i):Jr(i);if(Ja&&i[Ja])return we(i[Ja]());var v=Dr(i),M=v==at?Me:v==Fn?Ye:Ca;return M(i)}function Lo(i){if(!i)return i===0?i:0;if(i=Ii(i),i===W||i===-1/0){var v=i<0?-1:1;return v*K}return i===i?i:0}function Ft(i){var v=Lo(i),M=v%1;return v===v?M?v-M:v:0}function Bb(i){return i?Ns(Ft(i),0,te):0}function Ii(i){if(typeof i=="number")return i;if(pi(i))return Z;if(Dn(i)){var v=typeof i.valueOf=="function"?i.valueOf():i;i=Dn(v)?v+"":v}if(typeof i!="string")return i===0?i:+i;i=kn(i);var M=ca.test(i);return M||Xn.test(i)?Cn(i.slice(2),M?2:8):Kt.test(i)?Z:+i}function Wb(i){return co(i,ti(i))}function t2(i){return i?Ns(Ft(i),-9007199254740991,U):i===0?i:0}function un(i){return i==null?"":fi(i)}var n2=ya(function(i,v){if(ul(v)||ei(v)){co(v,yr(v),i);return}for(var M in v)dn.call(v,M)&&il(i,M,v[M])}),jb=ya(function(i,v){co(v,ti(v),i)}),eu=ya(function(i,v,M,z){co(v,ti(v),i,z)}),r2=ya(function(i,v,M,z){co(v,yr(v),i,z)}),i2=Mo(kd);function o2(i,v){var M=va(i);return v==null?M:b0(M,v)}var s2=zt(function(i,v){i=Bt(i);var M=-1,z=v.length,G=z>2?v[2]:n;for(G&&zr(v[0],v[1],G)&&(z=1);++M<z;)for(var ee=v[M],le=ti(ee),de=-1,ve=le.length;++de<ve;){var Ie=le[de],Le=i[Ie];(Le===n||Gi(Le,Hn[Ie])&&!dn.call(i,Ie))&&(i[Ie]=ee[Ie])}return i}),a2=zt(function(i){return i.push(n,ib),pr(zb,n,i)});function l2(i,v){return Q(i,bt(v,3),lo)}function c2(i,v){return Q(i,bt(v,3),Sd)}function u2(i,v){return i==null?i:_d(i,bt(v,3),ti)}function h2(i,v){return i==null?i:_0(i,bt(v,3),ti)}function d2(i,v){return i&&lo(i,bt(v,3))}function f2(i,v){return i&&Sd(i,bt(v,3))}function p2(i){return i==null?[]:Dc(i,yr(i))}function g2(i){return i==null?[]:Dc(i,ti(i))}function rf(i,v,M){var z=i==null?n:Fs(i,v);return z===n?M:z}function m2(i,v){return i!=null&&ab(i,v,BI)}function of(i,v){return i!=null&&ab(i,v,WI)}var v2=J0(function(i,v,M){v!=null&&typeof v.toString!="function"&&(v=Cc.call(v)),i[v]=M},af(ni)),y2=J0(function(i,v,M){v!=null&&typeof v.toString!="function"&&(v=Cc.call(v)),dn.call(i,v)?i[v].push(M):i[v]=[M]},bt),b2=zt(sl);function yr(i){return ei(i)?v0(i):Md(i)}function ti(i){return ei(i)?v0(i,!0):XI(i)}function w2(i,v){var M={};return v=bt(v,3),lo(i,function(z,G,ee){To(M,v(z,G,ee),z)}),M}function x2(i,v){var M={};return v=bt(v,3),lo(i,function(z,G,ee){To(M,G,v(z,G,ee))}),M}var C2=ya(function(i,v,M){Nc(i,v,M)}),zb=ya(function(i,v,M,z){Nc(i,v,M,z)}),k2=Mo(function(i,v){var M={};if(i==null)return M;var z=!1;v=y(v,function(ee){return ee=ts(ee,i),z||(z=ee.length>1),ee}),co(i,Hd(i),M),z&&(M=$i(M,a|c|l,vL));for(var G=v.length;G--;)Dd(M,v[G]);return M});function _2(i,v){return Hb(i,Qc(bt(v)))}var S2=Mo(function(i,v){return i==null?{}:ZI(i,v)});function Hb(i,v){if(i==null)return{};var M=y(Hd(i),function(z){return[z]});return v=bt(v),O0(i,M,function(z,G){return v(z,G[0])})}function A2(i,v,M){v=ts(v,i);var z=-1,G=v.length;for(G||(G=1,i=n);++z<G;){var ee=i==null?n:i[uo(v[z])];ee===n&&(z=G,ee=M),i=Io(ee)?ee.call(i):ee}return i}function T2(i,v,M){return i==null?i:ll(i,v,M)}function $2(i,v,M,z){return z=typeof z=="function"?z:n,i==null?i:ll(i,v,M,z)}var Ub=nb(yr),Vb=nb(ti);function M2(i,v,M){var z=It(i),G=z||rs(i)||xa(i);if(v=bt(v,4),M==null){var ee=i&&i.constructor;G?M=z?new ee:[]:Dn(i)?M=Io(ee)?va(Sc(i)):{}:M={}}return(G?Cr:lo)(i,function(le,de,ve){return v(M,le,de,ve)}),M}function E2(i,v){return i==null?!0:Dd(i,v)}function I2(i,v,M){return i==null?i:B0(i,v,Pd(M))}function L2(i,v,M,z){return z=typeof z=="function"?z:n,i==null?i:B0(i,v,Pd(M),z)}function Ca(i){return i==null?[]:Mn(i,yr(i))}function R2(i){return i==null?[]:Mn(i,ti(i))}function O2(i,v,M){return M===n&&(M=v,v=n),M!==n&&(M=Ii(M),M=M===M?M:0),v!==n&&(v=Ii(v),v=v===v?v:0),Ns(Ii(i),v,M)}function D2(i,v,M){return v=Lo(v),M===n?(M=v,v=0):M=Lo(M),i=Ii(i),jI(i,v,M)}function N2(i,v,M){if(M&&typeof M!="boolean"&&zr(i,v,M)&&(v=M=n),M===n&&(typeof v=="boolean"?(M=v,v=n):typeof i=="boolean"&&(M=i,i=n)),i===n&&v===n?(i=0,v=1):(i=Lo(i),v===n?(v=i,i=0):v=Lo(v)),i>v){var z=i;i=v,v=z}if(M||i%1||v%1){var G=g0();return Or(i+G*(v-i+He("1e-"+((G+"").length-1))),v)}return Ld(i,v)}var F2=ba(function(i,v,M){return v=v.toLowerCase(),i+(M?qb(v):v)});function qb(i){return sf(un(i).toLowerCase())}function Kb(i){return i=un(i),i&&i.replace(Bn,En).replace(Co,"")}function P2(i,v,M){i=un(i),v=fi(v);var z=i.length;M=M===n?z:Ns(Ft(M),0,z);var G=M;return M-=v.length,M>=0&&i.slice(M,G)==v}function B2(i){return i=un(i),i&&Ga.test(i)?i.replace(go,V):i}function W2(i){return i=un(i),i&&zi.test(i)?i.replace(Mr,"\\$&"):i}var j2=ba(function(i,v,M){return i+(M?"-":"")+v.toLowerCase()}),z2=ba(function(i,v,M){return i+(M?" ":"")+v.toLowerCase()}),H2=X0("toLowerCase");function U2(i,v,M){i=un(i),v=Ft(v);var z=v?Ut(i):0;if(!v||z>=v)return i;var G=(v-z)/2;return zc(Mc(G),M)+i+zc($c(G),M)}function V2(i,v,M){i=un(i),v=Ft(v);var z=v?Ut(i):0;return v&&z<v?i+zc(v-z,M):i}function q2(i,v,M){i=un(i),v=Ft(v);var z=v?Ut(i):0;return v&&z<v?zc(v-z,M)+i:i}function K2(i,v,M){return M||v==null?v=0:v&&(v=+v),eI(un(i).replace(Rn,""),v||0)}function G2(i,v,M){return(M?zr(i,v,M):v===n)?v=1:v=Ft(v),Rd(un(i),v)}function Y2(){var i=arguments,v=un(i[0]);return i.length<3?v:v.replace(i[1],i[2])}var X2=ba(function(i,v,M){return i+(M?"_":"")+v.toLowerCase()});function Q2(i,v,M){return M&&typeof M!="number"&&zr(i,v,M)&&(v=M=n),M=M===n?te:M>>>0,M?(i=un(i),i&&(typeof v=="string"||v!=null&&!nf(v))&&(v=fi(v),!v&&oe(i))?ns(Mt(i),0,M):i.split(v,M)):[]}var Z2=ba(function(i,v,M){return i+(M?" ":"")+sf(v)});function J2(i,v,M){return i=un(i),M=M==null?0:Ns(Ft(M),0,i.length),v=fi(v),i.slice(M,M+v.length)==v}function eD(i,v,M){var z=J.templateSettings;M&&zr(i,v,M)&&(v=n),i=un(i),v=eu({},v,z,rb);var G=eu({},v.imports,z.imports,rb),ee=yr(G),le=Mn(G,ee),de,ve,Ie=0,Le=v.interpolate||bi,Ne="__p += '",Qe=Wr((v.escape||bi).source+"|"+Le.source+"|"+(Le===ks?Ui:bi).source+"|"+(v.evaluate||bi).source+"|$","g"),ct="//# sourceURL="+(dn.call(v,"sourceURL")?(v.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ao+"]")+`
1471
- `;i.replace(Qe,function(xt,Vt,Zt,gi,Hr,mi){return Zt||(Zt=gi),Ne+=i.slice(Ie,mi).replace(Lr,X),Vt&&(de=!0,Ne+=`' +
1470
+ `)}function AL(i){return It(i)||Ws(i)||!!(f0&&i&&i[f0])}function Eo(i,v){var M=typeof i;return v=v??U,!!v&&(M=="number"||M!="symbol"&&Cn.test(i))&&i>-1&&i%1==0&&i<v}function zr(i,v,M){if(!Dn(M))return!1;var z=typeof v;return(z=="number"?ei(M)&&Eo(v,M.length):z=="string"&&v in M)?Gi(M[v],i):!1}function Kd(i,v){if(It(i))return!1;var M=typeof i;return M=="number"||M=="symbol"||M=="boolean"||i==null||gi(i)?!0:ji.test(i)||!aa.test(i)||v!=null&&i in Wt(v)}function TL(i){var v=typeof i;return v=="string"||v=="number"||v=="symbol"||v=="boolean"?i!=="__proto__":i===null}function Gd(i){var v=Vc(i),M=J[v];if(typeof M!="function"||!(v in Yt.prototype))return!1;if(i===M)return!0;var z=Ud(M);return!!z&&i===z[0]}function $L(i){return!!c0&&c0 in i}var ML=Ls?Io:df;function ul(i){var v=i&&i.constructor,M=typeof v=="function"&&v.prototype||Hn;return i===M}function cb(i){return i===i&&!Dn(i)}function ub(i,v){return function(M){return M==null?!1:M[i]===v&&(v!==n||i in Wt(M))}}function EL(i){var v=Qc(i,function(z){return M.size===g&&M.clear(),z}),M=v.cache;return v}function IL(i,v){var M=i[1],z=v[1],G=M|z,ee=G<(m|w|L),le=z==L&&M==E||z==L&&M==R&&i[7].length<=v[8]||z==(L|R)&&v[7].length<=v[8]&&M==E;if(!(ee||le))return i;z&m&&(i[2]=v[2],G|=M&m?0:x);var de=v[3];if(de){var ve=i[3];i[3]=ve?q0(ve,de,v[4]):de,i[4]=ve?ze(i[3],s):v[4]}return de=v[5],de&&(ve=i[5],i[5]=ve?K0(ve,de,v[6]):de,i[6]=ve?ze(i[5],s):v[6]),de=v[7],de&&(i[7]=de),z&L&&(i[8]=i[8]==null?v[8]:Or(i[8],v[8])),i[9]==null&&(i[9]=v[9]),i[0]=v[0],i[1]=G,i}function LL(i){var v=[];if(i!=null)for(var M in Wt(i))v.push(M);return v}function RL(i){return kc.call(i)}function hb(i,v,M){return v=dr(v===n?i.length-1:v,0),function(){for(var z=arguments,G=-1,ee=dr(z.length-v,0),le=xe(ee);++G<ee;)le[G]=z[v+G];G=-1;for(var de=xe(v+1);++G<v;)de[G]=z[G];return de[v]=M(le),pr(i,this,de)}}function db(i,v){return v.length<2?i:Fs(i,Ei(v,0,-1))}function OL(i,v){for(var M=i.length,z=Or(v.length,M),G=Jr(i);z--;){var ee=v[z];i[z]=Eo(ee,M)?G[ee]:n}return i}function Yd(i,v){if(!(v==="constructor"&&typeof i[v]=="function")&&v!="__proto__")return i[v]}var fb=gb(N0),hl=YE||function(i,v){return pn.setTimeout(i,v)},Xd=gb(rL);function pb(i,v,M){var z=v+"";return Xd(i,SL(z,DL(CL(z),M)))}function gb(i){var v=0,M=0;return function(){var z=JE(),G=O-(z-M);if(M=z,G>0){if(++v>=P)return arguments[0]}else v=0;return i.apply(n,arguments)}}function Kc(i,v){var M=-1,z=i.length,G=z-1;for(v=v===n?z:v;++M<v;){var ee=Ld(M,G),le=i[ee];i[ee]=i[M],i[M]=le}return i.length=v,i}var mb=EL(function(i){var v=[];return i.charCodeAt(0)===46&&v.push(""),i.replace(Yn,function(M,z,G,ee){v.push(G?ee.replace(Qa,"$1"):z||M)}),v});function uo(i){if(typeof i=="string"||gi(i))return i;var v=i+"";return v=="0"&&1/i==-1/0?"-0":v}function Bs(i){if(i!=null){try{return Cc.call(i)}catch{}try{return i+""}catch{}}return""}function DL(i,v){return Cr(ae,function(M){var z="_."+M[0];v&M[1]&&!di(i,z)&&i.push(z)}),i.sort()}function vb(i){if(i instanceof Yt)return i.clone();var v=new $i(i.__wrapped__,i.__chain__);return v.__actions__=Jr(i.__actions__),v.__index__=i.__index__,v.__values__=i.__values__,v}function NL(i,v,M){(M?zr(i,v,M):v===n)?v=1:v=dr(Ft(v),0);var z=i==null?0:i.length;if(!z||v<1)return[];for(var G=0,ee=0,le=xe(Mc(z/v));G<z;)le[ee++]=Ei(i,G,G+=v);return le}function FL(i){for(var v=-1,M=i==null?0:i.length,z=0,G=[];++v<M;){var ee=i[v];ee&&(G[z++]=ee)}return G}function PL(){var i=arguments.length;if(!i)return[];for(var v=xe(i-1),M=arguments[0],z=i;z--;)v[z-1]=arguments[z];return $(It(M)?Jr(M):[M],_r(v,1))}var BL=Ht(function(i,v){return Zn(i)?ol(i,_r(v,1,Zn,!0)):[]}),WL=Ht(function(i,v){var M=Ii(v);return Zn(M)&&(M=n),Zn(i)?ol(i,_r(v,1,Zn,!0),bt(M,2)):[]}),jL=Ht(function(i,v){var M=Ii(v);return Zn(M)&&(M=n),Zn(i)?ol(i,_r(v,1,Zn,!0),n,M):[]});function zL(i,v,M){var z=i==null?0:i.length;return z?(v=M||v===n?1:Ft(v),Ei(i,v<0?0:v,z)):[]}function HL(i,v,M){var z=i==null?0:i.length;return z?(v=M||v===n?1:Ft(v),v=z-v,Ei(i,0,v<0?0:v)):[]}function UL(i,v){return i&&i.length?Bc(i,bt(v,3),!0,!0):[]}function VL(i,v){return i&&i.length?Bc(i,bt(v,3),!0):[]}function qL(i,v,M,z){var G=i==null?0:i.length;return G?(M&&typeof M!="number"&&zr(i,v,M)&&(M=0,z=G),PI(i,v,M,z)):[]}function yb(i,v,M){var z=i==null?0:i.length;if(!z)return-1;var G=M==null?0:Ft(M);return G<0&&(G=dr(z+G,0)),re(i,bt(v,3),G)}function bb(i,v,M){var z=i==null?0:i.length;if(!z)return-1;var G=z-1;return M!==n&&(G=Ft(M),G=M<0?dr(z+G,0):Or(G,z-1)),re(i,bt(v,3),G,!0)}function wb(i){var v=i==null?0:i.length;return v?_r(i,1):[]}function KL(i){var v=i==null?0:i.length;return v?_r(i,W):[]}function GL(i,v){var M=i==null?0:i.length;return M?(v=v===n?1:Ft(v),_r(i,v)):[]}function YL(i){for(var v=-1,M=i==null?0:i.length,z={};++v<M;){var G=i[v];z[G[0]]=G[1]}return z}function xb(i){return i&&i.length?i[0]:n}function XL(i,v,M){var z=i==null?0:i.length;if(!z)return-1;var G=M==null?0:Ft(M);return G<0&&(G=dr(z+G,0)),se(i,v,G)}function QL(i){var v=i==null?0:i.length;return v?Ei(i,0,-1):[]}var ZL=Ht(function(i){var v=y(i,Fd);return v.length&&v[0]===i[0]?Td(v):[]}),JL=Ht(function(i){var v=Ii(i),M=y(i,Fd);return v===Ii(M)?v=n:M.pop(),M.length&&M[0]===i[0]?Td(M,bt(v,2)):[]}),eR=Ht(function(i){var v=Ii(i),M=y(i,Fd);return v=typeof v=="function"?v:n,v&&M.pop(),M.length&&M[0]===i[0]?Td(M,n,v):[]});function tR(i,v){return i==null?"":QE.call(i,v)}function Ii(i){var v=i==null?0:i.length;return v?i[v-1]:n}function nR(i,v,M){var z=i==null?0:i.length;if(!z)return-1;var G=z;return M!==n&&(G=Ft(M),G=G<0?dr(z+G,0):Or(G,z-1)),v===v?St(i,v,G):re(i,Ce,G,!0)}function rR(i,v){return i&&i.length?L0(i,Ft(v)):n}var iR=Ht(Cb);function Cb(i,v){return i&&i.length&&v&&v.length?Id(i,v):i}function oR(i,v,M){return i&&i.length&&v&&v.length?Id(i,v,bt(M,2)):i}function sR(i,v,M){return i&&i.length&&v&&v.length?Id(i,v,n,M):i}var aR=Mo(function(i,v){var M=i==null?0:i.length,z=kd(i,v);return D0(i,y(v,function(G){return Eo(G,M)?+G:G}).sort(V0)),z});function lR(i,v){var M=[];if(!(i&&i.length))return M;var z=-1,G=[],ee=i.length;for(v=bt(v,3);++z<ee;){var le=i[z];v(le,z,i)&&(M.push(le),G.push(z))}return D0(i,G),M}function Qd(i){return i==null?i:tI.call(i)}function cR(i,v,M){var z=i==null?0:i.length;return z?(M&&typeof M!="number"&&zr(i,v,M)?(v=0,M=z):(v=v==null?0:Ft(v),M=M===n?z:Ft(M)),Ei(i,v,M)):[]}function uR(i,v){return Pc(i,v)}function hR(i,v,M){return Od(i,v,bt(M,2))}function dR(i,v){var M=i==null?0:i.length;if(M){var z=Pc(i,v);if(z<M&&Gi(i[z],v))return z}return-1}function fR(i,v){return Pc(i,v,!0)}function pR(i,v,M){return Od(i,v,bt(M,2),!0)}function gR(i,v){var M=i==null?0:i.length;if(M){var z=Pc(i,v,!0)-1;if(Gi(i[z],v))return z}return-1}function mR(i){return i&&i.length?F0(i):[]}function vR(i,v){return i&&i.length?F0(i,bt(v,2)):[]}function yR(i){var v=i==null?0:i.length;return v?Ei(i,1,v):[]}function bR(i,v,M){return i&&i.length?(v=M||v===n?1:Ft(v),Ei(i,0,v<0?0:v)):[]}function wR(i,v,M){var z=i==null?0:i.length;return z?(v=M||v===n?1:Ft(v),v=z-v,Ei(i,v<0?0:v,z)):[]}function xR(i,v){return i&&i.length?Bc(i,bt(v,3),!1,!0):[]}function CR(i,v){return i&&i.length?Bc(i,bt(v,3)):[]}var kR=Ht(function(i){return es(_r(i,1,Zn,!0))}),_R=Ht(function(i){var v=Ii(i);return Zn(v)&&(v=n),es(_r(i,1,Zn,!0),bt(v,2))}),SR=Ht(function(i){var v=Ii(i);return v=typeof v=="function"?v:n,es(_r(i,1,Zn,!0),n,v)});function AR(i){return i&&i.length?es(i):[]}function TR(i,v){return i&&i.length?es(i,bt(v,2)):[]}function $R(i,v){return v=typeof v=="function"?v:n,i&&i.length?es(i,n,v):[]}function Zd(i){if(!(i&&i.length))return[];var v=0;return i=Rr(i,function(M){if(Zn(M))return v=dr(M.length,v),!0}),tt(v,function(M){return y(i,be(M))})}function kb(i,v){if(!(i&&i.length))return[];var M=Zd(i);return v==null?M:y(M,function(z){return pr(v,n,z)})}var MR=Ht(function(i,v){return Zn(i)?ol(i,v):[]}),ER=Ht(function(i){return Nd(Rr(i,Zn))}),IR=Ht(function(i){var v=Ii(i);return Zn(v)&&(v=n),Nd(Rr(i,Zn),bt(v,2))}),LR=Ht(function(i){var v=Ii(i);return v=typeof v=="function"?v:n,Nd(Rr(i,Zn),n,v)}),RR=Ht(Zd);function OR(i,v){return j0(i||[],v||[],il)}function DR(i,v){return j0(i||[],v||[],ll)}var NR=Ht(function(i){var v=i.length,M=v>1?i[v-1]:n;return M=typeof M=="function"?(i.pop(),M):n,kb(i,M)});function _b(i){var v=J(i);return v.__chain__=!0,v}function FR(i,v){return v(i),i}function Gc(i,v){return v(i)}var PR=Mo(function(i){var v=i.length,M=v?i[0]:0,z=this.__wrapped__,G=function(ee){return kd(ee,i)};return v>1||this.__actions__.length||!(z instanceof Yt)||!Eo(M)?this.thru(G):(z=z.slice(M,+M+(v?1:0)),z.__actions__.push({func:Gc,args:[G],thisArg:n}),new $i(z,this.__chain__).thru(function(ee){return v&&!ee.length&&ee.push(n),ee}))});function BR(){return _b(this)}function WR(){return new $i(this.value(),this.__chain__)}function jR(){this.__values__===n&&(this.__values__=Pb(this.value()));var i=this.__index__>=this.__values__.length,v=i?n:this.__values__[this.__index__++];return{done:i,value:v}}function zR(){return this}function HR(i){for(var v,M=this;M instanceof Rc;){var z=vb(M);z.__index__=0,z.__values__=n,v?G.__wrapped__=z:v=z;var G=z;M=M.__wrapped__}return G.__wrapped__=i,v}function UR(){var i=this.__wrapped__;if(i instanceof Yt){var v=i;return this.__actions__.length&&(v=new Yt(this)),v=v.reverse(),v.__actions__.push({func:Gc,args:[Qd],thisArg:n}),new $i(v,this.__chain__)}return this.thru(Qd)}function VR(){return W0(this.__wrapped__,this.__actions__)}var qR=Wc(function(i,v,M){fn.call(i,M)?++i[M]:To(i,M,1)});function KR(i,v,M){var z=It(i)?kr:FI;return M&&zr(i,v,M)&&(v=n),z(i,bt(v,3))}function GR(i,v){var M=It(i)?Rr:k0;return M(i,bt(v,3))}var YR=Q0(yb),XR=Q0(bb);function QR(i,v){return _r(Yc(i,v),1)}function ZR(i,v){return _r(Yc(i,v),W)}function JR(i,v,M){return M=M===n?1:Ft(M),_r(Yc(i,v),M)}function Sb(i,v){var M=It(i)?Cr:Jo;return M(i,bt(v,3))}function Ab(i,v){var M=It(i)?Is:C0;return M(i,bt(v,3))}var e2=Wc(function(i,v,M){fn.call(i,M)?i[M].push(v):To(i,M,[v])});function t2(i,v,M,z){i=ei(i)?i:Ca(i),M=M&&!z?Ft(M):0;var G=i.length;return M<0&&(M=dr(G+M,0)),eu(i)?M<=G&&i.indexOf(v,M)>-1:!!G&&se(i,v,M)>-1}var n2=Ht(function(i,v,M){var z=-1,G=typeof v=="function",ee=ei(i)?xe(i.length):[];return Jo(i,function(le){ee[++z]=G?pr(v,le,M):sl(le,v,M)}),ee}),r2=Wc(function(i,v,M){To(i,M,v)});function Yc(i,v){var M=It(i)?y:M0;return M(i,bt(v,3))}function i2(i,v,M,z){return i==null?[]:(It(v)||(v=v==null?[]:[v]),M=z?n:M,It(M)||(M=M==null?[]:[M]),R0(i,v,M))}var o2=Wc(function(i,v,M){i[M?0:1].push(v)},function(){return[[],[]]});function s2(i,v,M){var z=It(i)?_:Re,G=arguments.length<3;return z(i,bt(v,4),M,G,Jo)}function a2(i,v,M){var z=It(i)?N:Re,G=arguments.length<3;return z(i,bt(v,4),M,G,C0)}function l2(i,v){var M=It(i)?Rr:k0;return M(i,Zc(bt(v,3)))}function c2(i){var v=It(i)?y0:tL;return v(i)}function u2(i,v,M){(M?zr(i,v,M):v===n)?v=1:v=Ft(v);var z=It(i)?LI:nL;return z(i,v)}function h2(i){var v=It(i)?RI:iL;return v(i)}function d2(i){if(i==null)return 0;if(ei(i))return eu(i)?Ut(i):i.length;var v=Dr(i);return v==lt||v==Fn?i.size:Md(i).length}function f2(i,v,M){var z=It(i)?B:oL;return M&&zr(i,v,M)&&(v=n),z(i,bt(v,3))}var p2=Ht(function(i,v){if(i==null)return[];var M=v.length;return M>1&&zr(i,v[0],v[1])?v=[]:M>2&&zr(v[0],v[1],v[2])&&(v=[v[0]]),R0(i,_r(v,1),[])}),Xc=GE||function(){return pn.Date.now()};function g2(i,v){if(typeof v!="function")throw new gn(p);return i=Ft(i),function(){if(--i<1)return v.apply(this,arguments)}}function Tb(i,v,M){return v=M?n:v,v=i&&v==null?i.length:v,$o(i,L,n,n,n,n,v)}function $b(i,v){var M;if(typeof v!="function")throw new gn(p);return i=Ft(i),function(){return--i>0&&(M=v.apply(this,arguments)),i<=1&&(v=n),M}}var Jd=Ht(function(i,v,M){var z=m;if(M.length){var G=ze(M,wa(Jd));z|=k}return $o(i,z,v,M,G)}),Mb=Ht(function(i,v,M){var z=m|w;if(M.length){var G=ze(M,wa(Mb));z|=k}return $o(v,z,i,M,G)});function Eb(i,v,M){v=M?n:v;var z=$o(i,E,n,n,n,n,n,v);return z.placeholder=Eb.placeholder,z}function Ib(i,v,M){v=M?n:v;var z=$o(i,T,n,n,n,n,n,v);return z.placeholder=Ib.placeholder,z}function Lb(i,v,M){var z,G,ee,le,de,ve,Ie=0,Le=!1,Ne=!1,Qe=!0;if(typeof i!="function")throw new gn(p);v=Li(v)||0,Dn(M)&&(Le=!!M.leading,Ne="maxWait"in M,ee=Ne?dr(Li(M.maxWait)||0,v):ee,Qe="trailing"in M?!!M.trailing:Qe);function ct(Jn){var Yi=z,Ro=G;return z=G=n,Ie=Jn,le=i.apply(Ro,Yi),le}function wt(Jn){return Ie=Jn,de=hl(Vt,v),Le?ct(Jn):le}function jt(Jn){var Yi=Jn-ve,Ro=Jn-Ie,Qb=v-Yi;return Ne?Or(Qb,ee-Ro):Qb}function xt(Jn){var Yi=Jn-ve,Ro=Jn-Ie;return ve===n||Yi>=v||Yi<0||Ne&&Ro>=ee}function Vt(){var Jn=Xc();if(xt(Jn))return Zt(Jn);de=hl(Vt,jt(Jn))}function Zt(Jn){return de=n,Qe&&z?ct(Jn):(z=G=n,le)}function mi(){de!==n&&z0(de),Ie=0,z=ve=G=de=n}function Hr(){return de===n?le:Zt(Xc())}function vi(){var Jn=Xc(),Yi=xt(Jn);if(z=arguments,G=this,ve=Jn,Yi){if(de===n)return wt(ve);if(Ne)return z0(de),de=hl(Vt,v),ct(ve)}return de===n&&(de=hl(Vt,v)),le}return vi.cancel=mi,vi.flush=Hr,vi}var m2=Ht(function(i,v){return x0(i,1,v)}),v2=Ht(function(i,v,M){return x0(i,Li(v)||0,M)});function y2(i){return $o(i,F)}function Qc(i,v){if(typeof i!="function"||v!=null&&typeof v!="function")throw new gn(p);var M=function(){var z=arguments,G=v?v.apply(this,z):z[0],ee=M.cache;if(ee.has(G))return ee.get(G);var le=i.apply(this,z);return M.cache=ee.set(G,le)||ee,le};return M.cache=new(Qc.Cache||Ao),M}Qc.Cache=Ao;function Zc(i){if(typeof i!="function")throw new gn(p);return function(){var v=arguments;switch(v.length){case 0:return!i.call(this);case 1:return!i.call(this,v[0]);case 2:return!i.call(this,v[0],v[1]);case 3:return!i.call(this,v[0],v[1],v[2])}return!i.apply(this,v)}}function b2(i){return $b(2,i)}var w2=sL(function(i,v){v=v.length==1&&It(v[0])?y(v[0],dt(bt())):y(_r(v,1),dt(bt()));var M=v.length;return Ht(function(z){for(var G=-1,ee=Or(z.length,M);++G<ee;)z[G]=v[G].call(this,z[G]);return pr(i,this,z)})}),ef=Ht(function(i,v){var M=ze(v,wa(ef));return $o(i,k,n,v,M)}),Rb=Ht(function(i,v){var M=ze(v,wa(Rb));return $o(i,C,n,v,M)}),x2=Mo(function(i,v){return $o(i,R,n,n,n,v)});function C2(i,v){if(typeof i!="function")throw new gn(p);return v=v===n?v:Ft(v),Ht(i,v)}function k2(i,v){if(typeof i!="function")throw new gn(p);return v=v==null?0:dr(Ft(v),0),Ht(function(M){var z=M[v],G=ns(M,0,v);return z&&$(G,z),pr(i,this,G)})}function _2(i,v,M){var z=!0,G=!0;if(typeof i!="function")throw new gn(p);return Dn(M)&&(z="leading"in M?!!M.leading:z,G="trailing"in M?!!M.trailing:G),Lb(i,v,{leading:z,maxWait:v,trailing:G})}function S2(i){return Tb(i,1)}function A2(i,v){return ef(Pd(v),i)}function T2(){if(!arguments.length)return[];var i=arguments[0];return It(i)?i:[i]}function $2(i){return Mi(i,l)}function M2(i,v){return v=typeof v=="function"?v:n,Mi(i,l,v)}function E2(i){return Mi(i,a|l)}function I2(i,v){return v=typeof v=="function"?v:n,Mi(i,a|l,v)}function L2(i,v){return v==null||w0(i,v,yr(v))}function Gi(i,v){return i===v||i!==i&&v!==v}var R2=Uc(Ad),O2=Uc(function(i,v){return i>=v}),Ws=A0(function(){return arguments}())?A0:function(i){return Un(i)&&fn.call(i,"callee")&&!d0.call(i,"callee")},It=xe.isArray,D2=Zr?dt(Zr):HI;function ei(i){return i!=null&&Jc(i.length)&&!Io(i)}function Zn(i){return Un(i)&&ei(i)}function N2(i){return i===!0||i===!1||Un(i)&&jr(i)==Te}var rs=XE||df,F2=Qo?dt(Qo):UI;function P2(i){return Un(i)&&i.nodeType===1&&!dl(i)}function B2(i){if(i==null)return!0;if(ei(i)&&(It(i)||typeof i=="string"||typeof i.splice=="function"||rs(i)||xa(i)||Ws(i)))return!i.length;var v=Dr(i);if(v==lt||v==Fn)return!i.size;if(ul(i))return!Md(i).length;for(var M in i)if(fn.call(i,M))return!1;return!0}function W2(i,v){return al(i,v)}function j2(i,v,M){M=typeof M=="function"?M:n;var z=M?M(i,v):n;return z===n?al(i,v,n,M):!!z}function tf(i){if(!Un(i))return!1;var v=jr(i);return v==Ze||v==Ee||typeof i.message=="string"&&typeof i.name=="string"&&!dl(i)}function z2(i){return typeof i=="number"&&p0(i)}function Io(i){if(!Dn(i))return!1;var v=jr(i);return v==Xe||v==gt||v==ge||v==wr}function Ob(i){return typeof i=="number"&&i==Ft(i)}function Jc(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=U}function Dn(i){var v=typeof i;return i!=null&&(v=="object"||v=="function")}function Un(i){return i!=null&&typeof i=="object"}var Db=zn?dt(zn):qI;function H2(i,v){return i===v||$d(i,v,Vd(v))}function U2(i,v,M){return M=typeof M=="function"?M:n,$d(i,v,Vd(v),M)}function V2(i){return Nb(i)&&i!=+i}function q2(i){if(ML(i))throw new ft(d);return T0(i)}function K2(i){return i===null}function G2(i){return i==null}function Nb(i){return typeof i=="number"||Un(i)&&jr(i)==mt}function dl(i){if(!Un(i)||jr(i)!=wn)return!1;var v=Ac(i);if(v===null)return!0;var M=fn.call(v,"constructor")&&v.constructor;return typeof M=="function"&&M instanceof M&&Cc.call(M)==UE}var nf=ui?dt(ui):KI;function Y2(i){return Ob(i)&&i>=-9007199254740991&&i<=U}var Fb=hi?dt(hi):GI;function eu(i){return typeof i=="string"||!It(i)&&Un(i)&&jr(i)==Pn}function gi(i){return typeof i=="symbol"||Un(i)&&jr(i)==nr}var xa=Ai?dt(Ai):YI;function X2(i){return i===n}function Q2(i){return Un(i)&&Dr(i)==Ke}function Z2(i){return Un(i)&&jr(i)==ke}var J2=Uc(Ed),eO=Uc(function(i,v){return i<=v});function Pb(i){if(!i)return[];if(ei(i))return eu(i)?Mt(i):Jr(i);if(Ja&&i[Ja])return we(i[Ja]());var v=Dr(i),M=v==lt?Me:v==Fn?Ye:Ca;return M(i)}function Lo(i){if(!i)return i===0?i:0;if(i=Li(i),i===W||i===-1/0){var v=i<0?-1:1;return v*K}return i===i?i:0}function Ft(i){var v=Lo(i),M=v%1;return v===v?M?v-M:v:0}function Bb(i){return i?Ns(Ft(i),0,te):0}function Li(i){if(typeof i=="number")return i;if(gi(i))return Z;if(Dn(i)){var v=typeof i.valueOf=="function"?i.valueOf():i;i=Dn(v)?v+"":v}if(typeof i!="string")return i===0?i:+i;i=_n(i);var M=ca.test(i);return M||Xn.test(i)?kn(i.slice(2),M?2:8):Kt.test(i)?Z:+i}function Wb(i){return co(i,ti(i))}function tO(i){return i?Ns(Ft(i),-9007199254740991,U):i===0?i:0}function un(i){return i==null?"":pi(i)}var nO=ya(function(i,v){if(ul(v)||ei(v)){co(v,yr(v),i);return}for(var M in v)fn.call(v,M)&&il(i,M,v[M])}),jb=ya(function(i,v){co(v,ti(v),i)}),tu=ya(function(i,v,M,z){co(v,ti(v),i,z)}),rO=ya(function(i,v,M,z){co(v,yr(v),i,z)}),iO=Mo(kd);function oO(i,v){var M=va(i);return v==null?M:b0(M,v)}var sO=Ht(function(i,v){i=Wt(i);var M=-1,z=v.length,G=z>2?v[2]:n;for(G&&zr(v[0],v[1],G)&&(z=1);++M<z;)for(var ee=v[M],le=ti(ee),de=-1,ve=le.length;++de<ve;){var Ie=le[de],Le=i[Ie];(Le===n||Gi(Le,Hn[Ie])&&!fn.call(i,Ie))&&(i[Ie]=ee[Ie])}return i}),aO=Ht(function(i){return i.push(n,ib),pr(zb,n,i)});function lO(i,v){return Q(i,bt(v,3),lo)}function cO(i,v){return Q(i,bt(v,3),Sd)}function uO(i,v){return i==null?i:_d(i,bt(v,3),ti)}function hO(i,v){return i==null?i:_0(i,bt(v,3),ti)}function dO(i,v){return i&&lo(i,bt(v,3))}function fO(i,v){return i&&Sd(i,bt(v,3))}function pO(i){return i==null?[]:Nc(i,yr(i))}function gO(i){return i==null?[]:Nc(i,ti(i))}function rf(i,v,M){var z=i==null?n:Fs(i,v);return z===n?M:z}function mO(i,v){return i!=null&&ab(i,v,BI)}function of(i,v){return i!=null&&ab(i,v,WI)}var vO=J0(function(i,v,M){v!=null&&typeof v.toString!="function"&&(v=kc.call(v)),i[v]=M},af(ni)),yO=J0(function(i,v,M){v!=null&&typeof v.toString!="function"&&(v=kc.call(v)),fn.call(i,v)?i[v].push(M):i[v]=[M]},bt),bO=Ht(sl);function yr(i){return ei(i)?v0(i):Md(i)}function ti(i){return ei(i)?v0(i,!0):XI(i)}function wO(i,v){var M={};return v=bt(v,3),lo(i,function(z,G,ee){To(M,v(z,G,ee),z)}),M}function xO(i,v){var M={};return v=bt(v,3),lo(i,function(z,G,ee){To(M,G,v(z,G,ee))}),M}var CO=ya(function(i,v,M){Fc(i,v,M)}),zb=ya(function(i,v,M,z){Fc(i,v,M,z)}),kO=Mo(function(i,v){var M={};if(i==null)return M;var z=!1;v=y(v,function(ee){return ee=ts(ee,i),z||(z=ee.length>1),ee}),co(i,Hd(i),M),z&&(M=Mi(M,a|c|l,vL));for(var G=v.length;G--;)Dd(M,v[G]);return M});function _O(i,v){return Hb(i,Zc(bt(v)))}var SO=Mo(function(i,v){return i==null?{}:ZI(i,v)});function Hb(i,v){if(i==null)return{};var M=y(Hd(i),function(z){return[z]});return v=bt(v),O0(i,M,function(z,G){return v(z,G[0])})}function AO(i,v,M){v=ts(v,i);var z=-1,G=v.length;for(G||(G=1,i=n);++z<G;){var ee=i==null?n:i[uo(v[z])];ee===n&&(z=G,ee=M),i=Io(ee)?ee.call(i):ee}return i}function TO(i,v,M){return i==null?i:ll(i,v,M)}function $O(i,v,M,z){return z=typeof z=="function"?z:n,i==null?i:ll(i,v,M,z)}var Ub=nb(yr),Vb=nb(ti);function MO(i,v,M){var z=It(i),G=z||rs(i)||xa(i);if(v=bt(v,4),M==null){var ee=i&&i.constructor;G?M=z?new ee:[]:Dn(i)?M=Io(ee)?va(Ac(i)):{}:M={}}return(G?Cr:lo)(i,function(le,de,ve){return v(M,le,de,ve)}),M}function EO(i,v){return i==null?!0:Dd(i,v)}function IO(i,v,M){return i==null?i:B0(i,v,Pd(M))}function LO(i,v,M,z){return z=typeof z=="function"?z:n,i==null?i:B0(i,v,Pd(M),z)}function Ca(i){return i==null?[]:Mn(i,yr(i))}function RO(i){return i==null?[]:Mn(i,ti(i))}function OO(i,v,M){return M===n&&(M=v,v=n),M!==n&&(M=Li(M),M=M===M?M:0),v!==n&&(v=Li(v),v=v===v?v:0),Ns(Li(i),v,M)}function DO(i,v,M){return v=Lo(v),M===n?(M=v,v=0):M=Lo(M),i=Li(i),jI(i,v,M)}function NO(i,v,M){if(M&&typeof M!="boolean"&&zr(i,v,M)&&(v=M=n),M===n&&(typeof v=="boolean"?(M=v,v=n):typeof i=="boolean"&&(M=i,i=n)),i===n&&v===n?(i=0,v=1):(i=Lo(i),v===n?(v=i,i=0):v=Lo(v)),i>v){var z=i;i=v,v=z}if(M||i%1||v%1){var G=g0();return Or(i+G*(v-i+He("1e-"+((G+"").length-1))),v)}return Ld(i,v)}var FO=ba(function(i,v,M){return v=v.toLowerCase(),i+(M?qb(v):v)});function qb(i){return sf(un(i).toLowerCase())}function Kb(i){return i=un(i),i&&i.replace(Bn,En).replace(Co,"")}function PO(i,v,M){i=un(i),v=pi(v);var z=i.length;M=M===n?z:Ns(Ft(M),0,z);var G=M;return M-=v.length,M>=0&&i.slice(M,G)==v}function BO(i){return i=un(i),i&&Ga.test(i)?i.replace(go,V):i}function WO(i){return i=un(i),i&&zi.test(i)?i.replace(Mr,"\\$&"):i}var jO=ba(function(i,v,M){return i+(M?"-":"")+v.toLowerCase()}),zO=ba(function(i,v,M){return i+(M?" ":"")+v.toLowerCase()}),HO=X0("toLowerCase");function UO(i,v,M){i=un(i),v=Ft(v);var z=v?Ut(i):0;if(!v||z>=v)return i;var G=(v-z)/2;return Hc(Ec(G),M)+i+Hc(Mc(G),M)}function VO(i,v,M){i=un(i),v=Ft(v);var z=v?Ut(i):0;return v&&z<v?i+Hc(v-z,M):i}function qO(i,v,M){i=un(i),v=Ft(v);var z=v?Ut(i):0;return v&&z<v?Hc(v-z,M)+i:i}function KO(i,v,M){return M||v==null?v=0:v&&(v=+v),eI(un(i).replace(Rn,""),v||0)}function GO(i,v,M){return(M?zr(i,v,M):v===n)?v=1:v=Ft(v),Rd(un(i),v)}function YO(){var i=arguments,v=un(i[0]);return i.length<3?v:v.replace(i[1],i[2])}var XO=ba(function(i,v,M){return i+(M?"_":"")+v.toLowerCase()});function QO(i,v,M){return M&&typeof M!="number"&&zr(i,v,M)&&(v=M=n),M=M===n?te:M>>>0,M?(i=un(i),i&&(typeof v=="string"||v!=null&&!nf(v))&&(v=pi(v),!v&&oe(i))?ns(Mt(i),0,M):i.split(v,M)):[]}var ZO=ba(function(i,v,M){return i+(M?" ":"")+sf(v)});function JO(i,v,M){return i=un(i),M=M==null?0:Ns(Ft(M),0,i.length),v=pi(v),i.slice(M,M+v.length)==v}function eD(i,v,M){var z=J.templateSettings;M&&zr(i,v,M)&&(v=n),i=un(i),v=tu({},v,z,rb);var G=tu({},v.imports,z.imports,rb),ee=yr(G),le=Mn(G,ee),de,ve,Ie=0,Le=v.interpolate||wi,Ne="__p += '",Qe=Wr((v.escape||wi).source+"|"+Le.source+"|"+(Le===ks?Ui:wi).source+"|"+(v.evaluate||wi).source+"|$","g"),ct="//# sourceURL="+(fn.call(v,"sourceURL")?(v.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ao+"]")+`
1471
+ `;i.replace(Qe,function(xt,Vt,Zt,mi,Hr,vi){return Zt||(Zt=mi),Ne+=i.slice(Ie,vi).replace(Lr,X),Vt&&(de=!0,Ne+=`' +
1472
1472
  __e(`+Vt+`) +
1473
1473
  '`),Hr&&(ve=!0,Ne+=`';
1474
1474
  `+Hr+`;
1475
1475
  __p += '`),Zt&&(Ne+=`' +
1476
1476
  ((__t = (`+Zt+`)) == null ? '' : __t) +
1477
- '`),Ie=mi+xt.length,xt}),Ne+=`';
1478
- `;var wt=dn.call(v,"variable")&&v.variable;if(!wt)Ne=`with (obj) {
1477
+ '`),Ie=vi+xt.length,xt}),Ne+=`';
1478
+ `;var wt=fn.call(v,"variable")&&v.variable;if(!wt)Ne=`with (obj) {
1479
1479
  `+Ne+`
1480
1480
  }
1481
1481
  `;else if(Xa.test(wt))throw new ft(b);Ne=(ve?Ne.replace(Yr,""):Ne).replace(Wi,"$1").replace(po,"$1;"),Ne="function("+(wt||"obj")+`) {
@@ -1484,29 +1484,29 @@ __p += '`),Zt&&(Ne+=`' +
1484
1484
  function print() { __p += __j.call(arguments, '') }
1485
1485
  `:`;
1486
1486
  `)+Ne+`return __p
1487
- }`;var Wt=Yb(function(){return Dt(ee,ct+"return "+Ne).apply(n,le)});if(Wt.source=Ne,tf(Wt))throw Wt;return Wt}function tD(i){return un(i).toLowerCase()}function nD(i){return un(i).toUpperCase()}function rD(i,v,M){if(i=un(i),i&&(M||v===n))return kn(i);if(!i||!(v=fi(v)))return i;var z=Mt(i),G=Mt(v),ee=Ot(z,G),le=ir(z,G)+1;return ns(z,ee,le).join("")}function iD(i,v,M){if(i=un(i),i&&(M||v===n))return i.slice(0,jt(i)+1);if(!i||!(v=fi(v)))return i;var z=Mt(i),G=ir(z,Mt(v))+1;return ns(z,0,G).join("")}function oD(i,v,M){if(i=un(i),i&&(M||v===n))return i.replace(Rn,"");if(!i||!(v=fi(v)))return i;var z=Mt(i),G=Ot(z,Mt(v));return ns(z,G).join("")}function sD(i,v){var M=I,z=H;if(Dn(v)){var G="separator"in v?v.separator:G;M="length"in v?Ft(v.length):M,z="omission"in v?fi(v.omission):z}i=un(i);var ee=i.length;if(oe(i)){var le=Mt(i);ee=le.length}if(M>=ee)return i;var de=M-Ut(z);if(de<1)return z;var ve=le?ns(le,0,de).join(""):i.slice(0,de);if(G===n)return ve+z;if(le&&(de+=ve.length-de),nf(G)){if(i.slice(de).search(G)){var Ie,Le=ve;for(G.global||(G=Wr(G.source,un(ai.exec(G))+"g")),G.lastIndex=0;Ie=G.exec(Le);)var Ne=Ie.index;ve=ve.slice(0,Ne===n?de:Ne)}}else if(i.indexOf(fi(G),de)!=de){var Qe=ve.lastIndexOf(G);Qe>-1&&(ve=ve.slice(0,Qe))}return ve+z}function aD(i){return i=un(i),i&&Wo.test(i)?i.replace(xr,yt):i}var lD=ba(function(i,v,M){return i+(M?" ":"")+v.toUpperCase()}),sf=X0("toUpperCase");function Gb(i,v,M){return i=un(i),v=M?n:v,v===n?pe(i)?In(i):Y(i):i.match(v)||[]}var Yb=zt(function(i,v){try{return pr(i,n,v)}catch(M){return tf(M)?M:new ft(M)}}),cD=Mo(function(i,v){return Cr(v,function(M){M=uo(M),To(i,M,Jd(i[M],i))}),i});function uD(i){var v=i==null?0:i.length,M=bt();return i=v?y(i,function(z){if(typeof z[1]!="function")throw new pn(p);return[M(z[0]),z[1]]}):[],zt(function(z){for(var G=-1;++G<v;){var ee=i[G];if(pr(ee[0],this,z))return pr(ee[1],this,z)}})}function hD(i){return NI($i(i,a))}function af(i){return function(){return i}}function dD(i,v){return i==null||i!==i?v:i}var fD=Z0(),pD=Z0(!0);function ni(i){return i}function lf(i){return $0(typeof i=="function"?i:$i(i,a))}function gD(i){return E0($i(i,a))}function mD(i,v){return I0(i,$i(v,a))}var vD=zt(function(i,v){return function(M){return sl(M,i,v)}}),yD=zt(function(i,v){return function(M){return sl(i,M,v)}});function cf(i,v,M){var z=yr(v),G=Dc(v,z);M==null&&!(Dn(v)&&(G.length||!z.length))&&(M=v,v=i,i=this,G=Dc(v,yr(v)));var ee=!(Dn(M)&&"chain"in M)||!!M.chain,le=Io(i);return Cr(G,function(de){var ve=v[de];i[de]=ve,le&&(i.prototype[de]=function(){var Ie=this.__chain__;if(ee||Ie){var Le=i(this.__wrapped__),Ne=Le.__actions__=Jr(this.__actions__);return Ne.push({func:ve,args:arguments,thisArg:i}),Le.__chain__=Ie,Le}return ve.apply(i,$([this.value()],arguments))})}),i}function bD(){return fn._===this&&(fn._=VE),this}function uf(){}function wD(i){return i=Ft(i),zt(function(v){return L0(v,i)})}var xD=Wd(y),CD=Wd(kr),kD=Wd(B);function Xb(i){return Kd(i)?be(uo(i)):JI(i)}function _D(i){return function(v){return i==null?n:Fs(i,v)}}var SD=eb(),AD=eb(!0);function hf(){return[]}function df(){return!1}function TD(){return{}}function $D(){return""}function MD(){return!0}function ED(i,v){if(i=Ft(i),i<1||i>U)return[];var M=te,z=Or(i,te);v=bt(v),i-=te;for(var G=tt(z,v);++M<i;)v(M);return G}function ID(i){return It(i)?y(i,uo):pi(i)?[i]:Jr(mb(un(i)))}function LD(i){var v=++HE;return un(i)+v}var RD=jc(function(i,v){return i+v},0),OD=jd("ceil"),DD=jc(function(i,v){return i/v},1),ND=jd("floor");function FD(i){return i&&i.length?Oc(i,ni,Ad):n}function PD(i,v){return i&&i.length?Oc(i,bt(v,2),Ad):n}function BD(i){return me(i,ni)}function WD(i,v){return me(i,bt(v,2))}function jD(i){return i&&i.length?Oc(i,ni,Ed):n}function zD(i,v){return i&&i.length?Oc(i,bt(v,2),Ed):n}var HD=jc(function(i,v){return i*v},1),UD=jd("round"),VD=jc(function(i,v){return i-v},0);function qD(i){return i&&i.length?ht(i,ni):0}function KD(i,v){return i&&i.length?ht(i,bt(v,2)):0}return J.after=gO,J.ary=Tb,J.assign=n2,J.assignIn=jb,J.assignInWith=eu,J.assignWith=r2,J.at=i2,J.before=$b,J.bind=Jd,J.bindAll=cD,J.bindKey=Mb,J.castArray=TO,J.chain=_b,J.chunk=NL,J.compact=FL,J.concat=PL,J.cond=uD,J.conforms=hD,J.constant=af,J.countBy=qR,J.create=o2,J.curry=Eb,J.curryRight=Ib,J.debounce=Lb,J.defaults=s2,J.defaultsDeep=a2,J.defer=mO,J.delay=vO,J.difference=BL,J.differenceBy=WL,J.differenceWith=jL,J.drop=zL,J.dropRight=HL,J.dropRightWhile=UL,J.dropWhile=VL,J.fill=qL,J.filter=GR,J.flatMap=QR,J.flatMapDeep=ZR,J.flatMapDepth=JR,J.flatten=wb,J.flattenDeep=KL,J.flattenDepth=GL,J.flip=yO,J.flow=fD,J.flowRight=pD,J.fromPairs=YL,J.functions=p2,J.functionsIn=g2,J.groupBy=eO,J.initial=QL,J.intersection=ZL,J.intersectionBy=JL,J.intersectionWith=eR,J.invert=v2,J.invertBy=y2,J.invokeMap=nO,J.iteratee=lf,J.keyBy=rO,J.keys=yr,J.keysIn=ti,J.map=Gc,J.mapKeys=w2,J.mapValues=x2,J.matches=gD,J.matchesProperty=mD,J.memoize=Xc,J.merge=C2,J.mergeWith=zb,J.method=vD,J.methodOf=yD,J.mixin=cf,J.negate=Qc,J.nthArg=wD,J.omit=k2,J.omitBy=_2,J.once=bO,J.orderBy=iO,J.over=xD,J.overArgs=wO,J.overEvery=CD,J.overSome=kD,J.partial=ef,J.partialRight=Rb,J.partition=oO,J.pick=S2,J.pickBy=Hb,J.property=Xb,J.propertyOf=_D,J.pull=iR,J.pullAll=Cb,J.pullAllBy=oR,J.pullAllWith=sR,J.pullAt=aR,J.range=SD,J.rangeRight=AD,J.rearg=xO,J.reject=lO,J.remove=lR,J.rest=CO,J.reverse=Qd,J.sampleSize=uO,J.set=T2,J.setWith=$2,J.shuffle=hO,J.slice=cR,J.sortBy=pO,J.sortedUniq=mR,J.sortedUniqBy=vR,J.split=Q2,J.spread=kO,J.tail=yR,J.take=bR,J.takeRight=wR,J.takeRightWhile=xR,J.takeWhile=CR,J.tap=FR,J.throttle=_O,J.thru=Kc,J.toArray=Pb,J.toPairs=Ub,J.toPairsIn=Vb,J.toPath=ID,J.toPlainObject=Wb,J.transform=M2,J.unary=SO,J.union=kR,J.unionBy=_R,J.unionWith=SR,J.uniq=AR,J.uniqBy=TR,J.uniqWith=$R,J.unset=E2,J.unzip=Zd,J.unzipWith=kb,J.update=I2,J.updateWith=L2,J.values=Ca,J.valuesIn=R2,J.without=MR,J.words=Gb,J.wrap=AO,J.xor=ER,J.xorBy=IR,J.xorWith=LR,J.zip=RR,J.zipObject=OR,J.zipObjectDeep=DR,J.zipWith=NR,J.entries=Ub,J.entriesIn=Vb,J.extend=jb,J.extendWith=eu,cf(J,J),J.add=RD,J.attempt=Yb,J.camelCase=F2,J.capitalize=qb,J.ceil=OD,J.clamp=O2,J.clone=$O,J.cloneDeep=EO,J.cloneDeepWith=IO,J.cloneWith=MO,J.conformsTo=LO,J.deburr=Kb,J.defaultTo=dD,J.divide=DD,J.endsWith=P2,J.eq=Gi,J.escape=B2,J.escapeRegExp=W2,J.every=KR,J.find=YR,J.findIndex=yb,J.findKey=l2,J.findLast=XR,J.findLastIndex=bb,J.findLastKey=c2,J.floor=ND,J.forEach=Sb,J.forEachRight=Ab,J.forIn=u2,J.forInRight=h2,J.forOwn=d2,J.forOwnRight=f2,J.get=rf,J.gt=RO,J.gte=OO,J.has=m2,J.hasIn=of,J.head=xb,J.identity=ni,J.includes=tO,J.indexOf=XL,J.inRange=D2,J.invoke=b2,J.isArguments=Ws,J.isArray=It,J.isArrayBuffer=DO,J.isArrayLike=ei,J.isArrayLikeObject=Zn,J.isBoolean=NO,J.isBuffer=rs,J.isDate=FO,J.isElement=PO,J.isEmpty=BO,J.isEqual=WO,J.isEqualWith=jO,J.isError=tf,J.isFinite=zO,J.isFunction=Io,J.isInteger=Ob,J.isLength=Zc,J.isMap=Db,J.isMatch=HO,J.isMatchWith=UO,J.isNaN=VO,J.isNative=qO,J.isNil=GO,J.isNull=KO,J.isNumber=Nb,J.isObject=Dn,J.isObjectLike=Un,J.isPlainObject=dl,J.isRegExp=nf,J.isSafeInteger=YO,J.isSet=Fb,J.isString=Jc,J.isSymbol=pi,J.isTypedArray=xa,J.isUndefined=XO,J.isWeakMap=QO,J.isWeakSet=ZO,J.join=tR,J.kebabCase=j2,J.last=Ei,J.lastIndexOf=nR,J.lowerCase=z2,J.lowerFirst=H2,J.lt=JO,J.lte=e2,J.max=FD,J.maxBy=PD,J.mean=BD,J.meanBy=WD,J.min=jD,J.minBy=zD,J.stubArray=hf,J.stubFalse=df,J.stubObject=TD,J.stubString=$D,J.stubTrue=MD,J.multiply=HD,J.nth=rR,J.noConflict=bD,J.noop=uf,J.now=Yc,J.pad=U2,J.padEnd=V2,J.padStart=q2,J.parseInt=K2,J.random=N2,J.reduce=sO,J.reduceRight=aO,J.repeat=G2,J.replace=Y2,J.result=A2,J.round=UD,J.runInContext=fe,J.sample=cO,J.size=dO,J.snakeCase=X2,J.some=fO,J.sortedIndex=uR,J.sortedIndexBy=hR,J.sortedIndexOf=dR,J.sortedLastIndex=fR,J.sortedLastIndexBy=pR,J.sortedLastIndexOf=gR,J.startCase=Z2,J.startsWith=J2,J.subtract=VD,J.sum=qD,J.sumBy=KD,J.template=eD,J.times=ED,J.toFinite=Lo,J.toInteger=Ft,J.toLength=Bb,J.toLower=tD,J.toNumber=Ii,J.toSafeInteger=t2,J.toString=un,J.toUpper=nD,J.trim=rD,J.trimEnd=iD,J.trimStart=oD,J.truncate=sD,J.unescape=aD,J.uniqueId=LD,J.upperCase=lD,J.upperFirst=sf,J.each=Sb,J.eachRight=Ab,J.first=xb,cf(J,function(){var i={};return lo(J,function(v,M){dn.call(J.prototype,M)||(i[M]=v)}),i}(),{chain:!1}),J.VERSION=r,Cr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){J[i].placeholder=J}),Cr(["drop","take"],function(i,v){Yt.prototype[i]=function(M){M=M===n?1:dr(Ft(M),0);var z=this.__filtered__&&!v?new Yt(this):this.clone();return z.__filtered__?z.__takeCount__=Or(M,z.__takeCount__):z.__views__.push({size:Or(M,te),type:i+(z.__dir__<0?"Right":"")}),z},Yt.prototype[i+"Right"]=function(M){return this.reverse()[i](M).reverse()}}),Cr(["filter","map","takeWhile"],function(i,v){var M=v+1,z=M==A||M==D;Yt.prototype[i]=function(G){var ee=this.clone();return ee.__iteratees__.push({iteratee:bt(G,3),type:M}),ee.__filtered__=ee.__filtered__||z,ee}}),Cr(["head","last"],function(i,v){var M="take"+(v?"Right":"");Yt.prototype[i]=function(){return this[M](1).value()[0]}}),Cr(["initial","tail"],function(i,v){var M="drop"+(v?"":"Right");Yt.prototype[i]=function(){return this.__filtered__?new Yt(this):this[M](1)}}),Yt.prototype.compact=function(){return this.filter(ni)},Yt.prototype.find=function(i){return this.filter(i).head()},Yt.prototype.findLast=function(i){return this.reverse().find(i)},Yt.prototype.invokeMap=zt(function(i,v){return typeof i=="function"?new Yt(this):this.map(function(M){return sl(M,i,v)})}),Yt.prototype.reject=function(i){return this.filter(Qc(bt(i)))},Yt.prototype.slice=function(i,v){i=Ft(i);var M=this;return M.__filtered__&&(i>0||v<0)?new Yt(M):(i<0?M=M.takeRight(-i):i&&(M=M.drop(i)),v!==n&&(v=Ft(v),M=v<0?M.dropRight(-v):M.take(v-i)),M)},Yt.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},Yt.prototype.toArray=function(){return this.take(te)},lo(Yt.prototype,function(i,v){var M=/^(?:filter|find|map|reject)|While$/.test(v),z=/^(?:head|last)$/.test(v),G=J[z?"take"+(v=="last"?"Right":""):v],ee=z||/^find/.test(v);G&&(J.prototype[v]=function(){var le=this.__wrapped__,de=z?[1]:arguments,ve=le instanceof Yt,Ie=de[0],Le=ve||It(le),Ne=function(Vt){var Zt=G.apply(J,$([Vt],de));return z&&Qe?Zt[0]:Zt};Le&&M&&typeof Ie=="function"&&Ie.length!=1&&(ve=Le=!1);var Qe=this.__chain__,ct=!!this.__actions__.length,wt=ee&&!Qe,Wt=ve&&!ct;if(!ee&&Le){le=Wt?le:new Yt(this);var xt=i.apply(le,de);return xt.__actions__.push({func:Kc,args:[Ne],thisArg:n}),new Ti(xt,Qe)}return wt&&Wt?i.apply(this,de):(xt=this.thru(Ne),wt?z?xt.value()[0]:xt.value():xt)})}),Cr(["pop","push","shift","sort","splice","unshift"],function(i){var v=vr[i],M=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",z=/^(?:pop|shift)$/.test(i);J.prototype[i]=function(){var G=arguments;if(z&&!this.__chain__){var ee=this.value();return v.apply(It(ee)?ee:[],G)}return this[M](function(le){return v.apply(It(le)?le:[],G)})}}),lo(Yt.prototype,function(i,v){var M=J[v];if(M){var z=M.name+"";dn.call(ma,z)||(ma[z]=[]),ma[z].push({name:v,func:M})}}),ma[Wc(n,w).name]=[{name:"wrapper",func:n}],Yt.prototype.clone=aI,Yt.prototype.reverse=lI,Yt.prototype.value=cI,J.prototype.at=PR,J.prototype.chain=BR,J.prototype.commit=WR,J.prototype.next=jR,J.prototype.plant=HR,J.prototype.reverse=UR,J.prototype.toJSON=J.prototype.valueOf=J.prototype.value=VR,J.prototype.first=J.prototype.head,Ja&&(J.prototype[Ja]=zR),J},Qt=or();rr?((rr.exports=Qt)._=Qt,An._=Qt):fn._=Qt}).call(xk)}(Dl,Dl.exports)),Dl.exports}var kk=Ck();sr("O",ml(kk)).debounce(function(){this.rebuildDisplayText()},300);var mg={exports:{}},vg;function _k(){return vg||(vg=1,function(t,e){(function(){ace.require(["ace/mode/text"],function(n){t&&(t.exports=n)})})()}(mg)),mg.exports}_k();const Sk=!0,ar="u-",Ak="uplot",Tk=ar+"hz",$k=ar+"vt",Mk=ar+"title",Ek=ar+"wrap",Ik=ar+"under",Lk=ar+"over",Rk=ar+"axis",ps=ar+"off",Ok=ar+"select",Dk=ar+"cursor-x",Nk=ar+"cursor-y",Fk=ar+"cursor-pt",Pk=ar+"legend",Bk=ar+"live",Wk=ar+"inline",jk=ar+"series",zk=ar+"marker",yg=ar+"label",Hk=ar+"value",Ra="width",Oa="height",Da="top",bg="bottom",Gs="left",Ru="right",Ou="#000",wg=Ou+"0",Du="mousemove",xg="mousedown",Nu="mouseup",Cg="mouseenter",kg="mouseleave",_g="dblclick",Uk="resize",Vk="scroll",Sg="change",Nl="dppxchange",Fu="--",Ys=typeof window<"u",Pu=Ys?document:null,Xs=Ys?window:null,qk=Ys?navigator:null;let rn,Fl;function Bu(){let t=devicePixelRatio;rn!=t&&(rn=t,Fl&&zu(Sg,Fl,Bu),Fl=matchMedia(`(min-resolution: ${rn-.001}dppx) and (max-resolution: ${rn+.001}dppx)`),gs(Sg,Fl,Bu),Xs.dispatchEvent(new CustomEvent(Nl)))}function ri(t,e){if(e!=null){let n=t.classList;!n.contains(e)&&n.add(e)}}function Wu(t,e){let n=t.classList;n.contains(e)&&n.remove(e)}function Sn(t,e,n){t.style[e]=n+"px"}function Ni(t,e,n,r){let f=Pu.createElement(t);return e!=null&&ri(f,e),n!=null&&n.insertBefore(f,r),f}function vi(t,e){return Ni("div",t,e)}const Ag=new WeakMap;function Zi(t,e,n,r,f){let d="translate("+e+"px,"+n+"px)",p=Ag.get(t);d!=p&&(t.style.transform=d,Ag.set(t,d),e<0||n<0||e>r||n>f?ri(t,ps):Wu(t,ps))}const Tg=new WeakMap;function $g(t,e,n){let r=e+n,f=Tg.get(t);r!=f&&(Tg.set(t,r),t.style.background=e,t.style.borderColor=n)}const Mg=new WeakMap;function Eg(t,e,n,r){let f=e+""+n,d=Mg.get(t);f!=d&&(Mg.set(t,f),t.style.height=n+"px",t.style.width=e+"px",t.style.marginLeft=r?-e/2+"px":0,t.style.marginTop=r?-n/2+"px":0)}const ju={passive:!0},Kk={...ju,capture:!0};function gs(t,e,n,r){e.addEventListener(t,n,r?Kk:ju)}function zu(t,e,n,r){e.removeEventListener(t,n,ju)}Ys&&Bu();function Fi(t,e,n,r){let f;n=n||0,r=r||e.length-1;let d=r<=2147483647;for(;r-n>1;)f=d?n+r>>1:oi((n+r)/2),e[f]<t?n=f:r=f;return t-e[n]<=e[r]-t?n:r}function Ig(t){return(e,n,r)=>{let f=-1,d=-1;for(let p=n;p<=r;p++)if(t(e[p])){f=p;break}for(let p=r;p>=n;p--)if(t(e[p])){d=p;break}return[f,d]}}const Lg=t=>t!=null,Rg=t=>t!=null&&t>0,Pl=Ig(Lg),Gk=Ig(Rg);function Yk(t,e,n,r=0,f=!1){let d=f?Gk:Pl,p=f?Rg:Lg;[e,n]=d(t,e,n);let b=t[e],h=t[e];if(e>-1)if(r==1)b=t[e],h=t[n];else if(r==-1)b=t[n],h=t[e];else for(let g=e;g<=n;g++){let s=t[g];p(s)&&(s<b?b=s:s>h&&(h=s))}return[b??br,h??-1/0]}function Bl(t,e,n,r){let f=Ng(t),d=Ng(e);t==e&&(f==-1?(t*=n,e/=n):(t/=n,e*=n));let p=n==10?ho:Fg,b=f==1?oi:yi,h=d==1?yi:oi,g=b(p(lr(t))),s=h(p(lr(e))),a=Qs(n,g),c=Qs(n,s);return n==10&&(g<0&&(a=mn(a,-g)),s<0&&(c=mn(c,-s))),r||n==2?(t=a*f,e=c*d):(t=Ug(t,a),e=zl(e,c)),[t,e]}function Hu(t,e,n,r){let f=Bl(t,e,n,r);return t==0&&(f[0]=0),e==0&&(f[1]=0),f}const Uu=.1,Og={mode:3,pad:Uu},Na={pad:0,soft:null,mode:0},Xk={min:Na,max:Na};function Wl(t,e,n,r){return Hl(n)?Dg(t,e,n):(Na.pad=n,Na.soft=r?0:null,Na.mode=r?3:0,Dg(t,e,Xk))}function tn(t,e){return t??e}function Qk(t,e,n){for(e=tn(e,0),n=tn(n,t.length-1);e<=n;){if(t[e]!=null)return!0;e++}return!1}function Dg(t,e,n){let r=n.min,f=n.max,d=tn(r.pad,0),p=tn(f.pad,0),b=tn(r.hard,-1/0),h=tn(f.hard,br),g=tn(r.soft,br),s=tn(f.soft,-1/0),a=tn(r.mode,0),c=tn(f.mode,0),l=e-t,o=ho(l),u=Nr(lr(t),lr(e)),m=ho(u),w=lr(m-o);(l<1e-24||w>10)&&(l=0,(t==0||e==0)&&(l=1e-24,a==2&&g!=br&&(d=0),c==2&&s!=-1/0&&(p=0)));let x=l||u||1e3,E=ho(x),T=Qs(10,oi(E)),k=x*(l==0?t==0?.1:1:d),C=mn(Ug(t-k,T/10),24),L=t>=g&&(a==1||a==3&&C<=g||a==2&&C>=g)?g:br,R=Nr(b,C<L&&t>=L?L:Pi(L,C)),F=x*(l==0?e==0?.1:1:p),I=mn(zl(e+F,T/10),24),H=e<=s&&(c==1||c==3&&I>=s||c==2&&I<=s)?s:-1/0,P=Pi(h,I>H&&e<=H?H:Nr(H,I));return R==P&&R==0&&(P=100),[R,P]}const Zk=new Intl.NumberFormat(Ys?qk.language:"en-US"),Vu=t=>Zk.format(t),ii=Math,jl=ii.PI,lr=ii.abs,oi=ii.floor,cr=ii.round,yi=ii.ceil,Pi=ii.min,Nr=ii.max,Qs=ii.pow,Ng=ii.sign,ho=ii.log10,Fg=ii.log2,Jk=(t,e=1)=>ii.sinh(t)*e,qu=(t,e=1)=>ii.asinh(t/e),br=1/0;function Pg(t){return(ho((t^t>>31)-(t>>31))|0)+1}function Ku(t,e,n){return Pi(Nr(t,e),n)}function Bg(t){return typeof t=="function"}function qt(t){return Bg(t)?t:()=>t}const e_=()=>{},Wg=t=>t,jg=(t,e)=>e,t_=t=>null,zg=t=>!0,Hg=(t,e)=>t==e,n_=/\.\d*?(?=9{6,}|0{6,})/gm,ms=t=>{if(qg(t)||Po.has(t))return t;const e=`${t}`,n=e.match(n_);if(n==null)return t;let r=n[0].length-1;if(e.indexOf("e-")!=-1){let[f,d]=e.split("e");return+`${ms(f)}e${d}`}return mn(t,r)};function vs(t,e){return ms(mn(ms(t/e))*e)}function zl(t,e){return ms(yi(ms(t/e))*e)}function Ug(t,e){return ms(oi(ms(t/e))*e)}function mn(t,e=0){if(qg(t))return t;let n=10**e,r=t*n*(1+Number.EPSILON);return cr(r)/n}const Po=new Map;function Vg(t){return((""+t).split(".")[1]||"").length}function Fa(t,e,n,r){let f=[],d=r.map(Vg);for(let p=e;p<n;p++){let b=lr(p),h=mn(Qs(t,p),b);for(let g=0;g<r.length;g++){let s=t==10?+`${r[g]}e${p}`:r[g]*h,a=(p>=0?0:b)+(p>=d[g]?0:d[g]),c=t==10?s:mn(s,a);f.push(c),Po.set(c,a)}}return f}const Pa={},Gu=[],Zs=[null,null],Bo=Array.isArray,qg=Number.isInteger,r_=t=>t===void 0;function Kg(t){return typeof t=="string"}function Hl(t){let e=!1;if(t!=null){let n=t.constructor;e=n==null||n==Object}return e}function i_(t){return t!=null&&typeof t=="object"}const o_=Object.getPrototypeOf(Uint8Array),Gg="__proto__";function Js(t,e=Hl){let n;if(Bo(t)){let r=t.find(f=>f!=null);if(Bo(r)||e(r)){n=Array(t.length);for(let f=0;f<t.length;f++)n[f]=Js(t[f],e)}else n=t.slice()}else if(t instanceof o_)n=t.slice();else if(e(t)){n={};for(let r in t)r!=Gg&&(n[r]=Js(t[r],e))}else n=t;return n}function tr(t){let e=arguments;for(let n=1;n<e.length;n++){let r=e[n];for(let f in r)f!=Gg&&(Hl(t[f])?tr(t[f],Js(r[f])):t[f]=Js(r[f]))}return t}const s_=0,a_=1,l_=2;function c_(t,e,n){for(let r=0,f,d=-1;r<e.length;r++){let p=e[r];if(p>d){for(f=p-1;f>=0&&t[f]==null;)t[f--]=null;for(f=p+1;f<n&&t[f]==null;)t[d=f++]=null}}}function u_(t,e){if(f_(t)){let p=t[0].slice();for(let b=1;b<t.length;b++)p.push(...t[b].slice(1));return p_(p[0])||(p=d_(p)),p}let n=new Set;for(let p=0;p<t.length;p++){let b=t[p][0],h=b.length;for(let g=0;g<h;g++)n.add(b[g])}let r=[Array.from(n).sort((p,b)=>p-b)],f=r[0].length,d=new Map;for(let p=0;p<f;p++)d.set(r[0][p],p);for(let p=0;p<t.length;p++){let b=t[p],h=b[0];for(let g=1;g<b.length;g++){let s=b[g],a=Array(f).fill(void 0),c=e?e[p][g]:a_,l=[];for(let o=0;o<s.length;o++){let u=s[o],m=d.get(h[o]);u===null?c!=s_&&(a[m]=u,c==l_&&l.push(m)):a[m]=u}c_(a,l,f),r.push(a)}}return r}const h_=typeof queueMicrotask>"u"?t=>Promise.resolve().then(t):queueMicrotask;function d_(t){let e=t[0],n=e.length,r=Array(n);for(let d=0;d<r.length;d++)r[d]=d;r.sort((d,p)=>e[d]-e[p]);let f=[];for(let d=0;d<t.length;d++){let p=t[d],b=Array(n);for(let h=0;h<n;h++)b[h]=p[r[h]];f.push(b)}return f}function f_(t){let e=t[0][0],n=e.length;for(let r=1;r<t.length;r++){let f=t[r][0];if(f.length!=n)return!1;if(f!=e){for(let d=0;d<n;d++)if(f[d]!=e[d])return!1}}return!0}function p_(t,e=100){const n=t.length;if(n<=1)return!0;let r=0,f=n-1;for(;r<=f&&t[r]==null;)r++;for(;f>=r&&t[f]==null;)f--;if(f<=r)return!0;const d=Nr(1,oi((f-r+1)/e));for(let p=t[r],b=r+d;b<=f;b+=d){const h=t[b];if(h!=null){if(h<=p)return!1;p=h}}return!0}const Yg=["January","February","March","April","May","June","July","August","September","October","November","December"],Xg=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Qg(t){return t.slice(0,3)}const g_=Xg.map(Qg),m_=Yg.map(Qg),v_={MMMM:Yg,MMM:m_,WWWW:Xg,WWW:g_};function Ba(t){return(t<10?"0":"")+t}function y_(t){return(t<10?"00":t<100?"0":"")+t}const b_={YYYY:t=>t.getFullYear(),YY:t=>(t.getFullYear()+"").slice(2),MMMM:(t,e)=>e.MMMM[t.getMonth()],MMM:(t,e)=>e.MMM[t.getMonth()],MM:t=>Ba(t.getMonth()+1),M:t=>t.getMonth()+1,DD:t=>Ba(t.getDate()),D:t=>t.getDate(),WWWW:(t,e)=>e.WWWW[t.getDay()],WWW:(t,e)=>e.WWW[t.getDay()],HH:t=>Ba(t.getHours()),H:t=>t.getHours(),h:t=>{let e=t.getHours();return e==0?12:e>12?e-12:e},AA:t=>t.getHours()>=12?"PM":"AM",aa:t=>t.getHours()>=12?"pm":"am",a:t=>t.getHours()>=12?"p":"a",mm:t=>Ba(t.getMinutes()),m:t=>t.getMinutes(),ss:t=>Ba(t.getSeconds()),s:t=>t.getSeconds(),fff:t=>y_(t.getMilliseconds())};function Yu(t,e){e=e||v_;let n=[],r=/\{([a-z]+)\}|[^{]+/gi,f;for(;f=r.exec(t);)n.push(f[0][0]=="{"?b_[f[1]]:f[0]);return d=>{let p="";for(let b=0;b<n.length;b++)p+=typeof n[b]=="string"?n[b]:n[b](d,e);return p}}const w_=new Intl.DateTimeFormat().resolvedOptions().timeZone;function x_(t,e){let n;return e=="UTC"||e=="Etc/UTC"?n=new Date(+t+t.getTimezoneOffset()*6e4):e==w_?n=t:(n=new Date(t.toLocaleString("en-US",{timeZone:e})),n.setMilliseconds(t.getMilliseconds())),n}const Zg=t=>t%1==0,Ul=[1,2,2.5,5],C_=Fa(10,-32,0,Ul),Jg=Fa(10,0,32,Ul),k_=Jg.filter(Zg),ys=C_.concat(Jg),Xu=`
1488
- `,em="{YYYY}",tm=Xu+em,nm="{M}/{D}",Wa=Xu+nm,Vl=Wa+"/{YY}",rm="{aa}",__="{h}:{mm}",ea=__+rm,im=Xu+ea,om=":{ss}",cn=null;function sm(t){let e=t*1e3,n=e*60,r=n*60,f=r*24,d=f*30,p=f*365,b=(t==1?Fa(10,0,3,Ul).filter(Zg):Fa(10,-3,0,Ul)).concat([e,e*5,e*10,e*15,e*30,n,n*5,n*10,n*15,n*30,r,r*2,r*3,r*4,r*6,r*8,r*12,f,f*2,f*3,f*4,f*5,f*6,f*7,f*8,f*9,f*10,f*15,d,d*2,d*3,d*4,d*6,p,p*2,p*5,p*10,p*25,p*50,p*100]);const h=[[p,em,cn,cn,cn,cn,cn,cn,1],[f*28,"{MMM}",tm,cn,cn,cn,cn,cn,1],[f,nm,tm,cn,cn,cn,cn,cn,1],[r,"{h}"+rm,Vl,cn,Wa,cn,cn,cn,1],[n,ea,Vl,cn,Wa,cn,cn,cn,1],[e,om,Vl+" "+ea,cn,Wa+" "+ea,cn,im,cn,1],[t,om+".{fff}",Vl+" "+ea,cn,Wa+" "+ea,cn,im,cn,1]];function g(s){return(a,c,l,o,u,m)=>{let w=[],x=u>=p,E=u>=d&&u<p,T=s(l),k=mn(T*t,3),C=Qu(T.getFullYear(),x?0:T.getMonth(),E||x?1:T.getDate()),L=mn(C*t,3);if(E||x){let R=E?u/d:0,F=x?u/p:0,I=k==L?k:mn(Qu(C.getFullYear()+F,C.getMonth()+R,1)*t,3),H=new Date(cr(I/t)),P=H.getFullYear(),O=H.getMonth();for(let A=0;I<=o;A++){let S=Qu(P+F*A,O+R*A,1),D=S-s(mn(S*t,3));I=mn((+S+D)*t,3),I<=o&&w.push(I)}}else{let R=u>=f?f:u,F=oi(l)-oi(k),I=L+F+zl(k-L,R);w.push(I);let H=s(I),P=H.getHours()+H.getMinutes()/n+H.getSeconds()/r,O=u/r,A=a.axes[c]._space,S=m/A;for(;I=mn(I+u,t==1?0:3),!(I>o);)if(O>1){let D=oi(mn(P+O,6))%24,W=s(I).getHours()-D;W>1&&(W=-1),I-=W*r,P=(P+O)%24;let U=w[w.length-1];mn((I-U)/u,3)*S>=.7&&w.push(I)}else w.push(I)}return w}}return[b,h,g]}const[S_,A_,T_]=sm(1),[$_,M_,E_]=sm(.001);Fa(2,-53,53,[1]);function am(t,e){return t.map(n=>n.map((r,f)=>f==0||f==8||r==null?r:e(f==1||n[8]==0?r:n[1]+r)))}function lm(t,e){return(n,r,f,d,p)=>{let b=e.find(o=>p>=o[0])||e[e.length-1],h,g,s,a,c,l;return r.map(o=>{let u=t(o),m=u.getFullYear(),w=u.getMonth(),x=u.getDate(),E=u.getHours(),T=u.getMinutes(),k=u.getSeconds(),C=m!=h&&b[2]||w!=g&&b[3]||x!=s&&b[4]||E!=a&&b[5]||T!=c&&b[6]||k!=l&&b[7]||b[1];return h=m,g=w,s=x,a=E,c=T,l=k,C(u)})}}function I_(t,e){let n=Yu(e);return(r,f,d,p,b)=>f.map(h=>n(t(h)))}function Qu(t,e,n){return new Date(t,e,n)}function cm(t,e){return e(t)}const L_="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function um(t,e){return(n,r,f,d)=>d==null?Fu:e(t(r))}function R_(t,e){let n=t.series[e];return n.width?n.stroke(t,e):n.points.width?n.points.stroke(t,e):null}function O_(t,e){return t.series[e].fill(t,e)}const D_={show:!0,live:!0,isolate:!1,mount:e_,markers:{show:!0,width:2,stroke:R_,fill:O_,dash:"solid"},idx:null,idxs:null,values:[]};function N_(t,e){let n=t.cursor.points,r=vi(),f=n.size(t,e);Sn(r,Ra,f),Sn(r,Oa,f);let d=f/-2;Sn(r,"marginLeft",d),Sn(r,"marginTop",d);let p=n.width(t,e,f);return p&&Sn(r,"borderWidth",p),r}function F_(t,e){let n=t.series[e].points;return n._fill||n._stroke}function P_(t,e){let n=t.series[e].points;return n._stroke||n._fill}function B_(t,e){return t.series[e].points.size}const Zu=[0,0];function W_(t,e,n){return Zu[0]=e,Zu[1]=n,Zu}function ql(t,e,n,r=!0){return f=>{f.button==0&&(!r||f.target==e)&&n(f)}}function Ju(t,e,n,r=!0){return f=>{(!r||f.target==e)&&n(f)}}const j_={show:!0,x:!0,y:!0,lock:!1,move:W_,points:{one:!1,show:N_,size:B_,width:0,stroke:P_,fill:F_},bind:{mousedown:ql,mouseup:ql,click:ql,dblclick:ql,mousemove:Ju,mouseleave:Ju,mouseenter:Ju},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(t,e)=>{e.stopPropagation(),e.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(t,e,n,r,f)=>r-f,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},hm={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},eh=tr({},hm,{filter:jg}),dm=tr({},eh,{size:10}),fm=tr({},hm,{show:!1}),th='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"',pm="bold "+th,gm=1.5,mm={show:!0,scale:"x",stroke:Ou,space:50,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:pm,side:2,grid:eh,ticks:dm,border:fm,font:th,lineGap:gm,rotate:0},z_="Value",H_="Time",vm={show:!0,scale:"x",auto:!1,sorted:1,min:br,max:-1/0,idxs:[]};function U_(t,e,n,r,f){return e.map(d=>d==null?"":Vu(d))}function V_(t,e,n,r,f,d,p){let b=[],h=Po.get(f)||0;n=p?n:mn(zl(n,f),h);for(let g=n;g<=r;g=mn(g+f,h))b.push(Object.is(g,-0)?0:g);return b}function nh(t,e,n,r,f,d,p){const b=[],h=t.scales[t.axes[e].scale].log,g=h==10?ho:Fg,s=oi(g(n));f=Qs(h,s),h==10&&(f=ys[Fi(f,ys)]);let a=n,c=f*h;h==10&&(c=ys[Fi(c,ys)]);do b.push(a),a=a+f,h==10&&!Po.has(a)&&(a=mn(a,Po.get(f))),a>=c&&(f=a,c=f*h,h==10&&(c=ys[Fi(c,ys)]));while(a<=r);return b}function q_(t,e,n,r,f,d,p){let b=t.scales[t.axes[e].scale].asinh,h=r>b?nh(t,e,Nr(b,n),r,f):[b],g=r>=0&&n<=0?[0]:[];return(n<-b?nh(t,e,Nr(b,-r),-n,f):[b]).reverse().map(s=>-s).concat(g,h)}const ym=/./,K_=/[12357]/,G_=/[125]/,bm=/1/,rh=(t,e,n,r)=>t.map((f,d)=>e==4&&f==0||d%r==0&&n.test(f.toExponential()[f<0?1:0])?f:null);function Y_(t,e,n,r,f){let d=t.axes[n],p=d.scale,b=t.scales[p],h=t.valToPos,g=d._space,s=h(10,p),a=h(9,p)-s>=g?ym:h(7,p)-s>=g?K_:h(5,p)-s>=g?G_:bm;if(a==bm){let c=lr(h(1,p)-s);if(c<g)return rh(e.slice().reverse(),b.distr,a,yi(g/c)).reverse()}return rh(e,b.distr,a,1)}function X_(t,e,n,r,f){let d=t.axes[n],p=d.scale,b=d._space,h=t.valToPos,g=lr(h(1,p)-h(2,p));return g<b?rh(e.slice().reverse(),3,ym,yi(b/g)).reverse():e}function Q_(t,e,n,r){return r==null?Fu:e==null?"":Vu(e)}const wm={show:!0,scale:"y",stroke:Ou,space:30,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:pm,side:3,grid:eh,ticks:dm,border:fm,font:th,lineGap:gm,rotate:0};function Z_(t,e){let n=3+(t||1)*2;return mn(n*e,3)}function J_(t,e){let{scale:n,idxs:r}=t.series[0],f=t._data[0],d=t.valToPos(f[r[0]],n,!0),p=t.valToPos(f[r[1]],n,!0),b=lr(p-d),h=t.series[e],g=b/(h.points.space*rn);return r[1]-r[0]<=g}const xm={scale:null,auto:!0,sorted:0,min:br,max:-1/0},Cm=(t,e,n,r,f)=>f,km={show:!0,auto:!0,sorted:0,gaps:Cm,alpha:1,facets:[tr({},xm,{scale:"x"}),tr({},xm,{scale:"y"})]},_m={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:Cm,alpha:1,points:{show:J_,filter:null},values:null,min:br,max:-1/0,idxs:[],path:null,clip:null};function eS(t,e,n,r,f){return n/10}const Sm={time:Sk,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},tS=tr({},Sm,{time:!1,ori:1}),Am={};function Tm(t,e){let n=Am[t];return n||(n={key:t,plots:[],sub(r){n.plots.push(r)},unsub(r){n.plots=n.plots.filter(f=>f!=r)},pub(r,f,d,p,b,h,g){for(let s=0;s<n.plots.length;s++)n.plots[s]!=f&&n.plots[s].pub(r,f,d,p,b,h,g)}},t!=null&&(Am[t]=n)),n}const ta=1,ih=2;function bs(t,e,n){const r=t.mode,f=t.series[e],d=r==2?t._data[e]:t._data,p=t.scales,b=t.bbox;let h=d[0],g=r==2?d[1]:d[e],s=r==2?p[f.facets[0].scale]:p[t.series[0].scale],a=r==2?p[f.facets[1].scale]:p[f.scale],c=b.left,l=b.top,o=b.width,u=b.height,m=t.valToPosH,w=t.valToPosV;return s.ori==0?n(f,h,g,s,a,m,w,c,l,o,u,Gl,na,Xl,Em,Lm):n(f,h,g,s,a,w,m,l,c,u,o,Yl,ra,ah,Im,Rm)}function oh(t,e){let n=0,r=0,f=tn(t.bands,Gu);for(let d=0;d<f.length;d++){let p=f[d];p.series[0]==e?n=p.dir:p.series[1]==e&&(p.dir==1?r|=1:r|=2)}return[n,r==1?-1:r==2?1:r==3?2:0]}function nS(t,e,n,r,f){let d=t.mode,p=t.series[e],b=d==2?p.facets[1].scale:p.scale,h=t.scales[b];return f==-1?h.min:f==1?h.max:h.distr==3?h.dir==1?h.min:h.max:0}function fo(t,e,n,r,f,d){return bs(t,e,(p,b,h,g,s,a,c,l,o,u,m)=>{let w=p.pxRound;const x=g.dir*(g.ori==0?1:-1),E=g.ori==0?na:ra;let T,k;x==1?(T=n,k=r):(T=r,k=n);let C=w(a(b[T],g,u,l)),L=w(c(h[T],s,m,o)),R=w(a(b[k],g,u,l)),F=w(c(d==1?s.max:s.min,s,m,o)),I=new Path2D(f);return E(I,R,F),E(I,C,F),E(I,C,L),I})}function Kl(t,e,n,r,f,d){let p=null;if(t.length>0){p=new Path2D;const b=e==0?Xl:ah;let h=n;for(let a=0;a<t.length;a++){let c=t[a];if(c[1]>c[0]){let l=c[0]-h;l>0&&b(p,h,r,l,r+d),h=c[1]}}let g=n+f-h,s=10;g>0&&b(p,h,r-s/2,g,r+d+s)}return p}function rS(t,e,n){let r=t[t.length-1];r&&r[0]==e?r[1]=n:t.push([e,n])}function sh(t,e,n,r,f,d,p){let b=[],h=t.length;for(let g=f==1?n:r;g>=n&&g<=r;g+=f)if(e[g]===null){let s=g,a=g;if(f==1)for(;++g<=r&&e[g]===null;)a=g;else for(;--g>=n&&e[g]===null;)a=g;let c=d(t[s]),l=a==s?c:d(t[a]),o=s-f;c=p<=0&&o>=0&&o<h?d(t[o]):c;let u=a+f;l=p>=0&&u>=0&&u<h?d(t[u]):l,l>=c&&b.push([c,l])}return b}function $m(t){return t==0?Wg:t==1?cr:e=>vs(e,t)}function Mm(t){let e=t==0?Gl:Yl,n=t==0?(f,d,p,b,h,g)=>{f.arcTo(d,p,b,h,g)}:(f,d,p,b,h,g)=>{f.arcTo(p,d,h,b,g)},r=t==0?(f,d,p,b,h)=>{f.rect(d,p,b,h)}:(f,d,p,b,h)=>{f.rect(p,d,h,b)};return(f,d,p,b,h,g=0,s=0)=>{g==0&&s==0?r(f,d,p,b,h):(g=Pi(g,b/2,h/2),s=Pi(s,b/2,h/2),e(f,d+g,p),n(f,d+b,p,d+b,p+h,g),n(f,d+b,p+h,d,p+h,s),n(f,d,p+h,d,p,s),n(f,d,p,d+b,p,g),f.closePath())}}const Gl=(t,e,n)=>{t.moveTo(e,n)},Yl=(t,e,n)=>{t.moveTo(n,e)},na=(t,e,n)=>{t.lineTo(e,n)},ra=(t,e,n)=>{t.lineTo(n,e)},Xl=Mm(0),ah=Mm(1),Em=(t,e,n,r,f,d)=>{t.arc(e,n,r,f,d)},Im=(t,e,n,r,f,d)=>{t.arc(n,e,r,f,d)},Lm=(t,e,n,r,f,d,p)=>{t.bezierCurveTo(e,n,r,f,d,p)},Rm=(t,e,n,r,f,d,p)=>{t.bezierCurveTo(n,e,f,r,p,d)};function Om(t){return(e,n,r,f,d)=>bs(e,n,(p,b,h,g,s,a,c,l,o,u,m)=>{let{pxRound:w,points:x}=p,E,T;g.ori==0?(E=Gl,T=Em):(E=Yl,T=Im);const k=mn(x.width*rn,3);let C=(x.size-x.width)/2*rn,L=mn(C*2,3),R=new Path2D,F=new Path2D,{left:I,top:H,width:P,height:O}=e.bbox;Xl(F,I-L,H-L,P+L*2,O+L*2);const A=S=>{if(h[S]!=null){let D=w(a(b[S],g,u,l)),W=w(c(h[S],s,m,o));E(R,D+C,W),T(R,D,W,C,0,jl*2)}};if(d)d.forEach(A);else for(let S=r;S<=f;S++)A(S);return{stroke:k>0?R:null,fill:R,clip:F,flags:ta|ih}})}function Dm(t){return(e,n,r,f,d,p)=>{r!=f&&(d!=r&&p!=r&&t(e,n,r),d!=f&&p!=f&&t(e,n,f),t(e,n,p))}}const iS=Dm(na),oS=Dm(ra);function Nm(t){const e=tn(t==null?void 0:t.alignGaps,0);return(n,r,f,d)=>bs(n,r,(p,b,h,g,s,a,c,l,o,u,m)=>{[f,d]=Pl(h,f,d);let w=p.pxRound,x=P=>w(a(P,g,u,l)),E=P=>w(c(P,s,m,o)),T,k;g.ori==0?(T=na,k=iS):(T=ra,k=oS);const C=g.dir*(g.ori==0?1:-1),L={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:ta},R=L.stroke;let F=!1;if(d-f>=u*4){let P=he=>n.posToVal(he,g.key,!0),O=null,A=null,S,D,W,U=x(b[C==1?f:d]),K=x(b[f]),Z=x(b[d]),te=P(C==1?K+1:Z-1);for(let he=C==1?f:d;he>=f&&he<=d;he+=C){let ne=b[he],ae=(C==1?ne<te:ne>te)?U:x(ne),ue=h[he];ae==U?ue!=null?(D=ue,O==null?(T(R,ae,E(D)),S=O=A=D):D<O?O=D:D>A&&(A=D)):ue===null&&(F=!0):(O!=null&&k(R,U,E(O),E(A),E(S),E(D)),ue!=null?(D=ue,T(R,ae,E(D)),O=A=S=D):(O=A=null,ue===null&&(F=!0)),U=ae,te=P(U+C))}O!=null&&O!=A&&W!=U&&k(R,U,E(O),E(A),E(S),E(D))}else for(let P=C==1?f:d;P>=f&&P<=d;P+=C){let O=h[P];O===null?F=!0:O!=null&&T(R,x(b[P]),E(O))}let[I,H]=oh(n,r);if(p.fill!=null||I!=0){let P=L.fill=new Path2D(R),O=p.fillTo(n,r,p.min,p.max,I),A=E(O),S=x(b[f]),D=x(b[d]);C==-1&&([D,S]=[S,D]),T(P,D,A),T(P,S,A)}if(!p.spanGaps){let P=[];F&&P.push(...sh(b,h,f,d,C,x,e)),L.gaps=P=p.gaps(n,r,f,d,P),L.clip=Kl(P,g.ori,l,o,u,m)}return H!=0&&(L.band=H==2?[fo(n,r,f,d,R,-1),fo(n,r,f,d,R,1)]:fo(n,r,f,d,R,H)),L})}function sS(t){const e=tn(t.align,1),n=tn(t.ascDesc,!1),r=tn(t.alignGaps,0),f=tn(t.extend,!1);return(d,p,b,h)=>bs(d,p,(g,s,a,c,l,o,u,m,w,x,E)=>{[b,h]=Pl(a,b,h);let T=g.pxRound,{left:k,width:C}=d.bbox,L=Z=>T(o(Z,c,x,m)),R=Z=>T(u(Z,l,E,w)),F=c.ori==0?na:ra;const I={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:ta},H=I.stroke,P=c.dir*(c.ori==0?1:-1);let O=R(a[P==1?b:h]),A=L(s[P==1?b:h]),S=A,D=A;f&&e==-1&&(D=k,F(H,D,O)),F(H,A,O);for(let Z=P==1?b:h;Z>=b&&Z<=h;Z+=P){let te=a[Z];if(te==null)continue;let he=L(s[Z]),ne=R(te);e==1?F(H,he,O):F(H,S,ne),F(H,he,ne),O=ne,S=he}let W=S;f&&e==1&&(W=k+C,F(H,W,O));let[U,K]=oh(d,p);if(g.fill!=null||U!=0){let Z=I.fill=new Path2D(H),te=g.fillTo(d,p,g.min,g.max,U),he=R(te);F(Z,W,he),F(Z,D,he)}if(!g.spanGaps){let Z=[];Z.push(...sh(s,a,b,h,P,L,r));let te=g.width*rn/2,he=n||e==1?te:-te,ne=n||e==-1?-te:te;Z.forEach(ae=>{ae[0]+=he,ae[1]+=ne}),I.gaps=Z=g.gaps(d,p,b,h,Z),I.clip=Kl(Z,c.ori,m,w,x,E)}return K!=0&&(I.band=K==2?[fo(d,p,b,h,H,-1),fo(d,p,b,h,H,1)]:fo(d,p,b,h,H,K)),I})}function Fm(t,e,n,r,f,d,p=br){if(t.length>1){let b=null;for(let h=0,g=1/0;h<t.length;h++)if(e[h]!==void 0){if(b!=null){let s=lr(t[h]-t[b]);s<g&&(g=s,p=lr(n(t[h],r,f,d)-n(t[b],r,f,d)))}b=h}}return p}function aS(t){t=t||Pa;const e=tn(t.size,[.6,br,1]),n=t.align||0,r=t.gap||0;let f=t.radius;f=f==null?[0,0]:typeof f=="number"?[f,0]:f;const d=qt(f),p=1-e[0],b=tn(e[1],br),h=tn(e[2],1),g=tn(t.disp,Pa),s=tn(t.each,l=>{}),{fill:a,stroke:c}=g;return(l,o,u,m)=>bs(l,o,(w,x,E,T,k,C,L,R,F,I,H)=>{let P=w.pxRound,O=n,A=r*rn,S=b*rn,D=h*rn,W,U;T.ori==0?[W,U]=d(l,o):[U,W]=d(l,o);const K=T.dir*(T.ori==0?1:-1);let Z=T.ori==0?Xl:ah,te=T.ori==0?s:(Ke,ke,Ve,Je,vt,Tt,At)=>{s(Ke,ke,Ve,vt,Je,At,Tt)},he=tn(l.bands,Gu).find(Ke=>Ke.series[0]==o),ne=he!=null?he.dir:0,ae=w.fillTo(l,o,w.min,w.max,ne),ue=P(L(ae,k,H,F)),ce,ge,Te,$e=I,Ee=P(w.width*rn),Ze=!1,Xe=null,gt=null,at=null,mt=null;a!=null&&(Ee==0||c!=null)&&(Ze=!0,Xe=a.values(l,o,u,m),gt=new Map,new Set(Xe).forEach(Ke=>{Ke!=null&&gt.set(Ke,new Path2D)}),Ee>0&&(at=c.values(l,o,u,m),mt=new Map,new Set(at).forEach(Ke=>{Ke!=null&&mt.set(Ke,new Path2D)})));let{x0:sn,size:bn}=g;if(sn!=null&&bn!=null){O=1,x=sn.values(l,o,u,m),sn.unit==2&&(x=x.map(ke=>l.posToVal(R+ke*I,T.key,!0)));let Ke=bn.values(l,o,u,m);bn.unit==2?ge=Ke[0]*I:ge=C(Ke[0],T,I,R)-C(0,T,I,R),$e=Fm(x,E,C,T,I,R,$e),Te=$e-ge+A}else $e=Fm(x,E,C,T,I,R,$e),Te=$e*p+A,ge=$e-Te;Te<1&&(Te=0),Ee>=ge/2&&(Ee=0),Te<5&&(P=Wg);let Jt=Te>0,wr=$e-Te-(Jt?Ee:0);ge=P(Ku(wr,D,S)),ce=(O==0?ge/2:O==K?0:ge)-O*K*((O==0?A/2:0)+(Jt?Ee/2:0));const wn={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},Fn=Ze?null:new Path2D;let Pn=null;if(he!=null)Pn=l.data[he.series[1]];else{let{y0:Ke,y1:ke}=g;Ke!=null&&ke!=null&&(E=ke.values(l,o,u,m),Pn=Ke.values(l,o,u,m))}let nr=W*ge,Ct=U*ge;for(let Ke=K==1?u:m;Ke>=u&&Ke<=m;Ke+=K){let ke=E[Ke];if(ke==null)continue;if(Pn!=null){let pt=Pn[Ke]??0;if(ke-pt==0)continue;ue=L(pt,k,H,F)}let Ve=T.distr!=2||g!=null?x[Ke]:Ke,Je=C(Ve,T,I,R),vt=L(tn(ke,ae),k,H,F),Tt=P(Je-ce),At=P(Nr(vt,ue)),Pt=P(Pi(vt,ue)),Nt=At-Pt;if(ke!=null){let pt=ke<0?Ct:nr,kt=ke<0?nr:Ct;Ze?(Ee>0&&at[Ke]!=null&&Z(mt.get(at[Ke]),Tt,Pt+oi(Ee/2),ge,Nr(0,Nt-Ee),pt,kt),Xe[Ke]!=null&&Z(gt.get(Xe[Ke]),Tt,Pt+oi(Ee/2),ge,Nr(0,Nt-Ee),pt,kt)):Z(Fn,Tt,Pt+oi(Ee/2),ge,Nr(0,Nt-Ee),pt,kt),te(l,o,Ke,Tt-Ee/2,Pt,ge+Ee,Nt)}}return Ee>0?wn.stroke=Ze?mt:Fn:Ze||(wn._fill=w.width==0?w._fill:w._stroke??w._fill,wn.width=0),wn.fill=Ze?gt:Fn,wn})}function lS(t,e){const n=tn(e==null?void 0:e.alignGaps,0);return(r,f,d,p)=>bs(r,f,(b,h,g,s,a,c,l,o,u,m,w)=>{[d,p]=Pl(g,d,p);let x=b.pxRound,E=W=>x(c(W,s,m,o)),T=W=>x(l(W,a,w,u)),k,C,L;s.ori==0?(k=Gl,L=na,C=Lm):(k=Yl,L=ra,C=Rm);const R=s.dir*(s.ori==0?1:-1);let F=E(h[R==1?d:p]),I=F,H=[],P=[];for(let W=R==1?d:p;W>=d&&W<=p;W+=R)if(g[W]!=null){let U=h[W],K=E(U);H.push(I=K),P.push(T(g[W]))}const O={stroke:t(H,P,k,L,C,x),fill:null,clip:null,band:null,gaps:null,flags:ta},A=O.stroke;let[S,D]=oh(r,f);if(b.fill!=null||S!=0){let W=O.fill=new Path2D(A),U=b.fillTo(r,f,b.min,b.max,S),K=T(U);L(W,I,K),L(W,F,K)}if(!b.spanGaps){let W=[];W.push(...sh(h,g,d,p,R,E,n)),O.gaps=W=b.gaps(r,f,d,p,W),O.clip=Kl(W,s.ori,o,u,m,w)}return D!=0&&(O.band=D==2?[fo(r,f,d,p,A,-1),fo(r,f,d,p,A,1)]:fo(r,f,d,p,A,D)),O})}function cS(t){return lS(uS,t)}function uS(t,e,n,r,f,d){const p=t.length;if(p<2)return null;const b=new Path2D;if(n(b,t[0],e[0]),p==2)r(b,t[1],e[1]);else{let h=Array(p),g=Array(p-1),s=Array(p-1),a=Array(p-1);for(let c=0;c<p-1;c++)s[c]=e[c+1]-e[c],a[c]=t[c+1]-t[c],g[c]=s[c]/a[c];h[0]=g[0];for(let c=1;c<p-1;c++)g[c]===0||g[c-1]===0||g[c-1]>0!=g[c]>0?h[c]=0:(h[c]=3*(a[c-1]+a[c])/((2*a[c]+a[c-1])/g[c-1]+(a[c]+2*a[c-1])/g[c]),isFinite(h[c])||(h[c]=0));h[p-1]=g[p-2];for(let c=0;c<p-1;c++)f(b,t[c]+a[c]/3,e[c]+h[c]*a[c]/3,t[c+1]-a[c]/3,e[c+1]-h[c+1]*a[c]/3,t[c+1],e[c+1])}return b}const lh=new Set;function Pm(){for(let t of lh)t.syncRect(!0)}Ys&&(gs(Uk,Xs,Pm),gs(Vk,Xs,Pm,!0),gs(Nl,Xs,()=>{Ar.pxRatio=rn}));const hS=Nm(),dS=Om();function Bm(t,e,n,r){return(r?[t[0],t[1]].concat(t.slice(2)):[t[0]].concat(t.slice(1))).map((f,d)=>ch(f,d,e,n))}function fS(t,e){return t.map((n,r)=>r==0?{}:tr({},e,n))}function ch(t,e,n,r){return tr({},e==0?n:r,t)}function Wm(t,e,n){return e==null?Zs:[e,n]}const pS=Wm;function gS(t,e,n){return e==null?Zs:Wl(e,n,Uu,!0)}function jm(t,e,n,r){return e==null?Zs:Bl(e,n,t.scales[r].log,!1)}const mS=jm;function zm(t,e,n,r){return e==null?Zs:Hu(e,n,t.scales[r].log,!1)}const vS=zm;function yS(t,e,n,r,f){let d=Nr(Pg(t),Pg(e)),p=e-t,b=Fi(f/r*p,n);do{let h=n[b],g=r*h/p;if(g>=f&&d+(h<5?Po.get(h):0)<=17)return[h,g]}while(++b<n.length);return[0,0]}function Hm(t){let e,n;return t=t.replace(/(\d+)px/,(r,f)=>(e=cr((n=+f)*rn))+"px"),[t,e,n]}function bS(t){t.show&&[t.font,t.labelFont].forEach(e=>{let n=mn(e[2]*rn,1);e[0]=e[0].replace(/[0-9.]+px/,n+"px"),e[1]=n})}function Ar(t,e,n){const r={mode:tn(t.mode,1)},f=r.mode;function d(V,X,ie,oe){let pe=X.valToPct(V);return oe+ie*(X.dir==-1?1-pe:pe)}function p(V,X,ie,oe){let pe=X.valToPct(V);return oe+ie*(X.dir==-1?pe:1-pe)}function b(V,X,ie,oe){return X.ori==0?d(V,X,ie,oe):p(V,X,ie,oe)}r.valToPosH=d,r.valToPosV=p;let h=!1;r.status=0;const g=r.root=vi(Ak);if(t.id!=null&&(g.id=t.id),ri(g,t.class),t.title){let V=vi(Mk,g);V.textContent=t.title}const s=Ni("canvas"),a=r.ctx=s.getContext("2d"),c=vi(Ek,g);gs("click",c,V=>{V.target===o&&(ln!=Ci||Gt!=ao)&&Wn.click(r,V)},!0);const l=r.under=vi(Ik,c);c.appendChild(s);const o=r.over=vi(Lk,c);t=Js(t);const u=+tn(t.pxAlign,1),m=$m(u);(t.plugins||[]).forEach(V=>{V.opts&&(t=V.opts(r,t)||t)});const w=t.ms||.001,x=r.series=f==1?Bm(t.series||[],vm,_m,!1):fS(t.series||[null],km),E=r.axes=Bm(t.axes||[],mm,wm,!0),T=r.scales={},k=r.bands=t.bands||[];k.forEach(V=>{V.fill=qt(V.fill||null),V.dir=tn(V.dir,-1)});const C=f==2?x[1].facets[0].scale:x[0].scale,L={axes:bo,series:ua},R=(t.drawOrder||["axes","series"]).map(V=>L[V]);function F(V){const X=V.distr==3?ie=>ho(ie>0?ie:V.clamp(r,ie,V.min,V.max,V.key)):V.distr==4?ie=>qu(ie,V.asinh):V.distr==100?ie=>V.fwd(ie):ie=>ie;return ie=>{let oe=X(ie),{_min:pe,_max:we}=V,Me=we-pe;return(oe-pe)/Me}}function I(V){let X=T[V];if(X==null){let ie=(t.scales||Pa)[V]||Pa;if(ie.from!=null){I(ie.from);let oe=tr({},T[ie.from],ie,{key:V});oe.valToPct=F(oe),T[V]=oe}else{X=T[V]=tr({},V==C?Sm:tS,ie),X.key=V;let oe=X.time,pe=X.range,we=Bo(pe);if((V!=C||f==2&&!oe)&&(we&&(pe[0]==null||pe[1]==null)&&(pe={min:pe[0]==null?Og:{mode:1,hard:pe[0],soft:pe[0]},max:pe[1]==null?Og:{mode:1,hard:pe[1],soft:pe[1]}},we=!1),!we&&Hl(pe))){let Me=pe;pe=(Be,ze,Ye)=>ze==null?Zs:Wl(ze,Ye,Me)}X.range=qt(pe||(oe?pS:V==C?X.distr==3?mS:X.distr==4?vS:Wm:X.distr==3?jm:X.distr==4?zm:gS)),X.auto=qt(we?!1:X.auto),X.clamp=qt(X.clamp||eS),X._min=X._max=null,X.valToPct=F(X)}}}I("x"),I("y"),f==1&&x.forEach(V=>{I(V.scale)}),E.forEach(V=>{I(V.scale)});for(let V in t.scales)I(V);const H=T[C],P=H.distr;let O,A;H.ori==0?(ri(g,Tk),O=d,A=p):(ri(g,$k),O=p,A=d);const S={};for(let V in T){let X=T[V];(X.min!=null||X.max!=null)&&(S[V]={min:X.min,max:X.max},X.min=X.max=null)}const D=t.tzDate||(V=>new Date(cr(V/w))),W=t.fmtDate||Yu,U=w==1?T_(D):E_(D),K=lm(D,am(w==1?A_:M_,W)),Z=um(D,cm(L_,W)),te=[],he=r.legend=tr({},D_,t.legend),ne=r.cursor=tr({},j_,{drag:{y:f==2}},t.cursor),ae=he.show,ue=ne.show,ce=he.markers;he.idxs=te,ce.width=qt(ce.width),ce.dash=qt(ce.dash),ce.stroke=qt(ce.stroke),ce.fill=qt(ce.fill);let ge,Te,$e,Ee=[],Ze=[],Xe,gt=!1,at={};if(he.live){const V=x[1]?x[1].values:null;gt=V!=null,Xe=gt?V(r,1,0):{_:0};for(let X in Xe)at[X]=Fu}if(ae)if(ge=Ni("table",Pk,g),$e=Ni("tbody",null,ge),he.mount(r,ge),gt){Te=Ni("thead",null,ge,$e);let V=Ni("tr",null,Te);Ni("th",null,V);for(var mt in Xe)Ni("th",yg,V).textContent=mt}else ri(ge,Wk),he.live&&ri(ge,Bk);const sn={show:!0},bn={show:!1};function Jt(V,X){if(X==0&&(gt||!he.live||f==2))return Zs;let ie=[],oe=Ni("tr",jk,$e,$e.childNodes[X]);ri(oe,V.class),V.show||ri(oe,ps);let pe=Ni("th",null,oe);if(ce.show){let Be=vi(zk,pe);if(X>0){let ze=ce.width(r,X);ze&&(Be.style.border=ze+"px "+ce.dash(r,X)+" "+ce.stroke(r,X)),Be.style.background=ce.fill(r,X)}}let we=vi(yg,pe);V.label instanceof HTMLElement?we.appendChild(V.label):we.textContent=V.label,X>0&&(ce.show||(we.style.color=V.width>0?ce.stroke(r,X):ce.fill(r,X)),wn("click",pe,Be=>{if(ne._lock)return;ji(Be);let ze=x.indexOf(V);if((Be.ctrlKey||Be.metaKey)!=he.isolate){let Ye=x.some((et,nt)=>nt>0&&nt!=ze&&et.show);x.forEach((et,nt)=>{nt>0&&Br(nt,Ye?nt==ze?sn:bn:sn,!0,dt.setSeries)})}else Br(ze,{show:!V.show},!0,dt.setSeries)},!1),zi&&wn(Cg,pe,Be=>{ne._lock||(ji(Be),Br(x.indexOf(V),Si,!0,dt.setSeries))},!1));for(var Me in Xe){let Be=Ni("td",Hk,oe);Be.textContent="--",ie.push(Be)}return[oe,ie]}const wr=new Map;function wn(V,X,ie,oe=!0){const pe=wr.get(X)||{},we=ne.bind[V](r,X,ie,oe);we&&(gs(V,X,pe[V]=we),wr.set(X,pe))}function Fn(V,X,ie){const oe=wr.get(X)||{};for(let pe in oe)(V==null||pe==V)&&(zu(pe,X,oe[pe]),delete oe[pe]);V==null&&wr.delete(X)}let Pn=0,nr=0,Ct=0,Ke=0,ke=0,Ve=0,Je=ke,vt=Ve,Tt=Ct,At=Ke,Pt=0,Nt=0,pt=0,kt=0;r.bbox={};let $n=!1,$r=!1,Yr=!1,Wi=!1,po=!1,xr=!1;function go(V,X,ie){(ie||V!=r.width||X!=r.height)&&Wo(V,X),qi(!1),Yr=!0,$r=!0,so()}function Wo(V,X){r.width=Pn=Ct=V,r.height=nr=Ke=X,ke=Ve=0,ks(),aa();let ie=r.bbox;Pt=ie.left=vs(ke*rn,.5),Nt=ie.top=vs(Ve*rn,.5),pt=ie.width=vs(Ct*rn,.5),kt=ie.height=vs(Ke*rn,.5)}const Ga=3;function si(){let V=!1,X=0;for(;!V;){X++;let ie=ha(X),oe=Za(X);V=X==Ga||ie&&oe,V||(Wo(r.width,r.height),$r=!0)}}function Ya({width:V,height:X}){go(V,X)}r.setSize=Ya;function ks(){let V=!1,X=!1,ie=!1,oe=!1;E.forEach((pe,we)=>{if(pe.show&&pe._show){let{side:Me,_size:Be}=pe,ze=Me%2,Ye=pe.label!=null?pe.labelSize:0,et=Be+Ye;et>0&&(ze?(Ct-=et,Me==3?(ke+=et,oe=!0):ie=!0):(Ke-=et,Me==0?(Ve+=et,V=!0):X=!0))}}),Ui[0]=V,Ui[1]=ie,Ui[2]=X,Ui[3]=oe,Ct-=Ir[1]+Ir[3],ke+=Ir[3],Ke-=Ir[2]+Ir[0],Ve+=Ir[0]}function aa(){let V=ke+Ct,X=Ve+Ke,ie=ke,oe=Ve;function pe(we,Me){switch(we){case 1:return V+=Me,V-Me;case 2:return X+=Me,X-Me;case 3:return ie-=Me,ie+Me;case 0:return oe-=Me,oe+Me}}E.forEach((we,Me)=>{if(we.show&&we._show){let Be=we.side;we._pos=pe(Be,we._size),we.label!=null&&(we._lpos=pe(Be,we.labelSize))}})}if(ne.dataIdx==null){let V=ne.hover,X=V.skip=new Set(V.skip??[]);X.add(void 0);let ie=V.prox=qt(V.prox),oe=V.bias??(V.bias=0);ne.dataIdx=(pe,we,Me,Be)=>{if(we==0)return Me;let ze=Me,Ye=ie(pe,we,Me,Be)??br,et=Ye>=0&&Ye<br,nt=H.ori==0?Ct:Ke,St=ne.left,Ut=e[0],Mt=e[we];if(X.has(Mt[Me])){ze=null;let jt=null,yt=null,ut;if(oe==0||oe==-1)for(ut=Me;jt==null&&ut-- >0;)X.has(Mt[ut])||(jt=ut);if(oe==0||oe==1)for(ut=Me;yt==null&&ut++<Mt.length;)X.has(Mt[ut])||(yt=ut);if(jt!=null||yt!=null)if(et){let vn=jt==null?-1/0:O(Ut[jt],H,nt,0),In=yt==null?1/0:O(Ut[yt],H,nt,0),or=St-vn,Qt=In-St;or<=Qt?or<=Ye&&(ze=jt):Qt<=Ye&&(ze=yt)}else ze=yt==null?jt:jt==null?yt:Me-jt<=yt-Me?jt:yt}else et&&lr(St-O(Ut[Me],H,nt,0))>Ye&&(ze=null);return ze}}const ji=V=>{ne.event=V};ne.idxs=te,ne._lock=!1;let Yn=ne.points;Yn.show=qt(Yn.show),Yn.size=qt(Yn.size),Yn.stroke=qt(Yn.stroke),Yn.width=qt(Yn.width),Yn.fill=qt(Yn.fill);const Mr=r.focus=tr({},t.focus||{alpha:.3},ne.focus),zi=Mr.prox>=0,Rn=zi&&Yn.one;let Er=[],no=[],Hi=[];function _s(V,X){let ie=Yn.show(r,X);if(ie instanceof HTMLElement)return ri(ie,Fk),ri(ie,V.class),Zi(ie,-10,-10,Ct,Ke),o.insertBefore(ie,Er[X]),ie}function la(V,X){if(f==1||X>0){let ie=f==1&&T[V.scale].time,oe=V.value;V.value=ie?Kg(oe)?um(D,cm(oe,W)):oe||Z:oe||Q_,V.label=V.label||(ie?H_:z_)}if(Rn||X>0){V.width=V.width==null?1:V.width,V.paths=V.paths||hS||t_,V.fillTo=qt(V.fillTo||nS),V.pxAlign=+tn(V.pxAlign,u),V.pxRound=$m(V.pxAlign),V.stroke=qt(V.stroke||null),V.fill=qt(V.fill||null),V._stroke=V._fill=V._paths=V._focus=null;let ie=Z_(Nr(1,V.width),1),oe=V.points=tr({},{size:ie,width:Nr(1,ie*.2),stroke:V.stroke,space:ie*2,paths:dS,_stroke:null,_fill:null},V.points);oe.show=qt(oe.show),oe.filter=qt(oe.filter),oe.fill=qt(oe.fill),oe.stroke=qt(oe.stroke),oe.paths=qt(oe.paths),oe.pxAlign=V.pxAlign}if(ae){let ie=Jt(V,X);Ee.splice(X,0,ie[0]),Ze.splice(X,0,ie[1]),he.values.push(null)}if(ue){te.splice(X,0,null);let ie=null;Rn?X==0&&(ie=_s(V,X)):X>0&&(ie=_s(V,X)),Er.splice(X,0,ie),no.splice(X,0,0),Hi.splice(X,0,0)}st("addSeries",X)}function Xa(V,X){X=X??x.length,V=f==1?ch(V,X,vm,_m):ch(V,X,{},km),x.splice(X,0,V),la(x[X],X)}r.addSeries=Xa;function Qa(V){if(x.splice(V,1),ae){he.values.splice(V,1),Ze.splice(V,1);let X=Ee.splice(V,1)[0];Fn(null,X.firstChild),X.remove()}ue&&(te.splice(V,1),Er.splice(V,1)[0].remove(),no.splice(V,1),Hi.splice(V,1)),st("delSeries",V)}r.delSeries=Qa;const Ui=[!1,!1,!1,!1];function ai(V,X){if(V._show=V.show,V.show){let ie=V.side%2,oe=T[V.scale];oe==null&&(V.scale=ie?x[1].scale:C,oe=T[V.scale]);let pe=oe.time;V.size=qt(V.size),V.space=qt(V.space),V.rotate=qt(V.rotate),Bo(V.incrs)&&V.incrs.forEach(Me=>{!Po.has(Me)&&Po.set(Me,Vg(Me))}),V.incrs=qt(V.incrs||(oe.distr==2?k_:pe?w==1?S_:$_:ys)),V.splits=qt(V.splits||(pe&&oe.distr==1?U:oe.distr==3?nh:oe.distr==4?q_:V_)),V.stroke=qt(V.stroke),V.grid.stroke=qt(V.grid.stroke),V.ticks.stroke=qt(V.ticks.stroke),V.border.stroke=qt(V.border.stroke);let we=V.values;V.values=Bo(we)&&!Bo(we[0])?qt(we):pe?Bo(we)?lm(D,am(we,W)):Kg(we)?I_(D,we):we||K:we||U_,V.filter=qt(V.filter||(oe.distr>=3&&oe.log==10?Y_:oe.distr==3&&oe.log==2?X_:jg)),V.font=Hm(V.font),V.labelFont=Hm(V.labelFont),V._size=V.size(r,null,X,0),V._space=V._rotate=V._incrs=V._found=V._splits=V._values=null,V._size>0&&(Ui[X]=!0,V._el=vi(Rk,c))}}function Kt(V,X,ie,oe){let[pe,we,Me,Be]=ie,ze=X%2,Ye=0;return ze==0&&(Be||we)&&(Ye=X==0&&!pe||X==2&&!Me?cr(mm.size/3):0),ze==1&&(pe||Me)&&(Ye=X==1&&!we||X==3&&!Be?cr(wm.size/2):0),Ye}const ca=r.padding=(t.padding||[Kt,Kt,Kt,Kt]).map(V=>qt(tn(V,Kt))),Ir=r._padding=ca.map((V,X)=>V(r,X,Ui,0));let Xn,xn=null,Bn=null;const bi=f==1?x[0].idxs:null;let Lr=null,wi=!1;function jo(V,X){if(e=V??[],r.data=r._data=e,f==2){Xn=0;for(let ie=1;ie<x.length;ie++)Xn+=e[ie][0].length}else{e.length==0&&(r.data=r._data=e=[[]]),Lr=e[0],Xn=Lr.length;let ie=e;if(P==2){ie=e.slice();let oe=ie[0]=Array(Xn);for(let pe=0;pe<Xn;pe++)oe[pe]=pe}r._data=e=ie}if(qi(!0),st("setData"),P==2&&(Yr=!0),X!==!1){let ie=H;ie.auto(r,wi)?Ss():rr(C,ie.min,ie.max),Wi=Wi||ne.left>=0,xr=!0,so()}}r.setData=jo;function Ss(){wi=!0;let V,X;f==1&&(Xn>0?(xn=bi[0]=0,Bn=bi[1]=Xn-1,V=e[0][xn],X=e[0][Bn],P==2?(V=xn,X=Bn):V==X&&(P==3?[V,X]=Bl(V,V,H.log,!1):P==4?[V,X]=Hu(V,V,H.log,!1):H.time?X=V+cr(86400/w):[V,X]=Wl(V,X,Uu,!0))):(xn=bi[0]=V=null,Bn=bi[1]=X=null)),rr(C,V,X)}let ro,Xr,mo,zo,Qr,Ho,As,Ts,Uo,ur;function $s(V,X,ie,oe,pe,we){V??(V=wg),ie??(ie=Gu),oe??(oe="butt"),pe??(pe=wg),we??(we="round"),V!=ro&&(a.strokeStyle=ro=V),pe!=Xr&&(a.fillStyle=Xr=pe),X!=mo&&(a.lineWidth=mo=X),we!=Qr&&(a.lineJoin=Qr=we),oe!=Ho&&(a.lineCap=Ho=oe),ie!=zo&&a.setLineDash(zo=ie)}function vo(V,X,ie,oe){X!=Xr&&(a.fillStyle=Xr=X),V!=As&&(a.font=As=V),ie!=Ts&&(a.textAlign=Ts=ie),oe!=Uo&&(a.textBaseline=Uo=oe)}function Vo(V,X,ie,oe,pe=0){if(oe.length>0&&V.auto(r,wi)&&(X==null||X.min==null)){let we=tn(xn,0),Me=tn(Bn,oe.length-1),Be=ie.min==null?Yk(oe,we,Me,pe,V.distr==3):[ie.min,ie.max];V.min=Pi(V.min,ie.min=Be[0]),V.max=Nr(V.max,ie.max=Be[1])}}const qo={min:null,max:null};function io(){for(let oe in T){let pe=T[oe];S[oe]==null&&(pe.min==null||S[C]!=null&&pe.auto(r,wi))&&(S[oe]=qo)}for(let oe in T){let pe=T[oe];S[oe]==null&&pe.from!=null&&S[pe.from]!=null&&(S[oe]=qo)}S[C]!=null&&qi(!0);let V={};for(let oe in S){let pe=S[oe];if(pe!=null){let we=V[oe]=Js(T[oe],i_);if(pe.min!=null)tr(we,pe);else if(oe!=C||f==2)if(Xn==0&&we.from==null){let Me=we.range(r,null,null,oe);we.min=Me[0],we.max=Me[1]}else we.min=br,we.max=-1/0}}if(Xn>0){x.forEach((oe,pe)=>{if(f==1){let we=oe.scale,Me=S[we];if(Me==null)return;let Be=V[we];if(pe==0){let ze=Be.range(r,Be.min,Be.max,we);Be.min=ze[0],Be.max=ze[1],xn=Fi(Be.min,e[0]),Bn=Fi(Be.max,e[0]),Bn-xn>1&&(e[0][xn]<Be.min&&xn++,e[0][Bn]>Be.max&&Bn--),oe.min=Lr[xn],oe.max=Lr[Bn]}else oe.show&&oe.auto&&Vo(Be,Me,oe,e[pe],oe.sorted);oe.idxs[0]=xn,oe.idxs[1]=Bn}else if(pe>0&&oe.show&&oe.auto){let[we,Me]=oe.facets,Be=we.scale,ze=Me.scale,[Ye,et]=e[pe],nt=V[Be],St=V[ze];nt!=null&&Vo(nt,S[Be],we,Ye,we.sorted),St!=null&&Vo(St,S[ze],Me,et,Me.sorted),oe.min=Me.min,oe.max=Me.max}});for(let oe in V){let pe=V[oe],we=S[oe];if(pe.from==null&&(we==null||we.min==null)){let Me=pe.range(r,pe.min==br?null:pe.min,pe.max==-1/0?null:pe.max,oe);pe.min=Me[0],pe.max=Me[1]}}}for(let oe in V){let pe=V[oe];if(pe.from!=null){let we=V[pe.from];if(we.min==null)pe.min=pe.max=null;else{let Me=pe.range(r,we.min,we.max,oe);pe.min=Me[0],pe.max=Me[1]}}}let X={},ie=!1;for(let oe in V){let pe=V[oe],we=T[oe];if(we.min!=pe.min||we.max!=pe.max){we.min=pe.min,we.max=pe.max;let Me=we.distr;we._min=Me==3?ho(we.min):Me==4?qu(we.min,we.asinh):Me==100?we.fwd(we.min):we.min,we._max=Me==3?ho(we.max):Me==4?qu(we.max,we.asinh):Me==100?we.fwd(we.max):we.max,X[oe]=ie=!0}}if(ie){x.forEach((oe,pe)=>{f==2?pe>0&&X.y&&(oe._paths=null):X[oe.scale]&&(oe._paths=null)});for(let oe in X)Yr=!0,st("setScale",oe);ue&&ne.left>=0&&(Wi=xr=!0)}for(let oe in S)S[oe]=null}function Ms(V){let X=Ku(xn-1,0,Xn-1),ie=Ku(Bn+1,0,Xn-1);for(;V[X]==null&&X>0;)X--;for(;V[ie]==null&&ie<Xn-1;)ie++;return[X,ie]}function ua(){if(Xn>0){let V=x.some(X=>X._focus)&&ur!=Mr.alpha;V&&(a.globalAlpha=ur=Mr.alpha),x.forEach((X,ie)=>{if(ie>0&&X.show&&(Ko(ie,!1),Ko(ie,!0),X._paths==null)){let oe=ur;ur!=X.alpha&&(a.globalAlpha=ur=X.alpha);let pe=f==2?[0,e[ie][0].length-1]:Ms(e[ie]);X._paths=X.paths(r,ie,pe[0],pe[1]),ur!=oe&&(a.globalAlpha=ur=oe)}}),x.forEach((X,ie)=>{if(ie>0&&X.show){let oe=ur;ur!=X.alpha&&(a.globalAlpha=ur=X.alpha),X._paths!=null&&Go(ie,!1);{let pe=X._paths!=null?X._paths.gaps:null,we=X.points.show(r,ie,xn,Bn,pe),Me=X.points.filter(r,ie,we,pe);(we||Me)&&(X.points._paths=X.points.paths(r,ie,xn,Bn,Me),Go(ie,!0))}ur!=oe&&(a.globalAlpha=ur=oe),st("drawSeries",ie)}}),V&&(a.globalAlpha=ur=1)}}function Ko(V,X){let ie=X?x[V].points:x[V];ie._stroke=ie.stroke(r,V),ie._fill=ie.fill(r,V)}function Go(V,X){let ie=X?x[V].points:x[V],{stroke:oe,fill:pe,clip:we,flags:Me,_stroke:Be=ie._stroke,_fill:ze=ie._fill,_width:Ye=ie.width}=ie._paths;Ye=mn(Ye*rn,3);let et=null,nt=Ye%2/2;X&&ze==null&&(ze=Ye>0?"#fff":Be);let St=ie.pxAlign==1&&nt>0;if(St&&a.translate(nt,nt),!X){let Ut=Pt-Ye/2,Mt=Nt-Ye/2,jt=pt+Ye,yt=kt+Ye;et=new Path2D,et.rect(Ut,Mt,jt,yt)}X?yo(Be,Ye,ie.dash,ie.cap,ze,oe,pe,Me,we):Es(V,Be,Ye,ie.dash,ie.cap,ze,oe,pe,Me,et,we),St&&a.translate(-nt,-nt)}function Es(V,X,ie,oe,pe,we,Me,Be,ze,Ye,et){let nt=!1;ze!=0&&k.forEach((St,Ut)=>{if(St.series[0]==V){let Mt=x[St.series[1]],jt=e[St.series[1]],yt=(Mt._paths||Pa).band;Bo(yt)&&(yt=St.dir==1?yt[0]:yt[1]);let ut,vn=null;Mt.show&&yt&&Qk(jt,xn,Bn)?(vn=St.fill(r,Ut)||we,ut=Mt._paths.clip):yt=null,yo(X,ie,oe,pe,vn,Me,Be,ze,Ye,et,ut,yt),nt=!0}}),nt||yo(X,ie,oe,pe,we,Me,Be,ze,Ye,et)}const Yo=ta|ih;function yo(V,X,ie,oe,pe,we,Me,Be,ze,Ye,et,nt){$s(V,X,ie,oe,pe),(ze||Ye||nt)&&(a.save(),ze&&a.clip(ze),Ye&&a.clip(Ye)),nt?(Be&Yo)==Yo?(a.clip(nt),et&&a.clip(et),hr(pe,Me),xi(V,we,X)):Be&ih?(hr(pe,Me),a.clip(nt),xi(V,we,X)):Be&ta&&(a.save(),a.clip(nt),et&&a.clip(et),hr(pe,Me),a.restore(),xi(V,we,X)):(hr(pe,Me),xi(V,we,X)),(ze||Ye||nt)&&a.restore()}function xi(V,X,ie){ie>0&&(X instanceof Map?X.forEach((oe,pe)=>{a.strokeStyle=ro=pe,a.stroke(oe)}):X!=null&&V&&a.stroke(X))}function hr(V,X){X instanceof Map?X.forEach((ie,oe)=>{a.fillStyle=Xr=oe,a.fill(ie)}):X!=null&&V&&a.fill(X)}function oo(V,X,ie,oe){let pe=E[V],we;if(oe<=0)we=[0,0];else{let Me=pe._space=pe.space(r,V,X,ie,oe),Be=pe._incrs=pe.incrs(r,V,X,ie,oe,Me);we=yS(X,ie,Be,oe,Me)}return pe._found=we}function Vi(V,X,ie,oe,pe,we,Me,Be,ze,Ye){let et=Me%2/2;u==1&&a.translate(et,et),$s(Be,Me,ze,Ye,Be),a.beginPath();let nt,St,Ut,Mt,jt=pe+(oe==0||oe==3?-we:we);ie==0?(St=pe,Mt=jt):(nt=pe,Ut=jt);for(let yt=0;yt<V.length;yt++)X[yt]!=null&&(ie==0?nt=Ut=V[yt]:St=Mt=V[yt],a.moveTo(nt,St),a.lineTo(Ut,Mt));a.stroke(),u==1&&a.translate(-et,-et)}function ha(V){let X=!0;return E.forEach((ie,oe)=>{if(!ie.show)return;let pe=T[ie.scale];if(pe.min==null){ie._show&&(X=!1,ie._show=!1,qi(!1));return}else ie._show||(X=!1,ie._show=!0,qi(!1));let we=ie.side,Me=we%2,{min:Be,max:ze}=pe,[Ye,et]=oo(oe,Be,ze,Me==0?Ct:Ke);if(et==0)return;let nt=pe.distr==2,St=ie._splits=ie.splits(r,oe,Be,ze,Ye,et,nt),Ut=pe.distr==2?St.map(ut=>Lr[ut]):St,Mt=pe.distr==2?Lr[St[1]]-Lr[St[0]]:Ye,jt=ie._values=ie.values(r,ie.filter(r,Ut,oe,et,Mt),oe,et,Mt);ie._rotate=we==2?ie.rotate(r,jt,oe,et):0;let yt=ie._size;ie._size=yi(ie.size(r,jt,oe,V)),yt!=null&&ie._size!=yt&&(X=!1)}),X}function Za(V){let X=!0;return ca.forEach((ie,oe)=>{let pe=ie(r,oe,Ui,V);pe!=Ir[oe]&&(X=!1),Ir[oe]=pe}),X}function bo(){for(let V=0;V<E.length;V++){let X=E[V];if(!X.show||!X._show)continue;let ie=X.side,oe=ie%2,pe,we,Me=X.stroke(r,V),Be=ie==0||ie==3?-1:1,[ze,Ye]=X._found;if(X.label!=null){let pn=X.labelGap*Be,vr=cr((X._lpos+pn)*rn);vo(X.labelFont[0],Me,"center",ie==2?Da:bg),a.save(),oe==1?(pe=we=0,a.translate(vr,cr(Nt+kt/2)),a.rotate((ie==3?-jl:jl)/2)):(pe=cr(Pt+pt/2),we=vr);let _o=Bg(X.label)?X.label(r,V,ze,Ye):X.label;a.fillText(_o,pe,we),a.restore()}if(Ye==0)continue;let et=T[X.scale],nt=oe==0?pt:kt,St=oe==0?Pt:Nt,Ut=X._splits,Mt=et.distr==2?Ut.map(pn=>Lr[pn]):Ut,jt=et.distr==2?Lr[Ut[1]]-Lr[Ut[0]]:ze,yt=X.ticks,ut=X.border,vn=yt.show?yt.size:0,In=cr(vn*rn),or=cr((X.alignTo==2?X._size-vn-X.gap:X.gap)*rn),Qt=X._rotate*-jl/180,fe=m(X._pos*rn),_e=(In+or)*Be,xe=fe+_e;we=oe==0?xe:0,pe=oe==1?xe:0;let qe=X.font[0],ft=X.align==1?Gs:X.align==2?Ru:Qt>0?Gs:Qt<0?Ru:oe==0?"center":ie==3?Ru:Gs,Dt=Qt||oe==1?"middle":ie==2?Da:bg;vo(qe,Me,ft,Dt);let en=X.font[1]*X.lineGap,Bt=Ut.map(pn=>m(b(pn,et,nt,St))),Wr=X._values;for(let pn=0;pn<Wr.length;pn++){let vr=Wr[pn];if(vr!=null){oe==0?pe=Bt[pn]:we=Bt[pn],vr=""+vr;let _o=vr.indexOf(`
1489
- `)==-1?[vr]:vr.split(/\n/gm);for(let Hn=0;Hn<_o.length;Hn++){let Ls=_o[Hn];Qt?(a.save(),a.translate(pe,we+Hn*en),a.rotate(Qt),a.fillText(Ls,0,0),a.restore()):a.fillText(Ls,pe,we+Hn*en)}}}yt.show&&Vi(Bt,yt.filter(r,Mt,V,Ye,jt),oe,ie,fe,In,mn(yt.width*rn,3),yt.stroke(r,V),yt.dash,yt.cap);let Ai=X.grid;Ai.show&&Vi(Bt,Ai.filter(r,Mt,V,Ye,jt),oe,oe==0?2:1,oe==0?Nt:Pt,oe==0?kt:pt,mn(Ai.width*rn,3),Ai.stroke(r,V),Ai.dash,Ai.cap),ut.show&&Vi([fe],[1],oe==0?1:0,oe==0?1:2,oe==1?Nt:Pt,oe==1?kt:pt,mn(ut.width*rn,3),ut.stroke(r,V),ut.dash,ut.cap)}st("drawAxes")}function qi(V){x.forEach((X,ie)=>{ie>0&&(X._paths=null,V&&(f==1?(X.min=null,X.max=null):X.facets.forEach(oe=>{oe.min=null,oe.max=null})))})}let wo=!1,Xo=!1,xo=[];function da(){Xo=!1;for(let V=0;V<xo.length;V++)st(...xo[V]);xo.length=0}function so(){wo||(h_(fa),wo=!0)}function je(V,X=!1){wo=!0,Xo=X,V(r),fa(),X&&xo.length>0&&queueMicrotask(da)}r.batch=je;function fa(){if($n&&(io(),$n=!1),Yr&&(si(),Yr=!1),$r){if(Sn(l,Gs,ke),Sn(l,Da,Ve),Sn(l,Ra,Ct),Sn(l,Oa,Ke),Sn(o,Gs,ke),Sn(o,Da,Ve),Sn(o,Ra,Ct),Sn(o,Oa,Ke),Sn(c,Ra,Pn),Sn(c,Oa,nr),s.width=cr(Pn*rn),s.height=cr(nr*rn),E.forEach(({_el:V,_show:X,_size:ie,_pos:oe,side:pe})=>{if(V!=null)if(X){let we=pe===3||pe===0?ie:0,Me=pe%2==1;Sn(V,Me?"left":"top",oe-we),Sn(V,Me?"width":"height",ie),Sn(V,Me?"top":"left",Me?Ve:ke),Sn(V,Me?"height":"width",Me?Ke:Ct),Wu(V,ps)}else ri(V,ps)}),ro=Xr=mo=Qr=Ho=As=Ts=Uo=zo=null,ur=1,B(!0),ke!=Je||Ve!=vt||Ct!=Tt||Ke!=At){qi(!1);let V=Ct/Tt,X=Ke/At;if(ue&&!Wi&&ne.left>=0){ne.left*=V,ne.top*=X,li&&Zi(li,cr(ne.left),0,Ct,Ke),Qn&&Zi(Qn,0,cr(ne.top),Ct,Ke);for(let ie=0;ie<Er.length;ie++){let oe=Er[ie];oe!=null&&(no[ie]*=V,Hi[ie]*=X,Zi(oe,yi(no[ie]),yi(Hi[ie]),Ct,Ke))}}if(_t.show&&!po&&_t.left>=0&&_t.width>0){_t.left*=V,_t.width*=V,_t.top*=X,_t.height*=X;for(let ie in Y)Sn(Pr,ie,_t[ie])}Je=ke,vt=Ve,Tt=Ct,At=Ke}st("setSize"),$r=!1}Pn>0&&nr>0&&(a.clearRect(0,0,s.width,s.height),st("drawClear"),R.forEach(V=>V()),st("draw")),_t.show&&po&&(fn(_t),po=!1),ue&&Wi&&(_(null,!0,!1),Wi=!1),he.show&&he.live&&xr&&(y(),xr=!1),h||(h=!0,r.status=1,st("ready")),wi=!1,wo=!1}r.redraw=(V,X)=>{Yr=X||!1,V!==!1?rr(C,H.min,H.max):so()};function De(V,X){let ie=T[V];if(ie.from==null){if(Xn==0){let oe=ie.range(r,X.min,X.max,V);X.min=oe[0],X.max=oe[1]}if(X.min>X.max){let oe=X.min;X.min=X.max,X.max=oe}if(Xn>1&&X.min!=null&&X.max!=null&&X.max-X.min<1e-16)return;V==C&&ie.distr==2&&Xn>0&&(X.min=Fi(X.min,e[0]),X.max=Fi(X.max,e[0]),X.min==X.max&&X.max++),S[V]=X,$n=!0,so()}}r.setScale=De;let On,Co,li,Qn,pa,ko,Ci,ao,an,nn,ln,Gt,ki=!1;const Wn=ne.drag;let He=Wn.x,Cn=Wn.y;ue&&(ne.x&&(On=vi(Dk,o)),ne.y&&(Co=vi(Nk,o)),H.ori==0?(li=On,Qn=Co):(li=Co,Qn=On),ln=ne.left,Gt=ne.top);const _t=r.select=tr({show:!0,over:!0,left:0,width:0,top:0,height:0},t.select),Pr=_t.show?vi(Ok,_t.over?o:l):null;function fn(V,X){if(_t.show){for(let ie in V)_t[ie]=V[ie],ie in Y&&Sn(Pr,ie,V[ie]);X!==!1&&st("setSelect")}}r.setSelect=fn;function An(V){if(x[V].show)ae&&Wu(Ee[V],ps);else if(ae&&ri(Ee[V],ps),ue){let X=Rn?Er[0]:Er[V];X!=null&&Zi(X,-10,-10,Ct,Ke)}}function rr(V,X,ie){De(V,{min:X,max:ie})}function Br(V,X,ie,oe){X.focus!=null&&pr(V),X.show!=null&&x.forEach((pe,we)=>{we>0&&(V==we||V==null)&&(pe.show=X.show,An(we),f==2?(rr(pe.facets[0].scale,null,null),rr(pe.facets[1].scale,null,null)):rr(pe.scale,null,null),so())}),ie!==!1&&st("setSeries",V,X),oe&&Ot("setSeries",r,V,X)}r.setSeries=Br;function _i(V,X){tr(k[V],X)}function jn(V,X){V.fill=qt(V.fill||null),V.dir=tn(V.dir,-1),X=X??k.length,k.splice(X,0,V)}function Zr(V){V==null?k.length=0:k.splice(V,1)}r.addBand=jn,r.setBand=_i,r.delBand=Zr;function Qo(V,X){x[V].alpha=X,ue&&Er[V]!=null&&(Er[V].style.opacity=X),ae&&Ee[V]&&(Ee[V].style.opacity=X)}let zn,ci,ui;const Si={focus:!0};function pr(V){if(V!=ui){let X=V==null,ie=Mr.alpha!=1;x.forEach((oe,pe)=>{if(f==1||pe>0){let we=X||pe==0||pe==V;oe._focus=X?null:we,ie&&Qo(pe,we?1:Mr.alpha)}}),ui=V,ie&&so()}}ae&&zi&&wn(kg,ge,V=>{ne._lock||(ji(V),ui!=null&&Br(null,Si,!0,dt.setSeries))});function gr(V,X,ie){let oe=T[X];ie&&(V=V/rn-(oe.ori==1?Ve:ke));let pe=Ct;oe.ori==1&&(pe=Ke,V=pe-V),oe.dir==-1&&(V=pe-V);let we=oe._min,Me=oe._max,Be=V/pe,ze=we+(Me-we)*Be,Ye=oe.distr;return Ye==3?Qs(10,ze):Ye==4?Jk(ze,oe.asinh):Ye==100?oe.bwd(ze):ze}function Cr(V,X){let ie=gr(V,C,X);return Fi(ie,e[0],xn,Bn)}r.valToIdx=V=>Fi(V,e[0]),r.posToIdx=Cr,r.posToVal=gr,r.valToPos=(V,X,ie)=>T[X].ori==0?d(V,T[X],ie?pt:Ct,ie?Pt:0):p(V,T[X],ie?kt:Ke,ie?Nt:0),r.setCursor=(V,X,ie)=>{ln=V.left,Gt=V.top,_(null,X,ie)};function Is(V,X){Sn(Pr,Gs,_t.left=V),Sn(Pr,Ra,_t.width=X)}function kr(V,X){Sn(Pr,Da,_t.top=V),Sn(Pr,Oa,_t.height=X)}let Rr=H.ori==0?Is:kr,hi=H.ori==1?Is:kr;function di(){if(ae&&he.live)for(let V=f==2?1:0;V<x.length;V++){if(V==0&&gt)continue;let X=he.values[V],ie=0;for(let oe in X)Ze[V][ie++].firstChild.nodeValue=X[oe]}}function y(V,X){if(V!=null&&(V.idxs?V.idxs.forEach((ie,oe)=>{te[oe]=ie}):r_(V.idx)||te.fill(V.idx),he.idx=te[0]),ae&&he.live){for(let ie=0;ie<x.length;ie++)(ie>0||f==1&&!gt)&&$(ie,te[ie]);di()}xr=!1,X!==!1&&st("setLegend")}r.setLegend=y;function $(V,X){let ie=x[V],oe=V==0&&P==2?Lr:e[V],pe;gt?pe=ie.values(r,V,X)??at:(pe=ie.value(r,X==null?null:oe[X],V,X),pe=pe==null?at:{_:pe}),he.values[V]=pe}function _(V,X,ie){an=ln,nn=Gt,[ln,Gt]=ne.move(r,ln,Gt),ne.left=ln,ne.top=Gt,ue&&(li&&Zi(li,cr(ln),0,Ct,Ke),Qn&&Zi(Qn,0,cr(Gt),Ct,Ke));let oe,pe=xn>Bn;zn=br,ci=null;let we=H.ori==0?Ct:Ke,Me=H.ori==1?Ct:Ke;if(ln<0||Xn==0||pe){oe=ne.idx=null;for(let Be=0;Be<x.length;Be++){let ze=Er[Be];ze!=null&&Zi(ze,-10,-10,Ct,Ke)}zi&&Br(null,Si,!0,V==null&&dt.setSeries),he.live&&(te.fill(oe),xr=!0)}else{let Be,ze,Ye;f==1&&(Be=H.ori==0?ln:Gt,ze=gr(Be,C),oe=ne.idx=Fi(ze,e[0],xn,Bn),Ye=O(e[0][oe],H,we,0));let et=-10,nt=-10,St=0,Ut=0,Mt=!0,jt="",yt="";for(let ut=f==2?1:0;ut<x.length;ut++){let vn=x[ut],In=te[ut],or=In==null?null:f==1?e[ut][In]:e[ut][1][In],Qt=ne.dataIdx(r,ut,oe,ze),fe=Qt==null?null:f==1?e[ut][Qt]:e[ut][1][Qt];if(xr=xr||fe!=or||Qt!=In,te[ut]=Qt,ut>0&&vn.show){let _e=Qt==null?-10:Qt==oe?Ye:O(f==1?e[0][Qt]:e[ut][0][Qt],H,we,0),xe=fe==null?-10:A(fe,f==1?T[vn.scale]:T[vn.facets[1].scale],Me,0);if(zi&&fe!=null){let qe=H.ori==1?ln:Gt,ft=lr(Mr.dist(r,ut,Qt,xe,qe));if(ft<zn){let Dt=Mr.bias;if(Dt!=0){let en=gr(qe,vn.scale),Bt=fe>=0?1:-1,Wr=en>=0?1:-1;Wr==Bt&&(Wr==1?Dt==1?fe>=en:fe<=en:Dt==1?fe<=en:fe>=en)&&(zn=ft,ci=ut)}else zn=ft,ci=ut}}if(xr||Rn){let qe,ft;H.ori==0?(qe=_e,ft=xe):(qe=xe,ft=_e);let Dt,en,Bt,Wr,Ai,pn,vr=!0,_o=Yn.bbox;if(_o!=null){vr=!1;let Hn=_o(r,ut);Bt=Hn.left,Wr=Hn.top,Dt=Hn.width,en=Hn.height}else Bt=qe,Wr=ft,Dt=en=Yn.size(r,ut);if(pn=Yn.fill(r,ut),Ai=Yn.stroke(r,ut),Rn)ut==ci&&zn<=Mr.prox&&(et=Bt,nt=Wr,St=Dt,Ut=en,Mt=vr,jt=pn,yt=Ai);else{let Hn=Er[ut];Hn!=null&&(no[ut]=Bt,Hi[ut]=Wr,Eg(Hn,Dt,en,vr),$g(Hn,pn,Ai),Zi(Hn,yi(Bt),yi(Wr),Ct,Ke))}}}}if(Rn){let ut=Mr.prox,vn=ui==null?zn<=ut:zn>ut||ci!=ui;if(xr||vn){let In=Er[0];In!=null&&(no[0]=et,Hi[0]=nt,Eg(In,St,Ut,Mt),$g(In,jt,yt),Zi(In,yi(et),yi(nt),Ct,Ke))}}}if(_t.show&&ki)if(V!=null){let[Be,ze]=dt.scales,[Ye,et]=dt.match,[nt,St]=V.cursor.sync.scales,Ut=V.cursor.drag;if(He=Ut._x,Cn=Ut._y,He||Cn){let{left:Mt,top:jt,width:yt,height:ut}=V.select,vn=V.scales[nt].ori,In=V.posToVal,or,Qt,fe,_e,xe,qe=Be!=null&&Ye(Be,nt),ft=ze!=null&&et(ze,St);qe&&He?(vn==0?(or=Mt,Qt=yt):(or=jt,Qt=ut),fe=T[Be],_e=O(In(or,nt),fe,we,0),xe=O(In(or+Qt,nt),fe,we,0),Rr(Pi(_e,xe),lr(xe-_e))):Rr(0,we),ft&&Cn?(vn==1?(or=Mt,Qt=yt):(or=jt,Qt=ut),fe=T[ze],_e=A(In(or,St),fe,Me,0),xe=A(In(or+Qt,St),fe,Me,0),hi(Pi(_e,xe),lr(xe-_e))):hi(0,Me)}else Q()}else{let Be=lr(an-pa),ze=lr(nn-ko);if(H.ori==1){let St=Be;Be=ze,ze=St}He=Wn.x&&Be>=Wn.dist,Cn=Wn.y&&ze>=Wn.dist;let Ye=Wn.uni;Ye!=null?He&&Cn&&(He=Be>=Ye,Cn=ze>=Ye,!He&&!Cn&&(ze>Be?Cn=!0:He=!0)):Wn.x&&Wn.y&&(He||Cn)&&(He=Cn=!0);let et,nt;He&&(H.ori==0?(et=Ci,nt=ln):(et=ao,nt=Gt),Rr(Pi(et,nt),lr(nt-et)),Cn||hi(0,Me)),Cn&&(H.ori==1?(et=Ci,nt=ln):(et=ao,nt=Gt),hi(Pi(et,nt),lr(nt-et)),He||Rr(0,we)),!He&&!Cn&&(Rr(0,0),hi(0,0))}if(Wn._x=He,Wn._y=Cn,V==null){if(ie){if(Mn!=null){let[Be,ze]=dt.scales;dt.values[0]=Be!=null?gr(H.ori==0?ln:Gt,Be):null,dt.values[1]=ze!=null?gr(H.ori==1?ln:Gt,ze):null}Ot(Du,r,ln,Gt,Ct,Ke,oe)}if(zi){let Be=ie&&dt.setSeries,ze=Mr.prox;ui==null?zn<=ze&&Br(ci,Si,!0,Be):zn>ze?Br(null,Si,!0,Be):ci!=ui&&Br(ci,Si,!0,Be)}}xr&&(he.idx=oe,y()),X!==!1&&st("setCursor")}let N=null;Object.defineProperty(r,"rect",{get(){return N==null&&B(!1),N}});function B(V=!1){V?N=null:(N=o.getBoundingClientRect(),st("syncRect",N))}function j(V,X,ie,oe,pe,we,Me){ne._lock||ki&&V!=null&&V.movementX==0&&V.movementY==0||(q(V,X,ie,oe,pe,we,Me,!1,V!=null),V!=null?_(null,!0,!0):_(X,!0,!1))}function q(V,X,ie,oe,pe,we,Me,Be,ze){if(N==null&&B(!1),ji(V),V!=null)ie=V.clientX-N.left,oe=V.clientY-N.top;else{if(ie<0||oe<0){ln=-10,Gt=-10;return}let[Ye,et]=dt.scales,nt=X.cursor.sync,[St,Ut]=nt.values,[Mt,jt]=nt.scales,[yt,ut]=dt.match,vn=X.axes[0].side%2==1,In=H.ori==0?Ct:Ke,or=H.ori==1?Ct:Ke,Qt=vn?we:pe,fe=vn?pe:we,_e=vn?oe:ie,xe=vn?ie:oe;if(Mt!=null?ie=yt(Ye,Mt)?b(St,T[Ye],In,0):-10:ie=In*(_e/Qt),jt!=null?oe=ut(et,jt)?b(Ut,T[et],or,0):-10:oe=or*(xe/fe),H.ori==1){let qe=ie;ie=oe,oe=qe}}ze&&(X==null||X.cursor.event.type==Du)&&((ie<=1||ie>=Ct-1)&&(ie=vs(ie,Ct)),(oe<=1||oe>=Ke-1)&&(oe=vs(oe,Ke))),Be?(pa=ie,ko=oe,[Ci,ao]=ne.move(r,ie,oe)):(ln=ie,Gt=oe)}const Y={width:0,height:0,left:0,top:0};function Q(){fn(Y,!1)}let re,se,ye,Ce;function me(V,X,ie,oe,pe,we,Me){ki=!0,He=Cn=Wn._x=Wn._y=!1,q(V,X,ie,oe,pe,we,Me,!0,!1),V!=null&&(wn(Nu,Pu,be,!1),Ot(xg,r,Ci,ao,Ct,Ke,null));let{left:Be,top:ze,width:Ye,height:et}=_t;re=Be,se=ze,ye=Ye,Ce=et}function be(V,X,ie,oe,pe,we,Me){ki=Wn._x=Wn._y=!1,q(V,X,ie,oe,pe,we,Me,!1,!0);let{left:Be,top:ze,width:Ye,height:et}=_t,nt=Ye>0||et>0,St=re!=Be||se!=ze||ye!=Ye||Ce!=et;if(nt&&St&&fn(_t),Wn.setScale&&nt&&St){let Ut=Be,Mt=Ye,jt=ze,yt=et;if(H.ori==1&&(Ut=ze,Mt=et,jt=Be,yt=Ye),He&&rr(C,gr(Ut,C),gr(Ut+Mt,C)),Cn)for(let ut in T){let vn=T[ut];ut!=C&&vn.from==null&&vn.min!=br&&rr(ut,gr(jt+yt,ut),gr(jt,ut))}Q()}else ne.lock&&(ne._lock=!ne._lock,_(X,!0,V!=null));V!=null&&(Fn(Nu,Pu),Ot(Nu,r,ln,Gt,Ct,Ke,null))}function Oe(V,X,ie,oe,pe,we,Me){if(ne._lock)return;ji(V);let Be=ki;if(ki){let ze=!0,Ye=!0,et=10,nt,St;H.ori==0?(nt=He,St=Cn):(nt=Cn,St=He),nt&&St&&(ze=ln<=et||ln>=Ct-et,Ye=Gt<=et||Gt>=Ke-et),nt&&ze&&(ln=ln<Ci?0:Ct),St&&Ye&&(Gt=Gt<ao?0:Ke),_(null,!0,!0),ki=!1}ln=-10,Gt=-10,te.fill(null),_(null,!0,!0),Be&&(ki=Be)}function Re(V,X,ie,oe,pe,we,Me){ne._lock||(ji(V),Ss(),Q(),V!=null&&Ot(_g,r,ln,Gt,Ct,Ke,null))}function Ge(){E.forEach(bS),go(r.width,r.height,!0)}gs(Nl,Xs,Ge);const ht={};ht.mousedown=me,ht.mousemove=j,ht.mouseup=be,ht.dblclick=Re,ht.setSeries=(V,X,ie,oe)=>{let pe=dt.match[2];ie=pe(r,X,ie),ie!=-1&&Br(ie,oe,!0,!1)},ue&&(wn(xg,o,me),wn(Du,o,j),wn(Cg,o,V=>{ji(V),B(!1)}),wn(kg,o,Oe),wn(_g,o,Re),lh.add(r),r.syncRect=B);const tt=r.hooks=t.hooks||{};function st(V,X,ie){Xo?xo.push([V,X,ie]):V in tt&&tt[V].forEach(oe=>{oe.call(null,r,X,ie)})}(t.plugins||[]).forEach(V=>{for(let X in V.hooks)tt[X]=(tt[X]||[]).concat(V.hooks[X])});const kn=(V,X,ie)=>ie,dt=tr({key:null,setSeries:!1,filters:{pub:zg,sub:zg},scales:[C,x[1]?x[1].scale:null],match:[Hg,Hg,kn],values:[null,null]},ne.sync);dt.match.length==2&&dt.match.push(kn),ne.sync=dt;const Mn=dt.key,$t=Tm(Mn);function Ot(V,X,ie,oe,pe,we,Me){dt.filters.pub(V,X,ie,oe,pe,we,Me)&&$t.pub(V,X,ie,oe,pe,we,Me)}$t.sub(r);function ir(V,X,ie,oe,pe,we,Me){dt.filters.sub(V,X,ie,oe,pe,we,Me)&&ht[V](null,X,ie,oe,pe,we,Me)}r.pub=ir;function mr(){$t.unsub(r),lh.delete(r),wr.clear(),zu(Nl,Xs,Ge),g.remove(),ge==null||ge.remove(),st("destroy")}r.destroy=mr;function En(){st("init",t,e),jo(e||t.data,!1),S[C]?De(C,S[C]):Ss(),po=_t.show&&(_t.width>0||_t.height>0),Wi=xr=!0,go(t.width,t.height)}return x.forEach(la),E.forEach(ai),n?n instanceof HTMLElement?(n.appendChild(g),En()):n(r,En):En(),r}Ar.assign=tr,Ar.fmtNum=Vu,Ar.rangeNum=Wl,Ar.rangeLog=Bl,Ar.rangeAsinh=Hu,Ar.orient=bs,Ar.pxRatio=rn,Ar.join=u_,Ar.fmtDate=Yu,Ar.tzDate=x_,Ar.sync=Tm;{Ar.addGap=rS,Ar.clipGaps=Kl;let t=Ar.paths={points:Om};t.linear=Nm,t.stepped=sS,t.bars=aS,t.spline=cS}var Um,Vm;function wS(){return Vm||(Vm=1,Um=function(t,e,n,r,f){var d,p;if(r===void 0)r=0;else if(r=r|0,r<0||r>=t.length)throw new RangeError("invalid lower bound");if(f===void 0)f=t.length-1;else if(f=f|0,f<r||f>=t.length)throw new RangeError("invalid upper bound");for(;r<=f;)if(d=r+(f-r>>>1),p=+n(t[d],e,d,t),p<0)r=d+1;else if(p>0)f=d-1;else return d;return~r}),Um}var xS=wS();const pN=sr("g",ml(xS));var uh,qm;function CS(){if(qm)return uh;qm=1;function t(e,n,r){var f=-1,d=e.length;n<0&&(n=-n>d?0:d+n),r=r>d?d:r,r<0&&(r+=d),d=n>r?0:r-n>>>0,n>>>=0;for(var p=Array(d);++f<d;)p[f]=e[f+n];return p}return uh=t,uh}var hh,Km;function kS(){if(Km)return hh;Km=1;var t=CS();function e(n,r,f){var d=n.length;return f=f===void 0?d:f,!r&&f>=d?n:t(n,r,f)}return hh=e,hh}var dh,Gm;function Ym(){if(Gm)return dh;Gm=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",f=e+n+r,d="\\ufe0e\\ufe0f",p="\\u200d",b=RegExp("["+p+t+f+d+"]");function h(g){return b.test(g)}return dh=h,dh}var fh,Xm;function _S(){if(Xm)return fh;Xm=1;function t(e){return e.split("")}return fh=t,fh}var ph,Qm;function SS(){if(Qm)return ph;Qm=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",f=e+n+r,d="\\ufe0e\\ufe0f",p="["+t+"]",b="["+f+"]",h="\\ud83c[\\udffb-\\udfff]",g="(?:"+b+"|"+h+")",s="[^"+t+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",c="[\\ud800-\\udbff][\\udc00-\\udfff]",l="\\u200d",o=g+"?",u="["+d+"]?",m="(?:"+l+"(?:"+[s,a,c].join("|")+")"+u+o+")*",w=u+o+m,x="(?:"+[s+b+"?",b,a,c,p].join("|")+")",E=RegExp(h+"(?="+h+")|"+x+w,"g");function T(k){return k.match(E)||[]}return ph=T,ph}var gh,Zm;function AS(){if(Zm)return gh;Zm=1;var t=_S(),e=Ym(),n=SS();function r(f){return e(f)?n(f):t(f)}return gh=r,gh}var mh,Jm;function TS(){if(Jm)return mh;Jm=1;var t=typeof Fo=="object"&&Fo&&Fo.Object===Object&&Fo;return mh=t,mh}var vh,ev;function $S(){if(ev)return vh;ev=1;var t=TS(),e=typeof self=="object"&&self&&self.Object===Object&&self,n=t||e||Function("return this")();return vh=n,vh}var yh,tv;function bh(){if(tv)return yh;tv=1;var t=$S(),e=t.Symbol;return yh=e,yh}var wh,nv;function MS(){if(nv)return wh;nv=1;function t(e,n){for(var r=-1,f=e==null?0:e.length,d=Array(f);++r<f;)d[r]=n(e[r],r,e);return d}return wh=t,wh}var xh,rv;function ES(){if(rv)return xh;rv=1;var t=Array.isArray;return xh=t,xh}var Ch,iv;function IS(){if(iv)return Ch;iv=1;var t=bh(),e=Object.prototype,n=e.hasOwnProperty,r=e.toString,f=t?t.toStringTag:void 0;function d(p){var b=n.call(p,f),h=p[f];try{p[f]=void 0;var g=!0}catch{}var s=r.call(p);return g&&(b?p[f]=h:delete p[f]),s}return Ch=d,Ch}var kh,ov;function LS(){if(ov)return kh;ov=1;var t=Object.prototype,e=t.toString;function n(r){return e.call(r)}return kh=n,kh}var _h,sv;function RS(){if(sv)return _h;sv=1;var t=bh(),e=IS(),n=LS(),r="[object Null]",f="[object Undefined]",d=t?t.toStringTag:void 0;function p(b){return b==null?b===void 0?f:r:d&&d in Object(b)?e(b):n(b)}return _h=p,_h}var Sh,av;function OS(){if(av)return Sh;av=1;function t(e){return e!=null&&typeof e=="object"}return Sh=t,Sh}var Ah,lv;function DS(){if(lv)return Ah;lv=1;var t=RS(),e=OS(),n="[object Symbol]";function r(f){return typeof f=="symbol"||e(f)&&t(f)==n}return Ah=r,Ah}var Th,cv;function NS(){if(cv)return Th;cv=1;var t=bh(),e=MS(),n=ES(),r=DS(),f=t?t.prototype:void 0,d=f?f.toString:void 0;function p(b){if(typeof b=="string")return b;if(n(b))return e(b,p)+"";if(r(b))return d?d.call(b):"";var h=b+"";return h=="0"&&1/b==-1/0?"-0":h}return Th=p,Th}var $h,uv;function Ql(){if(uv)return $h;uv=1;var t=NS();function e(n){return n==null?"":t(n)}return $h=e,$h}var Mh,hv;function FS(){if(hv)return Mh;hv=1;var t=kS(),e=Ym(),n=AS(),r=Ql();function f(d){return function(p){p=r(p);var b=e(p)?n(p):void 0,h=b?b[0]:p.charAt(0),g=b?t(b,1).join(""):p.slice(1);return h[d]()+g}}return Mh=f,Mh}var Eh,dv;function fv(){if(dv)return Eh;dv=1;var t=FS(),e=t("toUpperCase");return Eh=e,Eh}var PS=fv();const BS=ml(PS);var Ih,pv;function WS(){if(pv)return Ih;pv=1;var t=Ql(),e=fv();function n(r){return e(t(r).toLowerCase())}return Ih=n,Ih}var Lh,gv;function jS(){if(gv)return Lh;gv=1;function t(e,n,r,f){var d=-1,p=e==null?0:e.length;for(f&&p&&(r=e[++d]);++d<p;)r=n(r,e[d],d,e);return r}return Lh=t,Lh}var Rh,mv;function zS(){if(mv)return Rh;mv=1;function t(e){return function(n){return e==null?void 0:e[n]}}return Rh=t,Rh}var Oh,vv;function HS(){if(vv)return Oh;vv=1;var t=zS(),e={À:"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"},n=t(e);return Oh=n,Oh}var Dh,yv;function US(){if(yv)return Dh;yv=1;var t=HS(),e=Ql(),n=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,r="\\u0300-\\u036f",f="\\ufe20-\\ufe2f",d="\\u20d0-\\u20ff",p=r+f+d,b="["+p+"]",h=RegExp(b,"g");function g(s){return s=e(s),s&&s.replace(n,t).replace(h,"")}return Dh=g,Dh}var Nh,bv;function VS(){if(bv)return Nh;bv=1;var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function e(n){return n.match(t)||[]}return Nh=e,Nh}var Fh,wv;function qS(){if(wv)return Fh;wv=1;var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function e(n){return t.test(n)}return Fh=e,Fh}var Ph,xv;function KS(){if(xv)return Ph;xv=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",f=e+n+r,d="\\u2700-\\u27bf",p="a-z\\xdf-\\xf6\\xf8-\\xff",b="\\xac\\xb1\\xd7\\xf7",h="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",g="\\u2000-\\u206f",s=" \\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",a="A-Z\\xc0-\\xd6\\xd8-\\xde",c="\\ufe0e\\ufe0f",l=b+h+g+s,o="['’]",u="["+l+"]",m="["+f+"]",w="\\d+",x="["+d+"]",E="["+p+"]",T="[^"+t+l+w+d+p+a+"]",k="\\ud83c[\\udffb-\\udfff]",C="(?:"+m+"|"+k+")",L="[^"+t+"]",R="(?:\\ud83c[\\udde6-\\uddff]){2}",F="[\\ud800-\\udbff][\\udc00-\\udfff]",I="["+a+"]",H="\\u200d",P="(?:"+E+"|"+T+")",O="(?:"+I+"|"+T+")",A="(?:"+o+"(?:d|ll|m|re|s|t|ve))?",S="(?:"+o+"(?:D|LL|M|RE|S|T|VE))?",D=C+"?",W="["+c+"]?",U="(?:"+H+"(?:"+[L,R,F].join("|")+")"+W+D+")*",K="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Z="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",te=W+D+U,he="(?:"+[x,R,F].join("|")+")"+te,ne=RegExp([I+"?"+E+"+"+A+"(?="+[u,I,"$"].join("|")+")",O+"+"+S+"(?="+[u,I+P,"$"].join("|")+")",I+"?"+P+"+"+A,I+"+"+S,Z,K,w,he].join("|"),"g");function ae(ue){return ue.match(ne)||[]}return Ph=ae,Ph}var Bh,Cv;function GS(){if(Cv)return Bh;Cv=1;var t=VS(),e=qS(),n=Ql(),r=KS();function f(d,p,b){return d=n(d),p=b?void 0:p,p===void 0?e(d)?r(d):t(d):d.match(p)||[]}return Bh=f,Bh}var Wh,kv;function YS(){if(kv)return Wh;kv=1;var t=jS(),e=US(),n=GS(),r="['’]",f=RegExp(r,"g");function d(p){return function(b){return t(n(e(b).replace(f,"")),p,"")}}return Wh=d,Wh}var jh,_v;function XS(){if(_v)return jh;_v=1;var t=WS(),e=YS(),n=e(function(r,f,d){return f=f.toLowerCase(),r+(d?t(f):f)});return jh=n,jh}var QS=XS();const ZS=ml(QS),JS=Object.assign({"./ArrayWidget.vue":()=>it(()=>rt.import("./ArrayWidget-DAZApfkV-278468a53d6dcd290939.js"),void 0),"./ArrayplotWidget.vue":()=>it(()=>rt.import("./ArrayplotWidget-BfsxDplv-e75768e19a78a755021f.js"),void 0),"./BlockWidget.vue":()=>it(()=>rt.import("./BlockWidget-SDCUWcMQ-2bc1ff795dd9b8289734.js"),void 0),"./ButtonWidget.vue":()=>it(()=>rt.import("./ButtonWidget-BVMjwC19-21d6311409e6295e5ff1.js"),void 0),"./CanvasWidget.vue":()=>it(()=>rt.import("./CanvasWidget-bVkufjRQ-67d07bc7c7e068b64f55.js"),void 0),"./CanvasdotWidget.vue":()=>it(()=>rt.import("./CanvasdotWidget-DpniFfca-45fb1bde56856286c38d.js"),void 0),"./CanvasimageWidget.vue":()=>it(()=>rt.import("./CanvasimageWidget-DHOSz-dJ-de800e86e1bee6f5a0ff.js"),void 0),"./CanvasimagevalueWidget.vue":()=>it(()=>rt.import("./CanvasimagevalueWidget-zrURWWUL-17057ebfab0467f8b7f5.js"),void 0),"./CanvaslabelWidget.vue":()=>it(()=>rt.import("./CanvaslabelWidget-D-XAMifp-41af33bdafdfcfaeca35.js"),void 0),"./CanvaslabelvalueWidget.vue":()=>it(()=>rt.import("./CanvaslabelvalueWidget-BsIdBtEb-963e3f40288b9cc769c9.js"),void 0),"./CanvaslineWidget.vue":()=>it(()=>rt.import("./CanvaslineWidget-CA2aPGRg-176c5b3f1d9009c13ce0.js"),void 0),"./CanvaslinevalueWidget.vue":()=>it(()=>rt.import("./CanvaslinevalueWidget-J7epKRlo-c968b8847757e14bfb1c.js"),void 0),"./CheckbuttonWidget.vue":()=>it(()=>rt.import("./CheckbuttonWidget-ByH-PDRG-626ee1d1d84173983d50.js"),void 0),"./ComboboxWidget.vue":()=>it(()=>rt.import("./ComboboxWidget-Bdm_fMzW-cab3c8e434fe2c88bab1.js"),void 0),"./DateWidget.vue":()=>it(()=>rt.import("./DateWidget-BaQqthC7-3d8a26b6aafc6de1b56a.js"),void 0),"./DynamicWidget.vue":()=>it(()=>rt.import("./DynamicWidget-CfMtj7H8-28b5c02a544a8b721b2d.js"),void 0),"./FormatvalueWidget.vue":()=>it(()=>rt.import("./FormatvalueWidget--H5B9i_Y-cca10587c6e1ab5b71a6.js"),void 0),"./HorizontalWidget.vue":()=>it(()=>rt.import("./HorizontalWidget-D_gzrOWs-bd70f9d52446f354a3ed.js"),void 0),"./HorizontalboxWidget.vue":()=>it(()=>rt.import("./HorizontalboxWidget-GDcjO-UB-e7a5b1d2df595dfa8528.js"),void 0),"./HorizontallineWidget.vue":()=>it(()=>rt.import("./HorizontallineWidget-DZvOYFxf-5f8d348b3e905046cbc4.js"),void 0),"./IframeWidget.vue":()=>it(()=>rt.import("./IframeWidget-CuUav9b3-4b58f427f7c7c3b092bc.js"),void 0),"./ImageviewerWidget.vue":()=>it(()=>rt.import("./ImageviewerWidget-BMZ6REN4-99508d60b2bf097a6732.js"),void 0),"./LabelWidget.vue":()=>it(()=>rt.import("./LabelWidget-oh6FIG6s-d868fb2bd26ce6d2f3d6.js"),void 0),"./LabelledWidget.vue":()=>it(()=>rt.import("./LabelledWidget-Bic36les-b854193849403490d15f.js"),void 0),"./LabelprogressbarWidget.vue":()=>it(()=>rt.import("./LabelprogressbarWidget-CqIiGoDb-3253bfa6f16674c0a578.js"),void 0),"./LabelsparklineWidget.vue":()=>it(()=>rt.import("./LabelsparklineWidget-DLhmqO02-5615de2dfe11c3bc1e0e.js"),void 0),"./LabelvalueWidget.vue":()=>it(()=>rt.import("./LabelvalueWidget-BefwSSVq-80d87143686ab5e22873.js"),void 0),"./LabelvaluedescWidget.vue":()=>it(()=>rt.import("./LabelvaluedescWidget-NxrCzznm-1abe6e80871d0a1d3f62.js"),void 0),"./LabelvaluelimitsbarWidget.vue":()=>it(()=>rt.import("./LabelvaluelimitsbarWidget-pq7qoolL-799f04ee161ac207990e.js"),void 0),"./LabelvaluelimitscolumnWidget.vue":()=>it(()=>rt.import("./LabelvaluelimitscolumnWidget-edkpogsl-cc8cb37331d149620877.js"),void 0),"./LabelvaluerangebarWidget.vue":()=>it(()=>rt.import("./LabelvaluerangebarWidget-DpJNv9dh-69d6c63a5b945223a268.js"),void 0),"./LedWidget.vue":()=>it(()=>rt.import("./LedWidget--4eSxBnn-b23e9dba9fe8083fa005.js"),void 0),"./LimitsbarWidget.vue":()=>it(()=>rt.import("./LimitsbarWidget-BQaumgRt-83eeb25d4b6e4e99b119.js"),void 0),"./LimitscolorWidget.vue":()=>it(()=>rt.import("./LimitscolorWidget-BBF9sRtF-62a27f46ce7c054d150f.js"),void 0),"./LimitscolumnWidget.vue":()=>it(()=>rt.import("./LimitscolumnWidget-DZZtSoXw-425281a88105e20ed3ba.js"),void 0),"./LinegraphWidget.vue":()=>it(()=>rt.import("./LinegraphWidget-DTLZmyWs-72c6387f595a0a4013be.js"),void 0),"./MatrixbycolumnsWidget.vue":()=>it(()=>rt.import("./MatrixbycolumnsWidget-dpgZz4wR-f0f3fdf10d49af904bf5.js"),void 0),"./ProgressbarWidget.vue":()=>it(()=>rt.import("./ProgressbarWidget-7cYr8136-1c12582ce9d4ff413a55.js"),void 0),"./RadiobuttonWidget.vue":()=>it(()=>rt.import("./RadiobuttonWidget-DTfn-7F2-2fdf40f484b98c933b8e.js"),void 0),"./RadiogroupWidget.vue":()=>it(()=>rt.import("./RadiogroupWidget-DWvTpw94-72c898511170802d814f.js"),void 0),"./RangebarWidget.vue":()=>it(()=>rt.import("./RangebarWidget-CG2Y7eYp-376805c2784826569f50.js"),void 0),"./RollupWidget.vue":()=>it(()=>rt.import("./RollupWidget-C6HKTfCR-2fee2f5abf13112784d3.js"),void 0),"./ScrollwindowWidget.vue":()=>it(()=>rt.import("./ScrollwindowWidget-DvhBCYd2-1ca5ef1549a42b7ea26c.js"),void 0),"./SignalWidget.vue":()=>it(()=>rt.import("./SignalWidget-BZIoGjam-517ce457178e055a0785.js"),void 0),"./SpacerWidget.vue":()=>it(()=>rt.import("./SpacerWidget-YBS8RZIE-6f604070f76233e8abf6.js"),void 0),"./SparklineWidget.vue":()=>it(()=>rt.import("./SparklineWidget-BMhY9vYe-330a5e7e3db2907e0b78.js"),void 0),"./TabbookWidget.vue":()=>it(()=>rt.import("./TabbookWidget-RfET19pq-f131be0ee6a50775a079.js"),void 0),"./TextboxWidget.vue":()=>it(()=>rt.import("./TextboxWidget-M8vFBSxS-8d0b53e2f7eebf969abb.js"),void 0),"./TextfieldWidget.vue":()=>it(()=>rt.import("./TextfieldWidget-Dev7lCsT-b4e43b129c8b8b194dba.js"),void 0),"./TimeWidget.vue":()=>it(()=>rt.import("./TimeWidget-CQzn13rQ-dde78e9108545bc47090.js"),void 0),"./TitleWidget.vue":()=>it(()=>rt.import("./TitleWidget-C4zbSian-f6fd7ad5542875ddd1c9.js"),void 0),"./ValueWidget.vue":()=>it(()=>rt.import("./ValueWidget-BVI6uUVX-3d7edd0290c877d1cbb8.js"),void 0),"./ValuelimitsbarWidget.vue":()=>it(()=>rt.import("./ValuelimitsbarWidget-BiIcery0-86e4d3b97524111adad6.js"),void 0),"./ValuelimitscolumnWidget.vue":()=>it(()=>rt.import("./ValuelimitscolumnWidget-BiRI8GbI-2b9bd816bf467264a76d.js"),void 0),"./ValuerangebarWidget.vue":()=>it(()=>rt.import("./ValuerangebarWidget-CtMFQu9--3192b0e9ed894b0a92c2.js"),void 0),"./VerticalWidget.vue":()=>it(()=>rt.import("./VerticalWidget-CRmcpQBn-52ff42eb62875348fc5a.js"),void 0),"./VerticalboxWidget.vue":()=>it(()=>rt.import("./VerticalboxWidget-C-qChjug-a7cdc3ed315048ef8b50.js"),void 0)}),eA=Object.entries(JS).reduce((t,[e,n])=>{e=e.split("/").pop();const r=BS(ZS(e.replace(/\.\w+$/,"")));return{...t,[r]:pf(n)}},{}),gN=sr("U",{components:eA}),Sv="openc3-ace-vim-mode-enabled",zh="ace/keyboard/vim",Zl=sr("X",{isVimModeEnabled(){return localStorage.getItem(Sv)==="true"},setVimMode(t){localStorage.setItem(Sv,JSON.stringify(!!t))},toggleVimMode(t){this.isVimModeEnabled()?(t.setKeyboardHandler(null),this.setVimMode(!1)):(t.setKeyboardHandler(zh),this.setVimMode(!0)),t.focus()},applyVimModeIfEnabled(t,{saveFn:e}={}){this.isVimModeEnabled()?(t.setKeyboardHandler(zh),ace.config.loadModule(zh,n=>{n.CodeMirror.Vim.defineEx("write","w",r=>{typeof e=="function"?e():r.ace.execCommand("save")})})):t.setKeyboardHandler(null)}}),tA={props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},methods:{formatDT:function(t){return t.replaceAll(" ","-").toLowerCase()},subMenuClick(t){t.command(t),this.$refs.topmenu[0].isActive=!1}},mounted(){document.title=this.title}},nA={class:"app-title mr-2"};function rA(t,e,n,r,f,d){const p=Ue("v-col"),b=Ue("v-row"),h=Ue("v-icon"),g=Ue("v-btn"),s=Ue("v-divider"),a=Ue("v-list-item-title"),c=Ue("v-list-item"),l=Ue("v-list"),o=Ue("v-menu"),u=Ue("v-radio"),m=Ue("v-list-item-action"),w=Ue("v-radio-group"),x=Ue("v-checkbox");return lt(),Xt(gf,{to:"#openc3-menu"},[We(b,{"no-gutters":""},{default:Fe(()=>[We(p,{"align-self":"end"},{default:Fe(()=>[fr("span",nA,_n(n.title),1)]),_:1})]),_:1}),We(b,{dense:"",class:"flex-nowrap"},{default:Fe(()=>[(lt(!0),gn(Li,null,Xi(n.menus,(E,T)=>(lt(),Xt(o,{ref_for:!0,ref:"topmenu",key:T},{activator:Fe(({props:k})=>[We(g,fl({ref_for:!0},k,{variant:"outlined",class:"mx-1 menu-button",text:E.label,"data-test":d.formatDT(`${n.title} ${E.label}`)}),{append:Fe(()=>[We(h,{class:"menu-button-icon"},{default:Fe(()=>e[0]||(e[0]=[Ht(" mdi-menu-down ")])),_:1})]),_:2},1040,["text","data-test"])]),default:Fe(()=>[We(l,null,{default:Fe(()=>[(lt(!0),gn(Li,null,Xi(E.items,(k,C)=>(lt(),gn(Li,null,[k.divider?(lt(),Xt(s,{key:C+"-divider"})):k.subMenu&&k.subMenu.length>0?(lt(),gn("div",{key:C+"-submenu"},[(lt(),Xt(o,{"open-on-hover":"",location:"right",key:C},{activator:Fe(({props:L})=>[(lt(),Xt(c,fl({ref_for:!0},L,{disabled:k.disabled,key:C}),tu({append:Fe(()=>[We(h,null,{default:Fe(()=>e[1]||(e[1]=[Ht(" mdi-chevron-right ")])),_:1})]),default:Fe(()=>[!k.radio&&!k.checkbox?(lt(),Xt(a,{key:0,style:is("cursor: pointer;"+(k.disabled?"opacity: 0.2":""))},{default:Fe(()=>[Ht(_n(k.label),1)]),_:2},1032,["style"])):Ur("",!0)]),_:2},[k.icon?{name:"prepend",fn:Fe(()=>[We(h,{disabled:k.disabled},{default:Fe(()=>[Ht(_n(k.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:Fe(()=>[We(l,null,{default:Fe(()=>[(lt(!0),gn(Li,null,Xi(k.subMenu,(L,R)=>(lt(),Xt(c,{key:R,"prepend-icon":L.icon,onClick:F=>d.subMenuClick(L)},{default:Fe(()=>[We(a,null,{default:Fe(()=>[Ht(_n(L.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):k.radioGroup?(lt(),Xt(w,{"model-value":k.value,"onUpdate:modelValue":k.command,key:C+"-radio-group","hide-details":"",density:"compact",class:"ma-0 pa-0"},{default:Fe(()=>[(lt(!0),gn(Li,null,Xi(k.choices,(L,R)=>(lt(),Xt(c,{key:R+"-choice"},{default:Fe(()=>[We(m,{class:"list-action"},{default:Fe(()=>[We(u,{color:"secondary",label:L.label,value:L.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(lt(),Xt(c,{onClick:L=>k.command(k),disabled:k.disabled,"data-test":d.formatDT(`${n.title} ${E.label} ${k.label}`),key:C+"-list"},tu({default:Fe(()=>[k.checkbox?(lt(),Xt(m,{key:0,class:"list-action"},{default:Fe(()=>[We(x,{modelValue:k.checked,"onUpdate:modelValue":L=>k.checked=L,label:k.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):Ur("",!0),!k.radio&&!k.checkbox?(lt(),Xt(a,{key:1,style:is("cursor: pointer;"+(k.disabled?"opacity: 0.2":""))},{default:Fe(()=>[Ht(_n(k.label),1)]),_:2},1032,["style"])):Ur("",!0)]),_:2},[k.icon?{name:"prepend",fn:Fe(()=>[We(h,{icon:k.icon,disabled:k.disabled},null,8,["icon","disabled"])]),key:"0"}:void 0]),1032,["onClick","disabled","data-test"]))],64))),256))]),_:2},1024)]),_:2},1024))),128))]),_:1})])}const iA=Ri(tA,[["render",rA],["__scopeId","data-v-4d454b93"]]);function Av(t,e){return function(){return t.apply(e,arguments)}}const{toString:oA}=Object.prototype,{getPrototypeOf:Hh}=Object,{iterator:Jl,toStringTag:Tv}=Symbol,ec=(t=>e=>{const n=oA.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Bi=t=>(t=t.toLowerCase(),e=>ec(e)===t),tc=t=>e=>typeof e===t,{isArray:ia}=Array,ja=tc("undefined");function sA(t){return t!==null&&!ja(t)&&t.constructor!==null&&!ja(t.constructor)&&Kr(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const $v=Bi("ArrayBuffer");function aA(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&$v(t.buffer),e}const lA=tc("string"),Kr=tc("function"),Mv=tc("number"),nc=t=>t!==null&&typeof t=="object",cA=t=>t===!0||t===!1,rc=t=>{if(ec(t)!=="object")return!1;const e=Hh(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Tv in t)&&!(Jl in t)},uA=Bi("Date"),hA=Bi("File"),dA=Bi("Blob"),fA=Bi("FileList"),pA=t=>nc(t)&&Kr(t.pipe),gA=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Kr(t.append)&&((e=ec(t))==="formdata"||e==="object"&&Kr(t.toString)&&t.toString()==="[object FormData]"))},mA=Bi("URLSearchParams"),[vA,yA,bA,wA]=["ReadableStream","Request","Response","Headers"].map(Bi),xA=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function za(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,f;if(typeof t!="object"&&(t=[t]),ia(t))for(r=0,f=t.length;r<f;r++)e.call(null,t[r],r,t);else{const d=n?Object.getOwnPropertyNames(t):Object.keys(t),p=d.length;let b;for(r=0;r<p;r++)b=d[r],e.call(null,t[b],b,t)}}function Ev(t,e){e=e.toLowerCase();const n=Object.keys(t);let r=n.length,f;for(;r-- >0;)if(f=n[r],e===f.toLowerCase())return f;return null}const ws=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Iv=t=>!ja(t)&&t!==ws;function Uh(){const{caseless:t}=Iv(this)&&this||{},e={},n=(r,f)=>{const d=t&&Ev(e,f)||f;rc(e[d])&&rc(r)?e[d]=Uh(e[d],r):rc(r)?e[d]=Uh({},r):ia(r)?e[d]=r.slice():e[d]=r};for(let r=0,f=arguments.length;r<f;r++)arguments[r]&&za(arguments[r],n);return e}const CA=(t,e,n,{allOwnKeys:r}={})=>(za(e,(f,d)=>{n&&Kr(f)?t[d]=Av(f,n):t[d]=f},{allOwnKeys:r}),t),kA=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),_A=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},SA=(t,e,n,r)=>{let f,d,p;const b={};if(e=e||{},t==null)return e;do{for(f=Object.getOwnPropertyNames(t),d=f.length;d-- >0;)p=f[d],(!r||r(p,t,e))&&!b[p]&&(e[p]=t[p],b[p]=!0);t=n!==!1&&Hh(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},AA=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},TA=t=>{if(!t)return null;if(ia(t))return t;let e=t.length;if(!Mv(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},$A=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Hh(Uint8Array)),MA=(t,e)=>{const n=(t&&t[Jl]).call(t);let r;for(;(r=n.next())&&!r.done;){const f=r.value;e.call(t,f[0],f[1])}},EA=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},IA=Bi("HTMLFormElement"),LA=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,n,r){return n.toUpperCase()+r}),Lv=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),RA=Bi("RegExp"),Rv=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};za(n,(f,d)=>{let p;(p=e(f,d,t))!==!1&&(r[d]=p||f)}),Object.defineProperties(t,r)},OA=t=>{Rv(t,(e,n)=>{if(Kr(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(Kr(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},DA=(t,e)=>{const n={},r=f=>{f.forEach(d=>{n[d]=!0})};return ia(t)?r(t):r(String(t).split(e)),n},NA=()=>{},FA=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function PA(t){return!!(t&&Kr(t.append)&&t[Tv]==="FormData"&&t[Jl])}const BA=t=>{const e=new Array(10),n=(r,f)=>{if(nc(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[f]=r;const d=ia(r)?[]:{};return za(r,(p,b)=>{const h=n(p,f+1);!ja(h)&&(d[b]=h)}),e[f]=void 0,d}}return r};return n(t,0)},WA=Bi("AsyncFunction"),jA=t=>t&&(nc(t)||Kr(t))&&Kr(t.then)&&Kr(t.catch),Ov=((t,e)=>t?setImmediate:e?((n,r)=>(ws.addEventListener("message",({source:f,data:d})=>{f===ws&&d===n&&r.length&&r.shift()()},!1),f=>{r.push(f),ws.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Kr(ws.postMessage)),zA=typeof queueMicrotask<"u"?queueMicrotask.bind(ws):typeof process<"u"&&process.nextTick||Ov,HA=t=>t!=null&&Kr(t[Jl]),Ae={isArray:ia,isArrayBuffer:$v,isBuffer:sA,isFormData:gA,isArrayBufferView:aA,isString:lA,isNumber:Mv,isBoolean:cA,isObject:nc,isPlainObject:rc,isReadableStream:vA,isRequest:yA,isResponse:bA,isHeaders:wA,isUndefined:ja,isDate:uA,isFile:hA,isBlob:dA,isRegExp:RA,isFunction:Kr,isStream:pA,isURLSearchParams:mA,isTypedArray:$A,isFileList:fA,forEach:za,merge:Uh,extend:CA,trim:xA,stripBOM:kA,inherits:_A,toFlatObject:SA,kindOf:ec,kindOfTest:Bi,endsWith:AA,toArray:TA,forEachEntry:MA,matchAll:EA,isHTMLForm:IA,hasOwnProperty:Lv,hasOwnProp:Lv,reduceDescriptors:Rv,freezeMethods:OA,toObjectSet:DA,toCamelCase:LA,noop:NA,toFiniteNumber:FA,findKey:Ev,global:ws,isContextDefined:Iv,isSpecCompliantForm:PA,toJSONObject:BA,isAsyncFn:WA,isThenable:jA,setImmediate:Ov,asap:zA,isIterable:HA};function Rt(t,e,n,r,f){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),f&&(this.response=f,this.status=f.status?f.status:null)}Ae.inherits(Rt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Ae.toJSONObject(this.config),code:this.code,status:this.status}}});const Dv=Rt.prototype,Nv={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Nv[t]={value:t}}),Object.defineProperties(Rt,Nv),Object.defineProperty(Dv,"isAxiosError",{value:!0}),Rt.from=(t,e,n,r,f,d)=>{const p=Object.create(Dv);return Ae.toFlatObject(t,p,function(b){return b!==Error.prototype},b=>b!=="isAxiosError"),Rt.call(p,t.message,e,n,r,f),p.cause=t,p.name=t.name,d&&Object.assign(p,d),p};const UA=null;function Vh(t){return Ae.isPlainObject(t)||Ae.isArray(t)}function Fv(t){return Ae.endsWith(t,"[]")?t.slice(0,-2):t}function Pv(t,e,n){return t?t.concat(e).map(function(r,f){return r=Fv(r),!n&&f?"["+r+"]":r}).join(n?".":""):e}function VA(t){return Ae.isArray(t)&&!t.some(Vh)}const qA=Ae.toFlatObject(Ae,{},null,function(t){return/^is[A-Z]/.test(t)});function ic(t,e,n){if(!Ae.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=Ae.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(l,o){return!Ae.isUndefined(o[l])});const r=n.metaTokens,f=n.visitor||g,d=n.dots,p=n.indexes,b=(n.Blob||typeof Blob<"u"&&Blob)&&Ae.isSpecCompliantForm(e);if(!Ae.isFunction(f))throw new TypeError("visitor must be a function");function h(l){if(l===null)return"";if(Ae.isDate(l))return l.toISOString();if(!b&&Ae.isBlob(l))throw new Rt("Blob is not supported. Use a Buffer instead.");return Ae.isArrayBuffer(l)||Ae.isTypedArray(l)?b&&typeof Blob=="function"?new Blob([l]):Buffer.from(l):l}function g(l,o,u){let m=l;if(l&&!u&&typeof l=="object"){if(Ae.endsWith(o,"{}"))o=r?o:o.slice(0,-2),l=JSON.stringify(l);else if(Ae.isArray(l)&&VA(l)||(Ae.isFileList(l)||Ae.endsWith(o,"[]"))&&(m=Ae.toArray(l)))return o=Fv(o),m.forEach(function(w,x){!(Ae.isUndefined(w)||w===null)&&e.append(p===!0?Pv([o],x,d):p===null?o:o+"[]",h(w))}),!1}return Vh(l)?!0:(e.append(Pv(u,o,d),h(l)),!1)}const s=[],a=Object.assign(qA,{defaultVisitor:g,convertValue:h,isVisitable:Vh});function c(l,o){if(!Ae.isUndefined(l)){if(s.indexOf(l)!==-1)throw Error("Circular reference detected in "+o.join("."));s.push(l),Ae.forEach(l,function(u,m){(!(Ae.isUndefined(u)||u===null)&&f.call(e,u,Ae.isString(m)?m.trim():m,o,a))===!0&&c(u,o?o.concat(m):[m])}),s.pop()}}if(!Ae.isObject(t))throw new TypeError("data must be an object");return c(t),e}function Bv(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function qh(t,e){this._pairs=[],t&&ic(t,this,e)}const Wv=qh.prototype;Wv.append=function(t,e){this._pairs.push([t,e])},Wv.toString=function(t){const e=t?function(n){return t.call(this,n,Bv)}:Bv;return this._pairs.map(function(n){return e(n[0])+"="+e(n[1])},"").join("&")};function KA(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function jv(t,e,n){if(!e)return t;const r=n&&n.encode||KA;Ae.isFunction(n)&&(n={serialize:n});const f=n&&n.serialize;let d;if(f?d=f(e,n):d=Ae.isURLSearchParams(e)?e.toString():new qh(e,n).toString(r),d){const p=t.indexOf("#");p!==-1&&(t=t.slice(0,p)),t+=(t.indexOf("?")===-1?"?":"&")+d}return t}let zv=class{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Ae.forEach(this.handlers,function(n){n!==null&&e(n)})}};const Hv={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},GA=typeof URLSearchParams<"u"?URLSearchParams:qh,YA=typeof FormData<"u"?FormData:null,XA=typeof Blob<"u"?Blob:null,QA={isBrowser:!0,classes:{URLSearchParams:GA,FormData:YA,Blob:XA},protocols:["http","https","file","blob","url","data"]},Kh=typeof window<"u"&&typeof document<"u",Gh=typeof navigator=="object"&&navigator||void 0,ZA=Kh&&(!Gh||["ReactNative","NativeScript","NS"].indexOf(Gh.product)<0),JA=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",eT=Kh&&window.location.href||"http://localhost",tT=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Kh,hasStandardBrowserEnv:ZA,hasStandardBrowserWebWorkerEnv:JA,navigator:Gh,origin:eT},Symbol.toStringTag,{value:"Module"})),Tr={...tT,...QA};function nT(t,e){return ic(t,new Tr.classes.URLSearchParams,Object.assign({visitor:function(n,r,f,d){return Tr.isNode&&Ae.isBuffer(n)?(this.append(r,n.toString("base64")),!1):d.defaultVisitor.apply(this,arguments)}},e))}function rT(t){return Ae.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function iT(t){const e={},n=Object.keys(t);let r;const f=n.length;let d;for(r=0;r<f;r++)d=n[r],e[d]=t[d];return e}function Uv(t){function e(n,r,f,d){let p=n[d++];if(p==="__proto__")return!0;const b=Number.isFinite(+p),h=d>=n.length;return p=!p&&Ae.isArray(f)?f.length:p,h?(Ae.hasOwnProp(f,p)?f[p]=[f[p],r]:f[p]=r,!b):((!f[p]||!Ae.isObject(f[p]))&&(f[p]=[]),e(n,r,f[p],d)&&Ae.isArray(f[p])&&(f[p]=iT(f[p])),!b)}if(Ae.isFormData(t)&&Ae.isFunction(t.entries)){const n={};return Ae.forEachEntry(t,(r,f)=>{e(rT(r),f,n,0)}),n}return null}function oT(t,e,n){if(Ae.isString(t))try{return(e||JSON.parse)(t),Ae.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const Ha={transitional:Hv,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,f=Ae.isObject(t);if(f&&Ae.isHTMLForm(t)&&(t=new FormData(t)),Ae.isFormData(t))return r?JSON.stringify(Uv(t)):t;if(Ae.isArrayBuffer(t)||Ae.isBuffer(t)||Ae.isStream(t)||Ae.isFile(t)||Ae.isBlob(t)||Ae.isReadableStream(t))return t;if(Ae.isArrayBufferView(t))return t.buffer;if(Ae.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let d;if(f){if(n.indexOf("application/x-www-form-urlencoded")>-1)return nT(t,this.formSerializer).toString();if((d=Ae.isFileList(t))||n.indexOf("multipart/form-data")>-1){const p=this.env&&this.env.FormData;return ic(d?{"files[]":t}:t,p&&new p,this.formSerializer)}}return f||r?(e.setContentType("application/json",!1),oT(t)):t}],transformResponse:[function(t){const e=this.transitional||Ha.transitional,n=e&&e.forcedJSONParsing,r=this.responseType==="json";if(Ae.isResponse(t)||Ae.isReadableStream(t))return t;if(t&&Ae.isString(t)&&(n&&!this.responseType||r)){const f=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(d){if(f)throw d.name==="SyntaxError"?Rt.from(d,Rt.ERR_BAD_RESPONSE,this,null,this.response):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Tr.classes.FormData,Blob:Tr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ae.forEach(["delete","get","head","post","put","patch"],t=>{Ha.headers[t]={}});const sT=Ae.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"]),aT=t=>{const e={};let n,r,f;return t&&t.split(`
1490
- `).forEach(function(d){f=d.indexOf(":"),n=d.substring(0,f).trim().toLowerCase(),r=d.substring(f+1).trim(),!(!n||e[n]&&sT[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},Vv=Symbol("internals");function Ua(t){return t&&String(t).trim().toLowerCase()}function oc(t){return t===!1||t==null?t:Ae.isArray(t)?t.map(oc):String(t)}function lT(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const cT=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Yh(t,e,n,r,f){if(Ae.isFunction(r))return r.call(this,e,n);if(f&&(e=n),!!Ae.isString(e)){if(Ae.isString(r))return e.indexOf(r)!==-1;if(Ae.isRegExp(r))return r.test(e)}}function uT(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function hT(t,e){const n=Ae.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(f,d,p){return this[r].call(this,e,f,d,p)},configurable:!0})})}let Gr=class{constructor(e){e&&this.set(e)}set(e,n,r){const f=this;function d(b,h,g){const s=Ua(h);if(!s)throw new Error("header name must be a non-empty string");const a=Ae.findKey(f,s);(!a||f[a]===void 0||g===!0||g===void 0&&f[a]!==!1)&&(f[a||h]=oc(b))}const p=(b,h)=>Ae.forEach(b,(g,s)=>d(g,s,h));if(Ae.isPlainObject(e)||e instanceof this.constructor)p(e,n);else if(Ae.isString(e)&&(e=e.trim())&&!cT(e))p(aT(e),n);else if(Ae.isObject(e)&&Ae.isIterable(e)){let b={},h,g;for(const s of e){if(!Ae.isArray(s))throw TypeError("Object iterator must return a key-value pair");b[g=s[0]]=(h=b[g])?Ae.isArray(h)?[...h,s[1]]:[h,s[1]]:s[1]}p(b,n)}else e!=null&&d(n,e,r);return this}get(e,n){if(e=Ua(e),e){const r=Ae.findKey(this,e);if(r){const f=this[r];if(!n)return f;if(n===!0)return lT(f);if(Ae.isFunction(n))return n.call(this,f,r);if(Ae.isRegExp(n))return n.exec(f);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Ua(e),e){const r=Ae.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||Yh(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let f=!1;function d(p){if(p=Ua(p),p){const b=Ae.findKey(r,p);b&&(!n||Yh(r,r[b],b,n))&&(delete r[b],f=!0)}}return Ae.isArray(e)?e.forEach(d):d(e),f}clear(e){const n=Object.keys(this);let r=n.length,f=!1;for(;r--;){const d=n[r];(!e||Yh(this,this[d],d,e,!0))&&(delete this[d],f=!0)}return f}normalize(e){const n=this,r={};return Ae.forEach(this,(f,d)=>{const p=Ae.findKey(r,d);if(p){n[p]=oc(f),delete n[d];return}const b=e?uT(d):String(d).trim();b!==d&&delete n[d],n[b]=oc(f),r[b]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return Ae.forEach(this,(r,f)=>{r!=null&&r!==!1&&(n[f]=e&&Ae.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
1491
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(f=>r.set(f)),r}static accessor(e){const n=(this[Vv]=this[Vv]={accessors:{}}).accessors,r=this.prototype;function f(d){const p=Ua(d);n[p]||(hT(r,d),n[p]=!0)}return Ae.isArray(e)?e.forEach(f):f(e),this}};Gr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ae.reduceDescriptors(Gr.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}}),Ae.freezeMethods(Gr);function Xh(t,e){const n=this||Ha,r=e||n,f=Gr.from(r.headers);let d=r.data;return Ae.forEach(t,function(p){d=p.call(n,d,f.normalize(),e?e.status:void 0)}),f.normalize(),d}function qv(t){return!!(t&&t.__CANCEL__)}function oa(t,e,n){Rt.call(this,t??"canceled",Rt.ERR_CANCELED,e,n),this.name="CanceledError"}Ae.inherits(oa,Rt,{__CANCEL__:!0});function Kv(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new Rt("Request failed with status code "+n.status,[Rt.ERR_BAD_REQUEST,Rt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function dT(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function fT(t,e){t=t||10;const n=new Array(t),r=new Array(t);let f=0,d=0,p;return e=e!==void 0?e:1e3,function(b){const h=Date.now(),g=r[d];p||(p=h),n[f]=b,r[f]=h;let s=d,a=0;for(;s!==f;)a+=n[s++],s=s%t;if(f=(f+1)%t,f===d&&(d=(d+1)%t),h-p<e)return;const c=g&&h-g;return c?Math.round(a*1e3/c):void 0}}function pT(t,e){let n=0,r=1e3/e,f,d;const p=(b,h=Date.now())=>{n=h,f=null,d&&(clearTimeout(d),d=null),t.apply(null,b)};return[(...b)=>{const h=Date.now(),g=h-n;g>=r?p(b,h):(f=b,d||(d=setTimeout(()=>{d=null,p(f)},r-g)))},()=>f&&p(f)]}const sc=(t,e,n=3)=>{let r=0;const f=fT(50,250);return pT(d=>{const p=d.loaded,b=d.lengthComputable?d.total:void 0,h=p-r,g=f(h),s=p<=b;r=p;const a={loaded:p,total:b,progress:b?p/b:void 0,bytes:h,rate:g||void 0,estimated:g&&b&&s?(b-p)/g:void 0,event:d,lengthComputable:b!=null,[e?"download":"upload"]:!0};t(a)},n)},Gv=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},Yv=t=>(...e)=>Ae.asap(()=>t(...e)),gT=Tr.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,Tr.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(Tr.origin),Tr.navigator&&/(msie|trident)/i.test(Tr.navigator.userAgent)):()=>!0,mT=Tr.hasStandardBrowserEnv?{write(t,e,n,r,f,d){const p=[t+"="+encodeURIComponent(e)];Ae.isNumber(n)&&p.push("expires="+new Date(n).toGMTString()),Ae.isString(r)&&p.push("path="+r),Ae.isString(f)&&p.push("domain="+f),d===!0&&p.push("secure"),document.cookie=p.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function vT(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function yT(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Xv(t,e,n){let r=!vT(e);return t&&(r||n==!1)?yT(t,e):e}const Qv=t=>t instanceof Gr?{...t}:t;function xs(t,e){e=e||{};const n={};function r(g,s,a,c){return Ae.isPlainObject(g)&&Ae.isPlainObject(s)?Ae.merge.call({caseless:c},g,s):Ae.isPlainObject(s)?Ae.merge({},s):Ae.isArray(s)?s.slice():s}function f(g,s,a,c){if(Ae.isUndefined(s)){if(!Ae.isUndefined(g))return r(void 0,g,a,c)}else return r(g,s,a,c)}function d(g,s){if(!Ae.isUndefined(s))return r(void 0,s)}function p(g,s){if(Ae.isUndefined(s)){if(!Ae.isUndefined(g))return r(void 0,g)}else return r(void 0,s)}function b(g,s,a){if(a in e)return r(g,s);if(a in t)return r(void 0,g)}const h={url:d,method:d,data:d,baseURL:p,transformRequest:p,transformResponse:p,paramsSerializer:p,timeout:p,timeoutMessage:p,withCredentials:p,withXSRFToken:p,adapter:p,responseType:p,xsrfCookieName:p,xsrfHeaderName:p,onUploadProgress:p,onDownloadProgress:p,decompress:p,maxContentLength:p,maxBodyLength:p,beforeRedirect:p,transport:p,httpAgent:p,httpsAgent:p,cancelToken:p,socketPath:p,responseEncoding:p,validateStatus:b,headers:(g,s,a)=>f(Qv(g),Qv(s),a,!0)};return Ae.forEach(Object.keys(Object.assign({},t,e)),function(g){const s=h[g]||f,a=s(t[g],e[g],g);Ae.isUndefined(a)&&s!==b||(n[g]=a)}),n}const Zv=t=>{const e=xs({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:f,xsrfCookieName:d,headers:p,auth:b}=e;e.headers=p=Gr.from(p),e.url=jv(Xv(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),b&&p.set("Authorization","Basic "+btoa((b.username||"")+":"+(b.password?unescape(encodeURIComponent(b.password)):"")));let h;if(Ae.isFormData(n)){if(Tr.hasStandardBrowserEnv||Tr.hasStandardBrowserWebWorkerEnv)p.setContentType(void 0);else if((h=p.getContentType())!==!1){const[g,...s]=h?h.split(";").map(a=>a.trim()).filter(Boolean):[];p.setContentType([g||"multipart/form-data",...s].join("; "))}}if(Tr.hasStandardBrowserEnv&&(r&&Ae.isFunction(r)&&(r=r(e)),r||r!==!1&&gT(e.url))){const g=f&&d&&mT.read(d);g&&p.set(f,g)}return e},bT=typeof XMLHttpRequest<"u",wT=bT&&function(t){return new Promise(function(e,n){const r=Zv(t);let f=r.data;const d=Gr.from(r.headers).normalize();let{responseType:p,onUploadProgress:b,onDownloadProgress:h}=r,g,s,a,c,l;function o(){c&&c(),l&&l(),r.cancelToken&&r.cancelToken.unsubscribe(g),r.signal&&r.signal.removeEventListener("abort",g)}let u=new XMLHttpRequest;u.open(r.method.toUpperCase(),r.url,!0),u.timeout=r.timeout;function m(){if(!u)return;const x=Gr.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),E={data:!p||p==="text"||p==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:x,config:t,request:u};Kv(function(T){e(T),o()},function(T){n(T),o()},E),u=null}"onloadend"in u?u.onloadend=m:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(m)},u.onabort=function(){u&&(n(new Rt("Request aborted",Rt.ECONNABORTED,t,u)),u=null)},u.onerror=function(){n(new Rt("Network Error",Rt.ERR_NETWORK,t,u)),u=null},u.ontimeout=function(){let x=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const E=r.transitional||Hv;r.timeoutErrorMessage&&(x=r.timeoutErrorMessage),n(new Rt(x,E.clarifyTimeoutError?Rt.ETIMEDOUT:Rt.ECONNABORTED,t,u)),u=null},f===void 0&&d.setContentType(null),"setRequestHeader"in u&&Ae.forEach(d.toJSON(),function(x,E){u.setRequestHeader(E,x)}),Ae.isUndefined(r.withCredentials)||(u.withCredentials=!!r.withCredentials),p&&p!=="json"&&(u.responseType=r.responseType),h&&([a,l]=sc(h,!0),u.addEventListener("progress",a)),b&&u.upload&&([s,c]=sc(b),u.upload.addEventListener("progress",s),u.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(g=x=>{u&&(n(!x||x.type?new oa(null,t,u):x),u.abort(),u=null)},r.cancelToken&&r.cancelToken.subscribe(g),r.signal&&(r.signal.aborted?g():r.signal.addEventListener("abort",g)));const w=dT(r.url);if(w&&Tr.protocols.indexOf(w)===-1){n(new Rt("Unsupported protocol "+w+":",Rt.ERR_BAD_REQUEST,t));return}u.send(f||null)})},xT=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,f;const d=function(g){if(!f){f=!0,b();const s=g instanceof Error?g:this.reason;r.abort(s instanceof Rt?s:new oa(s instanceof Error?s.message:s))}};let p=e&&setTimeout(()=>{p=null,d(new Rt(`timeout ${e} of ms exceeded`,Rt.ETIMEDOUT))},e);const b=()=>{t&&(p&&clearTimeout(p),p=null,t.forEach(g=>{g.unsubscribe?g.unsubscribe(d):g.removeEventListener("abort",d)}),t=null)};t.forEach(g=>g.addEventListener("abort",d));const{signal:h}=r;return h.unsubscribe=()=>Ae.asap(b),h}},CT=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,f;for(;r<n;)f=r+e,yield t.slice(r,f),r=f},kT=async function*(t,e){for await(const n of _T(t))yield*CT(n,e)},_T=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},Jv=(t,e,n,r)=>{const f=kT(t,e);let d=0,p,b=h=>{p||(p=!0,r&&r(h))};return new ReadableStream({async pull(h){try{const{done:g,value:s}=await f.next();if(g){b(),h.close();return}let a=s.byteLength;if(n){let c=d+=a;n(c)}h.enqueue(new Uint8Array(s))}catch(g){throw b(g),g}},cancel(h){return b(h),f.return()}},{highWaterMark:2})},ac=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",ey=ac&&typeof ReadableStream=="function",ST=ac&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),ty=(t,...e)=>{try{return!!t(...e)}catch{return!1}},AT=ey&&ty(()=>{let t=!1;const e=new Request(Tr.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),ny=64*1024,Qh=ey&&ty(()=>Ae.isReadableStream(new Response("").body)),lc={stream:Qh&&(t=>t.body)};ac&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!lc[e]&&(lc[e]=Ae.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new Rt(`Response type '${e}' is not supported`,Rt.ERR_NOT_SUPPORT,r)})})})(new Response);const TT=async t=>{if(t==null)return 0;if(Ae.isBlob(t))return t.size;if(Ae.isSpecCompliantForm(t))return(await new Request(Tr.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(Ae.isArrayBufferView(t)||Ae.isArrayBuffer(t))return t.byteLength;if(Ae.isURLSearchParams(t)&&(t=t+""),Ae.isString(t))return(await ST(t)).byteLength},$T=async(t,e)=>Ae.toFiniteNumber(t.getContentLength())??TT(e),MT=ac&&(async t=>{let{url:e,method:n,data:r,signal:f,cancelToken:d,timeout:p,onDownloadProgress:b,onUploadProgress:h,responseType:g,headers:s,withCredentials:a="same-origin",fetchOptions:c}=Zv(t);g=g?(g+"").toLowerCase():"text";let l=xT([f,d&&d.toAbortSignal()],p),o;const u=l&&l.unsubscribe&&(()=>{l.unsubscribe()});let m;try{if(h&&AT&&n!=="get"&&n!=="head"&&(m=await $T(s,r))!==0){let k=new Request(e,{method:"POST",body:r,duplex:"half"}),C;if(Ae.isFormData(r)&&(C=k.headers.get("content-type"))&&s.setContentType(C),k.body){const[L,R]=Gv(m,sc(Yv(h)));r=Jv(k.body,ny,L,R)}}Ae.isString(a)||(a=a?"include":"omit");const w="credentials"in Request.prototype;o=new Request(e,{...c,signal:l,method:n.toUpperCase(),headers:s.normalize().toJSON(),body:r,duplex:"half",credentials:w?a:void 0});let x=await fetch(o);const E=Qh&&(g==="stream"||g==="response");if(Qh&&(b||E&&u)){const k={};["status","statusText","headers"].forEach(F=>{k[F]=x[F]});const C=Ae.toFiniteNumber(x.headers.get("content-length")),[L,R]=b&&Gv(C,sc(Yv(b),!0))||[];x=new Response(Jv(x.body,ny,L,()=>{R&&R(),u&&u()}),k)}g=g||"text";let T=await lc[Ae.findKey(lc,g)||"text"](x,t);return!E&&u&&u(),await new Promise((k,C)=>{Kv(k,C,{data:T,headers:Gr.from(x.headers),status:x.status,statusText:x.statusText,config:t,request:o})})}catch(w){throw u&&u(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new Rt("Network Error",Rt.ERR_NETWORK,t,o),{cause:w.cause||w}):Rt.from(w,w&&w.code,t,o)}}),Zh={http:UA,xhr:wT,fetch:MT};Ae.forEach(Zh,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const ry=t=>`- ${t}`,ET=t=>Ae.isFunction(t)||t===null||t===!1,iy={getAdapter:t=>{t=Ae.isArray(t)?t:[t];const{length:e}=t;let n,r;const f={};for(let d=0;d<e;d++){n=t[d];let p;if(r=n,!ET(n)&&(r=Zh[(p=String(n)).toLowerCase()],r===void 0))throw new Rt(`Unknown adapter '${p}'`);if(r)break;f[p||"#"+d]=r}if(!r){const d=Object.entries(f).map(([b,h])=>`adapter ${b} `+(h===!1?"is not supported by the environment":"is not available in the build"));let p=e?d.length>1?`since :
1487
+ }`;var jt=Yb(function(){return Dt(ee,ct+"return "+Ne).apply(n,le)});if(jt.source=Ne,tf(jt))throw jt;return jt}function tD(i){return un(i).toLowerCase()}function nD(i){return un(i).toUpperCase()}function rD(i,v,M){if(i=un(i),i&&(M||v===n))return _n(i);if(!i||!(v=pi(v)))return i;var z=Mt(i),G=Mt(v),ee=Ot(z,G),le=ir(z,G)+1;return ns(z,ee,le).join("")}function iD(i,v,M){if(i=un(i),i&&(M||v===n))return i.slice(0,zt(i)+1);if(!i||!(v=pi(v)))return i;var z=Mt(i),G=ir(z,Mt(v))+1;return ns(z,0,G).join("")}function oD(i,v,M){if(i=un(i),i&&(M||v===n))return i.replace(Rn,"");if(!i||!(v=pi(v)))return i;var z=Mt(i),G=Ot(z,Mt(v));return ns(z,G).join("")}function sD(i,v){var M=I,z=H;if(Dn(v)){var G="separator"in v?v.separator:G;M="length"in v?Ft(v.length):M,z="omission"in v?pi(v.omission):z}i=un(i);var ee=i.length;if(oe(i)){var le=Mt(i);ee=le.length}if(M>=ee)return i;var de=M-Ut(z);if(de<1)return z;var ve=le?ns(le,0,de).join(""):i.slice(0,de);if(G===n)return ve+z;if(le&&(de+=ve.length-de),nf(G)){if(i.slice(de).search(G)){var Ie,Le=ve;for(G.global||(G=Wr(G.source,un(li.exec(G))+"g")),G.lastIndex=0;Ie=G.exec(Le);)var Ne=Ie.index;ve=ve.slice(0,Ne===n?de:Ne)}}else if(i.indexOf(pi(G),de)!=de){var Qe=ve.lastIndexOf(G);Qe>-1&&(ve=ve.slice(0,Qe))}return ve+z}function aD(i){return i=un(i),i&&Wo.test(i)?i.replace(xr,yt):i}var lD=ba(function(i,v,M){return i+(M?" ":"")+v.toUpperCase()}),sf=X0("toUpperCase");function Gb(i,v,M){return i=un(i),v=M?n:v,v===n?pe(i)?In(i):Y(i):i.match(v)||[]}var Yb=Ht(function(i,v){try{return pr(i,n,v)}catch(M){return tf(M)?M:new ft(M)}}),cD=Mo(function(i,v){return Cr(v,function(M){M=uo(M),To(i,M,Jd(i[M],i))}),i});function uD(i){var v=i==null?0:i.length,M=bt();return i=v?y(i,function(z){if(typeof z[1]!="function")throw new gn(p);return[M(z[0]),z[1]]}):[],Ht(function(z){for(var G=-1;++G<v;){var ee=i[G];if(pr(ee[0],this,z))return pr(ee[1],this,z)}})}function hD(i){return NI(Mi(i,a))}function af(i){return function(){return i}}function dD(i,v){return i==null||i!==i?v:i}var fD=Z0(),pD=Z0(!0);function ni(i){return i}function lf(i){return $0(typeof i=="function"?i:Mi(i,a))}function gD(i){return E0(Mi(i,a))}function mD(i,v){return I0(i,Mi(v,a))}var vD=Ht(function(i,v){return function(M){return sl(M,i,v)}}),yD=Ht(function(i,v){return function(M){return sl(i,M,v)}});function cf(i,v,M){var z=yr(v),G=Nc(v,z);M==null&&!(Dn(v)&&(G.length||!z.length))&&(M=v,v=i,i=this,G=Nc(v,yr(v)));var ee=!(Dn(M)&&"chain"in M)||!!M.chain,le=Io(i);return Cr(G,function(de){var ve=v[de];i[de]=ve,le&&(i.prototype[de]=function(){var Ie=this.__chain__;if(ee||Ie){var Le=i(this.__wrapped__),Ne=Le.__actions__=Jr(this.__actions__);return Ne.push({func:ve,args:arguments,thisArg:i}),Le.__chain__=Ie,Le}return ve.apply(i,$([this.value()],arguments))})}),i}function bD(){return pn._===this&&(pn._=VE),this}function uf(){}function wD(i){return i=Ft(i),Ht(function(v){return L0(v,i)})}var xD=Wd(y),CD=Wd(kr),kD=Wd(B);function Xb(i){return Kd(i)?be(uo(i)):JI(i)}function _D(i){return function(v){return i==null?n:Fs(i,v)}}var SD=eb(),AD=eb(!0);function hf(){return[]}function df(){return!1}function TD(){return{}}function $D(){return""}function MD(){return!0}function ED(i,v){if(i=Ft(i),i<1||i>U)return[];var M=te,z=Or(i,te);v=bt(v),i-=te;for(var G=tt(z,v);++M<i;)v(M);return G}function ID(i){return It(i)?y(i,uo):gi(i)?[i]:Jr(mb(un(i)))}function LD(i){var v=++HE;return un(i)+v}var RD=zc(function(i,v){return i+v},0),OD=jd("ceil"),DD=zc(function(i,v){return i/v},1),ND=jd("floor");function FD(i){return i&&i.length?Dc(i,ni,Ad):n}function PD(i,v){return i&&i.length?Dc(i,bt(v,2),Ad):n}function BD(i){return me(i,ni)}function WD(i,v){return me(i,bt(v,2))}function jD(i){return i&&i.length?Dc(i,ni,Ed):n}function zD(i,v){return i&&i.length?Dc(i,bt(v,2),Ed):n}var HD=zc(function(i,v){return i*v},1),UD=jd("round"),VD=zc(function(i,v){return i-v},0);function qD(i){return i&&i.length?ht(i,ni):0}function KD(i,v){return i&&i.length?ht(i,bt(v,2)):0}return J.after=g2,J.ary=Tb,J.assign=nO,J.assignIn=jb,J.assignInWith=tu,J.assignWith=rO,J.at=iO,J.before=$b,J.bind=Jd,J.bindAll=cD,J.bindKey=Mb,J.castArray=T2,J.chain=_b,J.chunk=NL,J.compact=FL,J.concat=PL,J.cond=uD,J.conforms=hD,J.constant=af,J.countBy=qR,J.create=oO,J.curry=Eb,J.curryRight=Ib,J.debounce=Lb,J.defaults=sO,J.defaultsDeep=aO,J.defer=m2,J.delay=v2,J.difference=BL,J.differenceBy=WL,J.differenceWith=jL,J.drop=zL,J.dropRight=HL,J.dropRightWhile=UL,J.dropWhile=VL,J.fill=qL,J.filter=GR,J.flatMap=QR,J.flatMapDeep=ZR,J.flatMapDepth=JR,J.flatten=wb,J.flattenDeep=KL,J.flattenDepth=GL,J.flip=y2,J.flow=fD,J.flowRight=pD,J.fromPairs=YL,J.functions=pO,J.functionsIn=gO,J.groupBy=e2,J.initial=QL,J.intersection=ZL,J.intersectionBy=JL,J.intersectionWith=eR,J.invert=vO,J.invertBy=yO,J.invokeMap=n2,J.iteratee=lf,J.keyBy=r2,J.keys=yr,J.keysIn=ti,J.map=Yc,J.mapKeys=wO,J.mapValues=xO,J.matches=gD,J.matchesProperty=mD,J.memoize=Qc,J.merge=CO,J.mergeWith=zb,J.method=vD,J.methodOf=yD,J.mixin=cf,J.negate=Zc,J.nthArg=wD,J.omit=kO,J.omitBy=_O,J.once=b2,J.orderBy=i2,J.over=xD,J.overArgs=w2,J.overEvery=CD,J.overSome=kD,J.partial=ef,J.partialRight=Rb,J.partition=o2,J.pick=SO,J.pickBy=Hb,J.property=Xb,J.propertyOf=_D,J.pull=iR,J.pullAll=Cb,J.pullAllBy=oR,J.pullAllWith=sR,J.pullAt=aR,J.range=SD,J.rangeRight=AD,J.rearg=x2,J.reject=l2,J.remove=lR,J.rest=C2,J.reverse=Qd,J.sampleSize=u2,J.set=TO,J.setWith=$O,J.shuffle=h2,J.slice=cR,J.sortBy=p2,J.sortedUniq=mR,J.sortedUniqBy=vR,J.split=QO,J.spread=k2,J.tail=yR,J.take=bR,J.takeRight=wR,J.takeRightWhile=xR,J.takeWhile=CR,J.tap=FR,J.throttle=_2,J.thru=Gc,J.toArray=Pb,J.toPairs=Ub,J.toPairsIn=Vb,J.toPath=ID,J.toPlainObject=Wb,J.transform=MO,J.unary=S2,J.union=kR,J.unionBy=_R,J.unionWith=SR,J.uniq=AR,J.uniqBy=TR,J.uniqWith=$R,J.unset=EO,J.unzip=Zd,J.unzipWith=kb,J.update=IO,J.updateWith=LO,J.values=Ca,J.valuesIn=RO,J.without=MR,J.words=Gb,J.wrap=A2,J.xor=ER,J.xorBy=IR,J.xorWith=LR,J.zip=RR,J.zipObject=OR,J.zipObjectDeep=DR,J.zipWith=NR,J.entries=Ub,J.entriesIn=Vb,J.extend=jb,J.extendWith=tu,cf(J,J),J.add=RD,J.attempt=Yb,J.camelCase=FO,J.capitalize=qb,J.ceil=OD,J.clamp=OO,J.clone=$2,J.cloneDeep=E2,J.cloneDeepWith=I2,J.cloneWith=M2,J.conformsTo=L2,J.deburr=Kb,J.defaultTo=dD,J.divide=DD,J.endsWith=PO,J.eq=Gi,J.escape=BO,J.escapeRegExp=WO,J.every=KR,J.find=YR,J.findIndex=yb,J.findKey=lO,J.findLast=XR,J.findLastIndex=bb,J.findLastKey=cO,J.floor=ND,J.forEach=Sb,J.forEachRight=Ab,J.forIn=uO,J.forInRight=hO,J.forOwn=dO,J.forOwnRight=fO,J.get=rf,J.gt=R2,J.gte=O2,J.has=mO,J.hasIn=of,J.head=xb,J.identity=ni,J.includes=t2,J.indexOf=XL,J.inRange=DO,J.invoke=bO,J.isArguments=Ws,J.isArray=It,J.isArrayBuffer=D2,J.isArrayLike=ei,J.isArrayLikeObject=Zn,J.isBoolean=N2,J.isBuffer=rs,J.isDate=F2,J.isElement=P2,J.isEmpty=B2,J.isEqual=W2,J.isEqualWith=j2,J.isError=tf,J.isFinite=z2,J.isFunction=Io,J.isInteger=Ob,J.isLength=Jc,J.isMap=Db,J.isMatch=H2,J.isMatchWith=U2,J.isNaN=V2,J.isNative=q2,J.isNil=G2,J.isNull=K2,J.isNumber=Nb,J.isObject=Dn,J.isObjectLike=Un,J.isPlainObject=dl,J.isRegExp=nf,J.isSafeInteger=Y2,J.isSet=Fb,J.isString=eu,J.isSymbol=gi,J.isTypedArray=xa,J.isUndefined=X2,J.isWeakMap=Q2,J.isWeakSet=Z2,J.join=tR,J.kebabCase=jO,J.last=Ii,J.lastIndexOf=nR,J.lowerCase=zO,J.lowerFirst=HO,J.lt=J2,J.lte=eO,J.max=FD,J.maxBy=PD,J.mean=BD,J.meanBy=WD,J.min=jD,J.minBy=zD,J.stubArray=hf,J.stubFalse=df,J.stubObject=TD,J.stubString=$D,J.stubTrue=MD,J.multiply=HD,J.nth=rR,J.noConflict=bD,J.noop=uf,J.now=Xc,J.pad=UO,J.padEnd=VO,J.padStart=qO,J.parseInt=KO,J.random=NO,J.reduce=s2,J.reduceRight=a2,J.repeat=GO,J.replace=YO,J.result=AO,J.round=UD,J.runInContext=fe,J.sample=c2,J.size=d2,J.snakeCase=XO,J.some=f2,J.sortedIndex=uR,J.sortedIndexBy=hR,J.sortedIndexOf=dR,J.sortedLastIndex=fR,J.sortedLastIndexBy=pR,J.sortedLastIndexOf=gR,J.startCase=ZO,J.startsWith=JO,J.subtract=VD,J.sum=qD,J.sumBy=KD,J.template=eD,J.times=ED,J.toFinite=Lo,J.toInteger=Ft,J.toLength=Bb,J.toLower=tD,J.toNumber=Li,J.toSafeInteger=tO,J.toString=un,J.toUpper=nD,J.trim=rD,J.trimEnd=iD,J.trimStart=oD,J.truncate=sD,J.unescape=aD,J.uniqueId=LD,J.upperCase=lD,J.upperFirst=sf,J.each=Sb,J.eachRight=Ab,J.first=xb,cf(J,function(){var i={};return lo(J,function(v,M){fn.call(J.prototype,M)||(i[M]=v)}),i}(),{chain:!1}),J.VERSION=r,Cr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){J[i].placeholder=J}),Cr(["drop","take"],function(i,v){Yt.prototype[i]=function(M){M=M===n?1:dr(Ft(M),0);var z=this.__filtered__&&!v?new Yt(this):this.clone();return z.__filtered__?z.__takeCount__=Or(M,z.__takeCount__):z.__views__.push({size:Or(M,te),type:i+(z.__dir__<0?"Right":"")}),z},Yt.prototype[i+"Right"]=function(M){return this.reverse()[i](M).reverse()}}),Cr(["filter","map","takeWhile"],function(i,v){var M=v+1,z=M==A||M==D;Yt.prototype[i]=function(G){var ee=this.clone();return ee.__iteratees__.push({iteratee:bt(G,3),type:M}),ee.__filtered__=ee.__filtered__||z,ee}}),Cr(["head","last"],function(i,v){var M="take"+(v?"Right":"");Yt.prototype[i]=function(){return this[M](1).value()[0]}}),Cr(["initial","tail"],function(i,v){var M="drop"+(v?"":"Right");Yt.prototype[i]=function(){return this.__filtered__?new Yt(this):this[M](1)}}),Yt.prototype.compact=function(){return this.filter(ni)},Yt.prototype.find=function(i){return this.filter(i).head()},Yt.prototype.findLast=function(i){return this.reverse().find(i)},Yt.prototype.invokeMap=Ht(function(i,v){return typeof i=="function"?new Yt(this):this.map(function(M){return sl(M,i,v)})}),Yt.prototype.reject=function(i){return this.filter(Zc(bt(i)))},Yt.prototype.slice=function(i,v){i=Ft(i);var M=this;return M.__filtered__&&(i>0||v<0)?new Yt(M):(i<0?M=M.takeRight(-i):i&&(M=M.drop(i)),v!==n&&(v=Ft(v),M=v<0?M.dropRight(-v):M.take(v-i)),M)},Yt.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},Yt.prototype.toArray=function(){return this.take(te)},lo(Yt.prototype,function(i,v){var M=/^(?:filter|find|map|reject)|While$/.test(v),z=/^(?:head|last)$/.test(v),G=J[z?"take"+(v=="last"?"Right":""):v],ee=z||/^find/.test(v);G&&(J.prototype[v]=function(){var le=this.__wrapped__,de=z?[1]:arguments,ve=le instanceof Yt,Ie=de[0],Le=ve||It(le),Ne=function(Vt){var Zt=G.apply(J,$([Vt],de));return z&&Qe?Zt[0]:Zt};Le&&M&&typeof Ie=="function"&&Ie.length!=1&&(ve=Le=!1);var Qe=this.__chain__,ct=!!this.__actions__.length,wt=ee&&!Qe,jt=ve&&!ct;if(!ee&&Le){le=jt?le:new Yt(this);var xt=i.apply(le,de);return xt.__actions__.push({func:Gc,args:[Ne],thisArg:n}),new $i(xt,Qe)}return wt&&jt?i.apply(this,de):(xt=this.thru(Ne),wt?z?xt.value()[0]:xt.value():xt)})}),Cr(["pop","push","shift","sort","splice","unshift"],function(i){var v=vr[i],M=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",z=/^(?:pop|shift)$/.test(i);J.prototype[i]=function(){var G=arguments;if(z&&!this.__chain__){var ee=this.value();return v.apply(It(ee)?ee:[],G)}return this[M](function(le){return v.apply(It(le)?le:[],G)})}}),lo(Yt.prototype,function(i,v){var M=J[v];if(M){var z=M.name+"";fn.call(ma,z)||(ma[z]=[]),ma[z].push({name:v,func:M})}}),ma[jc(n,w).name]=[{name:"wrapper",func:n}],Yt.prototype.clone=aI,Yt.prototype.reverse=lI,Yt.prototype.value=cI,J.prototype.at=PR,J.prototype.chain=BR,J.prototype.commit=WR,J.prototype.next=jR,J.prototype.plant=HR,J.prototype.reverse=UR,J.prototype.toJSON=J.prototype.valueOf=J.prototype.value=VR,J.prototype.first=J.prototype.head,Ja&&(J.prototype[Ja]=zR),J},Qt=or();rr?((rr.exports=Qt)._=Qt,An._=Qt):pn._=Qt}).call(xk)}(Nl,Nl.exports)),Nl.exports}var kk=Ck();sr("O",ml(kk)).debounce(function(){this.rebuildDisplayText()},300);var mg={exports:{}},vg;function _k(){return vg||(vg=1,function(t,e){(function(){ace.require(["ace/mode/text"],function(n){t&&(t.exports=n)})})()}(mg)),mg.exports}_k();const Sk=!0,ar="u-",Ak="uplot",Tk=ar+"hz",$k=ar+"vt",Mk=ar+"title",Ek=ar+"wrap",Ik=ar+"under",Lk=ar+"over",Rk=ar+"axis",ps=ar+"off",Ok=ar+"select",Dk=ar+"cursor-x",Nk=ar+"cursor-y",Fk=ar+"cursor-pt",Pk=ar+"legend",Bk=ar+"live",Wk=ar+"inline",jk=ar+"series",zk=ar+"marker",yg=ar+"label",Hk=ar+"value",Ra="width",Oa="height",Da="top",bg="bottom",Gs="left",Ru="right",Ou="#000",wg=Ou+"0",Du="mousemove",xg="mousedown",Nu="mouseup",Cg="mouseenter",kg="mouseleave",_g="dblclick",Uk="resize",Vk="scroll",Sg="change",Fl="dppxchange",Fu="--",Ys=typeof window<"u",Pu=Ys?document:null,Xs=Ys?window:null,qk=Ys?navigator:null;let rn,Pl;function Bu(){let t=devicePixelRatio;rn!=t&&(rn=t,Pl&&zu(Sg,Pl,Bu),Pl=matchMedia(`(min-resolution: ${rn-.001}dppx) and (max-resolution: ${rn+.001}dppx)`),gs(Sg,Pl,Bu),Xs.dispatchEvent(new CustomEvent(Fl)))}function ii(t,e){if(e!=null){let n=t.classList;!n.contains(e)&&n.add(e)}}function Wu(t,e){let n=t.classList;n.contains(e)&&n.remove(e)}function Sn(t,e,n){t.style[e]=n+"px"}function Ni(t,e,n,r){let f=Pu.createElement(t);return e!=null&&ii(f,e),n!=null&&n.insertBefore(f,r),f}function yi(t,e){return Ni("div",t,e)}const Ag=new WeakMap;function Zi(t,e,n,r,f){let d="translate("+e+"px,"+n+"px)",p=Ag.get(t);d!=p&&(t.style.transform=d,Ag.set(t,d),e<0||n<0||e>r||n>f?ii(t,ps):Wu(t,ps))}const Tg=new WeakMap;function $g(t,e,n){let r=e+n,f=Tg.get(t);r!=f&&(Tg.set(t,r),t.style.background=e,t.style.borderColor=n)}const Mg=new WeakMap;function Eg(t,e,n,r){let f=e+""+n,d=Mg.get(t);f!=d&&(Mg.set(t,f),t.style.height=n+"px",t.style.width=e+"px",t.style.marginLeft=r?-e/2+"px":0,t.style.marginTop=r?-n/2+"px":0)}const ju={passive:!0},Kk={...ju,capture:!0};function gs(t,e,n,r){e.addEventListener(t,n,r?Kk:ju)}function zu(t,e,n,r){e.removeEventListener(t,n,ju)}Ys&&Bu();function Fi(t,e,n,r){let f;n=n||0,r=r||e.length-1;let d=r<=2147483647;for(;r-n>1;)f=d?n+r>>1:si((n+r)/2),e[f]<t?n=f:r=f;return t-e[n]<=e[r]-t?n:r}function Ig(t){return(e,n,r)=>{let f=-1,d=-1;for(let p=n;p<=r;p++)if(t(e[p])){f=p;break}for(let p=r;p>=n;p--)if(t(e[p])){d=p;break}return[f,d]}}const Lg=t=>t!=null,Rg=t=>t!=null&&t>0,Bl=Ig(Lg),Gk=Ig(Rg);function Yk(t,e,n,r=0,f=!1){let d=f?Gk:Bl,p=f?Rg:Lg;[e,n]=d(t,e,n);let b=t[e],h=t[e];if(e>-1)if(r==1)b=t[e],h=t[n];else if(r==-1)b=t[n],h=t[e];else for(let g=e;g<=n;g++){let s=t[g];p(s)&&(s<b?b=s:s>h&&(h=s))}return[b??br,h??-1/0]}function Wl(t,e,n,r){let f=Ng(t),d=Ng(e);t==e&&(f==-1?(t*=n,e/=n):(t/=n,e*=n));let p=n==10?ho:Fg,b=f==1?si:bi,h=d==1?bi:si,g=b(p(lr(t))),s=h(p(lr(e))),a=Qs(n,g),c=Qs(n,s);return n==10&&(g<0&&(a=mn(a,-g)),s<0&&(c=mn(c,-s))),r||n==2?(t=a*f,e=c*d):(t=Ug(t,a),e=Hl(e,c)),[t,e]}function Hu(t,e,n,r){let f=Wl(t,e,n,r);return t==0&&(f[0]=0),e==0&&(f[1]=0),f}const Uu=.1,Og={mode:3,pad:Uu},Na={pad:0,soft:null,mode:0},Xk={min:Na,max:Na};function jl(t,e,n,r){return Ul(n)?Dg(t,e,n):(Na.pad=n,Na.soft=r?0:null,Na.mode=r?3:0,Dg(t,e,Xk))}function tn(t,e){return t??e}function Qk(t,e,n){for(e=tn(e,0),n=tn(n,t.length-1);e<=n;){if(t[e]!=null)return!0;e++}return!1}function Dg(t,e,n){let r=n.min,f=n.max,d=tn(r.pad,0),p=tn(f.pad,0),b=tn(r.hard,-1/0),h=tn(f.hard,br),g=tn(r.soft,br),s=tn(f.soft,-1/0),a=tn(r.mode,0),c=tn(f.mode,0),l=e-t,o=ho(l),u=Nr(lr(t),lr(e)),m=ho(u),w=lr(m-o);(l<1e-24||w>10)&&(l=0,(t==0||e==0)&&(l=1e-24,a==2&&g!=br&&(d=0),c==2&&s!=-1/0&&(p=0)));let x=l||u||1e3,E=ho(x),T=Qs(10,si(E)),k=x*(l==0?t==0?.1:1:d),C=mn(Ug(t-k,T/10),24),L=t>=g&&(a==1||a==3&&C<=g||a==2&&C>=g)?g:br,R=Nr(b,C<L&&t>=L?L:Pi(L,C)),F=x*(l==0?e==0?.1:1:p),I=mn(Hl(e+F,T/10),24),H=e<=s&&(c==1||c==3&&I>=s||c==2&&I<=s)?s:-1/0,P=Pi(h,I>H&&e<=H?H:Nr(H,I));return R==P&&R==0&&(P=100),[R,P]}const Zk=new Intl.NumberFormat(Ys?qk.language:"en-US"),Vu=t=>Zk.format(t),oi=Math,zl=oi.PI,lr=oi.abs,si=oi.floor,cr=oi.round,bi=oi.ceil,Pi=oi.min,Nr=oi.max,Qs=oi.pow,Ng=oi.sign,ho=oi.log10,Fg=oi.log2,Jk=(t,e=1)=>oi.sinh(t)*e,qu=(t,e=1)=>oi.asinh(t/e),br=1/0;function Pg(t){return(ho((t^t>>31)-(t>>31))|0)+1}function Ku(t,e,n){return Pi(Nr(t,e),n)}function Bg(t){return typeof t=="function"}function qt(t){return Bg(t)?t:()=>t}const e_=()=>{},Wg=t=>t,jg=(t,e)=>e,t_=t=>null,zg=t=>!0,Hg=(t,e)=>t==e,n_=/\.\d*?(?=9{6,}|0{6,})/gm,ms=t=>{if(qg(t)||Po.has(t))return t;const e=`${t}`,n=e.match(n_);if(n==null)return t;let r=n[0].length-1;if(e.indexOf("e-")!=-1){let[f,d]=e.split("e");return+`${ms(f)}e${d}`}return mn(t,r)};function vs(t,e){return ms(mn(ms(t/e))*e)}function Hl(t,e){return ms(bi(ms(t/e))*e)}function Ug(t,e){return ms(si(ms(t/e))*e)}function mn(t,e=0){if(qg(t))return t;let n=10**e,r=t*n*(1+Number.EPSILON);return cr(r)/n}const Po=new Map;function Vg(t){return((""+t).split(".")[1]||"").length}function Fa(t,e,n,r){let f=[],d=r.map(Vg);for(let p=e;p<n;p++){let b=lr(p),h=mn(Qs(t,p),b);for(let g=0;g<r.length;g++){let s=t==10?+`${r[g]}e${p}`:r[g]*h,a=(p>=0?0:b)+(p>=d[g]?0:d[g]),c=t==10?s:mn(s,a);f.push(c),Po.set(c,a)}}return f}const Pa={},Gu=[],Zs=[null,null],Bo=Array.isArray,qg=Number.isInteger,r_=t=>t===void 0;function Kg(t){return typeof t=="string"}function Ul(t){let e=!1;if(t!=null){let n=t.constructor;e=n==null||n==Object}return e}function i_(t){return t!=null&&typeof t=="object"}const o_=Object.getPrototypeOf(Uint8Array),Gg="__proto__";function Js(t,e=Ul){let n;if(Bo(t)){let r=t.find(f=>f!=null);if(Bo(r)||e(r)){n=Array(t.length);for(let f=0;f<t.length;f++)n[f]=Js(t[f],e)}else n=t.slice()}else if(t instanceof o_)n=t.slice();else if(e(t)){n={};for(let r in t)r!=Gg&&(n[r]=Js(t[r],e))}else n=t;return n}function tr(t){let e=arguments;for(let n=1;n<e.length;n++){let r=e[n];for(let f in r)f!=Gg&&(Ul(t[f])?tr(t[f],Js(r[f])):t[f]=Js(r[f]))}return t}const s_=0,a_=1,l_=2;function c_(t,e,n){for(let r=0,f,d=-1;r<e.length;r++){let p=e[r];if(p>d){for(f=p-1;f>=0&&t[f]==null;)t[f--]=null;for(f=p+1;f<n&&t[f]==null;)t[d=f++]=null}}}function u_(t,e){if(f_(t)){let p=t[0].slice();for(let b=1;b<t.length;b++)p.push(...t[b].slice(1));return p_(p[0])||(p=d_(p)),p}let n=new Set;for(let p=0;p<t.length;p++){let b=t[p][0],h=b.length;for(let g=0;g<h;g++)n.add(b[g])}let r=[Array.from(n).sort((p,b)=>p-b)],f=r[0].length,d=new Map;for(let p=0;p<f;p++)d.set(r[0][p],p);for(let p=0;p<t.length;p++){let b=t[p],h=b[0];for(let g=1;g<b.length;g++){let s=b[g],a=Array(f).fill(void 0),c=e?e[p][g]:a_,l=[];for(let o=0;o<s.length;o++){let u=s[o],m=d.get(h[o]);u===null?c!=s_&&(a[m]=u,c==l_&&l.push(m)):a[m]=u}c_(a,l,f),r.push(a)}}return r}const h_=typeof queueMicrotask>"u"?t=>Promise.resolve().then(t):queueMicrotask;function d_(t){let e=t[0],n=e.length,r=Array(n);for(let d=0;d<r.length;d++)r[d]=d;r.sort((d,p)=>e[d]-e[p]);let f=[];for(let d=0;d<t.length;d++){let p=t[d],b=Array(n);for(let h=0;h<n;h++)b[h]=p[r[h]];f.push(b)}return f}function f_(t){let e=t[0][0],n=e.length;for(let r=1;r<t.length;r++){let f=t[r][0];if(f.length!=n)return!1;if(f!=e){for(let d=0;d<n;d++)if(f[d]!=e[d])return!1}}return!0}function p_(t,e=100){const n=t.length;if(n<=1)return!0;let r=0,f=n-1;for(;r<=f&&t[r]==null;)r++;for(;f>=r&&t[f]==null;)f--;if(f<=r)return!0;const d=Nr(1,si((f-r+1)/e));for(let p=t[r],b=r+d;b<=f;b+=d){const h=t[b];if(h!=null){if(h<=p)return!1;p=h}}return!0}const Yg=["January","February","March","April","May","June","July","August","September","October","November","December"],Xg=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Qg(t){return t.slice(0,3)}const g_=Xg.map(Qg),m_=Yg.map(Qg),v_={MMMM:Yg,MMM:m_,WWWW:Xg,WWW:g_};function Ba(t){return(t<10?"0":"")+t}function y_(t){return(t<10?"00":t<100?"0":"")+t}const b_={YYYY:t=>t.getFullYear(),YY:t=>(t.getFullYear()+"").slice(2),MMMM:(t,e)=>e.MMMM[t.getMonth()],MMM:(t,e)=>e.MMM[t.getMonth()],MM:t=>Ba(t.getMonth()+1),M:t=>t.getMonth()+1,DD:t=>Ba(t.getDate()),D:t=>t.getDate(),WWWW:(t,e)=>e.WWWW[t.getDay()],WWW:(t,e)=>e.WWW[t.getDay()],HH:t=>Ba(t.getHours()),H:t=>t.getHours(),h:t=>{let e=t.getHours();return e==0?12:e>12?e-12:e},AA:t=>t.getHours()>=12?"PM":"AM",aa:t=>t.getHours()>=12?"pm":"am",a:t=>t.getHours()>=12?"p":"a",mm:t=>Ba(t.getMinutes()),m:t=>t.getMinutes(),ss:t=>Ba(t.getSeconds()),s:t=>t.getSeconds(),fff:t=>y_(t.getMilliseconds())};function Yu(t,e){e=e||v_;let n=[],r=/\{([a-z]+)\}|[^{]+/gi,f;for(;f=r.exec(t);)n.push(f[0][0]=="{"?b_[f[1]]:f[0]);return d=>{let p="";for(let b=0;b<n.length;b++)p+=typeof n[b]=="string"?n[b]:n[b](d,e);return p}}const w_=new Intl.DateTimeFormat().resolvedOptions().timeZone;function x_(t,e){let n;return e=="UTC"||e=="Etc/UTC"?n=new Date(+t+t.getTimezoneOffset()*6e4):e==w_?n=t:(n=new Date(t.toLocaleString("en-US",{timeZone:e})),n.setMilliseconds(t.getMilliseconds())),n}const Zg=t=>t%1==0,Vl=[1,2,2.5,5],C_=Fa(10,-32,0,Vl),Jg=Fa(10,0,32,Vl),k_=Jg.filter(Zg),ys=C_.concat(Jg),Xu=`
1488
+ `,em="{YYYY}",tm=Xu+em,nm="{M}/{D}",Wa=Xu+nm,ql=Wa+"/{YY}",rm="{aa}",__="{h}:{mm}",ea=__+rm,im=Xu+ea,om=":{ss}",cn=null;function sm(t){let e=t*1e3,n=e*60,r=n*60,f=r*24,d=f*30,p=f*365,b=(t==1?Fa(10,0,3,Vl).filter(Zg):Fa(10,-3,0,Vl)).concat([e,e*5,e*10,e*15,e*30,n,n*5,n*10,n*15,n*30,r,r*2,r*3,r*4,r*6,r*8,r*12,f,f*2,f*3,f*4,f*5,f*6,f*7,f*8,f*9,f*10,f*15,d,d*2,d*3,d*4,d*6,p,p*2,p*5,p*10,p*25,p*50,p*100]);const h=[[p,em,cn,cn,cn,cn,cn,cn,1],[f*28,"{MMM}",tm,cn,cn,cn,cn,cn,1],[f,nm,tm,cn,cn,cn,cn,cn,1],[r,"{h}"+rm,ql,cn,Wa,cn,cn,cn,1],[n,ea,ql,cn,Wa,cn,cn,cn,1],[e,om,ql+" "+ea,cn,Wa+" "+ea,cn,im,cn,1],[t,om+".{fff}",ql+" "+ea,cn,Wa+" "+ea,cn,im,cn,1]];function g(s){return(a,c,l,o,u,m)=>{let w=[],x=u>=p,E=u>=d&&u<p,T=s(l),k=mn(T*t,3),C=Qu(T.getFullYear(),x?0:T.getMonth(),E||x?1:T.getDate()),L=mn(C*t,3);if(E||x){let R=E?u/d:0,F=x?u/p:0,I=k==L?k:mn(Qu(C.getFullYear()+F,C.getMonth()+R,1)*t,3),H=new Date(cr(I/t)),P=H.getFullYear(),O=H.getMonth();for(let A=0;I<=o;A++){let S=Qu(P+F*A,O+R*A,1),D=S-s(mn(S*t,3));I=mn((+S+D)*t,3),I<=o&&w.push(I)}}else{let R=u>=f?f:u,F=si(l)-si(k),I=L+F+Hl(k-L,R);w.push(I);let H=s(I),P=H.getHours()+H.getMinutes()/n+H.getSeconds()/r,O=u/r,A=a.axes[c]._space,S=m/A;for(;I=mn(I+u,t==1?0:3),!(I>o);)if(O>1){let D=si(mn(P+O,6))%24,W=s(I).getHours()-D;W>1&&(W=-1),I-=W*r,P=(P+O)%24;let U=w[w.length-1];mn((I-U)/u,3)*S>=.7&&w.push(I)}else w.push(I)}return w}}return[b,h,g]}const[S_,A_,T_]=sm(1),[$_,M_,E_]=sm(.001);Fa(2,-53,53,[1]);function am(t,e){return t.map(n=>n.map((r,f)=>f==0||f==8||r==null?r:e(f==1||n[8]==0?r:n[1]+r)))}function lm(t,e){return(n,r,f,d,p)=>{let b=e.find(o=>p>=o[0])||e[e.length-1],h,g,s,a,c,l;return r.map(o=>{let u=t(o),m=u.getFullYear(),w=u.getMonth(),x=u.getDate(),E=u.getHours(),T=u.getMinutes(),k=u.getSeconds(),C=m!=h&&b[2]||w!=g&&b[3]||x!=s&&b[4]||E!=a&&b[5]||T!=c&&b[6]||k!=l&&b[7]||b[1];return h=m,g=w,s=x,a=E,c=T,l=k,C(u)})}}function I_(t,e){let n=Yu(e);return(r,f,d,p,b)=>f.map(h=>n(t(h)))}function Qu(t,e,n){return new Date(t,e,n)}function cm(t,e){return e(t)}const L_="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function um(t,e){return(n,r,f,d)=>d==null?Fu:e(t(r))}function R_(t,e){let n=t.series[e];return n.width?n.stroke(t,e):n.points.width?n.points.stroke(t,e):null}function O_(t,e){return t.series[e].fill(t,e)}const D_={show:!0,live:!0,isolate:!1,mount:e_,markers:{show:!0,width:2,stroke:R_,fill:O_,dash:"solid"},idx:null,idxs:null,values:[]};function N_(t,e){let n=t.cursor.points,r=yi(),f=n.size(t,e);Sn(r,Ra,f),Sn(r,Oa,f);let d=f/-2;Sn(r,"marginLeft",d),Sn(r,"marginTop",d);let p=n.width(t,e,f);return p&&Sn(r,"borderWidth",p),r}function F_(t,e){let n=t.series[e].points;return n._fill||n._stroke}function P_(t,e){let n=t.series[e].points;return n._stroke||n._fill}function B_(t,e){return t.series[e].points.size}const Zu=[0,0];function W_(t,e,n){return Zu[0]=e,Zu[1]=n,Zu}function Kl(t,e,n,r=!0){return f=>{f.button==0&&(!r||f.target==e)&&n(f)}}function Ju(t,e,n,r=!0){return f=>{(!r||f.target==e)&&n(f)}}const j_={show:!0,x:!0,y:!0,lock:!1,move:W_,points:{one:!1,show:N_,size:B_,width:0,stroke:P_,fill:F_},bind:{mousedown:Kl,mouseup:Kl,click:Kl,dblclick:Kl,mousemove:Ju,mouseleave:Ju,mouseenter:Ju},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(t,e)=>{e.stopPropagation(),e.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(t,e,n,r,f)=>r-f,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},hm={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},eh=tr({},hm,{filter:jg}),dm=tr({},eh,{size:10}),fm=tr({},hm,{show:!1}),th='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"',pm="bold "+th,gm=1.5,mm={show:!0,scale:"x",stroke:Ou,space:50,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:pm,side:2,grid:eh,ticks:dm,border:fm,font:th,lineGap:gm,rotate:0},z_="Value",H_="Time",vm={show:!0,scale:"x",auto:!1,sorted:1,min:br,max:-1/0,idxs:[]};function U_(t,e,n,r,f){return e.map(d=>d==null?"":Vu(d))}function V_(t,e,n,r,f,d,p){let b=[],h=Po.get(f)||0;n=p?n:mn(Hl(n,f),h);for(let g=n;g<=r;g=mn(g+f,h))b.push(Object.is(g,-0)?0:g);return b}function nh(t,e,n,r,f,d,p){const b=[],h=t.scales[t.axes[e].scale].log,g=h==10?ho:Fg,s=si(g(n));f=Qs(h,s),h==10&&(f=ys[Fi(f,ys)]);let a=n,c=f*h;h==10&&(c=ys[Fi(c,ys)]);do b.push(a),a=a+f,h==10&&!Po.has(a)&&(a=mn(a,Po.get(f))),a>=c&&(f=a,c=f*h,h==10&&(c=ys[Fi(c,ys)]));while(a<=r);return b}function q_(t,e,n,r,f,d,p){let b=t.scales[t.axes[e].scale].asinh,h=r>b?nh(t,e,Nr(b,n),r,f):[b],g=r>=0&&n<=0?[0]:[];return(n<-b?nh(t,e,Nr(b,-r),-n,f):[b]).reverse().map(s=>-s).concat(g,h)}const ym=/./,K_=/[12357]/,G_=/[125]/,bm=/1/,rh=(t,e,n,r)=>t.map((f,d)=>e==4&&f==0||d%r==0&&n.test(f.toExponential()[f<0?1:0])?f:null);function Y_(t,e,n,r,f){let d=t.axes[n],p=d.scale,b=t.scales[p],h=t.valToPos,g=d._space,s=h(10,p),a=h(9,p)-s>=g?ym:h(7,p)-s>=g?K_:h(5,p)-s>=g?G_:bm;if(a==bm){let c=lr(h(1,p)-s);if(c<g)return rh(e.slice().reverse(),b.distr,a,bi(g/c)).reverse()}return rh(e,b.distr,a,1)}function X_(t,e,n,r,f){let d=t.axes[n],p=d.scale,b=d._space,h=t.valToPos,g=lr(h(1,p)-h(2,p));return g<b?rh(e.slice().reverse(),3,ym,bi(b/g)).reverse():e}function Q_(t,e,n,r){return r==null?Fu:e==null?"":Vu(e)}const wm={show:!0,scale:"y",stroke:Ou,space:30,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:pm,side:3,grid:eh,ticks:dm,border:fm,font:th,lineGap:gm,rotate:0};function Z_(t,e){let n=3+(t||1)*2;return mn(n*e,3)}function J_(t,e){let{scale:n,idxs:r}=t.series[0],f=t._data[0],d=t.valToPos(f[r[0]],n,!0),p=t.valToPos(f[r[1]],n,!0),b=lr(p-d),h=t.series[e],g=b/(h.points.space*rn);return r[1]-r[0]<=g}const xm={scale:null,auto:!0,sorted:0,min:br,max:-1/0},Cm=(t,e,n,r,f)=>f,km={show:!0,auto:!0,sorted:0,gaps:Cm,alpha:1,facets:[tr({},xm,{scale:"x"}),tr({},xm,{scale:"y"})]},_m={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:Cm,alpha:1,points:{show:J_,filter:null},values:null,min:br,max:-1/0,idxs:[],path:null,clip:null};function eS(t,e,n,r,f){return n/10}const Sm={time:Sk,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},tS=tr({},Sm,{time:!1,ori:1}),Am={};function Tm(t,e){let n=Am[t];return n||(n={key:t,plots:[],sub(r){n.plots.push(r)},unsub(r){n.plots=n.plots.filter(f=>f!=r)},pub(r,f,d,p,b,h,g){for(let s=0;s<n.plots.length;s++)n.plots[s]!=f&&n.plots[s].pub(r,f,d,p,b,h,g)}},t!=null&&(Am[t]=n)),n}const ta=1,ih=2;function bs(t,e,n){const r=t.mode,f=t.series[e],d=r==2?t._data[e]:t._data,p=t.scales,b=t.bbox;let h=d[0],g=r==2?d[1]:d[e],s=r==2?p[f.facets[0].scale]:p[t.series[0].scale],a=r==2?p[f.facets[1].scale]:p[f.scale],c=b.left,l=b.top,o=b.width,u=b.height,m=t.valToPosH,w=t.valToPosV;return s.ori==0?n(f,h,g,s,a,m,w,c,l,o,u,Yl,na,Ql,Em,Lm):n(f,h,g,s,a,w,m,l,c,u,o,Xl,ra,ah,Im,Rm)}function oh(t,e){let n=0,r=0,f=tn(t.bands,Gu);for(let d=0;d<f.length;d++){let p=f[d];p.series[0]==e?n=p.dir:p.series[1]==e&&(p.dir==1?r|=1:r|=2)}return[n,r==1?-1:r==2?1:r==3?2:0]}function nS(t,e,n,r,f){let d=t.mode,p=t.series[e],b=d==2?p.facets[1].scale:p.scale,h=t.scales[b];return f==-1?h.min:f==1?h.max:h.distr==3?h.dir==1?h.min:h.max:0}function fo(t,e,n,r,f,d){return bs(t,e,(p,b,h,g,s,a,c,l,o,u,m)=>{let w=p.pxRound;const x=g.dir*(g.ori==0?1:-1),E=g.ori==0?na:ra;let T,k;x==1?(T=n,k=r):(T=r,k=n);let C=w(a(b[T],g,u,l)),L=w(c(h[T],s,m,o)),R=w(a(b[k],g,u,l)),F=w(c(d==1?s.max:s.min,s,m,o)),I=new Path2D(f);return E(I,R,F),E(I,C,F),E(I,C,L),I})}function Gl(t,e,n,r,f,d){let p=null;if(t.length>0){p=new Path2D;const b=e==0?Ql:ah;let h=n;for(let a=0;a<t.length;a++){let c=t[a];if(c[1]>c[0]){let l=c[0]-h;l>0&&b(p,h,r,l,r+d),h=c[1]}}let g=n+f-h,s=10;g>0&&b(p,h,r-s/2,g,r+d+s)}return p}function rS(t,e,n){let r=t[t.length-1];r&&r[0]==e?r[1]=n:t.push([e,n])}function sh(t,e,n,r,f,d,p){let b=[],h=t.length;for(let g=f==1?n:r;g>=n&&g<=r;g+=f)if(e[g]===null){let s=g,a=g;if(f==1)for(;++g<=r&&e[g]===null;)a=g;else for(;--g>=n&&e[g]===null;)a=g;let c=d(t[s]),l=a==s?c:d(t[a]),o=s-f;c=p<=0&&o>=0&&o<h?d(t[o]):c;let u=a+f;l=p>=0&&u>=0&&u<h?d(t[u]):l,l>=c&&b.push([c,l])}return b}function $m(t){return t==0?Wg:t==1?cr:e=>vs(e,t)}function Mm(t){let e=t==0?Yl:Xl,n=t==0?(f,d,p,b,h,g)=>{f.arcTo(d,p,b,h,g)}:(f,d,p,b,h,g)=>{f.arcTo(p,d,h,b,g)},r=t==0?(f,d,p,b,h)=>{f.rect(d,p,b,h)}:(f,d,p,b,h)=>{f.rect(p,d,h,b)};return(f,d,p,b,h,g=0,s=0)=>{g==0&&s==0?r(f,d,p,b,h):(g=Pi(g,b/2,h/2),s=Pi(s,b/2,h/2),e(f,d+g,p),n(f,d+b,p,d+b,p+h,g),n(f,d+b,p+h,d,p+h,s),n(f,d,p+h,d,p,s),n(f,d,p,d+b,p,g),f.closePath())}}const Yl=(t,e,n)=>{t.moveTo(e,n)},Xl=(t,e,n)=>{t.moveTo(n,e)},na=(t,e,n)=>{t.lineTo(e,n)},ra=(t,e,n)=>{t.lineTo(n,e)},Ql=Mm(0),ah=Mm(1),Em=(t,e,n,r,f,d)=>{t.arc(e,n,r,f,d)},Im=(t,e,n,r,f,d)=>{t.arc(n,e,r,f,d)},Lm=(t,e,n,r,f,d,p)=>{t.bezierCurveTo(e,n,r,f,d,p)},Rm=(t,e,n,r,f,d,p)=>{t.bezierCurveTo(n,e,f,r,p,d)};function Om(t){return(e,n,r,f,d)=>bs(e,n,(p,b,h,g,s,a,c,l,o,u,m)=>{let{pxRound:w,points:x}=p,E,T;g.ori==0?(E=Yl,T=Em):(E=Xl,T=Im);const k=mn(x.width*rn,3);let C=(x.size-x.width)/2*rn,L=mn(C*2,3),R=new Path2D,F=new Path2D,{left:I,top:H,width:P,height:O}=e.bbox;Ql(F,I-L,H-L,P+L*2,O+L*2);const A=S=>{if(h[S]!=null){let D=w(a(b[S],g,u,l)),W=w(c(h[S],s,m,o));E(R,D+C,W),T(R,D,W,C,0,zl*2)}};if(d)d.forEach(A);else for(let S=r;S<=f;S++)A(S);return{stroke:k>0?R:null,fill:R,clip:F,flags:ta|ih}})}function Dm(t){return(e,n,r,f,d,p)=>{r!=f&&(d!=r&&p!=r&&t(e,n,r),d!=f&&p!=f&&t(e,n,f),t(e,n,p))}}const iS=Dm(na),oS=Dm(ra);function Nm(t){const e=tn(t==null?void 0:t.alignGaps,0);return(n,r,f,d)=>bs(n,r,(p,b,h,g,s,a,c,l,o,u,m)=>{[f,d]=Bl(h,f,d);let w=p.pxRound,x=P=>w(a(P,g,u,l)),E=P=>w(c(P,s,m,o)),T,k;g.ori==0?(T=na,k=iS):(T=ra,k=oS);const C=g.dir*(g.ori==0?1:-1),L={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:ta},R=L.stroke;let F=!1;if(d-f>=u*4){let P=he=>n.posToVal(he,g.key,!0),O=null,A=null,S,D,W,U=x(b[C==1?f:d]),K=x(b[f]),Z=x(b[d]),te=P(C==1?K+1:Z-1);for(let he=C==1?f:d;he>=f&&he<=d;he+=C){let ne=b[he],ae=(C==1?ne<te:ne>te)?U:x(ne),ue=h[he];ae==U?ue!=null?(D=ue,O==null?(T(R,ae,E(D)),S=O=A=D):D<O?O=D:D>A&&(A=D)):ue===null&&(F=!0):(O!=null&&k(R,U,E(O),E(A),E(S),E(D)),ue!=null?(D=ue,T(R,ae,E(D)),O=A=S=D):(O=A=null,ue===null&&(F=!0)),U=ae,te=P(U+C))}O!=null&&O!=A&&W!=U&&k(R,U,E(O),E(A),E(S),E(D))}else for(let P=C==1?f:d;P>=f&&P<=d;P+=C){let O=h[P];O===null?F=!0:O!=null&&T(R,x(b[P]),E(O))}let[I,H]=oh(n,r);if(p.fill!=null||I!=0){let P=L.fill=new Path2D(R),O=p.fillTo(n,r,p.min,p.max,I),A=E(O),S=x(b[f]),D=x(b[d]);C==-1&&([D,S]=[S,D]),T(P,D,A),T(P,S,A)}if(!p.spanGaps){let P=[];F&&P.push(...sh(b,h,f,d,C,x,e)),L.gaps=P=p.gaps(n,r,f,d,P),L.clip=Gl(P,g.ori,l,o,u,m)}return H!=0&&(L.band=H==2?[fo(n,r,f,d,R,-1),fo(n,r,f,d,R,1)]:fo(n,r,f,d,R,H)),L})}function sS(t){const e=tn(t.align,1),n=tn(t.ascDesc,!1),r=tn(t.alignGaps,0),f=tn(t.extend,!1);return(d,p,b,h)=>bs(d,p,(g,s,a,c,l,o,u,m,w,x,E)=>{[b,h]=Bl(a,b,h);let T=g.pxRound,{left:k,width:C}=d.bbox,L=Z=>T(o(Z,c,x,m)),R=Z=>T(u(Z,l,E,w)),F=c.ori==0?na:ra;const I={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:ta},H=I.stroke,P=c.dir*(c.ori==0?1:-1);let O=R(a[P==1?b:h]),A=L(s[P==1?b:h]),S=A,D=A;f&&e==-1&&(D=k,F(H,D,O)),F(H,A,O);for(let Z=P==1?b:h;Z>=b&&Z<=h;Z+=P){let te=a[Z];if(te==null)continue;let he=L(s[Z]),ne=R(te);e==1?F(H,he,O):F(H,S,ne),F(H,he,ne),O=ne,S=he}let W=S;f&&e==1&&(W=k+C,F(H,W,O));let[U,K]=oh(d,p);if(g.fill!=null||U!=0){let Z=I.fill=new Path2D(H),te=g.fillTo(d,p,g.min,g.max,U),he=R(te);F(Z,W,he),F(Z,D,he)}if(!g.spanGaps){let Z=[];Z.push(...sh(s,a,b,h,P,L,r));let te=g.width*rn/2,he=n||e==1?te:-te,ne=n||e==-1?-te:te;Z.forEach(ae=>{ae[0]+=he,ae[1]+=ne}),I.gaps=Z=g.gaps(d,p,b,h,Z),I.clip=Gl(Z,c.ori,m,w,x,E)}return K!=0&&(I.band=K==2?[fo(d,p,b,h,H,-1),fo(d,p,b,h,H,1)]:fo(d,p,b,h,H,K)),I})}function Fm(t,e,n,r,f,d,p=br){if(t.length>1){let b=null;for(let h=0,g=1/0;h<t.length;h++)if(e[h]!==void 0){if(b!=null){let s=lr(t[h]-t[b]);s<g&&(g=s,p=lr(n(t[h],r,f,d)-n(t[b],r,f,d)))}b=h}}return p}function aS(t){t=t||Pa;const e=tn(t.size,[.6,br,1]),n=t.align||0,r=t.gap||0;let f=t.radius;f=f==null?[0,0]:typeof f=="number"?[f,0]:f;const d=qt(f),p=1-e[0],b=tn(e[1],br),h=tn(e[2],1),g=tn(t.disp,Pa),s=tn(t.each,l=>{}),{fill:a,stroke:c}=g;return(l,o,u,m)=>bs(l,o,(w,x,E,T,k,C,L,R,F,I,H)=>{let P=w.pxRound,O=n,A=r*rn,S=b*rn,D=h*rn,W,U;T.ori==0?[W,U]=d(l,o):[U,W]=d(l,o);const K=T.dir*(T.ori==0?1:-1);let Z=T.ori==0?Ql:ah,te=T.ori==0?s:(Ke,ke,Ve,Je,vt,Tt,At)=>{s(Ke,ke,Ve,vt,Je,At,Tt)},he=tn(l.bands,Gu).find(Ke=>Ke.series[0]==o),ne=he!=null?he.dir:0,ae=w.fillTo(l,o,w.min,w.max,ne),ue=P(L(ae,k,H,F)),ce,ge,Te,$e=I,Ee=P(w.width*rn),Ze=!1,Xe=null,gt=null,lt=null,mt=null;a!=null&&(Ee==0||c!=null)&&(Ze=!0,Xe=a.values(l,o,u,m),gt=new Map,new Set(Xe).forEach(Ke=>{Ke!=null&&gt.set(Ke,new Path2D)}),Ee>0&&(lt=c.values(l,o,u,m),mt=new Map,new Set(lt).forEach(Ke=>{Ke!=null&&mt.set(Ke,new Path2D)})));let{x0:sn,size:wn}=g;if(sn!=null&&wn!=null){O=1,x=sn.values(l,o,u,m),sn.unit==2&&(x=x.map(ke=>l.posToVal(R+ke*I,T.key,!0)));let Ke=wn.values(l,o,u,m);wn.unit==2?ge=Ke[0]*I:ge=C(Ke[0],T,I,R)-C(0,T,I,R),$e=Fm(x,E,C,T,I,R,$e),Te=$e-ge+A}else $e=Fm(x,E,C,T,I,R,$e),Te=$e*p+A,ge=$e-Te;Te<1&&(Te=0),Ee>=ge/2&&(Ee=0),Te<5&&(P=Wg);let Jt=Te>0,wr=$e-Te-(Jt?Ee:0);ge=P(Ku(wr,D,S)),ce=(O==0?ge/2:O==K?0:ge)-O*K*((O==0?A/2:0)+(Jt?Ee/2:0));const xn={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},Fn=Ze?null:new Path2D;let Pn=null;if(he!=null)Pn=l.data[he.series[1]];else{let{y0:Ke,y1:ke}=g;Ke!=null&&ke!=null&&(E=ke.values(l,o,u,m),Pn=Ke.values(l,o,u,m))}let nr=W*ge,Ct=U*ge;for(let Ke=K==1?u:m;Ke>=u&&Ke<=m;Ke+=K){let ke=E[Ke];if(ke==null)continue;if(Pn!=null){let pt=Pn[Ke]??0;if(ke-pt==0)continue;ue=L(pt,k,H,F)}let Ve=T.distr!=2||g!=null?x[Ke]:Ke,Je=C(Ve,T,I,R),vt=L(tn(ke,ae),k,H,F),Tt=P(Je-ce),At=P(Nr(vt,ue)),Bt=P(Pi(vt,ue)),Nt=At-Bt;if(ke!=null){let pt=ke<0?Ct:nr,kt=ke<0?nr:Ct;Ze?(Ee>0&&lt[Ke]!=null&&Z(mt.get(lt[Ke]),Tt,Bt+si(Ee/2),ge,Nr(0,Nt-Ee),pt,kt),Xe[Ke]!=null&&Z(gt.get(Xe[Ke]),Tt,Bt+si(Ee/2),ge,Nr(0,Nt-Ee),pt,kt)):Z(Fn,Tt,Bt+si(Ee/2),ge,Nr(0,Nt-Ee),pt,kt),te(l,o,Ke,Tt-Ee/2,Bt,ge+Ee,Nt)}}return Ee>0?xn.stroke=Ze?mt:Fn:Ze||(xn._fill=w.width==0?w._fill:w._stroke??w._fill,xn.width=0),xn.fill=Ze?gt:Fn,xn})}function lS(t,e){const n=tn(e==null?void 0:e.alignGaps,0);return(r,f,d,p)=>bs(r,f,(b,h,g,s,a,c,l,o,u,m,w)=>{[d,p]=Bl(g,d,p);let x=b.pxRound,E=W=>x(c(W,s,m,o)),T=W=>x(l(W,a,w,u)),k,C,L;s.ori==0?(k=Yl,L=na,C=Lm):(k=Xl,L=ra,C=Rm);const R=s.dir*(s.ori==0?1:-1);let F=E(h[R==1?d:p]),I=F,H=[],P=[];for(let W=R==1?d:p;W>=d&&W<=p;W+=R)if(g[W]!=null){let U=h[W],K=E(U);H.push(I=K),P.push(T(g[W]))}const O={stroke:t(H,P,k,L,C,x),fill:null,clip:null,band:null,gaps:null,flags:ta},A=O.stroke;let[S,D]=oh(r,f);if(b.fill!=null||S!=0){let W=O.fill=new Path2D(A),U=b.fillTo(r,f,b.min,b.max,S),K=T(U);L(W,I,K),L(W,F,K)}if(!b.spanGaps){let W=[];W.push(...sh(h,g,d,p,R,E,n)),O.gaps=W=b.gaps(r,f,d,p,W),O.clip=Gl(W,s.ori,o,u,m,w)}return D!=0&&(O.band=D==2?[fo(r,f,d,p,A,-1),fo(r,f,d,p,A,1)]:fo(r,f,d,p,A,D)),O})}function cS(t){return lS(uS,t)}function uS(t,e,n,r,f,d){const p=t.length;if(p<2)return null;const b=new Path2D;if(n(b,t[0],e[0]),p==2)r(b,t[1],e[1]);else{let h=Array(p),g=Array(p-1),s=Array(p-1),a=Array(p-1);for(let c=0;c<p-1;c++)s[c]=e[c+1]-e[c],a[c]=t[c+1]-t[c],g[c]=s[c]/a[c];h[0]=g[0];for(let c=1;c<p-1;c++)g[c]===0||g[c-1]===0||g[c-1]>0!=g[c]>0?h[c]=0:(h[c]=3*(a[c-1]+a[c])/((2*a[c]+a[c-1])/g[c-1]+(a[c]+2*a[c-1])/g[c]),isFinite(h[c])||(h[c]=0));h[p-1]=g[p-2];for(let c=0;c<p-1;c++)f(b,t[c]+a[c]/3,e[c]+h[c]*a[c]/3,t[c+1]-a[c]/3,e[c+1]-h[c+1]*a[c]/3,t[c+1],e[c+1])}return b}const lh=new Set;function Pm(){for(let t of lh)t.syncRect(!0)}Ys&&(gs(Uk,Xs,Pm),gs(Vk,Xs,Pm,!0),gs(Fl,Xs,()=>{Ar.pxRatio=rn}));const hS=Nm(),dS=Om();function Bm(t,e,n,r){return(r?[t[0],t[1]].concat(t.slice(2)):[t[0]].concat(t.slice(1))).map((f,d)=>ch(f,d,e,n))}function fS(t,e){return t.map((n,r)=>r==0?{}:tr({},e,n))}function ch(t,e,n,r){return tr({},e==0?n:r,t)}function Wm(t,e,n){return e==null?Zs:[e,n]}const pS=Wm;function gS(t,e,n){return e==null?Zs:jl(e,n,Uu,!0)}function jm(t,e,n,r){return e==null?Zs:Wl(e,n,t.scales[r].log,!1)}const mS=jm;function zm(t,e,n,r){return e==null?Zs:Hu(e,n,t.scales[r].log,!1)}const vS=zm;function yS(t,e,n,r,f){let d=Nr(Pg(t),Pg(e)),p=e-t,b=Fi(f/r*p,n);do{let h=n[b],g=r*h/p;if(g>=f&&d+(h<5?Po.get(h):0)<=17)return[h,g]}while(++b<n.length);return[0,0]}function Hm(t){let e,n;return t=t.replace(/(\d+)px/,(r,f)=>(e=cr((n=+f)*rn))+"px"),[t,e,n]}function bS(t){t.show&&[t.font,t.labelFont].forEach(e=>{let n=mn(e[2]*rn,1);e[0]=e[0].replace(/[0-9.]+px/,n+"px"),e[1]=n})}function Ar(t,e,n){const r={mode:tn(t.mode,1)},f=r.mode;function d(V,X,ie,oe){let pe=X.valToPct(V);return oe+ie*(X.dir==-1?1-pe:pe)}function p(V,X,ie,oe){let pe=X.valToPct(V);return oe+ie*(X.dir==-1?pe:1-pe)}function b(V,X,ie,oe){return X.ori==0?d(V,X,ie,oe):p(V,X,ie,oe)}r.valToPosH=d,r.valToPosV=p;let h=!1;r.status=0;const g=r.root=yi(Ak);if(t.id!=null&&(g.id=t.id),ii(g,t.class),t.title){let V=yi(Mk,g);V.textContent=t.title}const s=Ni("canvas"),a=r.ctx=s.getContext("2d"),c=yi(Ek,g);gs("click",c,V=>{V.target===o&&(ln!=ki||Gt!=ao)&&Wn.click(r,V)},!0);const l=r.under=yi(Ik,c);c.appendChild(s);const o=r.over=yi(Lk,c);t=Js(t);const u=+tn(t.pxAlign,1),m=$m(u);(t.plugins||[]).forEach(V=>{V.opts&&(t=V.opts(r,t)||t)});const w=t.ms||.001,x=r.series=f==1?Bm(t.series||[],vm,_m,!1):fS(t.series||[null],km),E=r.axes=Bm(t.axes||[],mm,wm,!0),T=r.scales={},k=r.bands=t.bands||[];k.forEach(V=>{V.fill=qt(V.fill||null),V.dir=tn(V.dir,-1)});const C=f==2?x[1].facets[0].scale:x[0].scale,L={axes:bo,series:ua},R=(t.drawOrder||["axes","series"]).map(V=>L[V]);function F(V){const X=V.distr==3?ie=>ho(ie>0?ie:V.clamp(r,ie,V.min,V.max,V.key)):V.distr==4?ie=>qu(ie,V.asinh):V.distr==100?ie=>V.fwd(ie):ie=>ie;return ie=>{let oe=X(ie),{_min:pe,_max:we}=V,Me=we-pe;return(oe-pe)/Me}}function I(V){let X=T[V];if(X==null){let ie=(t.scales||Pa)[V]||Pa;if(ie.from!=null){I(ie.from);let oe=tr({},T[ie.from],ie,{key:V});oe.valToPct=F(oe),T[V]=oe}else{X=T[V]=tr({},V==C?Sm:tS,ie),X.key=V;let oe=X.time,pe=X.range,we=Bo(pe);if((V!=C||f==2&&!oe)&&(we&&(pe[0]==null||pe[1]==null)&&(pe={min:pe[0]==null?Og:{mode:1,hard:pe[0],soft:pe[0]},max:pe[1]==null?Og:{mode:1,hard:pe[1],soft:pe[1]}},we=!1),!we&&Ul(pe))){let Me=pe;pe=(Be,ze,Ye)=>ze==null?Zs:jl(ze,Ye,Me)}X.range=qt(pe||(oe?pS:V==C?X.distr==3?mS:X.distr==4?vS:Wm:X.distr==3?jm:X.distr==4?zm:gS)),X.auto=qt(we?!1:X.auto),X.clamp=qt(X.clamp||eS),X._min=X._max=null,X.valToPct=F(X)}}}I("x"),I("y"),f==1&&x.forEach(V=>{I(V.scale)}),E.forEach(V=>{I(V.scale)});for(let V in t.scales)I(V);const H=T[C],P=H.distr;let O,A;H.ori==0?(ii(g,Tk),O=d,A=p):(ii(g,$k),O=p,A=d);const S={};for(let V in T){let X=T[V];(X.min!=null||X.max!=null)&&(S[V]={min:X.min,max:X.max},X.min=X.max=null)}const D=t.tzDate||(V=>new Date(cr(V/w))),W=t.fmtDate||Yu,U=w==1?T_(D):E_(D),K=lm(D,am(w==1?A_:M_,W)),Z=um(D,cm(L_,W)),te=[],he=r.legend=tr({},D_,t.legend),ne=r.cursor=tr({},j_,{drag:{y:f==2}},t.cursor),ae=he.show,ue=ne.show,ce=he.markers;he.idxs=te,ce.width=qt(ce.width),ce.dash=qt(ce.dash),ce.stroke=qt(ce.stroke),ce.fill=qt(ce.fill);let ge,Te,$e,Ee=[],Ze=[],Xe,gt=!1,lt={};if(he.live){const V=x[1]?x[1].values:null;gt=V!=null,Xe=gt?V(r,1,0):{_:0};for(let X in Xe)lt[X]=Fu}if(ae)if(ge=Ni("table",Pk,g),$e=Ni("tbody",null,ge),he.mount(r,ge),gt){Te=Ni("thead",null,ge,$e);let V=Ni("tr",null,Te);Ni("th",null,V);for(var mt in Xe)Ni("th",yg,V).textContent=mt}else ii(ge,Wk),he.live&&ii(ge,Bk);const sn={show:!0},wn={show:!1};function Jt(V,X){if(X==0&&(gt||!he.live||f==2))return Zs;let ie=[],oe=Ni("tr",jk,$e,$e.childNodes[X]);ii(oe,V.class),V.show||ii(oe,ps);let pe=Ni("th",null,oe);if(ce.show){let Be=yi(zk,pe);if(X>0){let ze=ce.width(r,X);ze&&(Be.style.border=ze+"px "+ce.dash(r,X)+" "+ce.stroke(r,X)),Be.style.background=ce.fill(r,X)}}let we=yi(yg,pe);V.label instanceof HTMLElement?we.appendChild(V.label):we.textContent=V.label,X>0&&(ce.show||(we.style.color=V.width>0?ce.stroke(r,X):ce.fill(r,X)),xn("click",pe,Be=>{if(ne._lock)return;ji(Be);let ze=x.indexOf(V);if((Be.ctrlKey||Be.metaKey)!=he.isolate){let Ye=x.some((et,nt)=>nt>0&&nt!=ze&&et.show);x.forEach((et,nt)=>{nt>0&&Br(nt,Ye?nt==ze?sn:wn:sn,!0,dt.setSeries)})}else Br(ze,{show:!V.show},!0,dt.setSeries)},!1),zi&&xn(Cg,pe,Be=>{ne._lock||(ji(Be),Br(x.indexOf(V),Ai,!0,dt.setSeries))},!1));for(var Me in Xe){let Be=Ni("td",Hk,oe);Be.textContent="--",ie.push(Be)}return[oe,ie]}const wr=new Map;function xn(V,X,ie,oe=!0){const pe=wr.get(X)||{},we=ne.bind[V](r,X,ie,oe);we&&(gs(V,X,pe[V]=we),wr.set(X,pe))}function Fn(V,X,ie){const oe=wr.get(X)||{};for(let pe in oe)(V==null||pe==V)&&(zu(pe,X,oe[pe]),delete oe[pe]);V==null&&wr.delete(X)}let Pn=0,nr=0,Ct=0,Ke=0,ke=0,Ve=0,Je=ke,vt=Ve,Tt=Ct,At=Ke,Bt=0,Nt=0,pt=0,kt=0;r.bbox={};let $n=!1,$r=!1,Yr=!1,Wi=!1,po=!1,xr=!1;function go(V,X,ie){(ie||V!=r.width||X!=r.height)&&Wo(V,X),qi(!1),Yr=!0,$r=!0,so()}function Wo(V,X){r.width=Pn=Ct=V,r.height=nr=Ke=X,ke=Ve=0,ks(),aa();let ie=r.bbox;Bt=ie.left=vs(ke*rn,.5),Nt=ie.top=vs(Ve*rn,.5),pt=ie.width=vs(Ct*rn,.5),kt=ie.height=vs(Ke*rn,.5)}const Ga=3;function ai(){let V=!1,X=0;for(;!V;){X++;let ie=ha(X),oe=Za(X);V=X==Ga||ie&&oe,V||(Wo(r.width,r.height),$r=!0)}}function Ya({width:V,height:X}){go(V,X)}r.setSize=Ya;function ks(){let V=!1,X=!1,ie=!1,oe=!1;E.forEach((pe,we)=>{if(pe.show&&pe._show){let{side:Me,_size:Be}=pe,ze=Me%2,Ye=pe.label!=null?pe.labelSize:0,et=Be+Ye;et>0&&(ze?(Ct-=et,Me==3?(ke+=et,oe=!0):ie=!0):(Ke-=et,Me==0?(Ve+=et,V=!0):X=!0))}}),Ui[0]=V,Ui[1]=ie,Ui[2]=X,Ui[3]=oe,Ct-=Ir[1]+Ir[3],ke+=Ir[3],Ke-=Ir[2]+Ir[0],Ve+=Ir[0]}function aa(){let V=ke+Ct,X=Ve+Ke,ie=ke,oe=Ve;function pe(we,Me){switch(we){case 1:return V+=Me,V-Me;case 2:return X+=Me,X-Me;case 3:return ie-=Me,ie+Me;case 0:return oe-=Me,oe+Me}}E.forEach((we,Me)=>{if(we.show&&we._show){let Be=we.side;we._pos=pe(Be,we._size),we.label!=null&&(we._lpos=pe(Be,we.labelSize))}})}if(ne.dataIdx==null){let V=ne.hover,X=V.skip=new Set(V.skip??[]);X.add(void 0);let ie=V.prox=qt(V.prox),oe=V.bias??(V.bias=0);ne.dataIdx=(pe,we,Me,Be)=>{if(we==0)return Me;let ze=Me,Ye=ie(pe,we,Me,Be)??br,et=Ye>=0&&Ye<br,nt=H.ori==0?Ct:Ke,St=ne.left,Ut=e[0],Mt=e[we];if(X.has(Mt[Me])){ze=null;let zt=null,yt=null,ut;if(oe==0||oe==-1)for(ut=Me;zt==null&&ut-- >0;)X.has(Mt[ut])||(zt=ut);if(oe==0||oe==1)for(ut=Me;yt==null&&ut++<Mt.length;)X.has(Mt[ut])||(yt=ut);if(zt!=null||yt!=null)if(et){let vn=zt==null?-1/0:O(Ut[zt],H,nt,0),In=yt==null?1/0:O(Ut[yt],H,nt,0),or=St-vn,Qt=In-St;or<=Qt?or<=Ye&&(ze=zt):Qt<=Ye&&(ze=yt)}else ze=yt==null?zt:zt==null?yt:Me-zt<=yt-Me?zt:yt}else et&&lr(St-O(Ut[Me],H,nt,0))>Ye&&(ze=null);return ze}}const ji=V=>{ne.event=V};ne.idxs=te,ne._lock=!1;let Yn=ne.points;Yn.show=qt(Yn.show),Yn.size=qt(Yn.size),Yn.stroke=qt(Yn.stroke),Yn.width=qt(Yn.width),Yn.fill=qt(Yn.fill);const Mr=r.focus=tr({},t.focus||{alpha:.3},ne.focus),zi=Mr.prox>=0,Rn=zi&&Yn.one;let Er=[],no=[],Hi=[];function _s(V,X){let ie=Yn.show(r,X);if(ie instanceof HTMLElement)return ii(ie,Fk),ii(ie,V.class),Zi(ie,-10,-10,Ct,Ke),o.insertBefore(ie,Er[X]),ie}function la(V,X){if(f==1||X>0){let ie=f==1&&T[V.scale].time,oe=V.value;V.value=ie?Kg(oe)?um(D,cm(oe,W)):oe||Z:oe||Q_,V.label=V.label||(ie?H_:z_)}if(Rn||X>0){V.width=V.width==null?1:V.width,V.paths=V.paths||hS||t_,V.fillTo=qt(V.fillTo||nS),V.pxAlign=+tn(V.pxAlign,u),V.pxRound=$m(V.pxAlign),V.stroke=qt(V.stroke||null),V.fill=qt(V.fill||null),V._stroke=V._fill=V._paths=V._focus=null;let ie=Z_(Nr(1,V.width),1),oe=V.points=tr({},{size:ie,width:Nr(1,ie*.2),stroke:V.stroke,space:ie*2,paths:dS,_stroke:null,_fill:null},V.points);oe.show=qt(oe.show),oe.filter=qt(oe.filter),oe.fill=qt(oe.fill),oe.stroke=qt(oe.stroke),oe.paths=qt(oe.paths),oe.pxAlign=V.pxAlign}if(ae){let ie=Jt(V,X);Ee.splice(X,0,ie[0]),Ze.splice(X,0,ie[1]),he.values.push(null)}if(ue){te.splice(X,0,null);let ie=null;Rn?X==0&&(ie=_s(V,X)):X>0&&(ie=_s(V,X)),Er.splice(X,0,ie),no.splice(X,0,0),Hi.splice(X,0,0)}at("addSeries",X)}function Xa(V,X){X=X??x.length,V=f==1?ch(V,X,vm,_m):ch(V,X,{},km),x.splice(X,0,V),la(x[X],X)}r.addSeries=Xa;function Qa(V){if(x.splice(V,1),ae){he.values.splice(V,1),Ze.splice(V,1);let X=Ee.splice(V,1)[0];Fn(null,X.firstChild),X.remove()}ue&&(te.splice(V,1),Er.splice(V,1)[0].remove(),no.splice(V,1),Hi.splice(V,1)),at("delSeries",V)}r.delSeries=Qa;const Ui=[!1,!1,!1,!1];function li(V,X){if(V._show=V.show,V.show){let ie=V.side%2,oe=T[V.scale];oe==null&&(V.scale=ie?x[1].scale:C,oe=T[V.scale]);let pe=oe.time;V.size=qt(V.size),V.space=qt(V.space),V.rotate=qt(V.rotate),Bo(V.incrs)&&V.incrs.forEach(Me=>{!Po.has(Me)&&Po.set(Me,Vg(Me))}),V.incrs=qt(V.incrs||(oe.distr==2?k_:pe?w==1?S_:$_:ys)),V.splits=qt(V.splits||(pe&&oe.distr==1?U:oe.distr==3?nh:oe.distr==4?q_:V_)),V.stroke=qt(V.stroke),V.grid.stroke=qt(V.grid.stroke),V.ticks.stroke=qt(V.ticks.stroke),V.border.stroke=qt(V.border.stroke);let we=V.values;V.values=Bo(we)&&!Bo(we[0])?qt(we):pe?Bo(we)?lm(D,am(we,W)):Kg(we)?I_(D,we):we||K:we||U_,V.filter=qt(V.filter||(oe.distr>=3&&oe.log==10?Y_:oe.distr==3&&oe.log==2?X_:jg)),V.font=Hm(V.font),V.labelFont=Hm(V.labelFont),V._size=V.size(r,null,X,0),V._space=V._rotate=V._incrs=V._found=V._splits=V._values=null,V._size>0&&(Ui[X]=!0,V._el=yi(Rk,c))}}function Kt(V,X,ie,oe){let[pe,we,Me,Be]=ie,ze=X%2,Ye=0;return ze==0&&(Be||we)&&(Ye=X==0&&!pe||X==2&&!Me?cr(mm.size/3):0),ze==1&&(pe||Me)&&(Ye=X==1&&!we||X==3&&!Be?cr(wm.size/2):0),Ye}const ca=r.padding=(t.padding||[Kt,Kt,Kt,Kt]).map(V=>qt(tn(V,Kt))),Ir=r._padding=ca.map((V,X)=>V(r,X,Ui,0));let Xn,Cn=null,Bn=null;const wi=f==1?x[0].idxs:null;let Lr=null,xi=!1;function jo(V,X){if(e=V??[],r.data=r._data=e,f==2){Xn=0;for(let ie=1;ie<x.length;ie++)Xn+=e[ie][0].length}else{e.length==0&&(r.data=r._data=e=[[]]),Lr=e[0],Xn=Lr.length;let ie=e;if(P==2){ie=e.slice();let oe=ie[0]=Array(Xn);for(let pe=0;pe<Xn;pe++)oe[pe]=pe}r._data=e=ie}if(qi(!0),at("setData"),P==2&&(Yr=!0),X!==!1){let ie=H;ie.auto(r,xi)?Ss():rr(C,ie.min,ie.max),Wi=Wi||ne.left>=0,xr=!0,so()}}r.setData=jo;function Ss(){xi=!0;let V,X;f==1&&(Xn>0?(Cn=wi[0]=0,Bn=wi[1]=Xn-1,V=e[0][Cn],X=e[0][Bn],P==2?(V=Cn,X=Bn):V==X&&(P==3?[V,X]=Wl(V,V,H.log,!1):P==4?[V,X]=Hu(V,V,H.log,!1):H.time?X=V+cr(86400/w):[V,X]=jl(V,X,Uu,!0))):(Cn=wi[0]=V=null,Bn=wi[1]=X=null)),rr(C,V,X)}let ro,Xr,mo,zo,Qr,Ho,As,Ts,Uo,ur;function $s(V,X,ie,oe,pe,we){V??(V=wg),ie??(ie=Gu),oe??(oe="butt"),pe??(pe=wg),we??(we="round"),V!=ro&&(a.strokeStyle=ro=V),pe!=Xr&&(a.fillStyle=Xr=pe),X!=mo&&(a.lineWidth=mo=X),we!=Qr&&(a.lineJoin=Qr=we),oe!=Ho&&(a.lineCap=Ho=oe),ie!=zo&&a.setLineDash(zo=ie)}function vo(V,X,ie,oe){X!=Xr&&(a.fillStyle=Xr=X),V!=As&&(a.font=As=V),ie!=Ts&&(a.textAlign=Ts=ie),oe!=Uo&&(a.textBaseline=Uo=oe)}function Vo(V,X,ie,oe,pe=0){if(oe.length>0&&V.auto(r,xi)&&(X==null||X.min==null)){let we=tn(Cn,0),Me=tn(Bn,oe.length-1),Be=ie.min==null?Yk(oe,we,Me,pe,V.distr==3):[ie.min,ie.max];V.min=Pi(V.min,ie.min=Be[0]),V.max=Nr(V.max,ie.max=Be[1])}}const qo={min:null,max:null};function io(){for(let oe in T){let pe=T[oe];S[oe]==null&&(pe.min==null||S[C]!=null&&pe.auto(r,xi))&&(S[oe]=qo)}for(let oe in T){let pe=T[oe];S[oe]==null&&pe.from!=null&&S[pe.from]!=null&&(S[oe]=qo)}S[C]!=null&&qi(!0);let V={};for(let oe in S){let pe=S[oe];if(pe!=null){let we=V[oe]=Js(T[oe],i_);if(pe.min!=null)tr(we,pe);else if(oe!=C||f==2)if(Xn==0&&we.from==null){let Me=we.range(r,null,null,oe);we.min=Me[0],we.max=Me[1]}else we.min=br,we.max=-1/0}}if(Xn>0){x.forEach((oe,pe)=>{if(f==1){let we=oe.scale,Me=S[we];if(Me==null)return;let Be=V[we];if(pe==0){let ze=Be.range(r,Be.min,Be.max,we);Be.min=ze[0],Be.max=ze[1],Cn=Fi(Be.min,e[0]),Bn=Fi(Be.max,e[0]),Bn-Cn>1&&(e[0][Cn]<Be.min&&Cn++,e[0][Bn]>Be.max&&Bn--),oe.min=Lr[Cn],oe.max=Lr[Bn]}else oe.show&&oe.auto&&Vo(Be,Me,oe,e[pe],oe.sorted);oe.idxs[0]=Cn,oe.idxs[1]=Bn}else if(pe>0&&oe.show&&oe.auto){let[we,Me]=oe.facets,Be=we.scale,ze=Me.scale,[Ye,et]=e[pe],nt=V[Be],St=V[ze];nt!=null&&Vo(nt,S[Be],we,Ye,we.sorted),St!=null&&Vo(St,S[ze],Me,et,Me.sorted),oe.min=Me.min,oe.max=Me.max}});for(let oe in V){let pe=V[oe],we=S[oe];if(pe.from==null&&(we==null||we.min==null)){let Me=pe.range(r,pe.min==br?null:pe.min,pe.max==-1/0?null:pe.max,oe);pe.min=Me[0],pe.max=Me[1]}}}for(let oe in V){let pe=V[oe];if(pe.from!=null){let we=V[pe.from];if(we.min==null)pe.min=pe.max=null;else{let Me=pe.range(r,we.min,we.max,oe);pe.min=Me[0],pe.max=Me[1]}}}let X={},ie=!1;for(let oe in V){let pe=V[oe],we=T[oe];if(we.min!=pe.min||we.max!=pe.max){we.min=pe.min,we.max=pe.max;let Me=we.distr;we._min=Me==3?ho(we.min):Me==4?qu(we.min,we.asinh):Me==100?we.fwd(we.min):we.min,we._max=Me==3?ho(we.max):Me==4?qu(we.max,we.asinh):Me==100?we.fwd(we.max):we.max,X[oe]=ie=!0}}if(ie){x.forEach((oe,pe)=>{f==2?pe>0&&X.y&&(oe._paths=null):X[oe.scale]&&(oe._paths=null)});for(let oe in X)Yr=!0,at("setScale",oe);ue&&ne.left>=0&&(Wi=xr=!0)}for(let oe in S)S[oe]=null}function Ms(V){let X=Ku(Cn-1,0,Xn-1),ie=Ku(Bn+1,0,Xn-1);for(;V[X]==null&&X>0;)X--;for(;V[ie]==null&&ie<Xn-1;)ie++;return[X,ie]}function ua(){if(Xn>0){let V=x.some(X=>X._focus)&&ur!=Mr.alpha;V&&(a.globalAlpha=ur=Mr.alpha),x.forEach((X,ie)=>{if(ie>0&&X.show&&(Ko(ie,!1),Ko(ie,!0),X._paths==null)){let oe=ur;ur!=X.alpha&&(a.globalAlpha=ur=X.alpha);let pe=f==2?[0,e[ie][0].length-1]:Ms(e[ie]);X._paths=X.paths(r,ie,pe[0],pe[1]),ur!=oe&&(a.globalAlpha=ur=oe)}}),x.forEach((X,ie)=>{if(ie>0&&X.show){let oe=ur;ur!=X.alpha&&(a.globalAlpha=ur=X.alpha),X._paths!=null&&Go(ie,!1);{let pe=X._paths!=null?X._paths.gaps:null,we=X.points.show(r,ie,Cn,Bn,pe),Me=X.points.filter(r,ie,we,pe);(we||Me)&&(X.points._paths=X.points.paths(r,ie,Cn,Bn,Me),Go(ie,!0))}ur!=oe&&(a.globalAlpha=ur=oe),at("drawSeries",ie)}}),V&&(a.globalAlpha=ur=1)}}function Ko(V,X){let ie=X?x[V].points:x[V];ie._stroke=ie.stroke(r,V),ie._fill=ie.fill(r,V)}function Go(V,X){let ie=X?x[V].points:x[V],{stroke:oe,fill:pe,clip:we,flags:Me,_stroke:Be=ie._stroke,_fill:ze=ie._fill,_width:Ye=ie.width}=ie._paths;Ye=mn(Ye*rn,3);let et=null,nt=Ye%2/2;X&&ze==null&&(ze=Ye>0?"#fff":Be);let St=ie.pxAlign==1&&nt>0;if(St&&a.translate(nt,nt),!X){let Ut=Bt-Ye/2,Mt=Nt-Ye/2,zt=pt+Ye,yt=kt+Ye;et=new Path2D,et.rect(Ut,Mt,zt,yt)}X?yo(Be,Ye,ie.dash,ie.cap,ze,oe,pe,Me,we):Es(V,Be,Ye,ie.dash,ie.cap,ze,oe,pe,Me,et,we),St&&a.translate(-nt,-nt)}function Es(V,X,ie,oe,pe,we,Me,Be,ze,Ye,et){let nt=!1;ze!=0&&k.forEach((St,Ut)=>{if(St.series[0]==V){let Mt=x[St.series[1]],zt=e[St.series[1]],yt=(Mt._paths||Pa).band;Bo(yt)&&(yt=St.dir==1?yt[0]:yt[1]);let ut,vn=null;Mt.show&&yt&&Qk(zt,Cn,Bn)?(vn=St.fill(r,Ut)||we,ut=Mt._paths.clip):yt=null,yo(X,ie,oe,pe,vn,Me,Be,ze,Ye,et,ut,yt),nt=!0}}),nt||yo(X,ie,oe,pe,we,Me,Be,ze,Ye,et)}const Yo=ta|ih;function yo(V,X,ie,oe,pe,we,Me,Be,ze,Ye,et,nt){$s(V,X,ie,oe,pe),(ze||Ye||nt)&&(a.save(),ze&&a.clip(ze),Ye&&a.clip(Ye)),nt?(Be&Yo)==Yo?(a.clip(nt),et&&a.clip(et),hr(pe,Me),Ci(V,we,X)):Be&ih?(hr(pe,Me),a.clip(nt),Ci(V,we,X)):Be&ta&&(a.save(),a.clip(nt),et&&a.clip(et),hr(pe,Me),a.restore(),Ci(V,we,X)):(hr(pe,Me),Ci(V,we,X)),(ze||Ye||nt)&&a.restore()}function Ci(V,X,ie){ie>0&&(X instanceof Map?X.forEach((oe,pe)=>{a.strokeStyle=ro=pe,a.stroke(oe)}):X!=null&&V&&a.stroke(X))}function hr(V,X){X instanceof Map?X.forEach((ie,oe)=>{a.fillStyle=Xr=oe,a.fill(ie)}):X!=null&&V&&a.fill(X)}function oo(V,X,ie,oe){let pe=E[V],we;if(oe<=0)we=[0,0];else{let Me=pe._space=pe.space(r,V,X,ie,oe),Be=pe._incrs=pe.incrs(r,V,X,ie,oe,Me);we=yS(X,ie,Be,oe,Me)}return pe._found=we}function Vi(V,X,ie,oe,pe,we,Me,Be,ze,Ye){let et=Me%2/2;u==1&&a.translate(et,et),$s(Be,Me,ze,Ye,Be),a.beginPath();let nt,St,Ut,Mt,zt=pe+(oe==0||oe==3?-we:we);ie==0?(St=pe,Mt=zt):(nt=pe,Ut=zt);for(let yt=0;yt<V.length;yt++)X[yt]!=null&&(ie==0?nt=Ut=V[yt]:St=Mt=V[yt],a.moveTo(nt,St),a.lineTo(Ut,Mt));a.stroke(),u==1&&a.translate(-et,-et)}function ha(V){let X=!0;return E.forEach((ie,oe)=>{if(!ie.show)return;let pe=T[ie.scale];if(pe.min==null){ie._show&&(X=!1,ie._show=!1,qi(!1));return}else ie._show||(X=!1,ie._show=!0,qi(!1));let we=ie.side,Me=we%2,{min:Be,max:ze}=pe,[Ye,et]=oo(oe,Be,ze,Me==0?Ct:Ke);if(et==0)return;let nt=pe.distr==2,St=ie._splits=ie.splits(r,oe,Be,ze,Ye,et,nt),Ut=pe.distr==2?St.map(ut=>Lr[ut]):St,Mt=pe.distr==2?Lr[St[1]]-Lr[St[0]]:Ye,zt=ie._values=ie.values(r,ie.filter(r,Ut,oe,et,Mt),oe,et,Mt);ie._rotate=we==2?ie.rotate(r,zt,oe,et):0;let yt=ie._size;ie._size=bi(ie.size(r,zt,oe,V)),yt!=null&&ie._size!=yt&&(X=!1)}),X}function Za(V){let X=!0;return ca.forEach((ie,oe)=>{let pe=ie(r,oe,Ui,V);pe!=Ir[oe]&&(X=!1),Ir[oe]=pe}),X}function bo(){for(let V=0;V<E.length;V++){let X=E[V];if(!X.show||!X._show)continue;let ie=X.side,oe=ie%2,pe,we,Me=X.stroke(r,V),Be=ie==0||ie==3?-1:1,[ze,Ye]=X._found;if(X.label!=null){let gn=X.labelGap*Be,vr=cr((X._lpos+gn)*rn);vo(X.labelFont[0],Me,"center",ie==2?Da:bg),a.save(),oe==1?(pe=we=0,a.translate(vr,cr(Nt+kt/2)),a.rotate((ie==3?-zl:zl)/2)):(pe=cr(Bt+pt/2),we=vr);let _o=Bg(X.label)?X.label(r,V,ze,Ye):X.label;a.fillText(_o,pe,we),a.restore()}if(Ye==0)continue;let et=T[X.scale],nt=oe==0?pt:kt,St=oe==0?Bt:Nt,Ut=X._splits,Mt=et.distr==2?Ut.map(gn=>Lr[gn]):Ut,zt=et.distr==2?Lr[Ut[1]]-Lr[Ut[0]]:ze,yt=X.ticks,ut=X.border,vn=yt.show?yt.size:0,In=cr(vn*rn),or=cr((X.alignTo==2?X._size-vn-X.gap:X.gap)*rn),Qt=X._rotate*-zl/180,fe=m(X._pos*rn),_e=(In+or)*Be,xe=fe+_e;we=oe==0?xe:0,pe=oe==1?xe:0;let qe=X.font[0],ft=X.align==1?Gs:X.align==2?Ru:Qt>0?Gs:Qt<0?Ru:oe==0?"center":ie==3?Ru:Gs,Dt=Qt||oe==1?"middle":ie==2?Da:bg;vo(qe,Me,ft,Dt);let en=X.font[1]*X.lineGap,Wt=Ut.map(gn=>m(b(gn,et,nt,St))),Wr=X._values;for(let gn=0;gn<Wr.length;gn++){let vr=Wr[gn];if(vr!=null){oe==0?pe=Wt[gn]:we=Wt[gn],vr=""+vr;let _o=vr.indexOf(`
1489
+ `)==-1?[vr]:vr.split(/\n/gm);for(let Hn=0;Hn<_o.length;Hn++){let Ls=_o[Hn];Qt?(a.save(),a.translate(pe,we+Hn*en),a.rotate(Qt),a.fillText(Ls,0,0),a.restore()):a.fillText(Ls,pe,we+Hn*en)}}}yt.show&&Vi(Wt,yt.filter(r,Mt,V,Ye,zt),oe,ie,fe,In,mn(yt.width*rn,3),yt.stroke(r,V),yt.dash,yt.cap);let Ti=X.grid;Ti.show&&Vi(Wt,Ti.filter(r,Mt,V,Ye,zt),oe,oe==0?2:1,oe==0?Nt:Bt,oe==0?kt:pt,mn(Ti.width*rn,3),Ti.stroke(r,V),Ti.dash,Ti.cap),ut.show&&Vi([fe],[1],oe==0?1:0,oe==0?1:2,oe==1?Nt:Bt,oe==1?kt:pt,mn(ut.width*rn,3),ut.stroke(r,V),ut.dash,ut.cap)}at("drawAxes")}function qi(V){x.forEach((X,ie)=>{ie>0&&(X._paths=null,V&&(f==1?(X.min=null,X.max=null):X.facets.forEach(oe=>{oe.min=null,oe.max=null})))})}let wo=!1,Xo=!1,xo=[];function da(){Xo=!1;for(let V=0;V<xo.length;V++)at(...xo[V]);xo.length=0}function so(){wo||(h_(fa),wo=!0)}function je(V,X=!1){wo=!0,Xo=X,V(r),fa(),X&&xo.length>0&&queueMicrotask(da)}r.batch=je;function fa(){if($n&&(io(),$n=!1),Yr&&(ai(),Yr=!1),$r){if(Sn(l,Gs,ke),Sn(l,Da,Ve),Sn(l,Ra,Ct),Sn(l,Oa,Ke),Sn(o,Gs,ke),Sn(o,Da,Ve),Sn(o,Ra,Ct),Sn(o,Oa,Ke),Sn(c,Ra,Pn),Sn(c,Oa,nr),s.width=cr(Pn*rn),s.height=cr(nr*rn),E.forEach(({_el:V,_show:X,_size:ie,_pos:oe,side:pe})=>{if(V!=null)if(X){let we=pe===3||pe===0?ie:0,Me=pe%2==1;Sn(V,Me?"left":"top",oe-we),Sn(V,Me?"width":"height",ie),Sn(V,Me?"top":"left",Me?Ve:ke),Sn(V,Me?"height":"width",Me?Ke:Ct),Wu(V,ps)}else ii(V,ps)}),ro=Xr=mo=Qr=Ho=As=Ts=Uo=zo=null,ur=1,B(!0),ke!=Je||Ve!=vt||Ct!=Tt||Ke!=At){qi(!1);let V=Ct/Tt,X=Ke/At;if(ue&&!Wi&&ne.left>=0){ne.left*=V,ne.top*=X,ci&&Zi(ci,cr(ne.left),0,Ct,Ke),Qn&&Zi(Qn,0,cr(ne.top),Ct,Ke);for(let ie=0;ie<Er.length;ie++){let oe=Er[ie];oe!=null&&(no[ie]*=V,Hi[ie]*=X,Zi(oe,bi(no[ie]),bi(Hi[ie]),Ct,Ke))}}if(_t.show&&!po&&_t.left>=0&&_t.width>0){_t.left*=V,_t.width*=V,_t.top*=X,_t.height*=X;for(let ie in Y)Sn(Pr,ie,_t[ie])}Je=ke,vt=Ve,Tt=Ct,At=Ke}at("setSize"),$r=!1}Pn>0&&nr>0&&(a.clearRect(0,0,s.width,s.height),at("drawClear"),R.forEach(V=>V()),at("draw")),_t.show&&po&&(pn(_t),po=!1),ue&&Wi&&(_(null,!0,!1),Wi=!1),he.show&&he.live&&xr&&(y(),xr=!1),h||(h=!0,r.status=1,at("ready")),xi=!1,wo=!1}r.redraw=(V,X)=>{Yr=X||!1,V!==!1?rr(C,H.min,H.max):so()};function De(V,X){let ie=T[V];if(ie.from==null){if(Xn==0){let oe=ie.range(r,X.min,X.max,V);X.min=oe[0],X.max=oe[1]}if(X.min>X.max){let oe=X.min;X.min=X.max,X.max=oe}if(Xn>1&&X.min!=null&&X.max!=null&&X.max-X.min<1e-16)return;V==C&&ie.distr==2&&Xn>0&&(X.min=Fi(X.min,e[0]),X.max=Fi(X.max,e[0]),X.min==X.max&&X.max++),S[V]=X,$n=!0,so()}}r.setScale=De;let On,Co,ci,Qn,pa,ko,ki,ao,an,nn,ln,Gt,_i=!1;const Wn=ne.drag;let He=Wn.x,kn=Wn.y;ue&&(ne.x&&(On=yi(Dk,o)),ne.y&&(Co=yi(Nk,o)),H.ori==0?(ci=On,Qn=Co):(ci=Co,Qn=On),ln=ne.left,Gt=ne.top);const _t=r.select=tr({show:!0,over:!0,left:0,width:0,top:0,height:0},t.select),Pr=_t.show?yi(Ok,_t.over?o:l):null;function pn(V,X){if(_t.show){for(let ie in V)_t[ie]=V[ie],ie in Y&&Sn(Pr,ie,V[ie]);X!==!1&&at("setSelect")}}r.setSelect=pn;function An(V){if(x[V].show)ae&&Wu(Ee[V],ps);else if(ae&&ii(Ee[V],ps),ue){let X=Rn?Er[0]:Er[V];X!=null&&Zi(X,-10,-10,Ct,Ke)}}function rr(V,X,ie){De(V,{min:X,max:ie})}function Br(V,X,ie,oe){X.focus!=null&&pr(V),X.show!=null&&x.forEach((pe,we)=>{we>0&&(V==we||V==null)&&(pe.show=X.show,An(we),f==2?(rr(pe.facets[0].scale,null,null),rr(pe.facets[1].scale,null,null)):rr(pe.scale,null,null),so())}),ie!==!1&&at("setSeries",V,X),oe&&Ot("setSeries",r,V,X)}r.setSeries=Br;function Si(V,X){tr(k[V],X)}function jn(V,X){V.fill=qt(V.fill||null),V.dir=tn(V.dir,-1),X=X??k.length,k.splice(X,0,V)}function Zr(V){V==null?k.length=0:k.splice(V,1)}r.addBand=jn,r.setBand=Si,r.delBand=Zr;function Qo(V,X){x[V].alpha=X,ue&&Er[V]!=null&&(Er[V].style.opacity=X),ae&&Ee[V]&&(Ee[V].style.opacity=X)}let zn,ui,hi;const Ai={focus:!0};function pr(V){if(V!=hi){let X=V==null,ie=Mr.alpha!=1;x.forEach((oe,pe)=>{if(f==1||pe>0){let we=X||pe==0||pe==V;oe._focus=X?null:we,ie&&Qo(pe,we?1:Mr.alpha)}}),hi=V,ie&&so()}}ae&&zi&&xn(kg,ge,V=>{ne._lock||(ji(V),hi!=null&&Br(null,Ai,!0,dt.setSeries))});function gr(V,X,ie){let oe=T[X];ie&&(V=V/rn-(oe.ori==1?Ve:ke));let pe=Ct;oe.ori==1&&(pe=Ke,V=pe-V),oe.dir==-1&&(V=pe-V);let we=oe._min,Me=oe._max,Be=V/pe,ze=we+(Me-we)*Be,Ye=oe.distr;return Ye==3?Qs(10,ze):Ye==4?Jk(ze,oe.asinh):Ye==100?oe.bwd(ze):ze}function Cr(V,X){let ie=gr(V,C,X);return Fi(ie,e[0],Cn,Bn)}r.valToIdx=V=>Fi(V,e[0]),r.posToIdx=Cr,r.posToVal=gr,r.valToPos=(V,X,ie)=>T[X].ori==0?d(V,T[X],ie?pt:Ct,ie?Bt:0):p(V,T[X],ie?kt:Ke,ie?Nt:0),r.setCursor=(V,X,ie)=>{ln=V.left,Gt=V.top,_(null,X,ie)};function Is(V,X){Sn(Pr,Gs,_t.left=V),Sn(Pr,Ra,_t.width=X)}function kr(V,X){Sn(Pr,Da,_t.top=V),Sn(Pr,Oa,_t.height=X)}let Rr=H.ori==0?Is:kr,di=H.ori==1?Is:kr;function fi(){if(ae&&he.live)for(let V=f==2?1:0;V<x.length;V++){if(V==0&&gt)continue;let X=he.values[V],ie=0;for(let oe in X)Ze[V][ie++].firstChild.nodeValue=X[oe]}}function y(V,X){if(V!=null&&(V.idxs?V.idxs.forEach((ie,oe)=>{te[oe]=ie}):r_(V.idx)||te.fill(V.idx),he.idx=te[0]),ae&&he.live){for(let ie=0;ie<x.length;ie++)(ie>0||f==1&&!gt)&&$(ie,te[ie]);fi()}xr=!1,X!==!1&&at("setLegend")}r.setLegend=y;function $(V,X){let ie=x[V],oe=V==0&&P==2?Lr:e[V],pe;gt?pe=ie.values(r,V,X)??lt:(pe=ie.value(r,X==null?null:oe[X],V,X),pe=pe==null?lt:{_:pe}),he.values[V]=pe}function _(V,X,ie){an=ln,nn=Gt,[ln,Gt]=ne.move(r,ln,Gt),ne.left=ln,ne.top=Gt,ue&&(ci&&Zi(ci,cr(ln),0,Ct,Ke),Qn&&Zi(Qn,0,cr(Gt),Ct,Ke));let oe,pe=Cn>Bn;zn=br,ui=null;let we=H.ori==0?Ct:Ke,Me=H.ori==1?Ct:Ke;if(ln<0||Xn==0||pe){oe=ne.idx=null;for(let Be=0;Be<x.length;Be++){let ze=Er[Be];ze!=null&&Zi(ze,-10,-10,Ct,Ke)}zi&&Br(null,Ai,!0,V==null&&dt.setSeries),he.live&&(te.fill(oe),xr=!0)}else{let Be,ze,Ye;f==1&&(Be=H.ori==0?ln:Gt,ze=gr(Be,C),oe=ne.idx=Fi(ze,e[0],Cn,Bn),Ye=O(e[0][oe],H,we,0));let et=-10,nt=-10,St=0,Ut=0,Mt=!0,zt="",yt="";for(let ut=f==2?1:0;ut<x.length;ut++){let vn=x[ut],In=te[ut],or=In==null?null:f==1?e[ut][In]:e[ut][1][In],Qt=ne.dataIdx(r,ut,oe,ze),fe=Qt==null?null:f==1?e[ut][Qt]:e[ut][1][Qt];if(xr=xr||fe!=or||Qt!=In,te[ut]=Qt,ut>0&&vn.show){let _e=Qt==null?-10:Qt==oe?Ye:O(f==1?e[0][Qt]:e[ut][0][Qt],H,we,0),xe=fe==null?-10:A(fe,f==1?T[vn.scale]:T[vn.facets[1].scale],Me,0);if(zi&&fe!=null){let qe=H.ori==1?ln:Gt,ft=lr(Mr.dist(r,ut,Qt,xe,qe));if(ft<zn){let Dt=Mr.bias;if(Dt!=0){let en=gr(qe,vn.scale),Wt=fe>=0?1:-1,Wr=en>=0?1:-1;Wr==Wt&&(Wr==1?Dt==1?fe>=en:fe<=en:Dt==1?fe<=en:fe>=en)&&(zn=ft,ui=ut)}else zn=ft,ui=ut}}if(xr||Rn){let qe,ft;H.ori==0?(qe=_e,ft=xe):(qe=xe,ft=_e);let Dt,en,Wt,Wr,Ti,gn,vr=!0,_o=Yn.bbox;if(_o!=null){vr=!1;let Hn=_o(r,ut);Wt=Hn.left,Wr=Hn.top,Dt=Hn.width,en=Hn.height}else Wt=qe,Wr=ft,Dt=en=Yn.size(r,ut);if(gn=Yn.fill(r,ut),Ti=Yn.stroke(r,ut),Rn)ut==ui&&zn<=Mr.prox&&(et=Wt,nt=Wr,St=Dt,Ut=en,Mt=vr,zt=gn,yt=Ti);else{let Hn=Er[ut];Hn!=null&&(no[ut]=Wt,Hi[ut]=Wr,Eg(Hn,Dt,en,vr),$g(Hn,gn,Ti),Zi(Hn,bi(Wt),bi(Wr),Ct,Ke))}}}}if(Rn){let ut=Mr.prox,vn=hi==null?zn<=ut:zn>ut||ui!=hi;if(xr||vn){let In=Er[0];In!=null&&(no[0]=et,Hi[0]=nt,Eg(In,St,Ut,Mt),$g(In,zt,yt),Zi(In,bi(et),bi(nt),Ct,Ke))}}}if(_t.show&&_i)if(V!=null){let[Be,ze]=dt.scales,[Ye,et]=dt.match,[nt,St]=V.cursor.sync.scales,Ut=V.cursor.drag;if(He=Ut._x,kn=Ut._y,He||kn){let{left:Mt,top:zt,width:yt,height:ut}=V.select,vn=V.scales[nt].ori,In=V.posToVal,or,Qt,fe,_e,xe,qe=Be!=null&&Ye(Be,nt),ft=ze!=null&&et(ze,St);qe&&He?(vn==0?(or=Mt,Qt=yt):(or=zt,Qt=ut),fe=T[Be],_e=O(In(or,nt),fe,we,0),xe=O(In(or+Qt,nt),fe,we,0),Rr(Pi(_e,xe),lr(xe-_e))):Rr(0,we),ft&&kn?(vn==1?(or=Mt,Qt=yt):(or=zt,Qt=ut),fe=T[ze],_e=A(In(or,St),fe,Me,0),xe=A(In(or+Qt,St),fe,Me,0),di(Pi(_e,xe),lr(xe-_e))):di(0,Me)}else Q()}else{let Be=lr(an-pa),ze=lr(nn-ko);if(H.ori==1){let St=Be;Be=ze,ze=St}He=Wn.x&&Be>=Wn.dist,kn=Wn.y&&ze>=Wn.dist;let Ye=Wn.uni;Ye!=null?He&&kn&&(He=Be>=Ye,kn=ze>=Ye,!He&&!kn&&(ze>Be?kn=!0:He=!0)):Wn.x&&Wn.y&&(He||kn)&&(He=kn=!0);let et,nt;He&&(H.ori==0?(et=ki,nt=ln):(et=ao,nt=Gt),Rr(Pi(et,nt),lr(nt-et)),kn||di(0,Me)),kn&&(H.ori==1?(et=ki,nt=ln):(et=ao,nt=Gt),di(Pi(et,nt),lr(nt-et)),He||Rr(0,we)),!He&&!kn&&(Rr(0,0),di(0,0))}if(Wn._x=He,Wn._y=kn,V==null){if(ie){if(Mn!=null){let[Be,ze]=dt.scales;dt.values[0]=Be!=null?gr(H.ori==0?ln:Gt,Be):null,dt.values[1]=ze!=null?gr(H.ori==1?ln:Gt,ze):null}Ot(Du,r,ln,Gt,Ct,Ke,oe)}if(zi){let Be=ie&&dt.setSeries,ze=Mr.prox;hi==null?zn<=ze&&Br(ui,Ai,!0,Be):zn>ze?Br(null,Ai,!0,Be):ui!=hi&&Br(ui,Ai,!0,Be)}}xr&&(he.idx=oe,y()),X!==!1&&at("setCursor")}let N=null;Object.defineProperty(r,"rect",{get(){return N==null&&B(!1),N}});function B(V=!1){V?N=null:(N=o.getBoundingClientRect(),at("syncRect",N))}function j(V,X,ie,oe,pe,we,Me){ne._lock||_i&&V!=null&&V.movementX==0&&V.movementY==0||(q(V,X,ie,oe,pe,we,Me,!1,V!=null),V!=null?_(null,!0,!0):_(X,!0,!1))}function q(V,X,ie,oe,pe,we,Me,Be,ze){if(N==null&&B(!1),ji(V),V!=null)ie=V.clientX-N.left,oe=V.clientY-N.top;else{if(ie<0||oe<0){ln=-10,Gt=-10;return}let[Ye,et]=dt.scales,nt=X.cursor.sync,[St,Ut]=nt.values,[Mt,zt]=nt.scales,[yt,ut]=dt.match,vn=X.axes[0].side%2==1,In=H.ori==0?Ct:Ke,or=H.ori==1?Ct:Ke,Qt=vn?we:pe,fe=vn?pe:we,_e=vn?oe:ie,xe=vn?ie:oe;if(Mt!=null?ie=yt(Ye,Mt)?b(St,T[Ye],In,0):-10:ie=In*(_e/Qt),zt!=null?oe=ut(et,zt)?b(Ut,T[et],or,0):-10:oe=or*(xe/fe),H.ori==1){let qe=ie;ie=oe,oe=qe}}ze&&(X==null||X.cursor.event.type==Du)&&((ie<=1||ie>=Ct-1)&&(ie=vs(ie,Ct)),(oe<=1||oe>=Ke-1)&&(oe=vs(oe,Ke))),Be?(pa=ie,ko=oe,[ki,ao]=ne.move(r,ie,oe)):(ln=ie,Gt=oe)}const Y={width:0,height:0,left:0,top:0};function Q(){pn(Y,!1)}let re,se,ye,Ce;function me(V,X,ie,oe,pe,we,Me){_i=!0,He=kn=Wn._x=Wn._y=!1,q(V,X,ie,oe,pe,we,Me,!0,!1),V!=null&&(xn(Nu,Pu,be,!1),Ot(xg,r,ki,ao,Ct,Ke,null));let{left:Be,top:ze,width:Ye,height:et}=_t;re=Be,se=ze,ye=Ye,Ce=et}function be(V,X,ie,oe,pe,we,Me){_i=Wn._x=Wn._y=!1,q(V,X,ie,oe,pe,we,Me,!1,!0);let{left:Be,top:ze,width:Ye,height:et}=_t,nt=Ye>0||et>0,St=re!=Be||se!=ze||ye!=Ye||Ce!=et;if(nt&&St&&pn(_t),Wn.setScale&&nt&&St){let Ut=Be,Mt=Ye,zt=ze,yt=et;if(H.ori==1&&(Ut=ze,Mt=et,zt=Be,yt=Ye),He&&rr(C,gr(Ut,C),gr(Ut+Mt,C)),kn)for(let ut in T){let vn=T[ut];ut!=C&&vn.from==null&&vn.min!=br&&rr(ut,gr(zt+yt,ut),gr(zt,ut))}Q()}else ne.lock&&(ne._lock=!ne._lock,_(X,!0,V!=null));V!=null&&(Fn(Nu,Pu),Ot(Nu,r,ln,Gt,Ct,Ke,null))}function Oe(V,X,ie,oe,pe,we,Me){if(ne._lock)return;ji(V);let Be=_i;if(_i){let ze=!0,Ye=!0,et=10,nt,St;H.ori==0?(nt=He,St=kn):(nt=kn,St=He),nt&&St&&(ze=ln<=et||ln>=Ct-et,Ye=Gt<=et||Gt>=Ke-et),nt&&ze&&(ln=ln<ki?0:Ct),St&&Ye&&(Gt=Gt<ao?0:Ke),_(null,!0,!0),_i=!1}ln=-10,Gt=-10,te.fill(null),_(null,!0,!0),Be&&(_i=Be)}function Re(V,X,ie,oe,pe,we,Me){ne._lock||(ji(V),Ss(),Q(),V!=null&&Ot(_g,r,ln,Gt,Ct,Ke,null))}function Ge(){E.forEach(bS),go(r.width,r.height,!0)}gs(Fl,Xs,Ge);const ht={};ht.mousedown=me,ht.mousemove=j,ht.mouseup=be,ht.dblclick=Re,ht.setSeries=(V,X,ie,oe)=>{let pe=dt.match[2];ie=pe(r,X,ie),ie!=-1&&Br(ie,oe,!0,!1)},ue&&(xn(xg,o,me),xn(Du,o,j),xn(Cg,o,V=>{ji(V),B(!1)}),xn(kg,o,Oe),xn(_g,o,Re),lh.add(r),r.syncRect=B);const tt=r.hooks=t.hooks||{};function at(V,X,ie){Xo?xo.push([V,X,ie]):V in tt&&tt[V].forEach(oe=>{oe.call(null,r,X,ie)})}(t.plugins||[]).forEach(V=>{for(let X in V.hooks)tt[X]=(tt[X]||[]).concat(V.hooks[X])});const _n=(V,X,ie)=>ie,dt=tr({key:null,setSeries:!1,filters:{pub:zg,sub:zg},scales:[C,x[1]?x[1].scale:null],match:[Hg,Hg,_n],values:[null,null]},ne.sync);dt.match.length==2&&dt.match.push(_n),ne.sync=dt;const Mn=dt.key,$t=Tm(Mn);function Ot(V,X,ie,oe,pe,we,Me){dt.filters.pub(V,X,ie,oe,pe,we,Me)&&$t.pub(V,X,ie,oe,pe,we,Me)}$t.sub(r);function ir(V,X,ie,oe,pe,we,Me){dt.filters.sub(V,X,ie,oe,pe,we,Me)&&ht[V](null,X,ie,oe,pe,we,Me)}r.pub=ir;function mr(){$t.unsub(r),lh.delete(r),wr.clear(),zu(Fl,Xs,Ge),g.remove(),ge==null||ge.remove(),at("destroy")}r.destroy=mr;function En(){at("init",t,e),jo(e||t.data,!1),S[C]?De(C,S[C]):Ss(),po=_t.show&&(_t.width>0||_t.height>0),Wi=xr=!0,go(t.width,t.height)}return x.forEach(la),E.forEach(li),n?n instanceof HTMLElement?(n.appendChild(g),En()):n(r,En):En(),r}Ar.assign=tr,Ar.fmtNum=Vu,Ar.rangeNum=jl,Ar.rangeLog=Wl,Ar.rangeAsinh=Hu,Ar.orient=bs,Ar.pxRatio=rn,Ar.join=u_,Ar.fmtDate=Yu,Ar.tzDate=x_,Ar.sync=Tm;{Ar.addGap=rS,Ar.clipGaps=Gl;let t=Ar.paths={points:Om};t.linear=Nm,t.stepped=sS,t.bars=aS,t.spline=cS}var Um,Vm;function wS(){return Vm||(Vm=1,Um=function(t,e,n,r,f){var d,p;if(r===void 0)r=0;else if(r=r|0,r<0||r>=t.length)throw new RangeError("invalid lower bound");if(f===void 0)f=t.length-1;else if(f=f|0,f<r||f>=t.length)throw new RangeError("invalid upper bound");for(;r<=f;)if(d=r+(f-r>>>1),p=+n(t[d],e,d,t),p<0)r=d+1;else if(p>0)f=d-1;else return d;return~r}),Um}var xS=wS();const pN=sr("g",ml(xS));var uh,qm;function CS(){if(qm)return uh;qm=1;function t(e,n,r){var f=-1,d=e.length;n<0&&(n=-n>d?0:d+n),r=r>d?d:r,r<0&&(r+=d),d=n>r?0:r-n>>>0,n>>>=0;for(var p=Array(d);++f<d;)p[f]=e[f+n];return p}return uh=t,uh}var hh,Km;function kS(){if(Km)return hh;Km=1;var t=CS();function e(n,r,f){var d=n.length;return f=f===void 0?d:f,!r&&f>=d?n:t(n,r,f)}return hh=e,hh}var dh,Gm;function Ym(){if(Gm)return dh;Gm=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",f=e+n+r,d="\\ufe0e\\ufe0f",p="\\u200d",b=RegExp("["+p+t+f+d+"]");function h(g){return b.test(g)}return dh=h,dh}var fh,Xm;function _S(){if(Xm)return fh;Xm=1;function t(e){return e.split("")}return fh=t,fh}var ph,Qm;function SS(){if(Qm)return ph;Qm=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",f=e+n+r,d="\\ufe0e\\ufe0f",p="["+t+"]",b="["+f+"]",h="\\ud83c[\\udffb-\\udfff]",g="(?:"+b+"|"+h+")",s="[^"+t+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",c="[\\ud800-\\udbff][\\udc00-\\udfff]",l="\\u200d",o=g+"?",u="["+d+"]?",m="(?:"+l+"(?:"+[s,a,c].join("|")+")"+u+o+")*",w=u+o+m,x="(?:"+[s+b+"?",b,a,c,p].join("|")+")",E=RegExp(h+"(?="+h+")|"+x+w,"g");function T(k){return k.match(E)||[]}return ph=T,ph}var gh,Zm;function AS(){if(Zm)return gh;Zm=1;var t=_S(),e=Ym(),n=SS();function r(f){return e(f)?n(f):t(f)}return gh=r,gh}var mh,Jm;function TS(){if(Jm)return mh;Jm=1;var t=typeof Fo=="object"&&Fo&&Fo.Object===Object&&Fo;return mh=t,mh}var vh,ev;function $S(){if(ev)return vh;ev=1;var t=TS(),e=typeof self=="object"&&self&&self.Object===Object&&self,n=t||e||Function("return this")();return vh=n,vh}var yh,tv;function bh(){if(tv)return yh;tv=1;var t=$S(),e=t.Symbol;return yh=e,yh}var wh,nv;function MS(){if(nv)return wh;nv=1;function t(e,n){for(var r=-1,f=e==null?0:e.length,d=Array(f);++r<f;)d[r]=n(e[r],r,e);return d}return wh=t,wh}var xh,rv;function ES(){if(rv)return xh;rv=1;var t=Array.isArray;return xh=t,xh}var Ch,iv;function IS(){if(iv)return Ch;iv=1;var t=bh(),e=Object.prototype,n=e.hasOwnProperty,r=e.toString,f=t?t.toStringTag:void 0;function d(p){var b=n.call(p,f),h=p[f];try{p[f]=void 0;var g=!0}catch{}var s=r.call(p);return g&&(b?p[f]=h:delete p[f]),s}return Ch=d,Ch}var kh,ov;function LS(){if(ov)return kh;ov=1;var t=Object.prototype,e=t.toString;function n(r){return e.call(r)}return kh=n,kh}var _h,sv;function RS(){if(sv)return _h;sv=1;var t=bh(),e=IS(),n=LS(),r="[object Null]",f="[object Undefined]",d=t?t.toStringTag:void 0;function p(b){return b==null?b===void 0?f:r:d&&d in Object(b)?e(b):n(b)}return _h=p,_h}var Sh,av;function OS(){if(av)return Sh;av=1;function t(e){return e!=null&&typeof e=="object"}return Sh=t,Sh}var Ah,lv;function DS(){if(lv)return Ah;lv=1;var t=RS(),e=OS(),n="[object Symbol]";function r(f){return typeof f=="symbol"||e(f)&&t(f)==n}return Ah=r,Ah}var Th,cv;function NS(){if(cv)return Th;cv=1;var t=bh(),e=MS(),n=ES(),r=DS(),f=t?t.prototype:void 0,d=f?f.toString:void 0;function p(b){if(typeof b=="string")return b;if(n(b))return e(b,p)+"";if(r(b))return d?d.call(b):"";var h=b+"";return h=="0"&&1/b==-1/0?"-0":h}return Th=p,Th}var $h,uv;function Zl(){if(uv)return $h;uv=1;var t=NS();function e(n){return n==null?"":t(n)}return $h=e,$h}var Mh,hv;function FS(){if(hv)return Mh;hv=1;var t=kS(),e=Ym(),n=AS(),r=Zl();function f(d){return function(p){p=r(p);var b=e(p)?n(p):void 0,h=b?b[0]:p.charAt(0),g=b?t(b,1).join(""):p.slice(1);return h[d]()+g}}return Mh=f,Mh}var Eh,dv;function fv(){if(dv)return Eh;dv=1;var t=FS(),e=t("toUpperCase");return Eh=e,Eh}var PS=fv();const BS=ml(PS);var Ih,pv;function WS(){if(pv)return Ih;pv=1;var t=Zl(),e=fv();function n(r){return e(t(r).toLowerCase())}return Ih=n,Ih}var Lh,gv;function jS(){if(gv)return Lh;gv=1;function t(e,n,r,f){var d=-1,p=e==null?0:e.length;for(f&&p&&(r=e[++d]);++d<p;)r=n(r,e[d],d,e);return r}return Lh=t,Lh}var Rh,mv;function zS(){if(mv)return Rh;mv=1;function t(e){return function(n){return e==null?void 0:e[n]}}return Rh=t,Rh}var Oh,vv;function HS(){if(vv)return Oh;vv=1;var t=zS(),e={À:"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"},n=t(e);return Oh=n,Oh}var Dh,yv;function US(){if(yv)return Dh;yv=1;var t=HS(),e=Zl(),n=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,r="\\u0300-\\u036f",f="\\ufe20-\\ufe2f",d="\\u20d0-\\u20ff",p=r+f+d,b="["+p+"]",h=RegExp(b,"g");function g(s){return s=e(s),s&&s.replace(n,t).replace(h,"")}return Dh=g,Dh}var Nh,bv;function VS(){if(bv)return Nh;bv=1;var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function e(n){return n.match(t)||[]}return Nh=e,Nh}var Fh,wv;function qS(){if(wv)return Fh;wv=1;var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function e(n){return t.test(n)}return Fh=e,Fh}var Ph,xv;function KS(){if(xv)return Ph;xv=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",f=e+n+r,d="\\u2700-\\u27bf",p="a-z\\xdf-\\xf6\\xf8-\\xff",b="\\xac\\xb1\\xd7\\xf7",h="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",g="\\u2000-\\u206f",s=" \\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",a="A-Z\\xc0-\\xd6\\xd8-\\xde",c="\\ufe0e\\ufe0f",l=b+h+g+s,o="['’]",u="["+l+"]",m="["+f+"]",w="\\d+",x="["+d+"]",E="["+p+"]",T="[^"+t+l+w+d+p+a+"]",k="\\ud83c[\\udffb-\\udfff]",C="(?:"+m+"|"+k+")",L="[^"+t+"]",R="(?:\\ud83c[\\udde6-\\uddff]){2}",F="[\\ud800-\\udbff][\\udc00-\\udfff]",I="["+a+"]",H="\\u200d",P="(?:"+E+"|"+T+")",O="(?:"+I+"|"+T+")",A="(?:"+o+"(?:d|ll|m|re|s|t|ve))?",S="(?:"+o+"(?:D|LL|M|RE|S|T|VE))?",D=C+"?",W="["+c+"]?",U="(?:"+H+"(?:"+[L,R,F].join("|")+")"+W+D+")*",K="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Z="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",te=W+D+U,he="(?:"+[x,R,F].join("|")+")"+te,ne=RegExp([I+"?"+E+"+"+A+"(?="+[u,I,"$"].join("|")+")",O+"+"+S+"(?="+[u,I+P,"$"].join("|")+")",I+"?"+P+"+"+A,I+"+"+S,Z,K,w,he].join("|"),"g");function ae(ue){return ue.match(ne)||[]}return Ph=ae,Ph}var Bh,Cv;function GS(){if(Cv)return Bh;Cv=1;var t=VS(),e=qS(),n=Zl(),r=KS();function f(d,p,b){return d=n(d),p=b?void 0:p,p===void 0?e(d)?r(d):t(d):d.match(p)||[]}return Bh=f,Bh}var Wh,kv;function YS(){if(kv)return Wh;kv=1;var t=jS(),e=US(),n=GS(),r="['’]",f=RegExp(r,"g");function d(p){return function(b){return t(n(e(b).replace(f,"")),p,"")}}return Wh=d,Wh}var jh,_v;function XS(){if(_v)return jh;_v=1;var t=WS(),e=YS(),n=e(function(r,f,d){return f=f.toLowerCase(),r+(d?t(f):f)});return jh=n,jh}var QS=XS();const ZS=ml(QS),JS=Object.assign({"./ArrayWidget.vue":()=>it(()=>rt.import("./ArrayWidget-D0fKsdTb-f6704a836c42d6598c02.js"),void 0),"./ArrayplotWidget.vue":()=>it(()=>rt.import("./ArrayplotWidget-BmRSuGhA-dfe6cec7311c38280d2b.js"),void 0),"./BlockWidget.vue":()=>it(()=>rt.import("./BlockWidget-Dpxbw455-2f60f33bbec004d67840.js"),void 0),"./ButtonWidget.vue":()=>it(()=>rt.import("./ButtonWidget-8iOpXmpp-6bc46041a60a63e6af96.js"),void 0),"./CanvasWidget.vue":()=>it(()=>rt.import("./CanvasWidget-B0iU38rA-fe1c08ba22e8f5ea496a.js"),void 0),"./CanvasdotWidget.vue":()=>it(()=>rt.import("./CanvasdotWidget-C9viSVBs-3a9eb2305cb45c588c0c.js"),void 0),"./CanvasimageWidget.vue":()=>it(()=>rt.import("./CanvasimageWidget-CFiCpITu-88be36fd4a4c0ded8ba4.js"),void 0),"./CanvasimagevalueWidget.vue":()=>it(()=>rt.import("./CanvasimagevalueWidget-fu6vbAY0-70133f5d496b15e819f9.js"),void 0),"./CanvaslabelWidget.vue":()=>it(()=>rt.import("./CanvaslabelWidget-BVqHq3Vp-ace5f608a06ccca78b59.js"),void 0),"./CanvaslabelvalueWidget.vue":()=>it(()=>rt.import("./CanvaslabelvalueWidget-BOFa8-NU-2ff194ff28fbc9febfab.js"),void 0),"./CanvaslineWidget.vue":()=>it(()=>rt.import("./CanvaslineWidget-l3ko0QXk-8e623ca09c6a7d6047a5.js"),void 0),"./CanvaslinevalueWidget.vue":()=>it(()=>rt.import("./CanvaslinevalueWidget-BCZoO-Z6-adeeaccf3c74a1ab0898.js"),void 0),"./CheckbuttonWidget.vue":()=>it(()=>rt.import("./CheckbuttonWidget-BN7e1d5b-570fad87e1ed08d80c4e.js"),void 0),"./ComboboxWidget.vue":()=>it(()=>rt.import("./ComboboxWidget-Bb5RGXDB-18d7807d9586cb760f47.js"),void 0),"./DateWidget.vue":()=>it(()=>rt.import("./DateWidget-Dggqab-F-75c41d7ba653738a9a30.js"),void 0),"./DynamicWidget.vue":()=>it(()=>rt.import("./DynamicWidget-CfMtj7H8-ffb5ab076611fda81271.js"),void 0),"./FormatvalueWidget.vue":()=>it(()=>rt.import("./FormatvalueWidget-B9_PbzY2-a2114dd71c00fd34392b.js"),void 0),"./HorizontalWidget.vue":()=>it(()=>rt.import("./HorizontalWidget-BWgZL_Oz-3f8e5ee942efbac8be1a.js"),void 0),"./HorizontalboxWidget.vue":()=>it(()=>rt.import("./HorizontalboxWidget-yMYUnNB8-fc3cfe3a8d5a32a27580.js"),void 0),"./HorizontallineWidget.vue":()=>it(()=>rt.import("./HorizontallineWidget-C4zMx7z2-562aa8322c7dd88b5e4b.js"),void 0),"./IframeWidget.vue":()=>it(()=>rt.import("./IframeWidget-DA4P_mJT-42b73b878426164cbded.js"),void 0),"./ImageviewerWidget.vue":()=>it(()=>rt.import("./ImageviewerWidget-B1wK0hK4-465f226b24efdf22d511.js"),void 0),"./LabelWidget.vue":()=>it(()=>rt.import("./LabelWidget-CY0saBoK-84c2f9a842d2d17c195b.js"),void 0),"./LabelledWidget.vue":()=>it(()=>rt.import("./LabelledWidget-B3ZOYaGy-4984bbb26812a9002517.js"),void 0),"./LabelprogressbarWidget.vue":()=>it(()=>rt.import("./LabelprogressbarWidget-CmXcESTg-1967485fae89cc5c4ef1.js"),void 0),"./LabelsparklineWidget.vue":()=>it(()=>rt.import("./LabelsparklineWidget-D_yrQrn6-cbf45f82a40f2077021f.js"),void 0),"./LabelvalueWidget.vue":()=>it(()=>rt.import("./LabelvalueWidget-dNaNfsBE-774b61018bc8c9f830d5.js"),void 0),"./LabelvaluedescWidget.vue":()=>it(()=>rt.import("./LabelvaluedescWidget-3vNoH6Mc-6955d92d5ab9a7350d23.js"),void 0),"./LabelvaluelimitsbarWidget.vue":()=>it(()=>rt.import("./LabelvaluelimitsbarWidget-7VppYVIN-7be7bf3cb5b8eb4ee4ae.js"),void 0),"./LabelvaluelimitscolumnWidget.vue":()=>it(()=>rt.import("./LabelvaluelimitscolumnWidget-BZ6nwifg-3ad23ad580922c2ad60a.js"),void 0),"./LabelvaluerangebarWidget.vue":()=>it(()=>rt.import("./LabelvaluerangebarWidget-IyuXLNsw-922e4c775e1ff7e3121f.js"),void 0),"./LedWidget.vue":()=>it(()=>rt.import("./LedWidget-DSxpmIOK-8670b49839fe2115e1cd.js"),void 0),"./LimitsbarWidget.vue":()=>it(()=>rt.import("./LimitsbarWidget-BoPTdVV5-f454ae2b53547026f2a7.js"),void 0),"./LimitscolorWidget.vue":()=>it(()=>rt.import("./LimitscolorWidget-Bt3qOvrv-d5ea8d6587d47617a544.js"),void 0),"./LimitscolumnWidget.vue":()=>it(()=>rt.import("./LimitscolumnWidget-Ce6YnUBz-bd4c13c9ca9707268db5.js"),void 0),"./LinegraphWidget.vue":()=>it(()=>rt.import("./LinegraphWidget-XAbg0jj2-ebd424cc384fcbdeca36.js"),void 0),"./MatrixbycolumnsWidget.vue":()=>it(()=>rt.import("./MatrixbycolumnsWidget-5MgJFZtz-9686d89696d17f542dda.js"),void 0),"./ProgressbarWidget.vue":()=>it(()=>rt.import("./ProgressbarWidget-CDwDOFIy-b7de548e62e1d6dea1db.js"),void 0),"./RadiobuttonWidget.vue":()=>it(()=>rt.import("./RadiobuttonWidget-cQ8V8LaD-c3ce96d20d228ed736bb.js"),void 0),"./RadiogroupWidget.vue":()=>it(()=>rt.import("./RadiogroupWidget-BvRnuGA2-dc18d57388cdc905a7ac.js"),void 0),"./RangebarWidget.vue":()=>it(()=>rt.import("./RangebarWidget-aHmgV0qs-195fe90ec25be177a045.js"),void 0),"./RollupWidget.vue":()=>it(()=>rt.import("./RollupWidget-D1jUPrUQ-c8aec12f5161240b5d28.js"),void 0),"./ScrollwindowWidget.vue":()=>it(()=>rt.import("./ScrollwindowWidget-Cn0o3b4E-d91d991867e4af348de0.js"),void 0),"./SignalWidget.vue":()=>it(()=>rt.import("./SignalWidget-BQBzqdU--683f84b63c1a5ec65f77.js"),void 0),"./SpacerWidget.vue":()=>it(()=>rt.import("./SpacerWidget-C0RmQY3t-d438a4ab2e888170e61b.js"),void 0),"./SparklineWidget.vue":()=>it(()=>rt.import("./SparklineWidget-BTH9rvcX-3ad31ebbc940d444a503.js"),void 0),"./TabbookWidget.vue":()=>it(()=>rt.import("./TabbookWidget-C-aDdEoD-5dccca344b01e06516fd.js"),void 0),"./TextboxWidget.vue":()=>it(()=>rt.import("./TextboxWidget-Dd2ccpUQ-46af1553c645fbca0d0a.js"),void 0),"./TextfieldWidget.vue":()=>it(()=>rt.import("./TextfieldWidget-DY3aFTnP-8f961f7e7dc21bacabe1.js"),void 0),"./TimeWidget.vue":()=>it(()=>rt.import("./TimeWidget-C_site21-ba762ef597b81ab878df.js"),void 0),"./TitleWidget.vue":()=>it(()=>rt.import("./TitleWidget-Bx81VfQD-655388ab39aa6405caee.js"),void 0),"./ValueWidget.vue":()=>it(()=>rt.import("./ValueWidget-cbjxVV3B-889a66573876672a3366.js"),void 0),"./ValuelimitsbarWidget.vue":()=>it(()=>rt.import("./ValuelimitsbarWidget-cQb2o_xH-60f15aa0ca30d7b52ba7.js"),void 0),"./ValuelimitscolumnWidget.vue":()=>it(()=>rt.import("./ValuelimitscolumnWidget-BBTuSCK9-f03888294f187a7c6dcc.js"),void 0),"./ValuerangebarWidget.vue":()=>it(()=>rt.import("./ValuerangebarWidget-Ct7iGtu0-6eda1de3ba1e2d0c069a.js"),void 0),"./VerticalWidget.vue":()=>it(()=>rt.import("./VerticalWidget-DJn02myf-f004381a5ced4329d2a5.js"),void 0),"./VerticalboxWidget.vue":()=>it(()=>rt.import("./VerticalboxWidget-DHQMxtF3-9d0671aa48d3588305c3.js"),void 0)}),eA=Object.entries(JS).reduce((t,[e,n])=>{e=e.split("/").pop();const r=BS(ZS(e.replace(/\.\w+$/,"")));return{...t,[r]:pf(n)}},{}),gN=sr("U",{components:eA}),Sv="openc3-ace-vim-mode-enabled",zh="ace/keyboard/vim",Jl=sr("X",{isVimModeEnabled(){return localStorage.getItem(Sv)==="true"},setVimMode(t){localStorage.setItem(Sv,JSON.stringify(!!t))},toggleVimMode(t){this.isVimModeEnabled()?(t.setKeyboardHandler(null),this.setVimMode(!1)):(t.setKeyboardHandler(zh),this.setVimMode(!0)),t.focus()},applyVimModeIfEnabled(t,{saveFn:e}={}){this.isVimModeEnabled()?(t.setKeyboardHandler(zh),ace.config.loadModule(zh,n=>{n.CodeMirror.Vim.defineEx("write","w",r=>{typeof e=="function"?e():r.ace.execCommand("save")})})):t.setKeyboardHandler(null)}}),tA={props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},methods:{formatDT:function(t){return t.replaceAll(" ","-").toLowerCase()},subMenuClick(t){t.command(t),this.$refs.topmenu[0].isActive=!1}},mounted(){document.title=this.title}},nA={class:"app-title mr-2"};function rA(t,e,n,r,f,d){const p=Ue("v-col"),b=Ue("v-row"),h=Ue("v-icon"),g=Ue("v-btn"),s=Ue("v-divider"),a=Ue("v-list-item-title"),c=Ue("v-list-item"),l=Ue("v-list"),o=Ue("v-menu"),u=Ue("v-radio"),m=Ue("v-list-item-action"),w=Ue("v-radio-group"),x=Ue("v-checkbox");return st(),Xt(gf,{to:"#openc3-menu"},[We(b,{"no-gutters":""},{default:Fe(()=>[We(p,{"align-self":"end"},{default:Fe(()=>[fr("span",nA,yn(n.title),1)]),_:1})]),_:1}),We(b,{dense:"",class:"flex-nowrap"},{default:Fe(()=>[(st(!0),hn(ri,null,Xi(n.menus,(E,T)=>(st(),Xt(o,{ref_for:!0,ref:"topmenu",key:T},{activator:Fe(({props:k})=>[We(g,fl({ref_for:!0},k,{variant:"outlined",class:"mx-1 menu-button",text:E.label,"data-test":d.formatDT(`${n.title} ${E.label}`)}),{append:Fe(()=>[We(h,{class:"menu-button-icon"},{default:Fe(()=>e[0]||(e[0]=[Pt(" mdi-menu-down ")])),_:1})]),_:2},1040,["text","data-test"])]),default:Fe(()=>[We(l,null,{default:Fe(()=>[(st(!0),hn(ri,null,Xi(E.items,(k,C)=>(st(),hn(ri,null,[k.divider?(st(),Xt(s,{key:C+"-divider"})):k.subMenu&&k.subMenu.length>0?(st(),hn("div",{key:C+"-submenu"},[(st(),Xt(o,{"open-on-hover":"",location:"right",key:C},{activator:Fe(({props:L})=>[(st(),Xt(c,fl({ref_for:!0},L,{disabled:k.disabled,key:C}),nu({append:Fe(()=>[We(h,null,{default:Fe(()=>e[1]||(e[1]=[Pt(" mdi-chevron-right ")])),_:1})]),default:Fe(()=>[!k.radio&&!k.checkbox?(st(),Xt(a,{key:0,style:is("cursor: pointer;"+(k.disabled?"opacity: 0.2":""))},{default:Fe(()=>[Pt(yn(k.label),1)]),_:2},1032,["style"])):Ur("",!0)]),_:2},[k.icon?{name:"prepend",fn:Fe(()=>[We(h,{disabled:k.disabled},{default:Fe(()=>[Pt(yn(k.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:Fe(()=>[We(l,null,{default:Fe(()=>[(st(!0),hn(ri,null,Xi(k.subMenu,(L,R)=>(st(),Xt(c,{key:R,"prepend-icon":L.icon,onClick:F=>d.subMenuClick(L)},{default:Fe(()=>[We(a,null,{default:Fe(()=>[Pt(yn(L.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):k.radioGroup?(st(),Xt(w,{"model-value":k.value,"onUpdate:modelValue":k.command,key:C+"-radio-group","hide-details":"",density:"compact",class:"ma-0 pa-0"},{default:Fe(()=>[(st(!0),hn(ri,null,Xi(k.choices,(L,R)=>(st(),Xt(c,{key:R+"-choice"},{default:Fe(()=>[We(m,{class:"list-action"},{default:Fe(()=>[We(u,{color:"secondary",label:L.label,value:L.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(st(),Xt(c,{onClick:L=>k.command(k),disabled:k.disabled,"data-test":d.formatDT(`${n.title} ${E.label} ${k.label}`),key:C+"-list"},nu({default:Fe(()=>[k.checkbox?(st(),Xt(m,{key:0,class:"list-action"},{default:Fe(()=>[We(x,{modelValue:k.checked,"onUpdate:modelValue":L=>k.checked=L,label:k.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):Ur("",!0),!k.radio&&!k.checkbox?(st(),Xt(a,{key:1,style:is("cursor: pointer;"+(k.disabled?"opacity: 0.2":""))},{default:Fe(()=>[Pt(yn(k.label),1)]),_:2},1032,["style"])):Ur("",!0)]),_:2},[k.icon?{name:"prepend",fn:Fe(()=>[We(h,{icon:k.icon,disabled:k.disabled},null,8,["icon","disabled"])]),key:"0"}:void 0]),1032,["onClick","disabled","data-test"]))],64))),256))]),_:2},1024)]),_:2},1024))),128))]),_:1})])}const iA=Ri(tA,[["render",rA],["__scopeId","data-v-4d454b93"]]);function Av(t,e){return function(){return t.apply(e,arguments)}}const{toString:oA}=Object.prototype,{getPrototypeOf:Hh}=Object,{iterator:ec,toStringTag:Tv}=Symbol,tc=(t=>e=>{const n=oA.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Bi=t=>(t=t.toLowerCase(),e=>tc(e)===t),nc=t=>e=>typeof e===t,{isArray:ia}=Array,ja=nc("undefined");function sA(t){return t!==null&&!ja(t)&&t.constructor!==null&&!ja(t.constructor)&&Kr(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const $v=Bi("ArrayBuffer");function aA(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&$v(t.buffer),e}const lA=nc("string"),Kr=nc("function"),Mv=nc("number"),rc=t=>t!==null&&typeof t=="object",cA=t=>t===!0||t===!1,ic=t=>{if(tc(t)!=="object")return!1;const e=Hh(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Tv in t)&&!(ec in t)},uA=Bi("Date"),hA=Bi("File"),dA=Bi("Blob"),fA=Bi("FileList"),pA=t=>rc(t)&&Kr(t.pipe),gA=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Kr(t.append)&&((e=tc(t))==="formdata"||e==="object"&&Kr(t.toString)&&t.toString()==="[object FormData]"))},mA=Bi("URLSearchParams"),[vA,yA,bA,wA]=["ReadableStream","Request","Response","Headers"].map(Bi),xA=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function za(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,f;if(typeof t!="object"&&(t=[t]),ia(t))for(r=0,f=t.length;r<f;r++)e.call(null,t[r],r,t);else{const d=n?Object.getOwnPropertyNames(t):Object.keys(t),p=d.length;let b;for(r=0;r<p;r++)b=d[r],e.call(null,t[b],b,t)}}function Ev(t,e){e=e.toLowerCase();const n=Object.keys(t);let r=n.length,f;for(;r-- >0;)if(f=n[r],e===f.toLowerCase())return f;return null}const ws=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Iv=t=>!ja(t)&&t!==ws;function Uh(){const{caseless:t}=Iv(this)&&this||{},e={},n=(r,f)=>{const d=t&&Ev(e,f)||f;ic(e[d])&&ic(r)?e[d]=Uh(e[d],r):ic(r)?e[d]=Uh({},r):ia(r)?e[d]=r.slice():e[d]=r};for(let r=0,f=arguments.length;r<f;r++)arguments[r]&&za(arguments[r],n);return e}const CA=(t,e,n,{allOwnKeys:r}={})=>(za(e,(f,d)=>{n&&Kr(f)?t[d]=Av(f,n):t[d]=f},{allOwnKeys:r}),t),kA=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),_A=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},SA=(t,e,n,r)=>{let f,d,p;const b={};if(e=e||{},t==null)return e;do{for(f=Object.getOwnPropertyNames(t),d=f.length;d-- >0;)p=f[d],(!r||r(p,t,e))&&!b[p]&&(e[p]=t[p],b[p]=!0);t=n!==!1&&Hh(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},AA=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},TA=t=>{if(!t)return null;if(ia(t))return t;let e=t.length;if(!Mv(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},$A=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Hh(Uint8Array)),MA=(t,e)=>{const n=(t&&t[ec]).call(t);let r;for(;(r=n.next())&&!r.done;){const f=r.value;e.call(t,f[0],f[1])}},EA=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},IA=Bi("HTMLFormElement"),LA=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,n,r){return n.toUpperCase()+r}),Lv=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),RA=Bi("RegExp"),Rv=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};za(n,(f,d)=>{let p;(p=e(f,d,t))!==!1&&(r[d]=p||f)}),Object.defineProperties(t,r)},OA=t=>{Rv(t,(e,n)=>{if(Kr(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(Kr(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},DA=(t,e)=>{const n={},r=f=>{f.forEach(d=>{n[d]=!0})};return ia(t)?r(t):r(String(t).split(e)),n},NA=()=>{},FA=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function PA(t){return!!(t&&Kr(t.append)&&t[Tv]==="FormData"&&t[ec])}const BA=t=>{const e=new Array(10),n=(r,f)=>{if(rc(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[f]=r;const d=ia(r)?[]:{};return za(r,(p,b)=>{const h=n(p,f+1);!ja(h)&&(d[b]=h)}),e[f]=void 0,d}}return r};return n(t,0)},WA=Bi("AsyncFunction"),jA=t=>t&&(rc(t)||Kr(t))&&Kr(t.then)&&Kr(t.catch),Ov=((t,e)=>t?setImmediate:e?((n,r)=>(ws.addEventListener("message",({source:f,data:d})=>{f===ws&&d===n&&r.length&&r.shift()()},!1),f=>{r.push(f),ws.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Kr(ws.postMessage)),zA=typeof queueMicrotask<"u"?queueMicrotask.bind(ws):typeof process<"u"&&process.nextTick||Ov,HA=t=>t!=null&&Kr(t[ec]),Ae={isArray:ia,isArrayBuffer:$v,isBuffer:sA,isFormData:gA,isArrayBufferView:aA,isString:lA,isNumber:Mv,isBoolean:cA,isObject:rc,isPlainObject:ic,isReadableStream:vA,isRequest:yA,isResponse:bA,isHeaders:wA,isUndefined:ja,isDate:uA,isFile:hA,isBlob:dA,isRegExp:RA,isFunction:Kr,isStream:pA,isURLSearchParams:mA,isTypedArray:$A,isFileList:fA,forEach:za,merge:Uh,extend:CA,trim:xA,stripBOM:kA,inherits:_A,toFlatObject:SA,kindOf:tc,kindOfTest:Bi,endsWith:AA,toArray:TA,forEachEntry:MA,matchAll:EA,isHTMLForm:IA,hasOwnProperty:Lv,hasOwnProp:Lv,reduceDescriptors:Rv,freezeMethods:OA,toObjectSet:DA,toCamelCase:LA,noop:NA,toFiniteNumber:FA,findKey:Ev,global:ws,isContextDefined:Iv,isSpecCompliantForm:PA,toJSONObject:BA,isAsyncFn:WA,isThenable:jA,setImmediate:Ov,asap:zA,isIterable:HA};function Rt(t,e,n,r,f){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),f&&(this.response=f,this.status=f.status?f.status:null)}Ae.inherits(Rt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Ae.toJSONObject(this.config),code:this.code,status:this.status}}});const Dv=Rt.prototype,Nv={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Nv[t]={value:t}}),Object.defineProperties(Rt,Nv),Object.defineProperty(Dv,"isAxiosError",{value:!0}),Rt.from=(t,e,n,r,f,d)=>{const p=Object.create(Dv);return Ae.toFlatObject(t,p,function(b){return b!==Error.prototype},b=>b!=="isAxiosError"),Rt.call(p,t.message,e,n,r,f),p.cause=t,p.name=t.name,d&&Object.assign(p,d),p};const UA=null;function Vh(t){return Ae.isPlainObject(t)||Ae.isArray(t)}function Fv(t){return Ae.endsWith(t,"[]")?t.slice(0,-2):t}function Pv(t,e,n){return t?t.concat(e).map(function(r,f){return r=Fv(r),!n&&f?"["+r+"]":r}).join(n?".":""):e}function VA(t){return Ae.isArray(t)&&!t.some(Vh)}const qA=Ae.toFlatObject(Ae,{},null,function(t){return/^is[A-Z]/.test(t)});function oc(t,e,n){if(!Ae.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=Ae.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(l,o){return!Ae.isUndefined(o[l])});const r=n.metaTokens,f=n.visitor||g,d=n.dots,p=n.indexes,b=(n.Blob||typeof Blob<"u"&&Blob)&&Ae.isSpecCompliantForm(e);if(!Ae.isFunction(f))throw new TypeError("visitor must be a function");function h(l){if(l===null)return"";if(Ae.isDate(l))return l.toISOString();if(!b&&Ae.isBlob(l))throw new Rt("Blob is not supported. Use a Buffer instead.");return Ae.isArrayBuffer(l)||Ae.isTypedArray(l)?b&&typeof Blob=="function"?new Blob([l]):Buffer.from(l):l}function g(l,o,u){let m=l;if(l&&!u&&typeof l=="object"){if(Ae.endsWith(o,"{}"))o=r?o:o.slice(0,-2),l=JSON.stringify(l);else if(Ae.isArray(l)&&VA(l)||(Ae.isFileList(l)||Ae.endsWith(o,"[]"))&&(m=Ae.toArray(l)))return o=Fv(o),m.forEach(function(w,x){!(Ae.isUndefined(w)||w===null)&&e.append(p===!0?Pv([o],x,d):p===null?o:o+"[]",h(w))}),!1}return Vh(l)?!0:(e.append(Pv(u,o,d),h(l)),!1)}const s=[],a=Object.assign(qA,{defaultVisitor:g,convertValue:h,isVisitable:Vh});function c(l,o){if(!Ae.isUndefined(l)){if(s.indexOf(l)!==-1)throw Error("Circular reference detected in "+o.join("."));s.push(l),Ae.forEach(l,function(u,m){(!(Ae.isUndefined(u)||u===null)&&f.call(e,u,Ae.isString(m)?m.trim():m,o,a))===!0&&c(u,o?o.concat(m):[m])}),s.pop()}}if(!Ae.isObject(t))throw new TypeError("data must be an object");return c(t),e}function Bv(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function qh(t,e){this._pairs=[],t&&oc(t,this,e)}const Wv=qh.prototype;Wv.append=function(t,e){this._pairs.push([t,e])},Wv.toString=function(t){const e=t?function(n){return t.call(this,n,Bv)}:Bv;return this._pairs.map(function(n){return e(n[0])+"="+e(n[1])},"").join("&")};function KA(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function jv(t,e,n){if(!e)return t;const r=n&&n.encode||KA;Ae.isFunction(n)&&(n={serialize:n});const f=n&&n.serialize;let d;if(f?d=f(e,n):d=Ae.isURLSearchParams(e)?e.toString():new qh(e,n).toString(r),d){const p=t.indexOf("#");p!==-1&&(t=t.slice(0,p)),t+=(t.indexOf("?")===-1?"?":"&")+d}return t}let zv=class{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Ae.forEach(this.handlers,function(n){n!==null&&e(n)})}};const Hv={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},GA=typeof URLSearchParams<"u"?URLSearchParams:qh,YA=typeof FormData<"u"?FormData:null,XA=typeof Blob<"u"?Blob:null,QA={isBrowser:!0,classes:{URLSearchParams:GA,FormData:YA,Blob:XA},protocols:["http","https","file","blob","url","data"]},Kh=typeof window<"u"&&typeof document<"u",Gh=typeof navigator=="object"&&navigator||void 0,ZA=Kh&&(!Gh||["ReactNative","NativeScript","NS"].indexOf(Gh.product)<0),JA=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",eT=Kh&&window.location.href||"http://localhost",tT=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Kh,hasStandardBrowserEnv:ZA,hasStandardBrowserWebWorkerEnv:JA,navigator:Gh,origin:eT},Symbol.toStringTag,{value:"Module"})),Tr={...tT,...QA};function nT(t,e){return oc(t,new Tr.classes.URLSearchParams,Object.assign({visitor:function(n,r,f,d){return Tr.isNode&&Ae.isBuffer(n)?(this.append(r,n.toString("base64")),!1):d.defaultVisitor.apply(this,arguments)}},e))}function rT(t){return Ae.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function iT(t){const e={},n=Object.keys(t);let r;const f=n.length;let d;for(r=0;r<f;r++)d=n[r],e[d]=t[d];return e}function Uv(t){function e(n,r,f,d){let p=n[d++];if(p==="__proto__")return!0;const b=Number.isFinite(+p),h=d>=n.length;return p=!p&&Ae.isArray(f)?f.length:p,h?(Ae.hasOwnProp(f,p)?f[p]=[f[p],r]:f[p]=r,!b):((!f[p]||!Ae.isObject(f[p]))&&(f[p]=[]),e(n,r,f[p],d)&&Ae.isArray(f[p])&&(f[p]=iT(f[p])),!b)}if(Ae.isFormData(t)&&Ae.isFunction(t.entries)){const n={};return Ae.forEachEntry(t,(r,f)=>{e(rT(r),f,n,0)}),n}return null}function oT(t,e,n){if(Ae.isString(t))try{return(e||JSON.parse)(t),Ae.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const Ha={transitional:Hv,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,f=Ae.isObject(t);if(f&&Ae.isHTMLForm(t)&&(t=new FormData(t)),Ae.isFormData(t))return r?JSON.stringify(Uv(t)):t;if(Ae.isArrayBuffer(t)||Ae.isBuffer(t)||Ae.isStream(t)||Ae.isFile(t)||Ae.isBlob(t)||Ae.isReadableStream(t))return t;if(Ae.isArrayBufferView(t))return t.buffer;if(Ae.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let d;if(f){if(n.indexOf("application/x-www-form-urlencoded")>-1)return nT(t,this.formSerializer).toString();if((d=Ae.isFileList(t))||n.indexOf("multipart/form-data")>-1){const p=this.env&&this.env.FormData;return oc(d?{"files[]":t}:t,p&&new p,this.formSerializer)}}return f||r?(e.setContentType("application/json",!1),oT(t)):t}],transformResponse:[function(t){const e=this.transitional||Ha.transitional,n=e&&e.forcedJSONParsing,r=this.responseType==="json";if(Ae.isResponse(t)||Ae.isReadableStream(t))return t;if(t&&Ae.isString(t)&&(n&&!this.responseType||r)){const f=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(d){if(f)throw d.name==="SyntaxError"?Rt.from(d,Rt.ERR_BAD_RESPONSE,this,null,this.response):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Tr.classes.FormData,Blob:Tr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ae.forEach(["delete","get","head","post","put","patch"],t=>{Ha.headers[t]={}});const sT=Ae.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"]),aT=t=>{const e={};let n,r,f;return t&&t.split(`
1490
+ `).forEach(function(d){f=d.indexOf(":"),n=d.substring(0,f).trim().toLowerCase(),r=d.substring(f+1).trim(),!(!n||e[n]&&sT[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},Vv=Symbol("internals");function Ua(t){return t&&String(t).trim().toLowerCase()}function sc(t){return t===!1||t==null?t:Ae.isArray(t)?t.map(sc):String(t)}function lT(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const cT=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Yh(t,e,n,r,f){if(Ae.isFunction(r))return r.call(this,e,n);if(f&&(e=n),!!Ae.isString(e)){if(Ae.isString(r))return e.indexOf(r)!==-1;if(Ae.isRegExp(r))return r.test(e)}}function uT(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function hT(t,e){const n=Ae.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(f,d,p){return this[r].call(this,e,f,d,p)},configurable:!0})})}let Gr=class{constructor(e){e&&this.set(e)}set(e,n,r){const f=this;function d(b,h,g){const s=Ua(h);if(!s)throw new Error("header name must be a non-empty string");const a=Ae.findKey(f,s);(!a||f[a]===void 0||g===!0||g===void 0&&f[a]!==!1)&&(f[a||h]=sc(b))}const p=(b,h)=>Ae.forEach(b,(g,s)=>d(g,s,h));if(Ae.isPlainObject(e)||e instanceof this.constructor)p(e,n);else if(Ae.isString(e)&&(e=e.trim())&&!cT(e))p(aT(e),n);else if(Ae.isObject(e)&&Ae.isIterable(e)){let b={},h,g;for(const s of e){if(!Ae.isArray(s))throw TypeError("Object iterator must return a key-value pair");b[g=s[0]]=(h=b[g])?Ae.isArray(h)?[...h,s[1]]:[h,s[1]]:s[1]}p(b,n)}else e!=null&&d(n,e,r);return this}get(e,n){if(e=Ua(e),e){const r=Ae.findKey(this,e);if(r){const f=this[r];if(!n)return f;if(n===!0)return lT(f);if(Ae.isFunction(n))return n.call(this,f,r);if(Ae.isRegExp(n))return n.exec(f);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Ua(e),e){const r=Ae.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||Yh(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let f=!1;function d(p){if(p=Ua(p),p){const b=Ae.findKey(r,p);b&&(!n||Yh(r,r[b],b,n))&&(delete r[b],f=!0)}}return Ae.isArray(e)?e.forEach(d):d(e),f}clear(e){const n=Object.keys(this);let r=n.length,f=!1;for(;r--;){const d=n[r];(!e||Yh(this,this[d],d,e,!0))&&(delete this[d],f=!0)}return f}normalize(e){const n=this,r={};return Ae.forEach(this,(f,d)=>{const p=Ae.findKey(r,d);if(p){n[p]=sc(f),delete n[d];return}const b=e?uT(d):String(d).trim();b!==d&&delete n[d],n[b]=sc(f),r[b]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return Ae.forEach(this,(r,f)=>{r!=null&&r!==!1&&(n[f]=e&&Ae.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
1491
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(f=>r.set(f)),r}static accessor(e){const n=(this[Vv]=this[Vv]={accessors:{}}).accessors,r=this.prototype;function f(d){const p=Ua(d);n[p]||(hT(r,d),n[p]=!0)}return Ae.isArray(e)?e.forEach(f):f(e),this}};Gr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ae.reduceDescriptors(Gr.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}}),Ae.freezeMethods(Gr);function Xh(t,e){const n=this||Ha,r=e||n,f=Gr.from(r.headers);let d=r.data;return Ae.forEach(t,function(p){d=p.call(n,d,f.normalize(),e?e.status:void 0)}),f.normalize(),d}function qv(t){return!!(t&&t.__CANCEL__)}function oa(t,e,n){Rt.call(this,t??"canceled",Rt.ERR_CANCELED,e,n),this.name="CanceledError"}Ae.inherits(oa,Rt,{__CANCEL__:!0});function Kv(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new Rt("Request failed with status code "+n.status,[Rt.ERR_BAD_REQUEST,Rt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function dT(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function fT(t,e){t=t||10;const n=new Array(t),r=new Array(t);let f=0,d=0,p;return e=e!==void 0?e:1e3,function(b){const h=Date.now(),g=r[d];p||(p=h),n[f]=b,r[f]=h;let s=d,a=0;for(;s!==f;)a+=n[s++],s=s%t;if(f=(f+1)%t,f===d&&(d=(d+1)%t),h-p<e)return;const c=g&&h-g;return c?Math.round(a*1e3/c):void 0}}function pT(t,e){let n=0,r=1e3/e,f,d;const p=(b,h=Date.now())=>{n=h,f=null,d&&(clearTimeout(d),d=null),t.apply(null,b)};return[(...b)=>{const h=Date.now(),g=h-n;g>=r?p(b,h):(f=b,d||(d=setTimeout(()=>{d=null,p(f)},r-g)))},()=>f&&p(f)]}const ac=(t,e,n=3)=>{let r=0;const f=fT(50,250);return pT(d=>{const p=d.loaded,b=d.lengthComputable?d.total:void 0,h=p-r,g=f(h),s=p<=b;r=p;const a={loaded:p,total:b,progress:b?p/b:void 0,bytes:h,rate:g||void 0,estimated:g&&b&&s?(b-p)/g:void 0,event:d,lengthComputable:b!=null,[e?"download":"upload"]:!0};t(a)},n)},Gv=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},Yv=t=>(...e)=>Ae.asap(()=>t(...e)),gT=Tr.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,Tr.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(Tr.origin),Tr.navigator&&/(msie|trident)/i.test(Tr.navigator.userAgent)):()=>!0,mT=Tr.hasStandardBrowserEnv?{write(t,e,n,r,f,d){const p=[t+"="+encodeURIComponent(e)];Ae.isNumber(n)&&p.push("expires="+new Date(n).toGMTString()),Ae.isString(r)&&p.push("path="+r),Ae.isString(f)&&p.push("domain="+f),d===!0&&p.push("secure"),document.cookie=p.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function vT(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function yT(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Xv(t,e,n){let r=!vT(e);return t&&(r||n==!1)?yT(t,e):e}const Qv=t=>t instanceof Gr?{...t}:t;function xs(t,e){e=e||{};const n={};function r(g,s,a,c){return Ae.isPlainObject(g)&&Ae.isPlainObject(s)?Ae.merge.call({caseless:c},g,s):Ae.isPlainObject(s)?Ae.merge({},s):Ae.isArray(s)?s.slice():s}function f(g,s,a,c){if(Ae.isUndefined(s)){if(!Ae.isUndefined(g))return r(void 0,g,a,c)}else return r(g,s,a,c)}function d(g,s){if(!Ae.isUndefined(s))return r(void 0,s)}function p(g,s){if(Ae.isUndefined(s)){if(!Ae.isUndefined(g))return r(void 0,g)}else return r(void 0,s)}function b(g,s,a){if(a in e)return r(g,s);if(a in t)return r(void 0,g)}const h={url:d,method:d,data:d,baseURL:p,transformRequest:p,transformResponse:p,paramsSerializer:p,timeout:p,timeoutMessage:p,withCredentials:p,withXSRFToken:p,adapter:p,responseType:p,xsrfCookieName:p,xsrfHeaderName:p,onUploadProgress:p,onDownloadProgress:p,decompress:p,maxContentLength:p,maxBodyLength:p,beforeRedirect:p,transport:p,httpAgent:p,httpsAgent:p,cancelToken:p,socketPath:p,responseEncoding:p,validateStatus:b,headers:(g,s,a)=>f(Qv(g),Qv(s),a,!0)};return Ae.forEach(Object.keys(Object.assign({},t,e)),function(g){const s=h[g]||f,a=s(t[g],e[g],g);Ae.isUndefined(a)&&s!==b||(n[g]=a)}),n}const Zv=t=>{const e=xs({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:f,xsrfCookieName:d,headers:p,auth:b}=e;e.headers=p=Gr.from(p),e.url=jv(Xv(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),b&&p.set("Authorization","Basic "+btoa((b.username||"")+":"+(b.password?unescape(encodeURIComponent(b.password)):"")));let h;if(Ae.isFormData(n)){if(Tr.hasStandardBrowserEnv||Tr.hasStandardBrowserWebWorkerEnv)p.setContentType(void 0);else if((h=p.getContentType())!==!1){const[g,...s]=h?h.split(";").map(a=>a.trim()).filter(Boolean):[];p.setContentType([g||"multipart/form-data",...s].join("; "))}}if(Tr.hasStandardBrowserEnv&&(r&&Ae.isFunction(r)&&(r=r(e)),r||r!==!1&&gT(e.url))){const g=f&&d&&mT.read(d);g&&p.set(f,g)}return e},bT=typeof XMLHttpRequest<"u",wT=bT&&function(t){return new Promise(function(e,n){const r=Zv(t);let f=r.data;const d=Gr.from(r.headers).normalize();let{responseType:p,onUploadProgress:b,onDownloadProgress:h}=r,g,s,a,c,l;function o(){c&&c(),l&&l(),r.cancelToken&&r.cancelToken.unsubscribe(g),r.signal&&r.signal.removeEventListener("abort",g)}let u=new XMLHttpRequest;u.open(r.method.toUpperCase(),r.url,!0),u.timeout=r.timeout;function m(){if(!u)return;const x=Gr.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),E={data:!p||p==="text"||p==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:x,config:t,request:u};Kv(function(T){e(T),o()},function(T){n(T),o()},E),u=null}"onloadend"in u?u.onloadend=m:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(m)},u.onabort=function(){u&&(n(new Rt("Request aborted",Rt.ECONNABORTED,t,u)),u=null)},u.onerror=function(){n(new Rt("Network Error",Rt.ERR_NETWORK,t,u)),u=null},u.ontimeout=function(){let x=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const E=r.transitional||Hv;r.timeoutErrorMessage&&(x=r.timeoutErrorMessage),n(new Rt(x,E.clarifyTimeoutError?Rt.ETIMEDOUT:Rt.ECONNABORTED,t,u)),u=null},f===void 0&&d.setContentType(null),"setRequestHeader"in u&&Ae.forEach(d.toJSON(),function(x,E){u.setRequestHeader(E,x)}),Ae.isUndefined(r.withCredentials)||(u.withCredentials=!!r.withCredentials),p&&p!=="json"&&(u.responseType=r.responseType),h&&([a,l]=ac(h,!0),u.addEventListener("progress",a)),b&&u.upload&&([s,c]=ac(b),u.upload.addEventListener("progress",s),u.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(g=x=>{u&&(n(!x||x.type?new oa(null,t,u):x),u.abort(),u=null)},r.cancelToken&&r.cancelToken.subscribe(g),r.signal&&(r.signal.aborted?g():r.signal.addEventListener("abort",g)));const w=dT(r.url);if(w&&Tr.protocols.indexOf(w)===-1){n(new Rt("Unsupported protocol "+w+":",Rt.ERR_BAD_REQUEST,t));return}u.send(f||null)})},xT=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,f;const d=function(g){if(!f){f=!0,b();const s=g instanceof Error?g:this.reason;r.abort(s instanceof Rt?s:new oa(s instanceof Error?s.message:s))}};let p=e&&setTimeout(()=>{p=null,d(new Rt(`timeout ${e} of ms exceeded`,Rt.ETIMEDOUT))},e);const b=()=>{t&&(p&&clearTimeout(p),p=null,t.forEach(g=>{g.unsubscribe?g.unsubscribe(d):g.removeEventListener("abort",d)}),t=null)};t.forEach(g=>g.addEventListener("abort",d));const{signal:h}=r;return h.unsubscribe=()=>Ae.asap(b),h}},CT=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,f;for(;r<n;)f=r+e,yield t.slice(r,f),r=f},kT=async function*(t,e){for await(const n of _T(t))yield*CT(n,e)},_T=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},Jv=(t,e,n,r)=>{const f=kT(t,e);let d=0,p,b=h=>{p||(p=!0,r&&r(h))};return new ReadableStream({async pull(h){try{const{done:g,value:s}=await f.next();if(g){b(),h.close();return}let a=s.byteLength;if(n){let c=d+=a;n(c)}h.enqueue(new Uint8Array(s))}catch(g){throw b(g),g}},cancel(h){return b(h),f.return()}},{highWaterMark:2})},lc=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",ey=lc&&typeof ReadableStream=="function",ST=lc&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),ty=(t,...e)=>{try{return!!t(...e)}catch{return!1}},AT=ey&&ty(()=>{let t=!1;const e=new Request(Tr.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),ny=64*1024,Qh=ey&&ty(()=>Ae.isReadableStream(new Response("").body)),cc={stream:Qh&&(t=>t.body)};lc&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!cc[e]&&(cc[e]=Ae.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new Rt(`Response type '${e}' is not supported`,Rt.ERR_NOT_SUPPORT,r)})})})(new Response);const TT=async t=>{if(t==null)return 0;if(Ae.isBlob(t))return t.size;if(Ae.isSpecCompliantForm(t))return(await new Request(Tr.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(Ae.isArrayBufferView(t)||Ae.isArrayBuffer(t))return t.byteLength;if(Ae.isURLSearchParams(t)&&(t=t+""),Ae.isString(t))return(await ST(t)).byteLength},$T=async(t,e)=>Ae.toFiniteNumber(t.getContentLength())??TT(e),MT=lc&&(async t=>{let{url:e,method:n,data:r,signal:f,cancelToken:d,timeout:p,onDownloadProgress:b,onUploadProgress:h,responseType:g,headers:s,withCredentials:a="same-origin",fetchOptions:c}=Zv(t);g=g?(g+"").toLowerCase():"text";let l=xT([f,d&&d.toAbortSignal()],p),o;const u=l&&l.unsubscribe&&(()=>{l.unsubscribe()});let m;try{if(h&&AT&&n!=="get"&&n!=="head"&&(m=await $T(s,r))!==0){let k=new Request(e,{method:"POST",body:r,duplex:"half"}),C;if(Ae.isFormData(r)&&(C=k.headers.get("content-type"))&&s.setContentType(C),k.body){const[L,R]=Gv(m,ac(Yv(h)));r=Jv(k.body,ny,L,R)}}Ae.isString(a)||(a=a?"include":"omit");const w="credentials"in Request.prototype;o=new Request(e,{...c,signal:l,method:n.toUpperCase(),headers:s.normalize().toJSON(),body:r,duplex:"half",credentials:w?a:void 0});let x=await fetch(o);const E=Qh&&(g==="stream"||g==="response");if(Qh&&(b||E&&u)){const k={};["status","statusText","headers"].forEach(F=>{k[F]=x[F]});const C=Ae.toFiniteNumber(x.headers.get("content-length")),[L,R]=b&&Gv(C,ac(Yv(b),!0))||[];x=new Response(Jv(x.body,ny,L,()=>{R&&R(),u&&u()}),k)}g=g||"text";let T=await cc[Ae.findKey(cc,g)||"text"](x,t);return!E&&u&&u(),await new Promise((k,C)=>{Kv(k,C,{data:T,headers:Gr.from(x.headers),status:x.status,statusText:x.statusText,config:t,request:o})})}catch(w){throw u&&u(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new Rt("Network Error",Rt.ERR_NETWORK,t,o),{cause:w.cause||w}):Rt.from(w,w&&w.code,t,o)}}),Zh={http:UA,xhr:wT,fetch:MT};Ae.forEach(Zh,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const ry=t=>`- ${t}`,ET=t=>Ae.isFunction(t)||t===null||t===!1,iy={getAdapter:t=>{t=Ae.isArray(t)?t:[t];const{length:e}=t;let n,r;const f={};for(let d=0;d<e;d++){n=t[d];let p;if(r=n,!ET(n)&&(r=Zh[(p=String(n)).toLowerCase()],r===void 0))throw new Rt(`Unknown adapter '${p}'`);if(r)break;f[p||"#"+d]=r}if(!r){const d=Object.entries(f).map(([b,h])=>`adapter ${b} `+(h===!1?"is not supported by the environment":"is not available in the build"));let p=e?d.length>1?`since :
1492
1492
  `+d.map(ry).join(`
1493
- `):" "+ry(d[0]):"as no adapter specified";throw new Rt("There is no suitable adapter to dispatch the request "+p,"ERR_NOT_SUPPORT")}return r},adapters:Zh};function Jh(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new oa(null,t)}function oy(t){return Jh(t),t.headers=Gr.from(t.headers),t.data=Xh.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),iy.getAdapter(t.adapter||Ha.adapter)(t).then(function(e){return Jh(t),e.data=Xh.call(t,t.transformResponse,e),e.headers=Gr.from(e.headers),e},function(e){return qv(e)||(Jh(t),e&&e.response&&(e.response.data=Xh.call(t,t.transformResponse,e.response),e.response.headers=Gr.from(e.response.headers))),Promise.reject(e)})}const sy="1.9.0",cc={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{cc[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const ay={};cc.transitional=function(t,e,n){function r(f,d){return"[Axios v"+sy+"] Transitional option '"+f+"'"+d+(n?". "+n:"")}return(f,d,p)=>{if(t===!1)throw new Rt(r(d," has been removed"+(e?" in "+e:"")),Rt.ERR_DEPRECATED);return e&&!ay[d]&&(ay[d]=!0,console.warn(r(d," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(f,d,p):!0}},cc.spelling=function(t){return(e,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function IT(t,e,n){if(typeof t!="object")throw new Rt("options must be an object",Rt.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let f=r.length;for(;f-- >0;){const d=r[f],p=e[d];if(p){const b=t[d],h=b===void 0||p(b,d,t);if(h!==!0)throw new Rt("option "+d+" must be "+h,Rt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Rt("Unknown option "+d,Rt.ERR_BAD_OPTION)}}const uc={assertOptions:IT,validators:cc},Ji=uc.validators;let Cs=class{constructor(e){this.defaults=e||{},this.interceptors={request:new zv,response:new zv}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let f={};Error.captureStackTrace?Error.captureStackTrace(f):f=new Error;const d=f.stack?f.stack.replace(/^.+\n/,""):"";try{r.stack?d&&!String(r.stack).endsWith(d.replace(/^.+\n.+\n/,""))&&(r.stack+=`
1494
- `+d):r.stack=d}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=xs(this.defaults,n);const{transitional:r,paramsSerializer:f,headers:d}=n;r!==void 0&&uc.assertOptions(r,{silentJSONParsing:Ji.transitional(Ji.boolean),forcedJSONParsing:Ji.transitional(Ji.boolean),clarifyTimeoutError:Ji.transitional(Ji.boolean)},!1),f!=null&&(Ae.isFunction(f)?n.paramsSerializer={serialize:f}:uc.assertOptions(f,{encode:Ji.function,serialize:Ji.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),uc.assertOptions(n,{baseUrl:Ji.spelling("baseURL"),withXsrfToken:Ji.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let p=d&&Ae.merge(d.common,d[n.method]);d&&Ae.forEach(["delete","get","head","post","put","patch","common"],o=>{delete d[o]}),n.headers=Gr.concat(p,d);const b=[];let h=!0;this.interceptors.request.forEach(function(o){typeof o.runWhen=="function"&&o.runWhen(n)===!1||(h=h&&o.synchronous,b.unshift(o.fulfilled,o.rejected))});const g=[];this.interceptors.response.forEach(function(o){g.push(o.fulfilled,o.rejected)});let s,a=0,c;if(!h){const o=[oy.bind(this),void 0];for(o.unshift.apply(o,b),o.push.apply(o,g),c=o.length,s=Promise.resolve(n);a<c;)s=s.then(o[a++],o[a++]);return s}c=b.length;let l=n;for(a=0;a<c;){const o=b[a++],u=b[a++];try{l=o(l)}catch(m){u.call(this,m);break}}try{s=oy.call(this,l)}catch(o){return Promise.reject(o)}for(a=0,c=g.length;a<c;)s=s.then(g[a++],g[a++]);return s}getUri(e){e=xs(this.defaults,e);const n=Xv(e.baseURL,e.url,e.allowAbsoluteUrls);return jv(n,e.params,e.paramsSerializer)}};Ae.forEach(["delete","get","head","options"],function(t){Cs.prototype[t]=function(e,n){return this.request(xs(n||{},{method:t,url:e,data:(n||{}).data}))}}),Ae.forEach(["post","put","patch"],function(t){function e(n){return function(r,f,d){return this.request(xs(d||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:r,data:f}))}}Cs.prototype[t]=e(),Cs.prototype[t+"Form"]=e(!0)});let LT=class Jb{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(f){n=f});const r=this;this.promise.then(f=>{if(!r._listeners)return;let d=r._listeners.length;for(;d-- >0;)r._listeners[d](f);r._listeners=null}),this.promise.then=f=>{let d;const p=new Promise(b=>{r.subscribe(b),d=b}).then(f);return p.cancel=function(){r.unsubscribe(d)},p},e(function(f,d,p){r.reason||(r.reason=new oa(f,d,p),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new Jb(function(n){e=n}),cancel:e}}};function RT(t){return function(e){return t.apply(null,e)}}function OT(t){return Ae.isObject(t)&&t.isAxiosError===!0}const ed={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ed).forEach(([t,e])=>{ed[e]=t});function ly(t){const e=new Cs(t),n=Av(Cs.prototype.request,e);return Ae.extend(n,Cs.prototype,e,{allOwnKeys:!0}),Ae.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return ly(xs(t,r))},n}const qn=sr("E",ly(Ha));qn.Axios=Cs,qn.CanceledError=oa,qn.CancelToken=LT,qn.isCancel=qv,qn.VERSION=sy,qn.toFormData=ic,qn.AxiosError=Rt,qn.Cancel=qn.CanceledError,qn.all=function(t){return Promise.all(t)},qn.spread=RT,qn.isAxiosError=OT,qn.mergeConfig=xs,qn.AxiosHeaders=Gr,qn.formToJSON=t=>Uv(Ae.isHTMLForm(t)?new FormData(t):t),qn.getAdapter=iy.getAdapter,qn.HttpStatusCode=ed,qn.default=qn;const{Axios:mN,AxiosError:vN,CanceledError:yN,isCancel:bN,CancelToken:wN,VERSION:xN,all:CN,Cancel:kN,isAxiosError:_N,spread:SN,toFormData:AN,AxiosHeaders:TN,HttpStatusCode:$N,formToJSON:MN,getAdapter:EN,mergeConfig:IN}=qn;function cy(){return Object.assign({},zs())}function DT(t,e,n){const r=Tn(t,void 0);return r.setTime(r.getTime()+e*pl),r}function NT(t,e){const n=()=>er(void 0,NaN),r=WT(t);let f;if(r.date){const h=jT(r.date,2);f=zT(h.restDateString,h.year)}if(!f||isNaN(+f))return n();const d=+f;let p=0,b;if(r.time&&(p=HT(r.time),isNaN(p)))return n();if(r.timezone){if(b=UT(r.timezone),isNaN(b))return n()}else{const h=new Date(d+p),g=Tn(0,void 0);return g.setFullYear(h.getUTCFullYear(),h.getUTCMonth(),h.getUTCDate()),g.setHours(h.getUTCHours(),h.getUTCMinutes(),h.getUTCSeconds(),h.getUTCMilliseconds()),g}return Tn(d+p+b,void 0)}const hc={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},FT=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,PT=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,BT=/^([+-])(\d{2})(?::?(\d{2}))?$/;function WT(t){const e={},n=t.split(hc.dateTimeDelimiter);let r;if(n.length>2)return e;if(/:/.test(n[0])?r=n[0]:(e.date=n[0],r=n[1],hc.timeZoneDelimiter.test(e.date)&&(e.date=t.split(hc.timeZoneDelimiter)[0],r=t.substr(e.date.length,t.length))),r){const f=hc.timezone.exec(r);f?(e.time=r.replace(f[1],""),e.timezone=f[1]):e.time=r}return e}function jT(t,e){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),r=t.match(n);if(!r)return{year:NaN,restDateString:""};const f=r[1]?parseInt(r[1]):null,d=r[2]?parseInt(r[2]):null;return{year:d===null?f:d*100,restDateString:t.slice((r[1]||r[2]).length)}}function zT(t,e){if(e===null)return new Date(NaN);const n=t.match(FT);if(!n)return new Date(NaN);const r=!!n[4],f=Va(n[1]),d=Va(n[2])-1,p=Va(n[3]),b=Va(n[4]),h=Va(n[5])-1;if(r)return YT(e,b,h)?VT(e,b,h):new Date(NaN);{const g=new Date(0);return!KT(e,d,p)||!GT(e,f)?new Date(NaN):(g.setUTCFullYear(e,d,Math.max(f,p)),g)}}function Va(t){return t?parseInt(t):1}function HT(t){const e=t.match(PT);if(!e)return NaN;const n=td(e[1]),r=td(e[2]),f=td(e[3]);return XT(n,r,f)?n*ou+r*pl+f*1e3:NaN}function td(t){return t&&parseFloat(t.replace(",","."))||0}function UT(t){if(t==="Z")return 0;const e=t.match(BT);if(!e)return 0;const n=e[1]==="+"?-1:1,r=parseInt(e[2]),f=e[3]&&parseInt(e[3])||0;return QT(r,f)?n*(r*ou+f*pl):NaN}function VT(t,e,n){const r=new Date(0);r.setUTCFullYear(t,0,4);const f=r.getUTCDay()||7,d=(e-1)*7+n+1-f;return r.setUTCDate(r.getUTCDate()+d),r}const qT=[31,null,31,30,31,30,31,31,30,31,30,31];function uy(t){return t%400===0||t%4===0&&t%100!==0}function KT(t,e,n){return e>=0&&e<=11&&n>=1&&n<=(qT[e]||(uy(t)?29:28))}function GT(t,e){return e>=1&&e<=(uy(t)?366:365)}function YT(t,e,n){return e>=1&&e<=53&&n>=0&&n<=6}function XT(t,e,n){return t===24?e===0&&n===0:n>=0&&n<60&&e>=0&&e<60&&t>=0&&t<25}function QT(t,e){return e>=0&&e<=59}function ZT(t,e,n){return DT(t,-e)}function hy(t,e,n){const r=cy(),f=t$(t,n.timeZone,n.locale??r.locale);return"formatToParts"in f?JT(f,e):e$(f,e)}function JT(t,e){const n=t.formatToParts(e);for(let r=n.length-1;r>=0;--r)if(n[r].type==="timeZoneName")return n[r].value}function e$(t,e){const n=t.format(e).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(n);return r?r[0].substr(1):""}function t$(t,e,n){return new Intl.DateTimeFormat(n?[n.code,"en-US"]:void 0,{timeZone:e,timeZoneName:t})}function n$(t,e){const n=a$(e);return"formatToParts"in n?i$(n,t):o$(n,t)}const r$={year:0,month:1,day:2,hour:3,minute:4,second:5};function i$(t,e){try{const n=t.formatToParts(e),r=[];for(let f=0;f<n.length;f++){const d=r$[n[f].type];d!==void 0&&(r[d]=parseInt(n[f].value,10))}return r}catch(n){if(n instanceof RangeError)return[NaN];throw n}}function o$(t,e){const n=t.format(e),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);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 nd={},dy=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),s$=dy==="06/25/2014, 00:00:00"||dy==="‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";function a$(t){return nd[t]||(nd[t]=s$?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:t,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),nd[t]}function fy(t,e,n,r,f,d,p){const b=new Date(0);return b.setUTCFullYear(t,e,n),b.setUTCHours(r,f,d,p),b}const py=36e5,l$=6e4,rd={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function id(t,e,n){if(!t)return 0;let r=rd.timezoneZ.exec(t);if(r)return 0;let f,d;if(r=rd.timezoneHH.exec(t),r)return f=parseInt(r[1],10),gy(f)?-(f*py):NaN;if(r=rd.timezoneHHMM.exec(t),r){f=parseInt(r[2],10);const p=parseInt(r[3],10);return gy(f,p)?(d=Math.abs(f)*py+p*l$,r[1]==="+"?-d:d):NaN}if(h$(t)){e=new Date(e||Date.now());const p=n?e:c$(e),b=od(p,t);return-(n?b:u$(e,b,t))}return NaN}function c$(t){return fy(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds())}function od(t,e){const n=n$(t,e),r=fy(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime();let f=t.getTime();const d=f%1e3;return f-=d>=0?d:1e3+d,r-f}function u$(t,e,n){let r=t.getTime()-e;const f=od(new Date(r),n);if(e===f)return e;r-=f-e;const d=od(new Date(r),n);return f===d?f:Math.max(f,d)}function gy(t,e){return-23<=t&&t<=23&&(e==null||0<=e&&e<=59)}const my={};function h$(t){if(my[t])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:t}),my[t]=!0,!0}catch{return!1}}const d$=60*1e3,f$={X:function(t,e,n){const r=sd(n.timeZone,t);if(r===0)return"Z";switch(e){case"X":return vy(r);case"XXXX":case"XX":return sa(r);case"XXXXX":case"XXX":default:return sa(r,":")}},x:function(t,e,n){const r=sd(n.timeZone,t);switch(e){case"x":return vy(r);case"xxxx":case"xx":return sa(r);case"xxxxx":case"xxx":default:return sa(r,":")}},O:function(t,e,n){const r=sd(n.timeZone,t);switch(e){case"O":case"OO":case"OOO":return"GMT"+p$(r,":");case"OOOO":default:return"GMT"+sa(r,":")}},z:function(t,e,n){switch(e){case"z":case"zz":case"zzz":return hy("short",t,n);case"zzzz":default:return hy("long",t,n)}}};function sd(t,e){const n=t?id(t,e,!0)/d$:(e==null?void 0:e.getTimezoneOffset())??0;if(Number.isNaN(n))throw new RangeError("Invalid time zone specified: "+t);return n}function dc(t,e){const n=t<0?"-":"";let r=Math.abs(t).toString();for(;r.length<e;)r="0"+r;return n+r}function sa(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),f=dc(Math.floor(r/60),2),d=dc(Math.floor(r%60),2);return n+f+e+d}function vy(t,e){return t%60===0?(t>0?"-":"+")+dc(Math.abs(t)/60,2):sa(t,e)}function p$(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),f=Math.floor(r/60),d=r%60;return d===0?n+String(f):n+String(f)+e+dc(d,2)}function yy(t){const e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),+t-+e}const g$=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,ad=36e5,by=6e4,m$=2,Fr={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:g$};function wy(t,e={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(t===null)return new Date(NaN);const n=e.additionalDigits==null?m$:Number(e.additionalDigits);if(n!==2&&n!==1&&n!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]")return new Date(t.getTime());if(typeof t=="number"||Object.prototype.toString.call(t)==="[object Number]")return new Date(t);if(Object.prototype.toString.call(t)!=="[object String]")return new Date(NaN);const r=v$(t),{year:f,restDateString:d}=y$(r.date,n),p=b$(d,f);if(p===null||isNaN(p.getTime()))return new Date(NaN);if(p){const b=p.getTime();let h=0,g;if(r.time&&(h=w$(r.time),h===null||isNaN(h)))return new Date(NaN);if(r.timeZone||e.timeZone){if(g=id(r.timeZone||e.timeZone,new Date(b+h)),isNaN(g))return new Date(NaN)}else g=yy(new Date(b+h)),g=yy(new Date(b+h+g));return new Date(b+h+g)}else return new Date(NaN)}function v$(t){const e={};let n=Fr.dateTimePattern.exec(t),r;if(n?(e.date=n[1],r=n[3]):(n=Fr.datePattern.exec(t),n?(e.date=n[1],r=n[2]):(e.date=null,r=t)),r){const f=Fr.timeZone.exec(r);f?(e.time=r.replace(f[1],""),e.timeZone=f[1].trim()):e.time=r}return e}function y$(t,e){if(t){const n=Fr.YYY[e],r=Fr.YYYYY[e];let f=Fr.YYYY.exec(t)||r.exec(t);if(f){const d=f[1];return{year:parseInt(d,10),restDateString:t.slice(d.length)}}if(f=Fr.YY.exec(t)||n.exec(t),f){const d=f[1];return{year:parseInt(d,10)*100,restDateString:t.slice(d.length)}}}return{year:null}}function b$(t,e){if(e===null)return null;let n,r,f;if(!t||!t.length)return n=new Date(0),n.setUTCFullYear(e),n;let d=Fr.MM.exec(t);if(d)return n=new Date(0),r=parseInt(d[1],10)-1,ky(e,r)?(n.setUTCFullYear(e,r),n):new Date(NaN);if(d=Fr.DDD.exec(t),d){n=new Date(0);const p=parseInt(d[1],10);return k$(e,p)?(n.setUTCFullYear(e,0,p),n):new Date(NaN)}if(d=Fr.MMDD.exec(t),d){n=new Date(0),r=parseInt(d[1],10)-1;const p=parseInt(d[2],10);return ky(e,r,p)?(n.setUTCFullYear(e,r,p),n):new Date(NaN)}if(d=Fr.Www.exec(t),d)return f=parseInt(d[1],10)-1,_y(f)?xy(e,f):new Date(NaN);if(d=Fr.WwwD.exec(t),d){f=parseInt(d[1],10)-1;const p=parseInt(d[2],10)-1;return _y(f,p)?xy(e,f,p):new Date(NaN)}return null}function w$(t){let e,n,r=Fr.HH.exec(t);if(r)return e=parseFloat(r[1].replace(",",".")),ld(e)?e%24*ad:NaN;if(r=Fr.HHMM.exec(t),r)return e=parseInt(r[1],10),n=parseFloat(r[2].replace(",",".")),ld(e,n)?e%24*ad+n*by:NaN;if(r=Fr.HHMMSS.exec(t),r){e=parseInt(r[1],10),n=parseInt(r[2],10);const f=parseFloat(r[3].replace(",","."));return ld(e,n,f)?e%24*ad+n*by+f*1e3:NaN}return null}function xy(t,e,n){e=e||0,n=n||0;const r=new Date(0);r.setUTCFullYear(t,0,4);const f=r.getUTCDay()||7,d=e*7+n+1-f;return r.setUTCDate(r.getUTCDate()+d),r}const x$=[31,28,31,30,31,30,31,31,30,31,30,31],C$=[31,29,31,30,31,30,31,31,30,31,30,31];function Cy(t){return t%400===0||t%4===0&&t%100!==0}function ky(t,e,n){if(e<0||e>11)return!1;if(n!=null){if(n<1)return!1;const r=Cy(t);if(r&&n>C$[e]||!r&&n>x$[e])return!1}return!0}function k$(t,e){if(e<1)return!1;const n=Cy(t);return!(n&&e>366||!n&&e>365)}function _y(t,e){return!(t<0||t>52||e!=null&&(e<0||e>6))}function ld(t,e,n){return!(t<0||t>=25||e!=null&&(e<0||e>=60)||n!=null&&(n<0||n>=60))}const _$=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function S$(t,e,n={}){e=String(e);const r=e.match(_$);if(r){const f=wy(n.originalDate||t,n);e=r.reduce(function(d,p){if(p[0]==="'")return d;const b=d.indexOf(p),h=d[b-1]==="'",g=d.replace(p,"'"+f$[p[0]](f,p,n)+"'");return h?g.substring(0,b-1)+g.substring(b+1):g},e)}return No(t,e,n)}function A$(t,e,n){t=wy(t,n);const r=id(e,t,!0),f=new Date(t.getTime()-r),d=new Date(0);return d.setFullYear(f.getUTCFullYear(),f.getUTCMonth(),f.getUTCDate()),d.setHours(f.getUTCHours(),f.getUTCMinutes(),f.getUTCSeconds(),f.getUTCMilliseconds()),d}function fc(t,e,n,r){return r={...r,timeZone:e,originalDate:t},S$(A$(t,e,{timeZone:r.timeZone}),n,r)}const pc="yyyy-MM-dd",Sy="HH:mm:ss.SSS",Ay="HH:mm:ss",gc=`${pc} ${Sy}`,Ty=`${pc} ${Ay}`,LN=sr("R",{methods:{parseDateTime(t,e){return t.includes(" ")&&(t=t.replace(" ","T")),e&&e==="UTC"&&(t+="Z"),Date.parse(t)},formatUtcToLocal(t,e){return No(!e||e==="local"?ZT(t,t.getTimezoneOffset()):t,gc)},formatDateTime(t,e){return!e||e==="local"?No(t,gc):fc(t,e,gc)},formatDateTimeHMS(t,e){return!e||e==="local"?No(t,Ty):fc(t,e,Ty)},formatDate:function(t,e){return!e||e==="local"?No(t,pc):fc(t,this.timeZone,pc)},formatTime:function(t,e,n=Sy){return!e||e==="local"?No(t,n):fc(t,this.timeZone,n)},formatTimeHMS:function(t,e){return this.formatTime(t,e,Ay)},formatTimestamp(t,e){return this.formatDateTime(NT(t),e)},formatSeconds(t,e){return this.formatDateTime(new Date(t*1e3),e)},formatNanoseconds(t,e){return this.formatDateTime(new Date(parseInt(t)/1e6),e)}}});var T$=Object.defineProperty,$$=(t,e,n)=>e in t?T$(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ot=(t,e,n)=>$$(t,typeof e!="symbol"?e+"":e,n);function cd(t,e,n){const r=Tn(t,n==null?void 0:n.in);return isNaN(e)?er((n==null?void 0:n.in)||t,NaN):(e&&r.setDate(r.getDate()+e),r)}function M$(t,e){const n=Tn(t,void 0).getDay();return n===0?7:n}function E$(t,e){const n=I$(e)?new e(0):er(e,0);return n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),n.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),n}function I$(t){var e;return typeof t=="function"&&((e=t.prototype)==null?void 0:e.constructor)===t}const L$=10;let $y=class{constructor(){ot(this,"subPriority",0)}validate(e,n){return!0}},R$=class extends $y{constructor(e,n,r,f,d){super(),this.value=e,this.validateValue=n,this.setValue=r,this.priority=f,d&&(this.subPriority=d)}validate(e,n){return this.validateValue(e,this.value,n)}set(e,n,r){return this.setValue(e,n,this.value,r)}},O$=class extends $y{constructor(e,n){super(),ot(this,"priority",L$),ot(this,"subPriority",-1),this.context=e||(r=>er(n,r))}set(e,n){return n.timestampIsSet?e:er(e,E$(e,this.context))}};class on{run(e,n,r,f){const d=this.parse(e,n,r,f);return d?{setter:new R$(d.value,this.validate,this.set,this.priority,this.subPriority),rest:d.rest}:null}validate(e,n,r){return!0}}class D$ extends on{constructor(){super(...arguments),ot(this,"priority",140),ot(this,"incompatibleTokens",["R","u","t","T"])}parse(e,n,r){switch(n){case"G":case"GG":case"GGG":return r.era(e,{width:"abbreviated"})||r.era(e,{width:"narrow"});case"GGGGG":return r.era(e,{width:"narrow"});case"GGGG":default:return r.era(e,{width:"wide"})||r.era(e,{width:"abbreviated"})||r.era(e,{width:"narrow"})}}set(e,n,r){return n.era=r,e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}}const Kn={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},eo={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Gn(t,e){return t&&{value:e(t.value),rest:t.rest}}function Ln(t,e){const n=e.match(t);return n?{value:parseInt(n[0],10),rest:e.slice(n[0].length)}:null}function to(t,e){const n=e.match(t);if(!n)return null;if(n[0]==="Z")return{value:0,rest:e.slice(1)};const r=n[1]==="+"?1:-1,f=n[2]?parseInt(n[2],10):0,d=n[3]?parseInt(n[3],10):0,p=n[5]?parseInt(n[5],10):0;return{value:r*(f*ou+d*pl+p*vw),rest:e.slice(n[0].length)}}function My(t){return Ln(Kn.anyDigitsSigned,t)}function Nn(t,e){switch(t){case 1:return Ln(Kn.singleDigit,e);case 2:return Ln(Kn.twoDigits,e);case 3:return Ln(Kn.threeDigits,e);case 4:return Ln(Kn.fourDigits,e);default:return Ln(new RegExp("^\\d{1,"+t+"}"),e)}}function Ey(t,e){switch(t){case 1:return Ln(Kn.singleDigitSigned,e);case 2:return Ln(Kn.twoDigitsSigned,e);case 3:return Ln(Kn.threeDigitsSigned,e);case 4:return Ln(Kn.fourDigitsSigned,e);default:return Ln(new RegExp("^-?\\d{1,"+t+"}"),e)}}function ud(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Iy(t,e){const n=e>0,r=n?e:1-e;let f;if(r<=50)f=t||100;else{const d=r+50,p=Math.trunc(d/100)*100,b=t>=d%100;f=t+p-(b?100:0)}return n?f:1-f}function Ly(t){return t%400===0||t%4===0&&t%100!==0}class N$ extends on{constructor(){super(...arguments),ot(this,"priority",130),ot(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(e,n,r){const f=d=>({year:d,isTwoDigitYear:n==="yy"});switch(n){case"y":return Gn(Nn(4,e),f);case"yo":return Gn(r.ordinalNumber(e,{unit:"year"}),f);default:return Gn(Nn(n.length,e),f)}}validate(e,n){return n.isTwoDigitYear||n.year>0}set(e,n,r){const f=e.getFullYear();if(r.isTwoDigitYear){const p=Iy(r.year,f);return e.setFullYear(p,0,1),e.setHours(0,0,0,0),e}const d=!("era"in n)||n.era===1?r.year:1-r.year;return e.setFullYear(d,0,1),e.setHours(0,0,0,0),e}}let F$=class extends on{constructor(){super(...arguments),ot(this,"priority",130),ot(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(e,n,r){const f=d=>({year:d,isTwoDigitYear:n==="YY"});switch(n){case"Y":return Gn(Nn(4,e),f);case"Yo":return Gn(r.ordinalNumber(e,{unit:"year"}),f);default:return Gn(Nn(n.length,e),f)}}validate(e,n){return n.isTwoDigitYear||n.year>0}set(e,n,r,f){const d=au(e,f);if(r.isTwoDigitYear){const b=Iy(r.year,d);return e.setFullYear(b,0,f.firstWeekContainsDate),e.setHours(0,0,0,0),Oo(e,f)}const p=!("era"in n)||n.era===1?r.year:1-r.year;return e.setFullYear(p,0,f.firstWeekContainsDate),e.setHours(0,0,0,0),Oo(e,f)}},P$=class extends on{constructor(){super(...arguments),ot(this,"priority",130),ot(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(e,n){return Ey(n==="R"?4:n.length,e)}set(e,n,r){const f=er(e,0);return f.setFullYear(r,0,4),f.setHours(0,0,0,0),Hs(f)}},B$=class extends on{constructor(){super(...arguments),ot(this,"priority",130),ot(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(e,n){return Ey(n==="u"?4:n.length,e)}set(e,n,r){return e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}},W$=class extends on{constructor(){super(...arguments),ot(this,"priority",120),ot(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(e,n,r){switch(n){case"Q":case"QQ":return Nn(n.length,e);case"Qo":return r.ordinalNumber(e,{unit:"quarter"});case"QQQ":return r.quarter(e,{width:"abbreviated",context:"formatting"})||r.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return r.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(e,{width:"wide",context:"formatting"})||r.quarter(e,{width:"abbreviated",context:"formatting"})||r.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=1&&n<=4}set(e,n,r){return e.setMonth((r-1)*3,1),e.setHours(0,0,0,0),e}},j$=class extends on{constructor(){super(...arguments),ot(this,"priority",120),ot(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(e,n,r){switch(n){case"q":case"qq":return Nn(n.length,e);case"qo":return r.ordinalNumber(e,{unit:"quarter"});case"qqq":return r.quarter(e,{width:"abbreviated",context:"standalone"})||r.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return r.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(e,{width:"wide",context:"standalone"})||r.quarter(e,{width:"abbreviated",context:"standalone"})||r.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=1&&n<=4}set(e,n,r){return e.setMonth((r-1)*3,1),e.setHours(0,0,0,0),e}},z$=class extends on{constructor(){super(...arguments),ot(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),ot(this,"priority",110)}parse(e,n,r){const f=d=>d-1;switch(n){case"M":return Gn(Ln(Kn.month,e),f);case"MM":return Gn(Nn(2,e),f);case"Mo":return Gn(r.ordinalNumber(e,{unit:"month"}),f);case"MMM":return r.month(e,{width:"abbreviated",context:"formatting"})||r.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return r.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(e,{width:"wide",context:"formatting"})||r.month(e,{width:"abbreviated",context:"formatting"})||r.month(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=11}set(e,n,r){return e.setMonth(r,1),e.setHours(0,0,0,0),e}},H$=class extends on{constructor(){super(...arguments),ot(this,"priority",110),ot(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(e,n,r){const f=d=>d-1;switch(n){case"L":return Gn(Ln(Kn.month,e),f);case"LL":return Gn(Nn(2,e),f);case"Lo":return Gn(r.ordinalNumber(e,{unit:"month"}),f);case"LLL":return r.month(e,{width:"abbreviated",context:"standalone"})||r.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return r.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(e,{width:"wide",context:"standalone"})||r.month(e,{width:"abbreviated",context:"standalone"})||r.month(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=0&&n<=11}set(e,n,r){return e.setMonth(r,1),e.setHours(0,0,0,0),e}};function U$(t,e,n){const r=Tn(t,n==null?void 0:n.in),f=jf(r,n)-e;return r.setDate(r.getDate()-f*7),Tn(r,n==null?void 0:n.in)}let V$=class extends on{constructor(){super(...arguments),ot(this,"priority",100),ot(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(e,n,r){switch(n){case"w":return Ln(Kn.week,e);case"wo":return r.ordinalNumber(e,{unit:"week"});default:return Nn(n.length,e)}}validate(e,n){return n>=1&&n<=53}set(e,n,r,f){return Oo(U$(e,r,f),f)}};function q$(t,e,n){const r=Tn(t,void 0),f=Wf(r)-e;return r.setDate(r.getDate()-f*7),r}let K$=class extends on{constructor(){super(...arguments),ot(this,"priority",100),ot(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(e,n,r){switch(n){case"I":return Ln(Kn.week,e);case"Io":return r.ordinalNumber(e,{unit:"week"});default:return Nn(n.length,e)}}validate(e,n){return n>=1&&n<=53}set(e,n,r){return Hs(q$(e,r))}};const G$=[31,28,31,30,31,30,31,31,30,31,30,31],Y$=[31,29,31,30,31,30,31,31,30,31,30,31];let X$=class extends on{constructor(){super(...arguments),ot(this,"priority",90),ot(this,"subPriority",1),ot(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(e,n,r){switch(n){case"d":return Ln(Kn.date,e);case"do":return r.ordinalNumber(e,{unit:"date"});default:return Nn(n.length,e)}}validate(e,n){const r=e.getFullYear(),f=Ly(r),d=e.getMonth();return f?n>=1&&n<=Y$[d]:n>=1&&n<=G$[d]}set(e,n,r){return e.setDate(r),e.setHours(0,0,0,0),e}};class Q$ extends on{constructor(){super(...arguments),ot(this,"priority",90),ot(this,"subpriority",1),ot(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(e,n,r){switch(n){case"D":case"DD":return Ln(Kn.dayOfYear,e);case"Do":return r.ordinalNumber(e,{unit:"date"});default:return Nn(n.length,e)}}validate(e,n){const r=e.getFullYear();return Ly(r)?n>=1&&n<=366:n>=1&&n<=365}set(e,n,r){return e.setMonth(0,r),e.setHours(0,0,0,0),e}}function hd(t,e,n){var r,f,d,p;const b=zs(),h=(n==null?void 0:n.weekStartsOn)??((f=(r=n==null?void 0:n.locale)==null?void 0:r.options)==null?void 0:f.weekStartsOn)??b.weekStartsOn??((p=(d=b.locale)==null?void 0:d.options)==null?void 0:p.weekStartsOn)??0,g=Tn(t,n==null?void 0:n.in),s=g.getDay(),a=(e%7+7)%7,c=7-h,l=e<0||e>6?e-(s+c)%7:(a+c)%7-(s+c)%7;return cd(g,l,n)}let Z$=class extends on{constructor(){super(...arguments),ot(this,"priority",90),ot(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(e,n,r){switch(n){case"E":case"EE":case"EEE":return r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return r.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"EEEE":default:return r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=6}set(e,n,r,f){return e=hd(e,r,f),e.setHours(0,0,0,0),e}},J$=class extends on{constructor(){super(...arguments),ot(this,"priority",90),ot(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(e,n,r,f){const d=p=>{const b=Math.floor((p-1)/7)*7;return(p+f.weekStartsOn+6)%7+b};switch(n){case"e":case"ee":return Gn(Nn(n.length,e),d);case"eo":return Gn(r.ordinalNumber(e,{unit:"day"}),d);case"eee":return r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"eeeee":return r.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"eeee":default:return r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=6}set(e,n,r,f){return e=hd(e,r,f),e.setHours(0,0,0,0),e}};class eM extends on{constructor(){super(...arguments),ot(this,"priority",90),ot(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(e,n,r,f){const d=p=>{const b=Math.floor((p-1)/7)*7;return(p+f.weekStartsOn+6)%7+b};switch(n){case"c":case"cc":return Gn(Nn(n.length,e),d);case"co":return Gn(r.ordinalNumber(e,{unit:"day"}),d);case"ccc":return r.day(e,{width:"abbreviated",context:"standalone"})||r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"});case"ccccc":return r.day(e,{width:"narrow",context:"standalone"});case"cccccc":return r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"});case"cccc":default:return r.day(e,{width:"wide",context:"standalone"})||r.day(e,{width:"abbreviated",context:"standalone"})||r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=0&&n<=6}set(e,n,r,f){return e=hd(e,r,f),e.setHours(0,0,0,0),e}}function tM(t,e,n){const r=Tn(t,void 0),f=M$(r),d=e-f;return cd(r,d,n)}class nM extends on{constructor(){super(...arguments),ot(this,"priority",90),ot(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(e,n,r){const f=d=>d===0?7:d;switch(n){case"i":case"ii":return Nn(n.length,e);case"io":return r.ordinalNumber(e,{unit:"day"});case"iii":return Gn(r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),f);case"iiiii":return Gn(r.day(e,{width:"narrow",context:"formatting"}),f);case"iiiiii":return Gn(r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),f);case"iiii":default:return Gn(r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),f)}}validate(e,n){return n>=1&&n<=7}set(e,n,r){return e=tM(e,r),e.setHours(0,0,0,0),e}}class rM extends on{constructor(){super(...arguments),ot(this,"priority",80),ot(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(e,n,r){switch(n){case"a":case"aa":case"aaa":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return r.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,r){return e.setHours(ud(r),0,0,0),e}}let iM=class extends on{constructor(){super(...arguments),ot(this,"priority",80),ot(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(e,n,r){switch(n){case"b":case"bb":case"bbb":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return r.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,r){return e.setHours(ud(r),0,0,0),e}};class oM extends on{constructor(){super(...arguments),ot(this,"priority",80),ot(this,"incompatibleTokens",["a","b","t","T"])}parse(e,n,r){switch(n){case"B":case"BB":case"BBB":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return r.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,r){return e.setHours(ud(r),0,0,0),e}}let sM=class extends on{constructor(){super(...arguments),ot(this,"priority",70),ot(this,"incompatibleTokens",["H","K","k","t","T"])}parse(e,n,r){switch(n){case"h":return Ln(Kn.hour12h,e);case"ho":return r.ordinalNumber(e,{unit:"hour"});default:return Nn(n.length,e)}}validate(e,n){return n>=1&&n<=12}set(e,n,r){const f=e.getHours()>=12;return f&&r<12?e.setHours(r+12,0,0,0):!f&&r===12?e.setHours(0,0,0,0):e.setHours(r,0,0,0),e}},aM=class extends on{constructor(){super(...arguments),ot(this,"priority",70),ot(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(e,n,r){switch(n){case"H":return Ln(Kn.hour23h,e);case"Ho":return r.ordinalNumber(e,{unit:"hour"});default:return Nn(n.length,e)}}validate(e,n){return n>=0&&n<=23}set(e,n,r){return e.setHours(r,0,0,0),e}},lM=class extends on{constructor(){super(...arguments),ot(this,"priority",70),ot(this,"incompatibleTokens",["h","H","k","t","T"])}parse(e,n,r){switch(n){case"K":return Ln(Kn.hour11h,e);case"Ko":return r.ordinalNumber(e,{unit:"hour"});default:return Nn(n.length,e)}}validate(e,n){return n>=0&&n<=11}set(e,n,r){return e.getHours()>=12&&r<12?e.setHours(r+12,0,0,0):e.setHours(r,0,0,0),e}},cM=class extends on{constructor(){super(...arguments),ot(this,"priority",70),ot(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(e,n,r){switch(n){case"k":return Ln(Kn.hour24h,e);case"ko":return r.ordinalNumber(e,{unit:"hour"});default:return Nn(n.length,e)}}validate(e,n){return n>=1&&n<=24}set(e,n,r){const f=r<=24?r%24:r;return e.setHours(f,0,0,0),e}};class uM extends on{constructor(){super(...arguments),ot(this,"priority",60),ot(this,"incompatibleTokens",["t","T"])}parse(e,n,r){switch(n){case"m":return Ln(Kn.minute,e);case"mo":return r.ordinalNumber(e,{unit:"minute"});default:return Nn(n.length,e)}}validate(e,n){return n>=0&&n<=59}set(e,n,r){return e.setMinutes(r,0,0),e}}let hM=class extends on{constructor(){super(...arguments),ot(this,"priority",50),ot(this,"incompatibleTokens",["t","T"])}parse(e,n,r){switch(n){case"s":return Ln(Kn.second,e);case"so":return r.ordinalNumber(e,{unit:"second"});default:return Nn(n.length,e)}}validate(e,n){return n>=0&&n<=59}set(e,n,r){return e.setSeconds(r,0),e}},dM=class extends on{constructor(){super(...arguments),ot(this,"priority",30),ot(this,"incompatibleTokens",["t","T"])}parse(e,n){const r=f=>Math.trunc(f*Math.pow(10,-n.length+3));return Gn(Nn(n.length,e),r)}set(e,n,r){return e.setMilliseconds(r),e}},fM=class extends on{constructor(){super(...arguments),ot(this,"priority",10),ot(this,"incompatibleTokens",["t","T","x"])}parse(e,n){switch(n){case"X":return to(eo.basicOptionalMinutes,e);case"XX":return to(eo.basic,e);case"XXXX":return to(eo.basicOptionalSeconds,e);case"XXXXX":return to(eo.extendedOptionalSeconds,e);case"XXX":default:return to(eo.extended,e)}}set(e,n,r){return n.timestampIsSet?e:er(e,e.getTime()-gl(e)-r)}},pM=class extends on{constructor(){super(...arguments),ot(this,"priority",10),ot(this,"incompatibleTokens",["t","T","X"])}parse(e,n){switch(n){case"x":return to(eo.basicOptionalMinutes,e);case"xx":return to(eo.basic,e);case"xxxx":return to(eo.basicOptionalSeconds,e);case"xxxxx":return to(eo.extendedOptionalSeconds,e);case"xxx":default:return to(eo.extended,e)}}set(e,n,r){return n.timestampIsSet?e:er(e,e.getTime()-gl(e)-r)}};class gM extends on{constructor(){super(...arguments),ot(this,"priority",40),ot(this,"incompatibleTokens","*")}parse(e){return My(e)}set(e,n,r){return[er(e,r*1e3),{timestampIsSet:!0}]}}let mM=class extends on{constructor(){super(...arguments),ot(this,"priority",20),ot(this,"incompatibleTokens","*")}parse(e){return My(e)}set(e,n,r){return[er(e,r),{timestampIsSet:!0}]}};const vM={G:new D$,y:new N$,Y:new F$,R:new P$,u:new B$,Q:new W$,q:new j$,M:new z$,L:new H$,w:new V$,I:new K$,d:new X$,D:new Q$,E:new Z$,e:new J$,c:new eM,i:new nM,a:new rM,b:new iM,B:new oM,h:new sM,H:new aM,K:new lM,k:new cM,m:new uM,s:new hM,S:new dM,X:new fM,x:new pM,t:new gM,T:new mM},yM=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,bM=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,wM=/^'([^]*?)'?$/,xM=/''/g,CM=/\S/,kM=/[a-zA-Z]/;function _M(t,e,n,r){var f,d,p,b;const h=()=>er(n,NaN),g=cy(),s=g.locale??Bf,a=g.firstWeekContainsDate??((d=(f=g.locale)==null?void 0:f.options)==null?void 0:d.firstWeekContainsDate)??1,c=g.weekStartsOn??((b=(p=g.locale)==null?void 0:p.options)==null?void 0:b.weekStartsOn)??0;if(!e)return t?h():Tn(n,void 0);const l={firstWeekContainsDate:a,weekStartsOn:c,locale:s},o=[new O$(void 0,n)],u=e.match(bM).map(T=>{const k=T[0];if(k in lu){const C=lu[k];return C(T,s.formatLong)}return T}).join("").match(yM),m=[];for(let T of u){Gf(T)&&cu(T,e,t),Kf(T)&&cu(T,e,t);const k=T[0],C=vM[k];if(C){const{incompatibleTokens:L}=C;if(Array.isArray(L)){const F=m.find(I=>L.includes(I.token)||I.token===k);if(F)throw new RangeError(`The format string mustn't contain \`${F.fullToken}\` and \`${T}\` at the same time`)}else if(C.incompatibleTokens==="*"&&m.length>0)throw new RangeError(`The format string mustn't contain \`${T}\` and any other token at the same time`);m.push({token:k,fullToken:T});const R=C.run(t,T,s.match,l);if(!R)return h();o.push(R.setter),t=R.rest}else{if(k.match(kM))throw new RangeError("Format string contains an unescaped latin alphabet character `"+k+"`");if(T==="''"?T="'":k==="'"&&(T=SM(T)),t.indexOf(T)===0)t=t.slice(T.length);else return h()}}if(t.length>0&&CM.test(t))return h();const w=o.map(T=>T.priority).sort((T,k)=>k-T).filter((T,k,C)=>C.indexOf(T)===k).map(T=>o.filter(k=>k.priority===T).sort((k,C)=>C.subPriority-k.subPriority)).map(T=>T[0]);let x=Tn(n,void 0);if(isNaN(+x))return h();const E={};for(const T of w){if(!T.validate(x,l))return h();const k=T.set(x,E,l);Array.isArray(k)?(x=k[0],Object.assign(E,k[1])):x=k}return x}function SM(t){return t.match(wM)[1].replace(xM,"'")}const AM="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=",TM={props:{status:{type:String,required:!0},large:{type:Boolean},small:{type:Boolean},scale:{type:Number}},computed:{icons:function(){return AM},scaleFactor:function(){return this.scale?this.scale:this.large?1:this.small?.3:.5},iconStyle:function(){const t=OM.indexOf(Ry[this.status]),e=1-(t-1)*.05,n=224*this.scaleFactor*e,r=32*this.scaleFactor*e,f=32*this.scaleFactor*e;return[`background-image: url(${this.icons});`,`background-position-x: -${t*f}px;`,`background-size: ${n}px ${r}px;`,`height: ${f}px;`,`width: ${f}px;`,`padding-top: ${t-1}px;`].join("")}}};function $M(t,e,n,r,f,d){return lt(),gn("div",{style:is(d.iconStyle)},null,4)}const MM=Ri(TM,[["render",$M]]),EM={props:{icon:{type:String},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{colorStyle:function(){return{"--iconColor":this.color}}}};function IM(t,e,n,r,f,d){const p=Ue("rux-icon");return lt(),Xt(p,{size:n.size,icon:n.icon,style:is(d.colorStyle)},null,8,["size","icon","style"])}const LM=Ri(EM,[["render",IM],["__scopeId","data-v-9af48e85"]]),Ry={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"},dd={fatal:"#ff69B4",critical:"#ff3838",serious:"#ffb302",caution:"#fce83a",normal:"#56f000",standby:"#2dccff",off:"#a4abb6"},RM=function(t){const e="#000000",n="#ffffff",r=dd[Ry[t]];if(r){const f=+`0x${r.slice(1,3)}`,d=+`0x${r.slice(3,5)}`,p=+`0x${r.slice(5,7)}`;if((f*299+d*587+p*114)/1e3>128)return e}return n},OM=Object.keys(dd),DM={astro:{component:t=>js(LM,{...t})},"astro-status":{component:t=>js(MM,{...t,status:t.icon})}},NM={extras:{component:t=>js(mw,{...t})}},Oy="single-spa:app-change",FM={data(){return{show:!1}},created(){window.addEventListener(Oy,this.handleAppChange)},mounted(){setTimeout(()=>{this.show=$f().length===0},150)},unmounted(){window.removeEventListener(Oy,this.handleAppChange)},methods:{handleAppChange:function(t){this.show=!t.detail.appsByNewStatus.MOUNTED}}},PM={class:"mx-1"};function BM(t,e,n,r,f,d){const p=Ue("v-card-title"),b=Ue("v-card-text"),h=Ue("v-card");return f.show?(lt(),Xt(h,{key:0},{default:Fe(()=>[We(p,null,{default:Fe(()=>e[0]||(e[0]=[Ht(" 404 Not Found ")])),_:1}),We(b,{class:"d-flex align-center mt-3"},{default:Fe(()=>[e[1]||(e[1]=Ht(" The requested URL ")),fr("code",PM,_n(t.$route.fullPath),1),e[2]||(e[2]=Ht(" was not routable. ")),e[3]||(e[3]=fr("span",{class:"text-h3 mx-1"}," 🦄 ",-1))]),_:1})]),_:1})):Ur("",!0)}const WM=Ri(FM,[["render",BM]]),jM={props:{modelValue:Boolean},data(){return{url:"",type:null,response:null,activeDownload:!1,disableSearch:!1,expanded:[]}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}},listData:function(){return this.response?this.type==="github"?this.parseGithub():this.parseRuby():[]}},methods:{parseGithub:function(){const t=/\w+.gem/;return this.response.tree.filter(e=>t.exec(e.path)).map(e=>({name:e.path,url:`https://raw.github.com/OpenC3/openc3-tools/main/${e.path}`}))},getResponse:function(){this.disableSearch=!0,qn.get(this.url).then(t=>{this.response=t.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(t){const e=document.createElement("a");e.href=t.url,e.setAttribute("download",t.name),e.click(),e.remove()}}},zM={class:"pa-3"},HM={class:"px-2"},UM={key:0,class:"mt-4"},VM={key:1,class:"mt-4"};function qM(t,e,n,r,f,d){const p=Ue("v-spacer"),b=Ue("v-toolbar"),h=Ue("v-row"),g=Ue("v-icon"),s=Ue("v-btn"),a=Ue("v-col"),c=Ue("v-list-item-title"),l=Ue("v-progress-circular"),o=Ue("v-list-item"),u=Ue("v-divider"),m=Ue("v-card-text"),w=Ue("v-card"),x=Ue("v-dialog");return lt(),Xt(x,{modelValue:d.show,"onUpdate:modelValue":e[0]||(e[0]=E=>d.show=E),width:"600"},{default:Fe(()=>[We(w,null,{default:Fe(()=>[We(b,{height:"24"},{default:Fe(()=>[We(p),e[1]||(e[1]=fr("span",null," Download Gems ",-1)),We(p)]),_:1}),We(m,null,{default:Fe(()=>[fr("div",zM,[We(h,{class:"my-2"},{default:Fe(()=>e[2]||(e[2]=[Ht(" Select a download option ")])),_:1}),We(h,null,{default:Fe(()=>[We(a,null,{default:Fe(()=>[fr("div",HM,[We(s,{block:"","data-test":"searchGithub",color:"primary",disabled:f.disableSearch,onClick:d.searchGithub},{default:Fe(()=>[e[4]||(e[4]=Ht(" Github ")),We(g,{end:"",theme:"dark"},{default:Fe(()=>e[3]||(e[3]=[Ht(" mdi-github ")])),_:1})]),_:1},8,["disabled","onClick"])])]),_:1})]),_:1}),We(h,{class:"mt-5"},{default:Fe(()=>e[5]||(e[5]=[Ht(" Community Gems ")])),_:1}),d.listData.length<1?(lt(),gn("div",UM,[We(h,{class:"mx-2"},{default:Fe(()=>e[6]||(e[6]=[fr("span",null," I’m sorry, Dave. No gems available.... ",-1)])),_:1})])):(lt(),gn("div",VM,[(lt(!0),gn(Li,null,Xi(d.listData,(E,T)=>(lt(),gn("div",{key:T},[We(o,null,{default:Fe(()=>[We(c,null,{default:Fe(()=>[Ht(_n(E.name),1)]),_:2},1024),We(o,{icon:""},{default:Fe(()=>[f.activeDownload?(lt(),Xt(l,{key:0,indeterminate:"",color:"primary"})):(lt(),Xt(s,{key:1,icon:"mdi-cloud-download",variant:"text",disabled:f.activeDownload,onClick:k=>d.downloadGem(E)},null,8,["disabled","onClick"]))]),_:2},1024)]),_:2},1024),T<d.listData.length-1?(lt(),Xt(u,{key:T})):Ur("",!0)]))),128))]))])]),_:1})]),_:1})]),_:1},8,["modelValue"])}const RN=sr("h",Ri(jM,[["render",qM]])),KM={props:{modelValue:Boolean,plugin:String,targets:Array,pluginDelete:Boolean},data(){return{modifiedTargets:[],deleteModified:!1}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},created(){for(const t of this.targets)tC.get(`/openc3-api/targets/${t.name}/modified_files`).then(e=>{e.data.length!==0&&this.modifiedTargets.push({name:t.name,files:e.data})})}};function GM(t,e,n,r,f,d){const p=Ue("v-spacer"),b=Ue("v-toolbar"),h=Ue("v-list-item-title"),g=Ue("v-list-item-subtitle"),s=Ue("v-list-item"),a=Ue("v-checkbox"),c=Ue("v-card-text"),l=Ue("v-btn"),o=Ue("v-card-actions"),u=Ue("v-card"),m=Ue("v-dialog");return lt(),Xt(m,{modelValue:d.show,"onUpdate:modelValue":e[3]||(e[3]=w=>d.show=w),width:"600"},{default:Fe(()=>[We(u,null,{default:Fe(()=>[We(b,{height:"24"},{default:Fe(()=>[We(p),e[4]||(e[4]=fr("span",null," Modified Plugin ",-1)),We(p)]),_:1}),We(c,{class:"pa-3"},{default:Fe(()=>[fr("div",null," Plugin "+_n(n.plugin)+" was modified. Would you like to delete the existing modified files? ",1),(lt(!0),gn(Li,null,Xi(f.modifiedTargets,(w,x)=>(lt(),Xt(s,{key:x,lines:"two"},{default:Fe(()=>[We(h,null,{default:Fe(()=>[Ht(_n(w.name),1)]),_:2},1024),(lt(!0),gn(Li,null,Xi(w.files,(E,T)=>(lt(),Xt(g,{key:T},{default:Fe(()=>[Ht(_n(E),1)]),_:2},1024))),128))]),_:2},1024))),128)),We(a,{modelValue:f.deleteModified,"onUpdate:modelValue":e[0]||(e[0]=w=>f.deleteModified=w),label:"DELETE MODIFIED! THIS CAN NOT BE UNDONE!!!",color:"error","data-test":"modified-plugin-delete-checkbox"},null,8,["modelValue"])]),_:1}),We(o,{class:"px-2"},{default:Fe(()=>[We(p),We(l,{variant:"outlined","data-test":"modified-plugin-cancel",onClick:e[1]||(e[1]=()=>{d.show=!1,t.$emit("cancel")})},{default:Fe(()=>e[5]||(e[5]=[Ht(" Cancel ")])),_:1}),We(l,{variant:"flat","data-test":"modified-plugin-submit",onClick:e[2]||(e[2]=()=>{d.show=!1,t.$emit("submit",f.deleteModified)})},{default:Fe(()=>e[6]||(e[6]=[Ht(" Confirm ")])),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const ON=sr("c",Ri(KM,[["render",GM]])),fd=[{displayName:"Plugins",name:"PluginsTab",path:"plugins",component:()=>it(()=>rt.import("./PluginsTab-C9t0-QVm-6573a228c03271a9a721.js"),void 0)},{displayName:"Targets",name:"TargetsTab",path:"targets",component:()=>it(()=>rt.import("./TargetsTab-CfBt-dZW-af29d3abcec34f39d21d.js"),void 0)},{displayName:"Interfaces",name:"InterfacesTab",path:"interfaces",component:()=>it(()=>rt.import("./InterfacesTab-DTixVrGo-d1c54d784fb72d35a760.js"),void 0)},{displayName:"Routers",name:"RoutersTab",path:"routers",component:()=>it(()=>rt.import("./RoutersTab-D-ex_yMO-5fc215e92e7302a8075a.js"),void 0)},{displayName:"Microservices",name:"MicroservicesTab",path:"microservices",component:()=>it(()=>rt.import("./MicroservicesTab-DbL48MBc-484871d8f774092c18ce.js"),void 0)},{displayName:"Packages",name:"PackagesTab",path:"packages",component:()=>it(()=>rt.import("./PackagesTab-Bw34RkLc-a8bd901d60023aea57d0.js"),void 0)},{displayName:"Tools",name:"ToolsTab",path:"tools",component:()=>it(()=>rt.import("./ToolsTab-CnhhRS3J-57d6ddffd01325622abb.js"),void 0)},{displayName:"Redis",name:"RedisTab",path:"redis",component:()=>it(()=>rt.import("./RedisTab-CvPLS0Qe-5d4a932e4970ba3ca803.js"),void 0)},{displayName:"Secrets",name:"SecretsTab",path:"secrets",component:()=>it(()=>rt.import("./SecretsTab-CLkJfzf--d880a0e1441849be64f2.js"),void 0)},{displayName:"Settings",name:"SettingsTab",path:"settings",component:()=>it(()=>rt.import("./SettingsTab-CysOMBFu-96c27242035cd5ef53f0.js"),void 0)}],YM={components:{TopBar:iA},data(){return{title:"Administrator Console",curTab:null}},computed:{tabs:function(){return fd.map(t=>({displayName:t.displayName,path:{name:t.name}}))}}};function XM(t,e,n,r,f,d){const p=Ue("top-bar"),b=Ue("v-tab"),h=Ue("v-tabs"),g=Ue("router-view"),s=Ue("v-card");return lt(),gn("div",null,[We(p,{title:f.title},null,8,["title"]),We(s,null,{default:Fe(()=>[We(h,{modelValue:f.curTab,"onUpdate:modelValue":e[0]||(e[0]=a=>f.curTab=a),"fixed-tabs":""},{default:Fe(()=>[(lt(!0),gn(Li,null,Xi(d.tabs,(a,c)=>(lt(),Xt(b,{key:c,to:a.path},{default:Fe(()=>[Ht(_n(a.displayName),1)]),_:2},1032,["to"]))),128))]),_:1},8,["modelValue"]),We(g)]),_:1})])}const QM=Ri(YM,[["render",XM]]),Pe=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32};Pe.Diff=function(t,e){this[0]=t,this[1]=e},Pe.Diff.prototype.length=2,Pe.Diff.prototype.toString=function(){return this[0]+","+this[1]},Pe.prototype.diff_main=function(t,e,n,r){typeof r>"u"&&(this.Diff_Timeout<=0?r=Number.MAX_VALUE:r=new Date().getTime()+this.Diff_Timeout*1e3);let f=r;if(t==null||e==null)throw new Error("Null input. (diff_main)");if(t==e)return t?[new Pe.Diff(0,t)]:[];typeof n>"u"&&(n=!0);let d=n,p=this.diff_commonPrefix(t,e),b=t.substring(0,p);t=t.substring(p),e=e.substring(p),p=this.diff_commonSuffix(t,e);let h=t.substring(t.length-p);t=t.substring(0,t.length-p),e=e.substring(0,e.length-p);let g=this.diff_compute_(t,e,d,f);return b&&g.unshift(new Pe.Diff(0,b)),h&&g.push(new Pe.Diff(0,h)),this.diff_cleanupMerge(g),g},Pe.prototype.diff_compute_=function(t,e,n,r){let f;if(!t)return[new Pe.Diff(1,e)];if(!e)return[new Pe.Diff(-1,t)];let d=t.length>e.length?t:e,p=t.length>e.length?e:t,b=d.indexOf(p);return b!=-1?(f=[new Pe.Diff(1,d.substring(0,b)),new Pe.Diff(0,p),new Pe.Diff(1,d.substring(b+p.length))],t.length>e.length&&(f[0][0]=f[2][0]=-1),f):p.length==1?[new Pe.Diff(-1,t),new Pe.Diff(1,e)]:n&&t.length>100&&e.length>100?this.diff_lineMode_(t,e,r):this.diff_bisect_(t,e,r)},Pe.prototype.diff_lineMode_=function(t,e,n){let r=this.diff_linesToChars_(t,e);t=r.chars1,e=r.chars2;let f=r.lineArray,d=this.diff_main(t,e,!1,n);this.diff_charsToLines_(d,f),this.diff_cleanupSemantic(d),d.push(new Pe.Diff(0,""));let p=0,b=0,h=0,g="",s="";for(;p<d.length;){switch(d[p][0]){case 1:h++,s+=d[p][1];break;case-1:b++,g+=d[p][1];break;case 0:if(b>=1&&h>=1){d.splice(p-b-h,b+h),p=p-b-h;let a=this.diff_main(g,s,!1,n);for(let c=a.length-1;c>=0;c--)d.splice(p,0,a[c]);p=p+a.length}h=0,b=0,g="",s="";break}p++}return d.pop(),d},Pe.prototype.diff_bisect_=function(t,e,n){let r=t.length,f=e.length,d=Math.ceil((r+f)/2),p=d,b=2*d,h=new Array(b),g=new Array(b);for(let m=0;m<b;m++)h[m]=-1,g[m]=-1;h[p+1]=0,g[p+1]=0;let s=r-f,a=s%2!=0,c=0,l=0,o=0,u=0;for(let m=0;m<d&&!(new Date().getTime()>n);m++){for(let w=-m+c;w<=m-l;w+=2){let x=p+w,E;w==-m||w!=m&&h[x-1]<h[x+1]?E=h[x+1]:E=h[x-1]+1;let T=E-w;for(;E<r&&T<f&&t.charAt(E)==e.charAt(T);)E++,T++;if(h[x]=E,E>r)l+=2;else if(T>f)c+=2;else if(a){let k=p+s-w;if(k>=0&&k<b&&g[k]!=-1){let C=r-g[k];if(E>=C)return this.diff_bisectSplit_(t,e,E,T,n)}}}for(let w=-m+o;w<=m-u;w+=2){let x=p+w,E;w==-m||w!=m&&g[x-1]<g[x+1]?E=g[x+1]:E=g[x-1]+1;let T=E-w;for(;E<r&&T<f&&t.charAt(r-E-1)==e.charAt(f-T-1);)E++,T++;if(g[x]=E,E>r)u+=2;else if(T>f)o+=2;else if(!a){let k=p+s-w;if(k>=0&&k<b&&h[k]!=-1){let C=h[k],L=p+C-k;if(E=r-E,C>=E)return this.diff_bisectSplit_(t,e,C,L,n)}}}}return[new Pe.Diff(-1,t),new Pe.Diff(1,e)]},Pe.prototype.diff_bisectSplit_=function(t,e,n,r,f){let d=t.substring(0,n),p=e.substring(0,r),b=t.substring(n),h=e.substring(r),g=this.diff_main(d,p,!1,f),s=this.diff_main(b,h,!1,f);return g.concat(s)},Pe.prototype.diff_linesToChars_=function(t,e){let n=[],r={};n[0]="";function f(h){let g="",s=0,a=-1,c=n.length;for(;a<h.length-1;){a=h.indexOf(`
1493
+ `):" "+ry(d[0]):"as no adapter specified";throw new Rt("There is no suitable adapter to dispatch the request "+p,"ERR_NOT_SUPPORT")}return r},adapters:Zh};function Jh(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new oa(null,t)}function oy(t){return Jh(t),t.headers=Gr.from(t.headers),t.data=Xh.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),iy.getAdapter(t.adapter||Ha.adapter)(t).then(function(e){return Jh(t),e.data=Xh.call(t,t.transformResponse,e),e.headers=Gr.from(e.headers),e},function(e){return qv(e)||(Jh(t),e&&e.response&&(e.response.data=Xh.call(t,t.transformResponse,e.response),e.response.headers=Gr.from(e.response.headers))),Promise.reject(e)})}const sy="1.9.0",uc={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{uc[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const ay={};uc.transitional=function(t,e,n){function r(f,d){return"[Axios v"+sy+"] Transitional option '"+f+"'"+d+(n?". "+n:"")}return(f,d,p)=>{if(t===!1)throw new Rt(r(d," has been removed"+(e?" in "+e:"")),Rt.ERR_DEPRECATED);return e&&!ay[d]&&(ay[d]=!0,console.warn(r(d," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(f,d,p):!0}},uc.spelling=function(t){return(e,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function IT(t,e,n){if(typeof t!="object")throw new Rt("options must be an object",Rt.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let f=r.length;for(;f-- >0;){const d=r[f],p=e[d];if(p){const b=t[d],h=b===void 0||p(b,d,t);if(h!==!0)throw new Rt("option "+d+" must be "+h,Rt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Rt("Unknown option "+d,Rt.ERR_BAD_OPTION)}}const hc={assertOptions:IT,validators:uc},Ji=hc.validators;let Cs=class{constructor(e){this.defaults=e||{},this.interceptors={request:new zv,response:new zv}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let f={};Error.captureStackTrace?Error.captureStackTrace(f):f=new Error;const d=f.stack?f.stack.replace(/^.+\n/,""):"";try{r.stack?d&&!String(r.stack).endsWith(d.replace(/^.+\n.+\n/,""))&&(r.stack+=`
1494
+ `+d):r.stack=d}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=xs(this.defaults,n);const{transitional:r,paramsSerializer:f,headers:d}=n;r!==void 0&&hc.assertOptions(r,{silentJSONParsing:Ji.transitional(Ji.boolean),forcedJSONParsing:Ji.transitional(Ji.boolean),clarifyTimeoutError:Ji.transitional(Ji.boolean)},!1),f!=null&&(Ae.isFunction(f)?n.paramsSerializer={serialize:f}:hc.assertOptions(f,{encode:Ji.function,serialize:Ji.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),hc.assertOptions(n,{baseUrl:Ji.spelling("baseURL"),withXsrfToken:Ji.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let p=d&&Ae.merge(d.common,d[n.method]);d&&Ae.forEach(["delete","get","head","post","put","patch","common"],o=>{delete d[o]}),n.headers=Gr.concat(p,d);const b=[];let h=!0;this.interceptors.request.forEach(function(o){typeof o.runWhen=="function"&&o.runWhen(n)===!1||(h=h&&o.synchronous,b.unshift(o.fulfilled,o.rejected))});const g=[];this.interceptors.response.forEach(function(o){g.push(o.fulfilled,o.rejected)});let s,a=0,c;if(!h){const o=[oy.bind(this),void 0];for(o.unshift.apply(o,b),o.push.apply(o,g),c=o.length,s=Promise.resolve(n);a<c;)s=s.then(o[a++],o[a++]);return s}c=b.length;let l=n;for(a=0;a<c;){const o=b[a++],u=b[a++];try{l=o(l)}catch(m){u.call(this,m);break}}try{s=oy.call(this,l)}catch(o){return Promise.reject(o)}for(a=0,c=g.length;a<c;)s=s.then(g[a++],g[a++]);return s}getUri(e){e=xs(this.defaults,e);const n=Xv(e.baseURL,e.url,e.allowAbsoluteUrls);return jv(n,e.params,e.paramsSerializer)}};Ae.forEach(["delete","get","head","options"],function(t){Cs.prototype[t]=function(e,n){return this.request(xs(n||{},{method:t,url:e,data:(n||{}).data}))}}),Ae.forEach(["post","put","patch"],function(t){function e(n){return function(r,f,d){return this.request(xs(d||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:r,data:f}))}}Cs.prototype[t]=e(),Cs.prototype[t+"Form"]=e(!0)});let LT=class Jb{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(f){n=f});const r=this;this.promise.then(f=>{if(!r._listeners)return;let d=r._listeners.length;for(;d-- >0;)r._listeners[d](f);r._listeners=null}),this.promise.then=f=>{let d;const p=new Promise(b=>{r.subscribe(b),d=b}).then(f);return p.cancel=function(){r.unsubscribe(d)},p},e(function(f,d,p){r.reason||(r.reason=new oa(f,d,p),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new Jb(function(n){e=n}),cancel:e}}};function RT(t){return function(e){return t.apply(null,e)}}function OT(t){return Ae.isObject(t)&&t.isAxiosError===!0}const ed={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ed).forEach(([t,e])=>{ed[e]=t});function ly(t){const e=new Cs(t),n=Av(Cs.prototype.request,e);return Ae.extend(n,Cs.prototype,e,{allOwnKeys:!0}),Ae.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return ly(xs(t,r))},n}const qn=sr("E",ly(Ha));qn.Axios=Cs,qn.CanceledError=oa,qn.CancelToken=LT,qn.isCancel=qv,qn.VERSION=sy,qn.toFormData=oc,qn.AxiosError=Rt,qn.Cancel=qn.CanceledError,qn.all=function(t){return Promise.all(t)},qn.spread=RT,qn.isAxiosError=OT,qn.mergeConfig=xs,qn.AxiosHeaders=Gr,qn.formToJSON=t=>Uv(Ae.isHTMLForm(t)?new FormData(t):t),qn.getAdapter=iy.getAdapter,qn.HttpStatusCode=ed,qn.default=qn;const{Axios:mN,AxiosError:vN,CanceledError:yN,isCancel:bN,CancelToken:wN,VERSION:xN,all:CN,Cancel:kN,isAxiosError:_N,spread:SN,toFormData:AN,AxiosHeaders:TN,HttpStatusCode:$N,formToJSON:MN,getAdapter:EN,mergeConfig:IN}=qn;function cy(){return Object.assign({},zs())}function DT(t,e,n){const r=Tn(t,void 0);return r.setTime(r.getTime()+e*pl),r}function NT(t,e){const n=()=>er(void 0,NaN),r=WT(t);let f;if(r.date){const h=jT(r.date,2);f=zT(h.restDateString,h.year)}if(!f||isNaN(+f))return n();const d=+f;let p=0,b;if(r.time&&(p=HT(r.time),isNaN(p)))return n();if(r.timezone){if(b=UT(r.timezone),isNaN(b))return n()}else{const h=new Date(d+p),g=Tn(0,void 0);return g.setFullYear(h.getUTCFullYear(),h.getUTCMonth(),h.getUTCDate()),g.setHours(h.getUTCHours(),h.getUTCMinutes(),h.getUTCSeconds(),h.getUTCMilliseconds()),g}return Tn(d+p+b,void 0)}const dc={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},FT=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,PT=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,BT=/^([+-])(\d{2})(?::?(\d{2}))?$/;function WT(t){const e={},n=t.split(dc.dateTimeDelimiter);let r;if(n.length>2)return e;if(/:/.test(n[0])?r=n[0]:(e.date=n[0],r=n[1],dc.timeZoneDelimiter.test(e.date)&&(e.date=t.split(dc.timeZoneDelimiter)[0],r=t.substr(e.date.length,t.length))),r){const f=dc.timezone.exec(r);f?(e.time=r.replace(f[1],""),e.timezone=f[1]):e.time=r}return e}function jT(t,e){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),r=t.match(n);if(!r)return{year:NaN,restDateString:""};const f=r[1]?parseInt(r[1]):null,d=r[2]?parseInt(r[2]):null;return{year:d===null?f:d*100,restDateString:t.slice((r[1]||r[2]).length)}}function zT(t,e){if(e===null)return new Date(NaN);const n=t.match(FT);if(!n)return new Date(NaN);const r=!!n[4],f=Va(n[1]),d=Va(n[2])-1,p=Va(n[3]),b=Va(n[4]),h=Va(n[5])-1;if(r)return YT(e,b,h)?VT(e,b,h):new Date(NaN);{const g=new Date(0);return!KT(e,d,p)||!GT(e,f)?new Date(NaN):(g.setUTCFullYear(e,d,Math.max(f,p)),g)}}function Va(t){return t?parseInt(t):1}function HT(t){const e=t.match(PT);if(!e)return NaN;const n=td(e[1]),r=td(e[2]),f=td(e[3]);return XT(n,r,f)?n*su+r*pl+f*1e3:NaN}function td(t){return t&&parseFloat(t.replace(",","."))||0}function UT(t){if(t==="Z")return 0;const e=t.match(BT);if(!e)return 0;const n=e[1]==="+"?-1:1,r=parseInt(e[2]),f=e[3]&&parseInt(e[3])||0;return QT(r,f)?n*(r*su+f*pl):NaN}function VT(t,e,n){const r=new Date(0);r.setUTCFullYear(t,0,4);const f=r.getUTCDay()||7,d=(e-1)*7+n+1-f;return r.setUTCDate(r.getUTCDate()+d),r}const qT=[31,null,31,30,31,30,31,31,30,31,30,31];function uy(t){return t%400===0||t%4===0&&t%100!==0}function KT(t,e,n){return e>=0&&e<=11&&n>=1&&n<=(qT[e]||(uy(t)?29:28))}function GT(t,e){return e>=1&&e<=(uy(t)?366:365)}function YT(t,e,n){return e>=1&&e<=53&&n>=0&&n<=6}function XT(t,e,n){return t===24?e===0&&n===0:n>=0&&n<60&&e>=0&&e<60&&t>=0&&t<25}function QT(t,e){return e>=0&&e<=59}function ZT(t,e,n){return DT(t,-e)}function hy(t,e,n){const r=cy(),f=t$(t,n.timeZone,n.locale??r.locale);return"formatToParts"in f?JT(f,e):e$(f,e)}function JT(t,e){const n=t.formatToParts(e);for(let r=n.length-1;r>=0;--r)if(n[r].type==="timeZoneName")return n[r].value}function e$(t,e){const n=t.format(e).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(n);return r?r[0].substr(1):""}function t$(t,e,n){return new Intl.DateTimeFormat(n?[n.code,"en-US"]:void 0,{timeZone:e,timeZoneName:t})}function n$(t,e){const n=a$(e);return"formatToParts"in n?i$(n,t):o$(n,t)}const r$={year:0,month:1,day:2,hour:3,minute:4,second:5};function i$(t,e){try{const n=t.formatToParts(e),r=[];for(let f=0;f<n.length;f++){const d=r$[n[f].type];d!==void 0&&(r[d]=parseInt(n[f].value,10))}return r}catch(n){if(n instanceof RangeError)return[NaN];throw n}}function o$(t,e){const n=t.format(e),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);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 nd={},dy=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),s$=dy==="06/25/2014, 00:00:00"||dy==="‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";function a$(t){return nd[t]||(nd[t]=s$?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:t,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),nd[t]}function fy(t,e,n,r,f,d,p){const b=new Date(0);return b.setUTCFullYear(t,e,n),b.setUTCHours(r,f,d,p),b}const py=36e5,l$=6e4,rd={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function id(t,e,n){if(!t)return 0;let r=rd.timezoneZ.exec(t);if(r)return 0;let f,d;if(r=rd.timezoneHH.exec(t),r)return f=parseInt(r[1],10),gy(f)?-(f*py):NaN;if(r=rd.timezoneHHMM.exec(t),r){f=parseInt(r[2],10);const p=parseInt(r[3],10);return gy(f,p)?(d=Math.abs(f)*py+p*l$,r[1]==="+"?-d:d):NaN}if(h$(t)){e=new Date(e||Date.now());const p=n?e:c$(e),b=od(p,t);return-(n?b:u$(e,b,t))}return NaN}function c$(t){return fy(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds())}function od(t,e){const n=n$(t,e),r=fy(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime();let f=t.getTime();const d=f%1e3;return f-=d>=0?d:1e3+d,r-f}function u$(t,e,n){let r=t.getTime()-e;const f=od(new Date(r),n);if(e===f)return e;r-=f-e;const d=od(new Date(r),n);return f===d?f:Math.max(f,d)}function gy(t,e){return-23<=t&&t<=23&&(e==null||0<=e&&e<=59)}const my={};function h$(t){if(my[t])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:t}),my[t]=!0,!0}catch{return!1}}const d$=60*1e3,f$={X:function(t,e,n){const r=sd(n.timeZone,t);if(r===0)return"Z";switch(e){case"X":return vy(r);case"XXXX":case"XX":return sa(r);case"XXXXX":case"XXX":default:return sa(r,":")}},x:function(t,e,n){const r=sd(n.timeZone,t);switch(e){case"x":return vy(r);case"xxxx":case"xx":return sa(r);case"xxxxx":case"xxx":default:return sa(r,":")}},O:function(t,e,n){const r=sd(n.timeZone,t);switch(e){case"O":case"OO":case"OOO":return"GMT"+p$(r,":");case"OOOO":default:return"GMT"+sa(r,":")}},z:function(t,e,n){switch(e){case"z":case"zz":case"zzz":return hy("short",t,n);case"zzzz":default:return hy("long",t,n)}}};function sd(t,e){const n=t?id(t,e,!0)/d$:(e==null?void 0:e.getTimezoneOffset())??0;if(Number.isNaN(n))throw new RangeError("Invalid time zone specified: "+t);return n}function fc(t,e){const n=t<0?"-":"";let r=Math.abs(t).toString();for(;r.length<e;)r="0"+r;return n+r}function sa(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),f=fc(Math.floor(r/60),2),d=fc(Math.floor(r%60),2);return n+f+e+d}function vy(t,e){return t%60===0?(t>0?"-":"+")+fc(Math.abs(t)/60,2):sa(t,e)}function p$(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),f=Math.floor(r/60),d=r%60;return d===0?n+String(f):n+String(f)+e+fc(d,2)}function yy(t){const e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),+t-+e}const g$=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,ad=36e5,by=6e4,m$=2,Fr={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:g$};function wy(t,e={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(t===null)return new Date(NaN);const n=e.additionalDigits==null?m$:Number(e.additionalDigits);if(n!==2&&n!==1&&n!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]")return new Date(t.getTime());if(typeof t=="number"||Object.prototype.toString.call(t)==="[object Number]")return new Date(t);if(Object.prototype.toString.call(t)!=="[object String]")return new Date(NaN);const r=v$(t),{year:f,restDateString:d}=y$(r.date,n),p=b$(d,f);if(p===null||isNaN(p.getTime()))return new Date(NaN);if(p){const b=p.getTime();let h=0,g;if(r.time&&(h=w$(r.time),h===null||isNaN(h)))return new Date(NaN);if(r.timeZone||e.timeZone){if(g=id(r.timeZone||e.timeZone,new Date(b+h)),isNaN(g))return new Date(NaN)}else g=yy(new Date(b+h)),g=yy(new Date(b+h+g));return new Date(b+h+g)}else return new Date(NaN)}function v$(t){const e={};let n=Fr.dateTimePattern.exec(t),r;if(n?(e.date=n[1],r=n[3]):(n=Fr.datePattern.exec(t),n?(e.date=n[1],r=n[2]):(e.date=null,r=t)),r){const f=Fr.timeZone.exec(r);f?(e.time=r.replace(f[1],""),e.timeZone=f[1].trim()):e.time=r}return e}function y$(t,e){if(t){const n=Fr.YYY[e],r=Fr.YYYYY[e];let f=Fr.YYYY.exec(t)||r.exec(t);if(f){const d=f[1];return{year:parseInt(d,10),restDateString:t.slice(d.length)}}if(f=Fr.YY.exec(t)||n.exec(t),f){const d=f[1];return{year:parseInt(d,10)*100,restDateString:t.slice(d.length)}}}return{year:null}}function b$(t,e){if(e===null)return null;let n,r,f;if(!t||!t.length)return n=new Date(0),n.setUTCFullYear(e),n;let d=Fr.MM.exec(t);if(d)return n=new Date(0),r=parseInt(d[1],10)-1,ky(e,r)?(n.setUTCFullYear(e,r),n):new Date(NaN);if(d=Fr.DDD.exec(t),d){n=new Date(0);const p=parseInt(d[1],10);return k$(e,p)?(n.setUTCFullYear(e,0,p),n):new Date(NaN)}if(d=Fr.MMDD.exec(t),d){n=new Date(0),r=parseInt(d[1],10)-1;const p=parseInt(d[2],10);return ky(e,r,p)?(n.setUTCFullYear(e,r,p),n):new Date(NaN)}if(d=Fr.Www.exec(t),d)return f=parseInt(d[1],10)-1,_y(f)?xy(e,f):new Date(NaN);if(d=Fr.WwwD.exec(t),d){f=parseInt(d[1],10)-1;const p=parseInt(d[2],10)-1;return _y(f,p)?xy(e,f,p):new Date(NaN)}return null}function w$(t){let e,n,r=Fr.HH.exec(t);if(r)return e=parseFloat(r[1].replace(",",".")),ld(e)?e%24*ad:NaN;if(r=Fr.HHMM.exec(t),r)return e=parseInt(r[1],10),n=parseFloat(r[2].replace(",",".")),ld(e,n)?e%24*ad+n*by:NaN;if(r=Fr.HHMMSS.exec(t),r){e=parseInt(r[1],10),n=parseInt(r[2],10);const f=parseFloat(r[3].replace(",","."));return ld(e,n,f)?e%24*ad+n*by+f*1e3:NaN}return null}function xy(t,e,n){e=e||0,n=n||0;const r=new Date(0);r.setUTCFullYear(t,0,4);const f=r.getUTCDay()||7,d=e*7+n+1-f;return r.setUTCDate(r.getUTCDate()+d),r}const x$=[31,28,31,30,31,30,31,31,30,31,30,31],C$=[31,29,31,30,31,30,31,31,30,31,30,31];function Cy(t){return t%400===0||t%4===0&&t%100!==0}function ky(t,e,n){if(e<0||e>11)return!1;if(n!=null){if(n<1)return!1;const r=Cy(t);if(r&&n>C$[e]||!r&&n>x$[e])return!1}return!0}function k$(t,e){if(e<1)return!1;const n=Cy(t);return!(n&&e>366||!n&&e>365)}function _y(t,e){return!(t<0||t>52||e!=null&&(e<0||e>6))}function ld(t,e,n){return!(t<0||t>=25||e!=null&&(e<0||e>=60)||n!=null&&(n<0||n>=60))}const _$=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function S$(t,e,n={}){e=String(e);const r=e.match(_$);if(r){const f=wy(n.originalDate||t,n);e=r.reduce(function(d,p){if(p[0]==="'")return d;const b=d.indexOf(p),h=d[b-1]==="'",g=d.replace(p,"'"+f$[p[0]](f,p,n)+"'");return h?g.substring(0,b-1)+g.substring(b+1):g},e)}return No(t,e,n)}function A$(t,e,n){t=wy(t,n);const r=id(e,t,!0),f=new Date(t.getTime()-r),d=new Date(0);return d.setFullYear(f.getUTCFullYear(),f.getUTCMonth(),f.getUTCDate()),d.setHours(f.getUTCHours(),f.getUTCMinutes(),f.getUTCSeconds(),f.getUTCMilliseconds()),d}function pc(t,e,n,r){return r={...r,timeZone:e,originalDate:t},S$(A$(t,e,{timeZone:r.timeZone}),n,r)}const gc="yyyy-MM-dd",Sy="HH:mm:ss.SSS",Ay="HH:mm:ss",mc=`${gc} ${Sy}`,Ty=`${gc} ${Ay}`,LN=sr("R",{methods:{parseDateTime(t,e){return t.includes(" ")&&(t=t.replace(" ","T")),e&&e==="UTC"&&(t+="Z"),Date.parse(t)},formatUtcToLocal(t,e){return No(!e||e==="local"?ZT(t,t.getTimezoneOffset()):t,mc)},formatDateTime(t,e){return!e||e==="local"?No(t,mc):pc(t,e,mc)},formatDateTimeHMS(t,e){return!e||e==="local"?No(t,Ty):pc(t,e,Ty)},formatDate:function(t,e){return!e||e==="local"?No(t,gc):pc(t,this.timeZone,gc)},formatTime:function(t,e,n=Sy){return!e||e==="local"?No(t,n):pc(t,this.timeZone,n)},formatTimeHMS:function(t,e){return this.formatTime(t,e,Ay)},formatTimestamp(t,e){return this.formatDateTime(NT(t),e)},formatSeconds(t,e){return this.formatDateTime(new Date(t*1e3),e)},formatNanoseconds(t,e){return this.formatDateTime(new Date(parseInt(t)/1e6),e)}}});var T$=Object.defineProperty,$$=(t,e,n)=>e in t?T$(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ot=(t,e,n)=>$$(t,typeof e!="symbol"?e+"":e,n);function cd(t,e,n){const r=Tn(t,n==null?void 0:n.in);return isNaN(e)?er((n==null?void 0:n.in)||t,NaN):(e&&r.setDate(r.getDate()+e),r)}function M$(t,e){const n=Tn(t,void 0).getDay();return n===0?7:n}function E$(t,e){const n=I$(e)?new e(0):er(e,0);return n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),n.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),n}function I$(t){var e;return typeof t=="function"&&((e=t.prototype)==null?void 0:e.constructor)===t}const L$=10;let $y=class{constructor(){ot(this,"subPriority",0)}validate(e,n){return!0}},R$=class extends $y{constructor(e,n,r,f,d){super(),this.value=e,this.validateValue=n,this.setValue=r,this.priority=f,d&&(this.subPriority=d)}validate(e,n){return this.validateValue(e,this.value,n)}set(e,n,r){return this.setValue(e,n,this.value,r)}},O$=class extends $y{constructor(e,n){super(),ot(this,"priority",L$),ot(this,"subPriority",-1),this.context=e||(r=>er(n,r))}set(e,n){return n.timestampIsSet?e:er(e,E$(e,this.context))}};class on{run(e,n,r,f){const d=this.parse(e,n,r,f);return d?{setter:new R$(d.value,this.validate,this.set,this.priority,this.subPriority),rest:d.rest}:null}validate(e,n,r){return!0}}class D$ extends on{constructor(){super(...arguments),ot(this,"priority",140),ot(this,"incompatibleTokens",["R","u","t","T"])}parse(e,n,r){switch(n){case"G":case"GG":case"GGG":return r.era(e,{width:"abbreviated"})||r.era(e,{width:"narrow"});case"GGGGG":return r.era(e,{width:"narrow"});case"GGGG":default:return r.era(e,{width:"wide"})||r.era(e,{width:"abbreviated"})||r.era(e,{width:"narrow"})}}set(e,n,r){return n.era=r,e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}}const Kn={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},eo={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Gn(t,e){return t&&{value:e(t.value),rest:t.rest}}function Ln(t,e){const n=e.match(t);return n?{value:parseInt(n[0],10),rest:e.slice(n[0].length)}:null}function to(t,e){const n=e.match(t);if(!n)return null;if(n[0]==="Z")return{value:0,rest:e.slice(1)};const r=n[1]==="+"?1:-1,f=n[2]?parseInt(n[2],10):0,d=n[3]?parseInt(n[3],10):0,p=n[5]?parseInt(n[5],10):0;return{value:r*(f*su+d*pl+p*vw),rest:e.slice(n[0].length)}}function My(t){return Ln(Kn.anyDigitsSigned,t)}function Nn(t,e){switch(t){case 1:return Ln(Kn.singleDigit,e);case 2:return Ln(Kn.twoDigits,e);case 3:return Ln(Kn.threeDigits,e);case 4:return Ln(Kn.fourDigits,e);default:return Ln(new RegExp("^\\d{1,"+t+"}"),e)}}function Ey(t,e){switch(t){case 1:return Ln(Kn.singleDigitSigned,e);case 2:return Ln(Kn.twoDigitsSigned,e);case 3:return Ln(Kn.threeDigitsSigned,e);case 4:return Ln(Kn.fourDigitsSigned,e);default:return Ln(new RegExp("^-?\\d{1,"+t+"}"),e)}}function ud(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Iy(t,e){const n=e>0,r=n?e:1-e;let f;if(r<=50)f=t||100;else{const d=r+50,p=Math.trunc(d/100)*100,b=t>=d%100;f=t+p-(b?100:0)}return n?f:1-f}function Ly(t){return t%400===0||t%4===0&&t%100!==0}class N$ extends on{constructor(){super(...arguments),ot(this,"priority",130),ot(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(e,n,r){const f=d=>({year:d,isTwoDigitYear:n==="yy"});switch(n){case"y":return Gn(Nn(4,e),f);case"yo":return Gn(r.ordinalNumber(e,{unit:"year"}),f);default:return Gn(Nn(n.length,e),f)}}validate(e,n){return n.isTwoDigitYear||n.year>0}set(e,n,r){const f=e.getFullYear();if(r.isTwoDigitYear){const p=Iy(r.year,f);return e.setFullYear(p,0,1),e.setHours(0,0,0,0),e}const d=!("era"in n)||n.era===1?r.year:1-r.year;return e.setFullYear(d,0,1),e.setHours(0,0,0,0),e}}let F$=class extends on{constructor(){super(...arguments),ot(this,"priority",130),ot(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(e,n,r){const f=d=>({year:d,isTwoDigitYear:n==="YY"});switch(n){case"Y":return Gn(Nn(4,e),f);case"Yo":return Gn(r.ordinalNumber(e,{unit:"year"}),f);default:return Gn(Nn(n.length,e),f)}}validate(e,n){return n.isTwoDigitYear||n.year>0}set(e,n,r,f){const d=lu(e,f);if(r.isTwoDigitYear){const b=Iy(r.year,d);return e.setFullYear(b,0,f.firstWeekContainsDate),e.setHours(0,0,0,0),Oo(e,f)}const p=!("era"in n)||n.era===1?r.year:1-r.year;return e.setFullYear(p,0,f.firstWeekContainsDate),e.setHours(0,0,0,0),Oo(e,f)}},P$=class extends on{constructor(){super(...arguments),ot(this,"priority",130),ot(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(e,n){return Ey(n==="R"?4:n.length,e)}set(e,n,r){const f=er(e,0);return f.setFullYear(r,0,4),f.setHours(0,0,0,0),Hs(f)}},B$=class extends on{constructor(){super(...arguments),ot(this,"priority",130),ot(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(e,n){return Ey(n==="u"?4:n.length,e)}set(e,n,r){return e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}},W$=class extends on{constructor(){super(...arguments),ot(this,"priority",120),ot(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(e,n,r){switch(n){case"Q":case"QQ":return Nn(n.length,e);case"Qo":return r.ordinalNumber(e,{unit:"quarter"});case"QQQ":return r.quarter(e,{width:"abbreviated",context:"formatting"})||r.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return r.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(e,{width:"wide",context:"formatting"})||r.quarter(e,{width:"abbreviated",context:"formatting"})||r.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=1&&n<=4}set(e,n,r){return e.setMonth((r-1)*3,1),e.setHours(0,0,0,0),e}},j$=class extends on{constructor(){super(...arguments),ot(this,"priority",120),ot(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(e,n,r){switch(n){case"q":case"qq":return Nn(n.length,e);case"qo":return r.ordinalNumber(e,{unit:"quarter"});case"qqq":return r.quarter(e,{width:"abbreviated",context:"standalone"})||r.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return r.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(e,{width:"wide",context:"standalone"})||r.quarter(e,{width:"abbreviated",context:"standalone"})||r.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=1&&n<=4}set(e,n,r){return e.setMonth((r-1)*3,1),e.setHours(0,0,0,0),e}},z$=class extends on{constructor(){super(...arguments),ot(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),ot(this,"priority",110)}parse(e,n,r){const f=d=>d-1;switch(n){case"M":return Gn(Ln(Kn.month,e),f);case"MM":return Gn(Nn(2,e),f);case"Mo":return Gn(r.ordinalNumber(e,{unit:"month"}),f);case"MMM":return r.month(e,{width:"abbreviated",context:"formatting"})||r.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return r.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(e,{width:"wide",context:"formatting"})||r.month(e,{width:"abbreviated",context:"formatting"})||r.month(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=11}set(e,n,r){return e.setMonth(r,1),e.setHours(0,0,0,0),e}},H$=class extends on{constructor(){super(...arguments),ot(this,"priority",110),ot(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(e,n,r){const f=d=>d-1;switch(n){case"L":return Gn(Ln(Kn.month,e),f);case"LL":return Gn(Nn(2,e),f);case"Lo":return Gn(r.ordinalNumber(e,{unit:"month"}),f);case"LLL":return r.month(e,{width:"abbreviated",context:"standalone"})||r.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return r.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(e,{width:"wide",context:"standalone"})||r.month(e,{width:"abbreviated",context:"standalone"})||r.month(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=0&&n<=11}set(e,n,r){return e.setMonth(r,1),e.setHours(0,0,0,0),e}};function U$(t,e,n){const r=Tn(t,n==null?void 0:n.in),f=jf(r,n)-e;return r.setDate(r.getDate()-f*7),Tn(r,n==null?void 0:n.in)}let V$=class extends on{constructor(){super(...arguments),ot(this,"priority",100),ot(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(e,n,r){switch(n){case"w":return Ln(Kn.week,e);case"wo":return r.ordinalNumber(e,{unit:"week"});default:return Nn(n.length,e)}}validate(e,n){return n>=1&&n<=53}set(e,n,r,f){return Oo(U$(e,r,f),f)}};function q$(t,e,n){const r=Tn(t,void 0),f=Wf(r)-e;return r.setDate(r.getDate()-f*7),r}let K$=class extends on{constructor(){super(...arguments),ot(this,"priority",100),ot(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(e,n,r){switch(n){case"I":return Ln(Kn.week,e);case"Io":return r.ordinalNumber(e,{unit:"week"});default:return Nn(n.length,e)}}validate(e,n){return n>=1&&n<=53}set(e,n,r){return Hs(q$(e,r))}};const G$=[31,28,31,30,31,30,31,31,30,31,30,31],Y$=[31,29,31,30,31,30,31,31,30,31,30,31];let X$=class extends on{constructor(){super(...arguments),ot(this,"priority",90),ot(this,"subPriority",1),ot(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(e,n,r){switch(n){case"d":return Ln(Kn.date,e);case"do":return r.ordinalNumber(e,{unit:"date"});default:return Nn(n.length,e)}}validate(e,n){const r=e.getFullYear(),f=Ly(r),d=e.getMonth();return f?n>=1&&n<=Y$[d]:n>=1&&n<=G$[d]}set(e,n,r){return e.setDate(r),e.setHours(0,0,0,0),e}};class Q$ extends on{constructor(){super(...arguments),ot(this,"priority",90),ot(this,"subpriority",1),ot(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(e,n,r){switch(n){case"D":case"DD":return Ln(Kn.dayOfYear,e);case"Do":return r.ordinalNumber(e,{unit:"date"});default:return Nn(n.length,e)}}validate(e,n){const r=e.getFullYear();return Ly(r)?n>=1&&n<=366:n>=1&&n<=365}set(e,n,r){return e.setMonth(0,r),e.setHours(0,0,0,0),e}}function hd(t,e,n){var r,f,d,p;const b=zs(),h=(n==null?void 0:n.weekStartsOn)??((f=(r=n==null?void 0:n.locale)==null?void 0:r.options)==null?void 0:f.weekStartsOn)??b.weekStartsOn??((p=(d=b.locale)==null?void 0:d.options)==null?void 0:p.weekStartsOn)??0,g=Tn(t,n==null?void 0:n.in),s=g.getDay(),a=(e%7+7)%7,c=7-h,l=e<0||e>6?e-(s+c)%7:(a+c)%7-(s+c)%7;return cd(g,l,n)}let Z$=class extends on{constructor(){super(...arguments),ot(this,"priority",90),ot(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(e,n,r){switch(n){case"E":case"EE":case"EEE":return r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return r.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"EEEE":default:return r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=6}set(e,n,r,f){return e=hd(e,r,f),e.setHours(0,0,0,0),e}},J$=class extends on{constructor(){super(...arguments),ot(this,"priority",90),ot(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(e,n,r,f){const d=p=>{const b=Math.floor((p-1)/7)*7;return(p+f.weekStartsOn+6)%7+b};switch(n){case"e":case"ee":return Gn(Nn(n.length,e),d);case"eo":return Gn(r.ordinalNumber(e,{unit:"day"}),d);case"eee":return r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"eeeee":return r.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"eeee":default:return r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=6}set(e,n,r,f){return e=hd(e,r,f),e.setHours(0,0,0,0),e}};class eM extends on{constructor(){super(...arguments),ot(this,"priority",90),ot(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(e,n,r,f){const d=p=>{const b=Math.floor((p-1)/7)*7;return(p+f.weekStartsOn+6)%7+b};switch(n){case"c":case"cc":return Gn(Nn(n.length,e),d);case"co":return Gn(r.ordinalNumber(e,{unit:"day"}),d);case"ccc":return r.day(e,{width:"abbreviated",context:"standalone"})||r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"});case"ccccc":return r.day(e,{width:"narrow",context:"standalone"});case"cccccc":return r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"});case"cccc":default:return r.day(e,{width:"wide",context:"standalone"})||r.day(e,{width:"abbreviated",context:"standalone"})||r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=0&&n<=6}set(e,n,r,f){return e=hd(e,r,f),e.setHours(0,0,0,0),e}}function tM(t,e,n){const r=Tn(t,void 0),f=M$(r),d=e-f;return cd(r,d,n)}class nM extends on{constructor(){super(...arguments),ot(this,"priority",90),ot(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(e,n,r){const f=d=>d===0?7:d;switch(n){case"i":case"ii":return Nn(n.length,e);case"io":return r.ordinalNumber(e,{unit:"day"});case"iii":return Gn(r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),f);case"iiiii":return Gn(r.day(e,{width:"narrow",context:"formatting"}),f);case"iiiiii":return Gn(r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),f);case"iiii":default:return Gn(r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),f)}}validate(e,n){return n>=1&&n<=7}set(e,n,r){return e=tM(e,r),e.setHours(0,0,0,0),e}}class rM extends on{constructor(){super(...arguments),ot(this,"priority",80),ot(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(e,n,r){switch(n){case"a":case"aa":case"aaa":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return r.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,r){return e.setHours(ud(r),0,0,0),e}}let iM=class extends on{constructor(){super(...arguments),ot(this,"priority",80),ot(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(e,n,r){switch(n){case"b":case"bb":case"bbb":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return r.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,r){return e.setHours(ud(r),0,0,0),e}};class oM extends on{constructor(){super(...arguments),ot(this,"priority",80),ot(this,"incompatibleTokens",["a","b","t","T"])}parse(e,n,r){switch(n){case"B":case"BB":case"BBB":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return r.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,r){return e.setHours(ud(r),0,0,0),e}}let sM=class extends on{constructor(){super(...arguments),ot(this,"priority",70),ot(this,"incompatibleTokens",["H","K","k","t","T"])}parse(e,n,r){switch(n){case"h":return Ln(Kn.hour12h,e);case"ho":return r.ordinalNumber(e,{unit:"hour"});default:return Nn(n.length,e)}}validate(e,n){return n>=1&&n<=12}set(e,n,r){const f=e.getHours()>=12;return f&&r<12?e.setHours(r+12,0,0,0):!f&&r===12?e.setHours(0,0,0,0):e.setHours(r,0,0,0),e}},aM=class extends on{constructor(){super(...arguments),ot(this,"priority",70),ot(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(e,n,r){switch(n){case"H":return Ln(Kn.hour23h,e);case"Ho":return r.ordinalNumber(e,{unit:"hour"});default:return Nn(n.length,e)}}validate(e,n){return n>=0&&n<=23}set(e,n,r){return e.setHours(r,0,0,0),e}},lM=class extends on{constructor(){super(...arguments),ot(this,"priority",70),ot(this,"incompatibleTokens",["h","H","k","t","T"])}parse(e,n,r){switch(n){case"K":return Ln(Kn.hour11h,e);case"Ko":return r.ordinalNumber(e,{unit:"hour"});default:return Nn(n.length,e)}}validate(e,n){return n>=0&&n<=11}set(e,n,r){return e.getHours()>=12&&r<12?e.setHours(r+12,0,0,0):e.setHours(r,0,0,0),e}},cM=class extends on{constructor(){super(...arguments),ot(this,"priority",70),ot(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(e,n,r){switch(n){case"k":return Ln(Kn.hour24h,e);case"ko":return r.ordinalNumber(e,{unit:"hour"});default:return Nn(n.length,e)}}validate(e,n){return n>=1&&n<=24}set(e,n,r){const f=r<=24?r%24:r;return e.setHours(f,0,0,0),e}};class uM extends on{constructor(){super(...arguments),ot(this,"priority",60),ot(this,"incompatibleTokens",["t","T"])}parse(e,n,r){switch(n){case"m":return Ln(Kn.minute,e);case"mo":return r.ordinalNumber(e,{unit:"minute"});default:return Nn(n.length,e)}}validate(e,n){return n>=0&&n<=59}set(e,n,r){return e.setMinutes(r,0,0),e}}let hM=class extends on{constructor(){super(...arguments),ot(this,"priority",50),ot(this,"incompatibleTokens",["t","T"])}parse(e,n,r){switch(n){case"s":return Ln(Kn.second,e);case"so":return r.ordinalNumber(e,{unit:"second"});default:return Nn(n.length,e)}}validate(e,n){return n>=0&&n<=59}set(e,n,r){return e.setSeconds(r,0),e}},dM=class extends on{constructor(){super(...arguments),ot(this,"priority",30),ot(this,"incompatibleTokens",["t","T"])}parse(e,n){const r=f=>Math.trunc(f*Math.pow(10,-n.length+3));return Gn(Nn(n.length,e),r)}set(e,n,r){return e.setMilliseconds(r),e}},fM=class extends on{constructor(){super(...arguments),ot(this,"priority",10),ot(this,"incompatibleTokens",["t","T","x"])}parse(e,n){switch(n){case"X":return to(eo.basicOptionalMinutes,e);case"XX":return to(eo.basic,e);case"XXXX":return to(eo.basicOptionalSeconds,e);case"XXXXX":return to(eo.extendedOptionalSeconds,e);case"XXX":default:return to(eo.extended,e)}}set(e,n,r){return n.timestampIsSet?e:er(e,e.getTime()-gl(e)-r)}},pM=class extends on{constructor(){super(...arguments),ot(this,"priority",10),ot(this,"incompatibleTokens",["t","T","X"])}parse(e,n){switch(n){case"x":return to(eo.basicOptionalMinutes,e);case"xx":return to(eo.basic,e);case"xxxx":return to(eo.basicOptionalSeconds,e);case"xxxxx":return to(eo.extendedOptionalSeconds,e);case"xxx":default:return to(eo.extended,e)}}set(e,n,r){return n.timestampIsSet?e:er(e,e.getTime()-gl(e)-r)}};class gM extends on{constructor(){super(...arguments),ot(this,"priority",40),ot(this,"incompatibleTokens","*")}parse(e){return My(e)}set(e,n,r){return[er(e,r*1e3),{timestampIsSet:!0}]}}let mM=class extends on{constructor(){super(...arguments),ot(this,"priority",20),ot(this,"incompatibleTokens","*")}parse(e){return My(e)}set(e,n,r){return[er(e,r),{timestampIsSet:!0}]}};const vM={G:new D$,y:new N$,Y:new F$,R:new P$,u:new B$,Q:new W$,q:new j$,M:new z$,L:new H$,w:new V$,I:new K$,d:new X$,D:new Q$,E:new Z$,e:new J$,c:new eM,i:new nM,a:new rM,b:new iM,B:new oM,h:new sM,H:new aM,K:new lM,k:new cM,m:new uM,s:new hM,S:new dM,X:new fM,x:new pM,t:new gM,T:new mM},yM=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,bM=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,wM=/^'([^]*?)'?$/,xM=/''/g,CM=/\S/,kM=/[a-zA-Z]/;function _M(t,e,n,r){var f,d,p,b;const h=()=>er(n,NaN),g=cy(),s=g.locale??Bf,a=g.firstWeekContainsDate??((d=(f=g.locale)==null?void 0:f.options)==null?void 0:d.firstWeekContainsDate)??1,c=g.weekStartsOn??((b=(p=g.locale)==null?void 0:p.options)==null?void 0:b.weekStartsOn)??0;if(!e)return t?h():Tn(n,void 0);const l={firstWeekContainsDate:a,weekStartsOn:c,locale:s},o=[new O$(void 0,n)],u=e.match(bM).map(T=>{const k=T[0];if(k in cu){const C=cu[k];return C(T,s.formatLong)}return T}).join("").match(yM),m=[];for(let T of u){Gf(T)&&uu(T,e,t),Kf(T)&&uu(T,e,t);const k=T[0],C=vM[k];if(C){const{incompatibleTokens:L}=C;if(Array.isArray(L)){const F=m.find(I=>L.includes(I.token)||I.token===k);if(F)throw new RangeError(`The format string mustn't contain \`${F.fullToken}\` and \`${T}\` at the same time`)}else if(C.incompatibleTokens==="*"&&m.length>0)throw new RangeError(`The format string mustn't contain \`${T}\` and any other token at the same time`);m.push({token:k,fullToken:T});const R=C.run(t,T,s.match,l);if(!R)return h();o.push(R.setter),t=R.rest}else{if(k.match(kM))throw new RangeError("Format string contains an unescaped latin alphabet character `"+k+"`");if(T==="''"?T="'":k==="'"&&(T=SM(T)),t.indexOf(T)===0)t=t.slice(T.length);else return h()}}if(t.length>0&&CM.test(t))return h();const w=o.map(T=>T.priority).sort((T,k)=>k-T).filter((T,k,C)=>C.indexOf(T)===k).map(T=>o.filter(k=>k.priority===T).sort((k,C)=>C.subPriority-k.subPriority)).map(T=>T[0]);let x=Tn(n,void 0);if(isNaN(+x))return h();const E={};for(const T of w){if(!T.validate(x,l))return h();const k=T.set(x,E,l);Array.isArray(k)?(x=k[0],Object.assign(E,k[1])):x=k}return x}function SM(t){return t.match(wM)[1].replace(xM,"'")}const AM="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=",TM={props:{status:{type:String,required:!0},large:{type:Boolean},small:{type:Boolean},scale:{type:Number}},computed:{icons:function(){return AM},scaleFactor:function(){return this.scale?this.scale:this.large?1:this.small?.3:.5},iconStyle:function(){const t=OM.indexOf(Ry[this.status]),e=1-(t-1)*.05,n=224*this.scaleFactor*e,r=32*this.scaleFactor*e,f=32*this.scaleFactor*e;return[`background-image: url(${this.icons});`,`background-position-x: -${t*f}px;`,`background-size: ${n}px ${r}px;`,`height: ${f}px;`,`width: ${f}px;`,`padding-top: ${t-1}px;`].join("")}}};function $M(t,e,n,r,f,d){return st(),hn("div",{style:is(d.iconStyle)},null,4)}const MM=Ri(TM,[["render",$M]]),EM={props:{icon:{type:String},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{colorStyle:function(){return{"--iconColor":this.color}}}};function IM(t,e,n,r,f,d){const p=Ue("rux-icon");return st(),Xt(p,{size:n.size,icon:n.icon,style:is(d.colorStyle)},null,8,["size","icon","style"])}const LM=Ri(EM,[["render",IM],["__scopeId","data-v-9af48e85"]]),Ry={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"},dd={fatal:"#ff69B4",critical:"#ff3838",serious:"#ffb302",caution:"#fce83a",normal:"#56f000",standby:"#2dccff",off:"#a4abb6"},RM=function(t){const e="#000000",n="#ffffff",r=dd[Ry[t]];if(r){const f=+`0x${r.slice(1,3)}`,d=+`0x${r.slice(3,5)}`,p=+`0x${r.slice(5,7)}`;if((f*299+d*587+p*114)/1e3>128)return e}return n},OM=Object.keys(dd),DM={astro:{component:t=>js(LM,{...t})},"astro-status":{component:t=>js(MM,{...t,status:t.icon})}},NM={extras:{component:t=>js(mw,{...t})}},Oy="single-spa:app-change",FM={data(){return{show:!1}},created(){window.addEventListener(Oy,this.handleAppChange)},mounted(){setTimeout(()=>{this.show=$f().length===0},150)},unmounted(){window.removeEventListener(Oy,this.handleAppChange)},methods:{handleAppChange:function(t){this.show=!t.detail.appsByNewStatus.MOUNTED}}},PM={class:"mx-1"};function BM(t,e,n,r,f,d){const p=Ue("v-card-title"),b=Ue("v-card-text"),h=Ue("v-card");return f.show?(st(),Xt(h,{key:0},{default:Fe(()=>[We(p,null,{default:Fe(()=>e[0]||(e[0]=[Pt(" 404 Not Found ")])),_:1}),We(b,{class:"d-flex align-center mt-3"},{default:Fe(()=>[e[1]||(e[1]=Pt(" The requested URL ")),fr("code",PM,yn(t.$route.fullPath),1),e[2]||(e[2]=Pt(" was not routable. ")),e[3]||(e[3]=fr("span",{class:"text-h3 mx-1"}," 🦄 ",-1))]),_:1})]),_:1})):Ur("",!0)}const WM=Ri(FM,[["render",BM]]),jM={props:{modelValue:Boolean},data(){return{url:"",type:null,response:null,activeDownload:!1,disableSearch:!1,expanded:[]}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}},listData:function(){return this.response?this.type==="github"?this.parseGithub():this.parseRuby():[]}},methods:{parseGithub:function(){const t=/\w+.gem/;return this.response.tree.filter(e=>t.exec(e.path)).map(e=>({name:e.path,url:`https://raw.github.com/OpenC3/openc3-tools/main/${e.path}`}))},getResponse:function(){this.disableSearch=!0,qn.get(this.url).then(t=>{this.response=t.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(t){const e=document.createElement("a");e.href=t.url,e.setAttribute("download",t.name),e.click(),e.remove()}}},zM={class:"pa-3"},HM={class:"px-2"},UM={key:0,class:"mt-4"},VM={key:1,class:"mt-4"};function qM(t,e,n,r,f,d){const p=Ue("v-spacer"),b=Ue("v-toolbar"),h=Ue("v-row"),g=Ue("v-icon"),s=Ue("v-btn"),a=Ue("v-col"),c=Ue("v-list-item-title"),l=Ue("v-progress-circular"),o=Ue("v-list-item"),u=Ue("v-divider"),m=Ue("v-card-text"),w=Ue("v-card"),x=Ue("v-dialog");return st(),Xt(x,{modelValue:d.show,"onUpdate:modelValue":e[0]||(e[0]=E=>d.show=E),width:"600"},{default:Fe(()=>[We(w,null,{default:Fe(()=>[We(b,{height:"24"},{default:Fe(()=>[We(p),e[1]||(e[1]=fr("span",null," Download Gems ",-1)),We(p)]),_:1}),We(m,null,{default:Fe(()=>[fr("div",zM,[We(h,{class:"my-2"},{default:Fe(()=>e[2]||(e[2]=[Pt(" Select a download option ")])),_:1}),We(h,null,{default:Fe(()=>[We(a,null,{default:Fe(()=>[fr("div",HM,[We(s,{block:"","data-test":"searchGithub",color:"primary",disabled:f.disableSearch,onClick:d.searchGithub},{default:Fe(()=>[e[4]||(e[4]=Pt(" Github ")),We(g,{end:"",theme:"dark"},{default:Fe(()=>e[3]||(e[3]=[Pt(" mdi-github ")])),_:1})]),_:1},8,["disabled","onClick"])])]),_:1})]),_:1}),We(h,{class:"mt-5"},{default:Fe(()=>e[5]||(e[5]=[Pt(" Community Gems ")])),_:1}),d.listData.length<1?(st(),hn("div",UM,[We(h,{class:"mx-2"},{default:Fe(()=>e[6]||(e[6]=[fr("span",null," I’m sorry, Dave. No gems available.... ",-1)])),_:1})])):(st(),hn("div",VM,[(st(!0),hn(ri,null,Xi(d.listData,(E,T)=>(st(),hn("div",{key:T},[We(o,null,{default:Fe(()=>[We(c,null,{default:Fe(()=>[Pt(yn(E.name),1)]),_:2},1024),We(o,{icon:""},{default:Fe(()=>[f.activeDownload?(st(),Xt(l,{key:0,indeterminate:"",color:"primary"})):(st(),Xt(s,{key:1,icon:"mdi-cloud-download",variant:"text",disabled:f.activeDownload,onClick:k=>d.downloadGem(E)},null,8,["disabled","onClick"]))]),_:2},1024)]),_:2},1024),T<d.listData.length-1?(st(),Xt(u,{key:T})):Ur("",!0)]))),128))]))])]),_:1})]),_:1})]),_:1},8,["modelValue"])}const RN=sr("h",Ri(jM,[["render",qM]])),KM={props:{modelValue:Boolean,plugin:String,targets:Array,pluginDelete:Boolean},data(){return{modifiedTargets:[],deleteModified:!1}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},created(){for(const t of this.targets)tC.get(`/openc3-api/targets/${t.name}/modified_files`).then(e=>{e.data.length!==0&&this.modifiedTargets.push({name:t.name,files:e.data})})}};function GM(t,e,n,r,f,d){const p=Ue("v-spacer"),b=Ue("v-toolbar"),h=Ue("v-list-item-title"),g=Ue("v-list-item-subtitle"),s=Ue("v-list-item"),a=Ue("v-checkbox"),c=Ue("v-card-text"),l=Ue("v-btn"),o=Ue("v-card-actions"),u=Ue("v-card"),m=Ue("v-dialog");return st(),Xt(m,{modelValue:d.show,"onUpdate:modelValue":e[3]||(e[3]=w=>d.show=w),width:"600"},{default:Fe(()=>[We(u,null,{default:Fe(()=>[We(b,{height:"24"},{default:Fe(()=>[We(p),e[4]||(e[4]=fr("span",null," Modified Plugin ",-1)),We(p)]),_:1}),We(c,{class:"pa-3"},{default:Fe(()=>[fr("div",null," Plugin "+yn(n.plugin)+" was modified. Would you like to delete the existing modified files? ",1),(st(!0),hn(ri,null,Xi(f.modifiedTargets,(w,x)=>(st(),Xt(s,{key:x,lines:"two"},{default:Fe(()=>[We(h,null,{default:Fe(()=>[Pt(yn(w.name),1)]),_:2},1024),(st(!0),hn(ri,null,Xi(w.files,(E,T)=>(st(),Xt(g,{key:T},{default:Fe(()=>[Pt(yn(E),1)]),_:2},1024))),128))]),_:2},1024))),128)),We(a,{modelValue:f.deleteModified,"onUpdate:modelValue":e[0]||(e[0]=w=>f.deleteModified=w),label:"DELETE MODIFIED! THIS CAN NOT BE UNDONE!!!",color:"error","data-test":"modified-plugin-delete-checkbox"},null,8,["modelValue"])]),_:1}),We(o,{class:"px-2"},{default:Fe(()=>[We(p),We(l,{variant:"outlined","data-test":"modified-plugin-cancel",onClick:e[1]||(e[1]=()=>{d.show=!1,t.$emit("cancel")})},{default:Fe(()=>e[5]||(e[5]=[Pt(" Cancel ")])),_:1}),We(l,{variant:"flat","data-test":"modified-plugin-submit",onClick:e[2]||(e[2]=()=>{d.show=!1,t.$emit("submit",f.deleteModified)})},{default:Fe(()=>e[6]||(e[6]=[Pt(" Confirm ")])),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const ON=sr("c",Ri(KM,[["render",GM]])),fd=[{displayName:"Plugins",name:"PluginsTab",path:"plugins",component:()=>it(()=>rt.import("./PluginsTab-BP8DYqd--a1dcf74e4ea1920c64cc.js"),void 0)},{displayName:"Targets",name:"TargetsTab",path:"targets",component:()=>it(()=>rt.import("./TargetsTab-DAmlfJ9Z-985a6f7882eec7083cb2.js"),void 0)},{displayName:"Interfaces",name:"InterfacesTab",path:"interfaces",component:()=>it(()=>rt.import("./InterfacesTab-CVvIDSTG-ee81cdb027c31e89a3a7.js"),void 0)},{displayName:"Routers",name:"RoutersTab",path:"routers",component:()=>it(()=>rt.import("./RoutersTab-CF0ADapt-5c32fb3f63f2b34fd1fd.js"),void 0)},{displayName:"Microservices",name:"MicroservicesTab",path:"microservices",component:()=>it(()=>rt.import("./MicroservicesTab-DlnZ9h0y-b69b8c6b8581408c1a6d.js"),void 0)},{displayName:"Packages",name:"PackagesTab",path:"packages",component:()=>it(()=>rt.import("./PackagesTab-D5hNxd_X-360ace707dedab79d923.js"),void 0)},{displayName:"Tools",name:"ToolsTab",path:"tools",component:()=>it(()=>rt.import("./ToolsTab-CW_TQ53O-afc510a63929f4e2f203.js"),void 0)},{displayName:"Redis",name:"RedisTab",path:"redis",component:()=>it(()=>rt.import("./RedisTab-D1-HQK-m-c71dc435602b87aa013d.js"),void 0)},{displayName:"Secrets",name:"SecretsTab",path:"secrets",component:()=>it(()=>rt.import("./SecretsTab-BAIHxgdM-eba9bde245220082bcfc.js"),void 0)},{displayName:"Settings",name:"SettingsTab",path:"settings",component:()=>it(()=>rt.import("./SettingsTab-C2k0BDcX-e12c074d16d125846514.js"),void 0)}],YM={components:{TopBar:iA},data(){return{title:"Administrator Console",curTab:null}},computed:{tabs:function(){return fd.map(t=>({displayName:t.displayName,path:{name:t.name}}))}}};function XM(t,e,n,r,f,d){const p=Ue("top-bar"),b=Ue("v-tab"),h=Ue("v-tabs"),g=Ue("router-view"),s=Ue("v-card");return st(),hn("div",null,[We(p,{title:f.title},null,8,["title"]),We(s,null,{default:Fe(()=>[We(h,{modelValue:f.curTab,"onUpdate:modelValue":e[0]||(e[0]=a=>f.curTab=a),"fixed-tabs":""},{default:Fe(()=>[(st(!0),hn(ri,null,Xi(d.tabs,(a,c)=>(st(),Xt(b,{key:c,to:a.path},{default:Fe(()=>[Pt(yn(a.displayName),1)]),_:2},1032,["to"]))),128))]),_:1},8,["modelValue"]),We(g)]),_:1})])}const QM=Ri(YM,[["render",XM]]),Pe=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32};Pe.Diff=function(t,e){this[0]=t,this[1]=e},Pe.Diff.prototype.length=2,Pe.Diff.prototype.toString=function(){return this[0]+","+this[1]},Pe.prototype.diff_main=function(t,e,n,r){typeof r>"u"&&(this.Diff_Timeout<=0?r=Number.MAX_VALUE:r=new Date().getTime()+this.Diff_Timeout*1e3);let f=r;if(t==null||e==null)throw new Error("Null input. (diff_main)");if(t==e)return t?[new Pe.Diff(0,t)]:[];typeof n>"u"&&(n=!0);let d=n,p=this.diff_commonPrefix(t,e),b=t.substring(0,p);t=t.substring(p),e=e.substring(p),p=this.diff_commonSuffix(t,e);let h=t.substring(t.length-p);t=t.substring(0,t.length-p),e=e.substring(0,e.length-p);let g=this.diff_compute_(t,e,d,f);return b&&g.unshift(new Pe.Diff(0,b)),h&&g.push(new Pe.Diff(0,h)),this.diff_cleanupMerge(g),g},Pe.prototype.diff_compute_=function(t,e,n,r){let f;if(!t)return[new Pe.Diff(1,e)];if(!e)return[new Pe.Diff(-1,t)];let d=t.length>e.length?t:e,p=t.length>e.length?e:t,b=d.indexOf(p);return b!=-1?(f=[new Pe.Diff(1,d.substring(0,b)),new Pe.Diff(0,p),new Pe.Diff(1,d.substring(b+p.length))],t.length>e.length&&(f[0][0]=f[2][0]=-1),f):p.length==1?[new Pe.Diff(-1,t),new Pe.Diff(1,e)]:n&&t.length>100&&e.length>100?this.diff_lineMode_(t,e,r):this.diff_bisect_(t,e,r)},Pe.prototype.diff_lineMode_=function(t,e,n){let r=this.diff_linesToChars_(t,e);t=r.chars1,e=r.chars2;let f=r.lineArray,d=this.diff_main(t,e,!1,n);this.diff_charsToLines_(d,f),this.diff_cleanupSemantic(d),d.push(new Pe.Diff(0,""));let p=0,b=0,h=0,g="",s="";for(;p<d.length;){switch(d[p][0]){case 1:h++,s+=d[p][1];break;case-1:b++,g+=d[p][1];break;case 0:if(b>=1&&h>=1){d.splice(p-b-h,b+h),p=p-b-h;let a=this.diff_main(g,s,!1,n);for(let c=a.length-1;c>=0;c--)d.splice(p,0,a[c]);p=p+a.length}h=0,b=0,g="",s="";break}p++}return d.pop(),d},Pe.prototype.diff_bisect_=function(t,e,n){let r=t.length,f=e.length,d=Math.ceil((r+f)/2),p=d,b=2*d,h=new Array(b),g=new Array(b);for(let m=0;m<b;m++)h[m]=-1,g[m]=-1;h[p+1]=0,g[p+1]=0;let s=r-f,a=s%2!=0,c=0,l=0,o=0,u=0;for(let m=0;m<d&&!(new Date().getTime()>n);m++){for(let w=-m+c;w<=m-l;w+=2){let x=p+w,E;w==-m||w!=m&&h[x-1]<h[x+1]?E=h[x+1]:E=h[x-1]+1;let T=E-w;for(;E<r&&T<f&&t.charAt(E)==e.charAt(T);)E++,T++;if(h[x]=E,E>r)l+=2;else if(T>f)c+=2;else if(a){let k=p+s-w;if(k>=0&&k<b&&g[k]!=-1){let C=r-g[k];if(E>=C)return this.diff_bisectSplit_(t,e,E,T,n)}}}for(let w=-m+o;w<=m-u;w+=2){let x=p+w,E;w==-m||w!=m&&g[x-1]<g[x+1]?E=g[x+1]:E=g[x-1]+1;let T=E-w;for(;E<r&&T<f&&t.charAt(r-E-1)==e.charAt(f-T-1);)E++,T++;if(g[x]=E,E>r)u+=2;else if(T>f)o+=2;else if(!a){let k=p+s-w;if(k>=0&&k<b&&h[k]!=-1){let C=h[k],L=p+C-k;if(E=r-E,C>=E)return this.diff_bisectSplit_(t,e,C,L,n)}}}}return[new Pe.Diff(-1,t),new Pe.Diff(1,e)]},Pe.prototype.diff_bisectSplit_=function(t,e,n,r,f){let d=t.substring(0,n),p=e.substring(0,r),b=t.substring(n),h=e.substring(r),g=this.diff_main(d,p,!1,f),s=this.diff_main(b,h,!1,f);return g.concat(s)},Pe.prototype.diff_linesToChars_=function(t,e){let n=[],r={};n[0]="";function f(h){let g="",s=0,a=-1,c=n.length;for(;a<h.length-1;){a=h.indexOf(`
1495
1495
  `,s),a==-1&&(a=h.length-1);let l=h.substring(s,a+1);(r.hasOwnProperty?r.hasOwnProperty(l):r[l]!==void 0)?g+=String.fromCharCode(r[l]):(c==d&&(l=h.substring(s),a=h.length),g+=String.fromCharCode(c),r[l]=c,n[c++]=l),s=a+1}return g}let d=4e4,p=f(t);d=65535;let b=f(e);return{chars1:p,chars2:b,lineArray:n}},Pe.prototype.diff_charsToLines_=function(t,e){for(let n=0;n<t.length;n++){let r=t[n][1],f=[];for(let d=0;d<r.length;d++)f[d]=e[r.charCodeAt(d)];t[n][1]=f.join("")}},Pe.prototype.diff_commonPrefix=function(t,e){if(!t||!e||t.charAt(0)!=e.charAt(0))return 0;let n=0,r=Math.min(t.length,e.length),f=r,d=0;for(;n<f;)t.substring(d,f)==e.substring(d,f)?(n=f,d=n):r=f,f=Math.floor((r-n)/2+n);return f},Pe.prototype.diff_commonSuffix=function(t,e){if(!t||!e||t.charAt(t.length-1)!=e.charAt(e.length-1))return 0;let n=0,r=Math.min(t.length,e.length),f=r,d=0;for(;n<f;)t.substring(t.length-f,t.length-d)==e.substring(e.length-f,e.length-d)?(n=f,d=n):r=f,f=Math.floor((r-n)/2+n);return f},Pe.prototype.diff_commonOverlap_=function(t,e){let n=t.length,r=e.length;if(n==0||r==0)return 0;n>r?t=t.substring(n-r):n<r&&(e=e.substring(0,n));let f=Math.min(n,r);if(t==e)return f;let d=0,p=1;for(;;){let b=t.substring(f-p),h=e.indexOf(b);if(h==-1)return d;p+=h,(h==0||t.substring(f-p)==e.substring(0,p))&&(d=p,p++)}},Pe.prototype.diff_halfMatch_=function(t,e){if(this.Diff_Timeout<=0)return null;let n=t.length>e.length?t:e,r=t.length>e.length?e:t;if(n.length<4||r.length*2<n.length)return null;let f=this;function d(o,u,m){let w=o.substring(m,m+Math.floor(o.length/4)),x=-1,E="",T,k,C,L;for(;(x=u.indexOf(w,x+1))!=-1;){let R=f.diff_commonPrefix(o.substring(m),u.substring(x)),F=f.diff_commonSuffix(o.substring(0,m),u.substring(0,x));E.length<F+R&&(E=u.substring(x-F,x)+u.substring(x,x+R),T=o.substring(0,m-F),k=o.substring(m+R),C=u.substring(0,x-F),L=u.substring(x+R))}return E.length*2>=o.length?[T,k,C,L,E]:null}let p=d(n,r,Math.ceil(n.length/4)),b=d(n,r,Math.ceil(n.length/2)),h;if(!p&&!b)return null;b?p?h=p[4].length>b[4].length?p:b:h=b:h=p;let g,s,a,c;t.length>e.length?(g=h[0],s=h[1],a=h[2],c=h[3]):(a=h[0],c=h[1],g=h[2],s=h[3]);let l=h[4];return[g,s,a,c,l]},Pe.prototype.diff_cleanupSemantic=function(t){let e=!1,n=[],r=0,f=null,d=0,p=0,b=0,h=0,g=0;for(;d<t.length;)t[d][0]==0?(n[r++]=d,p=h,b=g,h=0,g=0,f=t[d][1]):(t[d][0]==1?h+=t[d][1].length:g+=t[d][1].length,f&&f.length<=Math.max(p,b)&&f.length<=Math.max(h,g)&&(t.splice(n[r-1],0,new Pe.Diff(-1,f)),t[n[r-1]+1][0]=1,r--,r--,d=r>0?n[r-1]:-1,p=0,b=0,h=0,g=0,f=null,e=!0)),d++;for(e&&this.diff_cleanupMerge(t),this.diff_cleanupSemanticLossless(t),d=1;d<t.length;){if(t[d-1][0]==-1&&t[d][0]==1){let s=t[d-1][1],a=t[d][1],c=this.diff_commonOverlap_(s,a),l=this.diff_commonOverlap_(a,s);c>=l?(c>=s.length/2||c>=a.length/2)&&(t.splice(d,0,new Pe.Diff(0,a.substring(0,c))),t[d-1][1]=s.substring(0,s.length-c),t[d+1][1]=a.substring(c),d++):(l>=s.length/2||l>=a.length/2)&&(t.splice(d,0,new Pe.Diff(0,s.substring(0,l))),t[d-1][0]=1,t[d-1][1]=a.substring(0,a.length-l),t[d+1][0]=-1,t[d+1][1]=s.substring(l),d++),d++}d++}},Pe.prototype.diff_cleanupSemanticLossless=function(t){function e(r,f){if(!r||!f)return 6;let d=r.charAt(r.length-1),p=f.charAt(0),b=d.match(Pe.nonAlphaNumericRegex_),h=p.match(Pe.nonAlphaNumericRegex_),g=b&&d.match(Pe.whitespaceRegex_),s=h&&p.match(Pe.whitespaceRegex_),a=g&&d.match(Pe.linebreakRegex_),c=s&&p.match(Pe.linebreakRegex_),l=a&&r.match(Pe.blanklineEndRegex_),o=c&&f.match(Pe.blanklineStartRegex_);return l||o?5:a||c?4:b&&!g&&s?3:g||s?2:b||h?1:0}let n=1;for(;n<t.length-1;){if(t[n-1][0]==0&&t[n+1][0]==0){let r=t[n-1][1],f=t[n][1],d=t[n+1][1],p=this.diff_commonSuffix(r,f);if(p){r[r.length-p]===`
1496
1496
  `&&(p-=1);let a=f.substring(f.length-p);r=r.substring(0,r.length-p),f=a+f.substring(0,f.length-p),d=a+d}let b=r,h=f,g=d,s=e(r,f)+e(f,d);for(;f.charAt(0)===d.charAt(0);){r+=f.charAt(0),f=f.substring(1)+d.charAt(0),d=d.substring(1);let a=e(r,f)+e(f,d);a>=s&&(s=a,b=r,h=f,g=d)}t[n-1][1]!=b&&(b?t[n-1][1]=b:(t.splice(n-1,1),n--),t[n][1]=h,g?t[n+1][1]=g:(t.splice(n+1,1),n--))}n++}},Pe.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,Pe.whitespaceRegex_=/\s/,Pe.linebreakRegex_=/[\r\n]/,Pe.blanklineEndRegex_=/\n\r?\n$/,Pe.blanklineStartRegex_=/^\r?\n\r?\n/,Pe.prototype.diff_cleanupEfficiency=function(t){let e=!1,n=[],r=0,f=null,d=0,p=!1,b=!1,h=!1,g=!1;for(;d<t.length;)t[d][0]==0?(t[d][1].length<this.Diff_EditCost&&(h||g)?(n[r++]=d,p=h,b=g,f=t[d][1]):(r=0,f=null),h=g=!1):(t[d][0]==-1?g=!0:h=!0,f&&(p&&b&&h&&g||f.length<this.Diff_EditCost/2&&p+b+h+g==3)&&(t.splice(n[r-1],0,new Pe.Diff(-1,f)),t[n[r-1]+1][0]=1,r--,f=null,p&&b?(h=g=!0,r=0):(r--,d=r>0?n[r-1]:-1,h=g=!1),e=!0)),d++;e&&this.diff_cleanupMerge(t)},Pe.prototype.diff_cleanupMerge=function(t){t.push(new Pe.Diff(0,""));let e=0,n=0,r=0,f="",d="",p;for(;e<t.length;)switch(t[e][0]){case 1:r++,d+=t[e][1],e++;break;case-1:n++,f+=t[e][1],e++;break;case 0:n+r>1?(n!==0&&r!==0&&(p=this.diff_commonPrefix(d,f),p!==0&&(e-n-r>0&&t[e-n-r-1][0]==0?t[e-n-r-1][1]+=d.substring(0,p):(t.splice(0,0,new Pe.Diff(0,d.substring(0,p))),e++),d=d.substring(p),f=f.substring(p)),p=this.diff_commonSuffix(d,f),p!==0&&(t[e][1]=d.substring(d.length-p)+t[e][1],d=d.substring(0,d.length-p),f=f.substring(0,f.length-p))),e-=n+r,t.splice(e,n+r),f.length&&(t.splice(e,0,new Pe.Diff(-1,f)),e++),d.length&&(t.splice(e,0,new Pe.Diff(1,d)),e++),e++):e!==0&&t[e-1][0]==0?(t[e-1][1]+=t[e][1],t.splice(e,1)):e++,r=0,n=0,f="",d="";break}t[t.length-1][1]===""&&t.pop();let b=!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),b=!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),b=!0)),e++;b&&this.diff_cleanupMerge(t)},Pe.prototype.diff_cleanupSplitSurrogates=function(t){let e;for(let n=0;n<t.length;n++){let r=t[n],f=r[1][0],d=r[1][r[1].length-1];if(r[1].length===0){t.splice(n--,1);continue}if(d&&this.isHighSurrogate(d)&&(e=d,r[1]=r[1].slice(0,-1)),e&&f&&this.isHighSurrogate(e)&&this.isLowSurrogate(f)&&(r[1]=e+r[1]),r[1].length===0){t.splice(n--,1);continue}}return t},Pe.prototype.isHighSurrogate=function(t){let e=t.charCodeAt(0);return e>=55296&&e<=56319},Pe.prototype.isLowSurrogate=function(t){let e=t.charCodeAt(0);return e>=56320&&e<=57343},Pe.prototype.digit16=function(t){switch(t){case"0":return 0;case"1":return 1;case"2":return 2;case"3":return 3;case"4":return 4;case"5":return 5;case"6":return 6;case"7":return 7;case"8":return 8;case"9":return 9;case"A":case"a":return 10;case"B":case"b":return 11;case"C":case"c":return 12;case"D":case"d":return 13;case"E":case"e":return 14;case"F":case"f":return 15;default:throw new Error("Invalid hex-code")}},Pe.prototype.decodeURI=function(t){try{return decodeURI(t)}catch{let e=0,n="";for(;e<t.length;){if(t[e]!=="%"){n+=t[e++];continue}let r=(this.digit16(t[e+1])<<4)+this.digit16(t[e+2]);if((r&128)===0){n+=String.fromCharCode(r),e+=3;continue}if(t[e+3]!=="%")throw new URIError("URI malformed");let f=(this.digit16(t[e+4])<<4)+this.digit16(t[e+5]);if((f&192)!==128)throw new URIError("URI malformed");if(f=f&63,(r&224)===192){n+=String.fromCharCode((r&31)<<6|f),e+=6;continue}if(t[e+6]!=="%")throw new URIError("URI malformed");let d=(this.digit16(t[e+7])<<4)+this.digit16(t[e+8]);if((d&192)!==128)throw new URIError("URI malformed");if(d=d&63,(r&240)===224){n+=String.fromCharCode((r&15)<<12|f<<6|d),e+=9;continue}if(t[e+9]!=="%")throw new URIError("URI malformed");let p=(this.digit16(t[e+10])<<4)+this.digit16(t[e+11]);if((p&192)!==128)throw new URIError("URI malformed");if(p=p&63,(r&248)===240){let b=(r&7)<<18|f<<12|d<<6|p;if(b>=65536&&b<=1114111){n+=String.fromCharCode((b&65535)>>>10&1023|55296),n+=String.fromCharCode(56320|b&65535&1023),e+=12;continue}}throw new URIError("URI malformed")}return n}},Pe.prototype.diff_xIndex=function(t,e){let n=0,r=0,f=0,d=0,p;for(p=0;p<t.length&&(t[p][0]!==1&&(n+=t[p][1].length),t[p][0]!==-1&&(r+=t[p][1].length),!(n>e));p++)f=n,d=r;return t.length!=p&&t[p][0]===-1?d:d+(e-f)},Pe.prototype.diff_prettyHtml=function(t){t=this.diff_cleanupSplitSurrogates(t);let e=[],n=/&/g,r=/</g,f=/>/g,d=/\n/g;for(let p=0;p<t.length;p++){let b=t[p][0],h=t[p][1].replace(n,"&amp;").replace(r,"&lt;").replace(f,"&gt;").replace(d,"&para;<br>");switch(b){case 1:e[p]='<ins style="background:#e6ffe6;">'+h+"</ins>";break;case-1:e[p]='<del style="background:#ffe6e6;">'+h+"</del>";break;case 0:e[p]="<span>"+h+"</span>";break}}return e.join("")},Pe.prototype.diff_text1=function(t){let e=[];for(let n=0;n<t.length;n++)t[n][0]!==1&&(e[n]=t[n][1]);return e.join("")},Pe.prototype.diff_text2=function(t){let e=[];for(let n=0;n<t.length;n++)t[n][0]!==-1&&(e[n]=t[n][1]);return e.join("")},Pe.prototype.diff_levenshtein=function(t){let e=0,n=0,r=0;for(let f=0;f<t.length;f++){let d=t[f][0],p=t[f][1];switch(d){case 1:n+=p.length;break;case-1:r+=p.length;break;case 0:e+=Math.max(n,r),n=0,r=0;break}}return e+=Math.max(n,r),e},Pe.prototype.diff_toDelta=function(t){t=this.diff_cleanupSplitSurrogates(t);let e=[];for(let n=0;n<t.length;n++)switch(t[n][0]){case 1:e[n]="+"+encodeURI(t[n][1]);break;case-1:e[n]="-"+t[n][1].length;break;case 0:e[n]="="+t[n][1].length;break}return e.join(" ").replace(/%20/g," ")},Pe.prototype.diff_fromDelta=function(t,e){let n=0,r="",f=[],d=0,p=0,b=e.split(/\t/g);for(let h=0;h<b.length;h++){let g=b[h].substring(1);switch(b[h].charAt(0)){case"+":try{f[d++]=new Pe.Diff(1,this.decodeURI(g))}catch{throw new Error("Illegal escape in diff_fromDelta: "+g)}break;case"-":case"=":if(n=parseInt(g,10),isNaN(n)||n<0)throw new Error("Invalid number in diff_fromDelta: "+g);r=t.substring(p,p+=n),b[h].charAt(0)=="="?f[d++]=new Pe.Diff(0,r):f[d++]=new Pe.Diff(-1,r);break;default:if(b[h])throw new Error("Invalid diff operation in diff_fromDelta: "+b[h])}}if(p!=t.length)throw new Error("Delta length ("+p+") does not equal source text length ("+t.length+").");return f},Pe.prototype.match_main=function(t,e,n){if(t==null||e==null||n==null)throw new Error("Null input. (match_main)");return n=Math.max(0,Math.min(n,t.length)),t==e?0:t.length?t.substring(n,n+e.length)==e?n:this.match_bitap_(t,e,n):-1},Pe.prototype.match_bitap_=function(t,e,n){if(e.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");let r=this.match_alphabet_(e),f=this;function d(l,o){let u=l/e.length,m=Math.abs(n-o);return f.Match_Distance?u+m/f.Match_Distance:m?1:u}let p=this.Match_Threshold,b=t.indexOf(e,n);b!=-1&&(p=Math.min(d(0,b),p),b=t.lastIndexOf(e,n+e.length),b!=-1&&(p=Math.min(d(0,b),p)));let h=1<<e.length-1;b=-1;let g,s,a=e.length+t.length,c;for(let l=0;l<e.length;l++){for(g=0,s=a;g<s;)d(l,n+s)<=p?g=s:a=s,s=Math.floor((a-g)/2+g);a=s;let o=Math.max(1,n-s+1),u=Math.min(n+s,t.length)+e.length,m=Array(u+2);m[u+1]=(1<<l)-1;for(let w=u;w>=o;w--){let x=r[t.charAt(w-1)];if(l===0?m[w]=(m[w+1]<<1|1)&x:m[w]=(m[w+1]<<1|1)&x|((c[w+1]|c[w])<<1|1)|c[w+1],m[w]&h){let E=d(l,w-1);if(E<=p)if(p=E,b=w-1,b>n)o=Math.max(1,2*n-b);else break}}if(d(l+1,n)>p)break;c=m}return b},Pe.prototype.match_alphabet_=function(t){let e={};for(let n=0;n<t.length;n++)e[t.charAt(n)]=0;for(let n=0;n<t.length;n++)e[t.charAt(n)]|=1<<t.length-n-1;return e},Pe.prototype.patch_addContext_=function(t,e){if(e.length==0)return;if(t.start2===null)throw Error("patch not initialized");let n=e.substring(t.start2,t.start2+t.length1),r=0;for(;e.indexOf(n)!=e.lastIndexOf(n)&&n.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)r+=this.Patch_Margin,n=e.substring(t.start2-r,t.start2+t.length1+r);r+=this.Patch_Margin,t.start2-r>0&&Pe.prototype.isLowSurrogate(e[t.start2-r])&&r++;let f=e.substring(t.start2-r,t.start2);f&&t.diffs.unshift(new Pe.Diff(0,f)),t.start2+t.length1+r<e.length&&Pe.prototype.isHighSurrogate(e[t.start2+t.length1+r])&&r++;let d=e.substring(t.start2+t.length1,t.start2+t.length1+r);d&&t.diffs.push(new Pe.Diff(0,d)),t.start1-=f.length,t.start2-=f.length,t.length1+=f.length+d.length,t.length2+=f.length+d.length},Pe.prototype.patch_make=function(t,e,n){let r,f;if(typeof t=="string"&&typeof e=="string"&&typeof n>"u")r=t,f=this.diff_main(r,e,!0),f.length>2&&(this.diff_cleanupSemantic(f),this.diff_cleanupEfficiency(f));else if(t&&typeof t=="object"&&typeof e>"u"&&typeof n>"u")f=t,r=this.diff_text1(f);else if(typeof t=="string"&&e&&typeof e=="object"&&typeof n>"u")r=t,f=e;else if(typeof t=="string"&&typeof e=="string"&&n&&typeof n=="object")r=t,f=n;else throw new Error("Unknown call format to patch_make.");if(f.length===0)return[];f=this.diff_cleanupSplitSurrogates(f);let d=[],p=new Pe.patch_obj,b=0,h=0,g=0,s=r,a=r;for(let c=0;c<f.length;c++){let l=f[c][0],o=f[c][1];switch(!b&&l!==0&&(p.start1=h,p.start2=g),l){case 1:p.diffs[b++]=f[c],p.length2+=o.length,a=a.substring(0,g)+o+a.substring(g);break;case-1:p.length1+=o.length,p.diffs[b++]=f[c],a=a.substring(0,g)+a.substring(g+o.length);break;case 0:o.length<=2*this.Patch_Margin&&b&&f.length!=c+1?(p.diffs[b++]=f[c],p.length1+=o.length,p.length2+=o.length):o.length>=2*this.Patch_Margin&&b&&(this.patch_addContext_(p,s),d.push(p),p=new Pe.patch_obj,b=0,s=a,h=g);break}l!==1&&(h+=o.length),l!==-1&&(g+=o.length)}return b&&(this.patch_addContext_(p,s),d.push(p)),d},Pe.prototype.patch_deepCopy=function(t){let e=[];for(let n=0;n<t.length;n++){let r=t[n],f=new Pe.patch_obj;f.diffs=[];for(let d=0;d<r.diffs.length;d++)f.diffs[d]=new Pe.Diff(r.diffs[d][0],r.diffs[d][1]);f.start1=r.start1,f.start2=r.start2,f.length1=r.length1,f.length2=r.length2,e[n]=f}return e},Pe.prototype.patch_apply=function(t,e){if(t.length==0)return[e,[]];t=this.patch_deepCopy(t);let n=this.patch_addPadding(t);e=n+e+n,this.patch_splitMax(t);let r=0,f=[];for(let d=0;d<t.length;d++){let p=t[d].start2+r,b=this.diff_text1(t[d].diffs),h,g=-1;if(b.length>this.Match_MaxBits?(h=this.match_main(e,b.substring(0,this.Match_MaxBits),p),h!=-1&&(g=this.match_main(e,b.substring(b.length-this.Match_MaxBits),p+b.length-this.Match_MaxBits),(g==-1||h>=g)&&(h=-1))):h=this.match_main(e,b,p),h==-1)f[d]=!1,r-=t[d].length2-t[d].length1;else{f[d]=!0,r=h-p;let s;if(g==-1?s=e.substring(h,h+b.length):s=e.substring(h,g+this.Match_MaxBits),b==s)e=e.substring(0,h)+this.diff_text2(t[d].diffs)+e.substring(h+b.length);else{let a=this.diff_main(b,s,!1);if(b.length>this.Match_MaxBits&&this.diff_levenshtein(a)/b.length>this.Patch_DeleteThreshold)f[d]=!1;else{this.diff_cleanupSemanticLossless(a);let c=0,l;for(let o=0;o<t[d].diffs.length;o++){let u=t[d].diffs[o];u[0]!==0&&(l=this.diff_xIndex(a,c)),u[0]===1?e=e.substring(0,h+l)+u[1]+e.substring(h+l):u[0]===-1&&(e=e.substring(0,h+l)+e.substring(h+this.diff_xIndex(a,c+u[1].length))),u[0]!==-1&&(c+=u[1].length)}}}}}return e=e.substring(n.length,e.length-n.length),[e,f]},Pe.prototype.patch_addPadding=function(t){let e=this.Patch_Margin,n="";for(let d=1;d<=e;d++)n+=String.fromCharCode(d);for(let d=0;d<t.length;d++)t[d].start1+=e,t[d].start2+=e;let r=t[0],f=r.diffs;if(f.length==0||f[0][0]!=0)f.unshift(new Pe.Diff(0,n)),r.start1-=e,r.start2-=e,r.length1+=e,r.length2+=e;else if(e>f[0][1].length){let d=e-f[0][1].length;f[0][1]=n.substring(f[0][1].length)+f[0][1],r.start1-=d,r.start2-=d,r.length1+=d,r.length2+=d}if(r=t[t.length-1],f=r.diffs,f.length==0||f[f.length-1][0]!=0)f.push(new Pe.Diff(0,n)),r.length1+=e,r.length2+=e;else if(e>f[f.length-1][1].length){let d=e-f[f.length-1][1].length;f[f.length-1][1]+=n.substring(0,d),r.length1+=d,r.length2+=d}return n},Pe.prototype.patch_splitMax=function(t){let e=this.Match_MaxBits;for(let n=0;n<t.length;n++){if(t[n].length1<=e)continue;let r=t[n];t.splice(n--,1);let f=r.start1,d=r.start2,p="";for(;r.diffs.length!==0;){let b=new Pe.patch_obj,h=!0;for(b.start1=f-p.length,b.start2=d-p.length,p!==""&&(b.length1=b.length2=p.length,b.diffs.push(new Pe.Diff(0,p)));r.diffs.length!==0&&b.length1<e-this.Patch_Margin;){let s=r.diffs[0][0],a=r.diffs[0][1];s===1?(b.length2+=a.length,d+=a.length,b.diffs.push(r.diffs.shift()),h=!1):s===-1&&b.diffs.length==1&&b.diffs[0][0]==0&&a.length>2*e?(b.length1+=a.length,f+=a.length,h=!1,b.diffs.push(new Pe.Diff(s,a)),r.diffs.shift()):(a=a.substring(0,e-b.length1-this.Patch_Margin),b.length1+=a.length,f+=a.length,s===0?(b.length2+=a.length,d+=a.length):h=!1,b.diffs.push(new Pe.Diff(s,a)),a==r.diffs[0][1]?r.diffs.shift():r.diffs[0][1]=r.diffs[0][1].substring(a.length))}p=this.diff_text2(b.diffs),p=p.substring(p.length-this.Patch_Margin);let g=this.diff_text1(r.diffs).substring(0,this.Patch_Margin);g!==""&&(b.length1+=g.length,b.length2+=g.length,b.diffs.length!==0&&b.diffs[b.diffs.length-1][0]===0?b.diffs[b.diffs.length-1][1]+=g:b.diffs.push(new Pe.Diff(0,g))),h||t.splice(++n,0,b)}}},Pe.prototype.patch_toText=function(t){let e=[];for(let n=0;n<t.length;n++)e[n]=t[n];return e.join("")},Pe.prototype.patch_fromText=function(t){let e=[];if(!t)return e;let n=t.split(`
1497
1497
  `),r=0,f=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;for(;r<n.length;){let d=n[r].match(f);if(!d)throw new Error("Invalid patch string: "+n[r]);let p=new Pe.patch_obj;for(e.push(p),p.start1=parseInt(d[1],10),d[2]===""?(p.start1--,p.length1=1):d[2]=="0"?p.length1=0:(p.start1--,p.length1=parseInt(d[2],10)),p.start2=parseInt(d[3],10),d[4]===""?(p.start2--,p.length2=1):d[4]=="0"?p.length2=0:(p.start2--,p.length2=parseInt(d[4],10)),r++;r<n.length;){let b=n[r].charAt(0),h="";try{h=decodeURI(n[r].substring(1))}catch{throw new Error("Illegal escape in patch_fromText: "+h)}if(b=="-")p.diffs.push(new Pe.Diff(-1,h));else if(b=="+")p.diffs.push(new Pe.Diff(1,h));else if(b==" ")p.diffs.push(new Pe.Diff(0,h));else{if(b=="@")break;if(b!=="")throw new Error('Invalid patch mode "'+b+'" in: '+h)}r++}}return e},Pe.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0},Pe.patch_obj.prototype.toString=function(){let t,e;this.length1===0?t=this.start1+",0":this.length1==1?t=this.start1+1:t=this.start1+1+","+this.length1,this.length2===0?e=this.start2+",0":this.length2==1?e=this.start2+1:e=this.start2+1+","+this.length2;let n=["@@ -"+t+" +"+e+` @@
1498
1498
  `],r;Pe.prototype.diff_cleanupSplitSurrogates(this.diffs);for(let f=0;f<this.diffs.length;f++){switch(this.diffs[f][0]){case 1:r="+";break;case-1:r="-";break;case 0:r=" ";break}n[f+1]=r+encodeURI(this.diffs[f][1])+`
1499
- `}return n.join("").replace(/%20/g," ")};function mc(t){return t&&typeof t=="object"&&!Array.isArray(t)&&t!==null}function pd(t,e){return mc(t)&&mc(e)&&Object.keys(e).forEach(n=>{n==="__proto__"||n==="constructor"||(mc(e[n])?((!t[n]||!mc(t[n]))&&(t[n]=e[n]),pd(t[n],e[n])):Object.assign(t,{[n]:e[n]}))}),t}function Dy(t,e,n=!1){let r=null,f=!0;return(...d)=>{const p=n&&f,b=()=>{t.apply(this,d),r=null};p&&(f=!1,b()),r||(r=setTimeout(b,e))}}function ZM(t,e){let n;return(...r)=>{const f=this;clearTimeout(n),n=setTimeout(()=>t.apply(f,r),e)}}function Ny(t=""){return t.replace(/\r\n/g,`
1500
- `)}function Fy(t,e,n,r){const f=n-t,d=t+f/2;return`M ${t} ${e} C ${d},${e} ${d},${r} ${n},${r}`}const yn={DIFF_EQUAL:0,DIFF_DELETE:-1,DIFF_INSERT:1,EDITOR_RIGHT:"right",EDITOR_LEFT:"left",RTL:"rtl",LTR:"ltr",SVG_NS:"http://www.w3.org/2000/svg",DIFF_GRANULARITY_SPECIFIC:"specific",DIFF_GRANULARITY_BROAD:"broad"};function Py(t,e){let{mode:n}=t.options;return e===yn.EDITOR_LEFT&&t.options.left.mode!==null&&(n=t.options.left.mode),e===yn.EDITOR_RIGHT&&t.options.right.mode!==null&&(n=t.options.right.mode),n}function By(t,e){let{theme:n}=t.options;return e===yn.EDITOR_LEFT&&t.options.left.theme!==null&&(n=t.options.left.theme),e===yn.EDITOR_RIGHT&&t.options.right.theme!==null&&(n=t.options.right.theme),n}function Wy(t,e){return t.ace.getSession().doc.getLine(e)}function JM(t){return document.getElementById(t.options.left.id).offsetHeight}function jy(t){const e=document.createElement("div"),n={class:t.className,style:`top:${t.topOffset}px`,title:t.tooltip,"data-diff-index":t.diffIndex};for(const r in n)e.setAttribute(r,n[r]);return e.innerHTML=t.arrowContent,e}function gd(t,e){const n=Math.random().toString(36).substr(2,5),r=`js-${e}-${n}`,f=t.querySelector(`.${e}`);if(f)return f.id=f.id||r,f.id;const d=document.createElement("div");return t.appendChild(d),d.className=e,d.id=r,d.id}function zy(t,e,n,r){const f=t==="document"?document:document.querySelector(t);f.addEventListener(e,d=>{const p=f.querySelectorAll(n),{target:b}=d;for(let h=0,g=p.length;h<g;h+=1){let s=b;const a=p[h];for(;s&&s!==f;)s===a&&r.call(a,d),s=s.parentNode}})}let vc;function eE(t){if(t.Range)return t.Range;const e=t.acequire||t.require;return e?e("ace/range"):!1}function yc(t={}){if(!(this instanceof yc))return new yc(t);const e=this,n=()=>window?window.ace:void 0;e.options=pd({ace:n(),mode:null,theme:null,element:null,diffGranularity:yn.DIFF_GRANULARITY_BROAD,lockScrolling:!1,showDiffs:!0,showConnectors:!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",connector:"acediff__connector",newCodeConnectorLink:"acediff__newCodeConnector",newCodeConnectorLinkContent:"&#8594;",deletedCodeConnectorLink:"acediff__deletedCodeConnector",deletedCodeConnectorLinkContent:"&#8592;",copyRightContainer:"acediff__copy--right",copyLeftContainer:"acediff__copy--left"},connectorYOffset:0},t);const{ace:r}=e.options;if(!r){const f="No ace editor found nor supplied - `options.ace` or `window.ace` is missing";return console.error(f),new Error(f)}if(vc=eE(r),!vc){const f="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";return console.error(f),new Error(f)}if(e.options.element===null){const f="You need to specify an element for Ace-diff - `options.element` is missing";return console.error(f),new Error(f)}if(e.options.element instanceof HTMLElement?e.el=e.options.element:e.el=document.body.querySelector(e.options.element),!e.el){const f=`Can't find the specified element ${e.options.element}`;return console.error(f),new Error(f)}e.options.left.id=gd(e.el,"acediff__left"),e.options.classes.gutterID=gd(e.el,"acediff__gutter"),e.options.right.id=gd(e.el,"acediff__right"),e.el.innerHTML=`<div class="acediff__wrap">${e.el.innerHTML}</div>`,e.editors={left:{ace:r.edit(e.options.left.id),markers:[],lineLengths:[]},right:{ace:r.edit(e.options.right.id),markers:[],lineLengths:[]},editorHeight:null},e.editors.left.ace.getSession().setMode(Py(e,yn.EDITOR_LEFT)),e.editors.right.ace.getSession().setMode(Py(e,yn.EDITOR_RIGHT)),e.editors.left.ace.setReadOnly(!e.options.left.editable),e.editors.right.ace.setReadOnly(!e.options.right.editable),e.editors.left.ace.setTheme(By(e,yn.EDITOR_LEFT)),e.editors.right.ace.setTheme(By(e,yn.EDITOR_RIGHT)),e.editors.left.ace.setValue(Ny(e.options.left.content),-1),e.editors.right.ace.setValue(Ny(e.options.right.content),-1),e.editors.editorHeight=JM(e),setTimeout(()=>{e.lineHeight=e.editors.left.ace.renderer.lineHeight,tE(e),oE(e),Zy(e),e.diff()},1)}yc.prototype={setOptions(t){pd(this.options,t),this.diff()},getNumDiffs(){return this.diffs.length},getEditors(){return{left:this.editors.left.ace,right:this.editors.right.ace}},diff(){const t=new Pe,e=this.editors.left.ace.getSession().getValue(),n=this.editors.right.ace.getSession().getValue(),r=t.diff_main(n,e);t.diff_cleanupSemantic(r),this.editors.left.lineLengths=Vy(this.editors.left),this.editors.right.lineLengths=Vy(this.editors.right);const f=[],d={left:0,right:0};r.forEach(p=>{const b=p[0];let h=p[1];h.length!==0&&(b===yn.DIFF_EQUAL?(d.left+=h.length,d.right+=h.length):b===yn.DIFF_DELETE?(f.push(Yy(this,yn.DIFF_DELETE,d.left,d.right,h)),d.right+=h.length):b===yn.DIFF_INSERT&&(f.push(Yy(this,yn.DIFF_INSERT,d.left,d.right,h)),d.left+=h.length))},this),this.diffs=lE(this,f),!(this.diffs.length>this.options.maxDiffs)&&(Gy(this),e0(this))},destroy(){const t=this.editors.left.ace.getValue();this.editors.left.ace.destroy();let e=this.editors.left.ace.container,n=e.cloneNode(!1);n.textContent=t,e.parentNode.replaceChild(n,e);const r=this.editors.right.ace.getValue();this.editors.right.ace.destroy(),e=this.editors.right.ace.container,n=e.cloneNode(!1),n.textContent=r,e.parentNode.replaceChild(n,e),document.getElementById(this.options.classes.gutterID).innerHTML="",Hy()}};let Hy=()=>{};function tE(t){t.editors.left.ace.getSession().on("changeScrollTop",Dy(()=>{Ky(t)},16)),t.editors.right.ace.getSession().on("changeScrollTop",Dy(()=>{Ky(t)},16));const e=t.diff.bind(t);t.editors.left.ace.on("change",e),t.editors.right.ace.on("change",e),t.options.left.copyLinkEnabled&&zy(`#${t.options.classes.gutterID}`,"click",`.${t.options.classes.newCodeConnectorLink}`,r=>{Uy(t,r,yn.LTR)}),t.options.right.copyLinkEnabled&&zy(`#${t.options.classes.gutterID}`,"click",`.${t.options.classes.deletedCodeConnectorLink}`,r=>{Uy(t,r,yn.RTL)});const n=ZM(()=>{t.editors.availableHeight=document.getElementById(t.options.left.id).offsetHeight,t.diff()},250);window.addEventListener("resize",n),Hy=()=>{window.removeEventListener("resize",n)}}function Uy(t,e,n){const r=parseInt(e.target.getAttribute("data-diff-index"),10),f=t.diffs[r];let d,p,b,h,g,s;n===yn.LTR?(d=t.editors.left,p=t.editors.right,b=f.leftStartLine,h=f.leftEndLine,g=f.rightStartLine,s=f.rightEndLine):(d=t.editors.right,p=t.editors.left,b=f.rightStartLine,h=f.rightEndLine,g=f.leftStartLine,s=f.leftEndLine);let a="";for(let l=b;l<h;l+=1)a+=Wy(d,l),l===b&&a===""&&g!=0&&(a+=`
1499
+ `}return n.join("").replace(/%20/g," ")};function vc(t){return t&&typeof t=="object"&&!Array.isArray(t)&&t!==null}function pd(t,e){return vc(t)&&vc(e)&&Object.keys(e).forEach(n=>{n==="__proto__"||n==="constructor"||(vc(e[n])?((!t[n]||!vc(t[n]))&&(t[n]=e[n]),pd(t[n],e[n])):Object.assign(t,{[n]:e[n]}))}),t}function Dy(t,e,n=!1){let r=null,f=!0;return(...d)=>{const p=n&&f,b=()=>{t.apply(this,d),r=null};p&&(f=!1,b()),r||(r=setTimeout(b,e))}}function ZM(t,e){let n;return(...r)=>{const f=this;clearTimeout(n),n=setTimeout(()=>t.apply(f,r),e)}}function Ny(t=""){return t.replace(/\r\n/g,`
1500
+ `)}function Fy(t,e,n,r){const f=n-t,d=t+f/2;return`M ${t} ${e} C ${d},${e} ${d},${r} ${n},${r}`}const bn={DIFF_EQUAL:0,DIFF_DELETE:-1,DIFF_INSERT:1,EDITOR_RIGHT:"right",EDITOR_LEFT:"left",RTL:"rtl",LTR:"ltr",SVG_NS:"http://www.w3.org/2000/svg",DIFF_GRANULARITY_SPECIFIC:"specific",DIFF_GRANULARITY_BROAD:"broad"};function Py(t,e){let{mode:n}=t.options;return e===bn.EDITOR_LEFT&&t.options.left.mode!==null&&(n=t.options.left.mode),e===bn.EDITOR_RIGHT&&t.options.right.mode!==null&&(n=t.options.right.mode),n}function By(t,e){let{theme:n}=t.options;return e===bn.EDITOR_LEFT&&t.options.left.theme!==null&&(n=t.options.left.theme),e===bn.EDITOR_RIGHT&&t.options.right.theme!==null&&(n=t.options.right.theme),n}function Wy(t,e){return t.ace.getSession().doc.getLine(e)}function JM(t){return document.getElementById(t.options.left.id).offsetHeight}function jy(t){const e=document.createElement("div"),n={class:t.className,style:`top:${t.topOffset}px`,title:t.tooltip,"data-diff-index":t.diffIndex};for(const r in n)e.setAttribute(r,n[r]);return e.innerHTML=t.arrowContent,e}function gd(t,e){const n=Math.random().toString(36).substr(2,5),r=`js-${e}-${n}`,f=t.querySelector(`.${e}`);if(f)return f.id=f.id||r,f.id;const d=document.createElement("div");return t.appendChild(d),d.className=e,d.id=r,d.id}function zy(t,e,n,r){const f=t==="document"?document:document.querySelector(t);f.addEventListener(e,d=>{const p=f.querySelectorAll(n),{target:b}=d;for(let h=0,g=p.length;h<g;h+=1){let s=b;const a=p[h];for(;s&&s!==f;)s===a&&r.call(a,d),s=s.parentNode}})}let yc;function eE(t){if(t.Range)return t.Range;const e=t.acequire||t.require;return e?e("ace/range"):!1}function bc(t={}){if(!(this instanceof bc))return new bc(t);const e=this,n=()=>window?window.ace:void 0;e.options=pd({ace:n(),mode:null,theme:null,element:null,diffGranularity:bn.DIFF_GRANULARITY_BROAD,lockScrolling:!1,showDiffs:!0,showConnectors:!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",connector:"acediff__connector",newCodeConnectorLink:"acediff__newCodeConnector",newCodeConnectorLinkContent:"&#8594;",deletedCodeConnectorLink:"acediff__deletedCodeConnector",deletedCodeConnectorLinkContent:"&#8592;",copyRightContainer:"acediff__copy--right",copyLeftContainer:"acediff__copy--left"},connectorYOffset:0},t);const{ace:r}=e.options;if(!r){const f="No ace editor found nor supplied - `options.ace` or `window.ace` is missing";return console.error(f),new Error(f)}if(yc=eE(r),!yc){const f="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";return console.error(f),new Error(f)}if(e.options.element===null){const f="You need to specify an element for Ace-diff - `options.element` is missing";return console.error(f),new Error(f)}if(e.options.element instanceof HTMLElement?e.el=e.options.element:e.el=document.body.querySelector(e.options.element),!e.el){const f=`Can't find the specified element ${e.options.element}`;return console.error(f),new Error(f)}e.options.left.id=gd(e.el,"acediff__left"),e.options.classes.gutterID=gd(e.el,"acediff__gutter"),e.options.right.id=gd(e.el,"acediff__right"),e.el.innerHTML=`<div class="acediff__wrap">${e.el.innerHTML}</div>`,e.editors={left:{ace:r.edit(e.options.left.id),markers:[],lineLengths:[]},right:{ace:r.edit(e.options.right.id),markers:[],lineLengths:[]},editorHeight:null},e.editors.left.ace.getSession().setMode(Py(e,bn.EDITOR_LEFT)),e.editors.right.ace.getSession().setMode(Py(e,bn.EDITOR_RIGHT)),e.editors.left.ace.setReadOnly(!e.options.left.editable),e.editors.right.ace.setReadOnly(!e.options.right.editable),e.editors.left.ace.setTheme(By(e,bn.EDITOR_LEFT)),e.editors.right.ace.setTheme(By(e,bn.EDITOR_RIGHT)),e.editors.left.ace.setValue(Ny(e.options.left.content),-1),e.editors.right.ace.setValue(Ny(e.options.right.content),-1),e.editors.editorHeight=JM(e),setTimeout(()=>{e.lineHeight=e.editors.left.ace.renderer.lineHeight,tE(e),oE(e),Zy(e),e.diff()},1)}bc.prototype={setOptions(t){pd(this.options,t),this.diff()},getNumDiffs(){return this.diffs.length},getEditors(){return{left:this.editors.left.ace,right:this.editors.right.ace}},diff(){const t=new Pe,e=this.editors.left.ace.getSession().getValue(),n=this.editors.right.ace.getSession().getValue(),r=t.diff_main(n,e);t.diff_cleanupSemantic(r),this.editors.left.lineLengths=Vy(this.editors.left),this.editors.right.lineLengths=Vy(this.editors.right);const f=[],d={left:0,right:0};r.forEach(p=>{const b=p[0];let h=p[1];h.length!==0&&(b===bn.DIFF_EQUAL?(d.left+=h.length,d.right+=h.length):b===bn.DIFF_DELETE?(f.push(Yy(this,bn.DIFF_DELETE,d.left,d.right,h)),d.right+=h.length):b===bn.DIFF_INSERT&&(f.push(Yy(this,bn.DIFF_INSERT,d.left,d.right,h)),d.left+=h.length))},this),this.diffs=lE(this,f),!(this.diffs.length>this.options.maxDiffs)&&(Gy(this),e0(this))},destroy(){const t=this.editors.left.ace.getValue();this.editors.left.ace.destroy();let e=this.editors.left.ace.container,n=e.cloneNode(!1);n.textContent=t,e.parentNode.replaceChild(n,e);const r=this.editors.right.ace.getValue();this.editors.right.ace.destroy(),e=this.editors.right.ace.container,n=e.cloneNode(!1),n.textContent=r,e.parentNode.replaceChild(n,e),document.getElementById(this.options.classes.gutterID).innerHTML="",Hy()}};let Hy=()=>{};function tE(t){t.editors.left.ace.getSession().on("changeScrollTop",Dy(()=>{Ky(t)},16)),t.editors.right.ace.getSession().on("changeScrollTop",Dy(()=>{Ky(t)},16));const e=t.diff.bind(t);t.editors.left.ace.on("change",e),t.editors.right.ace.on("change",e),t.options.left.copyLinkEnabled&&zy(`#${t.options.classes.gutterID}`,"click",`.${t.options.classes.newCodeConnectorLink}`,r=>{Uy(t,r,bn.LTR)}),t.options.right.copyLinkEnabled&&zy(`#${t.options.classes.gutterID}`,"click",`.${t.options.classes.deletedCodeConnectorLink}`,r=>{Uy(t,r,bn.RTL)});const n=ZM(()=>{t.editors.availableHeight=document.getElementById(t.options.left.id).offsetHeight,t.diff()},250);window.addEventListener("resize",n),Hy=()=>{window.removeEventListener("resize",n)}}function Uy(t,e,n){const r=parseInt(e.target.getAttribute("data-diff-index"),10),f=t.diffs[r];let d,p,b,h,g,s;n===bn.LTR?(d=t.editors.left,p=t.editors.right,b=f.leftStartLine,h=f.leftEndLine,g=f.rightStartLine,s=f.rightEndLine):(d=t.editors.right,p=t.editors.left,b=f.rightStartLine,h=f.rightEndLine,g=f.leftStartLine,s=f.leftEndLine);let a="";for(let l=b;l<h;l+=1)a+=Wy(d,l),l===b&&a===""&&g!=0&&(a+=`
1501
1501
  `),l<d.ace.getSession().getLength()-1&&(a+=`
1502
- `);const c=p.ace.getSession().getScrollTop();p.ace.getSession().replace(new vc(g,0,s,0),a),p.ace.getSession().setScrollTop(parseInt(c,10)),t.diff()}function Vy(t){const e=t.ace.getSession().doc.getAllLines(),n=[];return e.forEach(r=>{n.push(r.length+1)}),n}function qy(t,e,n,r,f){const d=t.editors[e];r<n&&(r=n);const p=`${f} ${r>n?"lines":"targetOnly"}`;r>n&&(r-=1),d.markers.push(d.ace.session.addMarker(new vc(n,0,r,1),p,"fullLine"))}function Ky(t){Gy(t),e0(t),iE(t)}function Gy(t){t.editors.left.markers.forEach(e=>{t.editors.left.ace.getSession().removeMarker(e)},t),t.editors.right.markers.forEach(e=>{t.editors.right.ace.getSession().removeMarker(e)},t)}function nE(t,e,n,r,f){const d=t.editors.left.ace.getSession().getScrollTop(),p=t.editors.right.ace.getSession().getScrollTop();t.connectorYOffset=1;const b=-1,h=e*t.lineHeight-d+.5,g=t.gutterWidth+1,s=r*t.lineHeight-p+.5,a=-1,c=n*t.lineHeight-d+t.connectorYOffset+.5,l=t.gutterWidth+1,o=f*t.lineHeight-p+t.connectorYOffset+.5,u=Fy(b,h,g,s),m=Fy(l,o,a,c),w=`L${g},${s} ${l},${o}`,x=`L${a},${c} ${b},${h}`,E=`${u} ${w} ${m} ${x}`,T=document.createElementNS(yn.SVG_NS,"path");T.setAttribute("d",E),T.setAttribute("class",t.options.classes.connector),t.gutterSVG.appendChild(T)}function rE(t,e,n){if(e.leftEndLine>e.leftStartLine&&t.options.left.copyLinkEnabled){const r=jy({className:t.options.classes.newCodeConnectorLink,topOffset:e.leftStartLine*t.lineHeight,tooltip:"Copy to right",diffIndex:n,arrowContent:t.options.classes.newCodeConnectorLinkContent});t.copyRightContainer.appendChild(r)}if(e.rightEndLine>e.rightStartLine&&t.options.right.copyLinkEnabled){const r=jy({className:t.options.classes.deletedCodeConnectorLink,topOffset:e.rightStartLine*t.lineHeight,tooltip:"Copy to left",diffIndex:n,arrowContent:t.options.classes.deletedCodeConnectorLinkContent});t.copyLeftContainer.appendChild(r)}}function iE(t){const e=t.editors.left.ace.getSession().getScrollTop(),n=t.editors.right.ace.getSession().getScrollTop();t.copyRightContainer.style.cssText=`top: ${-e}px`,t.copyLeftContainer.style.cssText=`top: ${-n}px`}function Yy(t,e,n,r,f){let d={};if(e===yn.DIFF_INSERT){let p=Xy(t.editors.left,n,f),b=Qy(t.editors.right,r),h=qa(t.editors.right,b);const g=qa(t.editors.left,p.startLine);let s=b,a=p.startLine===p.endLine,c=0;(p.startChar>0||a&&f.length<g)&&h>0&&p.startChar<g&&c++,d={leftStartLine:p.startLine,leftEndLine:p.endLine+1,rightStartLine:s,rightEndLine:s+c}}else{let p=Xy(t.editors.right,r,f),b=Qy(t.editors.left,n),h=qa(t.editors.left,b);const g=qa(t.editors.right,p.startLine);let s=b,a=p.startLine===p.endLine,c=0;(p.startChar>0||a&&f.length<g)&&h>0&&p.startChar<g&&c++,d={leftStartLine:s,leftEndLine:s+c,rightStartLine:p.startLine,rightEndLine:p.endLine+1}}return d}function Xy(t,e,n){const r={startLine:0,startChar:0,endLine:0,endChar:0},f=e+n.length;let d=0,p=!1,b=!1;t.lineLengths.forEach((g,s)=>{d+=g,!p&&e<d&&(r.startLine=s,r.startChar=e-d+g,p=!0),!b&&f<=d&&(r.endLine=s,r.endChar=f-d+g,b=!0)}),r.startChar>0&&qa(t,r.startLine)===r.startChar&&(r.startLine++,r.startChar=0),r.endChar===0&&r.endLine--;const h=/\n$/.test(n);return r.startChar>0&&h&&r.endLine++,r}function qa(t,e){return Wy(t,e).length}function Qy(t,e){const n=t.ace.getSession().doc.getAllLines();let r=0,f=0;for(let d=0;d<n.length;d+=1)if(f+=n[d].length+1,e<f){r=d;break}return f>t.ace.getSession().getValue().length&&(r+=1),r}function Zy(t){t.gutterHeight=document.getElementById(t.options.classes.gutterID).clientHeight,t.gutterWidth=document.getElementById(t.options.classes.gutterID).clientWidth;const e=Jy(t,yn.EDITOR_LEFT),n=Jy(t,yn.EDITOR_RIGHT),r=Math.max(e,n,t.gutterHeight);t.gutterSVG=document.createElementNS(yn.SVG_NS,"svg"),t.gutterSVG.setAttribute("width",t.gutterWidth),t.gutterSVG.setAttribute("height",r),document.getElementById(t.options.classes.gutterID).appendChild(t.gutterSVG)}function Jy(t,e){return(e===yn.EDITOR_LEFT?t.editors.left:t.editors.right).ace.getSession().getLength()*t.lineHeight}function oE(t){t.copyRightContainer=document.createElement("div"),t.copyRightContainer.setAttribute("class",t.options.classes.copyRightContainer),t.copyLeftContainer=document.createElement("div"),t.copyLeftContainer.setAttribute("class",t.options.classes.copyLeftContainer),document.getElementById(t.options.classes.gutterID).appendChild(t.copyRightContainer),document.getElementById(t.options.classes.gutterID).appendChild(t.copyLeftContainer)}function sE(t){document.getElementById(t.options.classes.gutterID).removeChild(t.gutterSVG),Zy(t)}function aE(t){t.copyLeftContainer.innerHTML="",t.copyRightContainer.innerHTML=""}function lE(t,e){const n=[];function r(d){return t.options.diffGranularity===yn.DIFF_GRANULARITY_SPECIFIC?d<1:d<=1}e.forEach((d,p)=>{if(p===0){n.push(d);return}let b=!1;for(let h=0;h<n.length;h+=1)if(r(Math.abs(d.leftStartLine-n[h].leftEndLine))&&r(Math.abs(d.rightStartLine-n[h].rightEndLine))){n[h].leftStartLine=Math.min(d.leftStartLine,n[h].leftStartLine),n[h].rightStartLine=Math.min(d.rightStartLine,n[h].rightStartLine),n[h].leftEndLine=Math.max(d.leftEndLine,n[h].leftEndLine),n[h].rightEndLine=Math.max(d.rightEndLine,n[h].rightEndLine),b=!0;break}b||n.push(d)});const f=[];return n.forEach(d=>{d.leftStartLine===d.leftEndLine&&d.rightStartLine===d.rightEndLine||f.push(d)}),f}function e0(t){sE(t),aE(t),t.diffs.forEach((e,n)=>{t.options.showDiffs&&(qy(t,yn.EDITOR_LEFT,e.leftStartLine,e.leftEndLine,t.options.classes.diff),qy(t,yn.EDITOR_RIGHT,e.rightStartLine,e.rightEndLine,t.options.classes.diff),t.options.showConnectors&&nE(t,e.leftStartLine,e.leftEndLine,e.rightStartLine,e.rightEndLine),rE(t,e,n))},t)}const cE={props:{pluginName:{type:String,required:!0},variables:{type:Object,required:!0},pluginTxt:{type:String,required:!0},existingPluginTxt:{type:String,required:!1},modelValue:Boolean},data(){return{tab:0,localVariables:[],localPluginTxt:"",localExistingPluginTxt:null,editor:null,differ:null,contextMenu:!1,menuX:0,menuY:0}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},watch:{value:{immediate:!0,handler:function(){this.localVariables=JSON.parse(JSON.stringify(this.variables)),this.localPluginTxt=this.pluginTxt.slice(),this.existingPluginTxt!==null&&(this.localExistingPluginTxt=this.existingPluginTxt.slice())}}},mounted(){const t=this.buildPluginMode();this.existingPluginTxt===null?(this.editor=ls.edit(this.$refs.editor),this.editor.setTheme("ace/theme/twilight"),this.editor.session.setMode(new t),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(),Zl.applyVimModeIfEnabled(this.editor),this.editor.focus()):(this.tab=1,this.differ=new yc({element:this.$refs.editor,mode:new t,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),Zl.applyVimModeIfEnabled(this.differ.getEditors().left),Zl.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 t=this.differ.diffs[this.curDiff].leftStartLine,e=this.differ.diffs[this.curDiff].rightStartLine;t>5&&(t-=5),e>5&&(e-=5),this.differ.getEditors().left.scrollToLine(t),this.differ.getEditors().right.scrollToLine(e)},buildPluginMode(){let t=ls.require("ace/lib/oop"),e=ls.require("ace/mode/ruby_highlight_rules").RubyHighlightRules,n=["VARIABLE"],r=new RegExp(`(\\b${n.join("\\b|\\b")}\\b)`),f=function(){e.call(this);for(let s in this.$rules)this.$rules[s].unshift({regex:r,token:"support.function"})};t.inherits(f,e);let d=ls.require("ace/mode/matching_brace_outdent").MatchingBraceOutdent,p=ls.require("ace/mode/behaviour/cstyle").CstyleBehaviour,b=ls.require("ace/mode/folding/ruby").FoldMode,h=function(){this.HighlightRules=f,this.$outdent=new d,this.$behaviour=new p,this.foldingRules=new b,this.indentKeywords=this.foldingRules.indentKeywords},g=ls.require("ace/mode/ruby").Mode;return t.inherits(h,g),(function(){this.$id="ace/mode/openc3"}).call(h.prototype),h},submit:function(){this.existingPluginTxt===null?this.emitSubmit(this.editor.getValue().split(`
1502
+ `);const c=p.ace.getSession().getScrollTop();p.ace.getSession().replace(new yc(g,0,s,0),a),p.ace.getSession().setScrollTop(parseInt(c,10)),t.diff()}function Vy(t){const e=t.ace.getSession().doc.getAllLines(),n=[];return e.forEach(r=>{n.push(r.length+1)}),n}function qy(t,e,n,r,f){const d=t.editors[e];r<n&&(r=n);const p=`${f} ${r>n?"lines":"targetOnly"}`;r>n&&(r-=1),d.markers.push(d.ace.session.addMarker(new yc(n,0,r,1),p,"fullLine"))}function Ky(t){Gy(t),e0(t),iE(t)}function Gy(t){t.editors.left.markers.forEach(e=>{t.editors.left.ace.getSession().removeMarker(e)},t),t.editors.right.markers.forEach(e=>{t.editors.right.ace.getSession().removeMarker(e)},t)}function nE(t,e,n,r,f){const d=t.editors.left.ace.getSession().getScrollTop(),p=t.editors.right.ace.getSession().getScrollTop();t.connectorYOffset=1;const b=-1,h=e*t.lineHeight-d+.5,g=t.gutterWidth+1,s=r*t.lineHeight-p+.5,a=-1,c=n*t.lineHeight-d+t.connectorYOffset+.5,l=t.gutterWidth+1,o=f*t.lineHeight-p+t.connectorYOffset+.5,u=Fy(b,h,g,s),m=Fy(l,o,a,c),w=`L${g},${s} ${l},${o}`,x=`L${a},${c} ${b},${h}`,E=`${u} ${w} ${m} ${x}`,T=document.createElementNS(bn.SVG_NS,"path");T.setAttribute("d",E),T.setAttribute("class",t.options.classes.connector),t.gutterSVG.appendChild(T)}function rE(t,e,n){if(e.leftEndLine>e.leftStartLine&&t.options.left.copyLinkEnabled){const r=jy({className:t.options.classes.newCodeConnectorLink,topOffset:e.leftStartLine*t.lineHeight,tooltip:"Copy to right",diffIndex:n,arrowContent:t.options.classes.newCodeConnectorLinkContent});t.copyRightContainer.appendChild(r)}if(e.rightEndLine>e.rightStartLine&&t.options.right.copyLinkEnabled){const r=jy({className:t.options.classes.deletedCodeConnectorLink,topOffset:e.rightStartLine*t.lineHeight,tooltip:"Copy to left",diffIndex:n,arrowContent:t.options.classes.deletedCodeConnectorLinkContent});t.copyLeftContainer.appendChild(r)}}function iE(t){const e=t.editors.left.ace.getSession().getScrollTop(),n=t.editors.right.ace.getSession().getScrollTop();t.copyRightContainer.style.cssText=`top: ${-e}px`,t.copyLeftContainer.style.cssText=`top: ${-n}px`}function Yy(t,e,n,r,f){let d={};if(e===bn.DIFF_INSERT){let p=Xy(t.editors.left,n,f),b=Qy(t.editors.right,r),h=qa(t.editors.right,b);const g=qa(t.editors.left,p.startLine);let s=b,a=p.startLine===p.endLine,c=0;(p.startChar>0||a&&f.length<g)&&h>0&&p.startChar<g&&c++,d={leftStartLine:p.startLine,leftEndLine:p.endLine+1,rightStartLine:s,rightEndLine:s+c}}else{let p=Xy(t.editors.right,r,f),b=Qy(t.editors.left,n),h=qa(t.editors.left,b);const g=qa(t.editors.right,p.startLine);let s=b,a=p.startLine===p.endLine,c=0;(p.startChar>0||a&&f.length<g)&&h>0&&p.startChar<g&&c++,d={leftStartLine:s,leftEndLine:s+c,rightStartLine:p.startLine,rightEndLine:p.endLine+1}}return d}function Xy(t,e,n){const r={startLine:0,startChar:0,endLine:0,endChar:0},f=e+n.length;let d=0,p=!1,b=!1;t.lineLengths.forEach((g,s)=>{d+=g,!p&&e<d&&(r.startLine=s,r.startChar=e-d+g,p=!0),!b&&f<=d&&(r.endLine=s,r.endChar=f-d+g,b=!0)}),r.startChar>0&&qa(t,r.startLine)===r.startChar&&(r.startLine++,r.startChar=0),r.endChar===0&&r.endLine--;const h=/\n$/.test(n);return r.startChar>0&&h&&r.endLine++,r}function qa(t,e){return Wy(t,e).length}function Qy(t,e){const n=t.ace.getSession().doc.getAllLines();let r=0,f=0;for(let d=0;d<n.length;d+=1)if(f+=n[d].length+1,e<f){r=d;break}return f>t.ace.getSession().getValue().length&&(r+=1),r}function Zy(t){t.gutterHeight=document.getElementById(t.options.classes.gutterID).clientHeight,t.gutterWidth=document.getElementById(t.options.classes.gutterID).clientWidth;const e=Jy(t,bn.EDITOR_LEFT),n=Jy(t,bn.EDITOR_RIGHT),r=Math.max(e,n,t.gutterHeight);t.gutterSVG=document.createElementNS(bn.SVG_NS,"svg"),t.gutterSVG.setAttribute("width",t.gutterWidth),t.gutterSVG.setAttribute("height",r),document.getElementById(t.options.classes.gutterID).appendChild(t.gutterSVG)}function Jy(t,e){return(e===bn.EDITOR_LEFT?t.editors.left:t.editors.right).ace.getSession().getLength()*t.lineHeight}function oE(t){t.copyRightContainer=document.createElement("div"),t.copyRightContainer.setAttribute("class",t.options.classes.copyRightContainer),t.copyLeftContainer=document.createElement("div"),t.copyLeftContainer.setAttribute("class",t.options.classes.copyLeftContainer),document.getElementById(t.options.classes.gutterID).appendChild(t.copyRightContainer),document.getElementById(t.options.classes.gutterID).appendChild(t.copyLeftContainer)}function sE(t){document.getElementById(t.options.classes.gutterID).removeChild(t.gutterSVG),Zy(t)}function aE(t){t.copyLeftContainer.innerHTML="",t.copyRightContainer.innerHTML=""}function lE(t,e){const n=[];function r(d){return t.options.diffGranularity===bn.DIFF_GRANULARITY_SPECIFIC?d<1:d<=1}e.forEach((d,p)=>{if(p===0){n.push(d);return}let b=!1;for(let h=0;h<n.length;h+=1)if(r(Math.abs(d.leftStartLine-n[h].leftEndLine))&&r(Math.abs(d.rightStartLine-n[h].rightEndLine))){n[h].leftStartLine=Math.min(d.leftStartLine,n[h].leftStartLine),n[h].rightStartLine=Math.min(d.rightStartLine,n[h].rightStartLine),n[h].leftEndLine=Math.max(d.leftEndLine,n[h].leftEndLine),n[h].rightEndLine=Math.max(d.rightEndLine,n[h].rightEndLine),b=!0;break}b||n.push(d)});const f=[];return n.forEach(d=>{d.leftStartLine===d.leftEndLine&&d.rightStartLine===d.rightEndLine||f.push(d)}),f}function e0(t){sE(t),aE(t),t.diffs.forEach((e,n)=>{t.options.showDiffs&&(qy(t,bn.EDITOR_LEFT,e.leftStartLine,e.leftEndLine,t.options.classes.diff),qy(t,bn.EDITOR_RIGHT,e.rightStartLine,e.rightEndLine,t.options.classes.diff),t.options.showConnectors&&nE(t,e.leftStartLine,e.leftEndLine,e.rightStartLine,e.rightEndLine),rE(t,e,n))},t)}const cE={props:{pluginName:{type:String,required:!0},variables:{type:Object,required:!0},pluginTxt:{type:String,required:!0},existingPluginTxt:{type:String,required:!1},modelValue:Boolean},data(){return{tab:0,localVariables:[],localPluginTxt:"",localExistingPluginTxt:null,editor:null,differ:null,contextMenu:!1,menuX:0,menuY:0}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},watch:{value:{immediate:!0,handler:function(){this.localVariables=JSON.parse(JSON.stringify(this.variables)),this.localPluginTxt=this.pluginTxt.slice(),this.existingPluginTxt!==null&&(this.localExistingPluginTxt=this.existingPluginTxt.slice())}}},mounted(){const t=this.buildPluginMode();this.existingPluginTxt===null?(this.editor=ls.edit(this.$refs.editor),this.editor.setTheme("ace/theme/twilight"),this.editor.session.setMode(new t),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(),Jl.applyVimModeIfEnabled(this.editor),this.editor.focus()):(this.tab=1,this.differ=new bc({element:this.$refs.editor,mode:new t,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),Jl.applyVimModeIfEnabled(this.differ.getEditors().left),Jl.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 t=this.differ.diffs[this.curDiff].leftStartLine,e=this.differ.diffs[this.curDiff].rightStartLine;t>5&&(t-=5),e>5&&(e-=5),this.differ.getEditors().left.scrollToLine(t),this.differ.getEditors().right.scrollToLine(e)},buildPluginMode(){let t=ls.require("ace/lib/oop"),e=ls.require("ace/mode/ruby_highlight_rules").RubyHighlightRules,n=["VARIABLE"],r=new RegExp(`(\\b${n.join("\\b|\\b")}\\b)`),f=function(){e.call(this);for(let s in this.$rules)this.$rules[s].unshift({regex:r,token:"support.function"})};t.inherits(f,e);let d=ls.require("ace/mode/matching_brace_outdent").MatchingBraceOutdent,p=ls.require("ace/mode/behaviour/cstyle").CstyleBehaviour,b=ls.require("ace/mode/folding/ruby").FoldMode,h=function(){this.HighlightRules=f,this.$outdent=new d,this.$behaviour=new p,this.foldingRules=new b,this.indentKeywords=this.foldingRules.indentKeywords},g=ls.require("ace/mode/ruby").Mode;return t.inherits(h,g),(function(){this.$id="ace/mode/openc3"}).call(h.prototype),h},submit:function(){this.existingPluginTxt===null?this.emitSubmit(this.editor.getValue().split(`
1503
1503
  `)):this.differ.diffs.length===0?this.emitSubmit(this.differ.getEditors().left.getValue().split(`
1504
1504
  `)):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(t=>{this.emitSubmit(this.differ.getEditors().left.getValue().split(`
1505
- `))}).catch(t=>{})},emitSubmit(t){let e={name:this.pluginName,variables:mf(this.localVariables),plugin_txt_lines:t};this.$emit("callback",e)},close:function(){this.show=!this.show},showContextMenu:function(t){this.menuX=t.pageX,this.menuY=t.pageY;let e=this.editor.getCursorPosition(),n=this.editor.session.getTokenAt(e.row,e.column);if(n){let r=n.value.trim();r.includes(" ")?this.docsKeyword=r.split(" ")[0]:this.docsKeyword=r,this.contextMenu=!0}},toggleVimMode:function(){this.editor&&Zl.toggleVimMode(this.editor)}}},uE={style:{flex:"1"}},hE={class:"pa-3"},dE={ref:"editor",class:"editor"},fE={key:0};function pE(t,e,n,r,f,d){const p=Ue("v-card-title"),b=Ue("v-icon"),h=Ue("v-row"),g=Ue("v-tab"),s=Ue("v-tabs"),a=Ue("v-text-field"),c=Ue("v-col"),l=Ue("v-window-item"),o=Ue("v-list-item-title"),u=Ue("v-list-item"),m=Ue("v-divider"),w=Ue("v-list"),x=Ue("v-menu"),E=Ue("v-window"),T=Ue("v-btn"),k=Ue("v-spacer"),C=Ue("v-card-actions"),L=Ue("v-card-text"),R=Ue("v-card"),F=Ue("v-dialog");return lt(),Xt(F,{modelValue:d.show,"onUpdate:modelValue":e[5]||(e[5]=I=>d.show=I),persistent:"",width:"80vw"},{default:Fe(()=>[We(R,null,{default:Fe(()=>[We(L,null,{default:Fe(()=>[We(p,null,{default:Fe(()=>[Ht(_n(n.pluginName),1)]),_:1}),n.existingPluginTxt!==null?(lt(),Xt(h,{key:0,class:"notice d-flex flex-row"},{default:Fe(()=>[We(b,{size:"x-large",start:"",color:"yellow"},{default:Fe(()=>e[6]||(e[6]=[Ht(" mdi-alert-box ")])),_:1}),fr("div",uE," The existing plugin.txt is different from the "+_n(n.pluginName)+"'s plugin.txt. Navigate the diffs making whatever edits you want before installing. You may want to update "+_n(n.pluginName)+"'s plugin.txt going forward. ",1)]),_:1})):Ur("",!0),We(h,{class:"pb-3 pr-3"},{default:Fe(()=>[We(s,{modelValue:f.tab,"onUpdate:modelValue":e[0]||(e[0]=I=>f.tab=I),class:"ml-3"},{default:Fe(()=>[(lt(),Xt(g,{key:0},{default:Fe(()=>e[7]||(e[7]=[Ht(" Variables ")])),_:1})),(lt(),Xt(g,{key:1},{default:Fe(()=>e[8]||(e[8]=[Ht(" plugin.txt ")])),_:1}))]),_:1},8,["modelValue"])]),_:1}),fr("form",{onSubmit:e[4]||(e[4]=ka((...I)=>t.onSubmit&&t.onSubmit(...I),["prevent"]))},[We(E,{modelValue:f.tab,"onUpdate:modelValue":e[3]||(e[3]=I=>f.tab=I)},{default:Fe(()=>[(lt(),Xt(l,{key:0,eager:"true",class:"tab"},{default:Fe(()=>[fr("div",hE,[We(h,{class:"mt-3"},{default:Fe(()=>[(lt(!0),gn(Li,null,Xi(f.localVariables,(I,H)=>(lt(),gn("div",{key:H},[We(c,{style:{width:"220px"}},{default:Fe(()=>[We(a,{modelValue:f.localVariables[H],"onUpdate:modelValue":P=>f.localVariables[H]=P,clearable:"",type:"text",label:H},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)]))),128))]),_:1})])]),_:1})),n.existingPluginTxt===null?(lt(),Xt(l,{key:"1-new",eager:"true",class:"tab"},{default:Fe(()=>[We(h,{class:"pa-3"},{default:Fe(()=>[We(c,null,{default:Fe(()=>e[9]||(e[9]=[Ht(" This can be edited before installation. ")])),_:1})]),_:1}),fr("pre",{ref:"editor",class:"editor",onContextmenu:e[1]||(e[1]=ka((...I)=>d.showContextMenu&&d.showContextMenu(...I),["prevent"]))},null,544),We(x,{modelValue:f.contextMenu,"onUpdate:modelValue":e[2]||(e[2]=I=>f.contextMenu=I),target:[f.menuX,f.menuY]},{default:Fe(()=>[We(w,null,{default:Fe(()=>[We(u,{link:""},{default:Fe(()=>[We(o,{onClick:t.openDocumentation},{default:Fe(()=>[Ht(_n(t.docsKeyword)+" documentation ",1)]),_:1},8,["onClick"])]),_:1}),We(m),We(u,{title:"Toggle Vim mode","prepend-icon":"extras:vim",onClick:d.toggleVimMode},null,8,["onClick"])]),_:1})]),_:1},8,["modelValue","target"])]),_:1})):(lt(),Xt(l,{key:"1-existing",eager:"true",class:"tab"},{default:Fe(()=>[We(h,{class:"pa-3"},{default:Fe(()=>[We(c,null,{default:Fe(()=>e[10]||(e[10]=[Ht(" Existing plugin.txt. This can be edited before installation. ")])),_:1}),We(c,{class:"ml-6"},{default:Fe(()=>e[11]||(e[11]=[Ht(" Uneditable plugin.txt from the new plugin. ")])),_:1})]),_:1}),fr("pre",dE,null,512)]),_:1}))]),_:1},8,["modelValue"]),We(C,{class:"px-2 mt-2"},{default:Fe(()=>[n.existingPluginTxt!==null?(lt(),gn("div",fE,[We(T,{variant:"text",onClick:d.nextDiff},{default:Fe(()=>e[12]||(e[12]=[Ht(" Next Diff ")])),_:1},8,["onClick"]),We(T,{variant:"text",onClick:d.previousDiff},{default:Fe(()=>e[13]||(e[13]=[Ht(" Previous Diff ")])),_:1},8,["onClick"])])):Ur("",!0),We(k),We(T,{variant:"outlined","data-test":"edit-cancel",onClick:ka(d.close,["prevent"])},{default:Fe(()=>e[14]||(e[14]=[Ht(" Cancel ")])),_:1},8,["onClick"]),We(T,{variant:"flat","data-test":"edit-submit",onClick:d.submit},{default:Fe(()=>e[15]||(e[15]=[Ht(" Install ")])),_:1},8,["onClick"])]),_:1})],32)]),_:1})]),_:1})]),_:1},8,["modelValue"])}const DN=sr("p",Ri(cE,[["render",pE],["__scopeId","data-v-5b18ccf5"]])),gE=fd.find(t=>t.name==="PluginsTab"),t0=[{path:"/",component:QM,children:[{component:gE.component,path:""},...fd]},{path:"/:pathMatch(.*)*",name:"NotFound",component:WM}];t0.forEach(Lf);const mE=Af({history:Tf(),routes:t0}),vE={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"}},yE={data:function(){return{show:!1,params:{title:"Title",text:"The text that is displayed",okText:"Ok",okClass:"primary",validateText:"CONFIRM",cancelText:"Cancel",html:!1},resolve:null,reject:null,validationText:null,rules:{required:t=>!!t||"Required.",match:t=>t===this.params.validateText||"Value mismatch."}}},computed:{dataTestOk:function(){return`confirm-dialog-${this.params.okText.toLowerCase()}`},dataTestCancel:function(){return`confirm-dialog-${this.params.cancelText.toLowerCase()}`}},methods:{dialog:function(t,e,n){this.params=t,this.show=!0,this.resolve=e,this.reject=n},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=""}}},bE=["innerHTML"],wE={key:2},xE={key:3,class:"validate mt-4"};function CE(t,e,n,r,f,d){const p=Ue("v-spacer"),b=Ue("v-toolbar"),h=Ue("v-icon"),g=Ue("v-text-field"),s=Ue("v-card-text"),a=Ue("v-btn"),c=Ue("v-card-actions"),l=Ue("v-card"),o=Ue("v-dialog"),u=Ue("v-app");return lt(),Xt(u,null,{default:Fe(()=>[We(o,{modelValue:t.show,"onUpdate:modelValue":e[1]||(e[1]=m=>t.show=m),width:"600"},{default:Fe(()=>[We(l,null,{default:Fe(()=>[We(b,{height:"24"},{default:Fe(()=>[We(p),fr("span",null,_n(t.params.title),1),We(p)]),_:1}),We(s,{class:"mt-4 pa-3"},{default:Fe(()=>[t.params.validateText?(lt(),Xt(h,{key:0,class:"mr-2"},{default:Fe(()=>e[2]||(e[2]=[Ht(" mdi-alert ")])),_:1})):Ur("",!0),t.params.html?(lt(),gn("span",{key:1,innerHTML:t.params.text},null,8,bE)):(lt(),gn("span",wE,_n(t.params.text),1)),t.params.validateText?(lt(),gn("div",xE,[Ht(" Enter "+_n(t.params.validateText)+" to confirm! ",1),We(g,{modelValue:t.validationText,"onUpdate:modelValue":e[0]||(e[0]=m=>t.validationText=m),variant:"solo",density:"compact","single-line":"",rules:[t.rules.required,t.rules.match],"data-test":"confirm-dialog-validate"},null,8,["modelValue","rules"])])):Ur("",!0)]),_:1}),We(c,{class:"px-2"},{default:Fe(()=>[We(p),t.params.cancelText?(lt(),Xt(a,{key:0,variant:"outlined","data-test":d.dataTestCancel,onClick:d.cancel},{default:Fe(()=>[Ht(_n(t.params.cancelText),1)]),_:1},8,["data-test","onClick"])):Ur("",!0),We(a,{variant:"flat",color:t.params.okClass,"data-test":d.dataTestOk,onClick:d.ok},{default:Fe(()=>[Ht(_n(t.params.okText),1)]),_:1},8,["color","data-test","onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})}const kE=Ri(yE,[["render",CE],["__scopeId","data-v-de532a0f"]]);class _E{constructor(){this.mounted=!1,this.$root=null}mount(){if(this.mounted)return;const e=window.Vue.createApp(kE);e.use(vd);const n=document.createElement("div");document.querySelector("#openc3-app-toolbar > div").appendChild(n),this.$root=e.mount(n),this.mounted=!0}open({title:e,text:n,okText:r,okClass:f,validateText:d,cancelText:p,html:b}){return this.mount(),new Promise((h,g)=>{this.$root.dialog({title:e,text:n,okText:r,okClass:f,validateText:d,cancelText:p,html:b},h,g)})}confirm(e,{okText:n="Ok",cancelText:r="Cancel",okClass:f="primary"}){return this.open({title:"Confirm",text:e,okText:n,okClass:f,validateText:null,cancelText:r,html:!1})}alert(e,{okText:n="Ok",html:r=!1,okClass:f="primary"}){return this.open({title:"Alert",text:e,okText:n,okClass:f,validateText:null,cancelText:null,html:r})}validate(e,{okText:n="Ok",validateText:r="CONFIRM",cancelText:f="Cancel",okClass:d="primary"}){return this.open({title:"Confirm",text:e,okText:n,okClass:d,validateText:r,cancelText:f,html:!1})}}const SE={install(t,e){const n=new _E;t.provide("dialog",n),t.config.globalProperties.hasOwnProperty("$dialog")||(t.config.globalProperties.$dialog=n)}},AE={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(){switch(this.toastNotification.type){case"notification":return"mdi-bell";case"alert":default:return"mdi-alert-box"}},toastStyle:function(){return`
1505
+ `))}).catch(t=>{})},emitSubmit(t){let e={name:this.pluginName,variables:mf(this.localVariables),plugin_txt_lines:t};this.$emit("callback",e)},close:function(){this.show=!this.show},showContextMenu:function(t){this.menuX=t.pageX,this.menuY=t.pageY;let e=this.editor.getCursorPosition(),n=this.editor.session.getTokenAt(e.row,e.column);if(n){let r=n.value.trim();r.includes(" ")?this.docsKeyword=r.split(" ")[0]:this.docsKeyword=r,this.contextMenu=!0}},toggleVimMode:function(){this.editor&&Jl.toggleVimMode(this.editor)}}},uE={style:{flex:"1"}},hE={class:"pa-3"},dE={ref:"editor",class:"editor"},fE={key:0};function pE(t,e,n,r,f,d){const p=Ue("v-card-title"),b=Ue("v-icon"),h=Ue("v-row"),g=Ue("v-tab"),s=Ue("v-tabs"),a=Ue("v-text-field"),c=Ue("v-col"),l=Ue("v-window-item"),o=Ue("v-list-item-title"),u=Ue("v-list-item"),m=Ue("v-divider"),w=Ue("v-list"),x=Ue("v-menu"),E=Ue("v-window"),T=Ue("v-btn"),k=Ue("v-spacer"),C=Ue("v-card-actions"),L=Ue("v-card-text"),R=Ue("v-card"),F=Ue("v-dialog");return st(),Xt(F,{modelValue:d.show,"onUpdate:modelValue":e[5]||(e[5]=I=>d.show=I),persistent:"",width:"80vw"},{default:Fe(()=>[We(R,null,{default:Fe(()=>[We(L,null,{default:Fe(()=>[We(p,null,{default:Fe(()=>[Pt(yn(n.pluginName),1)]),_:1}),n.existingPluginTxt!==null?(st(),Xt(h,{key:0,class:"notice d-flex flex-row"},{default:Fe(()=>[We(b,{size:"x-large",start:"",color:"yellow"},{default:Fe(()=>e[6]||(e[6]=[Pt(" mdi-alert-box ")])),_:1}),fr("div",uE," The existing plugin.txt is different from the "+yn(n.pluginName)+"'s plugin.txt. Navigate the diffs making whatever edits you want before installing. You may want to update "+yn(n.pluginName)+"'s plugin.txt going forward. ",1)]),_:1})):Ur("",!0),We(h,{class:"pb-3 pr-3"},{default:Fe(()=>[We(s,{modelValue:f.tab,"onUpdate:modelValue":e[0]||(e[0]=I=>f.tab=I),class:"ml-3"},{default:Fe(()=>[(st(),Xt(g,{key:0},{default:Fe(()=>e[7]||(e[7]=[Pt(" Variables ")])),_:1})),(st(),Xt(g,{key:1},{default:Fe(()=>e[8]||(e[8]=[Pt(" plugin.txt ")])),_:1}))]),_:1},8,["modelValue"])]),_:1}),fr("form",{onSubmit:e[4]||(e[4]=ka((...I)=>t.onSubmit&&t.onSubmit(...I),["prevent"]))},[We(E,{modelValue:f.tab,"onUpdate:modelValue":e[3]||(e[3]=I=>f.tab=I)},{default:Fe(()=>[(st(),Xt(l,{key:0,eager:"true",class:"tab"},{default:Fe(()=>[fr("div",hE,[We(h,{class:"mt-3"},{default:Fe(()=>[(st(!0),hn(ri,null,Xi(f.localVariables,(I,H)=>(st(),hn("div",{key:H},[We(c,{style:{width:"220px"}},{default:Fe(()=>[We(a,{modelValue:f.localVariables[H],"onUpdate:modelValue":P=>f.localVariables[H]=P,clearable:"",type:"text",label:H},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)]))),128))]),_:1})])]),_:1})),n.existingPluginTxt===null?(st(),Xt(l,{key:"1-new",eager:"true",class:"tab"},{default:Fe(()=>[We(h,{class:"pa-3"},{default:Fe(()=>[We(c,null,{default:Fe(()=>e[9]||(e[9]=[Pt(" This can be edited before installation. ")])),_:1})]),_:1}),fr("pre",{ref:"editor",class:"editor",onContextmenu:e[1]||(e[1]=ka((...I)=>d.showContextMenu&&d.showContextMenu(...I),["prevent"]))},null,544),We(x,{modelValue:f.contextMenu,"onUpdate:modelValue":e[2]||(e[2]=I=>f.contextMenu=I),target:[f.menuX,f.menuY]},{default:Fe(()=>[We(w,null,{default:Fe(()=>[We(u,{link:""},{default:Fe(()=>[We(o,{onClick:t.openDocumentation},{default:Fe(()=>[Pt(yn(t.docsKeyword)+" documentation ",1)]),_:1},8,["onClick"])]),_:1}),We(m),We(u,{title:"Toggle Vim mode","prepend-icon":"extras:vim",onClick:d.toggleVimMode},null,8,["onClick"])]),_:1})]),_:1},8,["modelValue","target"])]),_:1})):(st(),Xt(l,{key:"1-existing",eager:"true",class:"tab"},{default:Fe(()=>[We(h,{class:"pa-3"},{default:Fe(()=>[We(c,null,{default:Fe(()=>e[10]||(e[10]=[Pt(" Existing plugin.txt. This can be edited before installation. ")])),_:1}),We(c,{class:"ml-6"},{default:Fe(()=>e[11]||(e[11]=[Pt(" Uneditable plugin.txt from the new plugin. ")])),_:1})]),_:1}),fr("pre",dE,null,512)]),_:1}))]),_:1},8,["modelValue"]),We(C,{class:"px-2 mt-2"},{default:Fe(()=>[n.existingPluginTxt!==null?(st(),hn("div",fE,[We(T,{variant:"text",onClick:d.nextDiff},{default:Fe(()=>e[12]||(e[12]=[Pt(" Next Diff ")])),_:1},8,["onClick"]),We(T,{variant:"text",onClick:d.previousDiff},{default:Fe(()=>e[13]||(e[13]=[Pt(" Previous Diff ")])),_:1},8,["onClick"])])):Ur("",!0),We(k),We(T,{variant:"outlined","data-test":"edit-cancel",onClick:ka(d.close,["prevent"])},{default:Fe(()=>e[14]||(e[14]=[Pt(" Cancel ")])),_:1},8,["onClick"]),We(T,{variant:"flat","data-test":"edit-submit",onClick:d.submit},{default:Fe(()=>e[15]||(e[15]=[Pt(" Install ")])),_:1},8,["onClick"])]),_:1})],32)]),_:1})]),_:1})]),_:1},8,["modelValue"])}const DN=sr("p",Ri(cE,[["render",pE],["__scopeId","data-v-5b18ccf5"]])),gE=fd.find(t=>t.name==="PluginsTab"),t0=[{path:"/",component:QM,children:[{component:gE.component,path:""},...fd]},{path:"/:pathMatch(.*)*",name:"NotFound",component:WM}];t0.forEach(Lf);const mE=Af({history:Tf(),routes:t0}),vE={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"}},yE={data:function(){return{show:!1,params:{title:"Title",text:"The text that is displayed",okText:"Ok",okClass:"primary",validateText:"CONFIRM",cancelText:"Cancel",html:!1},resolve:null,reject:null,validationText:null,rules:{required:t=>!!t||"Required.",match:t=>t===this.params.validateText||"Value mismatch."}}},computed:{dataTestOk:function(){return`confirm-dialog-${this.params.okText.toLowerCase()}`},dataTestCancel:function(){return`confirm-dialog-${this.params.cancelText.toLowerCase()}`}},methods:{dialog:function(t,e,n){this.params=t,this.show=!0,this.resolve=e,this.reject=n},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=""}}},bE=["innerHTML"],wE={key:2},xE={key:3,class:"validate mt-4"};function CE(t,e,n,r,f,d){const p=Ue("v-spacer"),b=Ue("v-toolbar"),h=Ue("v-icon"),g=Ue("v-text-field"),s=Ue("v-card-text"),a=Ue("v-btn"),c=Ue("v-card-actions"),l=Ue("v-card"),o=Ue("v-dialog"),u=Ue("v-app");return st(),Xt(u,null,{default:Fe(()=>[We(o,{modelValue:t.show,"onUpdate:modelValue":e[1]||(e[1]=m=>t.show=m),width:"600"},{default:Fe(()=>[We(l,null,{default:Fe(()=>[We(b,{height:"24"},{default:Fe(()=>[We(p),fr("span",null,yn(t.params.title),1),We(p)]),_:1}),We(s,{class:"mt-4 pa-3"},{default:Fe(()=>[t.params.validateText?(st(),Xt(h,{key:0,class:"mr-2"},{default:Fe(()=>e[2]||(e[2]=[Pt(" mdi-alert ")])),_:1})):Ur("",!0),t.params.html?(st(),hn("span",{key:1,innerHTML:t.params.text},null,8,bE)):(st(),hn("span",wE,yn(t.params.text),1)),t.params.validateText?(st(),hn("div",xE,[Pt(" Enter "+yn(t.params.validateText)+" to confirm! ",1),We(g,{modelValue:t.validationText,"onUpdate:modelValue":e[0]||(e[0]=m=>t.validationText=m),variant:"solo",density:"compact","single-line":"",rules:[t.rules.required,t.rules.match],"data-test":"confirm-dialog-validate"},null,8,["modelValue","rules"])])):Ur("",!0)]),_:1}),We(c,{class:"px-2"},{default:Fe(()=>[We(p),t.params.cancelText?(st(),Xt(a,{key:0,variant:"outlined","data-test":d.dataTestCancel,onClick:d.cancel},{default:Fe(()=>[Pt(yn(t.params.cancelText),1)]),_:1},8,["data-test","onClick"])):Ur("",!0),We(a,{variant:"flat",color:t.params.okClass,"data-test":d.dataTestOk,onClick:d.ok},{default:Fe(()=>[Pt(yn(t.params.okText),1)]),_:1},8,["color","data-test","onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})}const kE=Ri(yE,[["render",CE],["__scopeId","data-v-de532a0f"]]);class _E{constructor(){this.mounted=!1,this.$root=null}mount(){if(this.mounted)return;const e=window.Vue.createApp(kE);e.use(vd);const n=document.createElement("div");document.querySelector("#openc3-app-toolbar > div").appendChild(n),this.$root=e.mount(n),this.mounted=!0}open({title:e,text:n,okText:r,okClass:f,validateText:d,cancelText:p,html:b}){return this.mount(),new Promise((h,g)=>{this.$root.dialog({title:e,text:n,okText:r,okClass:f,validateText:d,cancelText:p,html:b},h,g)})}confirm(e,{okText:n="Ok",cancelText:r="Cancel",okClass:f="primary"}){return this.open({title:"Confirm",text:e,okText:n,okClass:f,validateText:null,cancelText:r,html:!1})}alert(e,{okText:n="Ok",html:r=!1,okClass:f="primary"}){return this.open({title:"Alert",text:e,okText:n,okClass:f,validateText:null,cancelText:null,html:r})}validate(e,{okText:n="Ok",validateText:r="CONFIRM",cancelText:f="Cancel",okClass:d="primary"}){return this.open({title:"Confirm",text:e,okText:n,okClass:d,validateText:r,cancelText:f,html:!1})}}const SE={install(t,e){const n=new _E;t.provide("dialog",n),t.config.globalProperties.hasOwnProperty("$dialog")||(t.config.globalProperties.$dialog=n)}},AE={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(){switch(this.toastNotification.type){case"notification":return"mdi-bell";case"alert":default:return"mdi-alert-box"}},toastStyle:function(){return`
1506
1506
  --toast-bg-color:${dd[this.toastNotification.level]};
1507
1507
  --toast-fg-color:${RM(this.toastNotification.level)};
1508
1508
  `},contentStyle:function(){return`
1509
1509
  white-space: ${this.expanded?"normal":"nowrap"};
1510
1510
  overflow-x: ${this.expanded?"visible":"hidden"};
1511
1511
  text-overflow: ${this.expanded?"unset":"ellipsis"};
1512
- `}},methods:{toast:function(t,e){this.noToastPaths.includes(window.location.pathname)||(e===void 0&&(e=5e3),this.toastNotification=t,this.showToast=!0,this.cancelAutohide(),e&&(this.timeout=setTimeout(()=>{this.hide()},e)))},hide:function(){this.cancelAutohide(),this.showToast=!1},cancelAutohide:function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},expand:function(){this.cancelAutohide(),this.expanded=!0}}},TE={key:0,class:"text-subtitle-1 mr-1 notification-text"},$E={key:1,class:"text-body-2 notification-text"},ME={key:2,class:"text-body-2 notification-text"};function EE(t,e,n,r,f,d){const p=Ue("v-icon"),b=Ue("v-spacer"),h=Ue("v-btn"),g=Ue("v-sheet"),s=Ue("v-slide-y-transition");return lt(),Xt(s,null,{default:Fe(()=>[_f(We(g,{style:is(d.toastStyle),class:"toast-notification",onClick:d.expand},{default:Fe(()=>[We(p,{class:"mr-1 notification-text"},{default:Fe(()=>[Ht(_n(d.toastNotificationIcon),1)]),_:1}),fr("div",{class:"toast-content",style:is(d.contentStyle)},[t.toastNotification.title?(lt(),gn("span",TE,_n(t.toastNotification.title)+": ",1)):Ur("",!0),t.toastNotification.body?(lt(),gn("span",$E,_n(t.toastNotification.body),1)):Ur("",!0),t.toastNotification.message?(lt(),gn("span",ME,_n(t.toastNotification.message),1)):Ur("",!0)],4),We(b),We(h,{variant:"text",onClick:ka(d.hide,["stop"]),class:"notification-text"},{default:Fe(()=>e[0]||(e[0]=[Ht(" Dismiss ")])),_:1},8,["onClick"])]),_:1},8,["style","onClick"]),[[Sf,t.showToast]])]),_:1})}const IE=Ri(AE,[["render",EE],["__scopeId","data-v-b0459ba8"]]);class LE{constructor(e={}){var n;this.$store=e.store,this.mounted=!1,this.$root=null,(n=window.$cosmosNotify)!=null&&n.$root?(this.mounted=!0,this.$root=window.$cosmosNotify.$root):window.$cosmosNotify=this}mount(){if(this.mounted)return;const e=ru(IE);e.use(vd);const n=document.createElement("div");document.querySelector("#openc3-app-toolbar > div").appendChild(n),this.$root=e.mount(n),this.mounted=!0}open({method:e,title:n,body:r,message:f,level:d,duration:p,type:b="alert",logToConsole:h=!1,saveToHistory:g=!0}){this.mount(),h&&console.log(f?`${d.toUpperCase()} - ${f}`:`${d.toUpperCase()} - ${n}: ${r}`),g&&this.$store.commit("notifyAddHistory",{title:n,body:r,message:f,level:d}),this[e]({title:n,body:r,message:f,level:d,duration:p,type:b})}toast({title:e,body:n,message:r,level:f,duration:d,type:p}){this.$root.toast({title:e,body:n,message:r,level:f,type:p},d)}critical({title:e,body:n,message:r,type:f,duration:d,logToConsole:p,saveToHistory:b}){this.open({method:"toast",level:"critical",title:e,body:n,message:r,type:f,duration:d,logToConsole:p,saveToHistory:b})}FATAL(e){this.critical(e)}ERROR(e){this.critical(e)}serious({title:e,body:n,message:r,type:f,duration:d,logToConsole:p,saveToHistory:b}){this.open({method:"toast",level:"serious",title:e,body:n,message:r,type:f,duration:d,logToConsole:p,saveToHistory:b})}caution({title:e,body:n,message:r,type:f,duration:d,logToConsole:p,saveToHistory:b}){this.open({method:"toast",level:"caution",title:e,body:n,message:r,type:f,duration:d,logToConsole:p,saveToHistory:b})}WARN(e){this.caution(e)}normal({title:e,body:n,message:r,type:f,duration:d,logToConsole:p,saveToHistory:b}){this.open({method:"toast",level:"normal",title:e,body:n,message:r,type:f,duration:d,logToConsole:p,saveToHistory:b})}INFO(e){this.normal(e)}DEBUG(e){this.normal(e)}standby({title:e,body:n,message:r,type:f,duration:d,logToConsole:p,saveToHistory:b}){this.open({method:"toast",level:"standby",title:e,body:n,message:r,type:f,duration:d,logToConsole:p,saveToHistory:b})}off({title:e,body:n,message:r,type:f,duration:d,logToConsole:p,saveToHistory:b}){this.open({method:"toast",level:"off",title:e,body:n,message:r,type:f,duration:d,logToConsole:p,saveToHistory:b})}}const RE={install(t,e){const n=new LE(e);t.provide("notify",n),t.config.globalProperties.hasOwnProperty("$notify")||(t.config.globalProperties.$notify=n)}},n0=100,r0=Mf({state:{notifyHistory:[],namedWidgets:{}},getters:{namedWidget:t=>e=>t.namedWidgets[e]},mutations:{notifyAddHistory:(t,e)=>{t.notifyHistory.length>=n0&&(t.notifyHistory.length=n0-1),t.notifyHistory.unshift(e)},notifyClearHistory:t=>{t.notifyHistory=[]},setNamedWidget:(t,e)=>{Object.assign(t.namedWidgets,e)},clearNamedWidget:(t,e)=>{delete t.namedWidgets[e]}},modules:{}});function i0(t){let e;return t!==null&&typeof t=="object"&&((e=Object.getPrototypeOf(t))===Object.prototype||e===null)}function OE(t,e){const n={};for(const r of e)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function o0(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r={};for(const f in t)r[f]=t[f];for(const f in e){const d=t[f],p=e[f];if(i0(d)&&i0(p)){r[f]=o0(d,p,n);continue}if(n&&Array.isArray(d)&&Array.isArray(p)){r[f]=n(d,p);continue}r[f]=p}return r}function Ka(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(Ka.cache.has(t))return Ka.cache.get(t);const e=t.replace(/[^a-z]/gi,"-").replace(/\B([A-Z])/g,"-$1").toLowerCase();return Ka.cache.set(t,e),e}Ka.cache=new Map;function DE(t){yf(`Vuetify: ${t}`)}function s0(t,e){return n=>Object.keys(t).reduce((r,f)=>{const d=typeof t[f]=="object"&&t[f]!=null&&!Array.isArray(t[f])?t[f]:{type:t[f]};return n&&f in n?r[f]={...d,default:n[f]}:r[f]=d,e&&!r[f].source&&(r[f].source=e),r},{})}function a0(t,e){const n=Cf();if(!n)throw new Error(`[Vuetify] ${t} must be called from inside a setup function`);return n}function NE(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:a0("injectSelf");const{provides:n}=e;if(n&&t in n)return n[t]}const md=Symbol.for("vuetify:defaults");function l0(){const t=bf(md);if(!t)throw new Error("[Vuetify] Could not find defaults instance");return t}function FE(t,e){return t.props&&(typeof t.props[e]<"u"||typeof t.props[Ka(e)]<"u")}function PE(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:l0();const r=a0("useDefaults");if(e=e??r.type.name??r.type.__name,!e)throw new Error("[Vuetify] Could not determine component name");const f=nu(()=>{var h;return(h=n.value)==null?void 0:h[t._as??e]}),d=new Proxy(t,{get(h,g){var s,a,c,l;const o=Reflect.get(h,g);if(g==="class"||g==="style")return[(s=f.value)==null?void 0:s[g],o].filter(w=>w!=null);if(FE(r.vnode,g))return o;const u=(a=f.value)==null?void 0:a[g];if(u!==void 0)return u;const m=(l=(c=n.value)==null?void 0:c.global)==null?void 0:l[g];return m!==void 0?m:o}}),p=wf();xf(()=>{if(f.value){const h=Object.entries(f.value).filter(g=>{let[s]=g;return s.startsWith(s[0].toUpperCase())});p.value=h.length?Object.fromEntries(h):void 0}else p.value=void 0});function b(){const h=NE(md,r);kf(md,nu(()=>p.value?o0((h==null?void 0:h.value)??{},p.value):h==null?void 0:h.value))}return{props:d,provideSubDefaults:b}}function bc(t){if(t._setup=t._setup??t.setup,!t.name)return DE("The component is missing an explicit name, unable to generate default prop value"),t;if(t._setup){t.props=s0(t.props??{},t.name)();const e=Object.keys(t.props).filter(n=>n!=="class"&&n!=="style");t.filterProps=function(n){return OE(n,e)},t.props._as=String,t.setup=function(n,r){const f=l0();if(!f.value)return t._setup(n,r);const{props:d,provideSubDefaults:p}=PE(n,n._as??t.name,f),b=t._setup(d,r);return p(),b}}return t}function BE(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return e=>(t?bc:vf)(e)}const WE=[String,Function,Object,Array],wc=s0({icon:{type:WE},tag:{type:[String,Object,Function],required:!0}},"icon");BE()({name:"VComponentIcon",props:wc(),setup(t,e){let{slots:n}=e;return()=>{const r=t.icon;return We(t.tag,null,{default:()=>{var f;return[t.icon?We(r,null,null):(f=n.default)==null?void 0:f.call(n)]}})}}}),bc({name:"VSvgIcon",inheritAttrs:!1,props:wc(),setup(t,e){let{attrs:n}=e;return()=>We(t.tag,fl(n,{style:null}),{default:()=>[We("svg",{class:"v-icon__svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true"},[Array.isArray(t.icon)?t.icon.map(r=>Array.isArray(r)?We("path",{d:r[0],"fill-opacity":r[1]},null):We("path",{d:r},null)):We("path",{d:t.icon},null)])]})}}),bc({name:"VLigatureIcon",props:wc(),setup(t){return()=>We(t.tag,null,{default:()=>[t.icon]})}});const jE=bc({name:"VClassIcon",props:wc(),setup(t){return()=>We(t.tag,{class:t.icon},null)}}),zE={component:t=>js(jE,{...t,class:"mdi"})},vd=Ef({theme:{defaultTheme:"cosmosDark",themes:{cosmosDark:vE}},icons:{defaultSet:"mdi",sets:{mdi:zE,...DM,...NM}}}),yd=nw({createApp:ru,appOptions:{render(){return js(uw,{})},el:"#openc3-tool"},handleInstance:t=>{t.use(mE),t.use(r0),t.use(vd),t.use(SE),t.use(RE,{store:r0})}}),NN=sr("i",yd.bootstrap),FN=sr("j",yd.mount),PN=sr("u",yd.unmount)}}});
1512
+ `}},methods:{toast:function(t,e){this.noToastPaths.includes(window.location.pathname)||(e===void 0&&(e=5e3),this.toastNotification=t,this.showToast=!0,this.cancelAutohide(),e&&(this.timeout=setTimeout(()=>{this.hide()},e)))},hide:function(){this.cancelAutohide(),this.showToast=!1},cancelAutohide:function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},expand:function(){this.cancelAutohide(),this.expanded=!0}}},TE={key:0,class:"text-subtitle-1 mr-1 notification-text"},$E={key:1,class:"text-body-2 notification-text"},ME={key:2,class:"text-body-2 notification-text"};function EE(t,e,n,r,f,d){const p=Ue("v-icon"),b=Ue("v-spacer"),h=Ue("v-btn"),g=Ue("v-sheet"),s=Ue("v-slide-y-transition");return st(),Xt(s,null,{default:Fe(()=>[_f(We(g,{style:is(d.toastStyle),class:"toast-notification",onClick:d.expand},{default:Fe(()=>[We(p,{class:"mr-1 notification-text"},{default:Fe(()=>[Pt(yn(d.toastNotificationIcon),1)]),_:1}),fr("div",{class:"toast-content",style:is(d.contentStyle)},[t.toastNotification.title?(st(),hn("span",TE,[t.toastNotification.body||t.toastNotification.message?(st(),hn(ri,{key:0},[Pt(yn(t.toastNotification.title)+": ",1)],64)):(st(),hn(ri,{key:1},[Pt(yn(t.toastNotification.title),1)],64))])):Ur("",!0),t.toastNotification.body?(st(),hn("span",$E,yn(t.toastNotification.body),1)):Ur("",!0),t.toastNotification.message?(st(),hn("span",ME,yn(t.toastNotification.message),1)):Ur("",!0)],4),We(b),We(h,{variant:"text",class:"notification-text",onClick:ka(d.hide,["stop"])},{default:Fe(()=>e[0]||(e[0]=[Pt(" Dismiss ")])),_:1},8,["onClick"])]),_:1},8,["style","onClick"]),[[Sf,t.showToast]])]),_:1})}const IE=Ri(AE,[["render",EE],["__scopeId","data-v-84833581"]]);class LE{constructor(e={}){var n;this.$store=e.store,this.mounted=!1,this.$root=null,(n=window.$cosmosNotify)!=null&&n.$root?(this.mounted=!0,this.$root=window.$cosmosNotify.$root):window.$cosmosNotify=this}mount(){if(this.mounted)return;const e=iu(IE);e.use(vd);const n=document.createElement("div");document.querySelector("#openc3-app-toolbar > div").appendChild(n),this.$root=e.mount(n),this.mounted=!0}open({method:e,title:n,body:r,message:f,level:d,duration:p,type:b="alert",logToConsole:h=!1,saveToHistory:g=!0}){this.mount(),h&&console.log(f?`${d.toUpperCase()} - ${f}`:`${d.toUpperCase()} - ${n}: ${r}`),g&&this.$store.commit("notifyAddHistory",{title:n,body:r,message:f,level:d}),this[e]({title:n,body:r,message:f,level:d,duration:p,type:b})}toast({title:e,body:n,message:r,level:f,duration:d,type:p}){this.$root.toast({title:e,body:n,message:r,level:f,type:p},d)}critical({title:e,body:n,message:r,type:f,duration:d,logToConsole:p,saveToHistory:b}){this.open({method:"toast",level:"critical",title:e,body:n,message:r,type:f,duration:d,logToConsole:p,saveToHistory:b})}FATAL(e){this.critical(e)}ERROR(e){this.critical(e)}serious({title:e,body:n,message:r,type:f,duration:d,logToConsole:p,saveToHistory:b}){this.open({method:"toast",level:"serious",title:e,body:n,message:r,type:f,duration:d,logToConsole:p,saveToHistory:b})}caution({title:e,body:n,message:r,type:f,duration:d,logToConsole:p,saveToHistory:b}){this.open({method:"toast",level:"caution",title:e,body:n,message:r,type:f,duration:d,logToConsole:p,saveToHistory:b})}WARN(e){this.caution(e)}normal({title:e,body:n,message:r,type:f,duration:d,logToConsole:p,saveToHistory:b}){this.open({method:"toast",level:"normal",title:e,body:n,message:r,type:f,duration:d,logToConsole:p,saveToHistory:b})}INFO(e){this.normal(e)}DEBUG(e){this.normal(e)}standby({title:e,body:n,message:r,type:f,duration:d,logToConsole:p,saveToHistory:b}){this.open({method:"toast",level:"standby",title:e,body:n,message:r,type:f,duration:d,logToConsole:p,saveToHistory:b})}off({title:e,body:n,message:r,type:f,duration:d,logToConsole:p,saveToHistory:b}){this.open({method:"toast",level:"off",title:e,body:n,message:r,type:f,duration:d,logToConsole:p,saveToHistory:b})}}const RE={install(t,e){const n=new LE(e);t.provide("notify",n),t.config.globalProperties.hasOwnProperty("$notify")||(t.config.globalProperties.$notify=n)}},n0=100,r0=Mf({state:{notifyHistory:[],namedWidgets:{}},getters:{namedWidget:t=>e=>t.namedWidgets[e]},mutations:{notifyAddHistory:(t,e)=>{t.notifyHistory.length>=n0&&(t.notifyHistory.length=n0-1),t.notifyHistory.unshift(e)},notifyClearHistory:t=>{t.notifyHistory=[]},setNamedWidget:(t,e)=>{Object.assign(t.namedWidgets,e)},clearNamedWidget:(t,e)=>{delete t.namedWidgets[e]}},modules:{}});function i0(t){let e;return t!==null&&typeof t=="object"&&((e=Object.getPrototypeOf(t))===Object.prototype||e===null)}function OE(t,e){const n={};for(const r of e)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function o0(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r={};for(const f in t)r[f]=t[f];for(const f in e){const d=t[f],p=e[f];if(i0(d)&&i0(p)){r[f]=o0(d,p,n);continue}if(n&&Array.isArray(d)&&Array.isArray(p)){r[f]=n(d,p);continue}r[f]=p}return r}function Ka(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(Ka.cache.has(t))return Ka.cache.get(t);const e=t.replace(/[^a-z]/gi,"-").replace(/\B([A-Z])/g,"-$1").toLowerCase();return Ka.cache.set(t,e),e}Ka.cache=new Map;function DE(t){yf(`Vuetify: ${t}`)}function s0(t,e){return n=>Object.keys(t).reduce((r,f)=>{const d=typeof t[f]=="object"&&t[f]!=null&&!Array.isArray(t[f])?t[f]:{type:t[f]};return n&&f in n?r[f]={...d,default:n[f]}:r[f]=d,e&&!r[f].source&&(r[f].source=e),r},{})}function a0(t,e){const n=Cf();if(!n)throw new Error(`[Vuetify] ${t} must be called from inside a setup function`);return n}function NE(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:a0("injectSelf");const{provides:n}=e;if(n&&t in n)return n[t]}const md=Symbol.for("vuetify:defaults");function l0(){const t=bf(md);if(!t)throw new Error("[Vuetify] Could not find defaults instance");return t}function FE(t,e){return t.props&&(typeof t.props[e]<"u"||typeof t.props[Ka(e)]<"u")}function PE(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:l0();const r=a0("useDefaults");if(e=e??r.type.name??r.type.__name,!e)throw new Error("[Vuetify] Could not determine component name");const f=ru(()=>{var h;return(h=n.value)==null?void 0:h[t._as??e]}),d=new Proxy(t,{get(h,g){var s,a,c,l;const o=Reflect.get(h,g);if(g==="class"||g==="style")return[(s=f.value)==null?void 0:s[g],o].filter(w=>w!=null);if(FE(r.vnode,g))return o;const u=(a=f.value)==null?void 0:a[g];if(u!==void 0)return u;const m=(l=(c=n.value)==null?void 0:c.global)==null?void 0:l[g];return m!==void 0?m:o}}),p=wf();xf(()=>{if(f.value){const h=Object.entries(f.value).filter(g=>{let[s]=g;return s.startsWith(s[0].toUpperCase())});p.value=h.length?Object.fromEntries(h):void 0}else p.value=void 0});function b(){const h=NE(md,r);kf(md,ru(()=>p.value?o0((h==null?void 0:h.value)??{},p.value):h==null?void 0:h.value))}return{props:d,provideSubDefaults:b}}function wc(t){if(t._setup=t._setup??t.setup,!t.name)return DE("The component is missing an explicit name, unable to generate default prop value"),t;if(t._setup){t.props=s0(t.props??{},t.name)();const e=Object.keys(t.props).filter(n=>n!=="class"&&n!=="style");t.filterProps=function(n){return OE(n,e)},t.props._as=String,t.setup=function(n,r){const f=l0();if(!f.value)return t._setup(n,r);const{props:d,provideSubDefaults:p}=PE(n,n._as??t.name,f),b=t._setup(d,r);return p(),b}}return t}function BE(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return e=>(t?wc:vf)(e)}const WE=[String,Function,Object,Array],xc=s0({icon:{type:WE},tag:{type:[String,Object,Function],required:!0}},"icon");BE()({name:"VComponentIcon",props:xc(),setup(t,e){let{slots:n}=e;return()=>{const r=t.icon;return We(t.tag,null,{default:()=>{var f;return[t.icon?We(r,null,null):(f=n.default)==null?void 0:f.call(n)]}})}}}),wc({name:"VSvgIcon",inheritAttrs:!1,props:xc(),setup(t,e){let{attrs:n}=e;return()=>We(t.tag,fl(n,{style:null}),{default:()=>[We("svg",{class:"v-icon__svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true"},[Array.isArray(t.icon)?t.icon.map(r=>Array.isArray(r)?We("path",{d:r[0],"fill-opacity":r[1]},null):We("path",{d:r},null)):We("path",{d:t.icon},null)])]})}}),wc({name:"VLigatureIcon",props:xc(),setup(t){return()=>We(t.tag,null,{default:()=>[t.icon]})}});const jE=wc({name:"VClassIcon",props:xc(),setup(t){return()=>We(t.tag,{class:t.icon},null)}}),zE={component:t=>js(jE,{...t,class:"mdi"})},vd=Ef({theme:{defaultTheme:"cosmosDark",themes:{cosmosDark:vE}},icons:{defaultSet:"mdi",sets:{mdi:zE,...DM,...NM}}}),yd=nw({createApp:iu,appOptions:{render(){return js(uw,{})},el:"#openc3-tool"},handleInstance:t=>{t.use(mE),t.use(r0),t.use(vd),t.use(SE),t.use(RE,{store:r0})}}),NN=sr("i",yd.bootstrap),FN=sr("j",yd.mount),PN=sr("u",yd.unmount)}}});