openc3-cosmos-tool-cmdtlmserver 7.2.0 → 7.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/tools/cmdtlmserver/{ArrayWidget-D1PArcGr-1cb78ca7cb83e47908ee.js → ArrayWidget-DMSm_P6c-694a5d20f37aee56e971.js} +2 -2
- data/tools/cmdtlmserver/{ArrayplotWidget-DPUPy0qM-9c5325ed3b6e0c89df8f.js → ArrayplotWidget-fdXLhGAl-ee49423a88f0830f3d10.js} +1 -1
- data/tools/cmdtlmserver/{BarColumn-BpdscDQf-2d19bc70f89b83debf2b.js → BarColumn-Bb305iCi-1d6370d3a5948e7070fb.js} +1 -1
- data/tools/cmdtlmserver/{BlockWidget-_VUsK5T9-87cecde84ec9eee53d78.js → BlockWidget-Do3W6tZh-0465ab5ccbba95c9cd95.js} +2 -2
- data/tools/cmdtlmserver/{ButtonWidget-DE41o-cg-c5cd6e74dbabd0420d0e.js → ButtonWidget-DukCQt0F-73553c5eb8665f5a122c.js} +2 -2
- data/tools/cmdtlmserver/CanvasWidget-BRdVWln5-ecfd6c23ebdef1641cbe.js +1 -0
- data/tools/cmdtlmserver/CanvasdotWidget-DV8PeDWz-9ea509837174f807accc.js +1 -0
- data/tools/cmdtlmserver/{CanvasimageWidget-COv_Qnc8-53c8b97c1eff0cb369be.js → CanvasimageWidget-Czbq1GuF-f6237d2815bb4fb67627.js} +1 -1
- data/tools/cmdtlmserver/{CanvasimagevalueWidget-BhuUqLOo-388fa33a3da2d971b05b.js → CanvasimagevalueWidget-DKt5JgEt-4d4748409b4390fd9317.js} +1 -1
- data/tools/cmdtlmserver/CanvaslabelWidget-DW2I1ra1-21be90e9689988d7cc0b.js +1 -0
- data/tools/cmdtlmserver/CanvaslabelvalueWidget-BhzvZVfD-98ba8f4d0b737ae50149.js +1 -0
- data/tools/cmdtlmserver/{CanvaslineWidget-D1K_6mAY-957ef26c77ffcf3c26aa.js → CanvaslineWidget-DsjY37tp-333343a7e55e7ced336a.js} +1 -1
- data/tools/cmdtlmserver/{CanvaslinevalueWidget-D4eaxWhR-488c1eb347eb93f3db22.js → CanvaslinevalueWidget-ihI97G8T-a999105fab2c48e7d5a3.js} +1 -1
- data/tools/cmdtlmserver/CheckbuttonWidget-B778Z-Zo-929c0f581f4e6fc8bb9b.js +1 -0
- data/tools/cmdtlmserver/{CmdPacketsTab-5213fff88faeff8c2bf0.js → CmdPacketsTab-ab63982334bccb674566.js} +1 -1
- data/tools/cmdtlmserver/{CmdTlmServer-db96cc7a37046fc23e08.js → CmdTlmServer-dbb3257de023db2ad7db.js} +2 -2
- data/tools/cmdtlmserver/ComboboxWidget-CuuvOL9K-580e3a816c2a39c9dc31.js +1 -0
- data/tools/cmdtlmserver/DataFlowsTab-651405c9f3cd11ec53ae.js +1 -0
- data/tools/cmdtlmserver/{DateWidget-DkNWx28s-7f519b2f30faeb9fe3fd.js → DateWidget-COvQTAeo-8e7e5760cca1eca77fb7.js} +1 -1
- data/tools/cmdtlmserver/{DetailsDialog-F4KgYM6m-df810d02cfb5e0198172.js → DetailsDialog-DE7lK17G-f251b58f150be03f9878.js} +1 -1
- data/tools/cmdtlmserver/{DynamicWidget-BuSbQVhf-18179cf5a61cbc723d72.js → DynamicWidget-BuSbQVhf-d28b4dd265895ced834e.js} +1 -1
- data/tools/cmdtlmserver/{FilechecksumWidget-DSfNEnDJ-b6d7f28b678c6b571db9.js → FilechecksumWidget-DRnOt_UE-e8bcb330e9f8161abcb5.js} +1 -1
- data/tools/cmdtlmserver/{FiledisplayWidget-D2cxMmrP-91c627968612f56bef53.js → FiledisplayWidget-26R46EjS-50600e2205e679c6e7a3.js} +1 -1
- data/tools/cmdtlmserver/{FormatvalueWidget-6-bj_PJO-5621420fe3506d1932e4.js → FormatvalueWidget-BxyscMJc-deb6fbbd21db3f9b9533.js} +1 -1
- data/tools/cmdtlmserver/Graph-BKw7xw1a-cafa3fdb6d474421c777.js +1 -0
- data/tools/cmdtlmserver/{GraphWidget-COXK3Dab-3f26903e4d5da289ab20.js → GraphWidget-Cs9mvqUu-bb3bb075fd0ea3764beb.js} +1 -1
- data/tools/cmdtlmserver/{HorizontalWidget-C9UFBPsk-84c81a59fc34282ffe71.js → HorizontalWidget-fWLFj7Kg-87dfe4a783ca9d8718a3.js} +1 -1
- data/tools/cmdtlmserver/{HorizontalboxWidget-CWLfmRtr-09493eb27796c1b12919.js → HorizontalboxWidget-DEaXhKEz-3cc78a62e93fced5cc2d.js} +1 -1
- data/tools/cmdtlmserver/HorizontallineWidget-Bvu1QP3S-1c0a38d8daf4285046b0.js +1 -0
- data/tools/cmdtlmserver/{IframeWidget-Bn9eGzrq-fdd10b58ac32de3de437.js → IframeWidget-B143k4lo-211336261edc12558ba4.js} +1 -1
- data/tools/cmdtlmserver/{ImageLoader-_gAudhVo-003969d31d1c3d9e5b32.js → ImageLoader-BCpmQHIl-e1f186d47f7443384752.js} +1 -1
- data/tools/cmdtlmserver/{ImageviewerWidget-BUWhF32Z-751c45f6392ccbe675d5.js → ImageviewerWidget-CLrvr6dw-dbefc7bb490747b4d32b.js} +1 -1
- data/tools/cmdtlmserver/{InterfaceFlowChart-cfadd36d819b485a73ef.js → InterfaceFlowChart-87892813bbc3da7dd816.js} +1 -1
- data/tools/cmdtlmserver/{InterfacesTab-dca6d7668848c4078e8d.js → InterfacesTab-c3d2cc4844087b3f946d.js} +1 -1
- data/tools/cmdtlmserver/{LabelWidget-BhzkN06D-4209a141ff664143bb0f.js → LabelWidget-CA1bTX2B-2c9d603681176335c5dd.js} +1 -1
- data/tools/cmdtlmserver/{LabelledWidget-vx8NvW1b-a9879fd6ddfc57fa36b9.js → LabelledWidget-BDhvr03J-fe41df86dd3cc7e1d625.js} +1 -1
- data/tools/cmdtlmserver/{LabelprogressbarWidget-t5PvKuS4-feb53cc1f8715b39f864.js → LabelprogressbarWidget-g7A5CE8S-17fe760704ac3e7697ad.js} +1 -1
- data/tools/cmdtlmserver/LabelsparklineWidget-B27xXxWg-960e3827bda04825c04a.js +1 -0
- data/tools/cmdtlmserver/{LabelvalueWidget-Cbs1DBK2-ce888769e60d2e4aad2c.js → LabelvalueWidget-DFn8o6LC-382c91895aa50abef201.js} +1 -1
- data/tools/cmdtlmserver/{LabelvaluedescWidget-B7OIOGc0-878e5a0b12c95f9dc732.js → LabelvaluedescWidget-BQpaxFaB-abcd49094e4d21057a3d.js} +1 -1
- data/tools/cmdtlmserver/LabelvaluelimitsbarWidget-C-z96q8z-1f5e8f4cf393ac65098f.js +1 -0
- data/tools/cmdtlmserver/LabelvaluelimitscolumnWidget-D2TMEv9O-11b6844f84b58504c3aa.js +1 -0
- data/tools/cmdtlmserver/{LabelvaluerangebarWidget-Pt_evm3v-77436cdf1233d55bfb62.js → LabelvaluerangebarWidget-D99dZCjz-2c72dd417308f8cf3b83.js} +1 -1
- data/tools/cmdtlmserver/{Layout-CKmC50QZ-85f8ef7d9d4b778fc3f8.js → Layout--_zNJWnw-9367ae190fb0e9bf1b84.js} +1 -1
- data/tools/cmdtlmserver/{LedWidget-D1lmNXpi-3a5b364ce2a97685e9dd.js → LedWidget-D2uxHxe3-22c8c1f89536f753f5e6.js} +1 -1
- data/tools/cmdtlmserver/{LimitsBar-D5IZu7eX-07cdd7c4da705a5b2cac.js → LimitsBar-DN1s8-MS-d3248be80e3262273e82.js} +1 -1
- data/tools/cmdtlmserver/{LimitsbarWidget-VpxQXE-e-a756975fa42f4776712f.js → LimitsbarWidget-Cqhh7LKU-7f40da6484ccbe5da287.js} +1 -1
- data/tools/cmdtlmserver/{LimitscolorWidget-79P41CX7-ad179ada10464166cfb2.js → LimitscolorWidget-haGB4RbY-ddf6b0791eb1be4ac6c5.js} +1 -1
- data/tools/cmdtlmserver/{LimitscolumnWidget-BFDXhJeZ-ded4fac25cb92257eb32.js → LimitscolumnWidget-B1GdmlR_-86b9a2cc5c084b705674.js} +1 -1
- data/tools/cmdtlmserver/{LinegraphWidget-VqkpOlws-fdf5639852f6b641d75f.js → LinegraphWidget-COSOQ0uM-a5300046319a8e9bc2ac.js} +1 -1
- data/tools/cmdtlmserver/{MatrixbycolumnsWidget--ihvirDP-13588dfd9e05a20284cf.js → MatrixbycolumnsWidget-coHlLETG-e799eaa675cfbf970ed5.js} +1 -1
- data/tools/cmdtlmserver/{OpenC3TimePicker-B0lAIU91-1d7cb9e69fdb3e2d19db.js → OpenC3TimePicker-B8Vu9GBz-89d21b420245131e470d.js} +1 -1
- data/tools/cmdtlmserver/{ProgressbarWidget-BIB3r9SL-89623753647970ec01f0.js → ProgressbarWidget-D_yFssIZ-2510755cf05a8167431f.js} +1 -1
- data/tools/cmdtlmserver/{RadiobuttonWidget-C5rxLM7K-572c4d7c32c43b82c96b.js → RadiobuttonWidget-DL0jVTcb-101358296cb6f3e5ac75.js} +1 -1
- data/tools/cmdtlmserver/{RadiogroupWidget-CciTCv1U-ebc68de8edecb013d87d.js → RadiogroupWidget-2-td69IA-98144436c4729f2db047.js} +1 -1
- data/tools/cmdtlmserver/{RangebarWidget-MPQYi2Km-6b2b3f2e820d4e5ce633.js → RangebarWidget-i2mlnxys-3ecd19c88b6a2f13fc7a.js} +1 -1
- data/tools/cmdtlmserver/{RawBuffer-ebb6aadc11fa84048a7f.js → RawBuffer-5a59e58e37f6021cf46c.js} +1 -1
- data/tools/cmdtlmserver/{RawDialog-4383b630959e2310610e.js → RawDialog-3a0c000973893535a456.js} +1 -1
- data/tools/cmdtlmserver/{RollupWidget-CfjGAhzg-6b1de39f95e298a21e0f.js → RollupWidget-BEJ2Icg1-416b8d9160f2a81fd538.js} +1 -1
- data/tools/cmdtlmserver/{RoutersTab-7438fce73b7c2c45c9c7.js → RoutersTab-7710ec67843901567d25.js} +1 -1
- data/tools/cmdtlmserver/ScrollwindowWidget-BU1cRpL8-d99f9e1c5467abc7ed03.js +1 -0
- data/tools/cmdtlmserver/{SignalWidget-C-qecoTO-b31583be1fe1a7a01769.js → SignalWidget-hiTkeem9-9efe6cdd22515ebf8555.js} +1 -1
- data/tools/cmdtlmserver/SpacerWidget-CBmzzS_X-e8f51b2251bb08fed6b0.js +1 -0
- data/tools/cmdtlmserver/SparklineWidget-CizRh6QR-92a3ebcc84a5687d3b93.js +1 -0
- data/tools/cmdtlmserver/{StatusTab-7f111deb77c4a2bc05b0.js → StatusTab-efcdd278c79f71b06e9b.js} +1 -1
- data/tools/cmdtlmserver/{TabbookWidget-CXklff-l-8ad144458fb01c903478.js → TabbookWidget-CvL3Ozmx-19c91b22633cf0927a1e.js} +1 -1
- data/tools/cmdtlmserver/{TargetsTab-29f400440b894771ad34.js → TargetsTab-326711a03f6c9686634d.js} +1 -1
- data/tools/cmdtlmserver/TextboxWidget-BtEwXzDO-52792ac2b6593c85c776.js +1 -0
- data/tools/cmdtlmserver/TextfieldWidget-BDbb57HP-7306fcc70fc27079b1d3.js +1 -0
- data/tools/cmdtlmserver/TimeWidget-DzD8U8l8-db805689f0b8dbaab9f7.js +1 -0
- data/tools/cmdtlmserver/TitleWidget-CL53vf14-c0987297e98b6c858650.js +1 -0
- data/tools/cmdtlmserver/{TlmPacketsTab-6453f72e7567b78bb979.js → TlmPacketsTab-91250bba537c7eb02f7c.js} +1 -1
- data/tools/cmdtlmserver/{Updater-d97ddec520bea4a73d3f.js → Updater-af04370b0601580396d1.js} +1 -1
- data/tools/cmdtlmserver/{VWidget-oMbywhLA-03a02aaf028be7a3c9c0.js → VWidget-5qOYva88-5dc877752d53235d987d.js} +1 -1
- data/tools/cmdtlmserver/ValueWidget-CAkuc_w_-0721aa9556f274d056ba.js +1 -0
- data/tools/cmdtlmserver/ValuelimitsbarWidget-Y8sO05E1-f729f6e347b2f5825407.js +1 -0
- data/tools/cmdtlmserver/{ValuelimitscolumnWidget-BVt6nLXq-ca32b86e6abfcdcca7df.js → ValuelimitscolumnWidget-iOjB_fCj-ae174dd346919467bac7.js} +1 -1
- data/tools/cmdtlmserver/ValuerangebarWidget-DsCoeAm6-7804711bfe999dad21a6.js +1 -0
- data/tools/cmdtlmserver/VerticalWidget-C6O0dhRU-a30bbb27eaa68c233c89.js +1 -0
- data/tools/cmdtlmserver/{VerticalboxWidget-C7RrkfY0-f0cc6f904b80b09e5ba7.js → VerticalboxWidget-B-CoqRJG-ba12b0177fbcd7fb76e1.js} +1 -1
- data/tools/cmdtlmserver/{Widget-D_HaosJK-e286c8e7e2106d81e87c.js → Widget-CtYQauzA-69fc956797d4c4719727.js} +1 -1
- data/tools/cmdtlmserver/main-78902a467d9f5f7771dd.js +1499 -0
- data/tools/cmdtlmserver/main.js +1 -1
- data/tools/cmdtlmserver/services-fee3a04fec3ff6af8998.js +10 -0
- metadata +84 -84
- data/tools/cmdtlmserver/CanvasWidget-BEi8h3Mq-e35c5a9baa7ecd914bcf.js +0 -1
- data/tools/cmdtlmserver/CanvasdotWidget-eZuMgkhL-fda5d43523fafb058839.js +0 -1
- data/tools/cmdtlmserver/CanvaslabelWidget-DtvbgeYH-6e001a64a4a18263f0ee.js +0 -1
- data/tools/cmdtlmserver/CanvaslabelvalueWidget-C_FRIeNb-4134766817f8dcab10e9.js +0 -1
- data/tools/cmdtlmserver/CheckbuttonWidget-ByxMDkiS-6e069bf3ea2500374efe.js +0 -1
- data/tools/cmdtlmserver/ComboboxWidget-CAGxGv2r-d17c3e9aaa2b1b02ab46.js +0 -1
- data/tools/cmdtlmserver/DataFlowsTab-324bc5957f403e4d2794.js +0 -1
- data/tools/cmdtlmserver/Graph-Cz0Ns1FD-0efdbbd522a909650069.js +0 -1
- data/tools/cmdtlmserver/HorizontallineWidget-DeFkOaYO-257ec3426ecc547ca94f.js +0 -1
- data/tools/cmdtlmserver/LabelsparklineWidget-CebbEH-j-f503f09d02fa4f3918c1.js +0 -1
- data/tools/cmdtlmserver/LabelvaluelimitsbarWidget-C57kf-oQ-0be9055fc642dd213441.js +0 -1
- data/tools/cmdtlmserver/LabelvaluelimitscolumnWidget-BRlNDEqp-e812057ca64792e7caed.js +0 -1
- data/tools/cmdtlmserver/ScrollwindowWidget-CupaygNN-1554ccfbbfa2766e4301.js +0 -1
- data/tools/cmdtlmserver/SpacerWidget-VVkOCb6N-dbdf2c2f889a818d027b.js +0 -1
- data/tools/cmdtlmserver/SparklineWidget-Dsmn38z_-1d9eba2ef6ba778585cd.js +0 -1
- data/tools/cmdtlmserver/TextboxWidget-CHs2VYIv-939d75e16d4590c1f1f8.js +0 -1
- data/tools/cmdtlmserver/TextfieldWidget-CdANAW-6-6a6919e7eb62ef86954f.js +0 -1
- data/tools/cmdtlmserver/TimeWidget-D0xT1wXR-19f76febd2f5779fae7a.js +0 -1
- data/tools/cmdtlmserver/TitleWidget-68NWCcXB-7507be046b0a9b3c127c.js +0 -1
- data/tools/cmdtlmserver/ValueWidget-B1aGUBP7-af6d1d1a57943374ee79.js +0 -1
- data/tools/cmdtlmserver/ValuelimitsbarWidget-B7KcRjLS-de09e4004f70b97b84bc.js +0 -1
- data/tools/cmdtlmserver/ValuerangebarWidget-uVZEI32U-d5bd219c6bc362dc1229.js +0 -1
- data/tools/cmdtlmserver/VerticalWidget-DlftYBjH-7f2f1e45111c6a438cd3.js +0 -1
- data/tools/cmdtlmserver/main-ae88870307d629b1ce0e.js +0 -1499
- data/tools/cmdtlmserver/services-a7fe7e9b036652e7b4b1.js +0 -10
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
System.register([],(function(De,_i){"use strict";return{execute:(function(){function lt(t,e){return function(){return t.apply(e,arguments)}}const{toString:fr}=Object.prototype,{getPrototypeOf:we}=Object,{iterator:Ee,toStringTag:ut}=Symbol,Se=(t=>e=>{const r=fr.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),$=t=>(t=t.toLowerCase(),e=>Se(e)===t),ve=t=>e=>typeof e===t,{isArray:ee}=Array,te=ve("undefined");function oe(t){return t!==null&&!te(t)&&t.constructor!==null&&!te(t.constructor)&&L(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const ht=$("ArrayBuffer");function pr(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&ht(t.buffer),e}const gr=ve("string"),L=ve("function"),dt=ve("number"),ce=t=>t!==null&&typeof t=="object",mr=t=>t===!0||t===!1,Oe=t=>{if(Se(t)!=="object")return!1;const e=we(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(ut in t)&&!(Ee in t)},br=t=>{if(!ce(t)||oe(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},_r=$("Date"),yr=$("File"),wr=t=>!!(t&&typeof t.uri<"u"),Er=t=>t&&typeof t.getParts<"u",Sr=$("Blob"),vr=$("FileList"),Or=t=>ce(t)&&L(t.pipe);function xr(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const ft=xr(),pt=typeof ft.FormData<"u"?ft.FormData:void 0,Rr=t=>{if(!t)return!1;if(pt&&t instanceof pt)return!0;const e=we(t);if(!e||e===Object.prototype||!L(t.append))return!1;const r=Se(t);return r==="formdata"||r==="object"&&L(t.toString)&&t.toString()==="[object FormData]"},Ar=$("URLSearchParams"),[Cr,Tr,Pr,kr]=["ReadableStream","Request","Response","Headers"].map($),Nr=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ae(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let s,n;if(typeof t!="object"&&(t=[t]),ee(t))for(s=0,n=t.length;s<n;s++)e.call(null,t[s],s,t);else{if(oe(t))return;const o=r?Object.getOwnPropertyNames(t):Object.keys(t),i=o.length;let c;for(s=0;s<i;s++)c=o[s],e.call(null,t[c],c,t)}}function gt(t,e){if(oe(t))return null;e=e.toLowerCase();const r=Object.keys(t);let s=r.length,n;for(;s-- >0;)if(n=r[s],e===n.toLowerCase())return n;return null}const K=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,mt=t=>!te(t)&&t!==K;function $e(...t){const{caseless:e,skipUndefined:r}=mt(this)&&this||{},s={},n=(o,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;const c=e&>(s,i)||i,l=qe(s,c)?s[c]:void 0;Oe(l)&&Oe(o)?s[c]=$e(l,o):Oe(o)?s[c]=$e({},o):ee(o)?s[c]=o.slice():(!r||!te(o))&&(s[c]=o)};for(let o=0,i=t.length;o<i;o++)t[o]&&ae(t[o],n);return s}const jr=(t,e,r,{allOwnKeys:s}={})=>(ae(e,(n,o)=>{r&&L(n)?Object.defineProperty(t,o,{__proto__:null,value:lt(n,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,o,{__proto__:null,value:n,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:s}),t),Ir=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Lr=(t,e,r,s)=>{t.prototype=Object.create(e.prototype,s),Object.defineProperty(t.prototype,"constructor",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{__proto__:null,value:e.prototype}),r&&Object.assign(t.prototype,r)},Ur=(t,e,r,s)=>{let n,o,i;const c={};if(e=e||{},t==null)return e;do{for(n=Object.getOwnPropertyNames(t),o=n.length;o-- >0;)i=n[o],(!s||s(i,t,e))&&!c[i]&&(e[i]=t[i],c[i]=!0);t=r!==!1&&we(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},Fr=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;const s=t.indexOf(e,r);return s!==-1&&s===r},Dr=t=>{if(!t)return null;if(ee(t))return t;let e=t.length;if(!dt(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},$r=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&we(Uint8Array)),qr=(t,e)=>{const r=(t&&t[Ee]).call(t);let s;for(;(s=r.next())&&!s.done;){const n=s.value;e.call(t,n[0],n[1])}},Br=(t,e)=>{let r;const s=[];for(;(r=t.exec(e))!==null;)s.push(r);return s},Mr=$("HTMLFormElement"),zr=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,r,s){return r.toUpperCase()+s}),qe=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),Jr=$("RegExp"),bt=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),s={};ae(r,(n,o)=>{let i;(i=e(n,o,t))!==!1&&(s[o]=i||n)}),Object.defineProperties(t,s)},Wr=t=>{bt(t,(e,r)=>{if(L(t)&&["arguments","caller","callee"].includes(r))return!1;const s=t[r];if(L(s)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Hr=(t,e)=>{const r={},s=n=>{n.forEach(o=>{r[o]=!0})};return ee(t)?s(t):s(String(t).split(e)),r},Vr=()=>{},Kr=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function Xr(t){return!!(t&&L(t.append)&&t[ut]==="FormData"&&t[Ee])}const Gr=t=>{const e=new WeakSet,r=s=>{if(ce(s)){if(e.has(s))return;if(oe(s))return s;if(!("toJSON"in s)){e.add(s);const n=ee(s)?[]:{};return ae(s,(o,i)=>{const c=r(o);!te(c)&&(n[i]=c)}),e.delete(s),n}}return s};return r(t)},Qr=$("AsyncFunction"),Yr=t=>t&&(ce(t)||L(t))&&L(t.then)&&L(t.catch),_t=((t,e)=>t?setImmediate:e?((r,s)=>(K.addEventListener("message",({source:n,data:o})=>{n===K&&o===r&&s.length&&s.shift()()},!1),n=>{s.push(n),K.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",L(K.postMessage)),Zr=typeof queueMicrotask<"u"?queueMicrotask.bind(K):typeof process<"u"&&process.nextTick||_t,es=t=>t!=null&&L(t[Ee]),a={isArray:ee,isArrayBuffer:ht,isBuffer:oe,isFormData:Rr,isArrayBufferView:pr,isString:gr,isNumber:dt,isBoolean:mr,isObject:ce,isPlainObject:Oe,isEmptyObject:br,isReadableStream:Cr,isRequest:Tr,isResponse:Pr,isHeaders:kr,isUndefined:te,isDate:_r,isFile:yr,isReactNativeBlob:wr,isReactNative:Er,isBlob:Sr,isRegExp:Jr,isFunction:L,isStream:Or,isURLSearchParams:Ar,isTypedArray:$r,isFileList:vr,forEach:ae,merge:$e,extend:jr,trim:Nr,stripBOM:Ir,inherits:Lr,toFlatObject:Ur,kindOf:Se,kindOfTest:$,endsWith:Fr,toArray:Dr,forEachEntry:qr,matchAll:Br,isHTMLForm:Mr,hasOwnProperty:qe,hasOwnProp:qe,reduceDescriptors:bt,freezeMethods:Wr,toObjectSet:Hr,toCamelCase:zr,noop:Vr,toFiniteNumber:Kr,findKey:gt,global:K,isContextDefined:mt,isSpecCompliantForm:Xr,toJSONObject:Gr,isAsyncFn:Qr,isThenable:Yr,setImmediate:_t,asap:Zr,isIterable:es},ts=a.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"]),rs=t=>{const e={};let r,s,n;return t&&t.split(`
|
|
2
|
-
`).forEach(function(o){n=o.indexOf(":"),r=o.substring(0,n).trim().toLowerCase(),s=o.substring(n+1).trim(),!(!r||e[r]&&ts[r])&&(r==="set-cookie"?e[r]?e[r].push(s):e[r]=[s]:e[r]=e[r]?e[r]+", "+s:s)}),e};function ss(t){let e=0,r=t.length;for(;e<r;){const s=t.charCodeAt(e);if(s!==9&&s!==32)break;e+=1}for(;r>e;){const s=t.charCodeAt(r-1);if(s!==9&&s!==32)break;r-=1}return e===0&&r===t.length?t:t.slice(e,r)}const ns=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),is=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Be(t,e){return a.isArray(t)?t.map(r=>Be(r,e)):ss(String(t).replace(e,""))}const os=t=>Be(t,ns),cs=t=>Be(t,is);function yt(t){const e=Object.create(null);return a.forEach(t.toJSON(),(r,s)=>{e[s]=cs(r)}),e}const wt=Symbol("internals");function le(t){return t&&String(t).trim().toLowerCase()}function xe(t){return t===!1||t==null?t:a.isArray(t)?t.map(xe):os(String(t))}function as(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=r.exec(t);)e[s[1]]=s[2];return e}const ls=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Me(t,e,r,s,n){if(a.isFunction(s))return s.call(this,e,r);if(n&&(e=r),!!a.isString(e)){if(a.isString(s))return e.indexOf(s)!==-1;if(a.isRegExp(s))return s.test(e)}}function us(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,s)=>r.toUpperCase()+s)}function hs(t,e){const r=a.toCamelCase(" "+e);["get","set","has"].forEach(s=>{Object.defineProperty(t,s+r,{__proto__:null,value:function(n,o,i){return this[s].call(this,e,n,o,i)},configurable:!0})})}let j=class{constructor(t){t&&this.set(t)}set(t,e,r){const s=this;function n(i,c,l){const u=le(c);if(!u)throw new Error("header name must be a non-empty string");const h=a.findKey(s,u);(!h||s[h]===void 0||l===!0||l===void 0&&s[h]!==!1)&&(s[h||c]=xe(i))}const o=(i,c)=>a.forEach(i,(l,u)=>n(l,u,c));if(a.isPlainObject(t)||t instanceof this.constructor)o(t,e);else if(a.isString(t)&&(t=t.trim())&&!ls(t))o(rs(t),e);else if(a.isObject(t)&&a.isIterable(t)){let i={},c,l;for(const u of t){if(!a.isArray(u))throw TypeError("Object iterator must return a key-value pair");i[l=u[0]]=(c=i[l])?a.isArray(c)?[...c,u[1]]:[c,u[1]]:u[1]}o(i,e)}else t!=null&&n(e,t,r);return this}get(t,e){if(t=le(t),t){const r=a.findKey(this,t);if(r){const s=this[r];if(!e)return s;if(e===!0)return as(s);if(a.isFunction(e))return e.call(this,s,r);if(a.isRegExp(e))return e.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=le(t),t){const r=a.findKey(this,t);return!!(r&&this[r]!==void 0&&(!e||Me(this,this[r],r,e)))}return!1}delete(t,e){const r=this;let s=!1;function n(o){if(o=le(o),o){const i=a.findKey(r,o);i&&(!e||Me(r,r[i],i,e))&&(delete r[i],s=!0)}}return a.isArray(t)?t.forEach(n):n(t),s}clear(t){const e=Object.keys(this);let r=e.length,s=!1;for(;r--;){const n=e[r];(!t||Me(this,this[n],n,t,!0))&&(delete this[n],s=!0)}return s}normalize(t){const e=this,r={};return a.forEach(this,(s,n)=>{const o=a.findKey(r,n);if(o){e[o]=xe(s),delete e[n];return}const i=t?us(n):String(n).trim();i!==n&&delete e[n],e[i]=xe(s),r[i]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return a.forEach(this,(r,s)=>{r!=null&&r!==!1&&(e[s]=t&&a.isArray(r)?r.join(", "):r)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
|
|
3
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const r=new this(t);return e.forEach(s=>r.set(s)),r}static accessor(t){const e=(this[wt]=this[wt]={accessors:{}}).accessors,r=this.prototype;function s(n){const o=le(n);e[o]||(hs(r,n),e[o]=!0)}return a.isArray(t)?t.forEach(s):s(t),this}};j.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),a.reduceDescriptors(j.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(s){this[r]=s}}}),a.freezeMethods(j);const ds="[REDACTED ****]";function fs(t){if(a.hasOwnProp(t,"toJSON"))return!0;let e=Object.getPrototypeOf(t);for(;e&&e!==Object.prototype;){if(a.hasOwnProp(e,"toJSON"))return!0;e=Object.getPrototypeOf(e)}return!1}function ps(t,e){const r=new Set(e.map(o=>String(o).toLowerCase())),s=[],n=o=>{if(o===null||typeof o!="object"||a.isBuffer(o))return o;if(s.indexOf(o)!==-1)return;o instanceof j&&(o=o.toJSON()),s.push(o);let i;if(a.isArray(o))i=[],o.forEach((c,l)=>{const u=n(c);a.isUndefined(u)||(i[l]=u)});else{if(!a.isPlainObject(o)&&fs(o))return s.pop(),o;i=Object.create(null);for(const[c,l]of Object.entries(o)){const u=r.has(c.toLowerCase())?ds:n(l);a.isUndefined(u)||(i[c]=u)}}return s.pop(),i};return n(t)}let p=class hr extends Error{static from(e,r,s,n,o,i){const c=new hr(e.message,r||e.code,s,n,o);return c.cause=e,c.name=e.name,e.status!=null&&c.status==null&&(c.status=e.status),i&&Object.assign(c,i),c}constructor(e,r,s,n,o){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),s&&(this.config=s),n&&(this.request=n),o&&(this.response=o,this.status=o.status)}toJSON(){const e=this.config,r=e&&a.hasOwnProp(e,"redact")?e.redact:void 0,s=a.isArray(r)&&r.length>0?ps(e,r):a.toJSONObject(e);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:s,code:this.code,status:this.status}}};p.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",p.ERR_BAD_OPTION="ERR_BAD_OPTION",p.ECONNABORTED="ECONNABORTED",p.ETIMEDOUT="ETIMEDOUT",p.ECONNREFUSED="ECONNREFUSED",p.ERR_NETWORK="ERR_NETWORK",p.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",p.ERR_DEPRECATED="ERR_DEPRECATED",p.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",p.ERR_BAD_REQUEST="ERR_BAD_REQUEST",p.ERR_CANCELED="ERR_CANCELED",p.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",p.ERR_INVALID_URL="ERR_INVALID_URL",p.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const gs=null;function ze(t){return a.isPlainObject(t)||a.isArray(t)}function Et(t){return a.endsWith(t,"[]")?t.slice(0,-2):t}function Je(t,e,r){return t?t.concat(e).map(function(s,n){return s=Et(s),!r&&n?"["+s+"]":s}).join(r?".":""):e}function ms(t){return a.isArray(t)&&!t.some(ze)}const bs=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function Re(t,e,r){if(!a.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,r=a.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(d,E){return!a.isUndefined(E[d])});const s=r.metaTokens,n=r.visitor||f,o=r.dots,i=r.indexes,c=r.Blob||typeof Blob<"u"&&Blob,l=r.maxDepth===void 0?100:r.maxDepth,u=c&&a.isSpecCompliantForm(e);if(!a.isFunction(n))throw new TypeError("visitor must be a function");function h(d){if(d===null)return"";if(a.isDate(d))return d.toISOString();if(a.isBoolean(d))return d.toString();if(!u&&a.isBlob(d))throw new p("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(d)||a.isTypedArray(d)?u&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function f(d,E,b){let _=d;if(a.isReactNative(e)&&a.isReactNativeBlob(d))return e.append(Je(b,E,o),h(d)),!1;if(d&&!b&&typeof d=="object"){if(a.endsWith(E,"{}"))E=s?E:E.slice(0,-2),d=JSON.stringify(d);else if(a.isArray(d)&&ms(d)||(a.isFileList(d)||a.endsWith(E,"[]"))&&(_=a.toArray(d)))return E=Et(E),_.forEach(function(w,v){!(a.isUndefined(w)||w===null)&&e.append(i===!0?Je([E],v,o):i===null?E:E+"[]",h(w))}),!1}return ze(d)?!0:(e.append(Je(b,E,o),h(d)),!1)}const g=[],m=Object.assign(bs,{defaultVisitor:f,convertValue:h,isVisitable:ze});function S(d,E,b=0){if(!a.isUndefined(d)){if(b>l)throw new p("Object is too deeply nested ("+b+" levels). Max depth: "+l,p.ERR_FORM_DATA_DEPTH_EXCEEDED);if(g.indexOf(d)!==-1)throw Error("Circular reference detected in "+E.join("."));g.push(d),a.forEach(d,function(_,w){(!(a.isUndefined(_)||_===null)&&n.call(e,_,a.isString(w)?w.trim():w,E,m))===!0&&S(_,E?E.concat(w):[w],b+1)}),g.pop()}}if(!a.isObject(t))throw new TypeError("data must be an object");return S(t),e}function St(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(t).replace(/[!'()~]|%20/g,function(r){return e[r]})}function We(t,e){this._pairs=[],t&&Re(t,this,e)}const vt=We.prototype;vt.append=function(t,e){this._pairs.push([t,e])},vt.toString=function(t){const e=t?function(r){return t.call(this,r,St)}:St;return this._pairs.map(function(r){return e(r[0])+"="+e(r[1])},"").join("&")};function _s(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Ot(t,e,r){if(!e)return t;const s=r&&r.encode||_s,n=a.isFunction(r)?{serialize:r}:r,o=n&&n.serialize;let i;if(o?i=o(e,n):i=a.isURLSearchParams(e)?e.toString():new We(e,n).toString(s),i){const c=t.indexOf("#");c!==-1&&(t=t.slice(0,c)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class xt{constructor(){this.handlers=[]}use(e,r,s){return this.handlers.push({fulfilled:e,rejected:r,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){a.forEach(this.handlers,function(r){r!==null&&e(r)})}}const He={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},ys=typeof URLSearchParams<"u"?URLSearchParams:We,ws=typeof FormData<"u"?FormData:null,Es=typeof Blob<"u"?Blob:null,Ss={isBrowser:!0,classes:{URLSearchParams:ys,FormData:ws,Blob:Es},protocols:["http","https","file","blob","url","data"]},Ve=typeof window<"u"&&typeof document<"u",Ke=typeof navigator=="object"&&navigator||void 0,vs=Ve&&(!Ke||["ReactNative","NativeScript","NS"].indexOf(Ke.product)<0),Os=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",xs=Ve&&window.location.href||"http://localhost",Rs=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ve,hasStandardBrowserEnv:vs,hasStandardBrowserWebWorkerEnv:Os,navigator:Ke,origin:xs},Symbol.toStringTag,{value:"Module"})),T={...Rs,...Ss};function As(t,e){return Re(t,new T.classes.URLSearchParams,{visitor:function(r,s,n,o){return T.isNode&&a.isBuffer(r)?(this.append(s,r.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...e})}function Cs(t){return a.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Ts(t){const e={},r=Object.keys(t);let s;const n=r.length;let o;for(s=0;s<n;s++)o=r[s],e[o]=t[o];return e}function Rt(t){function e(r,s,n,o){let i=r[o++];if(i==="__proto__")return!0;const c=Number.isFinite(+i),l=o>=r.length;return i=!i&&a.isArray(n)?n.length:i,l?(a.hasOwnProp(n,i)?n[i]=a.isArray(n[i])?n[i].concat(s):[n[i],s]:n[i]=s,!c):((!a.hasOwnProp(n,i)||!a.isObject(n[i]))&&(n[i]=[]),e(r,s,n[i],o)&&a.isArray(n[i])&&(n[i]=Ts(n[i])),!c)}if(a.isFormData(t)&&a.isFunction(t.entries)){const r={};return a.forEachEntry(t,(s,n)=>{e(Cs(s),n,r,0)}),r}return null}const re=(t,e)=>t!=null&&a.hasOwnProp(t,e)?t[e]:void 0;function Ps(t,e,r){if(a.isString(t))try{return(e||JSON.parse)(t),a.trim(t)}catch(s){if(s.name!=="SyntaxError")throw s}return(r||JSON.stringify)(t)}const ue={transitional:He,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const r=e.getContentType()||"",s=r.indexOf("application/json")>-1,n=a.isObject(t);if(n&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return s?JSON.stringify(Rt(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t)||a.isReadableStream(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(n){const i=re(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return As(t,i).toString();if((o=a.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=re(this,"env"),l=c&&c.FormData;return Re(o?{"files[]":t}:t,l&&new l,i)}}return n||s?(e.setContentType("application/json",!1),Ps(t)):t}],transformResponse:[function(t){const e=re(this,"transitional")||ue.transitional,r=e&&e.forcedJSONParsing,s=re(this,"responseType"),n=s==="json";if(a.isResponse(t)||a.isReadableStream(t))return t;if(t&&a.isString(t)&&(r&&!s||n)){const o=!(e&&e.silentJSONParsing)&&n;try{return JSON.parse(t,re(this,"parseReviver"))}catch(i){if(o)throw i.name==="SyntaxError"?p.from(i,p.ERR_BAD_RESPONSE,this,null,re(this,"response")):i}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:T.classes.FormData,Blob:T.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch","query"],t=>{ue.headers[t]={}});function Xe(t,e){const r=this||ue,s=e||r,n=j.from(s.headers);let o=s.data;return a.forEach(t,function(i){o=i.call(r,o,n.normalize(),e?e.status:void 0)}),n.normalize(),o}function At(t){return!!(t&&t.__CANCEL__)}let he=class extends p{constructor(t,e,r){super(t??"canceled",p.ERR_CANCELED,e,r),this.name="CanceledError",this.__CANCEL__=!0}};function Ct(t,e,r){const s=r.config.validateStatus;!r.status||!s||s(r.status)?t(r):e(new p("Request failed with status code "+r.status,r.status>=400&&r.status<500?p.ERR_BAD_REQUEST:p.ERR_BAD_RESPONSE,r.config,r.request,r))}function ks(t){const e=/^([-+\w]{1,25}):(?:\/\/)?/.exec(t);return e&&e[1]||""}function Ns(t,e){t=t||10;const r=new Array(t),s=new Array(t);let n=0,o=0,i;return e=e!==void 0?e:1e3,function(c){const l=Date.now(),u=s[o];i||(i=l),r[n]=c,s[n]=l;let h=o,f=0;for(;h!==n;)f+=r[h++],h=h%t;if(n=(n+1)%t,n===o&&(o=(o+1)%t),l-i<e)return;const g=u&&l-u;return g?Math.round(f*1e3/g):void 0}}function js(t,e){let r=0,s=1e3/e,n,o;const i=(c,l=Date.now())=>{r=l,n=null,o&&(clearTimeout(o),o=null),t(...c)};return[(...c)=>{const l=Date.now(),u=l-r;u>=s?i(c,l):(n=c,o||(o=setTimeout(()=>{o=null,i(n)},s-u)))},()=>n&&i(n)]}const Ae=(t,e,r=3)=>{let s=0;const n=Ns(50,250);return js(o=>{if(!o||typeof o.loaded!="number")return;const i=o.loaded,c=o.lengthComputable?o.total:void 0,l=c!=null?Math.min(i,c):i,u=Math.max(0,l-s),h=n(u);s=Math.max(s,l);const f={loaded:l,total:c,progress:c?l/c:void 0,bytes:u,rate:h||void 0,estimated:h&&c?(c-l)/h:void 0,event:o,lengthComputable:c!=null,[e?"download":"upload"]:!0};t(f)},r)},Tt=(t,e)=>{const r=t!=null;return[s=>e[0]({lengthComputable:r,total:t,loaded:s}),e[1]]},Pt=t=>(...e)=>a.asap(()=>t(...e)),Is=T.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,T.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(T.origin),T.navigator&&/(msie|trident)/i.test(T.navigator.userAgent)):()=>!0,Ls=T.hasStandardBrowserEnv?{write(t,e,r,s,n,o,i){if(typeof document>"u")return;const c=[`${t}=${encodeURIComponent(e)}`];a.isNumber(r)&&c.push(`expires=${new Date(r).toUTCString()}`),a.isString(s)&&c.push(`path=${s}`),a.isString(n)&&c.push(`domain=${n}`),o===!0&&c.push("secure"),a.isString(i)&&c.push(`SameSite=${i}`),document.cookie=c.join("; ")},read(t){if(typeof document>"u")return null;const e=document.cookie.split(";");for(let r=0;r<e.length;r++){const s=e[r].replace(/^\s+/,""),n=s.indexOf("=");if(n!==-1&&s.slice(0,n)===t)return decodeURIComponent(s.slice(n+1))}return null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Us(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Fs(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function kt(t,e,r){let s=!Us(e);return t&&(s||r===!1)?Fs(t,e):e}const Nt=t=>t instanceof j?{...t}:t;function X(t,e){e=e||{};const r=Object.create(null);Object.defineProperty(r,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function s(u,h,f,g){return a.isPlainObject(u)&&a.isPlainObject(h)?a.merge.call({caseless:g},u,h):a.isPlainObject(h)?a.merge({},h):a.isArray(h)?h.slice():h}function n(u,h,f,g){if(a.isUndefined(h)){if(!a.isUndefined(u))return s(void 0,u,f,g)}else return s(u,h,f,g)}function o(u,h){if(!a.isUndefined(h))return s(void 0,h)}function i(u,h){if(a.isUndefined(h)){if(!a.isUndefined(u))return s(void 0,u)}else return s(void 0,h)}function c(u,h,f){if(a.hasOwnProp(e,f))return s(u,h);if(a.hasOwnProp(t,f))return s(void 0,u)}const l={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,allowedSocketPaths:i,responseEncoding:i,validateStatus:c,headers:(u,h,f)=>n(Nt(u),Nt(h),f,!0)};return a.forEach(Object.keys({...t,...e}),function(u){if(u==="__proto__"||u==="constructor"||u==="prototype")return;const h=a.hasOwnProp(l,u)?l[u]:n,f=a.hasOwnProp(t,u)?t[u]:void 0,g=a.hasOwnProp(e,u)?e[u]:void 0,m=h(f,g,u);a.isUndefined(m)&&h!==c||(r[u]=m)}),r}const Ds=["content-type","content-length"];function $s(t,e,r){if(r!=="content-only"){t.set(e);return}Object.entries(e).forEach(([s,n])=>{Ds.includes(s.toLowerCase())&&t.set(s,n)})}const qs=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,r)=>String.fromCharCode(parseInt(r,16))),jt=t=>{const e=X({},t),r=g=>a.hasOwnProp(e,g)?e[g]:void 0,s=r("data");let n=r("withXSRFToken");const o=r("xsrfHeaderName"),i=r("xsrfCookieName");let c=r("headers");const l=r("auth"),u=r("baseURL"),h=r("allowAbsoluteUrls"),f=r("url");if(e.headers=c=j.from(c),e.url=Ot(kt(u,f,h),t.params,t.paramsSerializer),l&&c.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?qs(l.password):""))),a.isFormData(s)&&(T.hasStandardBrowserEnv||T.hasStandardBrowserWebWorkerEnv?c.setContentType(void 0):a.isFunction(s.getHeaders)&&$s(c,s.getHeaders(),r("formDataHeaderPolicy"))),T.hasStandardBrowserEnv&&(a.isFunction(n)&&(n=n(e)),n===!0||n==null&&Is(e.url))){const g=o&&i&&Ls.read(i);g&&c.set(o,g)}return e},Bs=typeof XMLHttpRequest<"u",Ms=Bs&&function(t){return new Promise(function(e,r){const s=jt(t);let n=s.data;const o=j.from(s.headers).normalize();let{responseType:i,onUploadProgress:c,onDownloadProgress:l}=s,u,h,f,g,m;function S(){g&&g(),m&&m(),s.cancelToken&&s.cancelToken.unsubscribe(u),s.signal&&s.signal.removeEventListener("abort",u)}let d=new XMLHttpRequest;d.open(s.method.toUpperCase(),s.url,!0),d.timeout=s.timeout;function E(){if(!d)return;const _=j.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),w={data:!i||i==="text"||i==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:_,config:t,request:d};Ct(function(v){e(v),S()},function(v){r(v),S()},w),d=null}"onloadend"in d?d.onloadend=E:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.startsWith("file:"))||setTimeout(E)},d.onabort=function(){d&&(r(new p("Request aborted",p.ECONNABORTED,t,d)),S(),d=null)},d.onerror=function(_){const w=_&&_.message?_.message:"Network Error",v=new p(w,p.ERR_NETWORK,t,d);v.event=_||null,r(v),S(),d=null},d.ontimeout=function(){let _=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const w=s.transitional||He;s.timeoutErrorMessage&&(_=s.timeoutErrorMessage),r(new p(_,w.clarifyTimeoutError?p.ETIMEDOUT:p.ECONNABORTED,t,d)),S(),d=null},n===void 0&&o.setContentType(null),"setRequestHeader"in d&&a.forEach(yt(o),function(_,w){d.setRequestHeader(w,_)}),a.isUndefined(s.withCredentials)||(d.withCredentials=!!s.withCredentials),i&&i!=="json"&&(d.responseType=s.responseType),l&&([f,m]=Ae(l,!0),d.addEventListener("progress",f)),c&&d.upload&&([h,g]=Ae(c),d.upload.addEventListener("progress",h),d.upload.addEventListener("loadend",g)),(s.cancelToken||s.signal)&&(u=_=>{d&&(r(!_||_.type?new he(null,t,d):_),d.abort(),S(),d=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));const b=ks(s.url);if(b&&!T.protocols.includes(b)){r(new p("Unsupported protocol "+b+":",p.ERR_BAD_REQUEST,t));return}d.send(n||null)})},zs=(t,e)=>{if(t=t?t.filter(Boolean):[],!e&&!t.length)return;const r=new AbortController;let s=!1;const n=function(l){if(!s){s=!0,i();const u=l instanceof Error?l:this.reason;r.abort(u instanceof p?u:new he(u instanceof Error?u.message:u))}};let o=e&&setTimeout(()=>{o=null,n(new p(`timeout of ${e}ms exceeded`,p.ETIMEDOUT))},e);const i=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(l=>{l.unsubscribe?l.unsubscribe(n):l.removeEventListener("abort",n)}),t=null)};t.forEach(l=>l.addEventListener("abort",n));const{signal:c}=r;return c.unsubscribe=()=>a.asap(i),c},Js=function*(t,e){let r=t.byteLength;if(r<e){yield t;return}let s=0,n;for(;s<r;)n=s+e,yield t.slice(s,n),s=n},Ws=async function*(t,e){for await(const r of Hs(t))yield*Js(r,e)},Hs=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:r,value:s}=await e.read();if(r)break;yield s}}finally{await e.cancel()}},It=(t,e,r,s)=>{const n=Ws(t,e);let o=0,i,c=l=>{i||(i=!0,s&&s(l))};return new ReadableStream({async pull(l){try{const{done:u,value:h}=await n.next();if(u){c(),l.close();return}let f=h.byteLength;if(r){let g=o+=f;r(g)}l.enqueue(new Uint8Array(h))}catch(u){throw c(u),u}},cancel(l){return c(l),n.return()}},{highWaterMark:2})};function Vs(t){if(!t||typeof t!="string"||!t.startsWith("data:"))return 0;const e=t.indexOf(",");if(e<0)return 0;const r=t.slice(5,e),s=t.slice(e+1);if(/;base64/i.test(r)){let o=s.length;const i=s.length;for(let f=0;f<i;f++)if(s.charCodeAt(f)===37&&f+2<i){const g=s.charCodeAt(f+1),m=s.charCodeAt(f+2);(g>=48&&g<=57||g>=65&&g<=70||g>=97&&g<=102)&&(m>=48&&m<=57||m>=65&&m<=70||m>=97&&m<=102)&&(o-=2,f+=2)}let c=0,l=i-1;const u=f=>f>=2&&s.charCodeAt(f-2)===37&&s.charCodeAt(f-1)===51&&(s.charCodeAt(f)===68||s.charCodeAt(f)===100);l>=0&&(s.charCodeAt(l)===61?(c++,l--):u(l)&&(c++,l-=3)),c===1&&l>=0&&(s.charCodeAt(l)===61||u(l))&&c++;const h=Math.floor(o/4)*3-(c||0);return h>0?h:0}if(typeof Buffer<"u"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(s,"utf8");let n=0;for(let o=0,i=s.length;o<i;o++){const c=s.charCodeAt(o);if(c<128)n+=1;else if(c<2048)n+=2;else if(c>=55296&&c<=56319&&o+1<i){const l=s.charCodeAt(o+1);l>=56320&&l<=57343?(n+=4,o++):n+=3}else n+=3}return n}const Ge="1.16.1",Lt=64*1024,{isFunction:Ce}=a,Ut=(t,...e)=>{try{return!!t(...e)}catch{return!1}},Ks=t=>{const e=a.global!==void 0&&a.global!==null?a.global:globalThis,{ReadableStream:r,TextEncoder:s}=e;t=a.merge.call({skipUndefined:!0},{Request:e.Request,Response:e.Response},t);const{fetch:n,Request:o,Response:i}=t,c=n?Ce(n):typeof fetch=="function",l=Ce(o),u=Ce(i);if(!c)return!1;const h=c&&Ce(r),f=c&&(typeof s=="function"?(b=>_=>b.encode(_))(new s):async b=>new Uint8Array(await new o(b).arrayBuffer())),g=l&&h&&Ut(()=>{let b=!1;const _=new o(T.origin,{body:new r,method:"POST",get duplex(){return b=!0,"half"}}),w=_.headers.has("Content-Type");return _.body!=null&&_.body.cancel(),b&&!w}),m=u&&h&&Ut(()=>a.isReadableStream(new i("").body)),S={stream:m&&(b=>b.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(b=>{!S[b]&&(S[b]=(_,w)=>{let v=_&&_[b];if(v)return v.call(_);throw new p(`Response type '${b}' is not supported`,p.ERR_NOT_SUPPORT,w)})});const d=async b=>{if(b==null)return 0;if(a.isBlob(b))return b.size;if(a.isSpecCompliantForm(b))return(await new o(T.origin,{method:"POST",body:b}).arrayBuffer()).byteLength;if(a.isArrayBufferView(b)||a.isArrayBuffer(b))return b.byteLength;if(a.isURLSearchParams(b)&&(b=b+""),a.isString(b))return(await f(b)).byteLength},E=async(b,_)=>a.toFiniteNumber(b.getContentLength())??d(_);return async b=>{let{url:_,method:w,data:v,signal:W,cancelToken:ne,timeout:me,onDownloadProgress:Z,onUploadProgress:z,responseType:F,headers:I,withCredentials:B="same-origin",fetchOptions:H,maxContentLength:P,maxBodyLength:be}=jt(b);const k=a.isNumber(P)&&P>-1,y=a.isNumber(be)&&be>-1;let R=n||fetch;F=F?(F+"").toLowerCase():"text";let C=zs([W,ne&&ne.toAbortSignal()],me),A=null;const D=C&&C.unsubscribe&&(()=>{C.unsubscribe()});let _e;try{if(k&&typeof _=="string"&&_.startsWith("data:")&&Vs(_)>P)throw new p("maxContentLength size of "+P+" exceeded",p.ERR_BAD_RESPONSE,b,A);if(y&&w!=="get"&&w!=="head"){const O=await E(I,v);if(typeof O=="number"&&isFinite(O)&&O>be)throw new p("Request body larger than maxBodyLength limit",p.ERR_BAD_REQUEST,b,A)}if(z&&g&&w!=="get"&&w!=="head"&&(_e=await E(I,v))!==0){let O=new o(_,{method:"POST",body:v,duplex:"half"}),ie;if(a.isFormData(v)&&(ie=O.headers.get("content-type"))&&I.setContentType(ie),O.body){const[Ue,Fe]=Tt(_e,Ae(Pt(z)));v=It(O.body,Lt,Ue,Fe)}}a.isString(B)||(B=B?"include":"omit");const N=l&&"credentials"in o.prototype;if(a.isFormData(v)){const O=I.getContentType();O&&/^multipart\/form-data/i.test(O)&&!/boundary=/i.test(O)&&I.delete("content-type")}I.set("User-Agent","axios/"+Ge,!1);const V={...H,signal:C,method:w.toUpperCase(),headers:yt(I.normalize()),body:v,duplex:"half",credentials:N?B:void 0};A=l&&new o(_,V);let M=await(l?R(A,H):R(_,V));if(k){const O=a.toFiniteNumber(M.headers.get("content-length"));if(O!=null&&O>P)throw new p("maxContentLength size of "+P+" exceeded",p.ERR_BAD_RESPONSE,b,A)}const at=m&&(F==="stream"||F==="response");if(m&&M.body&&(Z||k||at&&D)){const O={};["status","statusText","headers"].forEach(ye=>{O[ye]=M[ye]});const ie=a.toFiniteNumber(M.headers.get("content-length")),[Ue,Fe]=Z&&Tt(ie,Ae(Pt(Z),!0))||[];let ur=0;const bi=ye=>{if(k&&(ur=ye,ur>P))throw new p("maxContentLength size of "+P+" exceeded",p.ERR_BAD_RESPONSE,b,A);Ue&&Ue(ye)};M=new i(It(M.body,Lt,bi,()=>{Fe&&Fe(),D&&D()}),O)}F=F||"text";let J=await S[a.findKey(S,F)||"text"](M,b);if(k&&!m&&!at){let O;if(J!=null&&(typeof J.byteLength=="number"?O=J.byteLength:typeof J.size=="number"?O=J.size:typeof J=="string"&&(O=typeof s=="function"?new s().encode(J).byteLength:J.length)),typeof O=="number"&&O>P)throw new p("maxContentLength size of "+P+" exceeded",p.ERR_BAD_RESPONSE,b,A)}return!at&&D&&D(),await new Promise((O,ie)=>{Ct(O,ie,{data:J,headers:j.from(M.headers),status:M.status,statusText:M.statusText,config:b,request:A})})}catch(N){if(D&&D(),C&&C.aborted&&C.reason instanceof p){const V=C.reason;throw V.config=b,A&&(V.request=A),N!==V&&(V.cause=N),V}throw N&&N.name==="TypeError"&&/Load failed|fetch/i.test(N.message)?Object.assign(new p("Network Error",p.ERR_NETWORK,b,A,N&&N.response),{cause:N.cause||N}):p.from(N,N&&N.code,b,A,N&&N.response)}}},Xs=new Map,Ft=t=>{let e=t&&t.env||{};const{fetch:r,Request:s,Response:n}=e,o=[s,n,r];let i=o.length,c=i,l,u,h=Xs;for(;c--;)l=o[c],u=h.get(l),u===void 0&&h.set(l,u=c?new Map:Ks(e)),h=u;return u};Ft();const Qe={http:gs,xhr:Ms,fetch:{get:Ft}};a.forEach(Qe,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{__proto__:null,value:e})}catch{}Object.defineProperty(t,"adapterName",{__proto__:null,value:e})}});const Dt=t=>`- ${t}`,Gs=t=>a.isFunction(t)||t===null||t===!1;function Qs(t,e){t=a.isArray(t)?t:[t];const{length:r}=t;let s,n;const o={};for(let i=0;i<r;i++){s=t[i];let c;if(n=s,!Gs(s)&&(n=Qe[(c=String(s)).toLowerCase()],n===void 0))throw new p(`Unknown adapter '${c}'`);if(n&&(a.isFunction(n)||(n=n.get(e))))break;o[c||"#"+i]=n}if(!n){const i=Object.entries(o).map(([l,u])=>`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let c=r?i.length>1?`since :
|
|
4
|
-
`+i.map(Dt).join(`
|
|
5
|
-
`):" "+Dt(i[0]):"as no adapter specified";throw new p("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return n}const $t={getAdapter:Qs,adapters:Qe};function Ye(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new he(null,t)}function qt(t){return Ye(t),t.headers=j.from(t.headers),t.data=Xe.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),$t.getAdapter(t.adapter||ue.adapter,t)(t).then(function(e){Ye(t),t.response=e;try{e.data=Xe.call(t,t.transformResponse,e)}finally{delete t.response}return e.headers=j.from(e.headers),e},function(e){if(!At(e)&&(Ye(t),e&&e.response)){t.response=e.response;try{e.response.data=Xe.call(t,t.transformResponse,e.response)}finally{delete t.response}e.response.headers=j.from(e.response.headers)}return Promise.reject(e)})}const Te={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Te[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const Bt={};Te.transitional=function(t,e,r){function s(n,o){return"[Axios v"+Ge+"] Transitional option '"+n+"'"+o+(r?". "+r:"")}return(n,o,i)=>{if(t===!1)throw new p(s(o," has been removed"+(e?" in "+e:"")),p.ERR_DEPRECATED);return e&&!Bt[o]&&(Bt[o]=!0,console.warn(s(o," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(n,o,i):!0}},Te.spelling=function(t){return(e,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Ys(t,e,r){if(typeof t!="object")throw new p("options must be an object",p.ERR_BAD_OPTION_VALUE);const s=Object.keys(t);let n=s.length;for(;n-- >0;){const o=s[n],i=Object.prototype.hasOwnProperty.call(e,o)?e[o]:void 0;if(i){const c=t[o],l=c===void 0||i(c,o,t);if(l!==!0)throw new p("option "+o+" must be "+l,p.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new p("Unknown option "+o,p.ERR_BAD_OPTION)}}const Pe={assertOptions:Ys,validators:Te},U=Pe.validators;let G=class{constructor(t){this.defaults=t||{},this.interceptors={request:new xt,response:new xt}}async request(t,e){try{return await this._request(t,e)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const n=(()=>{if(!s.stack)return"";const o=s.stack.indexOf(`
|
|
6
|
-
`);return o===-1?"":s.stack.slice(o+1)})();try{if(!r.stack)r.stack=n;else if(n){const o=n.indexOf(`
|
|
7
|
-
`),i=o===-1?-1:n.indexOf(`
|
|
8
|
-
`,o+1),c=i===-1?"":n.slice(i+1);String(r.stack).endsWith(c)||(r.stack+=`
|
|
9
|
-
`+n)}}catch{}}throw r}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=X(this.defaults,e);const{transitional:r,paramsSerializer:s,headers:n}=e;r!==void 0&&Pe.assertOptions(r,{silentJSONParsing:U.transitional(U.boolean),forcedJSONParsing:U.transitional(U.boolean),clarifyTimeoutError:U.transitional(U.boolean),legacyInterceptorReqResOrdering:U.transitional(U.boolean)},!1),s!=null&&(a.isFunction(s)?e.paramsSerializer={serialize:s}:Pe.assertOptions(s,{encode:U.function,serialize:U.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),Pe.assertOptions(e,{baseUrl:U.spelling("baseURL"),withXsrfToken:U.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=n&&a.merge(n.common,n[e.method]);n&&a.forEach(["delete","get","head","post","put","patch","query","common"],m=>{delete n[m]}),e.headers=j.concat(o,n);const i=[];let c=!0;this.interceptors.request.forEach(function(m){if(typeof m.runWhen=="function"&&m.runWhen(e)===!1)return;c=c&&m.synchronous;const S=e.transitional||He;S&&S.legacyInterceptorReqResOrdering?i.unshift(m.fulfilled,m.rejected):i.push(m.fulfilled,m.rejected)});const l=[];this.interceptors.response.forEach(function(m){l.push(m.fulfilled,m.rejected)});let u,h=0,f;if(!c){const m=[qt.bind(this),void 0];for(m.unshift(...i),m.push(...l),f=m.length,u=Promise.resolve(e);h<f;)u=u.then(m[h++],m[h++]);return u}f=i.length;let g=e;for(;h<f;){const m=i[h++],S=i[h++];try{g=m(g)}catch(d){S.call(this,d);break}}try{u=qt.call(this,g)}catch(m){return Promise.reject(m)}for(h=0,f=l.length;h<f;)u=u.then(l[h++],l[h++]);return u}getUri(t){t=X(this.defaults,t);const e=kt(t.baseURL,t.url,t.allowAbsoluteUrls);return Ot(e,t.params,t.paramsSerializer)}};a.forEach(["delete","get","head","options"],function(t){G.prototype[t]=function(e,r){return this.request(X(r||{},{method:t,url:e,data:(r||{}).data}))}}),a.forEach(["post","put","patch","query"],function(t){function e(r){return function(s,n,o){return this.request(X(o||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:n}))}}G.prototype[t]=e(),t!=="query"&&(G.prototype[t+"Form"]=e(!0))});let Zs=class dr{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(n){r=n});const s=this;this.promise.then(n=>{if(!s._listeners)return;let o=s._listeners.length;for(;o-- >0;)s._listeners[o](n);s._listeners=null}),this.promise.then=n=>{let o;const i=new Promise(c=>{s.subscribe(c),o=c}).then(n);return i.cancel=function(){s.unsubscribe(o)},i},e(function(n,o,i){s.reason||(s.reason=new he(n,o,i),r(s.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 r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const e=new AbortController,r=s=>{e.abort(s)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new dr(function(r){e=r}),cancel:e}}};function en(t){return function(e){return t.apply(null,e)}}function tn(t){return a.isObject(t)&&t.isAxiosError===!0}const Ze={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ze).forEach(([t,e])=>{Ze[e]=t});function Mt(t){const e=new G(t),r=lt(G.prototype.request,e);return a.extend(r,G.prototype,e,{allOwnKeys:!0}),a.extend(r,e,null,{allOwnKeys:!0}),r.create=function(s){return Mt(X(t,s))},r}const x=Mt(ue);x.Axios=G,x.CanceledError=he,x.CancelToken=Zs,x.isCancel=At,x.VERSION=Ge,x.toFormData=Re,x.AxiosError=p,x.Cancel=x.CanceledError,x.all=function(t){return Promise.all(t)},x.spread=en,x.isAxiosError=tn,x.mergeConfig=X,x.AxiosHeaders=j,x.formToJSON=t=>Rt(a.isHTMLForm(t)?new FormData(t):t),x.getAdapter=$t.getAdapter,x.HttpStatusCode=Ze,x.default=x;const{Axios:yi,AxiosError:wi,CanceledError:Ei,isCancel:Si,CancelToken:vi,VERSION:Oi,all:xi,Cancel:Ri,isAxiosError:Ai,spread:Ci,toFormData:Ti,AxiosHeaders:Pi,HttpStatusCode:ki,formToJSON:Ni,getAdapter:ji,mergeConfig:Ii,create:Li}=x,et=x.create({baseURL:location.origin,timeout:6e4,params:{}});et.interceptors.response.use(t=>t,t=>{if(t.response){if(t.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(s){s&&OpenC3Auth.setTokens()}),t.response.config.headers["Ignore-Errors"]&&t.response.config.headers["Ignore-Errors"].includes(t.response.status.toString()))return Promise.reject(t);let e=`HTTP ${t.response.status} - `;t.response?.statusText&&(e+=`${t.response.statusText} `),t.response?.config?.data&&(e+=`${t.response.config.data} `),t.response?.data?.message?e+=`${t.response.data.message}`:t.response?.data?.exception?e+=`${t.response.data.exception}`:t.response?.data?.error?.message?(t.response.data.error.class&&(e+=`${t.response.data.error.class} `),e+=`${t.response.data.error.message}`):e+=`${t.response?.data}`;const{$cosmosNotify:r}=window;throw r&&r.serious({title:"Network error",body:e}),t}else throw t});const ke=async function(t,e,{data:r,params:s={},headers:n,noAuth:o=!1,noScope:i=!1,onUploadProgress:c=!1}={}){if(!o){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}n.Authorization=localStorage.openc3Token}return n.manual=!0,!i&&!s.scope&&(s.scope=window.openc3Scope),et({method:t,url:e,data:r,params:s,headers:n,onUploadProgress:c})},tt={Accept:"application/json"},zt={...tt,"Content-Type":"application/json"},Ui=De("F",{get:function(t,{params:e,headers:r=tt,noScope:s,noAuth:n,onUploadProgress:o}={}){return ke("get",t,{params:e,headers:r,noScope:s,noAuth:n,onUploadProgress:o})},put:function(t,{data:e,params:r,headers:s=zt,noScope:n,noAuth:o,onUploadProgress:i}={}){return ke("put",t,{data:e,params:r,headers:s,noScope:n,noAuth:o,onUploadProgress:i})},post:function(t,{data:e,params:r,headers:s=zt,noScope:n,noAuth:o,onUploadProgress:i}={}){return ke("post",t,{data:e,params:r,headers:s,noScope:n,noAuth:o,onUploadProgress:i})},delete:function(t,{params:e,headers:r=tt,noScope:s,noAuth:n,onUploadProgress:o}={}){return ke("delete",t,{params:e,headers:r,noScope:s,noAuth:n,onUploadProgress:o})}});let Ne=()=>({emit(t,...e){for(let r=this.events[t]||[],s=0,n=r.length;s<n;s++)r[s](...e)},events:{},on(t,e){return(this.events[t]||=[]).push(e),()=>{this.events[t]=this.events[t]?.filter(r=>e!==r)}}});class de extends Error{constructor(e,r){e instanceof Error?(super(e.message),this.cause=e):super(e),this.reason=r,this.name="ReasonError"}}class rt extends de{constructor(e){super("Rejected",e),this.name="SubscriptionRejectedError"}}class rn extends de{constructor(e){super(e||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class q extends de{constructor(e,r){r?super(e,r):super("Disconnected",e),this.name="DisconnectedError"}}class sn extends q{constructor(e){super(e,"stale_connection"),this.name="StaleConnectionError"}}function Jt(t){return t?`{${Object.keys(t).sort().filter(e=>t[e]!==void 0).map(e=>{let r=JSON.stringify(t[e]);return`${JSON.stringify(e)}:${r}`}).join(",")}}`:""}class nn{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,r){if(!this._info)return this._info={id:String(e),info:r},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((r,{id:s,info:n})=>(r[s]=n,r),{})}}const Q=Symbol("state");class Wt{constructor(e={}){this.emitter=Ne(),this.params=Object.freeze(e),this.presence=new nn(this),this.initialConnect=!0,this[Q]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=Jt({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[Q]}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[Q]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[Q]="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[Q]="connected";let e=!0,r=!0;this.initialConnect=!1,this.emit("connect",{reconnect:r,restored:e})}disconnected(e){this.state==="disconnected"||this.state==="closed"||(this[Q]="disconnected",this.presence.reset(),this.emit("disconnect",e))}closed(e){this.state!=="closed"&&(this[Q]="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,r){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,e,r)}async send(e){return this.perform(void 0,e)}async whisper(e){try{await this.perform("$whisper",e)}catch(r){let s=this.receiver?this.receiver.logger:null;s&&s.warn("whisper failed: ",r)}}receive(e,r){this.emit("message",e,r)}on(e,r){return this.emitter.on(e,r)}once(e,r){let s=this.emitter.on(e,(...n)=>{s(),r(...n)});return s}emit(e,...r){return this.emitter.emit(e,...r)}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,r)=>{let s=[()=>delete this._pendingSubscribe];s.push(this.on("connect",()=>{s.forEach(n=>n()),e()})),s.push(this.on("close",n=>{s.forEach(o=>o()),r(n||new de("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class on{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 r=this.channels.indexOf(e);r>-1&&this.channels.splice(r,1)}notify(e,...r){this.state=e==="restored"?"connected":e,r.length===1?this.channels.forEach(s=>s[e](r[0])):this.channels.forEach(s=>s[e]())}pending(e){this._checkIntent(e);let r=this._pendings[0];return!r||r.intent!==e?Promise.resolve():r.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 r,s={promise:new Promise(o=>{r=o}),intent:e,release:()=>{this._pendings.splice(this._pendings.indexOf(s),1),r(s)},canceled:!1,acquired:!1},n=this._pendingTop;return this._pendings.push(s),n&&await n.promise,this.gvl&&await this.gvl.acquire(s,e),s.acquired=!0,s}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 r=this._pendingTop;return!r||r.acquired||r.intent!==e?!1:(this._pendings.pop(),r.canceled=!0,!0)}}class cn{constructor(){this.queue=[]}async acquire(e,r){r==="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 an{constructor(e){e.concurrentSubscribes===!1&&(this.glv=new cn),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(e){return this._subscriptions[e]}create(e,{subscribe:r,unsubscribe:s}){let n=this._subscriptions[e]=new on(e);return n.remoteId=this._localToRemote[e],n.subscriber=r,n.unsubscriber=s,n.gvl=this.glv,n}remove(e){delete this._subscriptions[e],delete this._localToRemote[e]}storeRemoteId(e,r){this._localToRemote[e]=r;let s=this.get(e);s&&(s.remoteId=r)}}class ln{constructor(e={}){this.subscriptions=new an(e),this._pendingMessages=[],this._remoteToLocal={}}subscribe(e,r){this._remoteToLocal[r]=e,this.subscriptions.storeRemoteId(e,r),this.flush(r)}unsubscribe(e){let r=this.subscriptions.get(e);if(!r)return;let s=r.remoteId;s&&delete this._remoteToLocal[s],this.subscriptions.remove(e)}transmit(e,r,s){let n=this._remoteToLocal[e];if(!n){this._pendingMessages.push([e,r,s]);return}let o=this.subscriptions.get(n);o&&o.channels.forEach(i=>{i.receive(r,s)})}notify(e,r,s){let n=this._remoteToLocal[e];if(!n)return;let o=this.subscriptions.get(n);o&&o.channels.forEach(i=>i.emit(r,s))}close(){this._pendingMessages.length=0}get size(){return this.channels.length}get channels(){return this.subscriptions.all().flatMap(e=>e.channels)}flush(e){let r=[];for(let s of this._pendingMessages)s[0]===e?this.transmit(s[0],s[1],s[2]):r.push(s);this._pendingMessages=r}}const Ht={debug:0,info:1,warn:2,error:3};class Vt{constructor(e){this.level=e||"warn"}log(e,r,s){Ht[e]<Ht[this.level]||this.writeLogEntry(e,r,s)}writeLogEntry(){throw Error("Not implemented")}debug(e,r){this.log("debug",e,r)}info(e,r){this.log("info",e,r)}warn(e,r){this.log("warn",e,r)}error(e,r){this.log("error",e,r)}}class fe extends Vt{writeLogEntry(){}}class un{encode(e){return JSON.stringify(e)}decode(e){try{return JSON.parse(e)}catch{}}}let hn=0;class Kt{constructor(e={}){let{logger:r}=e;this.logger=r||new fe,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=e.subscribeCooldownInterval||250,this.subscribeRetryInterval=e.subscribeRetryInterval||5e3}attached(e){this.cable=e}subscribe(e,r){let s={channel:e};r&&Object.assign(s,r);let n=Jt(s);if(this.pendingUnsubscriptions[n]){let i=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${i}`,n),new Promise(c=>{setTimeout(()=>{c(this.subscribe(e,r))},i)})}if(this.pendingSubscriptions[n])return this.logger.warn("subscription is already pending, skipping",n),Promise.reject(Error("Already subscribing"));let o=this.subscribeRetryInterval;return new Promise((i,c)=>{let l=++hn;this.pendingSubscriptions[n]={resolve:i,reject:c,id:l},this.cable.send(this.buildSubscribeRequest(n)),this.maybeRetrySubscribe(l,n,o)})}buildSubscribeRequest(e){return{command:"subscribe",identifier:e}}maybeRetrySubscribe(e,r,s){setTimeout(()=>{let n=this.pendingSubscriptions[r];n&&n.id===e&&(this.logger.warn(`no subscription ack received in ${s}ms, retrying subscribe`,r),this.cable.send(this.buildSubscribeRequest(r)),this.maybeExpireSubscribe(e,r,s))},s)}maybeExpireSubscribe(e,r,s){setTimeout(()=>{let n=this.pendingSubscriptions[r];n&&n.id===e&&(delete this.pendingSubscriptions[r],n.reject(new rn(`Haven't received subscription ack in ${s*2}ms for ${r}`)))},s)}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,r,s){return r==="$whisper"?this.whisper(e,s):(s||(s={}),s.action||=r,this.cable.send({command:"message",identifier:e,data:JSON.stringify(s)}),Promise.resolve())}whisper(e,r){return this.cable.send({command:"whisper",identifier:e,data:r}),Promise.resolve()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:r,identifier:s,message:n,reason:o,reconnect:i}=e;if(r==="ping")return this.cable.keepalive(e.message);if(this.cable.keepalive(),r==="welcome"){let c=e.sid;return c&&this.cable.setSessionId(c),this.cable.connected()}if(r==="disconnect"){let c=new q(o);this.reset(c),i===!1?this.cable.closed(c):this.cable.disconnected(c);return}if(r==="confirm_subscription"){let c=this.pendingSubscriptions[s];if(!c){this.logger.error("subscription not found, unsubscribing",{type:r,identifier:s}),this.unsubscribe(s);return}return delete this.pendingSubscriptions[s],c.resolve(s)}if(r==="reject_subscription"){let c=this.pendingSubscriptions[s];return c?(delete this.pendingSubscriptions[s],c.reject(new rt)):this.logger.error("subscription not found",{type:r,identifier:s})}if(n)return{identifier:s,message:n};this.logger.warn(`unknown message type: ${r}`,{message:e})}reset(e){for(let r in this.pendingSubscriptions)this.pendingSubscriptions[r].reject(e);this.pendingSubscriptions={}}recoverableClosure(){return!1}}const Xt=()=>Date.now()/1e3|0;class dn extends Kt{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=Xt()),this.sessionId=void 0,this.sendPongs=e.pongs}reset(e){for(let r in this.pendingPresence)this.pendingPresence[r].reject(e);return this.pendingPresence={},super.reset()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:r,identifier:s,message:n}=e;if(r==="disconnect")return delete this.sessionId,this.cable.setSessionId(""),super.receive(e);if(r==="reject_subscription")return super.receive(e);if(r==="confirm_subscription")return this.subscriptionStreams[s]||(this.subscriptionStreams[s]=new Set),super.receive(e);if(r==="ping")return this.restoreSince&&(this.restoreSince=Xt()),this.sendPongs&&this.sendPong(),this.cable.keepalive(e.message);if(this.cable.keepalive(),r==="confirm_history"){this.logger.debug("history result received",e),this.cable.notify("history_received",s);return}if(r==="reject_history"){this.logger.warn("failed to retrieve history",e),this.cable.notify("history_not_found",s);return}if(r==="welcome"){if(this.disableSessionRecovery||(this.sessionId=e.sid,this.sessionId&&this.cable.setSessionId(this.sessionId)),e.restored){let o=e.restored_ids||Object.keys(this.subscriptionStreams);for(let i of o)this.cable.send({identifier:i,command:"history",history:this.historyRequestFor(i)}),this.presenceInfo[i]&&this.cable.send({identifier:i,command:"join",presence:this.presenceInfo[i]});return this.cable.restored(o)}return this.cable.connected(this.sessionId)}if(r==="presence"){let o=n.type;if(o==="info"){let i=this.pendingPresence[s];i&&(delete this.pendingPresence[s],i.resolve(n))}else if(o==="error"){let i=this.pendingPresence[s];i&&(delete this.pendingPresence[s],i.reject(new Error("failed to retrieve presence")))}return{type:r,identifier:s,message:n}}if(n){let o=this.trackStreamPosition(s,e.stream_id,e.epoch,e.offset);return{identifier:s,message:n,meta:o}}this.logger.warn(`unknown message type: ${r}`,{message:e})}perform(e,r,s){switch(r){case"$presence:join":return this.join(e,s);case"$presence:leave":return this.leave(e,s);case"$presence:info":return this.presence(e,s)}return super.perform(e,r,s)}unsubscribe(e){return delete this.presenceInfo[e],super.unsubscribe(e)}buildSubscribeRequest(e){let r=super.buildSubscribeRequest(e),s=this.historyRequestFor(e);s&&(r.history=s,this.pendingHistory[e]=!0);let n=this.presenceInfo[e];return n&&(r.presence=n),r}recoverableClosure(){return!!this.sessionId}historyRequestFor(e){let r={},s=!1;if(this.subscriptionStreams[e])for(let n of this.subscriptionStreams[e]){let o=this.streamsPositions[n];o&&(s=!0,r[n]=o)}if(!(!s&&!this.restoreSince))return{since:this.restoreSince,streams:r}}trackStreamPosition(e,r,s,n){if(!(!r||!s))return this.subscriptionStreams[e]||(this.subscriptionStreams[e]=new Set),this.subscriptionStreams[e].add(r),this.streamsPositions[r]={epoch:s,offset:n},{stream:r,epoch:s,offset:n}}async sendPong(){await new Promise(e=>setTimeout(e,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(e,r){return this.presenceInfo[e]=r,this.cable.send({command:"join",identifier:e,presence:r}),Promise.resolve()}async leave(e,r){return delete this.presenceInfo[e],this.cable.send({command:"leave",identifier:e,presence:r}),Promise.resolve()}presence(e,r){return this.pendingPresence[e]?(this.logger.warn("presence is already pending, skipping",e),Promise.reject(Error("presence request is already pending"))):new Promise((s,n)=>{this.pendingPresence[e]={resolve:s,reject:n},this.cable.send({command:"presence",identifier:e,data:r})})}}class fn extends de{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class Gt extends Wt{static identifier="__ghost__";constructor(e,r){super(r),this.channelId=e}set channelId(e){this._channelId=e}get channelId(){return this._channelId}}const pn="$pubsub";class Qt extends Wt{static identifier=pn;async perform(e,r){if(e.startsWith("$"))return super.perform(e,r);throw Error("not implemented")}}const Y=Symbol("state");let gn=class{constructor({transport:t,protocol:e,encoder:r,logger:s,lazy:n,hubOptions:o,performFailures:i,transportConfigurator:c}){this.emitter=Ne(),this.transport=t,this.encoder=r,this.logger=s||new fe,this.protocol=e,this.performFailures=i||"throw",this.protocol.attached(this),this.hub=new ln(o||{}),this[Y]="idle",this.handleClose=this.handleClose.bind(this),this.handleIncoming=this.handleIncoming.bind(this),this.transportConfigurator=c,this.transport.on("close",this.handleClose),this.transport.on("data",this.handleIncoming),this.initialConnect=!0,this.recovering=!1,n===!1&&this.connect().catch(()=>{})}get state(){return this[Y]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let t=this.state==="idle";this[Y]="connecting";let e=this.pendingConnect();this.logger.debug("connecting");try{this.transportConfigurator&&await this.transportConfigurator(this.transport,{initial:t}),await this.transport.open()}catch(r){this.handleClose(r)}return e}setSessionId(t){this.sessionId=t,this.transport.setParam("sid",t)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[Y]="connected",this.recovering&&this.hub.subscriptions.all().forEach(e=>e.notify("disconnected",new q("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[Y]="connected",this.hub.subscriptions.all().forEach(s=>{t&&s.remoteId&&t.includes(s.remoteId)?s.notify("restored"):(s.notify("disconnected",new q("recovery_failed")),this._resubscribe(s))});let e=!this.initialConnect,r=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:e,restored:r})}notify(t,e,r){e&&typeof e!="string"&&(r=e,e=void 0),e?this.hub.notify(e,"info",{type:t,data:r}):this.emit("info",{type:t,data:r})}handleClose(t){this.logger.debug("transport closed",{error:t}),this.disconnected(new q(t,"transport_closed"))}disconnected(t){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:t}),this[Y]="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 q?t:new q(t,void 0)),this.logger.info("closed",{reason:t||"user"}),this[Y]="closed";let r=e||new q("cable_closed");this.hub.subscriptions.all().forEach(s=>s.notify("disconnected",r)),this.hub.close(),this.protocol.reset(),this.transport.close(),this.initialConnect=!0,this.emit("close",e)}disconnect(){this.closed()}handleIncoming(t){if(this.state==="closed"||this.state==="idle")return;let e=this.encoder.decode(t);if(e===void 0){this.logger.error("failed to decode message",{message:t});return}this.logger.debug("incoming data",e);let r=this.protocol.receive(e);if(r){this.logger.debug("processed incoming message",r);let{type:s,identifier:n,message:o,meta:i}=r;s?this.hub.notify(n,s,o):this.hub.transmit(n,o,i)}}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 Qt({stream_name:t});return this.subscribe(e)}streamFromSigned(t){let e=new Qt({signed_stream_name:t});return this.subscribe(e)}subscribeTo(t,e){let r,s;return typeof t=="string"&&(s=t,t=Gt),r=s?new t(s,e):new t(e),this.subscribe(r)}subscribe(t){if(!t.attached(this))return t;let e=t.identifier;t.connecting();let r=this.hub.subscriptions.get(e)||this.hub.subscriptions.create(e,{subscribe:s=>this._subscribe(s,t.channelId,t.params),unsubscribe:s=>this._unsubscribe(s)});return r.add(t),r.intent==="subscribed"&&r.state==="connected"&&t.connected(),r.ensureSubscribed(),t}async _resubscribe(t){t.intent!=="subscribed"||!t.channels[0]||(t.notify("connecting"),t.ensureResubscribed())}async _subscribe(t,e,r){let s=t.id;if(this.state==="idle"&&this.connect().catch(()=>{}),this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:s});return}this.logger.debug("acquiring subscribe lock",{identifier:s});let n=await t.acquire("subscribed");if(n.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:s}),n.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:s}),t.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),n.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:s}),n.release();return}if(t.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:s}),t.notify("connected"),n.release();return}let o={identifier:e,params:r};this.logger.debug("subscribing",o);try{let i=await this.protocol.subscribe(e,r);this.hub.subscribe(s,i),this.logger.debug("subscribed",{...o,remoteId:i}),t.notify("connected")}catch(i){if(i){if(i instanceof rt&&this.logger.warn("rejected",o),i instanceof q){this.logger.debug("disconnected during subscription; will retry on connect",o),n.release();return}this.logger.error("failed to subscribe",{error:i,...o})}t.close(i),this.hub.unsubscribe(s)}n.release()}unsubscribe(t){let e=t.identifier,r=this.hub.subscriptions.get(e);if(!r)throw Error(`Subscription not found: ${e}`);r.remove(t),t.closed(),r.maybeUnsubscribe()}async _unsubscribe(t){let e=t.id;this.logger.debug("acquiring unsubscribe lock",{identifier:e});let r=await t.acquire("unsubscribed");if(r.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:e}),r.release();return}if(this.logger.debug("unsubscribe lock has been acquired",{identifier:e}),t.intent!=="unsubscribed"){this.logger.debug("cancel unsubscribe, no longer needed",{identifier:e,intent:t.intent}),r.release();return}if(t.state==="disconnected"||t.state==="closed"){this.logger.debug(`already ${t.state} connected, skip unsubscribe command`,{identifier:e}),r.release();return}let s=t.remoteId;if(this.logger.debug("unsubscribing...",{remoteId:s}),this.state!=="connected"){this.logger.debug("unsubscribe skipped (cable is not connected)",{id:e}),t.close(),this.hub.unsubscribe(e),r.release();return}try{await this.protocol.unsubscribe(s),this.logger.debug("unsubscribed remotely",{id:e})}catch(n){n&&(n instanceof q?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:e,error:n}):this.logger.error("unsubscribe failed",{id:e,error:n}))}t.intent==="unsubscribed"?(t.close(),this.hub.unsubscribe(e)):t.state="closed",r.release()}async perform(t,e,r){if(this.performFailures==="throw")return this._perform(t,e,r);try{return await this._perform(t,e,r)}catch(s){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:s});return}}async _perform(t,e,r){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new fn;let s=this.hub.subscriptions.get(t);if(!s)throw Error(`Subscription not found: ${t}`);if(await s.pending("subscribed"),s.intent!=="subscribed")throw Error(`Subscription is closed: ${t}`);let n=s.remoteId,o={id:n,action:e,payload:r};this.logger.debug("perform",o);try{let i=await this.protocol.perform(n,e,r);return i&&this.logger.debug("perform result",{message:i,request:o}),i}catch(i){throw this.logger.error("perform failed",{error:i,request:o}),i}}on(t,e){return this.emitter.on(t,e)}once(t,e){let r=this.emitter.on(t,(...s)=>{r(),e(...s)});return r}emit(t,...e){return this.emitter.emit(t,...e)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((t,e)=>{let r=[()=>delete this._pendingConnect];r.push(this.on("connect",()=>{r.forEach(s=>s()),t()})),r.push(this.on("close",s=>{r.forEach(n=>n()),e(s)})),r.push(this.on("disconnect",s=>{r.forEach(n=>n()),e(s)}))}),this._pendingConnect)}};const mn={maxMissingPings:2,maxReconnectAttempts:1/0},se=()=>Date.now(),Yt=(t,e)=>{e=e||{};let{backoffRate:r,jitterRatio:s,maxInterval:n}=e;return r=r||2,s===void 0&&(s=.5),o=>{let i=t*r**o,c=i*r,l=i+(c-i)*Math.random(),u=2*(Math.random()-.5)*s;return l=l*(1+u),n&&n<l&&(l=n),l}};let Zt=class{constructor({pingInterval:t,...e}){if(this.pingInterval=t,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${t}`);if(e=Object.assign({},mn,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 fe,this.state="pending_connect",this.attempts=0,this.disconnectedAt=se()}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=se(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=se(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=se(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=se()})),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=se()-this.pingedAt;t>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${t}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new sn))}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 bn{constructor(e,r={}){this.transports=e,this.transport=null,this.emitter=Ne(),this.unbind=[],this.logger=r.logger||new fe}displayName(){return"fallbacked transport"}async open(){for(let e=0;e<this.transports.length;e++){let r=this.transports[e];try{this.transport=r,this.resetListeners(),this.logger.debug(`Trying to connect via ${r.displayName()}`),await r.open(),this.logger.debug(`Connected via ${r.displayName()}`);return}catch(s){this.logger.debug(`Failed to connect via ${r.displayName()}: ${s.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,r){this.transports.forEach(s=>{s.setParam(e,r)})}setToken(e,r){this.transports.forEach(s=>{s.setToken(e,r)})}on(e,r){return this.emitter.on(e,r)}once(e,r){let s=this.emitter.on(e,(...n)=>{s(),r(...n)});return s}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 _n{constructor(e,r={}){this.url=e;let s=r.websocketImplementation;if(s)this.Impl=s;else if(typeof WebSocket<"u")this.Impl=WebSocket;else throw new Error("No WebSocket support");this.connected=!1,this.emitter=Ne();let{format:n,subprotocol:o,authStrategy:i}=r;this.format=n||"text",this.connectionOptions=r.websocketOptions,this.authStrategy=i||"param",this.authProtocol="",this.subprotocol=o}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((r,s)=>{let n=[];n.push(this.once("open",()=>{n.forEach(o=>o()),r()})),n.push(this.once("close",()=>{n.forEach(o=>o()),s(Error("WS connection closed"))}))})}setURL(e){this.url=e}setParam(e,r){let s=new URL(this.url);s.searchParams.set(e,r);let n=`${s.protocol}//${s.host}${s.pathname}?${s.searchParams}`;this.setURL(n)}setToken(e,r="jid"){if(this.authStrategy==="param")this.setParam(r,e);else if(this.authStrategy==="header"){this.connectionOptions=this.connectionOptions||{},this.connectionOptions.headers=this.connectionOptions.headers||{};let s=`x-${r}`.toLowerCase();s=Object.keys(this.connectionOptions.headers).find(n=>n.toLowerCase()===s)||s,this.connectionOptions.headers[s]=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,r){return this.emitter.on(e,r)}once(e,r){let s=this.emitter.on(e,(...n)=>{s(),r(...n)});return s}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 r=e.data;this.format==="binary"&&(r=new Uint8Array(r)),this.emitter.emit("data",r)},this.ws.onopen=()=>{this.connected=!0,this.emitter.emit("open")}}onclose(){this.ws.onclose=void 0,this.ws.onmessage=void 0,this.ws.onopen=void 0,this.ws.close(),delete this.ws,this.connected=!1,this.emitter.emit("close")}}class yn{constructor(e){this.channel=e}notify(e,...r){typeof this[e]=="function"&&this[e](...r)}perform(e,r={}){this.channel.perform(e,r)}send(e){this.channel.send(e)}whisper(e){return this.channel.whisper(e)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}}class wn extends Gt{constructor(e,r,s){super(e,r),this.subscription=new yn(this),Object.assign(this.subscription,s),this.on("connect",({reconnect:n})=>this.subscription.notify("connected",{reconnected:n})),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",n=>this.subscription.notify("received",n)),this.on("close",n=>{n&&n instanceof rt?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class En{constructor(e){this.cable=e}create(e,r){let s,n;typeof e=="object"?(s=e.channel,delete e.channel,n=e):(s=e,n={});let o=new wn(s,n,r);return o.subscription.notify("initialized"),this.cable.subscribe(o),o.subscription}findAll(e){return this.cable.hub.channels.filter(r=>r.identifier===e).map(r=>r.subscription)}}class Sn{constructor(e){this.cable=e,this.subscriptions=new En(e)}send(e){return this.cable.send(e)}connect(){return this.cable.connect()}disconnect(){return this.cable.disconnect()}ensureActiveConnection(){return this.cable.connect()}}const er={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function vn(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({},er,e);let{protocol:r,websocketImplementation:s,websocketFormat:n,websocketOptions:o,websocketAuthStrategy:i,fallbacks:c,logLevel:l,logger:u,transport:h,encoder:f,lazy:g,monitor:m,pingInterval:S,reconnectStrategy:d,maxMissingPings:E,maxReconnectAttempts:b,subprotocol:_,tokenRefresher:w,historyTimestamp:v,protocolOptions:W,concurrentSubscribes:ne,performFailures:me,transportConfigurator:Z,auth:z}=e;if(u=u||new fe(l),typeof r=="string"){_=_||r;let B=r.substring(0,r.lastIndexOf("-")),H=r.substring(r.lastIndexOf("-")+1);if(W=W||{},B==="actioncable-v1")r=new Kt({logger:u,...W});else if(B==="actioncable-v1-ext")r=new dn({logger:u,historyTimestamp:v,...W});else throw Error(`Protocol is not supported yet: ${r}`);if(H==="json")f=f||new un,n=n||"text";else if(H==="msgpack"){if(n="binary",!f)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(H==="protobuf"){if(n=n||"binary",!f)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: ${r}`)}if(!r)throw Error("Protocol must be specified");h=h||new _n(t,{websocketImplementation:s,websocketOptions:o,subprotocol:_,authStrategy:i,format:n}),c&&(h=new bn([h,...c],{logger:u})),z&&z.token&&h.setToken(z.token,z.param||"jid"),d=d||Yt(S),m!==!1&&(m=m||new Zt({pingInterval:S,reconnectStrategy:d,maxMissingPings:E,maxReconnectAttempts:b,logger:u}));let F={concurrentSubscribes:ne},I=new gn({protocol:r,transport:h,encoder:f,logger:u,lazy:g,hubOptions:F,performFailures:me,transportConfigurator:Z});return m&&(m.watch(I),I.monitor=m),w&&On(I,async()=>{try{await w(h)}catch(B){return u.error("Failed to refresh authentication token: "+B),!1}return I.connect().catch(()=>{}),!0}),I}function On(t,e){let r=!1;t.on("connect",()=>r=!1),t.on("close",async s=>{if(s){if(r){t.logger.warn("Token auto-refresh is disabled",s);return}s.reason==="token_expired"&&(r=!0,await e())}})}class xn extends Vt{writeLogEntry(e,r,s){s?console[e](r,s):console[e](r)}}class Rn extends Zt{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")},r=n=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:n})},s=()=>this.disconnect(new q("page_frozen"));document.addEventListener("visibilitychange",e,!1),window.addEventListener("focus",r,!1),window.addEventListener("online",r,!1),window.addEventListener("resume",r,!1),window.addEventListener("freeze",s,!1),this.unbind.push(()=>{document.removeEventListener("visibilitychange",e,!1),window.removeEventListener("focus",r,!1),window.removeEventListener("online",r,!1),window.removeEventListener("resume",r,!1),window.removeEventListener("freeze",s,!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 An=["cable","action-cable"],Cn="/cable",je=(t,e)=>{for(let r of An){let s=t.head.querySelector(`meta[name='${r}-${e}']`);if(s)return s.getAttribute("content")}},tr=t=>t.match(/wss?:\/\//)?t:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${t}`:t,Tn=()=>{if(typeof document<"u"&&document.head){let t=je(document,"url");if(t)return tr(t)}return tr(Cn)},Pn=()=>{if(typeof document<"u"&&document.head){let t=je(document,"history-timestamp");if(t)return t|0}},kn=()=>{if(typeof document<"u"&&document.head)return je(document,"token")},Nn=()=>{if(typeof document<"u"&&document.head)return je(document,"token-param")};function jn(t,e){typeof t=="object"&&typeof e>"u"&&(e=t,t=void 0),t=t||Tn(),e=e||{},e.historyTimestamp||=Pn();let r=kn();if(r){let u=Nn();e.auth=Object.assign({token:r,param:u},e.auth||{})}e=Object.assign({},er,e);let{logLevel:s,logger:n,pingInterval:o,reconnectStrategy:i,maxMissingPings:c,maxReconnectAttempts:l}=e;return n=e.logger=e.logger||new xn(s),i=e.reconnectStrategy=e.reconnectStrategy||Yt(o),e.monitor!==!1&&(e.monitor=e.monitor||new Rn({pingInterval:o,reconnectStrategy:i,maxMissingPings:c,maxReconnectAttempts:l,logger:n})),vn(t,e)}function In(t,e){let r=jn(t,e);return new Sn(r)}class Ln{constructor(e="/openc3-api/cable"){this._cable=null,this._url=e}disconnect(){this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(e,r,s={},n={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(o=>{if(o&&OpenC3Auth.setTokens(),this._cable==null){const i=new URL(this._url,document.baseURI);i.searchParams.set("scope",r),this._cable=In(i.href)}return this._cable.subscriptions.create({channel:e,token:localStorage.openc3Token,...n},s)})}recordPing(){}}De("$",Ln);function pe(t){return Un.test(t)}const Un=/^-?[0-9]+$/;function rr(t){return Fn.test(t)}const Fn=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function sr(t,e){if(pe(t))return Number.isSafeInteger(Number.parseInt(t,10));const r=Number.parseFloat(t),s=String(r);if(t===s)return!0;const n=nr(t),o=nr(s);return!!(n===o||e?.approx===!0&&!pe(t)&&o.length>=14&&n.startsWith(o.substring(0,14)))}let ge=(function(t){return t.underflow="underflow",t.overflow="overflow",t.truncate_integer="truncate_integer",t.truncate_float="truncate_float",t})({});function Dn(t){if(sr(t,{approx:!1}))return;if(pe(t))return ge.truncate_integer;const e=Number.parseFloat(t);return Number.isFinite(e)?e===0?ge.underflow:ge.truncate_float:ge.overflow}function nr(t){const{start:e,end:r}=$n(t),s=t.substring(e,r),n=s.indexOf(".");return n===-1?s:s.substring(0,n)+s.substring(n+1)}function $n(t){let e=0;for(t[0]==="-"&&e++;t[e]==="0"||t[e]===".";)e++;let r=t.lastIndexOf("e");for(r===-1&&(r=t.lastIndexOf("E")),r===-1&&(r=t.length);(t[r-1]==="0"||t[r-1]===".")&&r>e;)r--;return{start:e,end:r}}class qn{isLosslessNumber=!0;constructor(e){if(!rr(e))throw new Error(`Invalid number (value: "${e}")`);this.value=e}valueOf(){const e=Dn(this.value);if(e===void 0||e===ge.truncate_float)return Number.parseFloat(this.value);if(pe(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 Bn(t){return t&&typeof t=="object"&&t.isLosslessNumber||!1}function Mn(t){return new qn(t)}function zn(t,e){return st({"":t},"",t,e)}function st(t,e,r,s){return Array.isArray(r)?s.call(t,e,Wn(r,s)):r&&typeof r=="object"&&!Bn(r)?s.call(t,e,Jn(r,s)):s.call(t,e,r)}function Jn(t,e){for(const r of Object.keys(t)){const s=st(t,r,t[r],e);s!==void 0?t[r]=s:delete t[r]}return t}function Wn(t,e){for(let r=0;r<t.length;r++)t[r]=st(t,String(r),t[r],e);return t}function Hn(t,e,r){const s=typeof r=="function"?{parseNumber:r}:r,n=s?.parseNumber??Mn,o=s?.onDuplicateKey??me;let i=0;const c=h();return b(c),w(),e?zn(c,e):c;function l(){if(t.charCodeAt(i)===Yn){i++,g();const y={};let R=!0;for(;i<t.length&&t.charCodeAt(i)!==or;){R?R=!1:(d(),g());const C=i,A=m();if(A===void 0){ne();return}g(),E();const D=h();if(D===void 0){B();return}if(Object.prototype.hasOwnProperty.call(y,A)&&!nt(D,y[A])){const _e=o({key:A,position:C+1,oldValue:y[A],newValue:D});_e!==void 0&&(y[A]=_e)}else y[A]=D}return t.charCodeAt(i)!==or&&Z(),i++,y}}function u(){if(t.charCodeAt(i)===Zn){i++,g();const y=[];let R=!0;for(;i<t.length&&t.charCodeAt(i)!==cr;){R?R=!1:d();const C=h();_(C),y.push(C)}return t.charCodeAt(i)!==cr&&z(),i++,y}}function h(){g();const y=m()??S()??l()??u()??f("true",!0)??f("false",!1)??f("null",null);return g(),y}function f(y,R){if(t.slice(i,i+y.length)===y)return i+=y.length,R}function g(){for(;Vn(t.charCodeAt(i));)i++}function m(){if(t.charCodeAt(i)===it){i++;let y="";for(;i<t.length&&t.charCodeAt(i)!==it;){if(t.charCodeAt(i)===Qn){const R=t[i+1],C=Gn[R];C!==void 0?(y+=C,i++):R==="u"?Ie(t.charCodeAt(i+2))&&Ie(t.charCodeAt(i+3))&&Ie(t.charCodeAt(i+4))&&Ie(t.charCodeAt(i+5))?(y+=String.fromCharCode(Number.parseInt(t.slice(i+2,i+6),16)),i+=5):H(i):I(i)}else Xn(t.charCodeAt(i))?y+=t[i]:F(t[i]);i++}return W(),i++,y}}function S(){const y=i;if(t.charCodeAt(i)===ar&&(i++,v(y)),t.charCodeAt(i)===ot)i++;else if(Kn(t.charCodeAt(i)))for(i++;Le(t.charCodeAt(i));)i++;if(t.charCodeAt(i)===ci)for(i++,v(y);Le(t.charCodeAt(i));)i++;if(t.charCodeAt(i)===di||t.charCodeAt(i)===hi)for(i++,(t.charCodeAt(i)===ar||t.charCodeAt(i)===ni)&&i++,v(y);Le(t.charCodeAt(i));)i++;if(i>y)return n(t.slice(y,i))}function d(){if(t.charCodeAt(i)!==oi)throw new SyntaxError(`Comma ',' expected after value ${k()}`);i++}function E(){if(t.charCodeAt(i)!==ai)throw new SyntaxError(`Colon ':' expected after property name ${k()}`);i++}function b(y){if(y===void 0)throw new SyntaxError(`JSON value expected ${k()}`)}function _(y){if(y===void 0)throw new SyntaxError(`Array item expected ${k()}`)}function w(){if(i<t.length)throw new SyntaxError(`Expected end of input ${k()}`)}function v(y){if(!Le(t.charCodeAt(i))){const R=t.slice(y,i);throw new SyntaxError(`Invalid number '${R}', expecting a digit ${k()}`)}}function W(){if(t.charCodeAt(i)!==it)throw new SyntaxError(`End of string '"' expected ${k()}`)}function ne(){throw new SyntaxError(`Quoted object key expected ${k()}`)}function me(y){let{key:R,position:C}=y;throw new SyntaxError(`Duplicate key '${R}' encountered at position ${C}`)}function Z(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${k()}`)}function z(){throw new SyntaxError(`Array item or end of array ']' expected ${k()}`)}function F(y){throw new SyntaxError(`Invalid character '${y}' ${P()}`)}function I(y){const R=t.slice(y,y+2);throw new SyntaxError(`Invalid escape character '${R}' ${P()}`)}function B(){throw new SyntaxError(`Object value expected after ':' ${P()}`)}function H(y){const R=t.slice(y,y+6);throw new SyntaxError(`Invalid unicode character '${R}' ${P()}`)}function P(){return`at position ${i}`}function be(){return i<t.length?`but got '${t[i]}'`:"but reached end of input"}function k(){return`${be()} ${P()}`}}function Vn(t){return t===ei||t===ti||t===ri||t===si}function Ie(t){return t>=ot&&t<=ct||t>=li&&t<=fi||t>=ui&&t<=pi}function Le(t){return t>=ot&&t<=ct}function Kn(t){return t>=ii&&t<=ct}function Xn(t){return t>=32&&t<=1114111}function nt(t,e){return t===e?!0:Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&t.every((r,s)=>nt(r,e[s])):ir(t)&&ir(e)?[...new Set([...Object.keys(t),...Object.keys(e)])].every(r=>nt(t[r],e[r])):!1}function ir(t){return typeof t=="object"&&t!==null}const Gn={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
|
10
|
-
`,r:"\r",t:" "},Qn=92,Yn=123,or=125,Zn=91,cr=93,ei=32,ti=10,ri=9,si=13,it=34,ni=43,ar=45,ot=48,ii=49,ct=57,oi=44,ci=46,ai=58,li=65,ui=97,hi=69,di=101,fi=70,pi=102;function lr(t,e,r,s){return n(t);function n(l,u){if(Array.isArray(s)){const h=s.find(f=>f.test(l));if(h){const f=h.stringify(l);if(typeof f!="string"||!rr(f))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${f})`);return f}}if(typeof l=="boolean"||typeof l=="number"||typeof l=="string"||l===null||l instanceof Date||l instanceof Boolean||l instanceof Number||l instanceof String)return JSON.stringify(l);if(l?.isLosslessNumber||typeof l=="bigint")return l.toString();if(Array.isArray(l))return o(l);if(l&&typeof l=="object")return i(l)}function o(l,u){if(l.length===0)return"[]";let h="[";for(let f=0;f<l.length;f++){const g=l[f];typeof g<"u"&&typeof g!="function"?h+=n(g):h+="null",f<l.length-1&&(h+=",")}return h+="]",h}function i(l,u){if(typeof l.toJSON=="function")return lr(l.toJSON(),e,r,void 0);const h=Array.isArray(e)?e.map(String):Object.keys(l);if(h.length===0)return"{}";let f=!0,g="{";for(const m of h){const S=l[m];if(c(m,S)){f?f=!1:g+=",";const d=JSON.stringify(m);g+=`${d}:`,g+=n(S)}}return g+="}",g}function c(l,u){return typeof u<"u"&&typeof u!="function"&&typeof u!="symbol"}}function gi(t){return pe(t)&&!sr(t)?BigInt(t):parseFloat(t)}class mi{id=1;constructor(){}async exec(e,r,s={},n={},o=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return s.scope=window.openc3Scope,n.manual=!0,(await et.post("/openc3-api/api",{jsonrpc:"2.0",method:e,params:r,id:this.id,keyword_params:s},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...n},timeout:o,transformRequest:[(i,c)=>lr(i)],transformResponse:[i=>{try{return Hn(i,void 0,gi)}catch{const c=typeof i=="string"?i.substring(0,200):String(i),l=new Error(`Server returned non-JSON response: ${c}`);throw l.name="ServerError",l}}]})).data.result}catch(i){let c=new Error;throw i.response?(c.name=i.response.data.error.data.class,c.message=i.response.data.error.data.message,c.object=i.response.data.error):i.request?(c.name="Request error",c.message="Request error, no response received"):c=i,c}}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,r,s,n,o){return this.exec("map_target_to_interface",[e,r],{cmd_only:s,tlm_only:n,unmap_old:o})}unmap_target_from_interface(e,r,s,n){return this.exec("unmap_target_from_interface",[e,r],{cmd_only:s,tlm_only:n})}connect_interface(e,...r){return r.length>0?this.exec("connect_interface",[e,...r]):this.exec("connect_interface",[e])}disconnect_interface(e){return this.exec("disconnect_interface",[e])}interface_cmd(e,r,...s){return this.exec("interface_cmd",[e,r,...s])}interface_target_enable(e,r,s=!1,n=!1){return this.exec("interface_target_enable",[e,r],{cmd_only:s,tlm_only:n})}interface_target_disable(e,r,s=!1,n=!1){return this.exec("interface_target_disable",[e,r],{cmd_only:s,tlm_only:n})}interface_details(e){return this.exec("interface_details",[e])}get_all_router_info(){return this.exec("get_all_router_info",[])}map_target_to_router(e,r,s,n,o){return this.exec("map_target_to_router",[e,r],{cmd_only:s,tlm_only:n,unmap_old:o})}unmap_target_from_router(e,r,s,n){return this.exec("unmap_target_from_router",[e,r],{cmd_only:s,tlm_only:n})}connect_router(e){return this.exec("connect_router",[e])}disconnect_router(e){return this.exec("disconnect_router",[e])}router_target_enable(e,r,s=!1,n=!1){return this.exec("router_target_enable",[e,r],{cmd_only:s,tlm_only:n})}router_target_disable(e,r,s=!1,n=!1){return this.exec("router_target_disable",[e,r],{cmd_only:s,tlm_only:n})}router_details(e){return this.exec("router_details",[e])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(e){return this.exec("get_tlm_cnts",[e])}get_item(e,r,s){return this.exec("get_item",[e,r,s])}get_param(e,r,s){return this.exec("get_param",[e,r,s])}get_parameter(e,r,s){return this.exec("get_param",[e,r,s])}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,r){return this.exec("get_tlm",[e,r])}get_telemetry(e,r){return this.exec("get_tlm",[e,r])}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,r=!1){return this.exec("get_all_tlm_names",[e],{hidden:r})}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,r,s,n=30){const o=await this.exec("get_tlm_packet",[e,r],{type:s,stale_time:n});if(o!=null){let i=o.length,c=null;for(let l=0;l<i;l++)c=this.decode_openc3_type(o[l][1]),c!==null&&(o[l][1]=c)}return o}get_packet_derived_items(e,r){return this.exec("get_packet_derived_items",[e,r])}get_tlm_buffer(e,r){return this.exec("get_tlm_buffer",[e,r])}get_tlm_available(e){return this.exec("get_tlm_available",[e])}async get_tlm_values(e,r=30,s=null,n=null,o=null){let i={stale_time:r};s!==null&&(i.cache_timeout=s),n!==null&&(i.start_time=n.toISOString()),o!==null&&(i.end_time=o.toISOString());const c=await this.exec("get_tlm_values",[e],i,{},1e4);if(c&&c.length>0){let l=c.length,u=null;for(let h=0;h<l;h++)u=this.decode_openc3_type(c[h][0]),u!==null&&(c[h][0]=u)}return c}get_limits(e,r,s){return this.exec("get_limits",[e,r,s])}async tlm(e,r,s,n="CONVERTED"){let o=null;if(r===void 0)o=await this.exec("tlm",[e]);else if(s===void 0)if(["RAW","CONVERTED","FORMATTED"].includes(r))o=await this.exec("tlm",[e],{type:r});else{let c=new Error;throw c.name="TypeError",c.message=`Invalid data type ${r}. Valid options are RAW, CONVERTED or FORMATTED.`,c}else o=await this.exec("tlm",[e,r,s],{type:n});let i=this.decode_openc3_type(o);return i!==null&&(o=i),o}async inject_tlm(e,r,s=null,n="CONVERTED",o=!1){await this.exec("inject_tlm",[e,r,s],{type:n,stored:o})}set_tlm(e,r,s,n){return this.exec("set_tlm",[e,r,s],{type:n})}override_tlm(e,r,s,n){return this.exec("override_tlm",[e,r,s],{type:n})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(e,r,s,n){return this.exec("normalize_tlm",[e,r,s],{type:n})}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,r=!1){return this.exec("get_all_cmd_names",[e],{hidden:r})}get_all_command_names(e){return this.exec("get_all_cmd_names",[e])}get_cmd(e,r){return this.exec("get_cmd",[e,r])}get_command(e,r){return this.exec("get_cmd",[e,r])}get_cmd_cnts(e){return this.exec("get_cmd_cnts",[e])}get_cmd_value(e,r,s,n="CONVERTED"){return this.exec("get_cmd_value",[e,r,s,n])}get_cmd_buffer(e,r){return this.exec("get_cmd_buffer",[e,r])}_cmd(e,r,s,n,o,i={}){let c=null;for(let l in n)Object.prototype.hasOwnProperty.call(n,l)&&(c=this.encode_openc3_type(n[l]),c!==null&&(n[l]=c));return this.exec(e,[r,s,n],i,o)}get_cmd_hazardous(e,r,s,n={}){return r===void 0?this.exec("get_cmd_hazardous",e,{},n):this._cmd("get_cmd_hazardous",e,r,s,n)}cmd(e,r,s,n={},o={}){return r===void 0?this.exec("cmd",e,o,n):this._cmd("cmd",e,r,s,n,o)}cmd_no_range_check(e,r,s,n={},o={}){return r===void 0?this.exec("cmd_no_range_check",e,o,n):this._cmd("cmd_no_range_check",e,r,s,n,o)}cmd_raw(e,r,s,n={},o={}){return r===void 0?this.exec("cmd_raw",e,o,n):this._cmd("cmd_raw",e,r,s,n,o)}cmd_raw_no_range_check(e,r,s,n={},o={}){return r===void 0?this.exec("cmd_raw_no_range_check",e,o,n):this._cmd("cmd_raw_no_range_check",e,r,s,n,o)}cmd_no_hazardous_check(e,r,s,n={},o={}){return r===void 0?this.exec("cmd_no_hazardous_check",e,o,n):this._cmd("cmd_no_hazardous_check",e,r,s,n,o)}cmd_no_checks(e,r,s,n={},o={}){return r===void 0?this.exec("cmd_no_checks",e,o,n):this._cmd("cmd_no_checks",e,r,s,n,o)}cmd_raw_no_hazardous_check(e,r,s,n={},o={}){return r===void 0?this.exec("cmd_raw_no_hazardous_check",e,o,n):this._cmd("cmd_raw_no_hazardous_check",e,r,s,n,o)}cmd_raw_no_checks(e,r,s,n={},o={}){return r===void 0?this.exec("cmd_raw_no_checks",e,o,n):this._cmd("cmd_raw_no_checks",e,r,s,n,o)}build_cmd(e,r,s,n={},o={}){return r===void 0?this.exec("build_cmd",e,o,n):this._cmd("build_cmd",e,r,s,n,o)}build_command(e,r,s,n={},o={}){return r===void 0?this.exec("build_cmd",e,o,n):this._cmd("build_cmd",e,r,s,n,o)}get_interface_names(){return this.exec("get_interface_names",[])}get_router_names(){return this.exec("get_router_names",[])}send_raw(e,r){return this.exec("send_raw",[e,r])}list_configs(e){return this.exec("list_configs",[e])}load_config(e,r){return this.exec("load_config",[e,r])}save_config(e,r,s){return this.exec("save_config",[e,r,s])}delete_config(e,r){return this.exec("delete_config",[e,r])}enable_limits(e,r,s){return this.exec("enable_limits",[e,r,s])}disable_limits(e,r,s){return this.exec("disable_limits",[e,r,s])}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,r){return this.exec("get_setting",[e],r)}get_settings(e,r){return this.exec("get_settings",e,r)}set_setting(e,r){return this.exec("set_setting",[e,r])}update_news(){return this.exec("update_news",[])}update_plugin_store(){return this.exec("update_plugin_store",[])}save_setting(e,r){return this.exec("set_setting",[e,r])}get_metrics(){return this.exec("get_metrics",[])}open_tab(e){window.open(e,"_blank")}async hashString(e){if(window.isSecureContext){const r=new TextEncoder().encode(e),s=await crypto.subtle.digest("SHA-256",r),n=new Uint8Array(s);return Array.from(n).map(o=>o.toString(16).padStart(2,"0")).join("")}}}De("q",mi)})}}));
|