openc3-cosmos-tool-dataextractor 7.1.0 → 7.1.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/dataextractor/{ArrayWidget-CcQFJGCA-f76220cc11a39cef93d3.js → ArrayWidget-CmKZQfWB-316284df219381b9c608.js} +2 -2
- data/tools/dataextractor/{ArrayplotWidget-DGJEXAY0-2638e110104829429b7e.js → ArrayplotWidget-D5McM1rY-84bbb4b36d873b94c8f9.js} +1 -1
- data/tools/dataextractor/{BarColumn-DwZmAe8g-87b5d97eefa9dd364079.js → BarColumn-BtP1cQcf-f92fc05ebb0e9117a3d4.js} +1 -1
- data/tools/dataextractor/BlockWidget-BKMse4hP-8bdc0b11498302b95c1f.js +2 -0
- data/tools/dataextractor/ButtonWidget-BLNVL46w-e577648e2665645edef7.js +2 -0
- data/tools/dataextractor/{CanvasWidget-Bn70gBcc-9779d7c4a0937c4e2f70.js → CanvasWidget-1jy1JskS-112d32201ad2294cf975.js} +1 -1
- data/tools/dataextractor/CanvasdotWidget-DxuFGoWt-1e95745cf96436372a10.js +1 -0
- data/tools/dataextractor/{CanvasimageWidget-BpM05v_m-6263bd6847c2e58b6b84.js → CanvasimageWidget-B_JxCI_f-4efa805404970348a383.js} +1 -1
- data/tools/dataextractor/{CanvasimagevalueWidget-E6G93iGc-49d367288d7991a84f17.js → CanvasimagevalueWidget-DwHIZzWo-ce7dc4860d646547ca92.js} +1 -1
- data/tools/dataextractor/{CanvaslabelWidget-C074R2Fy-8fa147b0578e1ddd8e31.js → CanvaslabelWidget-Tt4dmAOI-0791a8cb0d60b3e8652d.js} +1 -1
- data/tools/dataextractor/{CanvaslabelvalueWidget-B0nJeS4X-b4d8b3e018abcec044ee.js → CanvaslabelvalueWidget-D1-kZsi--eea1f7c137b58e94c46d.js} +1 -1
- data/tools/dataextractor/CanvaslineWidget-Din8LMyF-fc3a537b16766642b116.js +1 -0
- data/tools/dataextractor/{CanvaslinevalueWidget-BwfFyCwH-7997bd44b424ae4b1561.js → CanvaslinevalueWidget-DOrasE2j-d8532b8ace8da01886b3.js} +1 -1
- data/tools/dataextractor/{CheckbuttonWidget-yAm10oX0-e8125b88e4be2fc48dbf.js → CheckbuttonWidget-A07FryqU-461fef72d2635ff7c3d8.js} +1 -1
- data/tools/dataextractor/{ComboboxWidget-BnWksnnp-c1d54211236c9e26a34b.js → ComboboxWidget-xayce-aY-7605f54bbaa22fd68569.js} +1 -1
- data/tools/dataextractor/DataExtractor-006ab46fdfac042cf003.js +14 -0
- data/tools/dataextractor/{DateWidget-CAiG2FIl-c146fb495ef13560c452.js → DateWidget-DrYZJta_-418188177f795dd16514.js} +1 -1
- data/tools/dataextractor/{DetailsDialog-q5SDzw3R-7c15f8bc9d13be343b4a.js → DetailsDialog-CFCaJZWz-bb3c149806450af49675.js} +1 -1
- data/tools/dataextractor/{DynamicWidget-BuSbQVhf-86285e64782585bb8284.js → DynamicWidget-BuSbQVhf-c06a8693b276fb5b5083.js} +1 -1
- data/tools/dataextractor/{FilechecksumWidget-DeW9wy5d-248571c63dba27319b36.js → FilechecksumWidget-CTf0XGST-57da030df88bcae0840f.js} +1 -1
- data/tools/dataextractor/{FiledisplayWidget-C_zPFu2E-2d17e2f1448559a44f05.js → FiledisplayWidget-DLJuesmU-7a9c94d3f7db028b52b8.js} +1 -1
- data/tools/dataextractor/{FormatvalueWidget-BrvPWwfN-e050d5adc896a68175ca.js → FormatvalueWidget-DODmUWPH-6b499827be47ec864d36.js} +1 -1
- data/tools/dataextractor/Graph-Cwghj5Pc-4a4336a11d30c4ff2295.js +1 -0
- data/tools/dataextractor/{GraphWidget-QS-VJoes-2024d5d6197b125514ef.js → GraphWidget-Rc-fnHCt-54c64ceaa7db83c11660.js} +1 -1
- data/tools/dataextractor/{HorizontalWidget-cFSsdChw-d979f75547fda5fa7327.js → HorizontalWidget-CZqN6UYp-3ffbc823163c6f336bbc.js} +1 -1
- data/tools/dataextractor/{HorizontalboxWidget-CKA7rLGd-9f624ef7e0a8f5e8341a.js → HorizontalboxWidget-BV7cyhwN-01fb3d720ab9c0004ff1.js} +1 -1
- data/tools/dataextractor/HorizontallineWidget-ChDLR_8D-34c99e1ebe7cabde2cec.js +1 -0
- data/tools/dataextractor/{IframeWidget-CITX8Es1-f88b11b4cb0abe9013a6.js → IframeWidget-BdOS5sm_-830d369a6d746cc4ea70.js} +1 -1
- data/tools/dataextractor/{ImageLoader-DQV_11Vd-6bd51c2e0e35e48f84d3.js → ImageLoader-CnlQ4xLd-9d5ac60caef9a79ee131.js} +1 -1
- data/tools/dataextractor/{ImageviewerWidget-BIsSA7KD-27ebd6d54624aecc85c5.js → ImageviewerWidget-DoJBe5eZ-e93fdee9a5de4d3e540f.js} +1 -1
- data/tools/dataextractor/{LabelWidget-FQI-cH_A-6ba874245f82dee1b5b4.js → LabelWidget-DYwcB_S4-228ac374bdbaaf35fc94.js} +1 -1
- data/tools/dataextractor/{LabelledWidget-KGXtQ4Zb-fd5dd58e0de56789b7b2.js → LabelledWidget-D4N2gPxJ-627cb1272084c20e6ddd.js} +1 -1
- data/tools/dataextractor/LabelprogressbarWidget-CRnteLAo-8bb1c5ac4fefd5c5f93d.js +1 -0
- data/tools/dataextractor/LabelsparklineWidget-Bbjjio1S-3cb1052ea5432387b327.js +1 -0
- data/tools/dataextractor/{LabelvalueWidget-D_JLdY7r-95bd967c8c4f6cb0fb1c.js → LabelvalueWidget-Bc6HtTMO-03e6935aea12be74b056.js} +1 -1
- data/tools/dataextractor/LabelvaluedescWidget-D5aDNr1o-b9941eda8fd09aeb8d5a.js +1 -0
- data/tools/dataextractor/LabelvaluelimitsbarWidget-CMnJoNKz-f1f138068e3c77abe3d6.js +1 -0
- data/tools/dataextractor/LabelvaluelimitscolumnWidget-R5ofG4q1-78da786e41b65ca740f2.js +1 -0
- data/tools/dataextractor/LabelvaluerangebarWidget-Qa3R2_4p-dcbaee45027629c6ede5.js +1 -0
- data/tools/dataextractor/{Layout-d-vb0okO-5143877d6be73c3e6315.js → Layout-BBLYT0gE-7b312adea09917fdfab4.js} +1 -1
- data/tools/dataextractor/{LedWidget-Cmr6eVG2-aa2c79bda6817327a734.js → LedWidget-CL2dOxb7-3bbab87f88de3eada6df.js} +1 -1
- data/tools/dataextractor/{LimitsBar-qMynDHYT-9ef33b1b3b889d3fab97.js → LimitsBar-59_qNqi8-78bb8167d1397a411d10.js} +1 -1
- data/tools/dataextractor/{LimitsbarWidget-CMvcwa-m-d060dbaa92ea217695a7.js → LimitsbarWidget-C0N2611W-c9f1083a540f416bd609.js} +1 -1
- data/tools/dataextractor/{LimitscolorWidget-CZ9wMtcI-600a0d33cfdac9e606c6.js → LimitscolorWidget-GfNCPo3i-f888da188ac9d157fb04.js} +1 -1
- data/tools/dataextractor/{LimitscolumnWidget-r84KJGU--63f1ce2e287b7e068fe3.js → LimitscolumnWidget-ut6NX68S-edbe1ef81ec64412dba6.js} +1 -1
- data/tools/dataextractor/LinegraphWidget-DaCyvdnI-567f1f90bbecc08449c1.js +1 -0
- data/tools/dataextractor/{MatrixbycolumnsWidget-Dx2iz0YF-999d3afe43e2aa9db87e.js → MatrixbycolumnsWidget-Cni63alW-21d337386672ee72b233.js} +1 -1
- data/tools/dataextractor/OpenC3TimePicker-WVlNQdKk-a1efabf60524315223d4.js +1 -0
- data/tools/dataextractor/{ProgressbarWidget-DPbAVjdC-2981b1af8af4da20b6d1.js → ProgressbarWidget-BWqCsk87-c7254b5a6b747c1721d0.js} +1 -1
- data/tools/dataextractor/{RadiobuttonWidget-iXI9yCDk-59f850a8bd9d843024e5.js → RadiobuttonWidget-Dza2r34f-1d7eef1843f1b2c63a33.js} +1 -1
- data/tools/dataextractor/{RadiogroupWidget-CMM_p1eA-1a39ed7902af769f50d0.js → RadiogroupWidget-DWmZMNmr-45df96c649488079d1dc.js} +1 -1
- data/tools/dataextractor/{RangebarWidget-DJXGUHAc-63d6cdc08c070ce2280c.js → RangebarWidget-DsGCC1x7-1a79d953342f57177d52.js} +1 -1
- data/tools/dataextractor/{RollupWidget-BbWLSsTT-f862029486671e1966d7.js → RollupWidget-DGElKXm3-26d24274fdcdc8b0f0d1.js} +1 -1
- data/tools/dataextractor/{ScrollwindowWidget-Dxhp7yKn-8b0ba7315cde67bcc9f6.js → ScrollwindowWidget-BvKT59rV-b1335c2891dd687cd82b.js} +1 -1
- data/tools/dataextractor/{SignalWidget-65q0tiuo-52c981c4470bf5006886.js → SignalWidget-DRAFunW0-7dfe185f6a32704f4963.js} +1 -1
- data/tools/dataextractor/SpacerWidget-CUGpXBpA-4cf00997aa32318d0007.js +1 -0
- data/tools/dataextractor/SparklineWidget-SBWjRrqq-e88851c1437b3c0091c1.js +1 -0
- data/tools/dataextractor/TabbookWidget-7l6fPoRA-309a39ebc7060a289b55.js +1 -0
- data/tools/dataextractor/{TargetPacketItemChooser-BOdVLVbe-d94873f0ee88694988de.js → TargetPacketItemChooser-QPHy-p2u-6c3336ddfc2130c89fa9.js} +1 -1
- data/tools/dataextractor/{TextboxWidget-DYsqXntS-d477d1867f2a65ae0699.js → TextboxWidget-Qb0TNt4Y-3ee0f155bb1a69f6087b.js} +1 -1
- data/tools/dataextractor/TextfieldWidget-DcSGRfnF-0c9e29695e9c0a978059.js +1 -0
- data/tools/dataextractor/TimeWidget-aoMkDgRR-c2bdb71e979e1f3ded87.js +1 -0
- data/tools/dataextractor/TitleWidget-C8b9Vp5r-fefda26a56e5cfe6d28b.js +1 -0
- data/tools/dataextractor/{VWidget-BDy0211S-1ff9c9310d5fdbf00390.js → VWidget-BgNciXK1-5b6d047860037a624d22.js} +1 -1
- data/tools/dataextractor/{ValueWidget-DzOSy7lp-92479ffa8015859984c7.js → ValueWidget-B1OvCmXK-09e4bc6504657c9b88e9.js} +1 -1
- data/tools/dataextractor/ValuelimitsbarWidget-CUd9P_Xg-1b29e5d70333e68048fa.js +1 -0
- data/tools/dataextractor/ValuelimitscolumnWidget-CbThSMma-abe8e36e957d772236ce.js +1 -0
- data/tools/dataextractor/ValuerangebarWidget-DjL4ze3d-50409a8ea2bb90611d48.js +1 -0
- data/tools/dataextractor/{VerticalWidget-BOtXAhxt-19d6adff2d379742f886.js → VerticalWidget-V5-vGq7l-d4d21b3cdc3044ddb3eb.js} +1 -1
- data/tools/dataextractor/VerticalboxWidget-OigMLjH8-c9332d7615a38507d88f.js +1 -0
- data/tools/dataextractor/{Widget-BDsgRxuV-660e8eb4690c2793e6b6.js → Widget-BiaunQ83-decc581ca3ab27c1b845.js} +1 -1
- data/tools/dataextractor/main-bd615259325517ea1b6f.js +1496 -0
- data/tools/dataextractor/main.js +1 -1
- metadata +73 -73
- data/tools/dataextractor/BlockWidget-BHtugveV-3a86c79f29993edbe557.js +0 -2
- data/tools/dataextractor/ButtonWidget-Cc9cYsg8-fa11db39baed1ca10dd9.js +0 -2
- data/tools/dataextractor/CanvasdotWidget-CMROfW3O-f502b2d25ac1e3251128.js +0 -1
- data/tools/dataextractor/CanvaslineWidget-CxnNAqOX-d042686da706d5408c3e.js +0 -1
- data/tools/dataextractor/DataExtractor-4fdb57d1945b0887db0f.js +0 -14
- data/tools/dataextractor/Graph-BCvaO4yI-a403dbd09e8a3025cceb.js +0 -1
- data/tools/dataextractor/HorizontallineWidget-BqbLK0zc-032877ba9a30de523df1.js +0 -1
- data/tools/dataextractor/LabelprogressbarWidget-72WyzD_Q-0c61a376a160ac8eabc1.js +0 -1
- data/tools/dataextractor/LabelsparklineWidget-DtWNf4mK-49ac92040f51acb6ad41.js +0 -1
- data/tools/dataextractor/LabelvaluedescWidget-BppM5vGp-e2eb8f62ec8b1edab5c7.js +0 -1
- data/tools/dataextractor/LabelvaluelimitsbarWidget-B69ogLif-bfa23b96929cba8117ff.js +0 -1
- data/tools/dataextractor/LabelvaluelimitscolumnWidget-DPYwFdgq-2159672e62922d671ff6.js +0 -1
- data/tools/dataextractor/LabelvaluerangebarWidget-BT0BcOoK-db30aa4c4f1abbb71f06.js +0 -1
- data/tools/dataextractor/LinegraphWidget-COGBGOjF-5c8d32bb60f274b053cd.js +0 -1
- data/tools/dataextractor/OpenC3TimePicker-C3vCnk72-b6adff64018a7923eb93.js +0 -1
- data/tools/dataextractor/SpacerWidget-DFzbojmX-55a4d9330581f9b7285d.js +0 -1
- data/tools/dataextractor/SparklineWidget-Bu4I8zY0-d05e82f937b095333a15.js +0 -1
- data/tools/dataextractor/TabbookWidget-CELMWyx7-1d7b6a3a541b8b6cffb3.js +0 -1
- data/tools/dataextractor/TextfieldWidget-BIUgV9Q4-7664df7a16deff334036.js +0 -1
- data/tools/dataextractor/TimeWidget-BPXcY1Wy-61008f558728b5f906d7.js +0 -1
- data/tools/dataextractor/TitleWidget-DJ9mHRLE-52e464994c49c45eae92.js +0 -1
- data/tools/dataextractor/ValuelimitsbarWidget-D5dSlW6D-cae311a05073ff60ddb1.js +0 -1
- data/tools/dataextractor/ValuelimitscolumnWidget-7DXCsVW_-86690696d7ef52117561.js +0 -1
- data/tools/dataextractor/ValuerangebarWidget-BWjnpmyy-ef11d2ea672f2dbd1a8a.js +0 -1
- data/tools/dataextractor/VerticalboxWidget-RAsXfGdI-c0d18d921ac32d9c3bbe.js +0 -1
- data/tools/dataextractor/main-cb94da8783ff5b6915d8.js +0 -1496
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e58009d5567a26f376d34d2f80b38e5470d0af92c2a369f2d3ec0dbcd337696c
|
|
4
|
+
data.tar.gz: bd45a9ee0882ac1d2d5d5fac0691f01a93a62a344ec4405aac5de17ccb92116b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d5ba9032ab60fca438c76f38d494ad36566a3141e26879519fa5aa13c7a7071f6eaf862d8b184813d0399fcb2587411018c9d9fd8e50866c2007c182ceb21c3e
|
|
7
|
+
data.tar.gz: 2a28d5e4fc6d4508582706f29991649e2c5f443e37d3d76106a7ca51ea5ad8e0363e71786e3161b9c0ad35c25a0f72340c106d11670a869b77181c83ca381f26
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./main-
|
|
2
|
-
`,o=0;if(Array.isArray(e)){for(const m of e)this.formatter&&this.formatter?.toLowerCase()!=="nil"?a+=sprintf(this.formatter,m):a+=m,o+=1,o%this.itemsPerRow===0?(o=0,a+=
|
|
1
|
+
System.register(["./main-bd615259325517ea1b6f.js","vue","./DetailsDialog-CFCaJZWz-bb3c149806450af49675.js","single-spa","./VWidget-BgNciXK1-5b6d047860037a624d22.js","vue-router","pinia","vuetify","./LimitsBar-59_qNqi8-78bb8167d1397a411d10.js","./LimitsColor-CBcpB-la-3bd861951380f642016e.js","./Widget-BiaunQ83-decc581ca3ab27c1b845.js"],(function(B,R){"use strict";var c,i,l,u,r,h,d,s,p,g,f,v,w,y,C,x;return{setters:[t=>{c=t.d},t=>{i=t.resolveComponent,l=t.openBlock,u=t.createElementBlock,r=t.createVNode,h=t.normalizeStyle,d=t.normalizeClass,s=t.withCtx,p=t.Fragment,g=t.renderList,f=t.createBlock,v=t.withModifiers,w=t.createTextVNode,y=t.toDisplayString},t=>{C=t.Z},null,t=>{x=t.T},null,null,null,null,null,null],execute:(function(){const t={components:{DetailsDialog:C},mixins:[x],data:function(){return{width:200,height:100,itemsPerRow:4,formatter:null}},computed:{aging(){return{"--aging":this.grayLevel}}},created:function(){this.width=this.setWidth(this.parameters[3],"px",this.width),this.height=this.setHeight(this.parameters[4],"px",this.height),this.parameters[5]&&(this.formatter=this.parameters[5]),this.parameters[6]&&(this.itemsPerRow=Number.parseInt(this.parameters[6]))},methods:{getType:function(){let e="CONVERTED";return this.parameters[7]&&(e=this.parameters[7]),e},formatValue:function(e){let a="",V=" ",k=`
|
|
2
|
+
`,o=0;if(Array.isArray(e)){for(const m of e)this.formatter&&this.formatter?.toLowerCase()!=="nil"?a+=sprintf(this.formatter,m):a+=m,o+=1,o%this.itemsPerRow===0?(o=0,a+=k):a+=V;return a.trim()}else return e}}},D={class:"array-widget-container"};function N(e,a,V,k,o,m){const S=i("v-textarea"),_=i("v-list-item-title"),z=i("v-list-item"),j=i("v-list"),L=i("v-menu"),M=i("details-dialog");return l(),u("div",D,[r(S,{variant:"solo",density:"compact",readonly:"","no-resize":"","auto-grow":"",rows:"2","hide-details":"","model-value":e._value,class:d(e.valueClass),style:h([e.computedStyle,m.aging]),"data-test":"array-widget",onContextmenu:e.showContextMenu},null,8,["model-value","class","style","onContextmenu"]),r(L,{modelValue:e.contextMenuShown,"onUpdate:modelValue":a[0]||(a[0]=n=>e.contextMenuShown=n),target:[e.x,e.y]},{default:s(()=>[r(j,null,{default:s(()=>[(l(!0),u(p,null,g(e.contextMenuOptions,(n,T)=>(l(),f(z,{key:T,onClick:v(n.action,["stop"])},{default:s(()=>[r(_,null,{default:s(()=>[w(y(n.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),r(M,{modelValue:e.viewDetails,"onUpdate:modelValue":a[1]||(a[1]=n=>e.viewDetails=n),"target-name":e.parameters[0],"packet-name":e.parameters[1],"item-name":e.parameters[2]},null,8,["modelValue","target-name","packet-name","item-name"])])}const E=B("default",c(t,[["render",N],["__scopeId","data-v-9da1fd5e"]]))})}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./main-
|
|
1
|
+
System.register(["./main-bd615259325517ea1b6f.js","./GraphWidget-Rc-fnHCt-54c64ceaa7db83c11660.js","vue","vue-router","pinia","single-spa","vuetify","./Widget-BiaunQ83-decc581ca3ab27c1b845.js"],(function(m,w){"use strict";var c,l,h,d,u,p;return{setters:[s=>{c=s.d,l=s.o,h=s.a},s=>{d=s.M},s=>{u=s.openBlock,p=s.createElementBlock},null,null,null,null,null],execute:(function(){const s={mixins:[d],data:function(){return{items:[],indexes:{},data:[[]],cable:new h,subscription:null,graph:null,xAxis:null,title:"Array Plot",colorIndex:0,colors:["#00c7cb","#938bdb","#4dacff","lime","darkorange","red","gold","hotpink","tan","cyan","maroon","blue","teal","purple","green","brown","lightblue","white","black"]}},computed:{dataOnly(){return this.data[1]}},watch:{dataOnly:function(){this.graph&&this.graph.setData(this.data)}},created(){for(const[e,t]of this.items.entries())this.data.push([]),this.indexes[this.subscriptionKey(t)]=e+1,t.color=this.colors[this.colorIndex],this.colorIndex++;this.appliedSettings.forEach(e=>{switch(e[0]){case"TITLE":this.title=e[1];break;case"X_AXIS":this.xAxis={start:Number.parseFloat(e[1]),step:Number.parseFloat(e[2])};break}})},mounted(){let e=[];this.items.forEach(n=>{e.push({label:this.itemName(n),stroke:n.color,width:2,value:(r,i)=>typeof i=="string"||Number.isNaN(i)?"NaN":i==null?"--":i.toFixed(3)})});let t={title:this.title,width:this.size.width,height:this.size.height,scales:{x:{time:!1},y:{time:!1,range:(n,r,i)=>[r,i]}},axes:[{stroke:"white",grid:{show:!0,stroke:"rgba(255, 255, 255, .1)",width:2}},{stroke:"white",grid:{show:!0,stroke:"rgba(255, 255, 255, .1)",width:2}}],series:[{label:"X Value"},...e]};this.graph=new l(t,this.data,document.getElementById(`chart${this.id}`)),this.subscribe()},beforeUnmount:function(){this.cable.disconnect()},methods:{subscribe:function(){this.cable.createSubscription("StreamingChannel",window.openc3Scope,{received:e=>this.received(e),connected:()=>{this.addItemsToSubscription(this.items)},disconnected:e=>{e.allowReconnect&&this.errors.push({type:"disconnected",message:"OpenC3 backend connection disconnected",time:new Date().getTime()})},rejected:()=>{this.errors.push({type:"rejected",message:"OpenC3 backend connection rejected",time:new Date().getTime()})}}).then(e=>{this.subscription=e})},received:function(e){for(let t of e){let n=[];for(const[r,i]of Object.entries(t)){r==="__time"&&(this.xAxis?n=Array.from({length:this.data[1].length},(f,o)=>this.xAxis.start+o*this.xAxis.step):n.length===0&&(n=Array.from({length:this.data[1].length},(f,o)=>o)),this.data[0]=n);let a=this.indexes[r];a&&(Array.isArray(i[0])?(this.data[a]=i[1],n=i[0]):this.data[a]=i)}}},addItemsToSubscription:function(e=this.items){this.subscription&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(t=>{t&&OpenC3Auth.setTokens(),this.subscription.perform("add",{scope:window.openc3Scope,token:localStorage.openc3Token,items:e.map(this.subscriptionKey),start_time:null,end_time:null})})},itemName:function(e){return`${e.targetName} ${e.packetName} ${e.itemName}`},subscriptionKey:function(e){let t=`${e.reduced}__TLM__${e.targetName}__${e.packetName}__${e.itemName}__${e.valueType}`;return(e.reduced==="REDUCED_MINUTE"||e.reduced==="REDUCED_HOUR"||e.reduced==="REDUCED_DAY")&&(t+=`__${e.reducedType}`),t}}},b=["id"];function g(e,t,n,r,i,a){return u(),p("div",{id:`chart${e.id}`,class:"pa-1"},null,8,b)}const k=m("default",c(s,[["render",g]]))})}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./Widget-
|
|
1
|
+
System.register(["./Widget-BiaunQ83-decc581ca3ab27c1b845.js","./main-bd615259325517ea1b6f.js"],(function(r,n){"use strict";var h,l;return{setters:[e=>{h=e.h},e=>{l=e.c}],execute:(function(){const e=r("l",{mixins:[h],data(){return{minValue:null,maxValue:null,redLow:0,yellowLow:0,greenLow:0,greenHigh:0,yellowHigh:0,redHigh:0,blue:0,api:null,limitsSettings:{DEFAULT:[]},currentLimitsSet:"DEFAULT",currentSetRefreshInterval:null}},computed:{cssProps:function(){if(!this.screenValues[this.valueId])return{};let t=this.screenValues[this.valueId][0],i=this.modifyLimits(this.limitsSettings[this.selectedLimitsSet]);return this.calcLimits(i),{"--height":this.height+"px","--width":this.width+"px","--container-height":this.height-5+"px","--position":this.calcPosition(t,i)+"%","--redlow-width":this.redLow+"%","--redhigh-width":this.redHigh+"%","--yellowlow-width":this.yellowLow+"%","--yellowhigh-width":this.yellowHigh+"%","--greenlow-width":this.greenLow+"%","--greenhigh-width":this.greenHigh+"%","--blue-width":this.blue+"%"}},selectedLimitsSet:function(){return this.limitsSettings.hasOwnProperty(this.currentLimitsSet)?this.currentLimitsSet:"DEFAULT"}},created(){this.api=new l;const t=this.parseItemName(this.parameters[2]);this.parameters[2]=t.name,this.api.get_limits(this.parameters[0],this.parameters[1],t.name).then(i=>{this.limitsSettings=i}),this.getCurrentLimitsSet(),this.currentSetRefreshInterval=setInterval(this.getCurrentLimitsSet,6e4),this.appliedSettings.forEach(i=>{i[0]==="MIN_VALUE"&&(this.minValue=parseInt(i[1])),i[0]==="MAX_VALUE"&&(this.maxValue=parseInt(i[1]))}),this.width=this.setWidth(this.parameters[4],"px",this.width),this.height=this.setHeight(this.parameters[5],"px",this.height),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__CONVERTED`,this.$emit("addItem",this.valueId)},destroyed(){this.$emit("deleteItem",this.valueId),clearInterval(this.currentSetRefreshInterval)},methods:{modifyLimits(t){if(!t)return;this.redLow=10,this.redHigh=10,this.minValue!==null&&(t[0]<=this.minValue&&(t[0]=this.minValue,this.redLow=0),t[1]<=this.minValue&&(t[1]=this.minValue),t[2]<=this.minValue&&(t[2]=this.minValue),t[3]<=this.minValue&&(t[3]=this.minValue),t.length>4&&t[4]<=this.minValue&&(t[4]=this.minValue),t.length>4&&t[5]<=this.minValue&&(t[5]=this.minValue)),this.maxValue!==null&&(t[0]>=this.maxValue&&(t[0]=this.maxValue),t[1]>=this.maxValue&&(t[1]=this.maxValue),t[2]>=this.maxValue&&(t[2]=this.maxValue),t[3]>=this.maxValue&&(t[3]=this.maxValue,this.redHigh=0),t.length>4&&t[4]>=this.maxValue&&(t[4]=this.maxValue),t.length>4&&t[5]>=this.maxValue&&(t[5]=this.maxValue)),t[0]==t[1]&&(this.yellowLow=0),t[2]==t[3]&&(this.yellowHigh=0);let i=80;return this.redLow==0&&(i+=10),this.redHigh==0&&(i+=10),this.scale=(t[3]-t[0])/i,t},calcPosition(t,i){if(t==null||!i)return;let a=i[0]-10*this.scale;if(this.minValue&&this.minValue==i[0]&&(a=i[0]),i[3]-10*this.scale,this.maxValue&&this.maxValue==i[3]&&i[3],t.raw)return t.raw==="-Infinity"?0:100;if(t<this.min)return 0;if(t>this.max)return 100;{const s=parseInt((t-a)/this.scale);return s>100?100:s<0?0:s}},calcLimits(t){t&&(this.yellowLow=Math.round((t[1]-t[0])/this.scale),this.yellowHigh=Math.round((t[3]-t[2])/this.scale),t.length>4?(this.greenLow=Math.round((t[4]-t[1])/this.scale),this.greenHigh=Math.round((t[2]-t[5])/this.scale),this.blue=Math.round(100-this.redLow-this.yellowLow-this.greenLow-this.greenHigh-this.yellowHigh-this.redHigh)):(this.greenLow=Math.round(100-this.redLow-this.yellowLow-this.yellowHigh-this.redHigh),this.greenHigh=0,this.blue=0))},getCurrentLimitsSet:function(){this.api.get_limits_set().then(t=>{this.currentLimitsSet=t})}}})})}}));
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
System.register(["./main-bd615259325517ea1b6f.js","vue","./DetailsDialog-CFCaJZWz-bb3c149806450af49675.js","single-spa","./VWidget-BgNciXK1-5b6d047860037a624d22.js","vue-router","pinia","vuetify","./LimitsBar-59_qNqi8-78bb8167d1397a411d10.js","./LimitsColor-CBcpB-la-3bd861951380f642016e.js","./Widget-BiaunQ83-decc581ca3ab27c1b845.js"],(function(W,j){"use strict";var u,r,h,d,s,p,g,o,w,f,v,y,x,C,k,V;return{setters:[e=>{u=e.d},e=>{r=e.resolveComponent,h=e.openBlock,d=e.createElementBlock,s=e.createVNode,p=e.normalizeStyle,g=e.normalizeClass,o=e.withCtx,w=e.Fragment,f=e.renderList,v=e.createBlock,y=e.withModifiers,x=e.createTextVNode,C=e.toDisplayString},e=>{k=e.Z},null,e=>{V=e.T},null,null,null,null,null,null],execute:(function(){const e={components:{DetailsDialog:k},mixins:[V],data:function(){return{width:400,height:400,bytesPerWord:4,wordsPerRow:4,addrFormat:null,formatter:"%02X"}},computed:{aging(){return{"--aging":this.grayLevel}},rows:function(){return(this.height-16)/24}},created:function(){this.width=this.setWidth(this.parameters[3],"px",this.width),this.height=this.setHeight(this.parameters[4],"px",this.height),this.parameters[5]&&(this.formatter=this.parameters[5]),this.parameters[6]&&(this.bytesPerWord=Number.parseInt(this.parameters[6])),this.parameters[7]&&(this.wordsPerRow=Number.parseInt(this.parameters[7])),this.parameters[8]&&(this.addrFormat=this.parameters[8])},methods:{getType:function(){let t="RAW";return this.parameters[9]&&(t=this.parameters[9]),t},formatValue:function(t){let a="";if(t&&t.raw){let B=" ",S=`
|
|
2
|
+
`,i=0,l=0;const m=this.bytesPerWord*this.wordsPerRow;for(const c of t.raw)this.addrFormat&&i===0&&(a+=sprintf(this.addrFormat,l),l+=m),a+=sprintf(this.formatter,c),i+=1,i%m===0?(i=0,a+=S):i%this.bytesPerWord===0&&(a+=B)}else a=t;return a}}},D={class:"block-widget-container"};function N(t,a,B,S,i,l){const m=r("v-textarea"),c=r("v-list-item-title"),_=r("v-list-item"),b=r("v-list"),F=r("v-menu"),M=r("details-dialog");return h(),d("div",D,[s(m,{variant:"solo",density:"compact",readonly:"","no-resize":"","hide-details":"",rows:l.rows,width:t.width,"model-value":t._value,class:g(t.valueClass),style:p([t.computedStyle,l.aging]),"data-test":"valueText",onContextmenu:t.showContextMenu},null,8,["rows","width","model-value","class","style","onContextmenu"]),s(F,{modelValue:t.contextMenuShown,"onUpdate:modelValue":a[0]||(a[0]=n=>t.contextMenuShown=n),target:[t.x,t.y]},{default:o(()=>[s(b,null,{default:o(()=>[(h(!0),d(w,null,f(t.contextMenuOptions,(n,P)=>(h(),v(_,{key:P,onClick:y(n.action,["stop"])},{default:o(()=>[s(c,null,{default:o(()=>[x(C(n.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),s(M,{modelValue:t.viewDetails,"onUpdate:modelValue":a[1]||(a[1]=n=>t.viewDetails=n),"target-name":t.parameters[0],"packet-name":t.parameters[1],"item-name":t.parameters[2]},null,8,["modelValue","target-name","packet-name","item-name"])])}const z=W("default",u(e,[["render",N],["__scopeId","data-v-fc296592"]]))})}}));
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
System.register(["./main-bd615259325517ea1b6f.js","vue","single-spa","./Widget-BiaunQ83-decc581ca3ab27c1b845.js","vue-router","pinia","vuetify"],(function(exports,module){"use strict";var d,A,Ss,ca,resolveComponent,openBlock,createBlock,withCtx,createVNode,createElementVNode,createTextVNode,toDisplayString,createCommentVNode,withModifiers,createElementBlock,normalizeStyle,h;return{setters:[e=>{d=e.d,A=e.A,Ss=e.S,ca=e.c},e=>{resolveComponent=e.resolveComponent,openBlock=e.openBlock,createBlock=e.createBlock,withCtx=e.withCtx,createVNode=e.createVNode,createElementVNode=e.createElementVNode,createTextVNode=e.createTextVNode,toDisplayString=e.toDisplayString,createCommentVNode=e.createCommentVNode,withModifiers=e.withModifiers,createElementBlock=e.createElementBlock,normalizeStyle=e.normalizeStyle},null,e=>{h=e.h},null,null,null],execute:(function(){const S={props:{uuid:{type:String,default:null},cmdUser:{type:String,default:null},cmdString:{type:String,default:null},persistent:{type:Boolean,default:!1},modelValue:Boolean},emits:["update:modelValue","status"],data(){return{updater:null,username:null,password:null,canApprove:!1,error:!1,errorText:""}},computed:{show:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e)}},formValid:function(){return!!this.password&&!!this.username},disableButtons:function(){return!this.formValid&&!this.canApprove}},watch:{modelValue:function(e,t){e?(Ss.get("/openc3-api/criticalcmd/canapprove/"+this.uuid).then(s=>{s.data.status==="ok"&&(this.canApprove=!0)}),this.updater=setInterval(()=>{this.uuid?Ss.get("/openc3-api/criticalcmd/status/"+this.uuid).then(s=>{s.data.status!=="WAITING"&&(this.$emit("status",s.data.status,this.uuid),this.show=!1)}):this.show=!1},1e3)):(clearInterval(this.updater),this.updater=null,this.canApprove=!1,this.username=null,this.password=null)}},beforeUnmount(){clearInterval(this.updater),this.updater=null,this.canApprove=!1,this.username=null,this.password=null},methods:{async approve(){if(this.canApprove)await Ss.post("/openc3-api/criticalcmd/approve/"+this.uuid,{}).then(e=>{e.status==200&&(this.$emit("status","APPROVED",this.uuid),this.show=!1,this.error=!1)});else{let e=await this.getKeycloakToken();A.post("/openc3-api/criticalcmd/approve/"+this.uuid,{},{headers:{Authorization:e,"Content-Type":"application/json"},params:{scope:window.openc3Scope},timeout:5e3}).then(t=>{this.$emit("status","APPROVED",this.uuid),this.show=!1,this.error=!1}).catch(t=>{this.error=!0,t.response?this.errorText=t.response.data.message:this.errorText=t.message})}},async reject(){if(this.canApprove)await Ss.post("/openc3-api/criticalcmd/reject/"+this.uuid,{}).then(e=>{e.status==200&&(this.$emit("status","REJECTED",this.uuid),this.show=!1,this.error=!1)});else{let e=await this.getKeycloakToken();(await A.post("/openc3-api/criticalcmd/reject/"+this.uuid,{},{headers:{Authorization:e,"Content-Type":"application/json"},params:{scope:window.openc3Scope},timeout:5e3})).status==200&&(this.$emit("status","REJECTED",this.uuid),this.show=!1,this.error=!1)}},async getKeycloakToken(){return(await A.post(localStorage.keycloakUrl+"/realms/"+localStorage.keycloakRealm+"/protocol/openid-connect/token",{username:this.username,password:this.password,client_id:localStorage.keycloakClientId,grant_type:"password",scope:"openid"},{headers:{"Content-Type":"application/x-www-form-urlencoded"},timeout:5e3})).data.access_token}}};function E(e,t,s,u,a,o){const l=resolveComponent("v-spacer"),f=resolveComponent("v-toolbar"),p=resolveComponent("v-alert"),r=resolveComponent("v-row"),m=resolveComponent("v-text-field"),C=resolveComponent("v-btn"),V=resolveComponent("v-container"),v=resolveComponent("v-card-text"),c=resolveComponent("v-card"),w=resolveComponent("v-dialog");return openBlock(),createBlock(w,{modelValue:o.show,"onUpdate:modelValue":t[3]||(t[3]=n=>o.show=n),persistent:s.persistent,width:"600"},{default:withCtx(()=>[createVNode(c,null,{default:withCtx(()=>[createVNode(f,{height:"24"},{default:withCtx(()=>[createVNode(l),t[4]||(t[4]=createElementVNode("span",null," Waiting for Critical Command Approval ",-1)),createVNode(l)]),_:1}),createVNode(v,null,{default:withCtx(()=>[createVNode(V,{fluid:""},{default:withCtx(()=>[createVNode(p,{modelValue:a.error,"onUpdate:modelValue":t[0]||(t[0]=n=>a.error=n),type:"error",closable:""},{default:withCtx(()=>[createTextVNode(toDisplayString(a.errorText),1)]),_:1},8,["modelValue"]),createVNode(r,{class:"pt-4",style:{color:"white"}},{default:withCtx(()=>[createTextVNode("User "+toDisplayString(s.cmdUser)+" is waiting for approval to execute: ",1)]),_:1}),createVNode(r,{class:"pa-4",style:{color:"white"}},{default:withCtx(()=>[createTextVNode(toDisplayString(s.cmdString),1)]),_:1}),createVNode(r,{class:"text-subtitle-2"},{default:withCtx(()=>[createTextVNode("UUID: "+toDisplayString(s.uuid),1)]),_:1}),a.canApprove?createCommentVNode("",!0):(openBlock(),createBlock(r,{key:0},{default:withCtx(()=>[createVNode(m,{modelValue:a.username,"onUpdate:modelValue":t[1]||(t[1]=n=>a.username=n),label:"Username","data-test":"username"},null,8,["modelValue"])]),_:1})),a.canApprove?createCommentVNode("",!0):(openBlock(),createBlock(r,{key:1},{default:withCtx(()=>[createVNode(m,{modelValue:a.password,"onUpdate:modelValue":t[2]||(t[2]=n=>a.password=n),type:"password",label:"Password","data-test":"password"},null,8,["modelValue"])]),_:1})),createVNode(r,{class:"pt-2"},{default:withCtx(()=>[createVNode(l),createVNode(C,{type:"submit",class:"mx-2",color:"secondary",variant:"outlined",disabled:o.disableButtons,"data-test":"reject",onClick:withModifiers(o.reject,["prevent"])},{default:withCtx(()=>[...t[5]||(t[5]=[createTextVNode(" Reject ",-1)])]),_:1},8,["disabled","onClick"]),createVNode(C,{type:"submit",class:"mx-2",color:"primary",disabled:o.disableButtons,"data-test":"approve",onClick:withModifiers(o.approve,["prevent"])},{default:withCtx(()=>[...t[6]||(t[6]=[createTextVNode(" Approve ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","persistent"])}const P=d(S,[["render",E],["__scopeId","data-v-fed7ba55"]]),_sfc_main={components:{CriticalCmdDialog:P},mixins:[h],data(){return{api:null,displaySendHazardous:!1,lastCmd:"",criticalCmdUuid:null,criticalCmdString:null,criticalCmdUser:null,displayCriticalCmd:!1}},computed:{buttonText(){return this.parameters[0]},eval(){return this.parameters[1]}},created(){this.api=new ca},methods:{async onClick(){const lines=this.eval.split(";;"),self=this,screen=this.screen,screenValues=this.screenValues,screenTimeZone=this.screenTimeZone,api=this.api,runScript=this.runScript;(self||screen||screenValues||screenTimeZone||api||runScript)&&this.$nextTick(()=>{});for(let i=0;i<lines.length;i++)try{const result=eval(lines[i].trim());result instanceof Promise&&await result}catch(e){if(e.message.includes("CriticalCmdError"))this.criticalCmdUuid=e.object.data.instance_variables["@uuid"],this.criticalCmdString=e.object.data.instance_variables["@cmd_string"],this.criticalCmdUser=e.object.data.instance_variables["@username"],this.displayCriticalCmd=!0;else if(e.message.includes("is Hazardous"))for(this.lastCmd=e.message.split(`
|
|
2
|
+
`).pop(),this.displaySendHazardous=!0;this.displaySendHazardous;)await new Promise(t=>setTimeout(t,500));else console.error(e)}},async sendHazardousCmd(){this.lastCmd=this.lastCmd.replace("cmd(","this.api.cmd_no_hazardous_check(");try{const result=eval(this.lastCmd);result instanceof Promise&&await result}catch(e){e.message.includes("CriticalCmdError")&&(this.criticalCmdUuid=e.object.data.instance_variables["@uuid"],this.criticalCmdString=e.object.data.instance_variables["@cmd_string"],this.criticalCmdUser=e.object.data.instance_variables["@username"],this.displayCriticalCmd=!0)}this.displaySendHazardous=!1},cancelHazardousCmd(){this.displaySendHazardous=!1},runScript(e,t=!0,s={}){let u=[];for(const a in s)u.push({key:a,value:s[a],readonly:!1});Ss.post(`/script-api/scripts/${e}/run`,{data:{environment:u}}).then(a=>{t&&window.open(`/tools/scriptrunner/${a.data}`,"_blank")})}}},_hoisted_1={class:"mx-1"};function _sfc_render(e,t,s,u,a,o){const l=resolveComponent("v-btn"),f=resolveComponent("v-card-title"),p=resolveComponent("v-row"),r=resolveComponent("v-spacer"),m=resolveComponent("v-card-text"),C=resolveComponent("v-card"),V=resolveComponent("v-dialog"),v=resolveComponent("critical-cmd-dialog");return openBlock(),createElementBlock("div",null,[createVNode(l,{class:"ma-1",color:"primary",style:normalizeStyle(e.computedStyle),onClick:o.onClick},{default:withCtx(()=>[createTextVNode(toDisplayString(o.buttonText),1)]),_:1},8,["style","onClick"]),createVNode(V,{modelValue:a.displaySendHazardous,"onUpdate:modelValue":t[0]||(t[0]=c=>a.displaySendHazardous=c),"max-width":"300"},{default:withCtx(()=>[createVNode(C,null,{default:withCtx(()=>[createVNode(f,null,{default:withCtx(()=>[...t[2]||(t[2]=[createTextVNode("Hazardous",-1)])]),_:1}),createVNode(m,null,{default:withCtx(()=>[createElementVNode("div",_hoisted_1,[createVNode(p,{class:"my-2"},{default:withCtx(()=>[...t[3]||(t[3]=[createElementVNode("span",null," Warning: Command is Hazardous. Send? ",-1)])]),_:1}),createVNode(p,null,{default:withCtx(()=>[createVNode(r),createVNode(l,{variant:"outlined",onClick:o.cancelHazardousCmd},{default:withCtx(()=>[...t[4]||(t[4]=[createTextVNode(" Cancel ",-1)])]),_:1},8,["onClick"]),createVNode(l,{class:"bg-primary mx-1",onClick:o.sendHazardousCmd},{default:withCtx(()=>[...t[5]||(t[5]=[createTextVNode(" Send ",-1)])]),_:1},8,["onClick"])]),_:1})])]),_:1})]),_:1})]),_:1},8,["modelValue"]),createVNode(v,{modelValue:a.displayCriticalCmd,"onUpdate:modelValue":t[1]||(t[1]=c=>a.displayCriticalCmd=c),uuid:a.criticalCmdUuid,"cmd-string":a.criticalCmdString,"cmd-user":a.criticalCmdUser},null,8,["modelValue","uuid","cmd-string","cmd-user"])])}const ButtonWidget=exports("default",d(_sfc_main,[["render",_sfc_render]]))})}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./Layout-
|
|
1
|
+
System.register(["./Layout-BBLYT0gE-7b312adea09917fdfab4.js","vue","./main-bd615259325517ea1b6f.js","./Widget-BiaunQ83-decc581ca3ab27c1b845.js","vue-router","pinia","single-spa","vuetify"],(function(p,f){"use strict";var i,n,s,a,l,c,u,g,o;return{setters:[e=>{i=e.r},e=>{n=e.openBlock,s=e.createElementBlock,a=e.Fragment,l=e.renderList,c=e.createBlock,u=e.resolveDynamicComponent,g=e.mergeProps},e=>{o=e.d},null,null,null,null,null],execute:(function(){const e={mixins:[i],computed:{width(){return this.parameters[0]+"px"},height(){return this.parameters[1]+"px"}}},d=["width","height"];function h(r,w,k,y,b,m){return n(),s("svg",{id:"canvas",width:m.width,height:m.height},[(n(!0),s(a,null,l(r.widgets,(t,v)=>(n(),c(u(t.type),g({ref_for:!0},r.listeners,{key:v,target:t.target,parameters:t.parameters,settings:t.settings,"screen-values":r.screenValues,"screen-time-zone":r.screenTimeZone,widgets:t.widgets,name:t.name,line:t.line,"line-number":t.lineNumber}),null,16,["target","parameters","settings","screen-values","screen-time-zone","widgets","name","line","line-number"]))),128))],8,d)}const B=p("default",o(e,[["render",h],["__scopeId","data-v-50b8991f"]]))})}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./Widget-BiaunQ83-decc581ca3ab27c1b845.js","vue","./main-bd615259325517ea1b6f.js","vue-router","pinia","single-spa","vuetify"],(function(i,a){"use strict";var r,t,l,c;return{setters:[e=>{r=e.h},e=>{t=e.openBlock,l=e.createElementBlock},e=>{c=e.d},null,null,null,null],execute:(function(){const e={mixins:[r]},s=["cx","cy","r","fill"];function u(n,m,p,f,d,B){return t(),l("circle",{cx:n.parameters[0],cy:n.parameters[1],r:n.parameters[3],fill:n.parameters[2]},null,8,s)}const o=i("default",c(e,[["render",u]]))})}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./Widget-
|
|
1
|
+
System.register(["./Widget-BiaunQ83-decc581ca3ab27c1b845.js","./ImageLoader-CnlQ4xLd-9d5ac60caef9a79ee131.js","vue","./main-bd615259325517ea1b6f.js","vue-router","pinia","single-spa","vuetify"],(function(o,d){"use strict";var i,n,s,a,l,c,h;return{setters:[e=>{i=e.h},e=>{n=e.s},e=>{s=e.openBlock,a=e.createElementBlock,l=e.normalizeStyle,c=e.createCommentVNode},e=>{h=e.d},null,null,null,null],execute:(function(){const e={mixins:[i,n],emits:["open"],data:function(){return{imageUrl:null,screenTarget:null,screenName:null}},computed:{width:function(){return this.parameters[3]?`${this.parameters[3]}px`:"100%"},height:function(){return this.parameters[4]?`${this.parameters[4]}px`:"100%"},pointerStyle(){return this.screenTarget&&this.screenName?{cursor:"pointer"}:{cursor:"default"}}},created:function(){this.appliedSettings.forEach(t=>{t[0]==="SCREEN"&&(this.screenTarget=t[1],this.screenName=t[2])}),this.parameters[0].startsWith("http")?this.imageUrl=this.parameters[0]:this.getPresignedUrl(this.parameters[0]).then(t=>{this.imageUrl=t})},methods:{clickHandler(){this.screenTarget&&this.screenName&&this.$emit("open",this.screenTarget,this.screenName)}}},u=["href","x","y","width","height"];function p(t,m,y,k,N,r){return t.imageUrl?(s(),a("image",{key:0,href:t.imageUrl,x:t.parameters[1],y:t.parameters[2],width:r.width,height:r.height,style:l(r.pointerStyle),onClick:m[0]||(m[0]=(...g)=>r.clickHandler&&r.clickHandler(...g))},null,12,u)):c("",!0)}const f=o("default",h(e,[["render",p]]))})}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./Widget-
|
|
1
|
+
System.register(["./Widget-BiaunQ83-decc581ca3ab27c1b845.js","./ImageLoader-CnlQ4xLd-9d5ac60caef9a79ee131.js","vue","./main-bd615259325517ea1b6f.js","vue-router","pinia","single-spa","vuetify"],(function(I,S){"use strict";var m,d,l,n,g,o,h,u,c,p,f;return{setters:[t=>{m=t.h},t=>{d=t.s},t=>{l=t.openBlock,n=t.createElementBlock,g=t.Fragment,o=t.renderList,h=t.withDirectives,u=t.normalizeStyle,c=t.vShow,p=t.createCommentVNode},t=>{f=t.d},null,null,null,null],execute:(function(){const t={mixins:[m,d],emits:["addItem","deleteItem","open"],data:function(){return{images:[],defaultImage:null,screenTarget:null,screenName:null}},computed:{selectedValue:function(){return this.screenValues[this.valueId]?this.screenValues[this.valueId][0]:null},showDefault:function(){return!this.images.some(i=>i.value==this.selectedValue)},pointerStyle(){return this.screenTarget&&this.screenName?{cursor:"pointer"}:{cursor:"default"}}},created:function(){this.appliedSettings.forEach(e=>{e[0]==="SCREEN"&&(this.screenTarget=e[1],this.screenName=e[2])}),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__${this.parameters[3]||"RAW"}`,this.$emit("addItem",this.valueId);const i=this.appliedSettings.filter(e=>e[0]==="IMAGE").map(async e=>{let r=e[2];return r.startsWith("http")||(r=await this.getPresignedUrl(r)),{url:r,value:e[1],x:e[3],y:e[4],width:e[5],height:e[6]}});if(Promise.all(i).then(e=>{this.images=e}),this.parameters[4]){const e={x:this.parameters[5],y:this.parameters[6],width:this.parameters[7]?`${this.parameters[7]}px`:"100%",height:this.parameters[8]?`${this.parameters[8]}px`:"100%"};let r=this.parameters[4];r.startsWith("http")?this.defaultImage={...e,url:r}:this.getPresignedUrl(r).then(y=>{this.defaultImage={...e,url:y}})}},unmounted:function(){this.$emit("deleteItem",this.valueId)},methods:{clickHandler(){this.screenTarget&&this.screenName&&this.$emit("open",this.screenTarget,this.screenName)}}},v=["href","x","y","width","height"],w=["href","x","y","width","height"];function k(i,e,r,y,N,a){return l(),n("g",null,[(l(!0),n(g,null,o(i.images,s=>h((l(),n("image",{key:s.value,href:s.url,x:s.x,y:s.y,width:s.width,height:s.height,style:u(a.pointerStyle),onClick:e[0]||(e[0]=(...x)=>a.clickHandler&&a.clickHandler(...x))},null,12,v)),[[c,s.value==a.selectedValue]])),128)),i.defaultImage?h((l(),n("image",{key:0,href:i.defaultImage.url,x:i.defaultImage.x,y:i.defaultImage.y,width:i.defaultImage.width,height:i.defaultImage.height,style:u(a.pointerStyle),onClick:e[1]||(e[1]=(...s)=>a.clickHandler&&a.clickHandler(...s))},null,12,w)),[[c,a.showDefault]]):p("",!0)])}const $=I("default",f(t,[["render",k]]))})}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./Widget-
|
|
1
|
+
System.register(["./Widget-BiaunQ83-decc581ca3ab27c1b845.js","vue","./main-bd615259325517ea1b6f.js","vue-router","pinia","single-spa","vuetify"],(function(a,p){"use strict";var r,l,n,i,s;return{setters:[e=>{r=e.h},e=>{l=e.openBlock,n=e.createElementBlock,i=e.toDisplayString},e=>{s=e.d},null,null,null,null],execute:(function(){const e={mixins:[r],computed:{fillColor(){return this.parameters[3]?this.parameters[3]:"black"}}},o=["x","y","fill"];function u(t,f,d,x,y,c){return l(),n("text",{x:t.parameters[0],y:t.parameters[1],fill:c.fillColor},i(t.parameters[2]),9,o)}const m=a("default",s(e,[["render",u]]))})}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./Widget-
|
|
1
|
+
System.register(["./Widget-BiaunQ83-decc581ca3ab27c1b845.js","vue","./main-bd615259325517ea1b6f.js","vue-router","pinia","single-spa","vuetify"],(function(u,d){"use strict";var s,a,i,l,n;return{setters:[e=>{s=e.h},e=>{a=e.openBlock,i=e.createElementBlock,l=e.toDisplayString},e=>{n=e.d},null,null,null,null],execute:(function(){const e={mixins:[s],emits:["addItem","deleteItem"],data(){return{valueId:null}},computed:{_value(){return this.screenValues[this.valueId]?this.screenValues[this.valueId][0]:""},fontSize(){return this.parameters[5]?this.parameters[5]+"px":"14px"},fillColor(){return this.parameters[6]?this.parameters[6]:"black"}},created(){let t="CONVERTED";this.parameters[7]&&(t=this.parameters[7]),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__${t}`,this.$emit("addItem",this.valueId)},unmounted(){this.$emit("deleteItem",this.valueId)}},m=["x","y","font-size","fill"];function o(t,h,c,f,v,r){return a(),i("text",{x:t.parameters[3],y:t.parameters[4],"font-size":r.fontSize,fill:r.fillColor},l(r._value),9,m)}const p=u("default",n(e,[["render",o]]))})}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./Widget-BiaunQ83-decc581ca3ab27c1b845.js","vue","./main-bd615259325517ea1b6f.js","vue-router","pinia","single-spa","vuetify"],(function(c,p){"use strict";var l,n,a,s,i;return{setters:[e=>{l=e.h},e=>{n=e.openBlock,a=e.createElementBlock,s=e.normalizeStyle},e=>{i=e.d},null,null,null,null],execute:(function(){const e={mixins:[l],computed:{calcStyle(){let t="black";this.parameters[4]&&(t=this.parameters[4]);let r=1;return this.parameters[5]&&(r=this.parameters[5]),"stroke:"+t+";stroke-width:"+r}}},u=["x1","y1","x2","y2"];function m(t,r,d,h,k,o){return n(),a("line",{x1:t.parameters[0],y1:t.parameters[1],x2:t.parameters[2],y2:t.parameters[3],style:s(o.calcStyle)},null,12,u)}const y=c("default",i(e,[["render",m]]))})}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./Widget-
|
|
1
|
+
System.register(["./Widget-BiaunQ83-decc581ca3ab27c1b845.js","vue","./main-bd615259325517ea1b6f.js","vue-router","pinia","single-spa","vuetify"],(function(u,d){"use strict";var s,r,l,i,n;return{setters:[t=>{s=t.h},t=>{r=t.openBlock,l=t.createElementBlock,i=t.normalizeStyle},t=>{n=t.d},null,null,null,null],execute:(function(){const t={mixins:[s],emits:["addItem","deleteItem"],data(){return{valueId:0,valueMap:{}}},computed:{calcStyle(){let e="black";this.screenValues[this.valueId]&&(e=this.valueMap[this.screenValues[this.valueId][0]]);let a=1;return this.parameters[7]&&(a=this.parameters[7]),"stroke:"+e+";stroke-width:"+a}},created(){this.appliedSettings.forEach(a=>{a[0]==="VALUE_EQ"&&(this.valueMap[a[1]]=a[2])});let e="CONVERTED";this.parameters[8]&&(e=this.parameters[8]),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__${e}`,this.$emit("addItem",this.valueId)},unmounted(){this.$emit("deleteItem",this.valueId)}},m=["x1","y1","x2","y2"];function h(e,a,o,v,y,c){return r(),l("line",{x1:e.parameters[3],y1:e.parameters[4],x2:e.parameters[5],y2:e.parameters[6],style:i(c.calcStyle)},null,12,m)}const p=u("default",n(t,[["render",h]]))})}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./Widget-
|
|
1
|
+
System.register(["./Widget-BiaunQ83-decc581ca3ab27c1b845.js","vue","./main-bd615259325517ea1b6f.js","vue-router","pinia","single-spa","vuetify"],(function(i,p){"use strict";var t,a,n,s,r,u;return{setters:[e=>{t=e.h},e=>{a=e.resolveComponent,n=e.openBlock,s=e.createBlock,r=e.normalizeStyle},e=>{u=e.d},null,null,null,null],execute:(function(){const e={mixins:[t],data(){return{items:[],label:"Checkbox",value:!1}},created(){this.label=this.parameters[0],this.parameters[1]&&(this.value=!0)},methods:{checked(){return this.value}}};function c(d,o,k,y,l,b){const m=a("v-checkbox");return n(),s(m,{modelValue:l.value,"onUpdate:modelValue":o[0]||(o[0]=h=>l.value=h),"hide-details":"",density:"compact",label:l.label,style:r(d.computedStyle)},null,8,["modelValue","label","style"])}const v=i("default",u(e,[["render",c]]))})}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./Widget-
|
|
1
|
+
System.register(["./Widget-BiaunQ83-decc581ca3ab27c1b845.js","vue","./main-bd615259325517ea1b6f.js","vue-router","pinia","single-spa","vuetify"],(function(o,p){"use strict";var l,n,s,i,a,r;return{setters:[e=>{l=e.h},e=>{n=e.resolveComponent,s=e.openBlock,i=e.createBlock,a=e.normalizeStyle},e=>{r=e.d},null,null,null,null],execute:(function(){const e={mixins:[l],data(){return{items:[],value:null}},created(){this.value=this.parameters[0],this.items=this.parameters},methods:{text(){return this.value}}};function c(m,u,y,f,t,B){const d=n("v-select");return s(),i(d,{modelValue:t.value,"onUpdate:modelValue":u[0]||(u[0]=v=>t.value=v),"hide-details":"",density:"compact",variant:"outlined",items:t.items,style:a(m.computedStyle)},null,8,["modelValue","items","style"])}const h=o("default",r(e,[["render",c]]))})}}));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
System.register(["./main-bd615259325517ea1b6f.js","vue","./TargetPacketItemChooser-QPHy-p2u-6c3336ddfc2130c89fa9.js","./OpenC3TimePicker-WVlNQdKk-a1efabf60524315223d4.js","vue-router","pinia","single-spa","vuetify"],(function(Vs,Gi){"use strict";var Ot,Ct,xt,Rt,At,kt,C,k,L,Pt,f,_,De,te,ne,de,_e,Dt,H,Qe,Ye,et,he,Nt,tt,It,jt;return{setters:[R=>{Ot=R.d,Ct=R._,xt=R.k,Rt=R.R,At=R.M,kt=R.I},R=>{C=R.resolveComponent,k=R.openBlock,L=R.createBlock,Pt=R.Teleport,f=R.createVNode,_=R.withCtx,De=R.createElementVNode,te=R.toDisplayString,ne=R.createElementBlock,de=R.Fragment,_e=R.renderList,Dt=R.ref,H=R.createTextVNode,Qe=R.mergeProps,Ye=R.createSlots,et=R.normalizeStyle,he=R.createCommentVNode,Nt=R.withModifiers,tt=R.withKeys},R=>{It=R._},R=>{jt=R.w},null,null,null,null],execute:(function(){var R=document.createElement("style");R.textContent=`.title-font[data-v-eb45238b]{font-size:1.125rem}.v-progress-linear__determinate[data-v-eb45238b]{transition:none!important}
|
|
2
|
+
/*$vite$:1*/`,document.head.appendChild(R);const qs={__name:"TopBarMenu",props:{menu:{type:Object,required:!0},title:{type:String,required:!0}},emits:["submenu-click"],setup(t,{emit:e}){const s=e,r=Dt(!1);function n(){r.value=!1}function o(i){return i.replaceAll(" ","-").toLowerCase()}return(i,a)=>{const c=C("v-icon"),u=C("v-btn"),d=C("v-divider"),p=C("v-list-item-title"),y=C("v-list-item"),b=C("v-list"),x=C("v-menu"),h=C("v-radio"),S=C("v-list-item-action"),m=C("v-radio-group"),E=C("v-checkbox");return k(),L(x,{modelValue:r.value,"onUpdate:modelValue":a[0]||(a[0]=g=>r.value=g),"close-on-content-click":!1},{activator:_(({props:g})=>[f(u,Qe(g,{variant:"outlined",class:"mx-1 menu-button",text:t.menu.label,"data-test":o(`${t.title} ${t.menu.label}`)}),{append:_(()=>[f(c,{class:"menu-button-icon"},{default:_(()=>[...a[1]||(a[1]=[H(" mdi-menu-down ",-1)])]),_:1})]),_:1},16,["text","data-test"])]),default:_(()=>[f(b,null,{default:_(()=>[(k(!0),ne(de,null,_e(t.menu.items,(g,O)=>(k(),ne(de,null,[g.divider?(k(),L(d,{key:O+"-divider"})):g.subMenu&&g.subMenu.length>0?(k(),ne("div",{key:O+"-submenu"},[(k(),L(x,{key:O,"open-on-hover":"",location:"right"},{activator:_(({props:P})=>[(k(),L(y,Qe({ref_for:!0},P,{key:O,disabled:g.disabled}),Ye({append:_(()=>[f(c,null,{default:_(()=>[...a[2]||(a[2]=[H(" mdi-chevron-right ",-1)])]),_:1})]),default:_(()=>[!g.radio&&!g.checkbox?(k(),L(p,{key:0,style:et("cursor: pointer;"+(g.disabled?"opacity: 0.2":""))},{default:_(()=>[H(te(g.label),1)]),_:2},1032,["style"])):he("",!0)]),_:2},[g.icon?{name:"prepend",fn:_(()=>[f(c,{disabled:g.disabled},{default:_(()=>[H(te(g.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:_(()=>[f(b,null,{default:_(()=>[(k(!0),ne(de,null,_e(g.subMenu,(P,J)=>(k(),L(y,{key:J,"prepend-icon":P.icon,onClick:K=>s("submenu-click",P)},{default:_(()=>[f(p,null,{default:_(()=>[H(te(P.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):g.radioGroup?(k(),L(m,{key:O+"-radio-group",class:"ma-0 pa-0",density:"compact","hide-details":"","model-value":g.value,"onUpdate:modelValue":g.command},{default:_(()=>[(k(!0),ne(de,null,_e(g.choices,(P,J)=>(k(),L(y,{key:J+"-choice"},{default:_(()=>[f(S,{class:"list-action"},{default:_(()=>[f(h,{color:"secondary",label:P.label,value:P.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(k(),L(y,{key:O+"-list",disabled:g.disabled,"data-test":o(`${t.title} ${t.menu.label} ${g.label}`),onClick:()=>{g.command(g),g.checkbox||n()}},Ye({default:_(()=>[g.checkbox?(k(),L(S,{key:0,class:"list-action"},{default:_(()=>[f(E,{modelValue:g.checked,"onUpdate:modelValue":P=>g.checked=P,label:g.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):he("",!0),!g.radio&&!g.checkbox?(k(),L(p,{key:1,style:et("cursor: pointer;"+(g.disabled?"opacity: 0.2":""))},{default:_(()=>[H(te(g.label),1)]),_:2},1032,["style"])):he("",!0)]),_:2},[g.icon?{name:"prepend",fn:_(()=>[f(c,{icon:g.icon,disabled:g.disabled},null,8,["icon","disabled"])]),key:"0"}:void 0]),1032,["disabled","data-test","onClick"]))],64))),256))]),_:1})]),_:1},8,["modelValue"])}}},Bs={components:{TopBarMenu:qs},props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},mounted(){document.title=this.title},methods:{subMenuClick(t){t.command(t),this.$refs.topmenu[0].isActive=!1}}},$s={class:"app-title mr-2"};function Hs(t,e,s,r,n,o){const i=C("v-col"),a=C("v-row"),c=C("TopBarMenu");return k(),L(Pt,{to:"#openc3-menu"},[f(a,{"no-gutters":""},{default:_(()=>[f(i,{"align-self":"end"},{default:_(()=>[De("span",$s,te(s.title),1)]),_:1})]),_:1}),f(a,{dense:"",class:"flex-nowrap"},{default:_(()=>[(k(!0),ne(de,null,_e(s.menus,(u,d)=>(k(),L(c,{key:d+"-top-menu",ref_for:!0,ref:"topmenu",menu:u,title:s.title,onSubmenuClick:o.subMenuClick},null,8,["menu","title","onSubmenuClick"]))),128))]),_:1})])}const zs=Ot(Bs,[["render",Hs],["__scopeId","data-v-f4fb184e"]]);function Ut(t,e){return function(){return t.apply(e,arguments)}}const{toString:Ws}=Object.prototype,{getPrototypeOf:Ne}=Object,{iterator:Ie,toStringTag:Mt}=Symbol,je=(t=>e=>{const s=Ws.call(e);return t[s]||(t[s]=s.slice(8,-1).toLowerCase())})(Object.create(null)),Y=t=>(t=t.toLowerCase(),e=>je(e)===t),Ue=t=>e=>typeof e===t,{isArray:fe}=Array,pe=Ue("undefined");function ye(t){return t!==null&&!pe(t)&&t.constructor!==null&&!pe(t.constructor)&&W(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Lt=Y("ArrayBuffer");function Js(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Lt(t.buffer),e}const Ks=Ue("string"),W=Ue("function"),Ft=Ue("number"),we=t=>t!==null&&typeof t=="object",Xs=t=>t===!0||t===!1,Me=t=>{if(je(t)!=="object")return!1;const e=Ne(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Mt in t)&&!(Ie in t)},Zs=t=>{if(!we(t)||ye(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},Gs=Y("Date"),Qs=Y("File"),Ys=t=>!!(t&&typeof t.uri<"u"),er=t=>t&&typeof t.getParts<"u",tr=Y("Blob"),sr=Y("FileList"),rr=t=>we(t)&&W(t.pipe);function nr(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Vt=nr(),qt=typeof Vt.FormData<"u"?Vt.FormData:void 0,ir=t=>{if(!t)return!1;if(qt&&t instanceof qt)return!0;const e=Ne(t);if(!e||e===Object.prototype||!W(t.append))return!1;const s=je(t);return s==="formdata"||s==="object"&&W(t.toString)&&t.toString()==="[object FormData]"},or=Y("URLSearchParams"),[ar,cr,lr,ur]=["ReadableStream","Request","Response","Headers"].map(Y),dr=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ve(t,e,{allOwnKeys:s=!1}={}){if(t===null||typeof t>"u")return;let r,n;if(typeof t!="object"&&(t=[t]),fe(t))for(r=0,n=t.length;r<n;r++)e.call(null,t[r],r,t);else{if(ye(t))return;const o=s?Object.getOwnPropertyNames(t):Object.keys(t),i=o.length;let a;for(r=0;r<i;r++)a=o[r],e.call(null,t[a],a,t)}}function Bt(t,e){if(ye(t))return null;e=e.toLowerCase();const s=Object.keys(t);let r=s.length,n;for(;r-- >0;)if(n=s[r],e===n.toLowerCase())return n;return null}const oe=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,$t=t=>!pe(t)&&t!==oe;function st(...t){const{caseless:e,skipUndefined:s}=$t(this)&&this||{},r={},n=(o,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;const a=e&&Bt(r,i)||i,c=rt(r,a)?r[a]:void 0;Me(c)&&Me(o)?r[a]=st(c,o):Me(o)?r[a]=st({},o):fe(o)?r[a]=o.slice():(!s||!pe(o))&&(r[a]=o)};for(let o=0,i=t.length;o<i;o++)t[o]&&ve(t[o],n);return r}const hr=(t,e,s,{allOwnKeys:r}={})=>(ve(e,(n,o)=>{s&&W(n)?Object.defineProperty(t,o,{__proto__:null,value:Ut(n,s),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,o,{__proto__:null,value:n,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),t),fr=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),pr=(t,e,s,r)=>{t.prototype=Object.create(e.prototype,r),Object.defineProperty(t.prototype,"constructor",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{__proto__:null,value:e.prototype}),s&&Object.assign(t.prototype,s)},mr=(t,e,s,r)=>{let n,o,i;const a={};if(e=e||{},t==null)return e;do{for(n=Object.getOwnPropertyNames(t),o=n.length;o-- >0;)i=n[o],(!r||r(i,t,e))&&!a[i]&&(e[i]=t[i],a[i]=!0);t=s!==!1&&Ne(t)}while(t&&(!s||s(t,e))&&t!==Object.prototype);return e},gr=(t,e,s)=>{t=String(t),(s===void 0||s>t.length)&&(s=t.length),s-=e.length;const r=t.indexOf(e,s);return r!==-1&&r===s},br=t=>{if(!t)return null;if(fe(t))return t;let e=t.length;if(!Ft(e))return null;const s=new Array(e);for(;e-- >0;)s[e]=t[e];return s},_r=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Ne(Uint8Array)),yr=(t,e)=>{const s=(t&&t[Ie]).call(t);let r;for(;(r=s.next())&&!r.done;){const n=r.value;e.call(t,n[0],n[1])}},wr=(t,e)=>{let s;const r=[];for(;(s=t.exec(e))!==null;)r.push(s);return r},vr=Y("HTMLFormElement"),Er=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,s,r){return s.toUpperCase()+r}),rt=(({hasOwnProperty:t})=>(e,s)=>t.call(e,s))(Object.prototype),Sr=Y("RegExp"),Ht=(t,e)=>{const s=Object.getOwnPropertyDescriptors(t),r={};ve(s,(n,o)=>{let i;(i=e(n,o,t))!==!1&&(r[o]=i||n)}),Object.defineProperties(t,r)},Tr=t=>{Ht(t,(e,s)=>{if(W(t)&&["arguments","caller","callee"].includes(s))return!1;const r=t[s];if(W(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+s+"'")})}})},Or=(t,e)=>{const s={},r=n=>{n.forEach(o=>{s[o]=!0})};return fe(t)?r(t):r(String(t).split(e)),s},Cr=()=>{},xr=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function Rr(t){return!!(t&&W(t.append)&&t[Mt]==="FormData"&&t[Ie])}const Ar=t=>{const e=new Array(10),s=(r,n)=>{if(we(r)){if(e.indexOf(r)>=0)return;if(ye(r))return r;if(!("toJSON"in r)){e[n]=r;const o=fe(r)?[]:{};return ve(r,(i,a)=>{const c=s(i,n+1);!pe(c)&&(o[a]=c)}),e[n]=void 0,o}}return r};return s(t,0)},kr=Y("AsyncFunction"),Pr=t=>t&&(we(t)||W(t))&&W(t.then)&&W(t.catch),zt=((t,e)=>t?setImmediate:e?((s,r)=>(oe.addEventListener("message",({source:n,data:o})=>{n===oe&&o===s&&r.length&&r.shift()()},!1),n=>{r.push(n),oe.postMessage(s,"*")}))(`axios@${Math.random()}`,[]):s=>setTimeout(s))(typeof setImmediate=="function",W(oe.postMessage)),Dr=typeof queueMicrotask<"u"?queueMicrotask.bind(oe):typeof process<"u"&&process.nextTick||zt,Nr=t=>t!=null&&W(t[Ie]),l={isArray:fe,isArrayBuffer:Lt,isBuffer:ye,isFormData:ir,isArrayBufferView:Js,isString:Ks,isNumber:Ft,isBoolean:Xs,isObject:we,isPlainObject:Me,isEmptyObject:Zs,isReadableStream:ar,isRequest:cr,isResponse:lr,isHeaders:ur,isUndefined:pe,isDate:Gs,isFile:Qs,isReactNativeBlob:Ys,isReactNative:er,isBlob:tr,isRegExp:Sr,isFunction:W,isStream:rr,isURLSearchParams:or,isTypedArray:_r,isFileList:sr,forEach:ve,merge:st,extend:hr,trim:dr,stripBOM:fr,inherits:pr,toFlatObject:mr,kindOf:je,kindOfTest:Y,endsWith:gr,toArray:br,forEachEntry:yr,matchAll:wr,isHTMLForm:vr,hasOwnProperty:rt,hasOwnProp:rt,reduceDescriptors:Ht,freezeMethods:Tr,toObjectSet:Or,toCamelCase:Er,noop:Cr,toFiniteNumber:xr,findKey:Bt,global:oe,isContextDefined:$t,isSpecCompliantForm:Rr,toJSONObject:Ar,isAsyncFn:kr,isThenable:Pr,setImmediate:zt,asap:Dr,isIterable:Nr},Ir=l.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),jr=t=>{const e={};let s,r,n;return t&&t.split(`
|
|
3
|
+
`).forEach(function(o){n=o.indexOf(":"),s=o.substring(0,n).trim().toLowerCase(),r=o.substring(n+1).trim(),!(!s||e[s]&&Ir[s])&&(s==="set-cookie"?e[s]?e[s].push(r):e[s]=[r]:e[s]=e[s]?e[s]+", "+r:r)}),e},Wt=Symbol("internals"),Ur=/[^\x09\x20-\x7E\x80-\xFF]/g;function Mr(t){let e=0,s=t.length;for(;e<s;){const r=t.charCodeAt(e);if(r!==9&&r!==32)break;e+=1}for(;s>e;){const r=t.charCodeAt(s-1);if(r!==9&&r!==32)break;s-=1}return e===0&&s===t.length?t:t.slice(e,s)}function Ee(t){return t&&String(t).trim().toLowerCase()}function Lr(t){return Mr(t.replace(Ur,""))}function Le(t){return t===!1||t==null?t:l.isArray(t)?t.map(Le):Lr(String(t))}function Fr(t){const e=Object.create(null),s=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=s.exec(t);)e[r[1]]=r[2];return e}const Vr=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function nt(t,e,s,r,n){if(l.isFunction(r))return r.call(this,e,s);if(n&&(e=s),!!l.isString(e)){if(l.isString(r))return e.indexOf(r)!==-1;if(l.isRegExp(r))return r.test(e)}}function qr(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,s,r)=>s.toUpperCase()+r)}function Br(t,e){const s=l.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+s,{__proto__:null,value:function(n,o,i){return this[r].call(this,e,n,o,i)},configurable:!0})})}let z=class{constructor(t){t&&this.set(t)}set(t,e,s){const r=this;function n(i,a,c){const u=Ee(a);if(!u)throw new Error("header name must be a non-empty string");const d=l.findKey(r,u);(!d||r[d]===void 0||c===!0||c===void 0&&r[d]!==!1)&&(r[d||a]=Le(i))}const o=(i,a)=>l.forEach(i,(c,u)=>n(c,u,a));if(l.isPlainObject(t)||t instanceof this.constructor)o(t,e);else if(l.isString(t)&&(t=t.trim())&&!Vr(t))o(jr(t),e);else if(l.isObject(t)&&l.isIterable(t)){let i={},a,c;for(const u of t){if(!l.isArray(u))throw TypeError("Object iterator must return a key-value pair");i[c=u[0]]=(a=i[c])?l.isArray(a)?[...a,u[1]]:[a,u[1]]:u[1]}o(i,e)}else t!=null&&n(e,t,s);return this}get(t,e){if(t=Ee(t),t){const s=l.findKey(this,t);if(s){const r=this[s];if(!e)return r;if(e===!0)return Fr(r);if(l.isFunction(e))return e.call(this,r,s);if(l.isRegExp(e))return e.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Ee(t),t){const s=l.findKey(this,t);return!!(s&&this[s]!==void 0&&(!e||nt(this,this[s],s,e)))}return!1}delete(t,e){const s=this;let r=!1;function n(o){if(o=Ee(o),o){const i=l.findKey(s,o);i&&(!e||nt(s,s[i],i,e))&&(delete s[i],r=!0)}}return l.isArray(t)?t.forEach(n):n(t),r}clear(t){const e=Object.keys(this);let s=e.length,r=!1;for(;s--;){const n=e[s];(!t||nt(this,this[n],n,t,!0))&&(delete this[n],r=!0)}return r}normalize(t){const e=this,s={};return l.forEach(this,(r,n)=>{const o=l.findKey(s,n);if(o){e[o]=Le(r),delete e[n];return}const i=t?qr(n):String(n).trim();i!==n&&delete e[n],e[i]=Le(r),s[i]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return l.forEach(this,(s,r)=>{s!=null&&s!==!1&&(e[r]=t&&l.isArray(s)?s.join(", "):s)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
|
|
4
|
+
`)}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 s=new this(t);return e.forEach(r=>s.set(r)),s}static accessor(t){const e=(this[Wt]=this[Wt]={accessors:{}}).accessors,s=this.prototype;function r(n){const o=Ee(n);e[o]||(Br(s,n),e[o]=!0)}return l.isArray(t)?t.forEach(r):r(t),this}};z.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),l.reduceDescriptors(z.prototype,({value:t},e)=>{let s=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[s]=r}}}),l.freezeMethods(z);const $r="[REDACTED ****]";function Hr(t){if(l.hasOwnProp(t,"toJSON"))return!0;let e=Object.getPrototypeOf(t);for(;e&&e!==Object.prototype;){if(l.hasOwnProp(e,"toJSON"))return!0;e=Object.getPrototypeOf(e)}return!1}function zr(t,e){const s=new Set(e.map(o=>String(o).toLowerCase())),r=[],n=o=>{if(o===null||typeof o!="object"||l.isBuffer(o))return o;if(r.indexOf(o)!==-1)return;o instanceof z&&(o=o.toJSON()),r.push(o);let i;if(l.isArray(o))i=[],o.forEach((a,c)=>{const u=n(a);l.isUndefined(u)||(i[c]=u)});else{if(!l.isPlainObject(o)&&Hr(o))return r.pop(),o;i=Object.create(null);for(const[a,c]of Object.entries(o)){const u=s.has(a.toLowerCase())?$r:n(c);l.isUndefined(u)||(i[a]=u)}}return r.pop(),i};return n(t)}let w=class Ls extends Error{static from(e,s,r,n,o,i){const a=new Ls(e.message,s||e.code,r,n,o);return a.cause=e,a.name=e.name,e.status!=null&&a.status==null&&(a.status=e.status),i&&Object.assign(a,i),a}constructor(e,s,r,n,o){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,s&&(this.code=s),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status)}toJSON(){const e=this.config,s=e&&l.hasOwnProp(e,"redact")?e.redact:void 0,r=l.isArray(s)&&s.length>0?zr(e,s):l.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:r,code:this.code,status:this.status}}};w.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",w.ERR_BAD_OPTION="ERR_BAD_OPTION",w.ECONNABORTED="ECONNABORTED",w.ETIMEDOUT="ETIMEDOUT",w.ECONNREFUSED="ECONNREFUSED",w.ERR_NETWORK="ERR_NETWORK",w.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",w.ERR_DEPRECATED="ERR_DEPRECATED",w.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",w.ERR_BAD_REQUEST="ERR_BAD_REQUEST",w.ERR_CANCELED="ERR_CANCELED",w.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",w.ERR_INVALID_URL="ERR_INVALID_URL",w.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Wr=null;function it(t){return l.isPlainObject(t)||l.isArray(t)}function Jt(t){return l.endsWith(t,"[]")?t.slice(0,-2):t}function ot(t,e,s){return t?t.concat(e).map(function(r,n){return r=Jt(r),!s&&n?"["+r+"]":r}).join(s?".":""):e}function Jr(t){return l.isArray(t)&&!t.some(it)}const Kr=l.toFlatObject(l,{},null,function(t){return/^is[A-Z]/.test(t)});function Fe(t,e,s){if(!l.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,s=l.toFlatObject(s,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,S){return!l.isUndefined(S[h])});const r=s.metaTokens,n=s.visitor||p,o=s.dots,i=s.indexes,a=s.Blob||typeof Blob<"u"&&Blob,c=s.maxDepth===void 0?100:s.maxDepth,u=a&&l.isSpecCompliantForm(e);if(!l.isFunction(n))throw new TypeError("visitor must be a function");function d(h){if(h===null)return"";if(l.isDate(h))return h.toISOString();if(l.isBoolean(h))return h.toString();if(!u&&l.isBlob(h))throw new w("Blob is not supported. Use a Buffer instead.");return l.isArrayBuffer(h)||l.isTypedArray(h)?u&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function p(h,S,m){let E=h;if(l.isReactNative(e)&&l.isReactNativeBlob(h))return e.append(ot(m,S,o),d(h)),!1;if(h&&!m&&typeof h=="object"){if(l.endsWith(S,"{}"))S=r?S:S.slice(0,-2),h=JSON.stringify(h);else if(l.isArray(h)&&Jr(h)||(l.isFileList(h)||l.endsWith(S,"[]"))&&(E=l.toArray(h)))return S=Jt(S),E.forEach(function(g,O){!(l.isUndefined(g)||g===null)&&e.append(i===!0?ot([S],O,o):i===null?S:S+"[]",d(g))}),!1}return it(h)?!0:(e.append(ot(m,S,o),d(h)),!1)}const y=[],b=Object.assign(Kr,{defaultVisitor:p,convertValue:d,isVisitable:it});function x(h,S,m=0){if(!l.isUndefined(h)){if(m>c)throw new w("Object is too deeply nested ("+m+" levels). Max depth: "+c,w.ERR_FORM_DATA_DEPTH_EXCEEDED);if(y.indexOf(h)!==-1)throw Error("Circular reference detected in "+S.join("."));y.push(h),l.forEach(h,function(E,g){(!(l.isUndefined(E)||E===null)&&n.call(e,E,l.isString(g)?g.trim():g,S,b))===!0&&x(E,S?S.concat(g):[g],m+1)}),y.pop()}}if(!l.isObject(t))throw new TypeError("data must be an object");return x(t),e}function Kt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(t).replace(/[!'()~]|%20/g,function(s){return e[s]})}function at(t,e){this._pairs=[],t&&Fe(t,this,e)}const Xt=at.prototype;Xt.append=function(t,e){this._pairs.push([t,e])},Xt.toString=function(t){const e=t?function(s){return t.call(this,s,Kt)}:Kt;return this._pairs.map(function(s){return e(s[0])+"="+e(s[1])},"").join("&")};function Xr(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Zt(t,e,s){if(!e)return t;const r=s&&s.encode||Xr,n=l.isFunction(s)?{serialize:s}:s,o=n&&n.serialize;let i;if(o?i=o(e,n):i=l.isURLSearchParams(e)?e.toString():new at(e,n).toString(r),i){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class Gt{constructor(){this.handlers=[]}use(e,s,r){return this.handlers.push({fulfilled:e,rejected:s,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){l.forEach(this.handlers,function(s){s!==null&&e(s)})}}const ct={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},Zr=typeof URLSearchParams<"u"?URLSearchParams:at,Gr=typeof FormData<"u"?FormData:null,Qr=typeof Blob<"u"?Blob:null,Yr={isBrowser:!0,classes:{URLSearchParams:Zr,FormData:Gr,Blob:Qr},protocols:["http","https","file","blob","url","data"]},lt=typeof window<"u"&&typeof document<"u",ut=typeof navigator=="object"&&navigator||void 0,en=lt&&(!ut||["ReactNative","NativeScript","NS"].indexOf(ut.product)<0),tn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",sn=lt&&window.location.href||"http://localhost",rn=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:lt,hasStandardBrowserEnv:en,hasStandardBrowserWebWorkerEnv:tn,navigator:ut,origin:sn},Symbol.toStringTag,{value:"Module"})),F={...rn,...Yr};function nn(t,e){return Fe(t,new F.classes.URLSearchParams,{visitor:function(s,r,n,o){return F.isNode&&l.isBuffer(s)?(this.append(r,s.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...e})}function on(t){return l.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function an(t){const e={},s=Object.keys(t);let r;const n=s.length;let o;for(r=0;r<n;r++)o=s[r],e[o]=t[o];return e}function Qt(t){function e(s,r,n,o){let i=s[o++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),c=o>=s.length;return i=!i&&l.isArray(n)?n.length:i,c?(l.hasOwnProp(n,i)?n[i]=l.isArray(n[i])?n[i].concat(r):[n[i],r]:n[i]=r,!a):((!n[i]||!l.isObject(n[i]))&&(n[i]=[]),e(s,r,n[i],o)&&l.isArray(n[i])&&(n[i]=an(n[i])),!a)}if(l.isFormData(t)&&l.isFunction(t.entries)){const s={};return l.forEachEntry(t,(r,n)=>{e(on(r),n,s,0)}),s}return null}const me=(t,e)=>t!=null&&l.hasOwnProp(t,e)?t[e]:void 0;function cn(t,e,s){if(l.isString(t))try{return(e||JSON.parse)(t),l.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(s||JSON.stringify)(t)}const Se={transitional:ct,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const s=e.getContentType()||"",r=s.indexOf("application/json")>-1,n=l.isObject(t);if(n&&l.isHTMLForm(t)&&(t=new FormData(t)),l.isFormData(t))return r?JSON.stringify(Qt(t)):t;if(l.isArrayBuffer(t)||l.isBuffer(t)||l.isStream(t)||l.isFile(t)||l.isBlob(t)||l.isReadableStream(t))return t;if(l.isArrayBufferView(t))return t.buffer;if(l.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(n){const i=me(this,"formSerializer");if(s.indexOf("application/x-www-form-urlencoded")>-1)return nn(t,i).toString();if((o=l.isFileList(t))||s.indexOf("multipart/form-data")>-1){const a=me(this,"env"),c=a&&a.FormData;return Fe(o?{"files[]":t}:t,c&&new c,i)}}return n||r?(e.setContentType("application/json",!1),cn(t)):t}],transformResponse:[function(t){const e=me(this,"transitional")||Se.transitional,s=e&&e.forcedJSONParsing,r=me(this,"responseType"),n=r==="json";if(l.isResponse(t)||l.isReadableStream(t))return t;if(t&&l.isString(t)&&(s&&!r||n)){const o=!(e&&e.silentJSONParsing)&&n;try{return JSON.parse(t,me(this,"parseReviver"))}catch(i){if(o)throw i.name==="SyntaxError"?w.from(i,w.ERR_BAD_RESPONSE,this,null,me(this,"response")):i}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:F.classes.FormData,Blob:F.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};l.forEach(["delete","get","head","post","put","patch","query"],t=>{Se.headers[t]={}});function dt(t,e){const s=this||Se,r=e||s,n=z.from(r.headers);let o=r.data;return l.forEach(t,function(i){o=i.call(s,o,n.normalize(),e?e.status:void 0)}),n.normalize(),o}function Yt(t){return!!(t&&t.__CANCEL__)}let Te=class extends w{constructor(t,e,s){super(t??"canceled",w.ERR_CANCELED,e,s),this.name="CanceledError",this.__CANCEL__=!0}};function es(t,e,s){const r=s.config.validateStatus;!s.status||!r||r(s.status)?t(s):e(new w("Request failed with status code "+s.status,s.status>=400&&s.status<500?w.ERR_BAD_REQUEST:w.ERR_BAD_RESPONSE,s.config,s.request,s))}function ln(t){const e=/^([-+\w]{1,25}):(?:\/\/)?/.exec(t);return e&&e[1]||""}function un(t,e){t=t||10;const s=new Array(t),r=new Array(t);let n=0,o=0,i;return e=e!==void 0?e:1e3,function(a){const c=Date.now(),u=r[o];i||(i=c),s[n]=a,r[n]=c;let d=o,p=0;for(;d!==n;)p+=s[d++],d=d%t;if(n=(n+1)%t,n===o&&(o=(o+1)%t),c-i<e)return;const y=u&&c-u;return y?Math.round(p*1e3/y):void 0}}function dn(t,e){let s=0,r=1e3/e,n,o;const i=(a,c=Date.now())=>{s=c,n=null,o&&(clearTimeout(o),o=null),t(...a)};return[(...a)=>{const c=Date.now(),u=c-s;u>=r?i(a,c):(n=a,o||(o=setTimeout(()=>{o=null,i(n)},r-u)))},()=>n&&i(n)]}const Ve=(t,e,s=3)=>{let r=0;const n=un(50,250);return dn(o=>{const i=o.loaded,a=o.lengthComputable?o.total:void 0,c=a!=null?Math.min(i,a):i,u=Math.max(0,c-r),d=n(u);r=Math.max(r,c);const p={loaded:c,total:a,progress:a?c/a:void 0,bytes:u,rate:d||void 0,estimated:d&&a?(a-c)/d:void 0,event:o,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(p)},s)},ts=(t,e)=>{const s=t!=null;return[r=>e[0]({lengthComputable:s,total:t,loaded:r}),e[1]]},ss=t=>(...e)=>l.asap(()=>t(...e)),hn=F.hasStandardBrowserEnv?((t,e)=>s=>(s=new URL(s,F.origin),t.protocol===s.protocol&&t.host===s.host&&(e||t.port===s.port)))(new URL(F.origin),F.navigator&&/(msie|trident)/i.test(F.navigator.userAgent)):()=>!0,fn=F.hasStandardBrowserEnv?{write(t,e,s,r,n,o,i){if(typeof document>"u")return;const a=[`${t}=${encodeURIComponent(e)}`];l.isNumber(s)&&a.push(`expires=${new Date(s).toUTCString()}`),l.isString(r)&&a.push(`path=${r}`),l.isString(n)&&a.push(`domain=${n}`),o===!0&&a.push("secure"),l.isString(i)&&a.push(`SameSite=${i}`),document.cookie=a.join("; ")},read(t){if(typeof document>"u")return null;const e=document.cookie.split(";");for(let s=0;s<e.length;s++){const r=e[s].replace(/^\s+/,""),n=r.indexOf("=");if(n!==-1&&r.slice(0,n)===t)return decodeURIComponent(r.slice(n+1))}return null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function pn(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function mn(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function rs(t,e,s){let r=!pn(e);return t&&(r||s===!1)?mn(t,e):e}const ns=t=>t instanceof z?{...t}:t;function ae(t,e){e=e||{};const s=Object.create(null);Object.defineProperty(s,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(u,d,p,y){return l.isPlainObject(u)&&l.isPlainObject(d)?l.merge.call({caseless:y},u,d):l.isPlainObject(d)?l.merge({},d):l.isArray(d)?d.slice():d}function n(u,d,p,y){if(l.isUndefined(d)){if(!l.isUndefined(u))return r(void 0,u,p,y)}else return r(u,d,p,y)}function o(u,d){if(!l.isUndefined(d))return r(void 0,d)}function i(u,d){if(l.isUndefined(d)){if(!l.isUndefined(u))return r(void 0,u)}else return r(void 0,d)}function a(u,d,p){if(l.hasOwnProp(e,p))return r(u,d);if(l.hasOwnProp(t,p))return r(void 0,u)}const c={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:a,headers:(u,d,p)=>n(ns(u),ns(d),p,!0)};return l.forEach(Object.keys({...t,...e}),function(u){if(u==="__proto__"||u==="constructor"||u==="prototype")return;const d=l.hasOwnProp(c,u)?c[u]:n,p=l.hasOwnProp(t,u)?t[u]:void 0,y=l.hasOwnProp(e,u)?e[u]:void 0,b=d(p,y,u);l.isUndefined(b)&&d!==a||(s[u]=b)}),s}const gn=["content-type","content-length"];function bn(t,e,s){if(s!=="content-only"){t.set(e);return}Object.entries(e).forEach(([r,n])=>{gn.includes(r.toLowerCase())&&t.set(r,n)})}const _n=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,s)=>String.fromCharCode(parseInt(s,16))),is=t=>{const e=ae({},t),s=y=>l.hasOwnProp(e,y)?e[y]:void 0,r=s("data");let n=s("withXSRFToken");const o=s("xsrfHeaderName"),i=s("xsrfCookieName");let a=s("headers");const c=s("auth"),u=s("baseURL"),d=s("allowAbsoluteUrls"),p=s("url");if(e.headers=a=z.from(a),e.url=Zt(rs(u,p,d),t.params,t.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?_n(c.password):""))),l.isFormData(r)&&(F.hasStandardBrowserEnv||F.hasStandardBrowserWebWorkerEnv?a.setContentType(void 0):l.isFunction(r.getHeaders)&&bn(a,r.getHeaders(),s("formDataHeaderPolicy"))),F.hasStandardBrowserEnv&&(l.isFunction(n)&&(n=n(e)),n===!0||n==null&&hn(e.url))){const y=o&&i&&fn.read(i);y&&a.set(o,y)}return e},yn=typeof XMLHttpRequest<"u",wn=yn&&function(t){return new Promise(function(e,s){const r=is(t);let n=r.data;const o=z.from(r.headers).normalize();let{responseType:i,onUploadProgress:a,onDownloadProgress:c}=r,u,d,p,y,b;function x(){y&&y(),b&&b(),r.cancelToken&&r.cancelToken.unsubscribe(u),r.signal&&r.signal.removeEventListener("abort",u)}let h=new XMLHttpRequest;h.open(r.method.toUpperCase(),r.url,!0),h.timeout=r.timeout;function S(){if(!h)return;const E=z.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),g={data:!i||i==="text"||i==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:E,config:t,request:h};es(function(O){e(O),x()},function(O){s(O),x()},g),h=null}"onloadend"in h?h.onloadend=S:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.startsWith("file:"))||setTimeout(S)},h.onabort=function(){h&&(s(new w("Request aborted",w.ECONNABORTED,t,h)),x(),h=null)},h.onerror=function(E){const g=E&&E.message?E.message:"Network Error",O=new w(g,w.ERR_NETWORK,t,h);O.event=E||null,s(O),x(),h=null},h.ontimeout=function(){let E=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const g=r.transitional||ct;r.timeoutErrorMessage&&(E=r.timeoutErrorMessage),s(new w(E,g.clarifyTimeoutError?w.ETIMEDOUT:w.ECONNABORTED,t,h)),x(),h=null},n===void 0&&o.setContentType(null),"setRequestHeader"in h&&l.forEach(o.toJSON(),function(E,g){h.setRequestHeader(g,E)}),l.isUndefined(r.withCredentials)||(h.withCredentials=!!r.withCredentials),i&&i!=="json"&&(h.responseType=r.responseType),c&&([p,b]=Ve(c,!0),h.addEventListener("progress",p)),a&&h.upload&&([d,y]=Ve(a),h.upload.addEventListener("progress",d),h.upload.addEventListener("loadend",y)),(r.cancelToken||r.signal)&&(u=E=>{h&&(s(!E||E.type?new Te(null,t,h):E),h.abort(),x(),h=null)},r.cancelToken&&r.cancelToken.subscribe(u),r.signal&&(r.signal.aborted?u():r.signal.addEventListener("abort",u)));const m=ln(r.url);if(m&&!F.protocols.includes(m)){s(new w("Unsupported protocol "+m+":",w.ERR_BAD_REQUEST,t));return}h.send(n||null)})},vn=(t,e)=>{const{length:s}=t=t?t.filter(Boolean):[];if(e||s){let r=new AbortController,n;const o=function(u){if(!n){n=!0,a();const d=u instanceof Error?u:this.reason;r.abort(d instanceof w?d:new Te(d instanceof Error?d.message:d))}};let i=e&&setTimeout(()=>{i=null,o(new w(`timeout of ${e}ms exceeded`,w.ETIMEDOUT))},e);const a=()=>{t&&(i&&clearTimeout(i),i=null,t.forEach(u=>{u.unsubscribe?u.unsubscribe(o):u.removeEventListener("abort",o)}),t=null)};t.forEach(u=>u.addEventListener("abort",o));const{signal:c}=r;return c.unsubscribe=()=>l.asap(a),c}},En=function*(t,e){let s=t.byteLength;if(s<e){yield t;return}let r=0,n;for(;r<s;)n=r+e,yield t.slice(r,n),r=n},Sn=async function*(t,e){for await(const s of Tn(t))yield*En(s,e)},Tn=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:s,value:r}=await e.read();if(s)break;yield r}}finally{await e.cancel()}},os=(t,e,s,r)=>{const n=Sn(t,e);let o=0,i,a=c=>{i||(i=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:u,value:d}=await n.next();if(u){a(),c.close();return}let p=d.byteLength;if(s){let y=o+=p;s(y)}c.enqueue(new Uint8Array(d))}catch(u){throw a(u),u}},cancel(c){return a(c),n.return()}},{highWaterMark:2})};function On(t){if(!t||typeof t!="string"||!t.startsWith("data:"))return 0;const e=t.indexOf(",");if(e<0)return 0;const s=t.slice(5,e),r=t.slice(e+1);if(/;base64/i.test(s)){let o=r.length;const i=r.length;for(let p=0;p<i;p++)if(r.charCodeAt(p)===37&&p+2<i){const y=r.charCodeAt(p+1),b=r.charCodeAt(p+2);(y>=48&&y<=57||y>=65&&y<=70||y>=97&&y<=102)&&(b>=48&&b<=57||b>=65&&b<=70||b>=97&&b<=102)&&(o-=2,p+=2)}let a=0,c=i-1;const u=p=>p>=2&&r.charCodeAt(p-2)===37&&r.charCodeAt(p-1)===51&&(r.charCodeAt(p)===68||r.charCodeAt(p)===100);c>=0&&(r.charCodeAt(c)===61?(a++,c--):u(c)&&(a++,c-=3)),a===1&&c>=0&&(r.charCodeAt(c)===61||u(c))&&a++;const d=Math.floor(o/4)*3-(a||0);return d>0?d:0}if(typeof Buffer<"u"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(r,"utf8");let n=0;for(let o=0,i=r.length;o<i;o++){const a=r.charCodeAt(o);if(a<128)n+=1;else if(a<2048)n+=2;else if(a>=55296&&a<=56319&&o+1<i){const c=r.charCodeAt(o+1);c>=56320&&c<=57343?(n+=4,o++):n+=3}else n+=3}return n}const ht="1.16.0",as=64*1024,{isFunction:qe}=l,cs=(t,...e)=>{try{return!!t(...e)}catch{return!1}},Cn=t=>{const e=l.global??globalThis,{ReadableStream:s,TextEncoder:r}=e;t=l.merge.call({skipUndefined:!0},{Request:e.Request,Response:e.Response},t);const{fetch:n,Request:o,Response:i}=t,a=n?qe(n):typeof fetch=="function",c=qe(o),u=qe(i);if(!a)return!1;const d=a&&qe(s),p=a&&(typeof r=="function"?(m=>E=>m.encode(E))(new r):async m=>new Uint8Array(await new o(m).arrayBuffer())),y=c&&d&&cs(()=>{let m=!1;const E=new o(F.origin,{body:new s,method:"POST",get duplex(){return m=!0,"half"}}),g=E.headers.has("Content-Type");return E.body!=null&&E.body.cancel(),m&&!g}),b=u&&d&&cs(()=>l.isReadableStream(new i("").body)),x={stream:b&&(m=>m.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(m=>{!x[m]&&(x[m]=(E,g)=>{let O=E&&E[m];if(O)return O.call(E);throw new w(`Response type '${m}' is not supported`,w.ERR_NOT_SUPPORT,g)})});const h=async m=>{if(m==null)return 0;if(l.isBlob(m))return m.size;if(l.isSpecCompliantForm(m))return(await new o(F.origin,{method:"POST",body:m}).arrayBuffer()).byteLength;if(l.isArrayBufferView(m)||l.isArrayBuffer(m))return m.byteLength;if(l.isURLSearchParams(m)&&(m=m+""),l.isString(m))return(await p(m)).byteLength},S=async(m,E)=>l.toFiniteNumber(m.getContentLength())??h(E);return async m=>{let{url:E,method:g,data:O,signal:P,cancelToken:J,timeout:K,onDownloadProgress:G,onUploadProgress:X,responseType:V,headers:U,withCredentials:v="same-origin",fetchOptions:D,maxContentLength:q,maxBodyLength:Ae}=is(m);const B=l.isNumber(q)&&q>-1,T=l.isNumber(Ae)&&Ae>-1;let I=n||fetch;V=V?(V+"").toLowerCase():"text";let M=vn([P,J&&J.toAbortSignal()],K),j=null;const Q=M&&M.unsubscribe&&(()=>{M.unsubscribe()});let ke;try{if(B&&typeof E=="string"&&E.startsWith("data:")&&On(E)>q)throw new w("maxContentLength size of "+q+" exceeded",w.ERR_BAD_RESPONSE,m,j);if(T&&g!=="get"&&g!=="head"){const A=await S(U,O);if(typeof A=="number"&&isFinite(A)&&A>Ae)throw new w("Request body larger than maxBodyLength limit",w.ERR_BAD_REQUEST,m,j)}if(X&&y&&g!=="get"&&g!=="head"&&(ke=await S(U,O))!==0){let A=new o(E,{method:"POST",body:O,duplex:"half"}),be;if(l.isFormData(O)&&(be=A.headers.get("content-type"))&&U.setContentType(be),A.body){const[Ze,Ge]=ts(ke,Ve(ss(X)));O=os(A.body,as,Ze,Ge)}}l.isString(v)||(v=v?"include":"omit");const $=c&&"credentials"in o.prototype;if(l.isFormData(O)){const A=U.getContentType();A&&/^multipart\/form-data/i.test(A)&&!/boundary=/i.test(A)&&U.delete("content-type")}U.set("User-Agent","axios/"+ht,!1);const ie={...D,signal:M,method:g.toUpperCase(),headers:U.normalize().toJSON(),body:O,duplex:"half",credentials:$?v:void 0};j=c&&new o(E,ie);let se=await(c?I(j,D):I(E,ie));if(B){const A=l.toFiniteNumber(se.headers.get("content-length"));if(A!=null&&A>q)throw new w("maxContentLength size of "+q+" exceeded",w.ERR_BAD_RESPONSE,m,j)}const Tt=b&&(V==="stream"||V==="response");if(b&&se.body&&(G||B||Tt&&Q)){const A={};["status","statusText","headers"].forEach(Pe=>{A[Pe]=se[Pe]});const be=l.toFiniteNumber(se.headers.get("content-length")),[Ze,Ge]=G&&ts(be,Ve(ss(G),!0))||[];let Ms=0;const Zi=Pe=>{if(B&&(Ms=Pe,Ms>q))throw new w("maxContentLength size of "+q+" exceeded",w.ERR_BAD_RESPONSE,m,j);Ze&&Ze(Pe)};se=new i(os(se.body,as,Zi,()=>{Ge&&Ge(),Q&&Q()}),A)}V=V||"text";let re=await x[l.findKey(x,V)||"text"](se,m);if(B&&!b&&!Tt){let A;if(re!=null&&(typeof re.byteLength=="number"?A=re.byteLength:typeof re.size=="number"?A=re.size:typeof re=="string"&&(A=typeof r=="function"?new r().encode(re).byteLength:re.length)),typeof A=="number"&&A>q)throw new w("maxContentLength size of "+q+" exceeded",w.ERR_BAD_RESPONSE,m,j)}return!Tt&&Q&&Q(),await new Promise((A,be)=>{es(A,be,{data:re,headers:z.from(se.headers),status:se.status,statusText:se.statusText,config:m,request:j})})}catch($){if(Q&&Q(),M&&M.aborted&&M.reason instanceof w){const ie=M.reason;throw ie.config=m,j&&(ie.request=j),$!==ie&&(ie.cause=$),ie}throw $&&$.name==="TypeError"&&/Load failed|fetch/i.test($.message)?Object.assign(new w("Network Error",w.ERR_NETWORK,m,j,$&&$.response),{cause:$.cause||$}):w.from($,$&&$.code,m,j,$&&$.response)}}},xn=new Map,ls=t=>{let e=t&&t.env||{};const{fetch:s,Request:r,Response:n}=e,o=[r,n,s];let i=o.length,a=i,c,u,d=xn;for(;a--;)c=o[a],u=d.get(c),u===void 0&&d.set(c,u=a?new Map:Cn(e)),d=u;return u};ls();const ft={http:Wr,xhr:wn,fetch:{get:ls}};l.forEach(ft,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{__proto__:null,value:e})}catch{}Object.defineProperty(t,"adapterName",{__proto__:null,value:e})}});const us=t=>`- ${t}`,Rn=t=>l.isFunction(t)||t===null||t===!1;function An(t,e){t=l.isArray(t)?t:[t];const{length:s}=t;let r,n;const o={};for(let i=0;i<s;i++){r=t[i];let a;if(n=r,!Rn(r)&&(n=ft[(a=String(r)).toLowerCase()],n===void 0))throw new w(`Unknown adapter '${a}'`);if(n&&(l.isFunction(n)||(n=n.get(e))))break;o[a||"#"+i]=n}if(!n){const i=Object.entries(o).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=s?i.length>1?`since :
|
|
5
|
+
`+i.map(us).join(`
|
|
6
|
+
`):" "+us(i[0]):"as no adapter specified";throw new w("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return n}const ds={getAdapter:An,adapters:ft};function pt(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Te(null,t)}function hs(t){return pt(t),t.headers=z.from(t.headers),t.data=dt.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),ds.getAdapter(t.adapter||Se.adapter,t)(t).then(function(e){pt(t),t.response=e;try{e.data=dt.call(t,t.transformResponse,e)}finally{delete t.response}return e.headers=z.from(e.headers),e},function(e){if(!Yt(e)&&(pt(t),e&&e.response)){t.response=e.response;try{e.response.data=dt.call(t,t.transformResponse,e.response)}finally{delete t.response}e.response.headers=z.from(e.response.headers)}return Promise.reject(e)})}const Be={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Be[t]=function(s){return typeof s===t||"a"+(e<1?"n ":" ")+t}});const fs={};Be.transitional=function(t,e,s){function r(n,o){return"[Axios v"+ht+"] Transitional option '"+n+"'"+o+(s?". "+s:"")}return(n,o,i)=>{if(t===!1)throw new w(r(o," has been removed"+(e?" in "+e:"")),w.ERR_DEPRECATED);return e&&!fs[o]&&(fs[o]=!0,console.warn(r(o," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(n,o,i):!0}},Be.spelling=function(t){return(e,s)=>(console.warn(`${s} is likely a misspelling of ${t}`),!0)};function kn(t,e,s){if(typeof t!="object")throw new w("options must be an object",w.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let n=r.length;for(;n-- >0;){const o=r[n],i=Object.prototype.hasOwnProperty.call(e,o)?e[o]:void 0;if(i){const a=t[o],c=a===void 0||i(a,o,t);if(c!==!0)throw new w("option "+o+" must be "+c,w.ERR_BAD_OPTION_VALUE);continue}if(s!==!0)throw new w("Unknown option "+o,w.ERR_BAD_OPTION)}}const $e={assertOptions:kn,validators:Be},Z=$e.validators;let ce=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Gt,response:new Gt}}async request(t,e){try{return await this._request(t,e)}catch(s){if(s instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const n=(()=>{if(!r.stack)return"";const o=r.stack.indexOf(`
|
|
7
|
+
`);return o===-1?"":r.stack.slice(o+1)})();try{if(!s.stack)s.stack=n;else if(n){const o=n.indexOf(`
|
|
8
|
+
`),i=o===-1?-1:n.indexOf(`
|
|
9
|
+
`,o+1),a=i===-1?"":n.slice(i+1);String(s.stack).endsWith(a)||(s.stack+=`
|
|
10
|
+
`+n)}}catch{}}throw s}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=ae(this.defaults,e);const{transitional:s,paramsSerializer:r,headers:n}=e;s!==void 0&&$e.assertOptions(s,{silentJSONParsing:Z.transitional(Z.boolean),forcedJSONParsing:Z.transitional(Z.boolean),clarifyTimeoutError:Z.transitional(Z.boolean),legacyInterceptorReqResOrdering:Z.transitional(Z.boolean)},!1),r!=null&&(l.isFunction(r)?e.paramsSerializer={serialize:r}:$e.assertOptions(r,{encode:Z.function,serialize:Z.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),$e.assertOptions(e,{baseUrl:Z.spelling("baseURL"),withXsrfToken:Z.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=n&&l.merge(n.common,n[e.method]);n&&l.forEach(["delete","get","head","post","put","patch","query","common"],b=>{delete n[b]}),e.headers=z.concat(o,n);const i=[];let a=!0;this.interceptors.request.forEach(function(b){if(typeof b.runWhen=="function"&&b.runWhen(e)===!1)return;a=a&&b.synchronous;const x=e.transitional||ct;x&&x.legacyInterceptorReqResOrdering?i.unshift(b.fulfilled,b.rejected):i.push(b.fulfilled,b.rejected)});const c=[];this.interceptors.response.forEach(function(b){c.push(b.fulfilled,b.rejected)});let u,d=0,p;if(!a){const b=[hs.bind(this),void 0];for(b.unshift(...i),b.push(...c),p=b.length,u=Promise.resolve(e);d<p;)u=u.then(b[d++],b[d++]);return u}p=i.length;let y=e;for(;d<p;){const b=i[d++],x=i[d++];try{y=b(y)}catch(h){x.call(this,h);break}}try{u=hs.call(this,y)}catch(b){return Promise.reject(b)}for(d=0,p=c.length;d<p;)u=u.then(c[d++],c[d++]);return u}getUri(t){t=ae(this.defaults,t);const e=rs(t.baseURL,t.url,t.allowAbsoluteUrls);return Zt(e,t.params,t.paramsSerializer)}};l.forEach(["delete","get","head","options"],function(t){ce.prototype[t]=function(e,s){return this.request(ae(s||{},{method:t,url:e,data:(s||{}).data}))}}),l.forEach(["post","put","patch","query"],function(t){function e(s){return function(r,n,o){return this.request(ae(o||{},{method:t,headers:s?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}ce.prototype[t]=e(),t!=="query"&&(ce.prototype[t+"Form"]=e(!0))});let Pn=class Fs{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let s;this.promise=new Promise(function(n){s=n});const r=this;this.promise.then(n=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](n);r._listeners=null}),this.promise.then=n=>{let o;const i=new Promise(a=>{r.subscribe(a),o=a}).then(n);return i.cancel=function(){r.unsubscribe(o)},i},e(function(n,o,i){r.reason||(r.reason=new Te(n,o,i),s(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const s=this._listeners.indexOf(e);s!==-1&&this._listeners.splice(s,1)}toAbortSignal(){const e=new AbortController,s=r=>{e.abort(r)};return this.subscribe(s),e.signal.unsubscribe=()=>this.unsubscribe(s),e.signal}static source(){let e;return{token:new Fs(function(s){e=s}),cancel:e}}};function Dn(t){return function(e){return t.apply(null,e)}}function Nn(t){return l.isObject(t)&&t.isAxiosError===!0}const mt={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(mt).forEach(([t,e])=>{mt[e]=t});function ps(t){const e=new ce(t),s=Ut(ce.prototype.request,e);return l.extend(s,ce.prototype,e,{allOwnKeys:!0}),l.extend(s,e,null,{allOwnKeys:!0}),s.create=function(r){return ps(ae(t,r))},s}const N=ps(Se);N.Axios=ce,N.CanceledError=Te,N.CancelToken=Pn,N.isCancel=Yt,N.VERSION=ht,N.toFormData=Fe,N.AxiosError=w,N.Cancel=N.CanceledError,N.all=function(t){return Promise.all(t)},N.spread=Dn,N.isAxiosError=Nn,N.mergeConfig=ae,N.AxiosHeaders=z,N.formToJSON=t=>Qt(l.isHTMLForm(t)?new FormData(t):t),N.getAdapter=ds.getAdapter,N.HttpStatusCode=mt,N.default=N;const{Axios:Qi,AxiosError:Yi,CanceledError:eo,isCancel:to,CancelToken:so,VERSION:ro,all:no,Cancel:io,isAxiosError:oo,spread:ao,toFormData:co,AxiosHeaders:lo,HttpStatusCode:uo,formToJSON:ho,getAdapter:fo,mergeConfig:po,create:mo}=N,gt=N.create({baseURL:location.origin,timeout:6e4,params:{}});gt.interceptors.response.use(t=>t,t=>{if(t.response){if(t.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(r){r&&OpenC3Auth.setTokens()}),t.response.config.headers["Ignore-Errors"]&&t.response.config.headers["Ignore-Errors"].includes(t.response.status.toString()))return Promise.reject(t);let 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:s}=window;throw s&&s.serious({title:"Network error",body:e}),t}else throw t});const He=async function(t,e,{data:s,params:r={},headers:n,noAuth:o=!1,noScope:i=!1,onUploadProgress:a=!1}={}){if(!o){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}n.Authorization=localStorage.openc3Token}return n.manual=!0,!i&&!r.scope&&(r.scope=window.openc3Scope),gt({method:t,url:e,data:s,params:r,headers:n,onUploadProgress:a})},bt={Accept:"application/json"},ms={...bt,"Content-Type":"application/json"},gs={get:function(t,{params:e,headers:s=bt,noScope:r,noAuth:n,onUploadProgress:o}={}){return He("get",t,{params:e,headers:s,noScope:r,noAuth:n,onUploadProgress:o})},put:function(t,{data:e,params:s,headers:r=ms,noScope:n,noAuth:o,onUploadProgress:i}={}){return He("put",t,{data:e,params:s,headers:r,noScope:n,noAuth:o,onUploadProgress:i})},post:function(t,{data:e,params:s,headers:r=ms,noScope:n,noAuth:o,onUploadProgress:i}={}){return He("post",t,{data:e,params:s,headers:r,noScope:n,noAuth:o,onUploadProgress:i})},delete:function(t,{params:e,headers:s=bt,noScope:r,noAuth:n,onUploadProgress:o}={}){return He("delete",t,{params:e,headers:s,noScope:r,noAuth:n,onUploadProgress:o})}};let ze=()=>({emit(t,...e){for(let s=this.events[t]||[],r=0,n=s.length;r<n;r++)s[r](...e)},events:{},on(t,e){return(this.events[t]||=[]).push(e),()=>{this.events[t]=this.events[t]?.filter(s=>e!==s)}}});class Oe extends Error{constructor(e,s){e instanceof Error?(super(e.message),this.cause=e):super(e),this.reason=s,this.name="ReasonError"}}class _t extends Oe{constructor(e){super("Rejected",e),this.name="SubscriptionRejectedError"}}class In extends Oe{constructor(e){super(e||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class ee extends Oe{constructor(e,s){s?super(e,s):super("Disconnected",e),this.name="DisconnectedError"}}class jn extends ee{constructor(e){super(e,"stale_connection"),this.name="StaleConnectionError"}}function bs(t){return t?`{${Object.keys(t).sort().filter(e=>t[e]!==void 0).map(e=>{let s=JSON.stringify(t[e]);return`${JSON.stringify(e)}:${s}`}).join(",")}}`:""}class Un{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,s){if(!this._info)return this._info={id:String(e),info:s},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((s,{id:r,info:n})=>(s[r]=n,s),{})}}const le=Symbol("state");class _s{constructor(e={}){this.emitter=ze(),this.params=Object.freeze(e),this.presence=new Un(this),this.initialConnect=!0,this[le]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=bs({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[le]}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[le]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[le]="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[le]="connected";let e=!0,s=!0;this.initialConnect=!1,this.emit("connect",{reconnect:s,restored:e})}disconnected(e){this.state==="disconnected"||this.state==="closed"||(this[le]="disconnected",this.presence.reset(),this.emit("disconnect",e))}closed(e){this.state!=="closed"&&(this[le]="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,s){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,e,s)}async send(e){return this.perform(void 0,e)}async whisper(e){try{await this.perform("$whisper",e)}catch(s){let r=this.receiver?this.receiver.logger:null;r&&r.warn("whisper failed: ",s)}}receive(e,s){this.emit("message",e,s)}on(e,s){return this.emitter.on(e,s)}once(e,s){let r=this.emitter.on(e,(...n)=>{r(),s(...n)});return r}emit(e,...s){return this.emitter.emit(e,...s)}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,s)=>{let r=[()=>delete this._pendingSubscribe];r.push(this.on("connect",()=>{r.forEach(n=>n()),e()})),r.push(this.on("close",n=>{r.forEach(o=>o()),s(n||new Oe("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class Mn{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 s=this.channels.indexOf(e);s>-1&&this.channels.splice(s,1)}notify(e,...s){this.state=e==="restored"?"connected":e,s.length===1?this.channels.forEach(r=>r[e](s[0])):this.channels.forEach(r=>r[e]())}pending(e){this._checkIntent(e);let s=this._pendings[0];return!s||s.intent!==e?Promise.resolve():s.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 s,r={promise:new Promise(o=>{s=o}),intent:e,release:()=>{this._pendings.splice(this._pendings.indexOf(r),1),s(r)},canceled:!1,acquired:!1},n=this._pendingTop;return this._pendings.push(r),n&&await n.promise,this.gvl&&await this.gvl.acquire(r,e),r.acquired=!0,r}close(e){this.disposed=!0,this.intent=void 0,this.notify("closed",e)}_checkIntent(e){if(!(e==="unsubscribed"||e==="subscribed"))throw Error(`Unknown subscription intent: ${e}`)}get _pendingTop(){return this._pendings.length?this._pendings[this._pendings.length-1]:void 0}_mergeWithPending(e){let s=this._pendingTop;return!s||s.acquired||s.intent!==e?!1:(this._pendings.pop(),s.canceled=!0,!0)}}class Ln{constructor(){this.queue=[]}async acquire(e,s){s==="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 Fn{constructor(e){e.concurrentSubscribes===!1&&(this.glv=new Ln),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(e){return this._subscriptions[e]}create(e,{subscribe:s,unsubscribe:r}){let n=this._subscriptions[e]=new Mn(e);return n.remoteId=this._localToRemote[e],n.subscriber=s,n.unsubscriber=r,n.gvl=this.glv,n}remove(e){delete this._subscriptions[e],delete this._localToRemote[e]}storeRemoteId(e,s){this._localToRemote[e]=s;let r=this.get(e);r&&(r.remoteId=s)}}class Vn{constructor(e={}){this.subscriptions=new Fn(e),this._pendingMessages=[],this._remoteToLocal={}}subscribe(e,s){this._remoteToLocal[s]=e,this.subscriptions.storeRemoteId(e,s),this.flush(s)}unsubscribe(e){let s=this.subscriptions.get(e);if(!s)return;let r=s.remoteId;r&&delete this._remoteToLocal[r],this.subscriptions.remove(e)}transmit(e,s,r){let n=this._remoteToLocal[e];if(!n){this._pendingMessages.push([e,s,r]);return}let o=this.subscriptions.get(n);o&&o.channels.forEach(i=>{i.receive(s,r)})}notify(e,s,r){let n=this._remoteToLocal[e];if(!n)return;let o=this.subscriptions.get(n);o&&o.channels.forEach(i=>i.emit(s,r))}close(){this._pendingMessages.length=0}get size(){return this.channels.length}get channels(){return this.subscriptions.all().flatMap(e=>e.channels)}flush(e){let s=[];for(let r of this._pendingMessages)r[0]===e?this.transmit(r[0],r[1],r[2]):s.push(r);this._pendingMessages=s}}const ys={debug:0,info:1,warn:2,error:3};class ws{constructor(e){this.level=e||"warn"}log(e,s,r){ys[e]<ys[this.level]||this.writeLogEntry(e,s,r)}writeLogEntry(){throw Error("Not implemented")}debug(e,s){this.log("debug",e,s)}info(e,s){this.log("info",e,s)}warn(e,s){this.log("warn",e,s)}error(e,s){this.log("error",e,s)}}class Ce extends ws{writeLogEntry(){}}class qn{encode(e){return JSON.stringify(e)}decode(e){try{return JSON.parse(e)}catch{}}}let Bn=0;class vs{constructor(e={}){let{logger:s}=e;this.logger=s||new Ce,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=e.subscribeCooldownInterval||250,this.subscribeRetryInterval=e.subscribeRetryInterval||5e3}attached(e){this.cable=e}subscribe(e,s){let r={channel:e};s&&Object.assign(r,s);let n=bs(r);if(this.pendingUnsubscriptions[n]){let i=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${i}`,n),new Promise(a=>{setTimeout(()=>{a(this.subscribe(e,s))},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,a)=>{let c=++Bn;this.pendingSubscriptions[n]={resolve:i,reject:a,id:c},this.cable.send(this.buildSubscribeRequest(n)),this.maybeRetrySubscribe(c,n,o)})}buildSubscribeRequest(e){return{command:"subscribe",identifier:e}}maybeRetrySubscribe(e,s,r){setTimeout(()=>{let n=this.pendingSubscriptions[s];n&&n.id===e&&(this.logger.warn(`no subscription ack received in ${r}ms, retrying subscribe`,s),this.cable.send(this.buildSubscribeRequest(s)),this.maybeExpireSubscribe(e,s,r))},r)}maybeExpireSubscribe(e,s,r){setTimeout(()=>{let n=this.pendingSubscriptions[s];n&&n.id===e&&(delete this.pendingSubscriptions[s],n.reject(new In(`Haven't received subscription ack in ${r*2}ms for ${s}`)))},r)}unsubscribe(e){return this.cable.send({command:"unsubscribe",identifier:e}),this.pendingUnsubscriptions[e]=!0,setTimeout(()=>{delete this.pendingUnsubscriptions[e]},this.subscribeCooldownInterval),Promise.resolve()}perform(e,s,r){return s==="$whisper"?this.whisper(e,r):(r||(r={}),r.action||=s,this.cable.send({command:"message",identifier:e,data:JSON.stringify(r)}),Promise.resolve())}whisper(e,s){return this.cable.send({command:"whisper",identifier:e,data:s}),Promise.resolve()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:s,identifier:r,message:n,reason:o,reconnect:i}=e;if(s==="ping")return this.cable.keepalive(e.message);if(this.cable.keepalive(),s==="welcome"){let a=e.sid;return a&&this.cable.setSessionId(a),this.cable.connected()}if(s==="disconnect"){let a=new ee(o);this.reset(a),i===!1?this.cable.closed(a):this.cable.disconnected(a);return}if(s==="confirm_subscription"){let a=this.pendingSubscriptions[r];if(!a){this.logger.error("subscription not found, unsubscribing",{type:s,identifier:r}),this.unsubscribe(r);return}return delete this.pendingSubscriptions[r],a.resolve(r)}if(s==="reject_subscription"){let a=this.pendingSubscriptions[r];return a?(delete this.pendingSubscriptions[r],a.reject(new _t)):this.logger.error("subscription not found",{type:s,identifier:r})}if(n)return{identifier:r,message:n};this.logger.warn(`unknown message type: ${s}`,{message:e})}reset(e){for(let s in this.pendingSubscriptions)this.pendingSubscriptions[s].reject(e);this.pendingSubscriptions={}}recoverableClosure(){return!1}}const Es=()=>Date.now()/1e3|0;class $n extends vs{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=Es()),this.sessionId=void 0,this.sendPongs=e.pongs}reset(e){for(let s in this.pendingPresence)this.pendingPresence[s].reject(e);return this.pendingPresence={},super.reset()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:s,identifier:r,message:n}=e;if(s==="disconnect")return delete this.sessionId,this.cable.setSessionId(""),super.receive(e);if(s==="reject_subscription")return super.receive(e);if(s==="confirm_subscription")return this.subscriptionStreams[r]||(this.subscriptionStreams[r]=new Set),super.receive(e);if(s==="ping")return this.restoreSince&&(this.restoreSince=Es()),this.sendPongs&&this.sendPong(),this.cable.keepalive(e.message);if(this.cable.keepalive(),s==="confirm_history"){this.logger.debug("history result received",e),this.cable.notify("history_received",r);return}if(s==="reject_history"){this.logger.warn("failed to retrieve history",e),this.cable.notify("history_not_found",r);return}if(s==="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(s==="presence"){let o=n.type;if(o==="info"){let i=this.pendingPresence[r];i&&(delete this.pendingPresence[r],i.resolve(n))}else if(o==="error"){let i=this.pendingPresence[r];i&&(delete this.pendingPresence[r],i.reject(new Error("failed to retrieve presence")))}return{type:s,identifier:r,message:n}}if(n){let o=this.trackStreamPosition(r,e.stream_id,e.epoch,e.offset);return{identifier:r,message:n,meta:o}}this.logger.warn(`unknown message type: ${s}`,{message:e})}perform(e,s,r){switch(s){case"$presence:join":return this.join(e,r);case"$presence:leave":return this.leave(e,r);case"$presence:info":return this.presence(e,r)}return super.perform(e,s,r)}unsubscribe(e){return delete this.presenceInfo[e],super.unsubscribe(e)}buildSubscribeRequest(e){let s=super.buildSubscribeRequest(e),r=this.historyRequestFor(e);r&&(s.history=r,this.pendingHistory[e]=!0);let n=this.presenceInfo[e];return n&&(s.presence=n),s}recoverableClosure(){return!!this.sessionId}historyRequestFor(e){let s={},r=!1;if(this.subscriptionStreams[e])for(let n of this.subscriptionStreams[e]){let o=this.streamsPositions[n];o&&(r=!0,s[n]=o)}if(!(!r&&!this.restoreSince))return{since:this.restoreSince,streams:s}}trackStreamPosition(e,s,r,n){if(!(!s||!r))return this.subscriptionStreams[e]||(this.subscriptionStreams[e]=new Set),this.subscriptionStreams[e].add(s),this.streamsPositions[s]={epoch:r,offset:n},{stream:s,epoch:r,offset:n}}async sendPong(){await new Promise(e=>setTimeout(e,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(e,s){return this.presenceInfo[e]=s,this.cable.send({command:"join",identifier:e,presence:s}),Promise.resolve()}async leave(e,s){return delete this.presenceInfo[e],this.cable.send({command:"leave",identifier:e,presence:s}),Promise.resolve()}presence(e,s){return this.pendingPresence[e]?(this.logger.warn("presence is already pending, skipping",e),Promise.reject(Error("presence request is already pending"))):new Promise((r,n)=>{this.pendingPresence[e]={resolve:r,reject:n},this.cable.send({command:"presence",identifier:e,data:s})})}}class Hn extends Oe{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class Ss extends _s{static identifier="__ghost__";constructor(e,s){super(s),this.channelId=e}set channelId(e){this._channelId=e}get channelId(){return this._channelId}}const zn="$pubsub";class Ts extends _s{static identifier=zn;async perform(e,s){if(e.startsWith("$"))return super.perform(e,s);throw Error("not implemented")}}const ue=Symbol("state");let Wn=class{constructor({transport:t,protocol:e,encoder:s,logger:r,lazy:n,hubOptions:o,performFailures:i,transportConfigurator:a}){this.emitter=ze(),this.transport=t,this.encoder=s,this.logger=r||new Ce,this.protocol=e,this.performFailures=i||"throw",this.protocol.attached(this),this.hub=new Vn(o||{}),this[ue]="idle",this.handleClose=this.handleClose.bind(this),this.handleIncoming=this.handleIncoming.bind(this),this.transportConfigurator=a,this.transport.on("close",this.handleClose),this.transport.on("data",this.handleIncoming),this.initialConnect=!0,this.recovering=!1,n===!1&&this.connect().catch(()=>{})}get state(){return this[ue]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let t=this.state==="idle";this[ue]="connecting";let e=this.pendingConnect();this.logger.debug("connecting");try{this.transportConfigurator&&await this.transportConfigurator(this.transport,{initial:t}),await this.transport.open()}catch(s){this.handleClose(s)}return e}setSessionId(t){this.sessionId=t,this.transport.setParam("sid",t)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[ue]="connected",this.recovering&&this.hub.subscriptions.all().forEach(e=>e.notify("disconnected",new ee("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[ue]="connected",this.hub.subscriptions.all().forEach(r=>{t&&r.remoteId&&t.includes(r.remoteId)?r.notify("restored"):(r.notify("disconnected",new ee("recovery_failed")),this._resubscribe(r))});let e=!this.initialConnect,s=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:e,restored:s})}notify(t,e,s){e&&typeof e!="string"&&(s=e,e=void 0),e?this.hub.notify(e,"info",{type:t,data:s}):this.emit("info",{type:t,data:s})}handleClose(t){this.logger.debug("transport closed",{error:t}),this.disconnected(new ee(t,"transport_closed"))}disconnected(t){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:t}),this[ue]="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 ee?t:new ee(t,void 0)),this.logger.info("closed",{reason:t||"user"}),this[ue]="closed";let s=e||new ee("cable_closed");this.hub.subscriptions.all().forEach(r=>r.notify("disconnected",s)),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 s=this.protocol.receive(e);if(s){this.logger.debug("processed incoming message",s);let{type:r,identifier:n,message:o,meta:i}=s;r?this.hub.notify(n,r,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 Ts({stream_name:t});return this.subscribe(e)}streamFromSigned(t){let e=new Ts({signed_stream_name:t});return this.subscribe(e)}subscribeTo(t,e){let s,r;return typeof t=="string"&&(r=t,t=Ss),s=r?new t(r,e):new t(e),this.subscribe(s)}subscribe(t){if(!t.attached(this))return t;let e=t.identifier;t.connecting();let s=this.hub.subscriptions.get(e)||this.hub.subscriptions.create(e,{subscribe:r=>this._subscribe(r,t.channelId,t.params),unsubscribe:r=>this._unsubscribe(r)});return s.add(t),s.intent==="subscribed"&&s.state==="connected"&&t.connected(),s.ensureSubscribed(),t}async _resubscribe(t){t.intent!=="subscribed"||!t.channels[0]||(t.notify("connecting"),t.ensureResubscribed())}async _subscribe(t,e,s){let r=t.id;if(this.state==="idle"&&this.connect().catch(()=>{}),this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r});return}this.logger.debug("acquiring subscribe lock",{identifier:r});let n=await t.acquire("subscribed");if(n.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:r}),n.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:r}),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:r}),n.release();return}if(t.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:r}),t.notify("connected"),n.release();return}let o={identifier:e,params:s};this.logger.debug("subscribing",o);try{let i=await this.protocol.subscribe(e,s);this.hub.subscribe(r,i),this.logger.debug("subscribed",{...o,remoteId:i}),t.notify("connected")}catch(i){if(i){if(i instanceof _t&&this.logger.warn("rejected",o),i instanceof ee){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(r)}n.release()}unsubscribe(t){let e=t.identifier,s=this.hub.subscriptions.get(e);if(!s)throw Error(`Subscription not found: ${e}`);s.remove(t),t.closed(),s.maybeUnsubscribe()}async _unsubscribe(t){let e=t.id;this.logger.debug("acquiring unsubscribe lock",{identifier:e});let s=await t.acquire("unsubscribed");if(s.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:e}),s.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}),s.release();return}if(t.state==="disconnected"||t.state==="closed"){this.logger.debug(`already ${t.state} connected, skip unsubscribe command`,{identifier:e}),s.release();return}let r=t.remoteId;if(this.logger.debug("unsubscribing...",{remoteId:r}),this.state!=="connected"){this.logger.debug("unsubscribe skipped (cable is not connected)",{id:e}),t.close(),this.hub.unsubscribe(e),s.release();return}try{await this.protocol.unsubscribe(r),this.logger.debug("unsubscribed remotely",{id:e})}catch(n){n&&(n instanceof ee?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",s.release()}async perform(t,e,s){if(this.performFailures==="throw")return this._perform(t,e,s);try{return await this._perform(t,e,s)}catch(r){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:r});return}}async _perform(t,e,s){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new Hn;let r=this.hub.subscriptions.get(t);if(!r)throw Error(`Subscription not found: ${t}`);if(await r.pending("subscribed"),r.intent!=="subscribed")throw Error(`Subscription is closed: ${t}`);let n=r.remoteId,o={id:n,action:e,payload:s};this.logger.debug("perform",o);try{let i=await this.protocol.perform(n,e,s);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 s=this.emitter.on(t,(...r)=>{s(),e(...r)});return s}emit(t,...e){return this.emitter.emit(t,...e)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((t,e)=>{let s=[()=>delete this._pendingConnect];s.push(this.on("connect",()=>{s.forEach(r=>r()),t()})),s.push(this.on("close",r=>{s.forEach(n=>n()),e(r)})),s.push(this.on("disconnect",r=>{s.forEach(n=>n()),e(r)}))}),this._pendingConnect)}};const Jn={maxMissingPings:2,maxReconnectAttempts:1/0},ge=()=>Date.now(),Os=(t,e)=>{e=e||{};let{backoffRate:s,jitterRatio:r,maxInterval:n}=e;return s=s||2,r===void 0&&(r=.5),o=>{let i=t*s**o,a=i*s,c=i+(a-i)*Math.random(),u=2*(Math.random()-.5)*r;return c=c*(1+u),n&&n<c&&(c=n),c}};let Cs=class{constructor({pingInterval:t,...e}){if(this.pingInterval=t,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${t}`);if(e=Object.assign({},Jn,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 Ce,this.state="pending_connect",this.attempts=0,this.disconnectedAt=ge()}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=ge(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=ge(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=ge(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=ge()})),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=ge()-this.pingedAt;t>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${t}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new jn))}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 Kn{constructor(e,s={}){this.transports=e,this.transport=null,this.emitter=ze(),this.unbind=[],this.logger=s.logger||new Ce}displayName(){return"fallbacked transport"}async open(){for(let e=0;e<this.transports.length;e++){let s=this.transports[e];try{this.transport=s,this.resetListeners(),this.logger.debug(`Trying to connect via ${s.displayName()}`),await s.open(),this.logger.debug(`Connected via ${s.displayName()}`);return}catch(r){this.logger.debug(`Failed to connect via ${s.displayName()}: ${r.message}`)}}throw this.transport=null,this.resetListeners(),new Error("Couldn't connect via any available transport")}send(e){if(!this.transport)throw new Error("No transport is open");this.transport.send(e)}async close(){if(!this.transport)throw new Error("No transport is open");await this.transport.close(),this.transport=null}setURL(){throw new Error("Not implemented. Set URL for each transport separately")}setParam(e,s){this.transports.forEach(r=>{r.setParam(e,s)})}setToken(e,s){this.transports.forEach(r=>{r.setToken(e,s)})}on(e,s){return this.emitter.on(e,s)}once(e,s){let r=this.emitter.on(e,(...n)=>{r(),s(...n)});return r}get url(){return this.transport?this.transport.url:""}resetListeners(){this.unbind.forEach(e=>e()),this.unbind.length=0,this.transport&&this.unbind.push(this.transport.on("open",()=>{this.emitter.emit("open")}),this.transport.on("data",e=>{this.emitter.emit("data",e)}),this.transport.on("close",e=>{this.emitter.emit("close",e)}),this.transport.on("error",e=>{this.emitter.emit("error",e)}))}}class Xn{constructor(e,s={}){this.url=e;let r=s.websocketImplementation;if(r)this.Impl=r;else if(typeof WebSocket<"u")this.Impl=WebSocket;else throw new Error("No WebSocket support");this.connected=!1,this.emitter=ze();let{format:n,subprotocol:o,authStrategy:i}=s;this.format=n||"text",this.connectionOptions=s.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((s,r)=>{let n=[];n.push(this.once("open",()=>{n.forEach(o=>o()),s()})),n.push(this.once("close",()=>{n.forEach(o=>o()),r(Error("WS connection closed"))}))})}setURL(e){this.url=e}setParam(e,s){let r=new URL(this.url);r.searchParams.set(e,s);let n=`${r.protocol}//${r.host}${r.pathname}?${r.searchParams}`;this.setURL(n)}setToken(e,s="jid"){if(this.authStrategy==="param")this.setParam(s,e);else if(this.authStrategy==="header"){this.connectionOptions=this.connectionOptions||{},this.connectionOptions.headers=this.connectionOptions.headers||{};let r=`x-${s}`.toLowerCase();r=Object.keys(this.connectionOptions.headers).find(n=>n.toLowerCase()===r)||r,this.connectionOptions.headers[r]=e}else if(this.authStrategy==="sub-protocol")this.authProtocol=`anycable-token.${e}`;else throw new Error("Unknown auth strategy: "+this.authStrategy)}send(e){if(!this.ws||!this.connected)throw Error("WebSocket is not connected");this.ws.send(e)}close(){this.ws?this.onclose():this.connected=!1}on(e,s){return this.emitter.on(e,s)}once(e,s){let r=this.emitter.on(e,(...n)=>{r(),s(...n)});return r}initListeners(){this.ws.onerror=e=>{this.connected&&this.emitter.emit("error",e.error||new Error("WS Error"))},this.ws.onclose=()=>{this.onclose()},this.ws.onmessage=e=>{let s=e.data;this.format==="binary"&&(s=new Uint8Array(s)),this.emitter.emit("data",s)},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 Zn{constructor(e){this.channel=e}notify(e,...s){typeof this[e]=="function"&&this[e](...s)}perform(e,s={}){this.channel.perform(e,s)}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 Gn extends Ss{constructor(e,s,r){super(e,s),this.subscription=new Zn(this),Object.assign(this.subscription,r),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 _t?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class Qn{constructor(e){this.cable=e}create(e,s){let r,n;typeof e=="object"?(r=e.channel,delete e.channel,n=e):(r=e,n={});let o=new Gn(r,n,s);return o.subscription.notify("initialized"),this.cable.subscribe(o),o.subscription}findAll(e){return this.cable.hub.channels.filter(s=>s.identifier===e).map(s=>s.subscription)}}class Yn{constructor(e){this.cable=e,this.subscriptions=new Qn(e)}send(e){return this.cable.send(e)}connect(){return this.cable.connect()}disconnect(){return this.cable.disconnect()}ensureActiveConnection(){return this.cable.connect()}}const xs={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function ei(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({},xs,e);let{protocol:s,websocketImplementation:r,websocketFormat:n,websocketOptions:o,websocketAuthStrategy:i,fallbacks:a,logLevel:c,logger:u,transport:d,encoder:p,lazy:y,monitor:b,pingInterval:x,reconnectStrategy:h,maxMissingPings:S,maxReconnectAttempts:m,subprotocol:E,tokenRefresher:g,historyTimestamp:O,protocolOptions:P,concurrentSubscribes:J,performFailures:K,transportConfigurator:G,auth:X}=e;if(u=u||new Ce(c),typeof s=="string"){E=E||s;let v=s.substring(0,s.lastIndexOf("-")),D=s.substring(s.lastIndexOf("-")+1);if(P=P||{},v==="actioncable-v1")s=new vs({logger:u,...P});else if(v==="actioncable-v1-ext")s=new $n({logger:u,historyTimestamp:O,...P});else throw Error(`Protocol is not supported yet: ${s}`);if(D==="json")p=p||new qn,n=n||"text";else if(D==="msgpack"){if(n="binary",!p)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(D==="protobuf"){if(n=n||"binary",!p)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: ${s}`)}if(!s)throw Error("Protocol must be specified");d=d||new Xn(t,{websocketImplementation:r,websocketOptions:o,subprotocol:E,authStrategy:i,format:n}),a&&(d=new Kn([d,...a],{logger:u})),X&&X.token&&d.setToken(X.token,X.param||"jid"),h=h||Os(x),b!==!1&&(b=b||new Cs({pingInterval:x,reconnectStrategy:h,maxMissingPings:S,maxReconnectAttempts:m,logger:u}));let V={concurrentSubscribes:J},U=new Wn({protocol:s,transport:d,encoder:p,logger:u,lazy:y,hubOptions:V,performFailures:K,transportConfigurator:G});return b&&(b.watch(U),U.monitor=b),g&&ti(U,async()=>{try{await g(d)}catch(v){return u.error("Failed to refresh authentication token: "+v),!1}return U.connect().catch(()=>{}),!0}),U}function ti(t,e){let s=!1;t.on("connect",()=>s=!1),t.on("close",async r=>{if(r){if(s){t.logger.warn("Token auto-refresh is disabled",r);return}r.reason==="token_expired"&&(s=!0,await e())}})}class si extends ws{writeLogEntry(e,s,r){r?console[e](s,r):console[e](s)}}class ri extends Cs{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")},s=n=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:n})},r=()=>this.disconnect(new ee("page_frozen"));document.addEventListener("visibilitychange",e,!1),window.addEventListener("focus",s,!1),window.addEventListener("online",s,!1),window.addEventListener("resume",s,!1),window.addEventListener("freeze",r,!1),this.unbind.push(()=>{document.removeEventListener("visibilitychange",e,!1),window.removeEventListener("focus",s,!1),window.removeEventListener("online",s,!1),window.removeEventListener("resume",s,!1),window.removeEventListener("freeze",r,!1)})}}disconnect(e){this.state==="disconnected"||this.state==="closed"||(this.logger.info("Disconnecting",{reason:e.message}),this.cancelReconnect(),this.stopPolling(),this.state="pending_disconnect",this.target.disconnected(e))}}const ni=["cable","action-cable"],ii="/cable",We=(t,e)=>{for(let s of ni){let r=t.head.querySelector(`meta[name='${s}-${e}']`);if(r)return r.getAttribute("content")}},Rs=t=>t.match(/wss?:\/\//)?t:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${t}`:t,oi=()=>{if(typeof document<"u"&&document.head){let t=We(document,"url");if(t)return Rs(t)}return Rs(ii)},ai=()=>{if(typeof document<"u"&&document.head){let t=We(document,"history-timestamp");if(t)return t|0}},ci=()=>{if(typeof document<"u"&&document.head)return We(document,"token")},li=()=>{if(typeof document<"u"&&document.head)return We(document,"token-param")};function ui(t,e){typeof t=="object"&&typeof e>"u"&&(e=t,t=void 0),t=t||oi(),e=e||{},e.historyTimestamp||=ai();let s=ci();if(s){let u=li();e.auth=Object.assign({token:s,param:u},e.auth||{})}e=Object.assign({},xs,e);let{logLevel:r,logger:n,pingInterval:o,reconnectStrategy:i,maxMissingPings:a,maxReconnectAttempts:c}=e;return n=e.logger=e.logger||new si(r),i=e.reconnectStrategy=e.reconnectStrategy||Os(o),e.monitor!==!1&&(e.monitor=e.monitor||new ri({pingInterval:o,reconnectStrategy:i,maxMissingPings:a,maxReconnectAttempts:c,logger:n})),ei(t,e)}function di(t,e){let s=ui(t,e);return new Yn(s)}class hi{constructor(e="/openc3-api/cable",s="/openc3-api/auth/otp"){this._cable=null,this._url=e,this._otpUrl=s}disconnect(){this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(e,s,r={},n={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(o=>(o&&OpenC3Auth.setTokens(),gs.get(this._otpUrl,{params:{scope:s}}))).then(({data:o})=>{if(this._cable==null){const i=new URL(this._url,document.baseURI);i.searchParams.set("scope",s),i.searchParams.set("authorization",o),this._cable=di(i.href)}return this._cable.subscriptions.create({channel:e,...n},r)})}recordPing(){}}function xe(t){return fi.test(t)}const fi=/^-?[0-9]+$/;function As(t){return pi.test(t)}const pi=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function ks(t,e){if(xe(t))return Number.isSafeInteger(Number.parseInt(t,10));const s=Number.parseFloat(t),r=String(s);if(t===r)return!0;const n=Ps(t),o=Ps(r);return!!(n===o||e?.approx===!0&&!xe(t)&&o.length>=14&&n.startsWith(o.substring(0,14)))}let Re=(function(t){return t.underflow="underflow",t.overflow="overflow",t.truncate_integer="truncate_integer",t.truncate_float="truncate_float",t})({});function mi(t){if(ks(t,{approx:!1}))return;if(xe(t))return Re.truncate_integer;const e=Number.parseFloat(t);return Number.isFinite(e)?e===0?Re.underflow:Re.truncate_float:Re.overflow}function Ps(t){const{start:e,end:s}=gi(t),r=t.substring(e,s),n=r.indexOf(".");return n===-1?r:r.substring(0,n)+r.substring(n+1)}function gi(t){let e=0;for(t[0]==="-"&&e++;t[e]==="0"||t[e]===".";)e++;let s=t.lastIndexOf("e");for(s===-1&&(s=t.lastIndexOf("E")),s===-1&&(s=t.length);(t[s-1]==="0"||t[s-1]===".")&&s>e;)s--;return{start:e,end:s}}class bi{isLosslessNumber=!0;constructor(e){if(!As(e))throw new Error(`Invalid number (value: "${e}")`);this.value=e}valueOf(){const e=mi(this.value);if(e===void 0||e===Re.truncate_float)return Number.parseFloat(this.value);if(xe(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 _i(t){return t&&typeof t=="object"&&t.isLosslessNumber||!1}function yi(t){return new bi(t)}function wi(t,e){return yt({"":t},"",t,e)}function yt(t,e,s,r){return Array.isArray(s)?r.call(t,e,Ei(s,r)):s&&typeof s=="object"&&!_i(s)?r.call(t,e,vi(s,r)):r.call(t,e,s)}function vi(t,e){for(const s of Object.keys(t)){const r=yt(t,s,t[s],e);r!==void 0?t[s]=r:delete t[s]}return t}function Ei(t,e){for(let s=0;s<t.length;s++)t[s]=yt(t,String(s),t[s],e);return t}function Si(t,e,s){const r=typeof s=="function"?{parseNumber:s}:s,n=r?.parseNumber??yi,o=r?.onDuplicateKey??K;let i=0;const a=d();return m(a),g(),e?wi(a,e):a;function c(){if(t.charCodeAt(i)===Ai){i++,y();const T={};let I=!0;for(;i<t.length&&t.charCodeAt(i)!==Ns;){I?I=!1:(h(),y());const M=i,j=b();if(j===void 0){J();return}y(),S();const Q=d();if(Q===void 0){v();return}if(Object.prototype.hasOwnProperty.call(T,j)&&!wt(Q,T[j])){const ke=o({key:j,position:M+1,oldValue:T[j],newValue:Q});ke!==void 0&&(T[j]=ke)}else T[j]=Q}return t.charCodeAt(i)!==Ns&&G(),i++,T}}function u(){if(t.charCodeAt(i)===ki){i++,y();const T=[];let I=!0;for(;i<t.length&&t.charCodeAt(i)!==Is;){I?I=!1:h();const M=d();E(M),T.push(M)}return t.charCodeAt(i)!==Is&&X(),i++,T}}function d(){y();const T=b()??x()??c()??u()??p("true",!0)??p("false",!1)??p("null",null);return y(),T}function p(T,I){if(t.slice(i,i+T.length)===T)return i+=T.length,I}function y(){for(;Ti(t.charCodeAt(i));)i++}function b(){if(t.charCodeAt(i)===vt){i++;let T="";for(;i<t.length&&t.charCodeAt(i)!==vt;){if(t.charCodeAt(i)===Ri){const I=t[i+1],M=xi[I];M!==void 0?(T+=M,i++):I==="u"?Je(t.charCodeAt(i+2))&&Je(t.charCodeAt(i+3))&&Je(t.charCodeAt(i+4))&&Je(t.charCodeAt(i+5))?(T+=String.fromCharCode(Number.parseInt(t.slice(i+2,i+6),16)),i+=5):D(i):U(i)}else Ci(t.charCodeAt(i))?T+=t[i]:V(t[i]);i++}return P(),i++,T}}function x(){const T=i;if(t.charCodeAt(i)===js&&(i++,O(T)),t.charCodeAt(i)===Et)i++;else if(Oi(t.charCodeAt(i)))for(i++;Ke(t.charCodeAt(i));)i++;if(t.charCodeAt(i)===Li)for(i++,O(T);Ke(t.charCodeAt(i));)i++;if(t.charCodeAt(i)===$i||t.charCodeAt(i)===Bi)for(i++,(t.charCodeAt(i)===js||t.charCodeAt(i)===ji)&&i++,O(T);Ke(t.charCodeAt(i));)i++;if(i>T)return n(t.slice(T,i))}function h(){if(t.charCodeAt(i)!==Mi)throw new SyntaxError(`Comma ',' expected after value ${B()}`);i++}function S(){if(t.charCodeAt(i)!==Fi)throw new SyntaxError(`Colon ':' expected after property name ${B()}`);i++}function m(T){if(T===void 0)throw new SyntaxError(`JSON value expected ${B()}`)}function E(T){if(T===void 0)throw new SyntaxError(`Array item expected ${B()}`)}function g(){if(i<t.length)throw new SyntaxError(`Expected end of input ${B()}`)}function O(T){if(!Ke(t.charCodeAt(i))){const I=t.slice(T,i);throw new SyntaxError(`Invalid number '${I}', expecting a digit ${B()}`)}}function P(){if(t.charCodeAt(i)!==vt)throw new SyntaxError(`End of string '"' expected ${B()}`)}function J(){throw new SyntaxError(`Quoted object key expected ${B()}`)}function K(T){let{key:I,position:M}=T;throw new SyntaxError(`Duplicate key '${I}' encountered at position ${M}`)}function G(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${B()}`)}function X(){throw new SyntaxError(`Array item or end of array ']' expected ${B()}`)}function V(T){throw new SyntaxError(`Invalid character '${T}' ${q()}`)}function U(T){const I=t.slice(T,T+2);throw new SyntaxError(`Invalid escape character '${I}' ${q()}`)}function v(){throw new SyntaxError(`Object value expected after ':' ${q()}`)}function D(T){const I=t.slice(T,T+6);throw new SyntaxError(`Invalid unicode character '${I}' ${q()}`)}function q(){return`at position ${i}`}function Ae(){return i<t.length?`but got '${t[i]}'`:"but reached end of input"}function B(){return`${Ae()} ${q()}`}}function Ti(t){return t===Pi||t===Di||t===Ni||t===Ii}function Je(t){return t>=Et&&t<=St||t>=Vi&&t<=Hi||t>=qi&&t<=zi}function Ke(t){return t>=Et&&t<=St}function Oi(t){return t>=Ui&&t<=St}function Ci(t){return t>=32&&t<=1114111}function wt(t,e){return t===e?!0:Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&t.every((s,r)=>wt(s,e[r])):Ds(t)&&Ds(e)?[...new Set([...Object.keys(t),...Object.keys(e)])].every(s=>wt(t[s],e[s])):!1}function Ds(t){return typeof t=="object"&&t!==null}const xi={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
|
11
|
+
`,r:"\r",t:" "},Ri=92,Ai=123,Ns=125,ki=91,Is=93,Pi=32,Di=10,Ni=9,Ii=13,vt=34,ji=43,js=45,Et=48,Ui=49,St=57,Mi=44,Li=46,Fi=58,Vi=65,qi=97,Bi=69,$i=101,Hi=70,zi=102;function Us(t,e,s,r){return n(t);function n(c,u){if(Array.isArray(r)){const d=r.find(p=>p.test(c));if(d){const p=d.stringify(c);if(typeof p!="string"||!As(p))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${p})`);return p}}if(typeof c=="boolean"||typeof c=="number"||typeof c=="string"||c===null||c instanceof Date||c instanceof Boolean||c instanceof Number||c instanceof String)return JSON.stringify(c);if(c?.isLosslessNumber||typeof c=="bigint")return c.toString();if(Array.isArray(c))return o(c);if(c&&typeof c=="object")return i(c)}function o(c,u){if(c.length===0)return"[]";let d="[";for(let p=0;p<c.length;p++){const y=c[p];typeof y<"u"&&typeof y!="function"?d+=n(y):d+="null",p<c.length-1&&(d+=",")}return d+="]",d}function i(c,u){if(typeof c.toJSON=="function")return Us(c.toJSON(),e,s,void 0);const d=Array.isArray(e)?e.map(String):Object.keys(c);if(d.length===0)return"{}";let p=!0,y="{";for(const b of d){const x=c[b];if(a(b,x)){p?p=!1:y+=",";const h=JSON.stringify(b);y+=`${h}:`,y+=n(x)}}return y+="}",y}function a(c,u){return typeof u<"u"&&typeof u!="function"&&typeof u!="symbol"}}function Wi(t){return xe(t)&&!ks(t)?BigInt(t):parseFloat(t)}class Ji{id=1;constructor(){}async exec(e,s,r={},n={},o=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return r.scope=window.openc3Scope,n.manual=!0,(await gt.post("/openc3-api/api",{jsonrpc:"2.0",method:e,params:s,id:this.id,keyword_params:r},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...n},timeout:o,transformRequest:[(i,a)=>Us(i)],transformResponse:[i=>{try{return Si(i,void 0,Wi)}catch{const a=typeof i=="string"?i.substring(0,200):String(i),c=new Error(`Server returned non-JSON response: ${a}`);throw c.name="ServerError",c}}]})).data.result}catch(i){let a=new Error;throw i.response?(a.name=i.response.data.error.data.class,a.message=i.response.data.error.data.message,a.object=i.response.data.error):i.request?(a.name="Request error",a.message="Request error, no response received"):a=i,a}}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,s,r,n,o){return this.exec("map_target_to_interface",[e,s],{cmd_only:r,tlm_only:n,unmap_old:o})}unmap_target_from_interface(e,s,r,n){return this.exec("unmap_target_from_interface",[e,s],{cmd_only:r,tlm_only:n})}connect_interface(e,...s){return s.length>0?this.exec("connect_interface",[e,...s]):this.exec("connect_interface",[e])}disconnect_interface(e){return this.exec("disconnect_interface",[e])}interface_cmd(e,s,...r){return this.exec("interface_cmd",[e,s,...r])}interface_target_enable(e,s,r=!1,n=!1){return this.exec("interface_target_enable",[e,s],{cmd_only:r,tlm_only:n})}interface_target_disable(e,s,r=!1,n=!1){return this.exec("interface_target_disable",[e,s],{cmd_only:r,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,s,r,n,o){return this.exec("map_target_to_router",[e,s],{cmd_only:r,tlm_only:n,unmap_old:o})}unmap_target_from_router(e,s,r,n){return this.exec("unmap_target_from_router",[e,s],{cmd_only:r,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,s,r=!1,n=!1){return this.exec("router_target_enable",[e,s],{cmd_only:r,tlm_only:n})}router_target_disable(e,s,r=!1,n=!1){return this.exec("router_target_disable",[e,s],{cmd_only:r,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,s,r){return this.exec("get_item",[e,s,r])}get_param(e,s,r){return this.exec("get_param",[e,s,r])}get_parameter(e,s,r){return this.exec("get_param",[e,s,r])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(e){return this.exec("set_limits_set",[e])}get_target(e){return this.exec("get_target",[e])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(e,s){return this.exec("get_tlm",[e,s])}get_telemetry(e,s){return this.exec("get_tlm",[e,s])}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,s=!1){return this.exec("get_all_tlm_names",[e],{hidden:s})}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,s,r,n=30){const o=await this.exec("get_tlm_packet",[e,s],{type:r,stale_time:n});if(o!=null){let i=o.length,a=null;for(let c=0;c<i;c++)a=this.decode_openc3_type(o[c][1]),a!==null&&(o[c][1]=a)}return o}get_packet_derived_items(e,s){return this.exec("get_packet_derived_items",[e,s])}get_tlm_buffer(e,s){return this.exec("get_tlm_buffer",[e,s])}get_tlm_available(e){return this.exec("get_tlm_available",[e])}async get_tlm_values(e,s=30,r=null,n=null,o=null){let i={stale_time:s};r!==null&&(i.cache_timeout=r),n!==null&&(i.start_time=n.toISOString()),o!==null&&(i.end_time=o.toISOString());const a=await this.exec("get_tlm_values",[e],i,{},1e4);if(a&&a.length>0){let c=a.length,u=null;for(let d=0;d<c;d++)u=this.decode_openc3_type(a[d][0]),u!==null&&(a[d][0]=u)}return a}get_limits(e,s,r){return this.exec("get_limits",[e,s,r])}async tlm(e,s,r,n="CONVERTED"){let o=null;if(s===void 0)o=await this.exec("tlm",[e]);else if(r===void 0)if(["RAW","CONVERTED","FORMATTED"].includes(s))o=await this.exec("tlm",[e],{type:s});else{let a=new Error;throw a.name="TypeError",a.message=`Invalid data type ${s}. Valid options are RAW, CONVERTED or FORMATTED.`,a}else o=await this.exec("tlm",[e,s,r],{type:n});let i=this.decode_openc3_type(o);return i!==null&&(o=i),o}async inject_tlm(e,s,r=null,n="CONVERTED",o=!1){await this.exec("inject_tlm",[e,s,r],{type:n,stored:o})}set_tlm(e,s,r,n){return this.exec("set_tlm",[e,s,r],{type:n})}override_tlm(e,s,r,n){return this.exec("override_tlm",[e,s,r],{type:n})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(e,s,r,n){return this.exec("normalize_tlm",[e,s,r],{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,s=!1){return this.exec("get_all_cmd_names",[e],{hidden:s})}get_all_command_names(e){return this.exec("get_all_cmd_names",[e])}get_cmd(e,s){return this.exec("get_cmd",[e,s])}get_command(e,s){return this.exec("get_cmd",[e,s])}get_cmd_cnts(e){return this.exec("get_cmd_cnts",[e])}get_cmd_value(e,s,r,n="CONVERTED"){return this.exec("get_cmd_value",[e,s,r,n])}get_cmd_buffer(e,s){return this.exec("get_cmd_buffer",[e,s])}_cmd(e,s,r,n,o,i={}){let a=null;for(let c in n)Object.prototype.hasOwnProperty.call(n,c)&&(a=this.encode_openc3_type(n[c]),a!==null&&(n[c]=a));return this.exec(e,[s,r,n],i,o)}get_cmd_hazardous(e,s,r,n={}){return s===void 0?this.exec("get_cmd_hazardous",e,{},n):this._cmd("get_cmd_hazardous",e,s,r,n)}cmd(e,s,r,n={},o={}){return s===void 0?this.exec("cmd",e,o,n):this._cmd("cmd",e,s,r,n,o)}cmd_no_range_check(e,s,r,n={},o={}){return s===void 0?this.exec("cmd_no_range_check",e,o,n):this._cmd("cmd_no_range_check",e,s,r,n,o)}cmd_raw(e,s,r,n={},o={}){return s===void 0?this.exec("cmd_raw",e,o,n):this._cmd("cmd_raw",e,s,r,n,o)}cmd_raw_no_range_check(e,s,r,n={},o={}){return s===void 0?this.exec("cmd_raw_no_range_check",e,o,n):this._cmd("cmd_raw_no_range_check",e,s,r,n,o)}cmd_no_hazardous_check(e,s,r,n={},o={}){return s===void 0?this.exec("cmd_no_hazardous_check",e,o,n):this._cmd("cmd_no_hazardous_check",e,s,r,n,o)}cmd_no_checks(e,s,r,n={},o={}){return s===void 0?this.exec("cmd_no_checks",e,o,n):this._cmd("cmd_no_checks",e,s,r,n,o)}cmd_raw_no_hazardous_check(e,s,r,n={},o={}){return s===void 0?this.exec("cmd_raw_no_hazardous_check",e,o,n):this._cmd("cmd_raw_no_hazardous_check",e,s,r,n,o)}cmd_raw_no_checks(e,s,r,n={},o={}){return s===void 0?this.exec("cmd_raw_no_checks",e,o,n):this._cmd("cmd_raw_no_checks",e,s,r,n,o)}build_cmd(e,s,r,n={},o={}){return s===void 0?this.exec("build_cmd",e,o,n):this._cmd("build_cmd",e,s,r,n,o)}build_command(e,s,r,n={},o={}){return s===void 0?this.exec("build_cmd",e,o,n):this._cmd("build_cmd",e,s,r,n,o)}get_interface_names(){return this.exec("get_interface_names",[])}get_router_names(){return this.exec("get_router_names",[])}send_raw(e,s){return this.exec("send_raw",[e,s])}list_configs(e){return this.exec("list_configs",[e])}load_config(e,s){return this.exec("load_config",[e,s])}save_config(e,s,r){return this.exec("save_config",[e,s,r])}delete_config(e,s){return this.exec("delete_config",[e,s])}enable_limits(e,s,r){return this.exec("enable_limits",[e,s,r])}disable_limits(e,s,r){return this.exec("disable_limits",[e,s,r])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(e){return this.exec("get_overall_limits_state",[e])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(e,s){return this.exec("get_setting",[e],s)}get_settings(e,s){return this.exec("get_settings",e,s)}set_setting(e,s){return this.exec("set_setting",[e,s])}update_news(){return this.exec("update_news",[])}update_plugin_store(){return this.exec("update_plugin_store",[])}save_setting(e,s){return this.exec("set_setting",[e,s])}get_metrics(){return this.exec("get_metrics",[])}open_tab(e){window.open(e,"_blank")}async hashString(e){if(window.isSecureContext){const s=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",s),n=new Uint8Array(r);return Array.from(n).map(o=>o.toString(16).padStart(2,"0")).join("")}}}let Xe=[];const Ki={components:{OpenC3TimePicker:jt,OpenConfigDialog:kt,SaveConfigDialog:At,TargetPacketItemChooser:It,TopBar:zs},mixins:[xt,Rt],data(){return{title:"Data Extractor",configKey:"data_extractor",openConfig:!1,saveConfig:!1,api:null,timeZone:"local",progress:0,packetsReceived:0,totalPacketsReceived:0,itemsReceived:0,totalItemsReceived:0,processButtonText:"Process",todaysDate:null,startDate:null,startTime:null,endTime:null,endDate:null,startDateTime:null,endDateTime:null,startDateTimeFilename:"",rules:{required:t=>!!t||"Required"},cmdOrTlm:"tlm",items:[],search:"",headers:[{title:"Target",value:"targetName"},{title:"Packet",value:"packetName"},{title:"Item",value:"itemName"},{title:"Mode",value:"mode"},{title:"ValueType",value:"valueType"},{title:"ReducedType",value:"reducedType"},{title:"Edit",value:"edit"},{title:"Delete",value:"delete"}],itemsPerPage:20,columnMap:{},delimiter:",",columnMode:"normal",fileCount:0,skipIgnored:!0,fillDown:!1,matlabHeader:!1,uniqueOnly:!1,allowWildcards:!1,keyMap:{},modes:["DECOM","REDUCED_MINUTE","REDUCED_HOUR","REDUCED_DAY"],valueTypes:["CONVERTED","RAW","FORMATTED"],reducedTypes:["SAMPLE","MIN","MAX","AVG","STDDEV"],editAll:!1,allItemMode:"DECOM",allItemValueType:"CONVERTED",allItemReducedType:"SAMPLE",cable:new hi,subscription:null,enterprise:!1}},computed:{hasCommands:function(){return this.items.some(t=>t.cmdOrTlm==="CMD")},menus:function(){return[{label:"File",items:[{label:"Open Configuration",icon:"mdi-folder-open",command:()=>{this.openConfig=!0}},{label:"Save Configuration",icon:"mdi-content-save",command:()=>{this.saveConfig=!0}},{label:"Reset Configuration",icon:"mdi-monitor-shimmer",command:()=>{this.resetConfig(),this.resetConfigBase()}},{divider:!0},{radioGroup:!0,value:this.delimiter,command:t=>{this.delimiter=t},choices:[{label:"Comma Delimited",value:","},{label:"Tab Delimited",value:" "}]}]},{label:"Mode",items:[{label:"Fill Down",checkbox:!0,checked:this.fillDown,command:()=>{this.fillDown=!this.fillDown}},{label:"Matlab Header",checkbox:!0,checked:this.matlabHeader,command:t=>{this.matlabHeader=!this.matlabHeader}},{label:"Unique Only",checkbox:!0,checked:this.uniqueOnly,command:t=>{this.uniqueOnly=!this.uniqueOnly}},{label:"Allow Wildcards",checkbox:!0,checked:this.allowWildcards,command:()=>{this.allowWildcards=!this.allowWildcards}},{divider:!0},{radioGroup:!0,value:this.columnMode,command:t=>{this.columnMode=t},choices:[{label:"Normal Columns",value:"normal"},{label:"Full Column Names",value:"full"}]}]}]},currentConfig:function(){return{delimiter:this.delimiter,fillDown:this.fillDown,matlabHeader:this.matlabHeader,uniqueOnly:this.uniqueOnly,allowWildcards:this.allowWildcards,columnMode:this.columnMode,cmdOrTlm:this.cmdOrTlm,items:this.items,itemsPerPage:this.itemsPerPage}}},watch:{delimiter:function(){this.saveDefaultConfig(this.currentConfig)},fillDown:function(){this.saveDefaultConfig(this.currentConfig)},matlabHeader:function(){this.saveDefaultConfig(this.currentConfig)},uniqueOnly:function(){this.saveDefaultConfig(this.currentConfig)},allowWildcards:function(){this.saveDefaultConfig(this.currentConfig)},columnNode:function(){this.saveDefaultConfig(this.currentConfig)},cmdOrTlm:function(){this.items.length===0?this.saveDefaultConfig(this.currentConfig):this.items=[]},items:{handler:function(){this.saveDefaultConfig(this.currentConfig)},deep:!0},itemsPerPage:function(){this.saveDefaultConfig(this.currentConfig)}},async created(){this.api=new Ji,await this.api.get_setting("time_zone").then(e=>{e&&(this.timeZone=e)}).catch(e=>{}),await gs.get("/openc3-api/info").then(e=>{e.data.enterprise&&(this.enterprise=!0)});let t=new Date;this.todaysDate=this.formatDate(t,this.timeZone),this.startDate=this.formatDate(t-36e5,this.timeZone),this.startTime=this.formatTimeHMS(t-36e5,this.timeZone),this.endTime=this.formatTimeHMS(t,this.timeZone),this.endDate=this.formatDate(t,this.timeZone)},mounted:function(){if(this.$route.query&&this.$route.query.config)this.openConfiguration(this.$route.query.config,!0);else{let t=this.loadDefaultConfig();JSON.stringify(t)!=="{}"&&this.applyConfig(t)}},unmounted:function(){this.subscription&&this.subscription.unsubscribe(),this.cable.disconnect()},methods:{resetConfig:function(){this.delimiter=",",this.fillDown=!1,this.matlabHeader=!1,this.uniqueOnly=!1,this.allowWildcards=!1,this.columnMode="normal";let t=new Date;this.startDate=this.formatDate(t-36e5,this.timeZone),this.startTime=this.formatTimeHMS(t-36e5,this.timeZone),this.endTime=this.formatTimeHMS(t,this.timeZone),this.endDate=this.formatDate(t,this.timeZone),this.cmdOrTlm="tlm",this.items=[],this.itemsPerPage=20,this.applyConfig(this.currentConfig)},applyConfig:function(t){this.delimiter=t.delimiter||",",this.menus[0].radioGroup=this.delimiter===","?"Comma Delimited":"Tab Delimited",this.fillDown=t.fillDown,this.menus[1].items[0].checked=this.fillDown||!1,this.matlabHeader=t.matlabHeader,this.menus[1].items[1].checked=this.matlabHeader||!1,this.uniqueOnly=t.uniqueOnly,this.menus[1].items[2].checked=this.uniqueOnly||!1,this.allowWildcards=t.allowWildcards,this.menus[1].items[3].checked=this.allowWildcards||!1,this.columnMode=t.columnMode,this.menus[1].radioGroup=this.columnMode==="normal"?"Normal Columns":"Full Column Names",this.cmdOrTlm=t.cmdOrTlm,this.items=t.items,this.itemsPerPage=t.itemsPerPage},openConfiguration:function(t,e=!1){this.openConfigBase(t,e,s=>{this.applyConfig(s),this.startDate=s.startDate,this.startTime=s.startTime,this.endTime=s.endTime,this.endDate=s.endDate,this.saveDefaultConfig(this.currentConfig)})},saveConfiguration:function(t){let e=this.currentConfig;e.startDate=this.startDate,e.startTime=this.startTime,e.endTime=this.endTime,e.endDate=this.endDate,this.saveConfigBase(t,e)},addItem:function(t){for(const e of this.items)if(e.itemName===t.itemName&&e.packetName===t.packetName&&e.targetName===t.targetName&&e.valueType==="CONVERTED"&&e.reducedType==="SAMPLE"&&e.mode==="DECOM"){this.$notify.caution({body:"This item has already been added!"});return}t.cmdOrTlm=this.cmdOrTlm.toUpperCase(),t.edit=!1,t.valueType="CONVERTED",t.reducedType="SAMPLE",t.mode="DECOM",this.items.push(t)},deleteItem:function(t){let e=this.items.indexOf(t);this.items.splice(e,1)},deleteAll:function(){this.items=[]},editAllItems:function(){this.editAll=!1;for(let t of this.items)t.mode=this.allItemMode,t.valueType=this.allItemValueType,t.reducedType=this.allItemReducedType},getItemLabel:function(t){let e=[`${t.targetName} - ${t.packetName} - ${t.itemName}`];return t.mode!=="DECOM"&&e.push(`{ ${t.mode} }`),t.valueType!=="CONVERTED"&&e.push(`( ${t.valueType} )`),t.reducedType!=="SAMPLE"&&e.push(`[ ${t.reducedType} ]`),e.join(" ")},setTimestamps:function(){this.startDateTimeFilename=this.startDate+"_"+this.startTime,this.startDateTimeFilename=this.startDateTimeFilename.replace(/(:|-|\.)\s*/g,"_");let t,e;try{this.timeZone==="local"?(t=new Date(this.startDate+" "+this.startTime),e=new Date(this.endDate+" "+this.endTime)):(t=new Date(this.startDate+" "+this.startTime+"Z"),e=new Date(this.endDate+" "+this.endTime+"Z"),this.startDateTimeFilename+="_UTC")}catch{return}this.startDateTime=t.getTime()*1e6,this.endDateTime=e.getTime()*1e6},processItems:function(){if(this.processButtonText==="Cancel"){this.finished();return}if(this.setTimestamps(),!this.startDateTime||!this.endDateTime){this.$notify.caution({body:"Invalid date/time selected!"});return}if(this.startDateTime===this.endDateTime){this.$notify.caution({body:"Start date/time is equal to end date/time!"});return}if(this.endDateTime-this.startDateTime<0){this.$notify.caution({body:"Start date/time is greater then end date/time!"});return}new Date(this.endDateTime/1e6)>Date.now()&&this.$notify.caution({title:"Note",body:`End date/time is greater than current date/time. Data will
|
|
12
|
+
continue to stream in real-time until
|
|
13
|
+
${new Date(this.endDateTime/1e6).toISOString()} is reached.`}),this.progress=0,this.processButtonText="Cancel",this.cable.createSubscription("StreamingChannel",window.openc3Scope,{received:t=>this.received(t),connected:()=>this.onConnected(),disconnected:t=>{t.allowReconnect&&this.$notify.caution({body:"OpenC3 backend connection disconnected."})},rejected:()=>{this.$notify.caution({body:"OpenC3 backend connection rejected."})}}).then(t=>{this.subscription=t})},resetAllVars:function(){this.fileCount=0,this.totalPacketsReceived=0,this.totalItemsReceived=0,this.columnHeaders=[],this.columnMap={},this.keyMap={},this.resetPerFileVars()},resetPerFileVars:function(){Xe=[],this.packetsReceived=0,this.itemsReceived=0},onConnected:function(){this.resetAllVars();let t=[];this.items.forEach((e,s)=>{let r=`${e.mode}__${e.cmdOrTlm}__${e.targetName}__${e.packetName}__${e.itemName}__${e.valueType}`;e.reducedType!=="SAMPLE"&&(r=r+"__"+e.reducedType);let n=String(s);this.keyMap[n]=r,t.push([r,n])}),OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(e=>{e&&OpenC3Auth.setTokens(),this.subscription.perform("add",{scope:window.openc3Scope,token:localStorage.openc3Token,items:t,start_time:this.startDateTime,end_time:this.endDateTime})})},received:function(t){if(this.cable.recordPing(),t.error){this.$notify.serious({body:t.error});return}if(this.packetsReceived+=t.length,this.totalPacketsReceived+=t.length,t.length>0){let e=new Set;for(let n of t){let o=Object.keys(n);o.forEach(e.add,e);let i=o.filter(a=>a.startsWith("__")||a==="COSMOS_EXTRA").length;this.itemsReceived+=o.length-i,this.totalItemsReceived+=o.length-i}e.delete("__type"),e.delete("__time"),e.delete("COSMOS_EXTRA"),this.buildHeaders([...e]),Xe.push(t),this.progress=Math.ceil(100*(t[0].__time-this.startDateTime)/(this.endDateTime-this.startDateTime)),this.columnHeaders.length*this.packetsReceived+this.itemsReceived*8>1e8&&this.createFile()}else this.finished();t=null},buildHeaders:function(t){this.columnHeaders.length===0&&this.columnMode==="normal"&&(this.columnHeaders.push("TIME"),this.columnHeaders.push("TARGET"),this.columnHeaders.push("PACKET"),this.hasCommands&&(this.columnHeaders.push("USERNAME"),this.enterprise&&this.columnHeaders.push("APPROVER"))),t.forEach(e=>{if(e.slice(0,2)==="__"||this.columnMap[e])return;this.columnMap[e]=this.columnHeaders.length,e=this.keyMap[e]||e;const[s,r,n,o,i,a,c]=e.split("__");let u=i;this.columnMode==="full"&&(u=n+" "+o+" "+i),s&&s!=="DECOM"&&(u=u+" {"+s+"}"),a&&a!=="CONVERTED"&&(u=u+" ("+a+")"),c&&(u=u+" ["+c+"]"),this.columnHeaders.push(u)})},createFile:async function(){let t=Xe.flat(),e=this.columnHeaders,s=this.columnMap,r=[];this.resetPerFileVars();let n="";this.matlabHeader&&(n+="% "),n+=e.join(this.delimiter),r.push(n),await this.yieldToMain(),t.sort((b,x)=>b.__time-x.__time),await this.yieldToMain();let o=[],i=[],a=null,c=0;for(let b of t){let x=!1;this.fillDown&&a?i=[...a]:i=[];let h="";if(Object.keys(b).forEach(S=>{if(S.slice(0,2)==="__"||S==="COSMOS_EXTRA")return;h=S;let m=s[S];if(typeof b[S]=="object")if(b[S]===null)i[m]="";else if(Array.isArray(b[S]))i[m]='"['+b[S]+']"';else{let E=b[S].raw;if(Array.isArray(E)){let g="0x";E.forEach(O=>{g+=O.toString(16).padStart(2,"0").toUpperCase()}),i[m]=g}else i[m]="'"+E+"'"}else i[m]=b[S];this.uniqueOnly&&o[m]!==i[m]&&(x=!0),o[m]=i[m]}),this.fillDown&&(a=[...i]),!this.uniqueOnly||x){if(this.columnMode==="normal"){h=this.keyMap[h]||h;const[S,m,E,g,O,P,J]=h.split("__"),K=BigInt(b.__time),G=Number(K/1000000n),X=Number(K%1000000n),V=new Date(G).toISOString(),U=String(X).padStart(6,"0");if(i[0]=V.replace(/\.(\d{3})Z$/,(v,D)=>`.${D}${U}Z`),i[1]=E,i[2]=g,this.hasCommands){const v=b.COSMOS_EXTRA?JSON.parse(b.COSMOS_EXTRA):{};i[3]=v?.username||"",this.enterprise&&(i[4]=v?.approver||"")}}r.push(i.join(this.delimiter))}c+=1,c%1e3==0&&await this.yieldToMain()}let u=".csv",d="text/csv";this.delimiter===" "&&(u=".txt",d="text/tab-separated-values"),await this.yieldToMain();const p=new Blob([r.join(`
|
|
14
|
+
`)],{type:d});await this.yieldToMain();const y=document.createElement("a");y.href=URL.createObjectURL(p),y.setAttribute("download",this.startDateTimeFilename+"_"+this.fileCount+u),y.click(),this.fileCount+=1},yieldToMain:function(){return new Promise(t=>{setTimeout(t,0)})},finished:async function(){if(this.progress=95,this.subscription.unsubscribe(),Xe.length!==0)await this.createFile();else if(this.fileCount===0){let t=new Date(this.startDateTime/1e6).toISOString(),e=new Date(this.endDateTime/1e6).toISOString();this.$notify.caution({body:`No data found for the items in the requested time range of ${t} to ${e}`})}this.progress=100,this.processButtonText="Process"}}};function Xi(t,e,s,r,n,o){const i=C("top-bar"),a=C("v-text-field"),c=C("v-col"),u=C("OpenC3TimePicker"),d=C("v-row"),p=C("v-radio"),y=C("v-radio-group"),b=C("target-packet-item-chooser"),x=C("v-container"),h=C("v-progress-circular"),S=C("v-spacer"),m=C("v-btn"),E=C("v-toolbar"),g=C("v-card-title"),O=C("v-select"),P=C("v-card-text"),J=C("v-card-actions"),K=C("v-card"),G=C("v-dialog"),X=C("v-data-table"),V=C("open-config-dialog"),U=C("save-config-dialog");return k(),ne("div",null,[f(i,{menus:o.menus,title:n.title},null,8,["menus","title"]),f(K,null,{default:_(()=>[f(x,null,{default:_(()=>[f(d,null,{default:_(()=>[f(c,null,{default:_(()=>[f(a,{modelValue:n.startDate,"onUpdate:modelValue":e[0]||(e[0]=v=>n.startDate=v),label:"Start Date",type:"date",max:n.todaysDate,rules:[n.rules.required],"data-test":"start-date"},null,8,["modelValue","max","rules"])]),_:1}),f(c,null,{default:_(()=>[f(u,{modelValue:n.startTime,"onUpdate:modelValue":e[1]||(e[1]=v=>n.startTime=v),label:"Start Time",rules:[n.rules.required],"data-test":"start-time"},null,8,["modelValue","rules"])]),_:1}),f(c,null,{default:_(()=>[f(a,{modelValue:n.endDate,"onUpdate:modelValue":e[2]||(e[2]=v=>n.endDate=v),label:"End Date",type:"date",max:n.todaysDate,rules:[n.rules.required],"data-test":"end-date"},null,8,["modelValue","max","rules"])]),_:1}),f(c,null,{default:_(()=>[f(u,{modelValue:n.endTime,"onUpdate:modelValue":e[3]||(e[3]=v=>n.endTime=v),label:"End Time",rules:[n.rules.required],"data-test":"end-time"},null,8,["modelValue","rules"])]),_:1})]),_:1}),f(d,{"no-gutters":""},{default:_(()=>[f(c,null,{default:_(()=>[f(y,{modelValue:n.cmdOrTlm,"onUpdate:modelValue":e[4]||(e[4]=v=>n.cmdOrTlm=v),inline:"","hide-details":"",class:"mt-0"},{default:_(()=>[f(p,{label:"Command",value:"cmd","data-test":"cmd-radio"}),f(p,{label:"Telemetry",value:"tlm","data-test":"tlm-radio"})]),_:1},8,["modelValue"])]),_:1})]),_:1}),f(d,null,{default:_(()=>[f(c,null,{default:_(()=>[f(b,{"button-text":"Add Item",mode:n.cmdOrTlm,hidden:!0,"choose-item":"","allow-all":"","allow-glob":n.allowWildcards,"show-latest":"",onAddItem:e[5]||(e[5]=v=>o.addItem(v))},null,8,["mode","allow-glob"])]),_:1})]),_:1})]),_:1}),f(E,{class:"pl-3"},{default:_(()=>[f(h,{"model-value":n.progress},null,8,["model-value"]),H(" Processed: "+te(n.totalPacketsReceived)+" packets, "+te(n.totalItemsReceived)+" items ",1),f(S),f(m,{class:"bg-primary",disabled:n.items.length<1,onClick:o.processItems},{default:_(()=>[H(te(n.processButtonText),1)]),_:1},8,["disabled","onClick"]),f(S),f(m,{icon:"mdi-pencil-box-multiple",variant:"text",density:"compact",disabled:n.items.length<1,"data-test":"editAll","aria-label":"Edit All Items",onClick:e[6]||(e[6]=v=>n.editAll=!0)},null,8,["disabled"]),f(m,{icon:"mdi-delete-sweep",variant:"text",density:"compact",disabled:n.items.length<1,"data-test":"delete-all","aria-label":"Delete All Items",onClick:o.deleteAll},null,8,["disabled","onClick"])]),_:1}),f(K,{width:"100%"},{default:_(()=>[f(g,null,{default:_(()=>[e[18]||(e[18]=H(" Items ",-1)),f(S),f(a,{modelValue:n.search,"onUpdate:modelValue":e[7]||(e[7]=v=>n.search=v),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",class:"search"},null,8,["modelValue"])]),_:1}),f(X,{"items-per-page":n.itemsPerPage,"onUpdate:itemsPerPage":e[8]||(e[8]=v=>n.itemsPerPage=v),headers:n.headers,items:n.items,search:n.search,"items-per-page-options":[10,20,50,100,-1],"multi-sort":"",density:"compact"},{"item.edit":_(({item:v})=>[f(m,{icon:"mdi-pencil",variant:"text","data-test":"edit-row","aria-label":"Edit Item",onClick:Nt(D=>v.edit=!0,["stop"])},null,8,["onClick"]),f(G,{modelValue:v.edit,"onUpdate:modelValue":D=>v.edit=D,"max-width":"600",persistent:"",onKeydown:tt(D=>v.edit=!1,["esc"])},{default:_(()=>[f(K,null,{default:_(()=>[f(E,{height:"24"},{default:_(()=>[f(S),e[19]||(e[19]=De("span",null," DataExtractor: Edit Item Mode ",-1)),f(S)]),_:1}),f(P,null,{default:_(()=>[f(d,{class:"mt-3 title-font"},{default:_(()=>[f(c,null,{default:_(()=>[H(te(o.getItemLabel(v)),1)]),_:2},1024)]),_:2},1024),f(d,null,{default:_(()=>[f(c,null,{default:_(()=>[f(O,{modelValue:v.mode,"onUpdate:modelValue":D=>v.mode=D,"hide-details":"",items:n.modes,label:"Mode",variant:"outlined"},null,8,["modelValue","onUpdate:modelValue","items"])]),_:2},1024)]),_:2},1024),f(d,null,{default:_(()=>[f(c,null,{default:_(()=>[f(O,{modelValue:v.valueType,"onUpdate:modelValue":D=>v.valueType=D,"hide-details":"",items:n.valueTypes,label:"Value Type",variant:"outlined"},null,8,["modelValue","onUpdate:modelValue","items"])]),_:2},1024)]),_:2},1024),f(d,null,{default:_(()=>[f(c,null,{default:_(()=>[f(O,{modelValue:v.reducedType,"onUpdate:modelValue":D=>v.reducedType=D,"hide-details":"",items:n.reducedTypes,label:"Reduced Type",variant:"outlined"},null,8,["modelValue","onUpdate:modelValue","items"])]),_:2},1024)]),_:2},1024)]),_:2},1024),f(J,{class:"px-6 py-3"},{default:_(()=>[f(S),f(m,{variant:"flat",onClick:D=>v.edit=!1},{default:_(()=>[...e[20]||(e[20]=[H(" Close ",-1)])]),_:1},8,["onClick"])]),_:2},1024)]),_:2},1024)]),_:2},1032,["modelValue","onUpdate:modelValue","onKeydown"])]),"item.delete":_(({item:v})=>[f(m,{icon:"mdi-delete",variant:"text","data-test":"delete-row","aria-label":"Delete Item",onClick:D=>o.deleteItem(v)},null,8,["onClick"])]),_:1},8,["items-per-page","headers","items","search"])]),_:1})]),_:1}),f(G,{modelValue:n.editAll,"onUpdate:modelValue":e[14]||(e[14]=v=>n.editAll=v),"max-width":"600",persistent:"",onKeydown:e[15]||(e[15]=tt(v=>n.editAll=!1,["esc"]))},{default:_(()=>[f(K,null,{default:_(()=>[f(E,{height:"24"},{default:_(()=>[f(S),e[21]||(e[21]=De("span",null," DataExtractor: Edit All Items",-1)),f(S)]),_:1}),f(P,null,{default:_(()=>[f(d,{class:"mt-3"},{default:_(()=>[f(c,null,{default:_(()=>[...e[22]||(e[22]=[H(" This will change all items to the following data type! ",-1)])]),_:1})]),_:1}),f(d,null,{default:_(()=>[f(c,null,{default:_(()=>[f(O,{modelValue:n.allItemMode,"onUpdate:modelValue":e[9]||(e[9]=v=>n.allItemMode=v),"hide-details":"",items:n.modes,label:"Mode",variant:"outlined"},null,8,["modelValue","items"])]),_:1})]),_:1}),f(d,null,{default:_(()=>[f(c,null,{default:_(()=>[f(O,{modelValue:n.allItemValueType,"onUpdate:modelValue":e[10]||(e[10]=v=>n.allItemValueType=v),"hide-details":"",items:n.valueTypes,label:"Value Type",variant:"outlined"},null,8,["modelValue","items"])]),_:1})]),_:1}),f(d,null,{default:_(()=>[f(c,null,{default:_(()=>[f(O,{modelValue:n.allItemReducedType,"onUpdate:modelValue":e[11]||(e[11]=v=>n.allItemReducedType=v),"hide-details":"",items:n.reducedTypes,label:"Reduced Type",variant:"outlined"},null,8,["modelValue","items"])]),_:1})]),_:1})]),_:1}),f(J,{class:"px-6 py-3"},{default:_(()=>[f(S),f(m,{variant:"outlined",onClick:e[12]||(e[12]=v=>n.editAll=!1)},{default:_(()=>[...e[23]||(e[23]=[H(" Cancel ",-1)])]),_:1}),f(m,{variant:"flat",disabled:!n.allItemValueType,onClick:e[13]||(e[13]=v=>o.editAllItems())},{default:_(()=>[...e[24]||(e[24]=[H(" Ok ",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["modelValue"]),n.openConfig?(k(),L(V,{key:0,modelValue:n.openConfig,"onUpdate:modelValue":e[16]||(e[16]=v=>n.openConfig=v),"config-key":n.configKey,onSuccess:o.openConfiguration},null,8,["modelValue","config-key","onSuccess"])):he("",!0),n.saveConfig?(k(),L(U,{key:1,modelValue:n.saveConfig,"onUpdate:modelValue":e[17]||(e[17]=v=>n.saveConfig=v),"config-key":n.configKey,onSuccess:o.saveConfiguration},null,8,["modelValue","config-key","onSuccess"])):he("",!0)])}const go=Vs("default",Ct(Ki,[["render",Xi],["__scopeId","data-v-eb45238b"]]))})}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./Widget-
|
|
1
|
+
System.register(["./Widget-BiaunQ83-decc581ca3ab27c1b845.js","./main-bd615259325517ea1b6f.js","vue","vue-router","pinia","single-spa","vuetify"],(function(d,V){"use strict";var l,a,n,r,s,u,i;return{setters:[e=>{l=e.h},e=>{a=e.d,n=e.R},e=>{r=e.resolveComponent,s=e.openBlock,u=e.createBlock,i=e.normalizeStyle},null,null,null,null],execute:(function(){const e={mixins:[l,n],data(){return{label:"Date",dateValue:""}},created(){this.parameters[0]&&(this.label=this.parameters[0]),this.dateValue=this.formatDate(new Date,this.screenTimeZone)},methods:{text(){return this.dateValue},date(){return this.dateValue}}};function c(h,o,v,y,t,b){const m=r("v-text-field");return s(),u(m,{modelValue:t.dateValue,"onUpdate:modelValue":o[0]||(o[0]=p=>t.dateValue=p),label:t.label,style:i(h.computedStyle),type:"date","hide-details":""},null,8,["modelValue","label","style"])}const f=d("default",a(e,[["render",c]]))})}}));
|