openc3-cosmos-tool-cmdtlmserver 6.0.2 → 6.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/tools/cmdtlmserver/ArrayWidget-DzHELdHv-1cfde870ea63d4573d20.js +2 -0
- data/tools/cmdtlmserver/ArrayplotWidget-BDvziGSm-e2d9fd0c66b39266dc7c.js +1 -0
- data/tools/cmdtlmserver/{BarColumn-B6tCmNJm-6eff86fdc1e74ef6f1c9.js → BarColumn-CNhS2KKq-767c9486a4e443c42bc7.js} +1 -1
- data/tools/cmdtlmserver/BlockWidget-D0On4x3d-54b0f07404fece73b33e.js +2 -0
- data/tools/cmdtlmserver/{ButtonWidget-CHrHS_Bw-70e879d3bbdf933eb10a.js → ButtonWidget-BOYLHMt4-6ab7fb97fe052d8802a6.js} +2 -2
- data/tools/cmdtlmserver/CanvasWidget-CQIqiLEy-8134fbc55f313a763f32.js +1 -0
- data/tools/cmdtlmserver/CanvasdotWidget-BVWutPMF-f506e882c3236b53896a.js +1 -0
- data/tools/cmdtlmserver/{CanvasimageWidget-BrYlPQCf-c9b4b7ca9e5b29f12d09.js → CanvasimageWidget-ayu_ASKf-7b3ed2be4b78024a32e9.js} +1 -1
- data/tools/cmdtlmserver/{CanvasimagevalueWidget-HnEOXmZy-5583c55cf5bbdfadba5d.js → CanvasimagevalueWidget-mv319g5T-deaaf709ef21cf5db0e9.js} +1 -1
- data/tools/cmdtlmserver/CanvaslabelWidget-BNjbXDb8-8ceda00adbbd3da999d4.js +1 -0
- data/tools/cmdtlmserver/{CanvaslabelvalueWidget-0zRDJav3-293602564dbb12cd36fd.js → CanvaslabelvalueWidget-CrhPwTSP-44116d33f8a81a77b89e.js} +1 -1
- data/tools/cmdtlmserver/CanvaslineWidget--HdKH6oO-72eb687891a0213a981a.js +1 -0
- data/tools/cmdtlmserver/CanvaslinevalueWidget-CJsuF6RY-ce76d2dccf8f9edc4699.js +1 -0
- data/tools/cmdtlmserver/CheckbuttonWidget-CQ2HlgIk-c98446c9ffe1e6405baa.js +1 -0
- data/tools/cmdtlmserver/{CmdPacketsTab-1174eeae24f567559f43.js → CmdPacketsTab-2c0c4903f7cd5e2d492f.js} +1 -1
- data/tools/cmdtlmserver/{CmdTlmServer-909a975f2c448b6dfdd9.js → CmdTlmServer-d13edb0abf2c53a5bcbf.js} +1 -1
- data/tools/cmdtlmserver/ComboboxWidget-BxILACwz-cfb4c1ffd4cb57d959ac.js +1 -0
- data/tools/cmdtlmserver/{DateWidget-FtYD86xW-eee42f7093a7d5232e7e.js → DateWidget-CIkO0xqH-d3da4940b3f961694415.js} +1 -1
- data/tools/cmdtlmserver/{DetailsDialog-DiVcC3Fg-926dc00ae99f202f7bbb.js → DetailsDialog-DyGpm5TP-c2adbdd157ab5f884f6f.js} +1 -1
- data/tools/cmdtlmserver/{DynamicWidget-m9EliUR2-b792f7d3791995de4557.js → DynamicWidget-gFSYxzvT-c7ac8d6e5d3f41824765.js} +1 -1
- data/tools/cmdtlmserver/{FormatvalueWidget-OykwwCrw-ec440c1e59a54a11e1c0.js → FormatvalueWidget-D8-EO_3E-2503055f4eccb3a4b79e.js} +1 -1
- data/tools/cmdtlmserver/Graph-EV7oK3qM-f7f07aa312f5934b97f9.js +1 -0
- data/tools/cmdtlmserver/GraphWidget-BTNYbd21-fbea3cc94b9a4190d464.js +1 -0
- data/tools/cmdtlmserver/{HorizontalWidget-B7YdcFVN-1adf1fbb47940ffc2bbb.js → HorizontalWidget-Bp-qtqoh-5637173d360666d3182e.js} +1 -1
- data/tools/cmdtlmserver/HorizontalboxWidget-CrJuGY3s-e2fe9300840c97ddddef.js +1 -0
- data/tools/cmdtlmserver/HorizontallineWidget-CbxREBYI-61a8a8088971c3f08034.js +1 -0
- data/tools/cmdtlmserver/{IframeWidget-0C7GYEVc-7d9db206f561f13924bb.js → IframeWidget-DusiWNNj-32cb5541afdd5fe67f67.js} +1 -1
- data/tools/cmdtlmserver/ImageLoader-BapCB-Li-f461eddb2af2e265fd48.js +1 -0
- data/tools/cmdtlmserver/{ImageviewerWidget-B4HbUIfR-cc56d18d351a216f45dc.js → ImageviewerWidget-c0gJ9VDC-5af6501486a08bc8532e.js} +1 -1
- data/tools/cmdtlmserver/{InterfacesTab-1a220be708030742672f.js → InterfacesTab-d900a3491d1da534368e.js} +1 -1
- data/tools/cmdtlmserver/{LabelWidget-D1JhQAzR-637ca102152e7cb0159f.js → LabelWidget-pPgc0ve3-a8c20e96febfb654ebbc.js} +1 -1
- data/tools/cmdtlmserver/{LabelledWidget-C2VGJ5OJ-63324f13b32cbd3d1e09.js → LabelledWidget-CkNjby55-17d35c79064d8ced688b.js} +1 -1
- data/tools/cmdtlmserver/{LabelprogressbarWidget-DN0cAeLK-9414ccaa3c0bd5213eaf.js → LabelprogressbarWidget-e2R2yQKw-32ba7d925d5938b9e647.js} +1 -1
- data/tools/cmdtlmserver/LabelsparklineWidget-D7MQ_oNw-6b2f73958f78cd48cf72.js +1 -0
- data/tools/cmdtlmserver/LabelvalueWidget-4DShBBvr-2989613328b42b690607.js +1 -0
- data/tools/cmdtlmserver/{LabelvaluedescWidget-DtJwggDu-297f5e4f5cdd4e997a84.js → LabelvaluedescWidget-Z1m8Bi6N-84bd53d94bc877e5a83b.js} +1 -1
- data/tools/cmdtlmserver/LabelvaluelimitsbarWidget-DVa-oYxU-65dac25a645be58bc69d.js +1 -0
- data/tools/cmdtlmserver/LabelvaluelimitscolumnWidget-DduuX632-da2af8fa3f16e0ca4bc6.js +1 -0
- data/tools/cmdtlmserver/{LabelvaluerangebarWidget-DCJ42bmf-951b68255fe130b397b4.js → LabelvaluerangebarWidget-BR9vXOlt-b683cd94686b6a02b94f.js} +1 -1
- data/tools/cmdtlmserver/{Layout-D4YBjuWs-d949f0668cb092f7f268.js → Layout-Bk8EGxbP-aa19b0fb74b246a1ce88.js} +1 -1
- data/tools/cmdtlmserver/LedWidget-f7bf8ls_-dc76da1106f2ea6ba1c1.js +1 -0
- data/tools/cmdtlmserver/{LimitsbarWidget-D-wfz_St-71b4065ff350d86e47f1.js → LimitsbarWidget-B7fHaDcJ-6401cd1dca32d9d23e9d.js} +1 -1
- data/tools/cmdtlmserver/{LimitscolorWidget-B0AVGdkz-8af3823cc815001ee996.js → LimitscolorWidget-CpC4D_TC-fa80d8dccfdbce9a3085.js} +1 -1
- data/tools/cmdtlmserver/{LimitscolumnWidget-Dt5ce4hN-4bf9236958883e049ac5.js → LimitscolumnWidget-C9FbNC-U-69b1a5ce1e37519311a9.js} +1 -1
- data/tools/cmdtlmserver/LinegraphWidget-DkWDQ_3K-a2e11e9260d6be61a562.js +1 -0
- data/tools/cmdtlmserver/{MatrixbycolumnsWidget-wLx4NvXV-789df70ba148ac45d935.js → MatrixbycolumnsWidget-CHJDyYa3-e7cbac8e29ec890726df.js} +1 -1
- data/tools/cmdtlmserver/{ProgressbarWidget-B7l0BBiX-28bb09016921e507b157.js → ProgressbarWidget-CRZDxClT-97ca0eb1a7d82a61f1bf.js} +1 -1
- data/tools/cmdtlmserver/RadiobuttonWidget-BW4yFweH-303da45be9f3bc5c02ef.js +1 -0
- data/tools/cmdtlmserver/{RadiogroupWidget-Busjqikr-fdbbff7df3b152de9174.js → RadiogroupWidget-_0bVCHjr-21b6a6a889648dc39713.js} +1 -1
- data/tools/cmdtlmserver/{RangebarWidget-DbYrwEfC-672c02ff8fc7508bbfe0.js → RangebarWidget-CEQFiG4l-88e919bc219c10974ea9.js} +1 -1
- data/tools/cmdtlmserver/{RawDialog-3ba881626e2141cf6261.js → RawDialog-4fc24b3a5134f08b5233.js} +3 -3
- data/tools/cmdtlmserver/{RollupWidget-rKxLXuCv-84804fdfa2a67e0c586f.js → RollupWidget-579c7y0R-6dc6a63ce8ba38021e87.js} +1 -1
- data/tools/cmdtlmserver/{RoutersTab-821ac863905d6fc1f0f3.js → RoutersTab-bd726501304a35125437.js} +1 -1
- data/tools/cmdtlmserver/ScrollwindowWidget-Kcre9gM3-a4242c83569b10650eb0.js +1 -0
- data/tools/cmdtlmserver/{SignalWidget-h-oivReC-a52944079f1106d5b9e8.js → SignalWidget-D55Myd0q-82abf10be1d381cebe25.js} +1 -1
- data/tools/cmdtlmserver/{SpacerWidget-BSy9eOlB-d21cb40c89cf46239df2.js → SpacerWidget-DBDv_w_s-1a2edb5ee70ddb76a3b2.js} +1 -1
- data/tools/cmdtlmserver/SparklineWidget-DJvIL24z-aca49e14883f617297b1.js +1 -0
- data/tools/cmdtlmserver/{StatusTab-4f20ea8483d65cd2f43f.js → StatusTab-70f7f21eb7f45c574053.js} +1 -1
- data/tools/cmdtlmserver/TabbookWidget-DH9DHnp1-f9eb87a79548613c9d87.js +1 -0
- data/tools/cmdtlmserver/{TargetsTab-45e297b994fc5f0d21d0.js → TargetsTab-7af853e3096b44615549.js} +1 -1
- data/tools/cmdtlmserver/TextboxWidget-DCjIEzJn-1d6d9572908a65421217.js +1 -0
- data/tools/cmdtlmserver/{TextfieldWidget-aVRdXRsT-6158511014a61f90ddea.js → TextfieldWidget-BRQ6oPzR-fe6ec784f241da3b1dfb.js} +1 -1
- data/tools/cmdtlmserver/{TimeWidget-BE2rtMxg-26adb974402be26d1aaf.js → TimeWidget-pXtrK5IC-93e17a05d6ecf2eccade.js} +1 -1
- data/tools/cmdtlmserver/TitleWidget-CfAa2SyT-e9f3d1a8a71d4118fdd9.js +1 -0
- data/tools/cmdtlmserver/{TlmPacketsTab-b9aab218beb2e197b269.js → TlmPacketsTab-60a107b4ac232aac2322.js} +1 -1
- data/tools/cmdtlmserver/{Updater-6f453064b0e1f1f5fb0e.js → Updater-ebc27e8a2a7fdd687c65.js} +1 -1
- data/tools/cmdtlmserver/VWidget-CN_afCKJ-b8a49f5b611e52c35dd5.js +1 -0
- data/tools/cmdtlmserver/ValueWidget-DIFivXw_-c4ebf34840bab5aca614.js +1 -0
- data/tools/cmdtlmserver/ValuelimitsbarWidget-Cb7_SIUF-dd0cab6a7600b9eb6fc8.js +1 -0
- data/tools/cmdtlmserver/ValuelimitscolumnWidget-D8bgZ7YP-cc6ddac478a316c83821.js +1 -0
- data/tools/cmdtlmserver/ValuerangebarWidget-VKygtFwP-545f2608d522c90b483d.js +1 -0
- data/tools/cmdtlmserver/{VerticalWidget-DziyURNu-750d852c42a2d5f2f703.js → VerticalWidget-BuvedA_b-b5c11afb3b194946a478.js} +1 -1
- data/tools/cmdtlmserver/VerticalboxWidget-D_LcL3GF-ff10f59775ba060533af.js +1 -0
- data/tools/cmdtlmserver/{Widget-C7ms_xDE-bce61b3f1521054f57a4.js → Widget-CERFa1CU-5311b94ad21a3c7b3574.js} +1 -1
- data/tools/cmdtlmserver/main-30c8b9128a62bc0a519c.js +1422 -0
- data/tools/cmdtlmserver/main.js +1 -1
- data/tools/cmdtlmserver/services-7ecf8098cef34840e93e.js +6 -0
- metadata +78 -76
- data/tools/cmdtlmserver/ArrayWidget-DBpEoQ1y-84132d15e020efa0adf1.js +0 -2
- data/tools/cmdtlmserver/BlockWidget-Bmi0UcUW-c8722bb58622a8814b0b.js +0 -2
- data/tools/cmdtlmserver/CanvasWidget-BqdyLbQz-184dc2d3c4b6c7ab6bf0.js +0 -1
- data/tools/cmdtlmserver/CanvasdotWidget-YYwca104-4fffaf81ed40b0efed4b.js +0 -1
- data/tools/cmdtlmserver/CanvaslabelWidget-BfMHNei--81068b9cfc5ea4370382.js +0 -1
- data/tools/cmdtlmserver/CanvaslineWidget-BmOwJP_G-b2f20a0461abbe1c4aec.js +0 -1
- data/tools/cmdtlmserver/CanvaslinevalueWidget-H3L1aUKM-6eb08878d7d5720ce613.js +0 -1
- data/tools/cmdtlmserver/CheckbuttonWidget-BnT9X7wE-5f6d8077e8d80b62862c.js +0 -1
- data/tools/cmdtlmserver/ComboboxWidget-BykAAoxH-b67d237b4347e57c1776.js +0 -1
- data/tools/cmdtlmserver/GraphWidget-BohHW-97-79648f0f5f760947a337.js +0 -1
- data/tools/cmdtlmserver/HorizontalboxWidget-D-kCNwI3-d5280f31e632d3a19530.js +0 -1
- data/tools/cmdtlmserver/HorizontallineWidget-BdlNB951-97bac9ec958ae9185006.js +0 -1
- data/tools/cmdtlmserver/ImageLoader-y6fAZe9P-32c5109a53a2e67d4546.js +0 -1
- data/tools/cmdtlmserver/LabelsparklineWidget--sxBENxs-9bbfaf33dcea3a9a4163.js +0 -1
- data/tools/cmdtlmserver/LabelvalueWidget-BWpP5KX6-e70143eae4825e3ca295.js +0 -1
- data/tools/cmdtlmserver/LabelvaluelimitsbarWidget-Bj6UVK-5-d0e6cb1105035131b388.js +0 -1
- data/tools/cmdtlmserver/LabelvaluelimitscolumnWidget-BVcEEcUx-5ffbd14ed49f43d1a770.js +0 -1
- data/tools/cmdtlmserver/LedWidget-hN9JHxjr-d3630538860ea110829a.js +0 -1
- data/tools/cmdtlmserver/LinegraphWidget-CTjtvtPd-3472bcb2292fccce0780.js +0 -1
- data/tools/cmdtlmserver/RadiobuttonWidget-B032jKIw-751b0da1a0eac1f428eb.js +0 -1
- data/tools/cmdtlmserver/ScrollwindowWidget-D4NKIzQO-e7fc825a7640800925b3.js +0 -1
- data/tools/cmdtlmserver/SparklineWidget-C9vdxar--5fe9233f121a11766f79.js +0 -1
- data/tools/cmdtlmserver/TabbookWidget-DTFTKURm-8a001c50117950e4dff3.js +0 -1
- data/tools/cmdtlmserver/TextboxWidget-BZyYHmBq-69732416c05b62947a52.js +0 -1
- data/tools/cmdtlmserver/TitleWidget-BB29MZb2-2f453a7f1f364727debd.js +0 -1
- data/tools/cmdtlmserver/VWidget-CGdM4sTw-a078921174583b0d9185.js +0 -1
- data/tools/cmdtlmserver/ValueWidget-h3905woQ-9b7964d625c1c99b145b.js +0 -1
- data/tools/cmdtlmserver/ValuelimitsbarWidget-LMXYjWtS-c85b0d0fb89533be596b.js +0 -1
- data/tools/cmdtlmserver/ValuelimitscolumnWidget-gA3ZcfAT-faa7e73a393653ce138d.js +0 -1
- data/tools/cmdtlmserver/ValuerangebarWidget-DwZ9KQ0O-1b288730ccf9a87d6d8f.js +0 -1
- data/tools/cmdtlmserver/VerticalboxWidget-OcoZBsFU-b0a8579fcda69ee76cfc.js +0 -1
- data/tools/cmdtlmserver/main-fcf5991e219cb9464cd3.js +0 -1422
- data/tools/cmdtlmserver/services-d6821e5ba7167450844f.js +0 -6
data/tools/cmdtlmserver/main.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
System.register(["vue","./main-
|
1
|
+
System.register(["vue","./main-30c8b9128a62bc0a519c.js","vue-router","single-spa","vuex","vuetify"],function(t,e){"use strict";return{setters:[null,u=>{t({bootstrap:u.b,mount:u.m,unmount:u.d})},null,null,null,null],execute:function(){}}});
|
@@ -0,0 +1,6 @@
|
|
1
|
+
System.register([],function(ae,Ur){"use strict";return{execute:function(){var vt=Object.defineProperty,Ot=(t,e,n)=>e in t?vt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,le=(t,e,n)=>Ot(t,typeof e!="symbol"?e+"":e,n);function Ae(t,e){return function(){return t.apply(e,arguments)}}const{toString:Tt}=Object.prototype,{getPrototypeOf:ue}=Object,G=(t=>e=>{const n=Tt.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),v=t=>(t=t.toLowerCase(),e=>G(e)===t),X=t=>e=>typeof e===t,{isArray:D}=Array,z=X("undefined");function At(t){return t!==null&&!z(t)&&t.constructor!==null&&!z(t.constructor)&&x(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Pe=v("ArrayBuffer");function Pt(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Pe(t.buffer),e}const Ct=X("string"),x=X("function"),Ce=X("number"),Q=t=>t!==null&&typeof t=="object",kt=t=>t===!0||t===!1,Y=t=>{if(G(t)!=="object")return!1;const e=ue(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},jt=v("Date"),It=v("File"),Nt=v("Blob"),Lt=v("FileList"),Ut=t=>Q(t)&&x(t.pipe),Ft=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||x(t.append)&&((e=G(t))==="formdata"||e==="object"&&x(t.toString)&&t.toString()==="[object FormData]"))},qt=v("URLSearchParams"),[Dt,Bt,$t,Mt]=["ReadableStream","Request","Response","Headers"].map(v),zt=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function H(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,s;if(typeof t!="object"&&(t=[t]),D(t))for(r=0,s=t.length;r<s;r++)e.call(null,t[r],r,t);else{const i=n?Object.getOwnPropertyNames(t):Object.keys(t),o=i.length;let a;for(r=0;r<o;r++)a=i[r],e.call(null,t[a],a,t)}}function ke(t,e){e=e.toLowerCase();const n=Object.keys(t);let r=n.length,s;for(;r-- >0;)if(s=n[r],e===s.toLowerCase())return s;return null}const N=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,je=t=>!z(t)&&t!==N;function he(){const{caseless:t}=je(this)&&this||{},e={},n=(r,s)=>{const i=t&&ke(e,s)||s;Y(e[i])&&Y(r)?e[i]=he(e[i],r):Y(r)?e[i]=he({},r):D(r)?e[i]=r.slice():e[i]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&H(arguments[r],n);return e}const Ht=(t,e,n,{allOwnKeys:r}={})=>(H(e,(s,i)=>{n&&x(s)?t[i]=Ae(s,n):t[i]=s},{allOwnKeys:r}),t),Wt=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Vt=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},Jt=(t,e,n,r)=>{let s,i,o;const a={};if(e=e||{},t==null)return e;do{for(s=Object.getOwnPropertyNames(t),i=s.length;i-- >0;)o=s[i],(!r||r(o,t,e))&&!a[o]&&(e[o]=t[o],a[o]=!0);t=n!==!1&&ue(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},Kt=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},Gt=t=>{if(!t)return null;if(D(t))return t;let e=t.length;if(!Ce(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},Xt=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&ue(Uint8Array)),Qt=(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=n.next())&&!r.done;){const s=r.value;e.call(t,s[0],s[1])}},Yt=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},Zt=v("HTMLFormElement"),en=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,n,r){return n.toUpperCase()+r}),Ie=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),tn=v("RegExp"),Ne=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};H(n,(s,i)=>{let o;(o=e(s,i,t))!==!1&&(r[i]=o||s)}),Object.defineProperties(t,r)},nn=t=>{Ne(t,(e,n)=>{if(x(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(x(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},rn=(t,e)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return D(t)?r(t):r(String(t).split(e)),n},sn=()=>{},on=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,de="abcdefghijklmnopqrstuvwxyz",Le="0123456789",Ue={DIGIT:Le,ALPHA:de,ALPHA_DIGIT:de+de.toUpperCase()+Le},cn=(t=16,e=Ue.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function an(t){return!!(t&&x(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const ln=t=>{const e=new Array(10),n=(r,s)=>{if(Q(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[s]=r;const i=D(r)?[]:{};return H(r,(o,a)=>{const u=n(o,s+1);!z(u)&&(i[a]=u)}),e[s]=void 0,i}}return r};return n(t,0)},un=v("AsyncFunction"),hn=t=>t&&(Q(t)||x(t))&&x(t.then)&&x(t.catch),Fe=((t,e)=>t?setImmediate:e?((n,r)=>(N.addEventListener("message",({source:s,data:i})=>{s===N&&i===n&&r.length&&r.shift()()},!1),s=>{r.push(s),N.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",x(N.postMessage)),dn=typeof queueMicrotask<"u"?queueMicrotask.bind(N):typeof process<"u"&&process.nextTick||Fe,c={isArray:D,isArrayBuffer:Pe,isBuffer:At,isFormData:Ft,isArrayBufferView:Pt,isString:Ct,isNumber:Ce,isBoolean:kt,isObject:Q,isPlainObject:Y,isReadableStream:Dt,isRequest:Bt,isResponse:$t,isHeaders:Mt,isUndefined:z,isDate:jt,isFile:It,isBlob:Nt,isRegExp:tn,isFunction:x,isStream:Ut,isURLSearchParams:qt,isTypedArray:Xt,isFileList:Lt,forEach:H,merge:he,extend:Ht,trim:zt,stripBOM:Wt,inherits:Vt,toFlatObject:Jt,kindOf:G,kindOfTest:v,endsWith:Kt,toArray:Gt,forEachEntry:Qt,matchAll:Yt,isHTMLForm:Zt,hasOwnProperty:Ie,hasOwnProp:Ie,reduceDescriptors:Ne,freezeMethods:nn,toObjectSet:rn,toCamelCase:en,noop:sn,toFiniteNumber:on,findKey:ke,global:N,isContextDefined:je,ALPHABET:Ue,generateString:cn,isSpecCompliantForm:an,toJSONObject:ln,isAsyncFn:un,isThenable:hn,setImmediate:Fe,asap:dn};function p(t,e,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}c.inherits(p,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:c.toJSONObject(this.config),code:this.code,status:this.status}}});const qe=p.prototype,De={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{De[t]={value:t}}),Object.defineProperties(p,De),Object.defineProperty(qe,"isAxiosError",{value:!0}),p.from=(t,e,n,r,s,i)=>{const o=Object.create(qe);return c.toFlatObject(t,o,function(a){return a!==Error.prototype},a=>a!=="isAxiosError"),p.call(o,t.message,e,n,r,s),o.cause=t,o.name=t.name,i&&Object.assign(o,i),o};const fn=null;function fe(t){return c.isPlainObject(t)||c.isArray(t)}function Be(t){return c.endsWith(t,"[]")?t.slice(0,-2):t}function $e(t,e,n){return t?t.concat(e).map(function(r,s){return r=Be(r),!n&&s?"["+r+"]":r}).join(n?".":""):e}function pn(t){return c.isArray(t)&&!t.some(fe)}const gn=c.toFlatObject(c,{},null,function(t){return/^is[A-Z]/.test(t)});function Z(t,e,n){if(!c.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=c.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(d,b){return!c.isUndefined(b[d])});const r=n.metaTokens,s=n.visitor||l,i=n.dots,o=n.indexes,a=(n.Blob||typeof Blob<"u"&&Blob)&&c.isSpecCompliantForm(e);if(!c.isFunction(s))throw new TypeError("visitor must be a function");function u(d){if(d===null)return"";if(c.isDate(d))return d.toISOString();if(!a&&c.isBlob(d))throw new p("Blob is not supported. Use a Buffer instead.");return c.isArrayBuffer(d)||c.isTypedArray(d)?a&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function l(d,b,f){let S=d;if(d&&!f&&typeof d=="object"){if(c.endsWith(b,"{}"))b=r?b:b.slice(0,-2),d=JSON.stringify(d);else if(c.isArray(d)&&pn(d)||(c.isFileList(d)||c.endsWith(b,"[]"))&&(S=c.toArray(d)))return b=Be(b),S.forEach(function(y,_){!(c.isUndefined(y)||y===null)&&e.append(o===!0?$e([b],_,i):o===null?b:b+"[]",u(y))}),!1}return fe(d)?!0:(e.append($e(f,b,i),u(d)),!1)}const h=[],g=Object.assign(gn,{defaultVisitor:l,convertValue:u,isVisitable:fe});function m(d,b){if(!c.isUndefined(d)){if(h.indexOf(d)!==-1)throw Error("Circular reference detected in "+b.join("."));h.push(d),c.forEach(d,function(f,S){(!(c.isUndefined(f)||f===null)&&s.call(e,f,c.isString(S)?S.trim():S,b,g))===!0&&m(f,b?b.concat(S):[S])}),h.pop()}}if(!c.isObject(t))throw new TypeError("data must be an object");return m(t),e}function Me(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function pe(t,e){this._pairs=[],t&&Z(t,this,e)}const ze=pe.prototype;ze.append=function(t,e){this._pairs.push([t,e])},ze.toString=function(t){const e=t?function(n){return t.call(this,n,Me)}:Me;return this._pairs.map(function(n){return e(n[0])+"="+e(n[1])},"").join("&")};function mn(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function He(t,e,n){if(!e)return t;const r=n&&n.encode||mn;c.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let i;if(s?i=s(e,n):i=c.isURLSearchParams(e)?e.toString():new pe(e,n).toString(r),i){const o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class We{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){c.forEach(this.handlers,function(n){n!==null&&e(n)})}}const Ve={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},bn=typeof URLSearchParams<"u"?URLSearchParams:pe,_n=typeof FormData<"u"?FormData:null,yn=typeof Blob<"u"?Blob:null,wn={isBrowser:!0,classes:{URLSearchParams:bn,FormData:_n,Blob:yn},protocols:["http","https","file","blob","url","data"]},ge=typeof window<"u"&&typeof document<"u",me=typeof navigator=="object"&&navigator||void 0,En=ge&&(!me||["ReactNative","NativeScript","NS"].indexOf(me.product)<0),Sn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Rn=ge&&window.location.href||"http://localhost",xn=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ge,hasStandardBrowserEnv:En,hasStandardBrowserWebWorkerEnv:Sn,navigator:me,origin:Rn},Symbol.toStringTag,{value:"Module"})),E={...xn,...wn};function vn(t,e){return Z(t,new E.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,i){return E.isNode&&c.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}function On(t){return c.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Tn(t){const e={},n=Object.keys(t);let r;const s=n.length;let i;for(r=0;r<s;r++)i=n[r],e[i]=t[i];return e}function Je(t){function e(n,r,s,i){let o=n[i++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),u=i>=n.length;return o=!o&&c.isArray(s)?s.length:o,u?(c.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!a):((!s[o]||!c.isObject(s[o]))&&(s[o]=[]),e(n,r,s[o],i)&&c.isArray(s[o])&&(s[o]=Tn(s[o])),!a)}if(c.isFormData(t)&&c.isFunction(t.entries)){const n={};return c.forEachEntry(t,(r,s)=>{e(On(r),s,n,0)}),n}return null}function An(t,e,n){if(c.isString(t))try{return(e||JSON.parse)(t),c.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const W={transitional:Ve,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,s=c.isObject(t);if(s&&c.isHTMLForm(t)&&(t=new FormData(t)),c.isFormData(t))return r?JSON.stringify(Je(t)):t;if(c.isArrayBuffer(t)||c.isBuffer(t)||c.isStream(t)||c.isFile(t)||c.isBlob(t)||c.isReadableStream(t))return t;if(c.isArrayBufferView(t))return t.buffer;if(c.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return vn(t,this.formSerializer).toString();if((i=c.isFileList(t))||n.indexOf("multipart/form-data")>-1){const o=this.env&&this.env.FormData;return Z(i?{"files[]":t}:t,o&&new o,this.formSerializer)}}return s||r?(e.setContentType("application/json",!1),An(t)):t}],transformResponse:[function(t){const e=this.transitional||W.transitional,n=e&&e.forcedJSONParsing,r=this.responseType==="json";if(c.isResponse(t)||c.isReadableStream(t))return t;if(t&&c.isString(t)&&(n&&!this.responseType||r)){const s=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(i){if(s)throw i.name==="SyntaxError"?p.from(i,p.ERR_BAD_RESPONSE,this,null,this.response):i}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:E.classes.FormData,Blob:E.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};c.forEach(["delete","get","head","post","put","patch"],t=>{W.headers[t]={}});const Pn=c.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"]),Cn=t=>{const e={};let n,r,s;return t&&t.split(`
|
2
|
+
`).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim(),!(!n||e[n]&&Pn[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},Ke=Symbol("internals");function V(t){return t&&String(t).trim().toLowerCase()}function ee(t){return t===!1||t==null?t:c.isArray(t)?t.map(ee):String(t)}function kn(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const jn=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function be(t,e,n,r,s){if(c.isFunction(r))return r.call(this,e,n);if(s&&(e=n),!!c.isString(e)){if(c.isString(r))return e.indexOf(r)!==-1;if(c.isRegExp(r))return r.test(e)}}function In(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function Nn(t,e){const n=c.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(s,i,o){return this[r].call(this,e,s,i,o)},configurable:!0})})}let R=class{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function s(o,a,u){const l=V(a);if(!l)throw new Error("header name must be a non-empty string");const h=c.findKey(r,l);(!h||r[h]===void 0||u===!0||u===void 0&&r[h]!==!1)&&(r[h||a]=ee(o))}const i=(o,a)=>c.forEach(o,(u,l)=>s(u,l,a));if(c.isPlainObject(t)||t instanceof this.constructor)i(t,e);else if(c.isString(t)&&(t=t.trim())&&!jn(t))i(Cn(t),e);else if(c.isHeaders(t))for(const[o,a]of t.entries())s(a,o,n);else t!=null&&s(e,t,n);return this}get(t,e){if(t=V(t),t){const n=c.findKey(this,t);if(n){const r=this[n];if(!e)return r;if(e===!0)return kn(r);if(c.isFunction(e))return e.call(this,r,n);if(c.isRegExp(e))return e.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=V(t),t){const n=c.findKey(this,t);return!!(n&&this[n]!==void 0&&(!e||be(this,this[n],n,e)))}return!1}delete(t,e){const n=this;let r=!1;function s(i){if(i=V(i),i){const o=c.findKey(n,i);o&&(!e||be(n,n[o],o,e))&&(delete n[o],r=!0)}}return c.isArray(t)?t.forEach(s):s(t),r}clear(t){const e=Object.keys(this);let n=e.length,r=!1;for(;n--;){const s=e[n];(!t||be(this,this[s],s,t,!0))&&(delete this[s],r=!0)}return r}normalize(t){const e=this,n={};return c.forEach(this,(r,s)=>{const i=c.findKey(n,s);if(i){e[i]=ee(r),delete e[s];return}const o=t?In(s):String(s).trim();o!==s&&delete e[s],e[o]=ee(r),n[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return c.forEach(this,(n,r)=>{n!=null&&n!==!1&&(e[r]=t&&c.isArray(n)?n.join(", "):n)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
|
3
|
+
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach(r=>n.set(r)),n}static accessor(t){const e=(this[Ke]=this[Ke]={accessors:{}}).accessors,n=this.prototype;function r(s){const i=V(s);e[i]||(Nn(n,s),e[i]=!0)}return c.isArray(t)?t.forEach(r):r(t),this}};R.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),c.reduceDescriptors(R.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}}),c.freezeMethods(R);function _e(t,e){const n=this||W,r=e||n,s=R.from(r.headers);let i=r.data;return c.forEach(t,function(o){i=o.call(n,i,s.normalize(),e?e.status:void 0)}),s.normalize(),i}function Ge(t){return!!(t&&t.__CANCEL__)}function B(t,e,n){p.call(this,t??"canceled",p.ERR_CANCELED,e,n),this.name="CanceledError"}c.inherits(B,p,{__CANCEL__:!0});function Xe(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new p("Request failed with status code "+n.status,[p.ERR_BAD_REQUEST,p.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Ln(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Un(t,e){t=t||10;const n=new Array(t),r=new Array(t);let s=0,i=0,o;return e=e!==void 0?e:1e3,function(a){const u=Date.now(),l=r[i];o||(o=u),n[s]=a,r[s]=u;let h=i,g=0;for(;h!==s;)g+=n[h++],h=h%t;if(s=(s+1)%t,s===i&&(i=(i+1)%t),u-o<e)return;const m=l&&u-l;return m?Math.round(g*1e3/m):void 0}}function Fn(t,e){let n=0,r=1e3/e,s,i;const o=(a,u=Date.now())=>{n=u,s=null,i&&(clearTimeout(i),i=null),t.apply(null,a)};return[(...a)=>{const u=Date.now(),l=u-n;l>=r?o(a,u):(s=a,i||(i=setTimeout(()=>{i=null,o(s)},r-l)))},()=>s&&o(s)]}const te=(t,e,n=3)=>{let r=0;const s=Un(50,250);return Fn(i=>{const o=i.loaded,a=i.lengthComputable?i.total:void 0,u=o-r,l=s(u),h=o<=a;r=o;const g={loaded:o,total:a,progress:a?o/a:void 0,bytes:u,rate:l||void 0,estimated:l&&a&&h?(a-o)/l:void 0,event:i,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(g)},n)},Qe=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},Ye=t=>(...e)=>c.asap(()=>t(...e)),qn=E.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,E.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(E.origin),E.navigator&&/(msie|trident)/i.test(E.navigator.userAgent)):()=>!0,Dn=E.hasStandardBrowserEnv?{write(t,e,n,r,s,i){const o=[t+"="+encodeURIComponent(e)];c.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),c.isString(r)&&o.push("path="+r),c.isString(s)&&o.push("domain="+s),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Bn(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function $n(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Ze(t,e){return t&&!Bn(e)?$n(t,e):e}const et=t=>t instanceof R?{...t}:t;function L(t,e){e=e||{};const n={};function r(l,h,g,m){return c.isPlainObject(l)&&c.isPlainObject(h)?c.merge.call({caseless:m},l,h):c.isPlainObject(h)?c.merge({},h):c.isArray(h)?h.slice():h}function s(l,h,g,m){if(c.isUndefined(h)){if(!c.isUndefined(l))return r(void 0,l,g,m)}else return r(l,h,g,m)}function i(l,h){if(!c.isUndefined(h))return r(void 0,h)}function o(l,h){if(c.isUndefined(h)){if(!c.isUndefined(l))return r(void 0,l)}else return r(void 0,h)}function a(l,h,g){if(g in e)return r(l,h);if(g in t)return r(void 0,l)}const u={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(l,h,g)=>s(et(l),et(h),g,!0)};return c.forEach(Object.keys(Object.assign({},t,e)),function(l){const h=u[l]||s,g=h(t[l],e[l],l);c.isUndefined(g)&&h!==a||(n[l]=g)}),n}const tt=t=>{const e=L({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:o,auth:a}=e;e.headers=o=R.from(o),e.url=He(Ze(e.baseURL,e.url),t.params,t.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let u;if(c.isFormData(n)){if(E.hasStandardBrowserEnv||E.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((u=o.getContentType())!==!1){const[l,...h]=u?u.split(";").map(g=>g.trim()).filter(Boolean):[];o.setContentType([l||"multipart/form-data",...h].join("; "))}}if(E.hasStandardBrowserEnv&&(r&&c.isFunction(r)&&(r=r(e)),r||r!==!1&&qn(e.url))){const l=s&&i&&Dn.read(i);l&&o.set(s,l)}return e},Mn=typeof XMLHttpRequest<"u",zn=Mn&&function(t){return new Promise(function(e,n){const r=tt(t);let s=r.data;const i=R.from(r.headers).normalize();let{responseType:o,onUploadProgress:a,onDownloadProgress:u}=r,l,h,g,m,d;function b(){m&&m(),d&&d(),r.cancelToken&&r.cancelToken.unsubscribe(l),r.signal&&r.signal.removeEventListener("abort",l)}let f=new XMLHttpRequest;f.open(r.method.toUpperCase(),r.url,!0),f.timeout=r.timeout;function S(){if(!f)return;const _=R.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),A={data:!o||o==="text"||o==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:_,config:t,request:f};Xe(function(P){e(P),b()},function(P){n(P),b()},A),f=null}"onloadend"in f?f.onloadend=S:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(S)},f.onabort=function(){f&&(n(new p("Request aborted",p.ECONNABORTED,t,f)),f=null)},f.onerror=function(){n(new p("Network Error",p.ERR_NETWORK,t,f)),f=null},f.ontimeout=function(){let _=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const A=r.transitional||Ve;r.timeoutErrorMessage&&(_=r.timeoutErrorMessage),n(new p(_,A.clarifyTimeoutError?p.ETIMEDOUT:p.ECONNABORTED,t,f)),f=null},s===void 0&&i.setContentType(null),"setRequestHeader"in f&&c.forEach(i.toJSON(),function(_,A){f.setRequestHeader(A,_)}),c.isUndefined(r.withCredentials)||(f.withCredentials=!!r.withCredentials),o&&o!=="json"&&(f.responseType=r.responseType),u&&([g,d]=te(u,!0),f.addEventListener("progress",g)),a&&f.upload&&([h,m]=te(a),f.upload.addEventListener("progress",h),f.upload.addEventListener("loadend",m)),(r.cancelToken||r.signal)&&(l=_=>{f&&(n(!_||_.type?new B(null,t,f):_),f.abort(),f=null)},r.cancelToken&&r.cancelToken.subscribe(l),r.signal&&(r.signal.aborted?l():r.signal.addEventListener("abort",l)));const y=Ln(r.url);if(y&&E.protocols.indexOf(y)===-1){n(new p("Unsupported protocol "+y+":",p.ERR_BAD_REQUEST,t));return}f.send(s||null)})},Hn=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,s;const i=function(l){if(!s){s=!0,a();const h=l instanceof Error?l:this.reason;r.abort(h instanceof p?h:new B(h instanceof Error?h.message:h))}};let o=e&&setTimeout(()=>{o=null,i(new p(`timeout ${e} of ms exceeded`,p.ETIMEDOUT))},e);const a=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(l=>{l.unsubscribe?l.unsubscribe(i):l.removeEventListener("abort",i)}),t=null)};t.forEach(l=>l.addEventListener("abort",i));const{signal:u}=r;return u.unsubscribe=()=>c.asap(a),u}},Wn=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,s;for(;r<n;)s=r+e,yield t.slice(r,s),r=s},Vn=async function*(t,e){for await(const n of Jn(t))yield*Wn(n,e)},Jn=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},nt=(t,e,n,r)=>{const s=Vn(t,e);let i=0,o,a=u=>{o||(o=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:l,value:h}=await s.next();if(l){a(),u.close();return}let g=h.byteLength;if(n){let m=i+=g;n(m)}u.enqueue(new Uint8Array(h))}catch(l){throw a(l),l}},cancel(u){return a(u),s.return()}},{highWaterMark:2})},ne=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",rt=ne&&typeof ReadableStream=="function",Kn=ne&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),st=(t,...e)=>{try{return!!t(...e)}catch{return!1}},Gn=rt&&st(()=>{let t=!1;const e=new Request(E.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),it=64*1024,ye=rt&&st(()=>c.isReadableStream(new Response("").body)),re={stream:ye&&(t=>t.body)};ne&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!re[e]&&(re[e]=c.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new p(`Response type '${e}' is not supported`,p.ERR_NOT_SUPPORT,r)})})})(new Response);const Xn=async t=>{if(t==null)return 0;if(c.isBlob(t))return t.size;if(c.isSpecCompliantForm(t))return(await new Request(E.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(c.isArrayBufferView(t)||c.isArrayBuffer(t))return t.byteLength;if(c.isURLSearchParams(t)&&(t=t+""),c.isString(t))return(await Kn(t)).byteLength},Qn=async(t,e)=>c.toFiniteNumber(t.getContentLength())??Xn(e),Yn=ne&&(async t=>{let{url:e,method:n,data:r,signal:s,cancelToken:i,timeout:o,onDownloadProgress:a,onUploadProgress:u,responseType:l,headers:h,withCredentials:g="same-origin",fetchOptions:m}=tt(t);l=l?(l+"").toLowerCase():"text";let d=Hn([s,i&&i.toAbortSignal()],o),b;const f=d&&d.unsubscribe&&(()=>{d.unsubscribe()});let S;try{if(u&&Gn&&n!=="get"&&n!=="head"&&(S=await Qn(h,r))!==0){let C=new Request(e,{method:"POST",body:r,duplex:"half"}),I;if(c.isFormData(r)&&(I=C.headers.get("content-type"))&&h.setContentType(I),C.body){const[k,j]=Qe(S,te(Ye(u)));r=nt(C.body,it,k,j)}}c.isString(g)||(g=g?"include":"omit");const y="credentials"in Request.prototype;b=new Request(e,{...m,signal:d,method:n.toUpperCase(),headers:h.normalize().toJSON(),body:r,duplex:"half",credentials:y?g:void 0});let _=await fetch(b);const A=ye&&(l==="stream"||l==="response");if(ye&&(a||A&&f)){const C={};["status","statusText","headers"].forEach(M=>{C[M]=_[M]});const I=c.toFiniteNumber(_.headers.get("content-length")),[k,j]=a&&Qe(I,te(Ye(a),!0))||[];_=new Response(nt(_.body,it,k,()=>{j&&j(),f&&f()}),C)}l=l||"text";let P=await re[c.findKey(re,l)||"text"](_,t);return!A&&f&&f(),await new Promise((C,I)=>{Xe(C,I,{data:P,headers:R.from(_.headers),status:_.status,statusText:_.statusText,config:t,request:b})})}catch(y){throw f&&f(),y&&y.name==="TypeError"&&/fetch/i.test(y.message)?Object.assign(new p("Network Error",p.ERR_NETWORK,t,b),{cause:y.cause||y}):p.from(y,y&&y.code,t,b)}}),we={http:fn,xhr:zn,fetch:Yn};c.forEach(we,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const ot=t=>`- ${t}`,Zn=t=>c.isFunction(t)||t===null||t===!1,ct={getAdapter:t=>{t=c.isArray(t)?t:[t];const{length:e}=t;let n,r;const s={};for(let i=0;i<e;i++){n=t[i];let o;if(r=n,!Zn(n)&&(r=we[(o=String(n)).toLowerCase()],r===void 0))throw new p(`Unknown adapter '${o}'`);if(r)break;s[o||"#"+i]=r}if(!r){const i=Object.entries(s).map(([a,u])=>`adapter ${a} `+(u===!1?"is not supported by the environment":"is not available in the build"));let o=e?i.length>1?`since :
|
4
|
+
`+i.map(ot).join(`
|
5
|
+
`):" "+ot(i[0]):"as no adapter specified";throw new p("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r},adapters:we};function Ee(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new B(null,t)}function at(t){return Ee(t),t.headers=R.from(t.headers),t.data=_e.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),ct.getAdapter(t.adapter||W.adapter)(t).then(function(e){return Ee(t),e.data=_e.call(t,t.transformResponse,e),e.headers=R.from(e.headers),e},function(e){return Ge(e)||(Ee(t),e&&e.response&&(e.response.data=_e.call(t,t.transformResponse,e.response),e.response.headers=R.from(e.response.headers))),Promise.reject(e)})}const lt="1.7.9",se={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{se[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const ut={};se.transitional=function(t,e,n){function r(s,i){return"[Axios v"+lt+"] Transitional option '"+s+"'"+i+(n?". "+n:"")}return(s,i,o)=>{if(t===!1)throw new p(r(i," has been removed"+(e?" in "+e:"")),p.ERR_DEPRECATED);return e&&!ut[i]&&(ut[i]=!0,console.warn(r(i," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(s,i,o):!0}},se.spelling=function(t){return(e,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function er(t,e,n){if(typeof t!="object")throw new p("options must be an object",p.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let s=r.length;for(;s-- >0;){const i=r[s],o=e[i];if(o){const a=t[i],u=a===void 0||o(a,i,t);if(u!==!0)throw new p("option "+i+" must be "+u,p.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new p("Unknown option "+i,p.ERR_BAD_OPTION)}}const ie={assertOptions:er,validators:se},T=ie.validators;let U=class{constructor(t){this.defaults=t,this.interceptors={request:new We,response:new We}}async request(t,e){try{return await this._request(t,e)}catch(n){if(n instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const s=r.stack?r.stack.replace(/^.+\n/,""):"";try{n.stack?s&&!String(n.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(n.stack+=`
|
6
|
+
`+s):n.stack=s}catch{}}throw n}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=L(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:s}=e;n!==void 0&&ie.assertOptions(n,{silentJSONParsing:T.transitional(T.boolean),forcedJSONParsing:T.transitional(T.boolean),clarifyTimeoutError:T.transitional(T.boolean)},!1),r!=null&&(c.isFunction(r)?e.paramsSerializer={serialize:r}:ie.assertOptions(r,{encode:T.function,serialize:T.function},!0)),ie.assertOptions(e,{baseUrl:T.spelling("baseURL"),withXsrfToken:T.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let i=s&&c.merge(s.common,s[e.method]);s&&c.forEach(["delete","get","head","post","put","patch","common"],d=>{delete s[d]}),e.headers=R.concat(i,s);const o=[];let a=!0;this.interceptors.request.forEach(function(d){typeof d.runWhen=="function"&&d.runWhen(e)===!1||(a=a&&d.synchronous,o.unshift(d.fulfilled,d.rejected))});const u=[];this.interceptors.response.forEach(function(d){u.push(d.fulfilled,d.rejected)});let l,h=0,g;if(!a){const d=[at.bind(this),void 0];for(d.unshift.apply(d,o),d.push.apply(d,u),g=d.length,l=Promise.resolve(e);h<g;)l=l.then(d[h++],d[h++]);return l}g=o.length;let m=e;for(h=0;h<g;){const d=o[h++],b=o[h++];try{m=d(m)}catch(f){b.call(this,f);break}}try{l=at.call(this,m)}catch(d){return Promise.reject(d)}for(h=0,g=u.length;h<g;)l=l.then(u[h++],u[h++]);return l}getUri(t){t=L(this.defaults,t);const e=Ze(t.baseURL,t.url);return He(e,t.params,t.paramsSerializer)}};c.forEach(["delete","get","head","options"],function(t){U.prototype[t]=function(e,n){return this.request(L(n||{},{method:t,url:e,data:(n||{}).data}))}}),c.forEach(["post","put","patch"],function(t){function e(n){return function(r,s,i){return this.request(L(i||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:r,data:s}))}}U.prototype[t]=e(),U.prototype[t+"Form"]=e(!0)});let tr=class xt{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(s=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](s);r._listeners=null}),this.promise.then=s=>{let i;const o=new Promise(a=>{r.subscribe(a),i=a}).then(s);return o.cancel=function(){r.unsubscribe(i)},o},e(function(s,i,o){r.reason||(r.reason=new B(s,i,o),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new xt(function(n){e=n}),cancel:e}}};function nr(t){return function(e){return t.apply(null,e)}}function rr(t){return c.isObject(t)&&t.isAxiosError===!0}const Se={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Se).forEach(([t,e])=>{Se[e]=t});function ht(t){const e=new U(t),n=Ae(U.prototype.request,e);return c.extend(n,U.prototype,e,{allOwnKeys:!0}),c.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return ht(L(t,r))},n}const w=ht(W);w.Axios=U,w.CanceledError=B,w.CancelToken=tr,w.isCancel=Ge,w.VERSION=lt,w.toFormData=Z,w.AxiosError=p,w.Cancel=w.CanceledError,w.all=function(t){return Promise.all(t)},w.spread=nr,w.isAxiosError=rr,w.mergeConfig=L,w.AxiosHeaders=R,w.formToJSON=t=>Je(c.isHTMLForm(t)?new FormData(t):t),w.getAdapter=ct.getAdapter,w.HttpStatusCode=Se,w.default=w;const{Axios:Fr,AxiosError:qr,CanceledError:Dr,isCancel:Br,CancelToken:$r,VERSION:Mr,all:zr,Cancel:Hr,isAxiosError:Wr,spread:Vr,toFormData:Jr,AxiosHeaders:Kr,HttpStatusCode:Gr,formToJSON:Xr,getAdapter:Qr,mergeConfig:Yr}=w,Re=w.create({baseURL:location.origin,timeout:6e4,params:{}});Re.interceptors.response.use(t=>t,t=>{var e,n,r,s,i,o,a,u,l,h,g;if(t.response){if(t.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(b){b&&OpenC3Auth.setTokens()}),t.response.config.headers["Ignore-Errors"]&&t.response.config.headers["Ignore-Errors"].includes(t.response.status.toString()))return Promise.reject(t);let m=`HTTP ${t.response.status} - `;(e=t.response)!=null&&e.statusText&&(m+=`${t.response.statusText} `),(r=(n=t.response)==null?void 0:n.config)!=null&&r.data&&(m+=`${t.response.config.data} `),(i=(s=t.response)==null?void 0:s.data)!=null&&i.message?m+=`${t.response.data.message}`:(a=(o=t.response)==null?void 0:o.data)!=null&&a.exception?m+=`${t.response.data.exception}`:(h=(l=(u=t.response)==null?void 0:u.data)==null?void 0:l.error)!=null&&h.message?(t.response.data.error.class&&(m+=`${t.response.data.error.class} `),m+=`${t.response.data.error.message}`):m+=`${(g=t.response)==null?void 0:g.data}`;const{$cosmosNotify:d}=window;throw d&&d.serious({title:"Network error",body:m}),t}else throw t});const oe=async function(t,e,{data:n,params:r={},headers:s,noAuth:i=!1,noScope:o=!1,onUploadProgress:a=!1}={}){if(!i){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}s.Authorization=localStorage.openc3Token}return s.manual=!0,!o&&!r.scope&&(r.scope=window.openc3Scope),Re({method:t,url:e,data:n,params:r,headers:s,onUploadProgress:a})},xe={Accept:"application/json"},dt={...xe,"Content-Type":"application/json"},Zr=ae("Z",{get:function(t,{params:e,headers:n=xe,noScope:r,noAuth:s,onUploadProgress:i}={}){return oe("get",t,{params:e,headers:n,noScope:r,noAuth:s,onUploadProgress:i})},put:function(t,{data:e,params:n,headers:r=dt,noScope:s,noAuth:i,onUploadProgress:o}={}){return oe("put",t,{data:e,params:n,headers:r,noScope:s,noAuth:i,onUploadProgress:o})},post:function(t,{data:e,params:n,headers:r=dt,noScope:s,noAuth:i,onUploadProgress:o}={}){return oe("post",t,{data:e,params:n,headers:r,noScope:s,noAuth:i,onUploadProgress:o})},delete:function(t,{params:e,headers:n=xe,noScope:r,noAuth:s,onUploadProgress:i}={}){return oe("delete",t,{params:e,headers:n,noScope:r,noAuth:s,onUploadProgress:i})}});let ce=()=>({emit(t,...e){for(let n=this.events[t]||[],r=0,s=n.length;r<s;r++)n[r](...e)},events:{},on(t,e){var n;return((n=this.events)[t]||(n[t]=[])).push(e),()=>{var r;this.events[t]=(r=this.events[t])==null?void 0:r.filter(s=>e!==s)}}});class J extends Error{constructor(e,n){e instanceof Error?(super(e.message),this.cause=e):super(e),this.reason=n,this.name="ReasonError"}}class ve extends J{constructor(e){super("Rejected",e),this.name="SubscriptionRejectedError"}}class sr extends J{constructor(e){super(e||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class O extends J{constructor(e,n){n?super(e,n):super("Disconnected",e),this.name="DisconnectedError"}}class ir extends O{constructor(e){super(e,"stale_connection"),this.name="StaleConnectionError"}}function ft(t){return t?`{${Object.keys(t).sort().filter(e=>t[e]!==void 0).map(e=>{let n=JSON.stringify(t[e]);return`${JSON.stringify(e)}:${n}`}).join(",")}}`:""}class or{constructor(e){this.channel=e,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",e=>{if(e.type==="info"){this._state||(this._state=this.stateFromInfo(e));return}this._state&&(e.type==="join"?this._state[e.id]=e.info:e.type==="leave"&&delete this._state[e.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(e=>e()),this.listeners.length=0}async join(e,n){if(!this._info)return this._info={id:e,info:n},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let e=await this.channel.perform("$presence:leave");return delete this._info,e}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let e=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(e),this._state}finally{delete this._promise}}stateFromInfo(e){return e.records.reduce((n,{id:r,info:s})=>(n[r]=s,n),{})}}const F=Symbol("state");class pt{constructor(e={}){this.emitter=ce(),this.params=Object.freeze(e),this.presence=new or(this),this.initialConnect=!0,this[F]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=ft({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[F]}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[F]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[F]="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[F]="connected";let e=!0,n=!0;this.initialConnect=!1,this.emit("connect",{reconnect:n,restored:e})}disconnected(e){this.state==="disconnected"||this.state==="closed"||(this[F]="disconnected",this.presence.reset(),this.emit("disconnect",e))}closed(e){this.state!=="closed"&&(this[F]="closed",delete this.receiver,this.initialConnect=!0,this.presence.dispose(),this.emit("close",e))}disconnect(){this.state==="idle"||this.state==="closed"||this.receiver.unsubscribe(this)}async perform(e,n){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,e,n)}async send(e){return this.perform(void 0,e)}async whisper(e){try{await this.perform("$whisper",e)}catch(n){let r=this.receiver?this.receiver.logger:null;r&&r.warn("whisper failed: ",n)}}receive(e,n){this.emit("message",e,n)}on(e,n){return this.emitter.on(e,n)}once(e,n){let r=this.emitter.on(e,(...s)=>{r(),n(...s)});return r}emit(e,...n){return this.emitter.emit(e,...n)}ensureSubscribed(){return this.state==="connected"?Promise.resolve():this.state==="closed"?Promise.reject(Error("Channel is unsubscribed")):this.pendingSubscribe()}pendingSubscribe(){return this._pendingSubscribe?this._pendingSubscribe:(this._pendingSubscribe=new Promise((e,n)=>{let r=[()=>delete this._pendingSubscribe];r.push(this.on("connect",()=>{r.forEach(s=>s()),e()})),r.push(this.on("close",s=>{r.forEach(i=>i()),n(s||new J("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class cr{constructor(e){this.id=e,this.intent="unsubscribed",this.state="idle",this.channels=[],this.disposed=!1,this._pendings=[]}add(e){this.channels.includes(e)||this.channels.push(e)}remove(e){let n=this.channels.indexOf(e);n>-1&&this.channels.splice(n,1)}notify(e,...n){this.state=e==="restored"?"connected":e,n.length===1?this.channels.forEach(r=>r[e](n[0])):this.channels.forEach(r=>r[e]())}pending(e){this._checkIntent(e);let n=this._pendings[0];return!n||n.intent!==e?Promise.resolve():n.promise}ensureResubscribed(){this.disposed||(this.intent=void 0,this.ensureSubscribed())}ensureSubscribed(){if(this.intent!=="subscribed"){if(this.disposed)throw Error("Subscription is disposed");this.intent="subscribed",!this._mergeWithPending("unsubscribed")&&this.subscriber(this)}}maybeUnsubscribe(){this.disposed||this.intent==="unsubscribed"||this.channels.length>0||(this.intent="unsubscribed",this._mergeWithPending("subscribed"))||this.unsubscriber(this)}async acquire(e){this._checkIntent(e);let n,r={promise:new Promise(i=>{n=i}),intent:e,release:()=>{this._pendings.splice(this._pendings.indexOf(r),1),n(r)},canceled:!1,acquired:!1},s=this._pendingTop;return this._pendings.push(r),s&&await s.promise,this.gvl&&await this.gvl.acquire(r,e),r.acquired=!0,r}close(e){this.disposed=!0,this.intent=void 0,this.notify("closed",e)}_checkIntent(e){if(!(e==="unsubscribed"||e==="subscribed"))throw Error(`Unknown subscription intent: ${e}`)}get _pendingTop(){return this._pendings.length?this._pendings[this._pendings.length-1]:void 0}_mergeWithPending(e){let n=this._pendingTop;return!n||n.acquired||n.intent!==e?!1:(this._pendings.pop(),n.canceled=!0,!0)}}class ar{constructor(){this.queue=[]}async acquire(e,n){n==="subscribed"&&(this.queue.push(e.promise.then(()=>{this.queue.splice(this.queue.indexOf(e),1)})),this.queue.length>1&&await this.queue[this.queue.length-2])}}class lr{constructor(e){e.concurrentSubscribes===!1&&(this.glv=new ar),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(e){return this._subscriptions[e]}create(e,{subscribe:n,unsubscribe:r}){let s=this._subscriptions[e]=new cr(e);return s.remoteId=this._localToRemote[e],s.subscriber=n,s.unsubscriber=r,s.gvl=this.glv,s}remove(e){delete this._subscriptions[e],delete this._localToRemote[e]}storeRemoteId(e,n){this._localToRemote[e]=n;let r=this.get(e);r&&(r.remoteId=n)}}class ur{constructor(e={}){this.subscriptions=new lr(e),this._pendingMessages=[],this._remoteToLocal={}}subscribe(e,n){this._remoteToLocal[n]=e,this.subscriptions.storeRemoteId(e,n),this.flush(n)}unsubscribe(e){let n=this.subscriptions.get(e);if(!n)return;let r=n.remoteId;r&&delete this._remoteToLocal[r],this.subscriptions.remove(e)}transmit(e,n,r){let s=this._remoteToLocal[e];if(!s){this._pendingMessages.push([e,n,r]);return}let i=this.subscriptions.get(s);i&&i.channels.forEach(o=>{o.receive(n,r)})}notify(e,n,r){let s=this._remoteToLocal[e];if(!s)return;let i=this.subscriptions.get(s);i&&i.channels.forEach(o=>o.emit(n,r))}close(){this._pendingMessages.length=0}get size(){return this.channels.length}get channels(){return this.subscriptions.all().flatMap(e=>e.channels)}flush(e){let n=[];for(let r of this._pendingMessages)r[0]===e?this.transmit(r[0],r[1],r[2]):n.push(r);this._pendingMessages=n}}const gt={debug:0,info:1,warn:2,error:3};class mt{constructor(e){this.level=e||"warn"}log(e,n,r){gt[e]<gt[this.level]||this.writeLogEntry(e,n,r)}writeLogEntry(){throw Error("Not implemented")}debug(e,n){this.log("debug",e,n)}info(e,n){this.log("info",e,n)}warn(e,n){this.log("warn",e,n)}error(e,n){this.log("error",e,n)}}class K extends mt{writeLogEntry(){}}class hr{encode(e){return JSON.stringify(e)}decode(e){try{return JSON.parse(e)}catch{}}}let dr=0;class bt{constructor(e={}){let{logger:n}=e;this.logger=n||new K,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=e.subscribeCooldownInterval||250,this.subscribeRetryInterval=e.subscribeRetryInterval||5e3}attached(e){this.cable=e}subscribe(e,n){let r={channel:e};n&&Object.assign(r,n);let s=ft(r);if(this.pendingUnsubscriptions[s]){let o=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${o}`,s),new Promise(a=>{setTimeout(()=>{a(this.subscribe(e,n))},o)})}if(this.pendingSubscriptions[s])return this.logger.warn("subscription is already pending, skipping",s),Promise.reject(Error("Already subscribing"));let i=this.subscribeRetryInterval;return new Promise((o,a)=>{let u=++dr;this.pendingSubscriptions[s]={resolve:o,reject:a,id:u},this.cable.send(this.buildSubscribeRequest(s)),this.maybeRetrySubscribe(u,s,i)})}buildSubscribeRequest(e){return{command:"subscribe",identifier:e}}maybeRetrySubscribe(e,n,r){setTimeout(()=>{let s=this.pendingSubscriptions[n];s&&s.id===e&&(this.logger.warn(`no subscription ack received in ${r}ms, retrying subscribe`,n),this.cable.send(this.buildSubscribeRequest(n)),this.maybeExpireSubscribe(e,n,r))},r)}maybeExpireSubscribe(e,n,r){setTimeout(()=>{let s=this.pendingSubscriptions[n];s&&s.id===e&&(delete this.pendingSubscriptions[n],s.reject(new sr(`Haven't received subscription ack in ${r*2}ms for ${n}`)))},r)}unsubscribe(e){return this.cable.send({command:"unsubscribe",identifier:e}),this.pendingUnsubscriptions[e]=!0,setTimeout(()=>{delete this.pendingUnsubscriptions[e]},this.subscribeCooldownInterval),Promise.resolve()}perform(e,n,r){return n==="$whisper"?this.whisper(e,r):(r||(r={}),r.action=n,this.cable.send({command:"message",identifier:e,data:JSON.stringify(r)}),Promise.resolve())}whisper(e,n){return this.cable.send({command:"whisper",identifier:e,data:n}),Promise.resolve()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:n,identifier:r,message:s,reason:i,reconnect:o}=e;if(n==="ping")return this.cable.keepalive(e.message);if(this.cable.keepalive(),n==="welcome"){let a=e.sid;return a&&this.cable.setSessionId(a),this.cable.connected()}if(n==="disconnect"){let a=new O(i);this.reset(a),o===!1?this.cable.closed(a):this.cable.disconnected(a);return}if(n==="confirm_subscription"){let a=this.pendingSubscriptions[r];if(!a){this.logger.error("subscription not found, unsubscribing",{type:n,identifier:r}),this.unsubscribe(r);return}return delete this.pendingSubscriptions[r],a.resolve(r)}if(n==="reject_subscription"){let a=this.pendingSubscriptions[r];return a?(delete this.pendingSubscriptions[r],a.reject(new ve)):this.logger.error("subscription not found",{type:n,identifier:r})}if(s)return{identifier:r,message:s};this.logger.warn(`unknown message type: ${n}`,{message:e})}reset(e){for(let n in this.pendingSubscriptions)this.pendingSubscriptions[n].reject(e);this.pendingSubscriptions={}}recoverableClosure(){return!1}}const _t=()=>Date.now()/1e3|0;class fr extends bt{constructor(e={}){super(e),this.streamsPositions={},this.subscriptionStreams={},this.pendingHistory={},this.pendingPresence={},this.presenceInfo={},this.restoreSince=e.historyTimestamp,this.restoreSince===void 0&&(this.restoreSince=_t()),this.sessionId=void 0,this.sendPongs=e.pongs}reset(e){for(let n in this.pendingPresence)this.pendingPresence[n].reject(e);return this.pendingPresence={},super.reset()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:n,identifier:r,message:s}=e;if(n==="disconnect"||n==="reject_subscription")return super.receive(e);if(n==="confirm_subscription")return this.subscriptionStreams[r]||(this.subscriptionStreams[r]=new Set),super.receive(e);if(n==="ping")return this.restoreSince&&(this.restoreSince=_t()),this.sendPongs&&this.sendPong(),this.cable.keepalive(e.message);if(this.cable.keepalive(),n==="confirm_history"){this.logger.debug("history result received",e),this.cable.notify("history_received",r);return}if(n==="reject_history"){this.logger.warn("failed to retrieve history",e),this.cable.notify("history_not_found",r);return}if(n==="welcome"){if(this.sessionId=e.sid,this.sessionId&&this.cable.setSessionId(this.sessionId),e.restored){let i=e.restored_ids||Object.keys(this.subscriptionStreams);for(let o of i)this.cable.send({identifier:o,command:"history",history:this.historyRequestFor(o)}),this.presenceInfo[o]&&this.cable.send({identifier:o,command:"join",presence:this.presenceInfo[o]});return this.cable.restored(i)}return this.cable.connected(this.sessionId)}if(n==="presence"){let i=s.type;if(i==="info"){let o=this.pendingPresence[r];o&&(delete this.pendingPresence[r],o.resolve(s))}else if(i==="error"){let o=this.pendingPresence[r];o&&(delete this.pendingPresence[r],o.reject(new Error("failed to retrieve presence")))}return{type:n,identifier:r,message:s}}if(s){let i=this.trackStreamPosition(r,e.stream_id,e.epoch,e.offset);return{identifier:r,message:s,meta:i}}this.logger.warn(`unknown message type: ${n}`,{message:e})}perform(e,n,r){switch(n){case"$presence:join":return this.join(e,r);case"$presence:leave":return this.leave(e,r);case"$presence:info":return this.presence(e,r)}return super.perform(e,n,r)}unsubscribe(e){return delete this.presenceInfo[e],super.unsubscribe(e)}buildSubscribeRequest(e){let n=super.buildSubscribeRequest(e),r=this.historyRequestFor(e);r&&(n.history=r,this.pendingHistory[e]=!0);let s=this.presenceInfo[e];return s&&(n.presence=s),n}recoverableClosure(){return!!this.sessionId}historyRequestFor(e){let n={},r=!1;if(this.subscriptionStreams[e])for(let s of this.subscriptionStreams[e]){let i=this.streamsPositions[s];i&&(r=!0,n[s]=i)}if(!(!r&&!this.restoreSince))return{since:this.restoreSince,streams:n}}trackStreamPosition(e,n,r,s){if(!(!n||!r))return this.subscriptionStreams[e]||(this.subscriptionStreams[e]=new Set),this.subscriptionStreams[e].add(n),this.streamsPositions[n]={epoch:r,offset:s},{stream:n,epoch:r,offset:s}}async sendPong(){await new Promise(e=>setTimeout(e,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(e,n){return this.presenceInfo[e]=n,this.cable.send({command:"join",identifier:e,presence:n}),Promise.resolve()}async leave(e,n){return delete this.presenceInfo[e],this.cable.send({command:"leave",identifier:e,presence:n}),Promise.resolve()}presence(e,n){return this.pendingPresence[e]?(this.logger.warn("presence is already pending, skipping",e),Promise.reject(Error("presence request is already pending"))):new Promise((r,s)=>{this.pendingPresence[e]={resolve:r,reject:s},this.cable.send({command:"presence",identifier:e,data:n})})}}class pr extends J{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class Oe extends pt{constructor(e,n){super(n),this.channelId=e}set channelId(e){this._channelId=e}get channelId(){return this._channelId}}le(Oe,"identifier","__ghost__");const gr="$pubsub";class Te extends pt{async perform(e,n){if(e.startsWith("$"))return super.perform(e,n);throw Error("not implemented")}}le(Te,"identifier",gr);const q=Symbol("state");let mr=class{constructor({transport:t,protocol:e,encoder:n,logger:r,lazy:s,hubOptions:i,performFailures:o}){this.emitter=ce(),this.transport=t,this.encoder=n,this.logger=r||new K,this.protocol=e,this.performFailures=o||"throw",this.protocol.attached(this),this.hub=new ur(i||{}),this[q]="idle",this.handleClose=this.handleClose.bind(this),this.handleIncoming=this.handleIncoming.bind(this),this.transport.on("close",this.handleClose),this.transport.on("data",this.handleIncoming),this.initialConnect=!0,this.recovering=!1,s===!1&&this.connect().catch(()=>{})}get state(){return this[q]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();this[q]="connecting";let t=this.pendingConnect();this.logger.debug("connecting");try{await this.transport.open()}catch(e){this.handleClose(e)}return t}setSessionId(t){this.sessionId=t,this.transport.setParam("sid",t)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[q]="connected",this.recovering&&this.hub.subscriptions.all().forEach(e=>e.notify("disconnected",new O("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[q]="connected",this.hub.subscriptions.all().forEach(r=>{t&&r.remoteId&&t.includes(r.remoteId)?r.notify("restored"):(r.notify("disconnected",new O("recovery_failed")),this._resubscribe(r))});let e=!this.initialConnect,n=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:e,restored:n})}notify(t,e,n){e&&typeof e!="string"&&(n=e,e=void 0),e?this.hub.notify(e,"info",{type:t,data:n}):this.emit("info",{type:t,data:n})}handleClose(t){this.logger.debug("transport closed",{error:t}),this.disconnected(new O(t,"transport_closed"))}disconnected(t){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:t}),this[q]="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 O?t:new O(t,void 0)),this.logger.info("closed",{reason:t||"user"}),this[q]="closed";let n=e||new O("cable_closed");this.hub.subscriptions.all().forEach(r=>r.notify("disconnected",n)),this.hub.close(),this.protocol.reset(),this.transport.close(),this.initialConnect=!0,this.emit("close",e)}disconnect(){this.closed()}handleIncoming(t){if(this.state==="closed"||this.state==="idle")return;let e=this.encoder.decode(t);if(e===void 0){this.logger.error("failed to decode message",{message:t});return}this.logger.debug("incoming data",e);let n=this.protocol.receive(e);if(n){this.logger.debug("processed incoming message",n);let{type:r,identifier:s,message:i,meta:o}=n;r?this.hub.notify(s,r,i):this.hub.transmit(s,i,o)}}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 Te({stream_name:t});return this.subscribe(e)}streamFromSigned(t){let e=new Te({signed_stream_name:t});return this.subscribe(e)}subscribeTo(t,e){let n,r;return typeof t=="string"&&(r=t,t=Oe),n=r?new t(r,e):new t(e),this.subscribe(n)}subscribe(t){if(!t.attached(this))return t;let e=t.identifier;t.connecting();let n=this.hub.subscriptions.get(e)||this.hub.subscriptions.create(e,{subscribe:r=>this._subscribe(r,t.channelId,t.params),unsubscribe:r=>this._unsubscribe(r)});return n.add(t),n.intent==="subscribed"&&n.state==="connected"&&t.connected(),n.ensureSubscribed(),t}async _resubscribe(t){t.intent!=="subscribed"||!t.channels[0]||(t.notify("connecting"),t.ensureResubscribed())}async _subscribe(t,e,n){let r=t.id;if(this.state==="idle"&&this.connect().catch(()=>{}),this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r});return}this.logger.debug("acquiring subscribe lock",{identifier:r});let s=await t.acquire("subscribed");if(s.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:r}),s.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:r}),t.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),s.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r}),s.release();return}if(t.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:r}),t.notify("connected"),s.release();return}let i={identifier:e,params:n};this.logger.debug("subscribing",i);try{let o=await this.protocol.subscribe(e,n);this.hub.subscribe(r,o),this.logger.debug("subscribed",{...i,remoteId:o}),t.notify("connected")}catch(o){if(o){if(o instanceof ve&&this.logger.warn("rejected",i),o instanceof O){this.logger.debug("disconnected during subscription; will retry on connect",i),s.release();return}this.logger.error("failed to subscribe",{error:o,...i})}t.close(o),this.hub.unsubscribe(r)}s.release()}unsubscribe(t){let e=t.identifier,n=this.hub.subscriptions.get(e);if(!n)throw Error(`Subscription not found: ${e}`);n.remove(t),t.closed(),n.maybeUnsubscribe()}async _unsubscribe(t){let e=t.id;this.logger.debug("acquiring unsubscribe lock",{identifier:e});let n=await t.acquire("unsubscribed");if(n.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:e}),n.release();return}if(this.logger.debug("unsubscribe lock has been acquired",{identifier:e}),t.intent!=="unsubscribed"){this.logger.debug("cancel unsubscribe, no longer needed",{identifier:e,intent:t.intent}),n.release();return}if(t.state==="disconnected"||t.state==="closed"){this.logger.debug(`already ${t.state} connected, skip unsubscribe command`,{identifier:e}),n.release();return}let r=t.remoteId;if(this.logger.debug("unsubscribing...",{remoteId:r}),this.state!=="connected"){this.logger.debug("unsubscribe skipped (cable is not connected)",{id:e}),t.close(),this.hub.unsubscribe(e),n.release();return}try{await this.protocol.unsubscribe(r),this.logger.debug("unsubscribed remotely",{id:e})}catch(s){s&&(s instanceof O?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:e,error:s}):this.logger.error("unsubscribe failed",{id:e,error:s}))}t.intent==="unsubscribed"?(t.close(),this.hub.unsubscribe(e)):t.state="closed",n.release()}async perform(t,e,n){if(this.performFailures==="throw")return this._perform(t,e,n);try{return await this._perform(t,e,n)}catch(r){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:r});return}}async _perform(t,e,n){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new pr;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 s=r.remoteId,i={id:s,action:e,payload:n};this.logger.debug("perform",i);try{let o=await this.protocol.perform(s,e,n);return o&&this.logger.debug("perform result",{message:o,request:i}),o}catch(o){throw this.logger.error("perform failed",{error:o,request:i}),o}}on(t,e){return this.emitter.on(t,e)}once(t,e){let n=this.emitter.on(t,(...r)=>{n(),e(...r)});return n}emit(t,...e){return this.emitter.emit(t,...e)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((t,e)=>{let n=[()=>delete this._pendingConnect];n.push(this.on("connect",()=>{n.forEach(r=>r()),t()})),n.push(this.on("close",r=>{n.forEach(s=>s()),e(r)})),n.push(this.on("disconnect",r=>{n.forEach(s=>s()),e(r)}))}),this._pendingConnect)}};const br={maxMissingPings:2,maxReconnectAttempts:1/0},$=()=>Date.now(),yt=(t,e)=>{e=e||{};let{backoffRate:n,jitterRatio:r,maxInterval:s}=e;return n=n||2,r===void 0&&(r=.5),i=>{let o=t*n**i,a=o*n,u=o+(a-o)*Math.random(),l=2*(Math.random()-.5)*r;return u=u*(1+l),s&&s<u&&(u=s),u}};let wt=class{constructor({pingInterval:t,...e}){if(this.pingInterval=t,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${t}`);if(e=Object.assign({},br,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 K,this.state="pending_connect",this.attempts=0,this.disconnectedAt=$()}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=$(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=$(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=$(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=$()})),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=$()-this.pingedAt;t>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${t}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new ir))}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 _r{constructor(e,n={}){this.transports=e,this.transport=null,this.emitter=ce(),this.unbind=[],this.logger=n.logger||new K}displayName(){return"fallbacked transport"}async open(){for(let e=0;e<this.transports.length;e++){let n=this.transports[e];try{this.transport=n,this.resetListeners(),this.logger.debug(`Trying to connect via ${n.displayName()}`),await n.open(),this.logger.debug(`Connected via ${n.displayName()}`);return}catch(r){this.logger.debug(`Failed to connect via ${n.displayName()}: ${r.message}`)}}throw this.transport=null,this.resetListeners(),new Error("Couldn't connect via any available transport")}send(e){if(!this.transport)throw new Error("No transport is open");this.transport.send(e)}async close(){if(!this.transport)throw new Error("No transport is open");await this.transport.close(),this.transport=null}setURL(){throw new Error("Not implemented. Set URL for each transport separately")}setParam(e,n){this.transports.forEach(r=>{r.setParam(e,n)})}on(e,n){return this.emitter.on(e,n)}once(e,n){let r=this.emitter.on(e,(...s)=>{r(),n(...s)});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 yr{constructor(e,n={}){this.url=e;let r=n.websocketImplementation;if(r)this.Impl=r;else if(typeof WebSocket<"u")this.Impl=WebSocket;else throw new Error("No WebSocket support");this.connected=!1,this.emitter=ce();let{format:s,subprotocol:i}=n;this.format=s||"text",this.connectionOptions=n.websocketOptions,this.subprotocol=i}displayName(){return"WebSocket("+this.url+")"}open(){return this.connectionOptions?this.ws=new this.Impl(this.url,this.subprotocol,this.connectionOptions):this.ws=new this.Impl(this.url,this.subprotocol),this.ws.binaryType="arraybuffer",this.initListeners(),new Promise((e,n)=>{let r=[];r.push(this.once("open",()=>{r.forEach(s=>s()),e()})),r.push(this.once("close",()=>{r.forEach(s=>s()),n(Error("WS connection closed"))}))})}setURL(e){this.url=e}setParam(e,n){let r=new URL(this.url);r.searchParams.set(e,n);let s=`${r.protocol}//${r.host}${r.pathname}?${r.searchParams}`;this.setURL(s)}send(e){if(!this.ws||!this.connected)throw Error("WebSocket is not connected");this.ws.send(e)}close(){this.ws?this.onclose():this.connected=!1}on(e,n){return this.emitter.on(e,n)}once(e,n){let r=this.emitter.on(e,(...s)=>{r(),n(...s)});return r}initListeners(){this.ws.onerror=e=>{this.connected&&this.emitter.emit("error",e.error||new Error("WS Error"))},this.ws.onclose=()=>{this.onclose()},this.ws.onmessage=e=>{let n=e.data;this.format==="binary"&&(n=new Uint8Array(n)),this.emitter.emit("data",n)},this.ws.onopen=()=>{this.connected=!0,this.emitter.emit("open")}}onclose(){this.ws.onclose=void 0,this.ws.onmessage=void 0,this.ws.onopen=void 0,this.ws.close(),delete this.ws,this.connected=!1,this.emitter.emit("close")}}const Et={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function wr(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({},Et,e);let{protocol:n,websocketImplementation:r,websocketFormat:s,websocketOptions:i,fallbacks:o,logLevel:a,logger:u,transport:l,encoder:h,lazy:g,monitor:m,pingInterval:d,reconnectStrategy:b,maxMissingPings:f,maxReconnectAttempts:S,subprotocol:y,tokenRefresher:_,historyTimestamp:A,protocolOptions:P,concurrentSubscribes:C}=e;if(u=u||new K(a),typeof n=="string"){y=y||n;let j=n.substring(0,n.lastIndexOf("-")),M=n.substring(n.lastIndexOf("-")+1);if(P=P||{},j==="actioncable-v1")n=new bt({logger:u,...P});else if(j==="actioncable-v1-ext")n=new fr({logger:u,historyTimestamp:A,...P});else throw Error(`Protocol is not supported yet: ${n}`);if(M==="json")h=h||new hr,s=s||"text";else if(M==="msgpack"){if(s="binary",!h)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(M==="protobuf"){if(s=s||"binary",!h)throw Error("Protobuf encoder must be specified explicitly. Use `@anycable/protobuf-encoder` package or build your own")}else throw Error(`Protocol is not supported yet: ${n}`)}if(!n)throw Error("Protocol must be specified");l=l||new yr(t,{websocketImplementation:r,websocketOptions:i,subprotocol:y,format:s}),o&&(l=new _r([l,...o],{logger:u})),b=b||yt(d),m!==!1&&(m=m||new wt({pingInterval:d,reconnectStrategy:b,maxMissingPings:f,maxReconnectAttempts:S,logger:u}));let I={concurrentSubscribes:C},k=new mr({protocol:n,transport:l,encoder:h,logger:u,lazy:g,hubOptions:I});return m&&(m.watch(k),k.monitor=m),_&&Er(k,async()=>{try{await _(l)}catch(j){return u.error("Failed to refresh authentication token: "+j),!1}return k.connect().catch(()=>{}),!0}),k}function Er(t,e){let n=!1;t.on("connect",()=>n=!1),t.on("close",async r=>{if(r){if(n){t.logger.warn("Token auto-refresh is disabled",r);return}r.reason==="token_expired"&&(n=!0,await e())}})}class Sr{constructor(e){this.channel=e}notify(e,...n){typeof this[e]=="function"&&this[e](...n)}perform(e,n={}){this.channel.perform(e,n)}send(e){this.channel.send(e)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}}class Rr extends Oe{constructor(e,n,r){super(e,n),this.subscription=new Sr(this),Object.assign(this.subscription,r),this.on("connect",()=>this.subscription.notify("connected")),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",s=>this.subscription.notify("received",s)),this.on("close",s=>{s&&s instanceof ve?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class xr{constructor(e){this.cable=e}create(e,n){let r,s;typeof e=="object"?(r=e.channel,delete e.channel,s=e):(r=e,s={});let i=new Rr(r,s,n);return i.subscription.notify("initialized"),this.cable.subscribe(i),i.subscription}findAll(e){return this.cable.hub.channels.filter(n=>n.identifier===e).map(n=>n.subscription)}}class vr{constructor(e){this.cable=e,this.subscriptions=new xr(e)}}class Or extends mt{writeLogEntry(e,n,r){r?console[e](n,r):console[e](n)}}class Tr extends wt{watch(e){super.watch(e),this.initActivityListeners()}initActivityListeners(){if(typeof document<"u"&&typeof window<"u"&&document.addEventListener&&window.addEventListener){let e=()=>{document.hidden||this.reconnectNow()&&this.logger.debug("Trigger reconnect due to visibility change")},n=s=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:s})},r=()=>this.disconnect(new O("page_frozen"));document.addEventListener("visibilitychange",e,!1),window.addEventListener("focus",n,!1),window.addEventListener("online",n,!1),window.addEventListener("resume",n,!1),window.addEventListener("freeze",r,!1),this.unbind.push(()=>{document.removeEventListener("visibilitychange",e,!1),window.removeEventListener("focus",n,!1),window.removeEventListener("online",n,!1),window.removeEventListener("resume",n,!1),window.removeEventListener("freeze",r,!1)})}}disconnect(e){this.state==="disconnected"||this.state==="closed"||(this.logger.info("Disconnecting",{reason:e.message}),this.cancelReconnect(),this.stopPolling(),this.state="pending_disconnect",this.target.disconnected(e))}}const Ar=["cable","action-cable"],Pr="/cable",St=(t,e)=>{for(let n of Ar){let r=t.head.querySelector(`meta[name='${n}-${e}']`);if(r)return r.getAttribute("content")}},Rt=t=>t.match(/wss?:\/\//)?t:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${t}`:t,Cr=()=>{if(typeof document<"u"&&document.head){let t=St(document,"url");if(t)return Rt(t)}return Rt(Pr)},kr=()=>{if(typeof document<"u"&&document.head){let t=St(document,"history-timestamp");if(t)return t|0}};function jr(t,e){typeof t=="object"&&typeof e>"u"&&(e=t,t=void 0),t=t||Cr(),e=e||{},e.historyTimestamp||(e.historyTimestamp=kr()),e=Object.assign({},Et,e);let{logLevel:n,logger:r,pingInterval:s,reconnectStrategy:i,maxMissingPings:o,maxReconnectAttempts:a}=e;return r=e.logger=e.logger||new Or(n),i=e.reconnectStrategy=e.reconnectStrategy||yt(s),e.monitor!==!1&&(e.monitor=e.monitor||new Tr({pingInterval:s,reconnectStrategy:i,maxMissingPings:o,maxReconnectAttempts:a,logger:r})),wr(t,e)}function Ir(t,e){let n=jr(t,e);return new vr(n)}class Nr{constructor(e="/openc3-api/cable"){this._cable=null,this._url=e}disconnect(){this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(e,n,r={},s={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(i=>{if(i&&OpenC3Auth.setTokens(),this._cable==null){let o=this._url+"?scope="+encodeURIComponent(window.openc3Scope)+"&authorization="+encodeURIComponent(localStorage.openc3Token);o=new URL(o,document.baseURI).href,this._cable=Ir(o)}return this._cable.subscriptions.create({channel:e,...s},r)})}recordPing(){}}ae("n",Nr);class Lr{constructor(){le(this,"id",1)}async exec(e,n,r={},s={},i=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return r.scope=window.openc3Scope,s.manual=!0,(await Re.post("/openc3-api/api",{jsonrpc:"2.0",method:e,params:n,id:this.id,keyword_params:r},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...s},timeout:i})).data.result}catch(o){let a=new Error;throw o.response?(a.name=o.response.data.error.data.class,a.message=o.response.data.error.data.message,a.object=o.response.data.error):o.request?(a.name="Request error",a.message="Request error, no response received"):a.name="Unknown error",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,n){return this.exec("map_target_to_interface",[e,n])}connect_interface(e,...n){return n.length>0?this.exec("connect_interface",[e,...n]):this.exec("connect_interface",[e])}disconnect_interface(e){return this.exec("disconnect_interface",[e])}interface_cmd(e,n,...r){return this.exec("interface_cmd",[e,n,...r])}get_all_router_info(){return this.exec("get_all_router_info",[])}connect_router(e){return this.exec("connect_router",[e])}disconnect_router(e){return this.exec("disconnect_router",[e])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(e){return this.exec("get_tlm_cnts",[e])}get_item(e,n,r){return this.exec("get_item",[e,n,r])}get_param(e,n,r){return this.exec("get_param",[e,n,r])}get_parameter(e,n,r){return this.exec("get_param",[e,n,r])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(e){return this.exec("set_limits_set",[e])}get_target(e){return this.exec("get_target",[e])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(e,n){return this.exec("get_tlm",[e,n])}get_telemetry(e,n){return this.exec("get_tlm",[e,n])}get_all_tlm(e){return this.exec("get_all_tlm",[e])}get_all_telemetry(e){return this.exec("get_all_tlm",[e])}get_all_tlm_names(e,n=!1){return this.exec("get_all_tlm_names",[e],{hidden:n})}get_all_telemetry_names(e){return this.exec("get_all_tlm_names",[e])}async get_tlm_packet(e,n,r,s=30){const i=await this.exec("get_tlm_packet",[e,n],{type:r,stale_time:s});if(i!=null){let o=i.length,a=null;for(let u=0;u<o;u++)a=this.decode_openc3_type(i[u][1]),a!==null&&(i[u][1]=a)}return i}get_packet_derived_items(e,n){return this.exec("get_packet_derived_items",[e,n])}get_tlm_buffer(e,n){return this.exec("get_tlm_buffer",[e,n])}async get_tlm_values(e,n=30,r=null){let s={stale_time:n};r!==null&&(s.cache_timeout=r);const i=await this.exec("get_tlm_values",[e],s,{},1e4);let o=i[0].length,a=null;for(let u=0;u<o;u++)a=this.decode_openc3_type(i[0][u]),a!==null&&(i[0][u]=a);return i}get_limits(e,n,r){return this.exec("get_limits",[e,n,r])}async tlm(e,n,r,s="CONVERTED"){let i=null;if(n===void 0)i=await this.exec("tlm",[e]);else if(r===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(n))i=await this.exec("tlm",[e],{type:n});else{let a=new Error;throw a.name="TypeError",a.message=`Invalid data type ${n}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,a}else i=await this.exec("tlm",[e,n,r],{type:s});let o=this.decode_openc3_type(i);return o!==null&&(i=o),i}async inject_tlm(e,n,r=null,s="CONVERTED"){data=await this.exec("inject_tlm",[e,n,r],{type:s})}set_tlm(e,n,r,s){return this.exec("set_tlm",[e,n,r],{type:s})}override_tlm(e,n,r,s){return this.exec("override_tlm",[e,n,r],{type:s})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(e,n,r,s){return this.exec("normalize_tlm",[e,n,r],{type:s})}get_all_cmds(e){return this.exec("get_all_cmds",[e])}get_all_commands(e){return this.exec("get_all_cmds",[e])}get_all_cmd_names(e,n=!1){return this.exec("get_all_cmd_names",[e],{hidden:n})}get_all_command_names(e){return this.exec("get_all_cmd_names",[e])}get_cmd(e,n){return this.exec("get_cmd",[e,n])}get_command(e,n){return this.exec("get_cmd",[e,n])}get_cmd_cnts(e){return this.exec("get_cmd_cnts",[e])}get_cmd_value(e,n,r,s="CONVERTED"){return this.exec("get_cmd_value",[e,n,r,s])}get_cmd_buffer(e,n){return this.exec("get_cmd_buffer",[e,n])}_cmd(e,n,r,s,i){let o=null;for(let a in s)Object.prototype.hasOwnProperty.call(s,a)&&(o=this.encode_openc3_type(s[a]),o!==null&&(s[a]=o));return this.exec(e,[n,r,s],{},i)}get_cmd_hazardous(e,n,r,s={}){return n===void 0?this.exec("get_cmd_hazardous",e,{},s):this._cmd("get_cmd_hazardous",e,n,r,s)}cmd(e,n,r,s={}){return n===void 0?this.exec("cmd",e,{},s):this._cmd("cmd",e,n,r,s)}cmd_no_range_check(e,n,r,s={}){return n===void 0?this.exec("cmd_no_range_check",e,{},s):this._cmd("cmd_no_range_check",e,n,r,s)}cmd_raw(e,n,r,s={}){return n===void 0?this.exec("cmd_raw",e,{},s):this._cmd("cmd_raw",e,n,r,s)}cmd_raw_no_range_check(e,n,r,s={}){return n===void 0?this.exec("cmd_raw_no_range_check",e,{},s):this._cmd("cmd_raw_no_range_check",e,n,r,s)}cmd_no_hazardous_check(e,n,r,s={}){return n===void 0?this.exec("cmd_no_hazardous_check",e,{},s):this._cmd("cmd_no_hazardous_check",e,n,r,s)}cmd_no_checks(e,n,r,s={}){return n===void 0?this.exec("cmd_no_checks",e,{},s):this._cmd("cmd_no_checks",e,n,r,s)}cmd_raw_no_hazardous_check(e,n,r,s={}){return n===void 0?this.exec("cmd_raw_no_hazardous_check",e,{},s):this._cmd("cmd_raw_no_hazardous_check",e,n,r,s)}cmd_raw_no_checks(e,n,r,s={}){return n===void 0?this.exec("cmd_raw_no_checks",e,{},s):this._cmd("cmd_raw_no_checks",e,n,r,s)}build_cmd(e,n,r){return n===void 0?this.exec("build_cmd",e):this._cmd("build_cmd",e,n,r)}build_command(e,n,r){return n===void 0?this.exec("build_cmd",e):this._cmd("build_cmd",e,n,r)}get_interface_names(){return this.exec("get_interface_names",[])}send_raw(e,n){return this.exec("send_raw",[e,n])}list_configs(e){return this.exec("list_configs",[e])}load_config(e,n){return this.exec("load_config",[e,n])}save_config(e,n,r){return this.exec("save_config",[e,n,r])}delete_config(e,n){return this.exec("delete_config",[e,n])}enable_limits(e,n,r){return this.exec("enable_limits",[e,n,r])}disable_limits(e,n,r){return this.exec("disable_limits",[e,n,r])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(e){return this.exec("get_overall_limits_state",[e])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(e){return this.exec("get_setting",[e])}get_settings(e){return this.exec("get_settings",e)}set_setting(e,n){return this.exec("set_setting",[e,n])}update_news(){return this.exec("update_news",[])}save_setting(e,n){return this.exec("set_setting",[e,n])}get_metrics(){return this.exec("get_metrics",[])}async hashString(e){if(window.isSecureContext){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",n),s=new Uint8Array(r);return Array.from(s).map(i=>i.toString(16).padStart(2,"0")).join("")}}}ae("r",Lr)}}});
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openc3-cosmos-tool-cmdtlmserver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.0
|
4
|
+
version: 6.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Melton
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2025-
|
12
|
+
date: 2025-02-05 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: " This plugin adds the OpenC3 COSMOS CmdTlmServer Tool\n"
|
15
15
|
email:
|
@@ -23,81 +23,83 @@ files:
|
|
23
23
|
- README.md
|
24
24
|
- Rakefile
|
25
25
|
- plugin.txt
|
26
|
-
- tools/cmdtlmserver/ArrayWidget-
|
27
|
-
- tools/cmdtlmserver/
|
28
|
-
- tools/cmdtlmserver/
|
29
|
-
- tools/cmdtlmserver/
|
30
|
-
- tools/cmdtlmserver/
|
31
|
-
- tools/cmdtlmserver/
|
32
|
-
- tools/cmdtlmserver/
|
33
|
-
- tools/cmdtlmserver/
|
34
|
-
- tools/cmdtlmserver/
|
35
|
-
- tools/cmdtlmserver/
|
36
|
-
- tools/cmdtlmserver/
|
37
|
-
- tools/cmdtlmserver/
|
38
|
-
- tools/cmdtlmserver/
|
39
|
-
- tools/cmdtlmserver/
|
40
|
-
- tools/cmdtlmserver/
|
41
|
-
- tools/cmdtlmserver/
|
42
|
-
- tools/cmdtlmserver/
|
43
|
-
- tools/cmdtlmserver/
|
44
|
-
- tools/cmdtlmserver/
|
45
|
-
- tools/cmdtlmserver/
|
46
|
-
- tools/cmdtlmserver/
|
47
|
-
- tools/cmdtlmserver/
|
48
|
-
- tools/cmdtlmserver/
|
49
|
-
- tools/cmdtlmserver/
|
50
|
-
- tools/cmdtlmserver/
|
51
|
-
- tools/cmdtlmserver/
|
52
|
-
- tools/cmdtlmserver/
|
53
|
-
- tools/cmdtlmserver/
|
54
|
-
- tools/cmdtlmserver/
|
55
|
-
- tools/cmdtlmserver/
|
56
|
-
- tools/cmdtlmserver/
|
57
|
-
- tools/cmdtlmserver/
|
58
|
-
- tools/cmdtlmserver/
|
59
|
-
- tools/cmdtlmserver/
|
60
|
-
- tools/cmdtlmserver/
|
61
|
-
- tools/cmdtlmserver/
|
62
|
-
- tools/cmdtlmserver/
|
63
|
-
- tools/cmdtlmserver/
|
64
|
-
- tools/cmdtlmserver/
|
65
|
-
- tools/cmdtlmserver/
|
66
|
-
- tools/cmdtlmserver/
|
67
|
-
- tools/cmdtlmserver/
|
68
|
-
- tools/cmdtlmserver/
|
69
|
-
- tools/cmdtlmserver/
|
70
|
-
- tools/cmdtlmserver/
|
71
|
-
- tools/cmdtlmserver/
|
72
|
-
- tools/cmdtlmserver/
|
73
|
-
- tools/cmdtlmserver/
|
74
|
-
- tools/cmdtlmserver/
|
75
|
-
- tools/cmdtlmserver/
|
76
|
-
- tools/cmdtlmserver/
|
77
|
-
- tools/cmdtlmserver/
|
78
|
-
- tools/cmdtlmserver/
|
79
|
-
- tools/cmdtlmserver/
|
80
|
-
- tools/cmdtlmserver/
|
81
|
-
- tools/cmdtlmserver/
|
82
|
-
- tools/cmdtlmserver/
|
83
|
-
- tools/cmdtlmserver/
|
84
|
-
- tools/cmdtlmserver/
|
85
|
-
- tools/cmdtlmserver/
|
86
|
-
- tools/cmdtlmserver/
|
87
|
-
- tools/cmdtlmserver/
|
88
|
-
- tools/cmdtlmserver/
|
89
|
-
- tools/cmdtlmserver/
|
90
|
-
- tools/cmdtlmserver/
|
91
|
-
- tools/cmdtlmserver/
|
92
|
-
- tools/cmdtlmserver/
|
93
|
-
- tools/cmdtlmserver/
|
94
|
-
- tools/cmdtlmserver/
|
95
|
-
- tools/cmdtlmserver/
|
96
|
-
- tools/cmdtlmserver/
|
97
|
-
- tools/cmdtlmserver/
|
98
|
-
- tools/cmdtlmserver/
|
26
|
+
- tools/cmdtlmserver/ArrayWidget-DzHELdHv-1cfde870ea63d4573d20.js
|
27
|
+
- tools/cmdtlmserver/ArrayplotWidget-BDvziGSm-e2d9fd0c66b39266dc7c.js
|
28
|
+
- tools/cmdtlmserver/BarColumn-CNhS2KKq-767c9486a4e443c42bc7.js
|
29
|
+
- tools/cmdtlmserver/BlockWidget-D0On4x3d-54b0f07404fece73b33e.js
|
30
|
+
- tools/cmdtlmserver/ButtonWidget-BOYLHMt4-6ab7fb97fe052d8802a6.js
|
31
|
+
- tools/cmdtlmserver/CanvasWidget-CQIqiLEy-8134fbc55f313a763f32.js
|
32
|
+
- tools/cmdtlmserver/CanvasdotWidget-BVWutPMF-f506e882c3236b53896a.js
|
33
|
+
- tools/cmdtlmserver/CanvasimageWidget-ayu_ASKf-7b3ed2be4b78024a32e9.js
|
34
|
+
- tools/cmdtlmserver/CanvasimagevalueWidget-mv319g5T-deaaf709ef21cf5db0e9.js
|
35
|
+
- tools/cmdtlmserver/CanvaslabelWidget-BNjbXDb8-8ceda00adbbd3da999d4.js
|
36
|
+
- tools/cmdtlmserver/CanvaslabelvalueWidget-CrhPwTSP-44116d33f8a81a77b89e.js
|
37
|
+
- tools/cmdtlmserver/CanvaslineWidget--HdKH6oO-72eb687891a0213a981a.js
|
38
|
+
- tools/cmdtlmserver/CanvaslinevalueWidget-CJsuF6RY-ce76d2dccf8f9edc4699.js
|
39
|
+
- tools/cmdtlmserver/CheckbuttonWidget-CQ2HlgIk-c98446c9ffe1e6405baa.js
|
40
|
+
- tools/cmdtlmserver/CmdPacketsTab-2c0c4903f7cd5e2d492f.js
|
41
|
+
- tools/cmdtlmserver/CmdTlmServer-d13edb0abf2c53a5bcbf.js
|
42
|
+
- tools/cmdtlmserver/ComboboxWidget-BxILACwz-cfb4c1ffd4cb57d959ac.js
|
43
|
+
- tools/cmdtlmserver/DateWidget-CIkO0xqH-d3da4940b3f961694415.js
|
44
|
+
- tools/cmdtlmserver/DetailsDialog-DyGpm5TP-c2adbdd157ab5f884f6f.js
|
45
|
+
- tools/cmdtlmserver/DynamicWidget-gFSYxzvT-c7ac8d6e5d3f41824765.js
|
46
|
+
- tools/cmdtlmserver/FormatvalueWidget-D8-EO_3E-2503055f4eccb3a4b79e.js
|
47
|
+
- tools/cmdtlmserver/Graph-EV7oK3qM-f7f07aa312f5934b97f9.js
|
48
|
+
- tools/cmdtlmserver/GraphWidget-BTNYbd21-fbea3cc94b9a4190d464.js
|
49
|
+
- tools/cmdtlmserver/HorizontalWidget-Bp-qtqoh-5637173d360666d3182e.js
|
50
|
+
- tools/cmdtlmserver/HorizontalboxWidget-CrJuGY3s-e2fe9300840c97ddddef.js
|
51
|
+
- tools/cmdtlmserver/HorizontallineWidget-CbxREBYI-61a8a8088971c3f08034.js
|
52
|
+
- tools/cmdtlmserver/IframeWidget-DusiWNNj-32cb5541afdd5fe67f67.js
|
53
|
+
- tools/cmdtlmserver/ImageLoader-BapCB-Li-f461eddb2af2e265fd48.js
|
54
|
+
- tools/cmdtlmserver/ImageviewerWidget-c0gJ9VDC-5af6501486a08bc8532e.js
|
55
|
+
- tools/cmdtlmserver/InterfacesTab-d900a3491d1da534368e.js
|
56
|
+
- tools/cmdtlmserver/LabelWidget-pPgc0ve3-a8c20e96febfb654ebbc.js
|
57
|
+
- tools/cmdtlmserver/LabelledWidget-CkNjby55-17d35c79064d8ced688b.js
|
58
|
+
- tools/cmdtlmserver/LabelprogressbarWidget-e2R2yQKw-32ba7d925d5938b9e647.js
|
59
|
+
- tools/cmdtlmserver/LabelsparklineWidget-D7MQ_oNw-6b2f73958f78cd48cf72.js
|
60
|
+
- tools/cmdtlmserver/LabelvalueWidget-4DShBBvr-2989613328b42b690607.js
|
61
|
+
- tools/cmdtlmserver/LabelvaluedescWidget-Z1m8Bi6N-84bd53d94bc877e5a83b.js
|
62
|
+
- tools/cmdtlmserver/LabelvaluelimitsbarWidget-DVa-oYxU-65dac25a645be58bc69d.js
|
63
|
+
- tools/cmdtlmserver/LabelvaluelimitscolumnWidget-DduuX632-da2af8fa3f16e0ca4bc6.js
|
64
|
+
- tools/cmdtlmserver/LabelvaluerangebarWidget-BR9vXOlt-b683cd94686b6a02b94f.js
|
65
|
+
- tools/cmdtlmserver/Layout-Bk8EGxbP-aa19b0fb74b246a1ce88.js
|
66
|
+
- tools/cmdtlmserver/LedWidget-f7bf8ls_-dc76da1106f2ea6ba1c1.js
|
67
|
+
- tools/cmdtlmserver/LimitsbarWidget-B7fHaDcJ-6401cd1dca32d9d23e9d.js
|
68
|
+
- tools/cmdtlmserver/LimitscolorWidget-CpC4D_TC-fa80d8dccfdbce9a3085.js
|
69
|
+
- tools/cmdtlmserver/LimitscolumnWidget-C9FbNC-U-69b1a5ce1e37519311a9.js
|
70
|
+
- tools/cmdtlmserver/LinegraphWidget-DkWDQ_3K-a2e11e9260d6be61a562.js
|
71
|
+
- tools/cmdtlmserver/MatrixbycolumnsWidget-CHJDyYa3-e7cbac8e29ec890726df.js
|
72
|
+
- tools/cmdtlmserver/ProgressbarWidget-CRZDxClT-97ca0eb1a7d82a61f1bf.js
|
73
|
+
- tools/cmdtlmserver/RadiobuttonWidget-BW4yFweH-303da45be9f3bc5c02ef.js
|
74
|
+
- tools/cmdtlmserver/RadiogroupWidget-_0bVCHjr-21b6a6a889648dc39713.js
|
75
|
+
- tools/cmdtlmserver/RangebarWidget-CEQFiG4l-88e919bc219c10974ea9.js
|
76
|
+
- tools/cmdtlmserver/RawDialog-4fc24b3a5134f08b5233.js
|
77
|
+
- tools/cmdtlmserver/RollupWidget-579c7y0R-6dc6a63ce8ba38021e87.js
|
78
|
+
- tools/cmdtlmserver/RoutersTab-bd726501304a35125437.js
|
79
|
+
- tools/cmdtlmserver/ScrollwindowWidget-Kcre9gM3-a4242c83569b10650eb0.js
|
80
|
+
- tools/cmdtlmserver/SignalWidget-D55Myd0q-82abf10be1d381cebe25.js
|
81
|
+
- tools/cmdtlmserver/SpacerWidget-DBDv_w_s-1a2edb5ee70ddb76a3b2.js
|
82
|
+
- tools/cmdtlmserver/SparklineWidget-DJvIL24z-aca49e14883f617297b1.js
|
83
|
+
- tools/cmdtlmserver/StatusTab-70f7f21eb7f45c574053.js
|
84
|
+
- tools/cmdtlmserver/TabbookWidget-DH9DHnp1-f9eb87a79548613c9d87.js
|
85
|
+
- tools/cmdtlmserver/TargetsTab-7af853e3096b44615549.js
|
86
|
+
- tools/cmdtlmserver/TextboxWidget-DCjIEzJn-1d6d9572908a65421217.js
|
87
|
+
- tools/cmdtlmserver/TextfieldWidget-BRQ6oPzR-fe6ec784f241da3b1dfb.js
|
88
|
+
- tools/cmdtlmserver/TimeWidget-pXtrK5IC-93e17a05d6ecf2eccade.js
|
89
|
+
- tools/cmdtlmserver/TitleWidget-CfAa2SyT-e9f3d1a8a71d4118fdd9.js
|
90
|
+
- tools/cmdtlmserver/TlmPacketsTab-60a107b4ac232aac2322.js
|
91
|
+
- tools/cmdtlmserver/Updater-ebc27e8a2a7fdd687c65.js
|
92
|
+
- tools/cmdtlmserver/VWidget-CN_afCKJ-b8a49f5b611e52c35dd5.js
|
93
|
+
- tools/cmdtlmserver/ValueWidget-DIFivXw_-c4ebf34840bab5aca614.js
|
94
|
+
- tools/cmdtlmserver/ValuelimitsbarWidget-Cb7_SIUF-dd0cab6a7600b9eb6fc8.js
|
95
|
+
- tools/cmdtlmserver/ValuelimitscolumnWidget-D8bgZ7YP-cc6ddac478a316c83821.js
|
96
|
+
- tools/cmdtlmserver/ValuerangebarWidget-VKygtFwP-545f2608d522c90b483d.js
|
97
|
+
- tools/cmdtlmserver/VerticalWidget-BuvedA_b-b5c11afb3b194946a478.js
|
98
|
+
- tools/cmdtlmserver/VerticalboxWidget-D_LcL3GF-ff10f59775ba060533af.js
|
99
|
+
- tools/cmdtlmserver/Widget-CERFa1CU-5311b94ad21a3c7b3574.js
|
100
|
+
- tools/cmdtlmserver/main-30c8b9128a62bc0a519c.js
|
99
101
|
- tools/cmdtlmserver/main.js
|
100
|
-
- tools/cmdtlmserver/services-
|
102
|
+
- tools/cmdtlmserver/services-7ecf8098cef34840e93e.js
|
101
103
|
homepage: https://github.com/OpenC3/cosmos
|
102
104
|
licenses:
|
103
105
|
- AGPL-3.0-only
|
@@ -1,2 +0,0 @@
|
|
1
|
-
System.register(["./main-fcf5991e219cb9464cd3.js","vue","./DetailsDialog-DiVcC3Fg-926dc00ae99f202f7bbb.js","single-spa","./VWidget-CGdM4sTw-a078921174583b0d9185.js","vue-router","vuex","vuetify","./Widget-C7ms_xDE-bce61b3f1521054f57a4.js"],function(S,T){"use strict";var h,a,u,c,i,d,p,l,g,f,v,w,y,x,C,V;return{setters:[t=>{h=t.s},t=>{a=t.resolveComponent,u=t.openBlock,c=t.createElementBlock,i=t.createVNode,d=t.normalizeClass,p=t.normalizeStyle,l=t.withCtx,g=t.Fragment,f=t.renderList,v=t.createBlock,w=t.withModifiers,y=t.createTextVNode,x=t.toDisplayString},t=>{C=t.P},null,t=>{V=t.L},null,null,null,null],execute:function(){const t={components:{DetailsDialog:C},data:function(){return{width:200,height:100,itemsPerRow:4,formatter:null}},mixins:[V],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=parseInt(this.parameters[6]))},methods:{getType:function(){let e="CONVERTED";return this.parameters[7]&&(e=this.parameters[7]),e},formatValue:function(e){var r;let s="",k=" ",D=`
|
2
|
-
`,o=0;if(Array.isArray(e)){for(const m of e)this.formatter&&((r=this.formatter)==null?void 0:r.toLowerCase())!=="nil"?s+=sprintf(this.formatter,m):s+=m,o+=1,o%this.itemsPerRow===0?(o=0,s+=D):s+=k;return s.trim()}else return e}}},_={class:"array-widget-container"};function B(e,r,s,k,D,o){const m=a("v-textarea"),M=a("v-list-item-title"),z=a("v-list-item"),L=a("v-list"),E=a("v-menu"),N=a("details-dialog");return u(),c("div",_,[i(m,{variant:"solo",density:"compact",readonly:"","no-resize":"","auto-grow":"",rows:"2","hide-details":"","model-value":e._value,class:d(e.valueClass),style:p([e.computedStyle,o.aging]),"data-test":"array-widget",onContextmenu:e.showContextMenu},null,8,["model-value","class","style","onContextmenu"]),i(E,{modelValue:e.contextMenuShown,"onUpdate:modelValue":r[0]||(r[0]=n=>e.contextMenuShown=n),target:[e.x,e.y]},{default:l(()=>[i(L,null,{default:l(()=>[(u(!0),c(g,null,f(e.contextMenuOptions,(n,P)=>(u(),v(z,{key:P,onClick:w(n.action,["stop"])},{default:l(()=>[i(M,null,{default:l(()=>[y(x(n.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),i(N,{"target-name":e.parameters[0],"packet-name":e.parameters[1],"item-name":e.parameters[2],modelValue:e.viewDetails,"onUpdate:modelValue":r[1]||(r[1]=n=>e.viewDetails=n)},null,8,["target-name","packet-name","item-name","modelValue"])])}const j=S("default",h(t,[["render",B],["__scopeId","data-v-62b9e9e1"]]))}}});
|
@@ -1,2 +0,0 @@
|
|
1
|
-
System.register(["./main-fcf5991e219cb9464cd3.js","vue","./DetailsDialog-DiVcC3Fg-926dc00ae99f202f7bbb.js","single-spa","./VWidget-CGdM4sTw-a078921174583b0d9185.js","vue-router","vuex","vuetify","./Widget-C7ms_xDE-bce61b3f1521054f57a4.js"],function(S,L){"use strict";var u,a,h,m,s,p,g,o,w,f,v,x,y,C,V,k;return{setters:[e=>{u=e.s},e=>{a=e.resolveComponent,h=e.openBlock,m=e.createElementBlock,s=e.createVNode,p=e.normalizeClass,g=e.normalizeStyle,o=e.withCtx,w=e.Fragment,f=e.renderList,v=e.createBlock,x=e.withModifiers,y=e.createTextVNode,C=e.toDisplayString},e=>{V=e.P},null,e=>{k=e.L},null,null,null,null],execute:function(){const e={components:{DetailsDialog:V},data:function(){return{width:400,height:400,bytesPerWord:4,wordsPerRow:4,addrFormat:null,formatter:"%02X"}},mixins:[k],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=parseInt(this.parameters[6])),this.parameters[7]&&(this.wordsPerRow=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 r="";if(t&&t.raw){let D=" ",P=`
|
2
|
-
`,i=0,l=0;const d=this.bytesPerWord*this.wordsPerRow;for(const c of t.raw)this.addrFormat&&i===0&&(r+=sprintf(this.addrFormat,l),l+=d),r+=sprintf(this.formatter,c),i+=1,i%d===0?(i=0,r+=P):i%this.bytesPerWord===0&&(r+=D)}else r=t;return r}}},M={class:"block-widget-container"};function W(t,r,D,P,i,l){const d=a("v-textarea"),c=a("v-list-item-title"),_=a("v-list-item"),F=a("v-list"),B=a("v-menu"),b=a("details-dialog");return h(),m("div",M,[s(d,{variant:"solo",density:"compact",readonly:"","no-resize":"","hide-details":"",rows:l.rows,width:t.width,"model-value":t._value,class:p(t.valueClass),style:g([t.computedStyle,l.aging]),"data-test":"valueText",onContextmenu:t.showContextMenu},null,8,["rows","width","model-value","class","style","onContextmenu"]),s(B,{modelValue:t.contextMenuShown,"onUpdate:modelValue":r[0]||(r[0]=n=>t.contextMenuShown=n),target:[t.x,t.y]},{default:o(()=>[s(F,null,{default:o(()=>[(h(!0),m(w,null,f(t.contextMenuOptions,(n,z)=>(h(),v(_,{key:z,onClick:x(n.action,["stop"])},{default:o(()=>[s(c,null,{default:o(()=>[y(C(n.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),s(b,{"target-name":t.parameters[0],"packet-name":t.parameters[1],"item-name":t.parameters[2],modelValue:t.viewDetails,"onUpdate:modelValue":r[1]||(r[1]=n=>t.viewDetails=n)},null,8,["target-name","packet-name","item-name","modelValue"])])}const N=S("default",u(e,[["render",W],["__scopeId","data-v-4d4589c2"]]))}}});
|
@@ -1 +0,0 @@
|
|
1
|
-
System.register(["./Layout-D4YBjuWs-d949f0668cb092f7f268.js","vue","./main-fcf5991e219cb9464cd3.js","./Widget-C7ms_xDE-bce61b3f1521054f57a4.js","vue-router","single-spa","vuex","vuetify"],function(p,f){"use strict";var i,n,s,a,l,c,u,m,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,m=e.mergeProps},e=>{o=e.s},null,null,null,null,null],execute:function(){const e={mixins:[i],computed:{width(){return this.parameters[0]+"px"},height(){return this.parameters[1]+"px"}}},h=["width","height"];function d(r,k,y,B,x,g){return n(),s("svg",{id:"canvas",width:g.width,height:g.height},[(n(!0),s(a,null,l(r.widgets,(t,v)=>(n(),c(u(t.type),m({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,h)}const w=p("default",o(e,[["render",d],["__scopeId","data-v-47bdfc3c"]]))}}});
|
@@ -1 +0,0 @@
|
|
1
|
-
System.register(["./Widget-C7ms_xDE-bce61b3f1521054f57a4.js","vue","./main-fcf5991e219cb9464cd3.js","vue-router","single-spa","vuex","vuetify"],function(c,a){"use strict";var t,l,n,s;return{setters:[e=>{t=e.o},e=>{l=e.openBlock,n=e.createElementBlock},e=>{s=e.s},null,null,null,null],execute:function(){const e={mixins:[t]},u=["cx","cy","r","fill"];function i(r,m,f,p,x,v){return l(),n("circle",{cx:r.parameters[0],cy:r.parameters[1],r:r.parameters[3],fill:r.parameters[2]},null,8,u)}const o=c("default",s(e,[["render",i]]))}}});
|
@@ -1 +0,0 @@
|
|
1
|
-
System.register(["./Widget-C7ms_xDE-bce61b3f1521054f57a4.js","vue","./main-fcf5991e219cb9464cd3.js","vue-router","single-spa","vuex","vuetify"],function(o,m){"use strict";var r,l,n,s,i;return{setters:[e=>{r=e.o},e=>{l=e.openBlock,n=e.createElementBlock,s=e.toDisplayString},e=>{i=e.s},null,null,null,null],execute:function(){const e={mixins:[r],computed:{fillColor(){return this.parameters[3]?this.parameters[3]:"black"}}},a=["x","y","fill"];function u(t,f,x,y,g,c){return l(),n("text",{x:t.parameters[0],y:t.parameters[1],fill:c.fillColor},s(t.parameters[2]),9,a)}const p=o("default",i(e,[["render",u]]))}}});
|
@@ -1 +0,0 @@
|
|
1
|
-
System.register(["./Widget-C7ms_xDE-bce61b3f1521054f57a4.js","vue","./main-fcf5991e219cb9464cd3.js","vue-router","single-spa","vuex","vuetify"],function(i,p){"use strict";var s,l,n,a,c;return{setters:[e=>{s=e.o},e=>{l=e.openBlock,n=e.createElementBlock,a=e.normalizeStyle},e=>{c=e.s},null,null,null,null],execute:function(){const e={mixins:[s],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 o(t,r,x,k,f,m){return l(),n("line",{x1:t.parameters[0],y1:t.parameters[1],x2:t.parameters[2],y2:t.parameters[3],style:a(m.calcStyle)},null,12,u)}const y=i("default",c(e,[["render",o]]))}}});
|
@@ -1 +0,0 @@
|
|
1
|
-
System.register(["./Widget-C7ms_xDE-bce61b3f1521054f57a4.js","vue","./main-fcf5991e219cb9464cd3.js","vue-router","single-spa","vuex","vuetify"],function(u,o){"use strict";var a,r,l,i,n;return{setters:[t=>{a=t.o},t=>{r=t.openBlock,l=t.createElementBlock,i=t.normalizeStyle},t=>{n=t.s},null,null,null,null],execute:function(){const t={mixins:[a],data(){return{valueId:0,valueMap:{}}},computed:{calcStyle(){let e="black";this.screenValues[this.valueId]&&(e=this.valueMap[this.screenValues[this.valueId][0]]);let s=1;return this.parameters[7]&&(s=this.parameters[7]),"stroke:"+e+";stroke-width:"+s}},created(){this.appliedSettings.forEach(s=>{s[0]==="VALUE_EQ"&&(this.valueMap[s[1]]=s[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 c(e,s,d,v,y,h){return r(),l("line",{x1:e.parameters[3],y1:e.parameters[4],x2:e.parameters[5],y2:e.parameters[6],style:i(h.calcStyle)},null,12,m)}const p=u("default",n(t,[["render",c]]))}}});
|
@@ -1 +0,0 @@
|
|
1
|
-
System.register(["./Widget-C7ms_xDE-bce61b3f1521054f57a4.js","vue","./main-fcf5991e219cb9464cd3.js","vue-router","single-spa","vuex","vuetify"],function(c,h){"use strict";var t,s,a,n,o,r;return{setters:[e=>{t=e.o},e=>{s=e.resolveComponent,a=e.openBlock,n=e.createBlock,o=e.normalizeStyle},e=>{r=e.s},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 i(m,u,k,y,l,b){const d=s("v-checkbox");return a(),n(d,{"hide-details":"",density:"compact",label:l.label,modelValue:l.value,"onUpdate:modelValue":u[0]||(u[0]=v=>l.value=v),style:o(m.computedStyle)},null,8,["label","modelValue","style"])}const p=c("default",r(e,[["render",i]]))}}});
|
@@ -1 +0,0 @@
|
|
1
|
-
System.register(["./Widget-C7ms_xDE-bce61b3f1521054f57a4.js","vue","./main-fcf5991e219cb9464cd3.js","vue-router","single-spa","vuex","vuetify"],function(i,p){"use strict";var l,s,n,o,r,u;return{setters:[e=>{l=e.o},e=>{s=e.resolveComponent,n=e.openBlock,o=e.createBlock,r=e.normalizeStyle},e=>{u=e.s},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,a,h,f,t,x){const v=s("v-select");return n(),o(v,{"hide-details":"",density:"compact",variant:"outlined",items:t.items,modelValue:t.value,"onUpdate:modelValue":a[0]||(a[0]=d=>t.value=d),style:r(m.computedStyle)},null,8,["items","modelValue","style"])}const y=i("default",u(e,[["render",c]]))}}});
|
@@ -1 +0,0 @@
|
|
1
|
-
System.register(["./main-fcf5991e219cb9464cd3.js","vue","./Widget-C7ms_xDE-bce61b3f1521054f57a4.js"],function(j,Se){"use strict";var L,B,J,M,Q,q,P,R,ee,H,te,u,w,Y,ie,a,l,I,ae,b,T,m,N,S,x,E,se,le,Z,re,oe,ne;return{setters:[c=>{L=c.s,B=c.P,J=c.O,M=c.$,Q=c.b,q=c.c,P=c.d,R=c.l,ee=c.F,H=c.y,te=c.z},c=>{u=c.resolveComponent,w=c.openBlock,Y=c.createElementBlock,ie=c.withModifiers,a=c.createVNode,l=c.withCtx,I=c.withDirectives,ae=c.normalizeClass,b=c.createElementVNode,T=c.mergeProps,m=c.createTextVNode,N=c.vShow,S=c.toDisplayString,x=c.createBlock,E=c.createCommentVNode,se=c.normalizeProps,le=c.guardReactiveProps,Z=c.withKeys,re=c.Fragment,oe=c.renderList},c=>{ne=c.o}],execute:function(){const c={props:{modelValue:Boolean,title:{type:String,required:!0},legendPosition:{type:String,required:!0},items:{type:Array,required:!0},graphMinY:{type:Number},graphMaxY:{type:Number},lines:{type:Array,required:!0},colors:{type:Array,required:!0},startDateTime:{type:Number},endDateTime:{type:Number},timeZone:{type:String,required:!0}},mixins:[B],data:function(){return{tab:0,graph:{},legendPositions:["top","bottom","left","right"],startDate:null,startTime:null,endDate:null,endTime:null,lineHeaders:[{title:"Y Value",value:"yValue"},{title:"Color",value:"color"},{title:"Actions",value:"actions",sortable:!1}],itemHeaders:[{title:"Target Name",value:"targetName"},{title:"Packet Name",value:"packetName"},{title:"Item Name",value:"itemName"},{title:"Actions",value:"actions",sortable:!1}],rules:{date:t=>{if(!t)return!0;try{return q(P(t,"yyyy-MM-dd",new Date))||"Invalid date (YYYY-MM-DD)"}catch{return"Invalid date (YYYY-MM-DD)"}},time:t=>{if(!t)return!0;try{return q(P(t,"HH:mm:ss",new Date))||"Invalid time (HH:MM:SS)"}catch{return"Invalid time (HH:MM:SS)"}}}}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}},editItems:function(){if(!this.items)return[];let t=0;return this.items.map(e=>(t+=1,{...e,itemId:t}))}},created(){if(this.graph={title:this.title,legendPosition:this.legendPosition,items:this.items,graphMinY:this.graphMinY,graphMaxY:this.graphMaxY,lines:[...this.lines]},this.startDateTime){let t=R(this.startDateTime/1e6);this.startDate=this.formatDate(t,this.timeZone),this.startTime=this.formatTimeHMS(t,this.timeZone)}else{let t=new Date-36e5;this.startDate=this.formatDate(t,this.timeZone),this.startTime=this.formatTimeHMS(t,this.timeZone)}if(this.endDateTime){let t=R(this.endDateTime/1e6);this.endDate=this.formatDate(t,this.timeZone),this.endTime=this.formatTimeHMS(t,this.timeZone)}},methods:{closeOk(){this.startDate&&this.startTime?this.graph.startDateTime=this.startDate+" "+this.startTime:this.graph.startDateTime=null,this.endDate&&this.endTime?this.graph.endDateTime=this.endDate+" "+this.endTime:this.graph.endDateTime=null,this.$emit("ok",this.graph)},addLine(){this.graph.lines.push({yValue:0,color:"white"})},removeLine(t){let e=this.graph.lines.indexOf(t);this.graph.lines.splice(e,1)}}},de={class:"edit-box"},he={class:"edit-box"},ue={class:"edit-box"},me={class:"edit-box"};function ce(t,e,i,n,s,r){const d=u("v-spacer"),o=u("v-toolbar"),v=u("v-tab"),p=u("v-tabs"),y=u("v-text-field"),D=u("v-card-text"),_=u("v-col"),k=u("v-select"),f=u("v-row"),G=u("v-tabs-window-item"),z=u("v-btn"),A=u("v-list-item"),V=u("v-icon"),C=u("v-tooltip"),$=u("v-list"),U=u("v-data-table"),F=u("v-tabs-window"),K=u("v-card-actions"),h=u("v-card"),W=u("v-dialog");return w(),x(W,{modelValue:r.show,"onUpdate:modelValue":e[12]||(e[12]=g=>r.show=g),onKeydown:e[13]||(e[13]=Z(g=>t.$emit("cancel"),["esc"])),"max-width":"700"},{default:l(()=>[a(o,{height:"24"},{default:l(()=>[a(d),e[14]||(e[14]=b("span",null," Edit Graph ",-1)),a(d)]),_:1}),a(h,{class:"pa-3"},{default:l(()=>[a(p,{modelValue:t.tab,"onUpdate:modelValue":e[0]||(e[0]=g=>t.tab=g),class:"ml-3"},{default:l(()=>[a(v,{value:"0"},{default:l(()=>e[15]||(e[15]=[m(" Settings ")])),_:1}),a(v,{value:"1"},{default:l(()=>e[16]||(e[16]=[m(" Scale / Lines ")])),_:1}),a(v,{value:"2"},{default:l(()=>e[17]||(e[17]=[m(" Items ")])),_:1})]),_:1},8,["modelValue"]),a(F,{modelValue:t.tab,"onUpdate:modelValue":e[10]||(e[10]=g=>t.tab=g)},{default:l(()=>[a(G,{value:"0",eager:""},{default:l(()=>[b("div",de,[a(f,null,{default:l(()=>[a(_,null,{default:l(()=>[a(D,{class:"pa-0"},{default:l(()=>[a(y,{class:"pb-2",label:"Title",modelValue:t.graph.title,"onUpdate:modelValue":e[1]||(e[1]=g=>t.graph.title=g),"hide-details":""},null,8,["modelValue"])]),_:1})]),_:1}),a(_,null,{default:l(()=>[a(k,{label:"Legend Position","hide-details":"",items:t.legendPositions,modelValue:t.graph.legendPosition,"onUpdate:modelValue":e[2]||(e[2]=g=>t.graph.legendPosition=g),style:{"max-width":"280px"}},null,8,["items","modelValue"])]),_:1})]),_:1})]),b("div",he,[a(D,{class:"pa-0"},{default:l(()=>e[18]||(e[18]=[m(" Select a start date/time for the graph. Leave blank for start now. ")])),_:1}),a(f,null,{default:l(()=>[a(_,null,{default:l(()=>[a(y,{label:"Start Date",name:`date${Date.now()}`,rules:[t.rules.date],modelValue:t.startDate,"onUpdate:modelValue":e[3]||(e[3]=g=>t.startDate=g),type:"date"},null,8,["name","rules","modelValue"])]),_:1}),a(_,null,{default:l(()=>[a(y,{label:"Start Time",name:`time${Date.now()}`,rules:[t.rules.time],modelValue:t.startTime,"onUpdate:modelValue":e[4]||(e[4]=g=>t.startTime=g),type:"time",step:"1"},null,8,["name","rules","modelValue"])]),_:1})]),_:1}),a(D,{class:"pa-0"},{default:l(()=>e[19]||(e[19]=[m(" Select a end date/time for the graph. Leave blank for continuous real-time graphing. ")])),_:1}),a(f,null,{default:l(()=>[a(_,null,{default:l(()=>[a(y,{label:"End Date",name:`date${Date.now()}`,rules:[t.rules.date],modelValue:t.endDate,"onUpdate:modelValue":e[5]||(e[5]=g=>t.endDate=g),type:"date"},null,8,["name","rules","modelValue"])]),_:1}),a(_,null,{default:l(()=>[a(y,{label:"End Time",name:`time${Date.now()}`,rules:[t.rules.time],modelValue:t.endTime,"onUpdate:modelValue":e[6]||(e[6]=g=>t.endTime=g),type:"time",step:"1"},null,8,["name","rules","modelValue"])]),_:1})]),_:1})])]),_:1}),a(G,{value:"1",eager:""},{default:l(()=>[b("div",ue,[a(D,{class:"pa-0"},{default:l(()=>e[20]||(e[20]=[m(" Set a min or max Y value to override automatic scaling ")])),_:1}),a(f,{dense:""},{default:l(()=>[a(_,{class:"px-2"},{default:l(()=>[a(y,{"hide-details":"",label:"Min Y Axis (Optional)",modelValue:t.graph.graphMinY,"onUpdate:modelValue":e[7]||(e[7]=g=>t.graph.graphMinY=g),type:"number"},null,8,["modelValue"])]),_:1}),a(_,{class:"px-2"},{default:l(()=>[a(y,{"hide-details":"",label:"Max Y Axis (Optional)",modelValue:t.graph.graphMaxY,"onUpdate:modelValue":e[8]||(e[8]=g=>t.graph.graphMaxY=g),type:"number"},null,8,["modelValue"])]),_:1})]),_:1})]),b("div",me,[a($,{density:"compact",class:"horizontal-lines"},{default:l(()=>[a(A,null,{default:l(()=>[e[22]||(e[22]=b("span",{style:{"padding-top":"5px"}}," Add horizontal lines to the graph ",-1)),a(d),a(z,{onClick:e[9]||(e[9]=g=>r.addLine())},{default:l(()=>e[21]||(e[21]=[m(" New Line ")])),_:1})]),_:1}),(w(!0),Y(re,null,oe(t.graph.lines,(g,X)=>(w(),x(A,{key:X,value:g,color:"primary"},{default:l(()=>[a(f,null,{default:l(()=>[a(_,null,{default:l(()=>[a(y,{label:"Y Value",modelValue:g.yValue,"onUpdate:modelValue":O=>g.yValue=O},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),a(_,null,{default:l(()=>[a(k,{label:"Color","hide-details":"",items:i.colors,modelValue:g.color,"onUpdate:modelValue":O=>g.color=O},null,8,["items","modelValue","onUpdate:modelValue"])]),_:2},1024),a(_,null,{default:l(()=>[a(C,{text:"Remove",location:"top"},{activator:l(({props:O})=>[a(V,T({ref_for:!0},O,{style:{padding:"30px"},onClick:Ye=>r.removeLine(g)}),{default:l(()=>e[23]||(e[23]=[m("mdi-delete")])),_:2},1040,["onClick"])]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1032,["value"]))),128))]),_:1})])]),_:1}),a(G,{value:"2",eager:""},{default:l(()=>[a(U,{"item-key":"itemId",class:"elevation-1 my-2","data-test":"edit-graph-items",headers:t.itemHeaders,items:r.editItems,"items-per-page":5,"footer-props":{"items-per-page-options":[5]}},{"item.actions":l(({item:g})=>[a(C,{text:"Remove",location:"top"},{activator:l(({props:X})=>[a(V,T(X,{onClick:O=>t.$emit("remove",g)}),{default:l(()=>e[24]||(e[24]=[m(" mdi-delete ")])),_:2},1040,["onClick"])]),_:2},1024)]),"no-data":l(()=>e[25]||(e[25]=[b("span",null," Currently no items on this graph ",-1)])),_:1},8,["headers","items"])]),_:1})]),_:1},8,["modelValue"]),a(K,{class:"px-2"},{default:l(()=>[a(d),a(z,{variant:"outlined",onClick:e[11]||(e[11]=g=>t.$emit("cancel"))},{default:l(()=>e[26]||(e[26]=[m(" Cancel ")])),_:1}),a(z,{variant:"flat",onClick:r.closeOk},{default:l(()=>e[27]||(e[27]=[m(" Ok ")])),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])}const pe=L(c,[["render",ce]]),ge={props:{modelValue:Boolean,item:{type:Object,required:!0},colors:{type:Array,required:!0}},data:function(){return{editItem:null,limitsName:"NONE",limits:{NONE:[]},valueTypes:["CONVERTED","RAW"],reduction:[{title:"NONE",value:"DECOM"},{title:"REDUCED_MINUTE",value:"REDUCED_MINUTE"},{title:"REDUCED_HOUR",value:"REDUCED_HOUR"},{title:"REDUCED_DAY",value:"REDUCED_DAY"}],reducedTypes:["MIN","MAX","AVG","STDDEV"]}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}},limitsNames(){return Object.keys(this.limits)}},async created(){this.editItem={...this.item},new ee().get_item(this.item.targetName,this.item.packetName,this.item.itemName).then(t=>{for(const[e,i]of Object.entries(t.limits))Object.keys(i).includes("red_low")&&(this.limits[e]=Object.values(i));this.limitsName=Object.keys(this.limits).find(e=>this.limits[e]+""==this.editItem.limits+"")})}},fe={key:0},ve={class:"pa-3"};function ye(t,e,i,n,s,r){const d=u("v-card-title"),o=u("v-select"),v=u("v-card-text"),p=u("v-spacer"),y=u("v-btn"),D=u("v-card-actions"),_=u("v-card"),k=u("v-dialog");return w(),x(k,{modelValue:r.show,"onUpdate:modelValue":e[9]||(e[9]=f=>r.show=f),width:"400",onKeydown:e[10]||(e[10]=Z(f=>t.success(),["enter"]))},{default:l(()=>[a(_,null,{default:l(()=>[a(d,{class:"mb-2"},{default:l(()=>e[11]||(e[11]=[m("Edit Item")])),_:1}),a(v,null,{default:l(()=>[a(o,{variant:"outlined","hide-details":"",label:"Value Type",items:t.valueTypes,modelValue:t.editItem.valueType,"onUpdate:modelValue":e[0]||(e[0]=f=>t.editItem.valueType=f),class:"mb-2"},null,8,["items","modelValue"]),a(o,{variant:"outlined","hide-details":"",label:"Reduction",items:t.reduction,modelValue:t.editItem.reduced,"onUpdate:modelValue":e[1]||(e[1]=f=>t.editItem.reduced=f),class:"mb-2"},null,8,["items","modelValue"]),a(o,{variant:"outlined","hide-details":"",label:"Reduced Type",items:t.reducedTypes,disabled:t.editItem.reduced==="DECOM",modelValue:t.editItem.reducedType,"onUpdate:modelValue":e[2]||(e[2]=f=>t.editItem.reducedType=f),class:"mb-2"},null,8,["items","disabled","modelValue"]),a(o,{variant:"outlined","hide-details":"",label:"Color",items:i.colors,modelValue:t.editItem.color,"onUpdate:modelValue":[e[3]||(e[3]=f=>t.editItem.color=f),e[4]||(e[4]=f=>t.$emit("changeColor",f))],class:"mb-2"},null,8,["items","modelValue"]),r.limitsNames.length>1?(w(),Y("div",fe,[a(o,{variant:"outlined","hide-details":"",label:"Display Limits",items:r.limitsNames,modelValue:t.limitsName,"onUpdate:modelValue":[e[5]||(e[5]=f=>t.limitsName=f),e[6]||(e[6]=f=>t.$emit("changeLimits",t.limits[t.limitsName]))]},null,8,["items","modelValue"]),b("div",ve,S(t.limitsName)+": "+S(t.limits[t.limitsName]),1)])):E("",!0)]),_:1}),a(D,{class:"px-2"},{default:l(()=>[a(p),a(y,{variant:"outlined",onClick:e[7]||(e[7]=f=>t.$emit("cancel"))},{default:l(()=>e[12]||(e[12]=[m(" Cancel ")])),_:1}),a(y,{variant:"flat",onClick:e[8]||(e[8]=f=>t.$emit("close",t.editItem))},{default:l(()=>e[13]||(e[13]=[m(" Ok ")])),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const we=L(ge,[["render",ye]]),be={components:{GraphEditDialog:pe,GraphEditItemDialog:we},props:{id:{type:Number,required:!0},selectedGraphId:{type:Number},state:{type:String,required:!0},startTime:{type:Number},secondsGraphed:{type:Number,required:!0},pointsSaved:{type:Number,required:!0},pointsGraphed:{type:Number,required:!0},refreshIntervalMs:{type:Number,default:200},hideToolbar:{type:Boolean,default:!1},hideOverview:{type:Boolean,default:!1},sparkline:{type:Boolean,default:!1},initialItems:{type:Array},height:{type:Number},width:{type:Number},timeZone:{type:String,default:"local"}},mixins:[B],data(){return{lines:[],active:!0,expand:!0,fullWidth:!0,fullHeight:!0,graph:null,editGraph:!1,editGraphMenu:!1,editGraphMenuX:0,editGraphMenuY:0,editItem:!1,itemMenu:!1,itemMenuX:0,itemMenuY:0,legendMenu:!1,legendMenuX:0,legendMenuY:0,legendPosition:"bottom",selectedItem:null,hideToolbarData:this.hideToolbar,showOverview:!this.hideOverview,hideOverviewData:this.hideOverview,title:"",overview:null,data:[[]],dataChanged:!1,timeout:null,graphMinY:null,graphMaxY:null,graphStartDateTime:null,graphEndDateTime:null,indexes:{},items:this.initialItems||[],limitsValues:[],drawInterval:null,zoomChart:!1,zoomOverview:!1,cable:new J,subscription:null,needToUpdate:!1,errorDialog:!1,errors:[],colorIndex:0,colors:["#00c7cb","#938bdb","#4dacff","lime","darkorange","red","gold","hotpink","tan","cyan","maroon","blue","teal","purple","green","brown","lightblue","white","black"]}},computed:{calcFullSize:function(){return this.fullWidth||this.fullHeight},error:function(){return this.errorDialog&&this.errors.length>0?JSON.stringify(this.errors,null,4):null}},created(){this.title=`Graph ${this.id}`;for(const[t,e]of this.items.entries())this.data.push([]),this.indexes[this.subscriptionKey(e)]=t+1,e.color===void 0&&(e.color=this.colors[this.colorIndex]),this.colorIndex++,this.colorIndex===this.colors.length&&(this.colorIndex=0)},mounted(){const{chartSeries:t,overviewSeries:e}=this.items.reduce((n,s)=>{const r={spanGaps:!0};return n.chartSeries.push({...r,item:s,label:this.formatLabel(s),stroke:(d,o)=>this.items[o-1].color,width:2,value:(d,o)=>typeof o=="string"||isNaN(o)?"NaN":o==null?"--":o.toFixed(3)}),n.overviewSeries.push({...r}),n},{chartSeries:[],overviewSeries:[]});let i={};if(this.sparkline)this.hideToolbarData=!0,this.hideOverviewData=!0,this.showOverview=!1,i={width:this.width,height:this.height,pxAlign:!1,cursor:{show:!1},select:{show:!1},legend:{show:!1},scales:{x:{time:!1}},axes:[{show:!1},{show:!1}],series:[{},{stroke:"white"}]},this.graph=new M(i,this.data,document.getElementById(`chart${this.id}`));else{let n=Intl.DateTimeFormat().resolvedOptions().timeZone;this.timeZone&&this.timeZone!=="local"&&(n=this.timeZone),i={...this.getSize("chart"),...this.getScales(),...this.getAxes("chart"),plugins:[this.linesPlugin()],tzDate:r=>M.tzDate(new Date(r*1e3),n),series:[{label:"Time",value:(r,d)=>d==null?"--":this.formatSeconds(d,this.timeZone)},...t],cursor:{drag:{x:!0,y:!1},sync:{key:"openc3"},bind:{mouseup:(r,d,o)=>v=>{this.state==="pause"&&r.select.width===0&&this.$emit("start"),o(v)}}},hooks:{setScale:[(r,d)=>{if(d==="x"&&!this.zoomOverview&&this.overview){this.zoomChart=!0;let o=Math.round(this.overview.valToPos(r.scales.x.min,"x")),v=Math.round(this.overview.valToPos(r.scales.x.max,"x"));this.overview.setSelect({left:o,width:v-o}),this.zoomChart=!1}}],setSelect:[r=>{this.state==="start"&&r.select.width>0&&this.$emit("pause")}],ready:[r=>{r.root.querySelector(".u-over").addEventListener("contextmenu",o=>{o.preventDefault(),this.itemMenu=!1,this.legendMenu=!1,this.editGraphMenuX=o.clientX,this.editGraphMenuY=o.clientY,this.editGraphMenu=!0});let d=r.root.querySelector(".u-legend");d.addEventListener("contextmenu",o=>{o.preventDefault(),this.editGraphMenu=!1,this.legendMenu=!1,this.itemMenuX=o.clientX,this.itemMenuY=o.clientY;let v=o.target.closest(".u-series"),p=Array.prototype.slice.call(d.childNodes[0].childNodes).indexOf(v),y=r.series[p];y.item?(this.selectedItem=y.item,this.itemMenu=!0):(this.itemMenu=!1,this.legendMenuX=o.clientX,this.legendMenuY=o.clientY,this.legendMenu=!0)}),d.querySelector("tbody").appendChild(this.$refs.info)}]}},this.graph=new M(i,this.data,document.getElementById(`chart${this.id}`));const s={...this.getSize("overview"),...this.getScales(),...this.getAxes("overview"),tzDate:r=>M.tzDate(new Date(r*1e3),n),series:[...e],cursor:{y:!1,drag:{setScale:!1,x:!0,y:!1}},legend:{show:!1},hooks:{setSelect:[r=>{if(!this.zoomChart){this.state==="start"&&r.select.width>0&&this.$emit("pause"),this.zoomOverview=!0;let d=r.posToVal(r.select.left,"x"),o=r.posToVal(r.select.left+r.select.width,"x");this.graph.setScale("x",{min:d,max:o}),this.zoomOverview=!1}}]}};this.overview=new M(s,this.data,document.getElementById(`overview${this.id}`)),this.moveLegend(this.legendPosition),window.addEventListener("resize",this.resize)}this.state!=="stop"&&this.startGraph()},beforeUnmount:function(){this.stopGraph(),this.cable.disconnect(),window.removeEventListener("resize",this.resize)},watch:{state:function(t,e){switch(t){case"start":e==="stop"&&this.startGraph();break;case"stop":this.stopGraph();break}},data:function(t,e){this.dataChanged=!0},graphMinY:function(t,e){let i=parseFloat(t);isNaN(i)||(this.graphMinY=i),this.setGraphRange()},graphMaxY:function(t,e){let i=parseFloat(t);isNaN(i)||(this.graphMaxY=i),this.setGraphRange()},graphStartDateTime:function(t,e){t&&typeof t=="string"?(this.graphStartDateTime=this.parseDateTime(this.graphStartDateTime,this.timeZone)*1e6,this.graphStartDateTime!==e&&(this.needToUpdate=!0)):t===null&&e&&(this.graphStartDateTime=null,this.needToUpdate=!0)},graphEndDateTime:function(t,e){t&&typeof t=="string"?(this.graphEndDateTime=this.parseDateTime(this.graphEndDateTime,this.timeZone)*1e6,this.graphEndDateTime!==e&&(this.needToUpdate=!0)):t===null&&e&&(this.graphEndDateTime=null,this.needToUpdate=!0)}},methods:{startGraph:function(){this.subscribe(),this.timeout=setTimeout(()=>{this.updateTimeout()},this.refreshIntervalMs)},stopGraph:function(){this.subscription&&(this.subscription.unsubscribe(),this.subscription=null),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},updateTimeout:function(){this.updateGraphData(),this.timeout=setTimeout(()=>{this.updateTimeout()},this.refreshIntervalMs)},updateGraphData:function(){if(this.state==="pause"||!this.dataChanged)return;this.graph.setData(this.data),this.overview&&this.overview.setData(this.data);let t=this.data[0][this.data[0].length-1],e=this.data[0][this.data[0].length-this.pointsGraphed],i=this.data[0][0];i<t-this.secondsGraphed&&(i=t-this.secondsGraphed),e>i&&(i=e),this.graph.setScale("x",{min:i,max:t}),this.dataChanged=!1},formatLabel(t){if(t.valueType==="CONVERTED"&&t.reduced==="DECOM")return t.itemName;{let e="";return t.valueType!=="CONVERTED"&&(e+=t.valueType),t.reduced!=="DECOM"&&(e!==""&&(e+=" "),e+=`${t.reduced.split("_")[1]} ${t.reducedType}`),`${t.itemName} (${e})`}},moveLegend:function(t){switch(t){case"bottom":this.graph.root.classList.remove("side-legend"),this.graph.root.classList.remove("left-legend"),this.graph.root.classList.remove("top-legend");break;case"top":this.graph.root.classList.remove("side-legend"),this.graph.root.classList.remove("left-legend"),this.graph.root.classList.add("top-legend");break;case"left":this.graph.root.classList.remove("top-legend"),this.graph.root.classList.add("side-legend"),this.graph.root.classList.add("left-legend");break;case"right":this.graph.root.classList.remove("top-legend"),this.graph.root.classList.remove("left-legend"),this.graph.root.classList.add("side-legend");break}this.legendPosition=t,this.resize()},clearErrors:function(){this.errors=[]},editGraphClose:function(t){this.editGraph=!1,this.title=t.title,this.legendPosition=t.legendPosition,this.graphMinY=t.graphMinY,this.graphMaxY=t.graphMaxY,this.lines=[...t.lines],this.graphStartDateTime=t.startDateTime,this.graphEndDateTime=t.endDateTime,this.$nextTick(()=>{if(this.needToUpdate){if(this.subscription==null)this.startGraph();else{let e=JSON.parse(JSON.stringify(this.items));this.removeItems(e),setTimeout(()=>{this.addItems(e)},0)}this.needToUpdate=!1}}),this.moveLegend(this.legendPosition),this.$emit("edit")},resize:function(){this.graph.setSize(this.getSize("chart")),this.overview&&this.overview.setSize(this.getSize("overview")),this.$emit("resize",this.id)},expandAll:function(){this.fullWidth=!0,this.fullHeight=!0,this.resize()},collapseAll:function(){this.fullWidth=!1,this.fullHeight=!1,this.resize()},expandWidth:function(){this.fullWidth=!0,this.resize()},collapseWidth:function(){this.fullWidth=!1,this.resize()},expandHeight:function(){this.fullHeight=!0,this.resize()},collapseHeight:function(){this.fullHeight=!1,this.resize()},minMaxTransition:function(){this.expand=!this.expand,this.$emit("min-max-graph",this.id)},setGraphRange:function(){let t=.1;(this.graphMinY||this.graphMinY===0||this.graphMaxY||this.graphMaxY===0)&&(t=0),this.graph.scales.y.range=(e,i,n)=>{let s=i;(this.graphMinY||this.graphMinY===0)&&(s=this.graphMinY);let r=n;return(this.graphMaxY||this.graphMaxY===0)&&(r=this.graphMaxY),M.rangeNum(s,r,t,!0)}},subscribe:function(){this.cable.createSubscription("StreamingChannel",window.openc3Scope,{received:t=>this.received(t),connected:()=>{this.addItemsToSubscription(this.items)},disconnected:()=>{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(t=>{this.subscription=t})},getSize:function(t){let e=0;const i=document.getElementById("openc3-nav-drawer");i&&(e=i.classList.contains("v-navigation-drawer--active")?i.clientWidth:0);let n=0;(this.legendPosition==="right"||this.legendPosition==="left")&&(n=document.getElementsByClassName("u-legend")[0].clientWidth);const s=Math.max(document.documentElement.clientWidth,window.innerWidth||0)-e-n,r=Math.max(document.documentElement.clientHeight,window.innerHeight||0),d=document.getElementsByClassName("v-expansion-panel")[0];let o=100;t==="overview"?this.fullHeight&&!this.hideOverviewData?this.showOverview=!0:this.showOverview=!1:(o=r-d.clientHeight-o-250,this.fullHeight||(o=o/2+10));let v=s-68;return this.fullWidth||(v=v/2-10),{width:this.width||v,height:this.height||o}},getScales:function(){return{scales:{x:{range(t,e,i){return e==null?[1566453600,1566497660]:[e,i]}},y:{range(t,e,i){return e==null?[-100,100]:M.rangeNum(e,i,.1,!0)}}}}},getAxes:function(t){let e="rgba(255, 255, 255, .1)",i="white";return{axes:[{stroke:i,grid:{show:!0,stroke:e,width:2}},{size:80,stroke:i,grid:{show:t!=="overview",stroke:e,width:2},values(n,s){return(s.some(r=>r>=1e7)||s.every(r=>r<.01))&&(s=s.map(r=>r.toExponential(3))),s}}]}},closeEditItem:function(t){this.editItem=!1,(this.graphEndDateTime!==null&&this.selectedItem!==t||this.selectedItem.valueType!==t.valueType||this.selectedItem.reduced!==t.reduced||this.selectedItem.reducedType!==t.reducedType)&&this.changeItem(t)},changeColor:function(t){let e=this.subscriptionKey(this.selectedItem),i=this.indexes[e];this.items[i-1].color=t,this.selectedItem.color=t,this.graph.root.querySelectorAll(".u-marker")[i].style.borderColor=t},changeLimits:function(t){let e=this.subscriptionKey(this.selectedItem),i=this.indexes[e];this.items[i-1].limits=t,this.selectedItem.limits=t,this.limitsValues=t},linesPlugin:function(){return{hooks:{draw:t=>{const{ctx:e,bbox:i}=t,n=t.valToPos(t.scales.y.min,"y",!0),s=t.valToPos(t.scales.y.max,"y",!0),r=t.valToPos(this.limitsValues[0],"y",!0),d=t.valToPos(this.limitsValues[1],"y",!0),o=t.valToPos(this.limitsValues[2],"y",!0),v=t.valToPos(this.limitsValues[3],"y",!0);if(this.lines.forEach(p=>{t.scales.y.min<=p.yValue&&p.yValue<=t.scales.y.max&&(e.save(),e.beginPath(),e.strokeStyle=p.color,e.lineWidth=2,e.moveTo(i.left,t.valToPos(p.yValue,"y",!0)),e.lineTo(i.left+i.width,t.valToPos(p.yValue,"y",!0)),e.stroke(),e.restore())}),e.save(),e.beginPath(),e.fillStyle="rgba(255,0,0,0.15)",t.scales.y.min<this.limitsValues[0]){let p=r<s?s:r;e.fillRect(i.left,r,i.width,n-p)}if(t.scales.y.max>this.limitsValues[3]){let p=n<v?n:v;e.fillRect(i.left,s,i.width,p-s)}if(e.fillStyle="rgba(255,255,0,0.15)",t.scales.y.min<this.limitsValues[1]&&t.scales.y.max>this.limitsValues[0]){let p=d<s?s:d;e.fillRect(i.left,p,i.width,r-p)}if(t.scales.y.max>this.limitsValues[2]&&t.scales.y.min<this.limitsValues[3]){let p=n<v?n:v,y=n<o?n:o;e.fillRect(i.left,p,i.width,y-p)}if(e.fillStyle="rgba(0,255,0,0.15)",this.limitsValues.length===4){if(t.scales.y.min<this.limitsValues[2]&&t.scales.y.max>this.limitsValues[1]){let p=o<s?s:o,y=n<d?n:d;e.fillRect(i.left,p,i.width,y-p)}}else{const p=t.valToPos(this.limitsValues[4],"y",!0),y=t.valToPos(this.limitsValues[5],"y",!0);if(t.scales.y.min<this.limitsValues[4]&&t.scales.y.max>this.limitsValues[1]){let k=p<s?s:p;e.fillRect(i.left,k,i.width,d-k)}if(t.scales.y.max>this.limitsValues[5]&&t.scales.y.min<this.limitsValues[2]){let k=n<o?n:o,f=n<y?n:y;e.fillRect(i.left,k,i.width,f-k)}e.fillStyle="rgba(0,0,255,0.15)";let D=y<s?s:y,_=n<p?n:p;e.fillRect(i.left,D,i.width,_-D)}e.stroke(),e.restore()}}}},changeItem:function(t){this.removeItems([this.selectedItem]),this.selectedItem.valueType=t.valueType,this.selectedItem.reduced=t.reduced,this.selectedItem.reducedType=t.reducedType,setTimeout(()=>{this.addItems([this.selectedItem])},0)},addItems:function(t,e="CONVERTED"){t.forEach(i=>{i.valueType||(i.valueType=e),i.color||(i.color=this.colors[this.colorIndex]),i.limits||(i.limits=[]),i.limits.length>0&&(this.limitsValues=i.limits),this.colorIndex=(this.colorIndex+1)%this.colors.length,this.items.push(i);const n=this.data.length;this.graph.addSeries(this.createSeriesConfig(i),n),this.overview&&this.overview.addSeries(this.createOverviewSeriesConfig(),n),this.data.splice(n,0,Array(this.data[0].length)),this.indexes[this.subscriptionKey(i)]=n}),this.updateColorIndex(t),this.addItemsToSubscription(t),this.$emit("resize"),this.$emit("edit")},createSeriesConfig:function(t){return{spanGaps:!0,item:t,label:this.formatLabel(t),stroke:(e,i)=>this.items[i-1].color,width:2,value:(e,i)=>typeof i=="string"||isNaN(i)?"NaN":i==null?"--":Math.abs(i)<.01&&i!==0||Math.abs(i)>=1e7?i.toExponential(6):i.toFixed(6)}},createOverviewSeriesConfig:function(){return{spanGaps:!0,stroke:(t,e)=>this.items[e-1].color}},updateColorIndex:function(t){const e=t[t.length-1];if(e){const i=this.colors.indexOf(e.color);i!==-1&&(this.colorIndex=(i+1)%this.colors.length)}},addItemsToSubscription:function(t=this.items){let e=this.startTime;this.graphStartDateTime&&(e=this.graphStartDateTime),this.subscription&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(i=>{i&&OpenC3Auth.setTokens(),this.subscription.perform("add",{scope:window.openc3Scope,token:localStorage.openc3Token,items:t.map(this.subscriptionKey),start_time:e,end_time:this.graphEndDateTime})})},clearAllData:function(){this.data[0]=[],this.clearData(this.items)},clearData:function(t){for(const e of t.map(this.subscriptionKey)){let i=this.indexes[e];this.data[i]=Array(this.data[0].length).fill(null),this.graph.setData(this.data),this.overview&&this.overview.setData(this.data)}this.data.length===2&&(this.data[0]=[],this.graph.setData(this.data),this.overview.setData(this.data))},removeItems:function(t){this.removeItemsFromSubscription(t);for(const e of t.map(this.subscriptionKey)){const i=this.reorderIndexes(e);this.items.splice(i-1,1),this.data.splice(i,1),this.graph.delSeries(i),this.graph.setData(this.data),this.overview&&(this.overview.delSeries(i),this.overview.setData(this.data))}this.data.length===1&&(this.data[0]=[],this.graph.setData(this.data),this.overview.setData(this.data)),this.$emit("resize"),this.$emit("edit")},removeItemsFromSubscription:function(t=this.items){this.subscription&&this.subscription.perform("remove",{scope:window.openc3Scope,token:localStorage.openc3Token,items:t.map(this.subscriptionKey)})},reorderIndexes:function(t){let e=this.indexes[t];delete this.indexes[t];for(let i in this.indexes)this.indexes[i]>e&&(this.indexes[i]-=1);return e},received:function(t){this.cable.recordPing();for(let e=0;e<t.length;e++){let i=t[e].__time/1e9,n=t[0].length;if(n===0||i>t[0][n-1]){for(let s=0;s<this.data.length;s++)this.data[s].push(null);this.set_data_at_index(this.data[0].length-1,i,t[e])}else{let s=Q(this.data[0],i,this.bs_comparator);if(s>=0)this.set_data_at_index(s,i,t[e]);else{let r=-s-1;for(let d=0;d<this.data.length;d++)this.data[d].splice(r,0,null);this.set_data_at_index(r,i,t[e])}}}if(this.startTime==null&&this.data[0][0]){let e=this.data[0][0]*1e9;this.$emit("started",e)}this.dataChanged=!0},bs_comparator:function(t,e){return t-e},set_data_at_index:function(t,e,i){this.data[0][t]=e;for(const[n,s]of Object.entries(i)){if(n==="time")continue;let r=this.indexes[n];if(r){let d=this.data[r];if(s!=null&&s.raw)d[t]=null;else if(typeof s=="string"){if(d[t]=null,!n.includes("__RAW")){for(let o of this.items)if(this.subscriptionKey(o)===n){this.selectedItem=o;break}this.changeItem({valueType:"RAW",reduced:this.selectedItem.reduced,reducedType:this.selectedItem.reducedType})}}else d[t]=s}}},subscriptionKey:function(t){let e=`${t.reduced}__TLM__${t.targetName}__${t.packetName}__${t.itemName}__${t.valueType}`;return(t.reduced==="REDUCED_MINUTE"||t.reduced==="REDUCED_HOUR"||t.reduced==="REDUCED_DAY")&&(e+=`__${t.reducedType}`),e}}},_e={class:"mx-2"},xe={class:"pa-1",id:"chart",ref:"chart"},Te=["id"],De=["id"],ke={key:5,class:"u-series",ref:"info"};function Ve(t,e,i,n,s,r){const d=u("v-icon"),o=u("v-tooltip"),v=u("v-spacer"),p=u("v-toolbar"),y=u("v-expand-transition"),D=u("v-card"),_=u("graph-edit-dialog"),k=u("v-text-field"),f=u("v-row"),G=u("v-textarea"),z=u("v-btn"),A=u("v-dialog"),V=u("v-list-item-title"),C=u("v-list-item"),$=u("v-list"),U=u("v-menu"),F=u("graph-edit-item-dialog"),K=u("v-list-subheader");return w(),Y("div",{onClick:e[21]||(e[21]=ie(h=>t.$emit("click"),["prevent"]))},[a(D,null,{default:l(()=>[I(a(p,{height:"24",class:ae(["pl-2 pr-2",i.selectedGraphId===i.id?"active":""])},{default:l(()=>[I(b("div",_e,[a(o,{text:"Errors",location:"top"},{activator:l(({props:h})=>[a(d,T(h,{onClick:e[0]||(e[0]=W=>s.errorDialog=!0)}),{default:l(()=>e[22]||(e[22]=[m(" mdi-alert ")])),_:2},1040)]),_:1})],512),[[N,s.errors.length!==0]]),a(o,{text:"Edit",location:"top"},{activator:l(({props:h})=>[a(d,T(h,{onClick:e[1]||(e[1]=W=>s.editGraph=!0),"data-test":"edit-graph-icon"}),{default:l(()=>e[23]||(e[23]=[m(" mdi-pencil ")])),_:2},1040)]),_:1}),a(v),b("span",null,S(s.title),1),a(v),I(b("div",null,[r.calcFullSize?(w(),x(o,{key:0,text:"Collapse",location:"top"},{activator:l(({props:h})=>[a(d,T(h,{onClick:r.collapseAll,"data-test":"collapse-all"}),{default:l(()=>e[24]||(e[24]=[m(" mdi-arrow-collapse ")])),_:2},1040,["onClick"])]),_:1})):(w(),x(o,{key:1,text:"Expand",location:"top"},{activator:l(({props:h})=>[a(d,T(h,{onClick:r.expandAll,"data-test":"expand-all"}),{default:l(()=>e[25]||(e[25]=[m(" mdi-arrow-expand ")])),_:2},1040,["onClick"])]),_:1}))],512),[[N,s.expand]]),I(b("div",null,[s.fullWidth?(w(),x(o,{key:0,text:"Collapse Width",location:"top"},{activator:l(({props:h})=>[a(d,T(h,{onClick:r.collapseWidth,"data-test":"collapse-width"}),{default:l(()=>e[26]||(e[26]=[m(" mdi-arrow-collapse-horizontal ")])),_:2},1040,["onClick"])]),_:1})):(w(),x(o,{key:1,text:"Expand Width",location:"top"},{activator:l(({props:h})=>[a(d,T(h,{onClick:r.expandWidth,"data-test":"expand-width"}),{default:l(()=>e[27]||(e[27]=[m(" mdi-arrow-expand-horizontal ")])),_:2},1040,["onClick"])]),_:1}))],512),[[N,s.expand]]),I(b("div",null,[s.fullHeight?(w(),x(o,{key:0,text:"Collapse Height",location:"top"},{activator:l(({props:h})=>[a(d,T(h,{onClick:r.collapseHeight,"data-test":"collapse-height"}),{default:l(()=>e[28]||(e[28]=[m(" mdi-arrow-collapse-vertical ")])),_:2},1040,["onClick"])]),_:1})):(w(),x(o,{key:1,text:"Expand Height",location:"top"},{activator:l(({props:h})=>[a(d,T(h,{onClick:r.expandHeight,"data-test":"expand-height"}),{default:l(()=>e[29]||(e[29]=[m(" mdi-arrow-expand-vertical ")])),_:2},1040,["onClick"])]),_:1}))],512),[[N,s.expand]]),s.expand?(w(),x(o,{key:0,text:"Minimize",location:"top"},{activator:l(({props:h})=>[a(d,T(h,{onClick:r.minMaxTransition,"data-test":"minimize-screen-icon"}),{default:l(()=>e[30]||(e[30]=[m(" mdi-window-minimize ")])),_:2},1040,["onClick"])]),_:1})):(w(),x(o,{key:1,text:"Maximize",location:"top"},{activator:l(({props:h})=>[a(d,T(h,{onClick:r.minMaxTransition,"data-test":"maximize-screen-icon"}),{default:l(()=>e[31]||(e[31]=[m(" mdi-window-maximize ")])),_:2},1040,["onClick"])]),_:1})),a(o,{text:"Close",location:"top"},{activator:l(({props:h})=>[a(d,T(h,{onClick:e[2]||(e[2]=W=>t.$emit("close-graph")),"data-test":"close-graph-icon"}),{default:l(()=>e[32]||(e[32]=[m(" mdi-close-box ")])),_:2},1040)]),_:1})]),_:1},8,["class"]),[[N,!s.hideToolbarData]]),a(y,null,{default:l(()=>[I(b("div",xe,[b("div",{id:`chart${i.id}`},null,8,Te),e[33]||(e[33]=b("div",{id:"betweenCharts"},null,-1)),I(b("div",{id:`overview${i.id}`},null,8,De),[[N,s.showOverview]])],512),[[N,s.expand]])]),_:1})]),_:1}),s.editGraph?(w(),x(_,{key:0,modelValue:s.editGraph,"onUpdate:modelValue":e[3]||(e[3]=h=>s.editGraph=h),title:s.title,"legend-position":s.legendPosition,items:s.items,"graph-min-y":s.graphMinY,"graph-max-y":s.graphMaxY,lines:s.lines,colors:s.colors,"start-date-time":s.graphStartDateTime,"end-date-time":s.graphEndDateTime,"time-zone":i.timeZone,onRemove:e[4]||(e[4]=h=>r.removeItems([h])),onOk:r.editGraphClose,onCancel:e[5]||(e[5]=h=>s.editGraph=!1)},null,8,["modelValue","title","legend-position","items","graph-min-y","graph-max-y","lines","colors","start-date-time","end-date-time","time-zone","onOk"])):E("",!0),a(A,{modelValue:s.errorDialog,"onUpdate:modelValue":e[7]||(e[7]=h=>s.errorDialog=h),"max-width":"600"},{default:l(()=>[a(p,{height:"24"},{default:l(()=>[a(v),e[34]||(e[34]=b("span",null," Errors ",-1)),a(v)]),_:1}),a(D,{class:"pa-3"},{default:l(()=>[a(f,{dense:""},{default:l(()=>[a(k,{readonly:"","hide-details":"",modelValue:s.title,"onUpdate:modelValue":e[6]||(e[6]=h=>s.title=h),class:"pb-2",label:"Graph Title"},null,8,["modelValue"])]),_:1}),a(f,{class:"my-3"},{default:l(()=>[a(G,{readonly:"",rows:"8",value:r.error},null,8,["value"])]),_:1}),a(f,null,{default:l(()=>[a(z,{block:"",onClick:r.clearErrors},{default:l(()=>e[35]||(e[35]=[m(" Clear ")])),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"]),s.editGraphMenu?(w(),x(U,{key:1,modelValue:s.editGraphMenu,"onUpdate:modelValue":e[9]||(e[9]=h=>s.editGraphMenu=h),target:[s.editGraphMenuX,s.editGraphMenuY],absolute:"","offset-y":""},{default:l(()=>[a($,null,{default:l(()=>[a(C,{onClick:e[8]||(e[8]=h=>s.editGraph=!0)},{default:l(()=>[a(V,{style:{cursor:"pointer"}},{default:l(()=>[m(" Edit "+S(s.title),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","target"])):E("",!0),s.editItem?(w(),x(F,{key:2,modelValue:s.editItem,"onUpdate:modelValue":e[10]||(e[10]=h=>s.editItem=h),colors:s.colors,item:s.selectedItem,onChangeColor:r.changeColor,onChangeLimits:r.changeLimits,onCancel:e[11]||(e[11]=h=>s.editItem=!1),onClose:r.closeEditItem},null,8,["modelValue","colors","item","onChangeColor","onChangeLimits","onClose"])):E("",!0),s.itemMenu?(w(),x(U,{key:3,modelValue:s.itemMenu,"onUpdate:modelValue":e[15]||(e[15]=h=>s.itemMenu=h),target:[s.itemMenuX,s.itemMenuY],absolute:"","offset-y":""},{default:l(()=>[a($,{nav:"",density:"compact"},{default:l(()=>[a(K,null,{default:l(()=>[m(S(s.selectedItem.targetName)+" "+S(s.selectedItem.packetName)+" "+S(s.selectedItem.itemName),1)]),_:1}),a(C,{onClick:e[12]||(e[12]=h=>s.editItem=!0)},{prepend:l(()=>[a(d,{icon:"mdi-pencil"})]),default:l(()=>[a(V,null,{default:l(()=>e[36]||(e[36]=[m(" Edit ")])),_:1})]),_:1}),a(C,{onClick:e[13]||(e[13]=h=>r.clearData([s.selectedItem]))},{prepend:l(()=>[a(d,{icon:"mdi-eraser"})]),default:l(()=>[a(V,null,{default:l(()=>e[37]||(e[37]=[m(" Clear ")])),_:1})]),_:1}),a(C,{onClick:e[14]||(e[14]=h=>r.removeItems([s.selectedItem]))},{prepend:l(()=>[a(d,{icon:"mdi-delete"})]),default:l(()=>[a(V,null,{default:l(()=>e[38]||(e[38]=[m(" Delete ")])),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","target"])):E("",!0),s.legendMenu?(w(),x(U,{key:4,modelValue:s.legendMenu,"onUpdate:modelValue":e[20]||(e[20]=h=>s.legendMenu=h),target:[s.legendMenuX,s.legendMenuY],absolute:"","offset-y":""},{default:l(()=>[a($,null,{default:l(()=>[a(C,{onClick:e[16]||(e[16]=h=>r.moveLegend("top"))},{default:l(()=>[a(V,{style:{cursor:"pointer"}},{default:l(()=>e[39]||(e[39]=[m(" Legend Top ")])),_:1})]),_:1}),a(C,{onClick:e[17]||(e[17]=h=>r.moveLegend("bottom"))},{default:l(()=>[a(V,{style:{cursor:"pointer"}},{default:l(()=>e[40]||(e[40]=[m(" Legend Bottom ")])),_:1})]),_:1}),a(C,{onClick:e[18]||(e[18]=h=>r.moveLegend("left"))},{default:l(()=>[a(V,{style:{cursor:"pointer"}},{default:l(()=>e[41]||(e[41]=[m(" Legend Left ")])),_:1})]),_:1}),a(C,{onClick:e[19]||(e[19]=h=>r.moveLegend("right"))},{default:l(()=>[a(V,{style:{cursor:"pointer"}},{default:l(()=>e[42]||(e[42]=[m(" Legend RIght ")])),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","target"])):E("",!0),i.sparkline?E("",!0):(w(),Y("div",ke,[a(o,{text:"Click item to toggle, Right click to edit",location:"top"},{activator:l(({props:h})=>[a(d,se(le(h)),{default:l(()=>e[43]||(e[43]=[m(" mdi-information-variant-circle ")])),_:2},1040)]),_:1})],512))])}const Ee=j("S",L(be,[["render",Ve],["__scopeId","data-v-485a5da2"]]));function Ce(t,e,i){const n=R(t,void 0);if(isNaN(e))return H(t,NaN);if(!e)return n;const s=n.getDate(),r=H(t,n.getTime());r.setMonth(n.getMonth()+e+1,0);const d=r.getDate();return s>=d?r:(n.setFullYear(r.getFullYear(),r.getMonth(),s),n)}function Me(t,e,i){return te(t,-e,i)}function Ie(t,e,i){return Ce(t,-e)}function Ne(t,e,i){const{years:n=0,months:s=0,weeks:r=0,days:d=0,hours:o=0,minutes:v=0,seconds:p=0}=e,y=Ie(t,s+n*12),D=Me(y,d+r*7,i),_=v+o*60,k=(p+_*60)*1e3;return H(t,+D-k)}const Oe=j("_",{mixins:[ne],data:function(){return{id:Math.floor(Math.random()*1e11),state:"start",items:[{targetName:this.parameters[0],packetName:this.parameters[1],itemName:this.parameters[2],valueType:this.parameters[3]||"CONVERTED",reduced:this.parameters[4]||"DECOM",reducedType:this.parameters[5]||null}],startTime:null,secondsGraphed:3600,pointsSaved:3600,pointsGraphed:3600,size:{height:300,width:400}}},created:function(){this.appliedSettings.forEach(t=>{switch(t[0]){case"ITEM":this.items.push({targetName:t[1],packetName:t[2],itemName:t[3],valueType:t[4]||"CONVERTED",reduced:t[5]||"DECOM",reducedType:t[6]||null});case"STARTTIME":let e=P(t[1],"yyyy/MM/dd HH:mm:ss",new Date);this.startTime=e.getTime()*1e6;break;case"HISTORY":let i=parseInt(t[1].slice(0,t[1].length-1)),n=null,s=1;switch(t[1][t[1].length-1]){case"d":n="days",s=3600*24;break;case"h":n="hours",s=3600;break;case"m":n="minutes",s=60;break;case"s":n="seconds";break;default:throw new Error(`Unknown time suffix: ${t[1]}!`)}let r={};r[n]=i,this.startTime=Ne(new Date,r).getTime()*1e6,i*s>this.secondsGraphed&&(this.secondsGraphed=i*s),i*s>this.pointsSaved&&(this.pointsSaved=i*s),i*s>this.pointsGraphed&&(this.pointsGraphed=i*s);break;case"SECONDSGRAPHED":this.secondsGraphed=parseInt(t[1]);break;case"POINTSSAVED":this.pointsSaved=parseInt(t[1]);break;case"POINTSGRAPHED":this.pointsGraphed=parseInt(t[1]);break;case"SIZE":this.size.width=parseInt(t[1]),this.size.height=parseInt(t[2]);break}}),this.items=this.items.map(t=>{let e=t.itemName;if(t.itemName.includes("[["))t.itemName=t.itemName.replace("[[","[").replace("]]","]"),e=t.itemName;else if(t.itemName.includes("[")){let i=t.itemName.match(/\[(\d+)\]/);this.arrayIndex=parseInt(i[1]),e=t.itemName.replace(i[0],"")}return this.$emit("addItem",`${t.targetName}__${t.packetName}__${e}__${t.valueType}`,!0),t})},destroyed(){this.items.map(t=>this.$emit("deleteItem",`${t.targetName}__${t.packetName}__${t.itemName}__${t.valueType}`))}})}}});
|
@@ -1 +0,0 @@
|
|
1
|
-
System.register(["./HorizontalWidget-B7YdcFVN-1adf1fbb47940ffc2bbb.js","./Layout-D4YBjuWs-d949f0668cb092f7f268.js","vue","./main-fcf5991e219cb9464cd3.js","./Widget-C7ms_xDE-bce61b3f1521054f57a4.js","vue-router","single-spa","vuex","vuetify"],function(m,f){"use strict";var r,i,n,l,o,s,a,c,u,p,d,g;return{setters:[e=>{r=e.default},e=>{i=e.r},e=>{n=e.resolveComponent,l=e.openBlock,o=e.createElementBlock,s=e.createVNode,a=e.normalizeStyle,c=e.withCtx,u=e.createTextVNode,p=e.toDisplayString,d=e.mergeProps},e=>{g=e.s},null,null,null,null,null],execute:function(){const e={mixins:[i],components:{HorizontalWidget:r}};function v(t,w,S,B,N,V){const y=n("v-banner"),x=n("horizontal-widget");return l(),o("div",null,[s(y,{class:"boxbanner",style:a(t.computedStyle),"single-line":""},{default:c(()=>[u(p(t.parameters[0]),1)]),_:1},8,["style"]),s(x,d(t.listeners,{parameters:t.parameters.slice(1),settings:t.appliedSettings,widgets:t.widgets,"screen-values":t.screenValues,"screen-time-zone":t.screenTimeZone,"screen-id":t.screenId}),null,16,["parameters","settings","widgets","screen-values","screen-time-zone","screen-id"])])}const z=m("default",g(e,[["render",v],["__scopeId","data-v-e9e6c14b"]]))}}});
|
@@ -1 +0,0 @@
|
|
1
|
-
System.register(["vue","./main-fcf5991e219cb9464cd3.js","vue-router","single-spa","vuex","vuetify"],function(l,c){"use strict";var n,t,u;return{setters:[e=>{n=e.openBlock,t=e.createElementBlock},e=>{u=e.s},null,null,null,null],execute:function(){const e={};function r(o,i){return n(),t("hr")}const s=l("default",u(e,[["render",r]]))}}});
|