openc3-cosmos-tool-dataviewer 6.8.0 → 6.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/tools/dataviewer/ArrayWidget-FGjLmPfG-9221d76d5ebcae91c992.js +2 -0
- data/tools/dataviewer/{ArrayplotWidget-DuLaiGa9-7cd26cccfdce93c545bf.js → ArrayplotWidget-Cfo18TYm-c151ebe8e66f6dddd585.js} +1 -1
- data/tools/dataviewer/{BarColumn-BWJ0Dd4O-a17a318533956fee1c6a.js → BarColumn-BuJ6MTYG-a59280f68500322497e8.js} +1 -1
- data/tools/dataviewer/{BlockWidget-Bf5Dd6Cr-1c805206898b3defc5c5.js → BlockWidget-B_JwY8-N-4f5df4313dd15c434645.js} +2 -2
- data/tools/dataviewer/ButtonWidget-Cd4M3aBD-d60cb38ebc334cbfc316.js +2 -0
- data/tools/dataviewer/{CanvasWidget-boDemgx1-2ae3a126281a10e1b72a.js → CanvasWidget-CpKdOgTG-5cda780fb2b8b21bff76.js} +1 -1
- data/tools/dataviewer/CanvasdotWidget-zYbI5LAw-d2f81530c7e3da2aa921.js +1 -0
- data/tools/dataviewer/{CanvasimageWidget-6ywvT5jd-ad82876da5ad446104a2.js → CanvasimageWidget--ORQEPj6-86ba9c137041faf480ae.js} +1 -1
- data/tools/dataviewer/{CanvasimagevalueWidget-DjWrA3gX-7ab16797ac021637ebfa.js → CanvasimagevalueWidget-CtAtYHRm-8415c26c4abf2d2aad9d.js} +1 -1
- data/tools/dataviewer/CanvaslabelWidget-DWoROb6o-76f0386a51ea8a517798.js +1 -0
- data/tools/dataviewer/{CanvaslabelvalueWidget-C8oNcFLi-1caf684ee3d062130943.js → CanvaslabelvalueWidget-A4UbtwEc-b04fa934d34fe71fd12d.js} +1 -1
- data/tools/dataviewer/{CanvaslineWidget-nvbL2GoL-fd0935b2628cbc31f45d.js → CanvaslineWidget-BBGi0nrb-96b8d3047e0c71ec2b63.js} +1 -1
- data/tools/dataviewer/{CanvaslinevalueWidget-ZACQedKx-e394d2041f1c34cfdb22.js → CanvaslinevalueWidget-C_9OkL7f-89ec01b5faec7a66a47e.js} +1 -1
- data/tools/dataviewer/{CheckbuttonWidget-B82UE8AB-dcbd92691230203fb739.js → CheckbuttonWidget-CTJg8Ypg-7ee8bd22f23be9b8e358.js} +1 -1
- data/tools/dataviewer/ComboboxWidget-DWiMZZk8-cf0c936ba6efa1aefb7f.js +1 -0
- data/tools/dataviewer/DataViewer-fb71df3ed55deba32837.js +42 -0
- data/tools/dataviewer/{DateWidget-BmwtdirF-5a4dee9827f83ee0185b.js → DateWidget-C7GSh68_-57df98f15106fafca4d9.js} +1 -1
- data/tools/dataviewer/{DetailsDialog-CLKEfU0s-45ec106799e1016a7a83.js → DetailsDialog-B2l0BNc2-a521562ed9d932ba09b0.js} +1 -1
- data/tools/dataviewer/{DynamicWidget-CfMtj7H8-698ae3b8eeefd34210ab.js → DynamicWidget-CfMtj7H8-f29aa6c13c3e191e66c0.js} +1 -1
- data/tools/dataviewer/{FormatvalueWidget-C8exC3bj-c94d246726e2c68b125e.js → FormatvalueWidget-CZJdsUAq-62c8ea8d2c3aef4f3ab4.js} +1 -1
- data/tools/dataviewer/{Graph-CWcrowaT-321d8247499551290506.js → Graph-DZBpdSgR-35a8b20eb717a60340d4.js} +1 -1
- data/tools/dataviewer/{GraphWidget-CvzxZYVx-faaef1a9577cb20ba3c3.js → GraphWidget-CHm4bhMI-fcc5e70464df9ec2bf24.js} +1 -1
- data/tools/dataviewer/{HorizontalWidget-Ck151zVw-d19841c2c201769c69d6.js → HorizontalWidget-B2skpV1m-c75f9cbb950df2f35a79.js} +1 -1
- data/tools/dataviewer/HorizontalboxWidget-BI0WZP5M-e9f08dd7f0fc64faf00c.js +1 -0
- data/tools/dataviewer/HorizontallineWidget-AmxVeXcU-ca19164ffa827464540c.js +1 -0
- data/tools/dataviewer/{IframeWidget-BgJCgues-ded6960645390c766a21.js → IframeWidget-DcqRMhyW-3e8a4db3fadfbd97b48f.js} +1 -1
- data/tools/dataviewer/{ImageLoader-CWn-PLOk-fecc055141a404efb486.js → ImageLoader-ly4zoGpO-2c9d434cfee55ec3155d.js} +1 -1
- data/tools/dataviewer/ImageviewerWidget-cmDHcmW4-e06ff03c6726ee876bce.js +1 -0
- data/tools/dataviewer/{LabelWidget-Cwosk4x2-a510aa54ef9cb1aee7a4.js → LabelWidget-Bemw8Erq-6de9dd1b1f3f0329d19e.js} +1 -1
- data/tools/dataviewer/LabelledWidget-Cb7EvtUG-78847c6527df1548e924.js +1 -0
- data/tools/dataviewer/LabelprogressbarWidget-qYgrGqLY-c9104b463bf51f12c62b.js +1 -0
- data/tools/dataviewer/{LabelsparklineWidget-6LA6Ox3d-3e8a60e22ef67cde9614.js → LabelsparklineWidget-CMklq9-f-695c1c99475f4bdc684f.js} +1 -1
- data/tools/dataviewer/LabelvalueWidget-NjCMgiYL-26121816c3b3978abe44.js +1 -0
- data/tools/dataviewer/{LabelvaluedescWidget-Dwwlnd1g-836236070b1f85510994.js → LabelvaluedescWidget-Dflulqm7-a3d0c6d450eadcb15f87.js} +1 -1
- data/tools/dataviewer/LabelvaluelimitsbarWidget-M34NDk2S-e4f27803184fd8e77609.js +1 -0
- data/tools/dataviewer/LabelvaluelimitscolumnWidget-Cchaw_-k-647674c528d01c8c7127.js +1 -0
- data/tools/dataviewer/LabelvaluerangebarWidget-7pEykAm3-cf644039b84292d81f11.js +1 -0
- data/tools/dataviewer/Layout-BNvQKlyy-103fe47f494f17fea355.js +1 -0
- data/tools/dataviewer/{LedWidget-DOuDD8LI-a89476bf4af242144d6a.js → LedWidget-_EA7ZKM8-fe11f95f6adc4ddc1277.js} +1 -1
- data/tools/dataviewer/{LimitsbarWidget-D1U6SvVL-50dba2967a61ae0239cb.js → LimitsbarWidget-DdoQf46y-554464ebe9c231d3cc69.js} +1 -1
- data/tools/dataviewer/{LimitscolorWidget-iSMGusqt-3965cee413d4692ed031.js → LimitscolorWidget-Cv0umnVo-9fcbe06d4daebd3ee5e7.js} +1 -1
- data/tools/dataviewer/{LimitscolumnWidget-DjxZTt_r-22e14246db6626ea1773.js → LimitscolumnWidget-CnCQtxim-5d47688800e4a5062bf6.js} +1 -1
- data/tools/dataviewer/{LinegraphWidget-BHKU6zlT-4a8e5abe9fbf34b818c8.js → LinegraphWidget-ekyQoR7x-eed756b2f716d6fce055.js} +1 -1
- data/tools/dataviewer/MatrixbycolumnsWidget-IBUcGNF7-29e411f5faaa986838b9.js +1 -0
- data/tools/dataviewer/{ProgressbarWidget-fbr2qu_N-6bd6ddef50babba881fa.js → ProgressbarWidget-CnveFZVh-1b03e6c1246b3d119c44.js} +1 -1
- data/tools/dataviewer/{RadiobuttonWidget-DL08zcQT-dbeecd19ce31d4dae52a.js → RadiobuttonWidget-hWLrCb8W-859fa71aac7bc7964905.js} +1 -1
- data/tools/dataviewer/{RadiogroupWidget-DW9Xpj3c-8db229e1dbd78c1bdba0.js → RadiogroupWidget-DK1fphkh-82c2c444e52cfc46f18f.js} +1 -1
- data/tools/dataviewer/{RangebarWidget-o9q55kjc-725087d3ea5f70c3e220.js → RangebarWidget-vspY8CGV-11947d9cdfac6645f8ce.js} +1 -1
- data/tools/dataviewer/{RollupWidget-BHnjj-DF-8dc2d1a29ac0cc4abc9e.js → RollupWidget-07pNcXQV-16f9a1b7ed0953a8b3b5.js} +1 -1
- data/tools/dataviewer/{ScrollwindowWidget-D-QVwztC-9f5fbce54bb83635ec45.js → ScrollwindowWidget-BcbyrYUo-3f625136522a8007b0aa.js} +1 -1
- data/tools/dataviewer/{SignalWidget-CsWuufdx-a8c1cfc35ff873c03b2f.js → SignalWidget-BDp5sUHj-f333bb16d2f2d56334e5.js} +1 -1
- data/tools/dataviewer/{SpacerWidget-Di9-qunj-b978c3ea6ff6e700e641.js → SpacerWidget-DcOnQ1yI-6866e6844524e1c86197.js} +1 -1
- data/tools/dataviewer/{SparklineWidget-B6-zhdPW-9899d4687c10e1840c6e.js → SparklineWidget-CVglnlAm-2080a069b18d2577a1c8.js} +1 -1
- data/tools/dataviewer/TabbookWidget-p51Oa7Ru-d76f5f58d93b03625b86.js +1 -0
- data/tools/dataviewer/TextboxWidget-DM-XX97e-45c8a3e04ec980d7c907.js +1 -0
- data/tools/dataviewer/TextfieldWidget-7cYHAgH8-69584d4fc92b25b68b92.js +1 -0
- data/tools/dataviewer/{TimeWidget-K4MNmJ7J-ca8a23d785c39e3c6093.js → TimeWidget-EvQJyu6x-a255118cbb4c2b6fa76e.js} +1 -1
- data/tools/dataviewer/TitleWidget-6ddfJuqd-92b45d892311447339cb.js +1 -0
- data/tools/dataviewer/{VWidget-CoIgX3hM-1a637fab6d745cae645f.js → VWidget-P-X9ffkl-699ba4b772cd217b7304.js} +1 -1
- data/tools/dataviewer/{ValueWidget-BvT1ASar-29923500ab20c40c7baf.js → ValueWidget-DAUGuQ9f-5085db42bfbe115ae6bb.js} +1 -1
- data/tools/dataviewer/ValuelimitsbarWidget-DmLUXw0I-d3216734353fe6163f94.js +1 -0
- data/tools/dataviewer/ValuelimitscolumnWidget-DDmo8wHJ-cdd921ff63da762b9635.js +1 -0
- data/tools/dataviewer/ValuerangebarWidget-CbzWSWq3-a90c36fee62d50eb883e.js +1 -0
- data/tools/dataviewer/VerticalWidget-BuKinn_c-9cbac048a4c70512f580.js +1 -0
- data/tools/dataviewer/VerticalboxWidget-C0zD5h0O-37f03e4f44803531a4f0.js +1 -0
- data/tools/dataviewer/{Widget-B8t93Oid-9d0fe7103777a165cb31.js → Widget-BIXl-Pk5-9dc1a91f2536d1588361.js} +1 -1
- data/tools/dataviewer/main-5b14a263506be329b487.js +1507 -0
- data/tools/dataviewer/main.js +1 -1
- metadata +68 -68
- data/tools/dataviewer/ArrayWidget-j3ncPuPx-cee615f18b36b93016c2.js +0 -2
- data/tools/dataviewer/ButtonWidget-bl_mGFYh-78e6775bcc3db110628c.js +0 -2
- data/tools/dataviewer/CanvasdotWidget-BZBbJcER-b6a9f27e86bea05d4b96.js +0 -1
- data/tools/dataviewer/CanvaslabelWidget-Bq4V2BQh-606a7cfb142c48394fb2.js +0 -1
- data/tools/dataviewer/ComboboxWidget-4OFiSkI6-935c1b8080bf6d1e6600.js +0 -1
- data/tools/dataviewer/DataViewer-bfd20ba4f56ab7dd3442.js +0 -42
- data/tools/dataviewer/HorizontalboxWidget-D3P-cl9V-833b68ac9fa1a00ab226.js +0 -1
- data/tools/dataviewer/HorizontallineWidget-BE1TjPU8-55b3528c5da994736f91.js +0 -1
- data/tools/dataviewer/ImageviewerWidget-BlhFZD2f-e0142e772e2dae2471fa.js +0 -1
- data/tools/dataviewer/LabelledWidget-Dl6rAFTQ-9c0f4588e1fc95f40250.js +0 -1
- data/tools/dataviewer/LabelprogressbarWidget-MuAKesOz-b998c866bdace0f663ec.js +0 -1
- data/tools/dataviewer/LabelvalueWidget-BxAXx-Tf-c3e1eb282e6a68a9a720.js +0 -1
- data/tools/dataviewer/LabelvaluelimitsbarWidget-Dv8Qk8kK-e37f8b9bdb41d623c988.js +0 -1
- data/tools/dataviewer/LabelvaluelimitscolumnWidget-D-_gl6fq-10140fdf29449d425c26.js +0 -1
- data/tools/dataviewer/LabelvaluerangebarWidget-B3MKT-3Y-16e9d4bb1ce0a47e6f96.js +0 -1
- data/tools/dataviewer/Layout-Bkb6VP3e-33b970aed3ce40bc539b.js +0 -1
- data/tools/dataviewer/MatrixbycolumnsWidget-BKO-A2QD-fa67bdfb709bd88c0944.js +0 -1
- data/tools/dataviewer/TabbookWidget-B1E1_mzA-229bee795e4593d0eb87.js +0 -1
- data/tools/dataviewer/TextboxWidget-CBVEXPw_-ecdce44acf31b9e0c315.js +0 -1
- data/tools/dataviewer/TextfieldWidget-DZMHrtQa-adc5a025ed38bf9bdb65.js +0 -1
- data/tools/dataviewer/TitleWidget-8IcwweFE-cc841ef7a768dc49d3b1.js +0 -1
- data/tools/dataviewer/ValuelimitsbarWidget-C5lBnUmB-ae2de2a16fca43d05dc1.js +0 -1
- data/tools/dataviewer/ValuelimitscolumnWidget-DHYI0WBL-1382aa06e82c6c5068b9.js +0 -1
- data/tools/dataviewer/ValuerangebarWidget-BSszZhlE-c33e31ed43452aebb8f3.js +0 -1
- data/tools/dataviewer/VerticalWidget-1GhgYrC3-44e0dc49bca4146e3e48.js +0 -1
- data/tools/dataviewer/VerticalboxWidget-DYHJqEzd-ed221f035330f0de06ca.js +0 -1
- data/tools/dataviewer/main-1100122d30e5b0693f63.js +0 -1507
@@ -0,0 +1,42 @@
|
|
1
|
+
System.register(["./main-5b14a263506be329b487.js","vue","./Graph-DZBpdSgR-35a8b20eb717a60340d4.js","single-spa","vue-router","vuex","vuetify"],(function(hl,gw){"use strict";var mo,Ht,kn,dr,_o,bo,vo,wo,F,ue,J,yo,O,R,ln,vt,lt,Et,Kt,we,Ln,Ci,wt,Ti,Ei,xo,So,Co,To,Eo;return{setters:[ne=>{mo=ne.d,Ht=ne._,kn=ne.T,dr=ne.B,_o=ne.a,bo=ne.R,vo=ne.A,wo=ne.U},ne=>{F=ne.resolveComponent,ue=ne.createBlock,J=ne.openBlock,yo=ne.Teleport,O=ne.createVNode,R=ne.withCtx,ln=ne.createElementVNode,vt=ne.toDisplayString,lt=ne.createElementBlock,Et=ne.Fragment,Kt=ne.renderList,we=ne.createTextVNode,Ln=ne.mergeProps,Ci=ne.createSlots,wt=ne.createCommentVNode,Ti=ne.normalizeStyle,Ei=ne.resolveDynamicComponent,xo=ne.withDirectives,So=ne.vShow,Co=ne.normalizeClass,To=ne.KeepAlive},ne=>{Eo=ne.o},null,null,null,null],execute:(function(){var ne=document.createElement("style");ne.textContent=`.v-expansion-panel-text .container[data-v-aea826ef]{margin:0}.v-expansion-panel-title[data-v-aea826ef]{z-index:1;min-height:10px;padding:5px}.text-component-missing-name[data-v-aea826ef]{font-family:Courier New,Courier,monospace}.v-tabs-items[data-v-aea826ef]{overflow:visible}
|
2
|
+
/*$vite$:1*/`,document.head.appendChild(ne);const dl={props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},methods:{formatDT:function(r){return r.replaceAll(" ","-").toLowerCase()},subMenuClick(r){r.command(r),this.$refs.topmenu[0].isActive=!1}},mounted(){document.title=this.title}},pl={class:"app-title mr-2"};function gl(r,n,i,o,u,l){const d=F("v-col"),b=F("v-row"),v=F("v-icon"),x=F("v-btn"),S=F("v-divider"),L=F("v-list-item-title"),M=F("v-list-item"),I=F("v-list"),P=F("v-menu"),k=F("v-radio"),H=F("v-list-item-action"),re=F("v-radio-group"),se=F("v-checkbox");return J(),ue(yo,{to:"#openc3-menu"},[O(b,{"no-gutters":""},{default:R(()=>[O(d,{"align-self":"end"},{default:R(()=>[ln("span",pl,vt(i.title),1)]),_:1})]),_:1}),O(b,{dense:"",class:"flex-nowrap"},{default:R(()=>[(J(!0),lt(Et,null,Kt(i.menus,(oe,ge)=>(J(),ue(P,{ref_for:!0,ref:"topmenu",key:ge},{activator:R(({props:D})=>[O(x,Ln({ref_for:!0},D,{variant:"outlined",class:"mx-1 menu-button",text:oe.label,"data-test":l.formatDT(`${i.title} ${oe.label}`)}),{append:R(()=>[O(v,{class:"menu-button-icon"},{default:R(()=>[...n[0]||(n[0]=[we(" mdi-menu-down ",-1)])]),_:1})]),_:1},16,["text","data-test"])]),default:R(()=>[O(I,null,{default:R(()=>[(J(!0),lt(Et,null,Kt(oe.items,(D,me)=>(J(),lt(Et,null,[D.divider?(J(),ue(S,{key:me+"-divider"})):D.subMenu&&D.subMenu.length>0?(J(),lt("div",{key:me+"-submenu"},[(J(),ue(P,{"open-on-hover":"",location:"right",key:me},{activator:R(({props:ee})=>[(J(),ue(M,Ln({ref_for:!0},ee,{disabled:D.disabled,key:me}),Ci({append:R(()=>[O(v,null,{default:R(()=>[...n[1]||(n[1]=[we(" mdi-chevron-right ",-1)])]),_:1})]),default:R(()=>[!D.radio&&!D.checkbox?(J(),ue(L,{key:0,style:Ti("cursor: pointer;"+(D.disabled?"opacity: 0.2":""))},{default:R(()=>[we(vt(D.label),1)]),_:2},1032,["style"])):wt("",!0)]),_:2},[D.icon?{name:"prepend",fn:R(()=>[O(v,{disabled:D.disabled},{default:R(()=>[we(vt(D.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:R(()=>[O(I,null,{default:R(()=>[(J(!0),lt(Et,null,Kt(D.subMenu,(ee,Oe)=>(J(),ue(M,{key:Oe,"prepend-icon":ee.icon,onClick:Pe=>l.subMenuClick(ee)},{default:R(()=>[O(L,null,{default:R(()=>[we(vt(ee.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):D.radioGroup?(J(),ue(re,{"model-value":D.value,"onUpdate:modelValue":D.command,key:me+"-radio-group","hide-details":"",density:"compact",class:"ma-0 pa-0"},{default:R(()=>[(J(!0),lt(Et,null,Kt(D.choices,(ee,Oe)=>(J(),ue(M,{key:Oe+"-choice"},{default:R(()=>[O(H,{class:"list-action"},{default:R(()=>[O(k,{color:"secondary",label:ee.label,value:ee.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(J(),ue(M,{onClick:ee=>D.command(D),disabled:D.disabled,"data-test":l.formatDT(`${i.title} ${oe.label} ${D.label}`),key:me+"-list"},Ci({default:R(()=>[D.checkbox?(J(),ue(H,{key:0,class:"list-action"},{default:R(()=>[O(se,{modelValue:D.checked,"onUpdate:modelValue":ee=>D.checked=ee,label:D.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):wt("",!0),!D.radio&&!D.checkbox?(J(),ue(L,{key:1,style:Ti("cursor: pointer;"+(D.disabled?"opacity: 0.2":""))},{default:R(()=>[we(vt(D.label),1)]),_:2},1032,["style"])):wt("",!0)]),_:2},[D.icon?{name:"prepend",fn:R(()=>[O(v,{icon:D.icon,disabled:D.disabled},null,8,["icon","disabled"])]),key:"0"}:void 0]),1032,["onClick","disabled","data-test"]))],64))),256))]),_:2},1024)]),_:2},1024))),128))]),_:1})])}const ml=mo(dl,[["render",gl],["__scopeId","data-v-4d454b93"]]);var _l=Object.defineProperty,bl=(r,n,i)=>n in r?_l(r,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):r[n]=i,pr=(r,n,i)=>bl(r,typeof n!="symbol"?n+"":n,i);function Ao(r,n){return function(){return r.apply(n,arguments)}}const{toString:vl}=Object.prototype,{getPrototypeOf:Ai}=Object,{iterator:gr,toStringTag:Oo}=Symbol,mr=(r=>n=>{const i=vl.call(n);return r[i]||(r[i]=i.slice(8,-1).toLowerCase())})(Object.create(null)),ft=r=>(r=r.toLowerCase(),n=>mr(n)===r),_r=r=>n=>typeof n===r,{isArray:fn}=Array,hn=_r("undefined");function Nn(r){return r!==null&&!hn(r)&&r.constructor!==null&&!hn(r.constructor)&&Ve(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const Ro=ft("ArrayBuffer");function wl(r){let n;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?n=ArrayBuffer.isView(r):n=r&&r.buffer&&Ro(r.buffer),n}const yl=_r("string"),Ve=_r("function"),Io=_r("number"),Dn=r=>r!==null&&typeof r=="object",xl=r=>r===!0||r===!1,br=r=>{if(mr(r)!=="object")return!1;const n=Ai(r);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Oo in r)&&!(gr in r)},Sl=r=>{if(!Dn(r)||Nn(r))return!1;try{return Object.keys(r).length===0&&Object.getPrototypeOf(r)===Object.prototype}catch{return!1}},Cl=ft("Date"),Tl=ft("File"),El=ft("Blob"),Al=ft("FileList"),Ol=r=>Dn(r)&&Ve(r.pipe),Rl=r=>{let n;return r&&(typeof FormData=="function"&&r instanceof FormData||Ve(r.append)&&((n=mr(r))==="formdata"||n==="object"&&Ve(r.toString)&&r.toString()==="[object FormData]"))},Il=ft("URLSearchParams"),[Pl,kl,Ll,Nl]=["ReadableStream","Request","Response","Headers"].map(ft),Dl=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Un(r,n,{allOwnKeys:i=!1}={}){if(r===null||typeof r>"u")return;let o,u;if(typeof r!="object"&&(r=[r]),fn(r))for(o=0,u=r.length;o<u;o++)n.call(null,r[o],o,r);else{if(Nn(r))return;const l=i?Object.getOwnPropertyNames(r):Object.keys(r),d=l.length;let b;for(o=0;o<d;o++)b=l[o],n.call(null,r[b],b,r)}}function Po(r,n){if(Nn(r))return null;n=n.toLowerCase();const i=Object.keys(r);let o=i.length,u;for(;o-- >0;)if(u=i[o],n===u.toLowerCase())return u;return null}const Gt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ko=r=>!hn(r)&&r!==Gt;function Oi(){const{caseless:r,skipUndefined:n}=ko(this)&&this||{},i={},o=(u,l)=>{const d=r&&Po(i,l)||l;br(i[d])&&br(u)?i[d]=Oi(i[d],u):br(u)?i[d]=Oi({},u):fn(u)?i[d]=u.slice():(!n||!hn(u))&&(i[d]=u)};for(let u=0,l=arguments.length;u<l;u++)arguments[u]&&Un(arguments[u],o);return i}const Ul=(r,n,i,{allOwnKeys:o}={})=>(Un(n,(u,l)=>{i&&Ve(u)?r[l]=Ao(u,i):r[l]=u},{allOwnKeys:o}),r),Fl=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),Ml=(r,n,i,o)=>{r.prototype=Object.create(n.prototype,o),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:n.prototype}),i&&Object.assign(r.prototype,i)},Bl=(r,n,i,o)=>{let u,l,d;const b={};if(n=n||{},r==null)return n;do{for(u=Object.getOwnPropertyNames(r),l=u.length;l-- >0;)d=u[l],(!o||o(d,r,n))&&!b[d]&&(n[d]=r[d],b[d]=!0);r=i!==!1&&Ai(r)}while(r&&(!i||i(r,n))&&r!==Object.prototype);return n},Wl=(r,n,i)=>{r=String(r),(i===void 0||i>r.length)&&(i=r.length),i-=n.length;const o=r.indexOf(n,i);return o!==-1&&o===i},$l=r=>{if(!r)return null;if(fn(r))return r;let n=r.length;if(!Io(n))return null;const i=new Array(n);for(;n-- >0;)i[n]=r[n];return i},ql=(r=>n=>r&&n instanceof r)(typeof Uint8Array<"u"&&Ai(Uint8Array)),Vl=(r,n)=>{const i=(r&&r[gr]).call(r);let o;for(;(o=i.next())&&!o.done;){const u=o.value;n.call(r,u[0],u[1])}},jl=(r,n)=>{let i;const o=[];for(;(i=r.exec(n))!==null;)o.push(i);return o},zl=ft("HTMLFormElement"),Hl=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,i,o){return i.toUpperCase()+o}),Lo=(({hasOwnProperty:r})=>(n,i)=>r.call(n,i))(Object.prototype),Kl=ft("RegExp"),No=(r,n)=>{const i=Object.getOwnPropertyDescriptors(r),o={};Un(i,(u,l)=>{let d;(d=n(u,l,r))!==!1&&(o[l]=d||u)}),Object.defineProperties(r,o)},Gl=r=>{No(r,(n,i)=>{if(Ve(r)&&["arguments","caller","callee"].indexOf(i)!==-1)return!1;const o=r[i];if(Ve(o)){if(n.enumerable=!1,"writable"in n){n.writable=!1;return}n.set||(n.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")})}})},Jl=(r,n)=>{const i={},o=u=>{u.forEach(l=>{i[l]=!0})};return fn(r)?o(r):o(String(r).split(n)),i},Zl=()=>{},Yl=(r,n)=>r!=null&&Number.isFinite(r=+r)?r:n;function Xl(r){return!!(r&&Ve(r.append)&&r[Oo]==="FormData"&&r[gr])}const Ql=r=>{const n=new Array(10),i=(o,u)=>{if(Dn(o)){if(n.indexOf(o)>=0)return;if(Nn(o))return o;if(!("toJSON"in o)){n[u]=o;const l=fn(o)?[]:{};return Un(o,(d,b)=>{const v=i(d,u+1);!hn(v)&&(l[b]=v)}),n[u]=void 0,l}}return o};return i(r,0)},ef=ft("AsyncFunction"),tf=r=>r&&(Dn(r)||Ve(r))&&Ve(r.then)&&Ve(r.catch),Do=((r,n)=>r?setImmediate:n?((i,o)=>(Gt.addEventListener("message",({source:u,data:l})=>{u===Gt&&l===i&&o.length&&o.shift()()},!1),u=>{o.push(u),Gt.postMessage(i,"*")}))(`axios@${Math.random()}`,[]):i=>setTimeout(i))(typeof setImmediate=="function",Ve(Gt.postMessage)),nf=typeof queueMicrotask<"u"?queueMicrotask.bind(Gt):typeof process<"u"&&process.nextTick||Do,rf=r=>r!=null&&Ve(r[gr]),w={isArray:fn,isArrayBuffer:Ro,isBuffer:Nn,isFormData:Rl,isArrayBufferView:wl,isString:yl,isNumber:Io,isBoolean:xl,isObject:Dn,isPlainObject:br,isEmptyObject:Sl,isReadableStream:Pl,isRequest:kl,isResponse:Ll,isHeaders:Nl,isUndefined:hn,isDate:Cl,isFile:Tl,isBlob:El,isRegExp:Kl,isFunction:Ve,isStream:Ol,isURLSearchParams:Il,isTypedArray:ql,isFileList:Al,forEach:Un,merge:Oi,extend:Ul,trim:Dl,stripBOM:Fl,inherits:Ml,toFlatObject:Bl,kindOf:mr,kindOfTest:ft,endsWith:Wl,toArray:$l,forEachEntry:Vl,matchAll:jl,isHTMLForm:zl,hasOwnProperty:Lo,hasOwnProp:Lo,reduceDescriptors:No,freezeMethods:Gl,toObjectSet:Jl,toCamelCase:Hl,noop:Zl,toFiniteNumber:Yl,findKey:Po,global:Gt,isContextDefined:ko,isSpecCompliantForm:Xl,toJSONObject:Ql,isAsyncFn:ef,isThenable:tf,setImmediate:Do,asap:nf,isIterable:rf};function G(r,n,i,o,u){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",n&&(this.code=n),i&&(this.config=i),o&&(this.request=o),u&&(this.response=u,this.status=u.status?u.status:null)}w.inherits(G,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:w.toJSONObject(this.config),code:this.code,status:this.status}}});const Uo=G.prototype,Fo={};["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(r=>{Fo[r]={value:r}}),Object.defineProperties(G,Fo),Object.defineProperty(Uo,"isAxiosError",{value:!0}),G.from=(r,n,i,o,u,l)=>{const d=Object.create(Uo);w.toFlatObject(r,d,function(x){return x!==Error.prototype},x=>x!=="isAxiosError");const b=r&&r.message?r.message:"Error",v=n==null&&r?r.code:n;return G.call(d,b,v,i,o,u),r&&d.cause==null&&Object.defineProperty(d,"cause",{value:r,configurable:!0}),d.name=r&&r.name||"Error",l&&Object.assign(d,l),d};const sf=null;function Ri(r){return w.isPlainObject(r)||w.isArray(r)}function Mo(r){return w.endsWith(r,"[]")?r.slice(0,-2):r}function Bo(r,n,i){return r?r.concat(n).map(function(o,u){return o=Mo(o),!i&&u?"["+o+"]":o}).join(i?".":""):n}function of(r){return w.isArray(r)&&!r.some(Ri)}const af=w.toFlatObject(w,{},null,function(r){return/^is[A-Z]/.test(r)});function vr(r,n,i){if(!w.isObject(r))throw new TypeError("target must be an object");n=n||new FormData,i=w.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,function(I,P){return!w.isUndefined(P[I])});const o=i.metaTokens,u=i.visitor||x,l=i.dots,d=i.indexes,b=(i.Blob||typeof Blob<"u"&&Blob)&&w.isSpecCompliantForm(n);if(!w.isFunction(u))throw new TypeError("visitor must be a function");function v(I){if(I===null)return"";if(w.isDate(I))return I.toISOString();if(w.isBoolean(I))return I.toString();if(!b&&w.isBlob(I))throw new G("Blob is not supported. Use a Buffer instead.");return w.isArrayBuffer(I)||w.isTypedArray(I)?b&&typeof Blob=="function"?new Blob([I]):Buffer.from(I):I}function x(I,P,k){let H=I;if(I&&!k&&typeof I=="object"){if(w.endsWith(P,"{}"))P=o?P:P.slice(0,-2),I=JSON.stringify(I);else if(w.isArray(I)&&of(I)||(w.isFileList(I)||w.endsWith(P,"[]"))&&(H=w.toArray(I)))return P=Mo(P),H.forEach(function(re,se){!(w.isUndefined(re)||re===null)&&n.append(d===!0?Bo([P],se,l):d===null?P:P+"[]",v(re))}),!1}return Ri(I)?!0:(n.append(Bo(k,P,l),v(I)),!1)}const S=[],L=Object.assign(af,{defaultVisitor:x,convertValue:v,isVisitable:Ri});function M(I,P){if(!w.isUndefined(I)){if(S.indexOf(I)!==-1)throw Error("Circular reference detected in "+P.join("."));S.push(I),w.forEach(I,function(k,H){(!(w.isUndefined(k)||k===null)&&u.call(n,k,w.isString(H)?H.trim():H,P,L))===!0&&M(k,P?P.concat(H):[H])}),S.pop()}}if(!w.isObject(r))throw new TypeError("data must be an object");return M(r),n}function Wo(r){const n={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(i){return n[i]})}function Ii(r,n){this._pairs=[],r&&vr(r,this,n)}const $o=Ii.prototype;$o.append=function(r,n){this._pairs.push([r,n])},$o.toString=function(r){const n=r?function(i){return r.call(this,i,Wo)}:Wo;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function uf(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function qo(r,n,i){if(!n)return r;const o=i&&i.encode||uf;w.isFunction(i)&&(i={serialize:i});const u=i&&i.serialize;let l;if(u?l=u(n,i):l=w.isURLSearchParams(n)?n.toString():new Ii(n,i).toString(o),l){const d=r.indexOf("#");d!==-1&&(r=r.slice(0,d)),r+=(r.indexOf("?")===-1?"?":"&")+l}return r}class Vo{constructor(){this.handlers=[]}use(n,i,o){return this.handlers.push({fulfilled:n,rejected:i,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(n){this.handlers[n]&&(this.handlers[n]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(n){w.forEach(this.handlers,function(i){i!==null&&n(i)})}}const jo={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},cf=typeof URLSearchParams<"u"?URLSearchParams:Ii,lf=typeof FormData<"u"?FormData:null,ff=typeof Blob<"u"?Blob:null,hf={isBrowser:!0,classes:{URLSearchParams:cf,FormData:lf,Blob:ff},protocols:["http","https","file","blob","url","data"]},Pi=typeof window<"u"&&typeof document<"u",ki=typeof navigator=="object"&&navigator||void 0,df=Pi&&(!ki||["ReactNative","NativeScript","NS"].indexOf(ki.product)<0),pf=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",gf=Pi&&window.location.href||"http://localhost",mf=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Pi,hasStandardBrowserEnv:df,hasStandardBrowserWebWorkerEnv:pf,navigator:ki,origin:gf},Symbol.toStringTag,{value:"Module"})),Ue={...mf,...hf};function _f(r,n){return vr(r,new Ue.classes.URLSearchParams,{visitor:function(i,o,u,l){return Ue.isNode&&w.isBuffer(i)?(this.append(o,i.toString("base64")),!1):l.defaultVisitor.apply(this,arguments)},...n})}function bf(r){return w.matchAll(/\w+|\[(\w*)]/g,r).map(n=>n[0]==="[]"?"":n[1]||n[0])}function vf(r){const n={},i=Object.keys(r);let o;const u=i.length;let l;for(o=0;o<u;o++)l=i[o],n[l]=r[l];return n}function zo(r){function n(i,o,u,l){let d=i[l++];if(d==="__proto__")return!0;const b=Number.isFinite(+d),v=l>=i.length;return d=!d&&w.isArray(u)?u.length:d,v?(w.hasOwnProp(u,d)?u[d]=[u[d],o]:u[d]=o,!b):((!u[d]||!w.isObject(u[d]))&&(u[d]=[]),n(i,o,u[d],l)&&w.isArray(u[d])&&(u[d]=vf(u[d])),!b)}if(w.isFormData(r)&&w.isFunction(r.entries)){const i={};return w.forEachEntry(r,(o,u)=>{n(bf(o),u,i,0)}),i}return null}function wf(r,n,i){if(w.isString(r))try{return(n||JSON.parse)(r),w.trim(r)}catch(o){if(o.name!=="SyntaxError")throw o}return(i||JSON.stringify)(r)}const Fn={transitional:jo,adapter:["xhr","http","fetch"],transformRequest:[function(r,n){const i=n.getContentType()||"",o=i.indexOf("application/json")>-1,u=w.isObject(r);if(u&&w.isHTMLForm(r)&&(r=new FormData(r)),w.isFormData(r))return o?JSON.stringify(zo(r)):r;if(w.isArrayBuffer(r)||w.isBuffer(r)||w.isStream(r)||w.isFile(r)||w.isBlob(r)||w.isReadableStream(r))return r;if(w.isArrayBufferView(r))return r.buffer;if(w.isURLSearchParams(r))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),r.toString();let l;if(u){if(i.indexOf("application/x-www-form-urlencoded")>-1)return _f(r,this.formSerializer).toString();if((l=w.isFileList(r))||i.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return vr(l?{"files[]":r}:r,d&&new d,this.formSerializer)}}return u||o?(n.setContentType("application/json",!1),wf(r)):r}],transformResponse:[function(r){const n=this.transitional||Fn.transitional,i=n&&n.forcedJSONParsing,o=this.responseType==="json";if(w.isResponse(r)||w.isReadableStream(r))return r;if(r&&w.isString(r)&&(i&&!this.responseType||o)){const u=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(r,this.parseReviver)}catch(l){if(u)throw l.name==="SyntaxError"?G.from(l,G.ERR_BAD_RESPONSE,this,null,this.response):l}}return r}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ue.classes.FormData,Blob:Ue.classes.Blob},validateStatus:function(r){return r>=200&&r<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};w.forEach(["delete","get","head","post","put","patch"],r=>{Fn.headers[r]={}});const yf=w.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"]),xf=r=>{const n={};let i,o,u;return r&&r.split(`
|
3
|
+
`).forEach(function(l){u=l.indexOf(":"),i=l.substring(0,u).trim().toLowerCase(),o=l.substring(u+1).trim(),!(!i||n[i]&&yf[i])&&(i==="set-cookie"?n[i]?n[i].push(o):n[i]=[o]:n[i]=n[i]?n[i]+", "+o:o)}),n},Ho=Symbol("internals");function Mn(r){return r&&String(r).trim().toLowerCase()}function wr(r){return r===!1||r==null?r:w.isArray(r)?r.map(wr):String(r)}function Sf(r){const n=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=i.exec(r);)n[o[1]]=o[2];return n}const Cf=r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());function Li(r,n,i,o,u){if(w.isFunction(o))return o.call(this,n,i);if(u&&(n=i),!!w.isString(n)){if(w.isString(o))return n.indexOf(o)!==-1;if(w.isRegExp(o))return o.test(n)}}function Tf(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(n,i,o)=>i.toUpperCase()+o)}function Ef(r,n){const i=w.toCamelCase(" "+n);["get","set","has"].forEach(o=>{Object.defineProperty(r,o+i,{value:function(u,l,d){return this[o].call(this,n,u,l,d)},configurable:!0})})}let je=class{constructor(r){r&&this.set(r)}set(r,n,i){const o=this;function u(d,b,v){const x=Mn(b);if(!x)throw new Error("header name must be a non-empty string");const S=w.findKey(o,x);(!S||o[S]===void 0||v===!0||v===void 0&&o[S]!==!1)&&(o[S||b]=wr(d))}const l=(d,b)=>w.forEach(d,(v,x)=>u(v,x,b));if(w.isPlainObject(r)||r instanceof this.constructor)l(r,n);else if(w.isString(r)&&(r=r.trim())&&!Cf(r))l(xf(r),n);else if(w.isObject(r)&&w.isIterable(r)){let d={},b,v;for(const x of r){if(!w.isArray(x))throw TypeError("Object iterator must return a key-value pair");d[v=x[0]]=(b=d[v])?w.isArray(b)?[...b,x[1]]:[b,x[1]]:x[1]}l(d,n)}else r!=null&&u(n,r,i);return this}get(r,n){if(r=Mn(r),r){const i=w.findKey(this,r);if(i){const o=this[i];if(!n)return o;if(n===!0)return Sf(o);if(w.isFunction(n))return n.call(this,o,i);if(w.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(r,n){if(r=Mn(r),r){const i=w.findKey(this,r);return!!(i&&this[i]!==void 0&&(!n||Li(this,this[i],i,n)))}return!1}delete(r,n){const i=this;let o=!1;function u(l){if(l=Mn(l),l){const d=w.findKey(i,l);d&&(!n||Li(i,i[d],d,n))&&(delete i[d],o=!0)}}return w.isArray(r)?r.forEach(u):u(r),o}clear(r){const n=Object.keys(this);let i=n.length,o=!1;for(;i--;){const u=n[i];(!r||Li(this,this[u],u,r,!0))&&(delete this[u],o=!0)}return o}normalize(r){const n=this,i={};return w.forEach(this,(o,u)=>{const l=w.findKey(i,u);if(l){n[l]=wr(o),delete n[u];return}const d=r?Tf(u):String(u).trim();d!==u&&delete n[u],n[d]=wr(o),i[d]=!0}),this}concat(...r){return this.constructor.concat(this,...r)}toJSON(r){const n=Object.create(null);return w.forEach(this,(i,o)=>{i!=null&&i!==!1&&(n[o]=r&&w.isArray(i)?i.join(", "):i)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([r,n])=>r+": "+n).join(`
|
4
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(r){return r instanceof this?r:new this(r)}static concat(r,...n){const i=new this(r);return n.forEach(o=>i.set(o)),i}static accessor(r){const n=(this[Ho]=this[Ho]={accessors:{}}).accessors,i=this.prototype;function o(u){const l=Mn(u);n[l]||(Ef(i,u),n[l]=!0)}return w.isArray(r)?r.forEach(o):o(r),this}};je.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),w.reduceDescriptors(je.prototype,({value:r},n)=>{let i=n[0].toUpperCase()+n.slice(1);return{get:()=>r,set(o){this[i]=o}}}),w.freezeMethods(je);function Ni(r,n){const i=this||Fn,o=n||i,u=je.from(o.headers);let l=o.data;return w.forEach(r,function(d){l=d.call(i,l,u.normalize(),n?n.status:void 0)}),u.normalize(),l}function Ko(r){return!!(r&&r.__CANCEL__)}function dn(r,n,i){G.call(this,r??"canceled",G.ERR_CANCELED,n,i),this.name="CanceledError"}w.inherits(dn,G,{__CANCEL__:!0});function Go(r,n,i){const o=i.config.validateStatus;!i.status||!o||o(i.status)?r(i):n(new G("Request failed with status code "+i.status,[G.ERR_BAD_REQUEST,G.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i))}function Af(r){const n=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return n&&n[1]||""}function Of(r,n){r=r||10;const i=new Array(r),o=new Array(r);let u=0,l=0,d;return n=n!==void 0?n:1e3,function(b){const v=Date.now(),x=o[l];d||(d=v),i[u]=b,o[u]=v;let S=l,L=0;for(;S!==u;)L+=i[S++],S=S%r;if(u=(u+1)%r,u===l&&(l=(l+1)%r),v-d<n)return;const M=x&&v-x;return M?Math.round(L*1e3/M):void 0}}function Rf(r,n){let i=0,o=1e3/n,u,l;const d=(b,v=Date.now())=>{i=v,u=null,l&&(clearTimeout(l),l=null),r(...b)};return[(...b)=>{const v=Date.now(),x=v-i;x>=o?d(b,v):(u=b,l||(l=setTimeout(()=>{l=null,d(u)},o-x)))},()=>u&&d(u)]}const yr=(r,n,i=3)=>{let o=0;const u=Of(50,250);return Rf(l=>{const d=l.loaded,b=l.lengthComputable?l.total:void 0,v=d-o,x=u(v),S=d<=b;o=d;const L={loaded:d,total:b,progress:b?d/b:void 0,bytes:v,rate:x||void 0,estimated:x&&b&&S?(b-d)/x:void 0,event:l,lengthComputable:b!=null,[n?"download":"upload"]:!0};r(L)},i)},Jo=(r,n)=>{const i=r!=null;return[o=>n[0]({lengthComputable:i,total:r,loaded:o}),n[1]]},Zo=r=>(...n)=>w.asap(()=>r(...n)),If=Ue.hasStandardBrowserEnv?((r,n)=>i=>(i=new URL(i,Ue.origin),r.protocol===i.protocol&&r.host===i.host&&(n||r.port===i.port)))(new URL(Ue.origin),Ue.navigator&&/(msie|trident)/i.test(Ue.navigator.userAgent)):()=>!0,Pf=Ue.hasStandardBrowserEnv?{write(r,n,i,o,u,l){const d=[r+"="+encodeURIComponent(n)];w.isNumber(i)&&d.push("expires="+new Date(i).toGMTString()),w.isString(o)&&d.push("path="+o),w.isString(u)&&d.push("domain="+u),l===!0&&d.push("secure"),document.cookie=d.join("; ")},read(r){const n=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove(r){this.write(r,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function kf(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function Lf(r,n){return n?r.replace(/\/?\/$/,"")+"/"+n.replace(/^\/+/,""):r}function Yo(r,n,i){let o=!kf(n);return r&&(o||i==!1)?Lf(r,n):n}const Xo=r=>r instanceof je?{...r}:r;function Jt(r,n){n=n||{};const i={};function o(x,S,L,M){return w.isPlainObject(x)&&w.isPlainObject(S)?w.merge.call({caseless:M},x,S):w.isPlainObject(S)?w.merge({},S):w.isArray(S)?S.slice():S}function u(x,S,L,M){if(w.isUndefined(S)){if(!w.isUndefined(x))return o(void 0,x,L,M)}else return o(x,S,L,M)}function l(x,S){if(!w.isUndefined(S))return o(void 0,S)}function d(x,S){if(w.isUndefined(S)){if(!w.isUndefined(x))return o(void 0,x)}else return o(void 0,S)}function b(x,S,L){if(L in n)return o(x,S);if(L in r)return o(void 0,x)}const v={url:l,method:l,data:l,baseURL:d,transformRequest:d,transformResponse:d,paramsSerializer:d,timeout:d,timeoutMessage:d,withCredentials:d,withXSRFToken:d,adapter:d,responseType:d,xsrfCookieName:d,xsrfHeaderName:d,onUploadProgress:d,onDownloadProgress:d,decompress:d,maxContentLength:d,maxBodyLength:d,beforeRedirect:d,transport:d,httpAgent:d,httpsAgent:d,cancelToken:d,socketPath:d,responseEncoding:d,validateStatus:b,headers:(x,S,L)=>u(Xo(x),Xo(S),L,!0)};return w.forEach(Object.keys({...r,...n}),function(x){const S=v[x]||u,L=S(r[x],n[x],x);w.isUndefined(L)&&S!==b||(i[x]=L)}),i}const Qo=r=>{const n=Jt({},r);let{data:i,withXSRFToken:o,xsrfHeaderName:u,xsrfCookieName:l,headers:d,auth:b}=n;if(n.headers=d=je.from(d),n.url=qo(Yo(n.baseURL,n.url,n.allowAbsoluteUrls),r.params,r.paramsSerializer),b&&d.set("Authorization","Basic "+btoa((b.username||"")+":"+(b.password?unescape(encodeURIComponent(b.password)):""))),w.isFormData(i)){if(Ue.hasStandardBrowserEnv||Ue.hasStandardBrowserWebWorkerEnv)d.setContentType(void 0);else if(w.isFunction(i.getHeaders)){const v=i.getHeaders(),x=["content-type","content-length"];Object.entries(v).forEach(([S,L])=>{x.includes(S.toLowerCase())&&d.set(S,L)})}}if(Ue.hasStandardBrowserEnv&&(o&&w.isFunction(o)&&(o=o(n)),o||o!==!1&&If(n.url))){const v=u&&l&&Pf.read(l);v&&d.set(u,v)}return n},Nf=typeof XMLHttpRequest<"u",Df=Nf&&function(r){return new Promise(function(n,i){const o=Qo(r);let u=o.data;const l=je.from(o.headers).normalize();let{responseType:d,onUploadProgress:b,onDownloadProgress:v}=o,x,S,L,M,I;function P(){M&&M(),I&&I(),o.cancelToken&&o.cancelToken.unsubscribe(x),o.signal&&o.signal.removeEventListener("abort",x)}let k=new XMLHttpRequest;k.open(o.method.toUpperCase(),o.url,!0),k.timeout=o.timeout;function H(){if(!k)return;const se=je.from("getAllResponseHeaders"in k&&k.getAllResponseHeaders()),oe={data:!d||d==="text"||d==="json"?k.responseText:k.response,status:k.status,statusText:k.statusText,headers:se,config:r,request:k};Go(function(ge){n(ge),P()},function(ge){i(ge),P()},oe),k=null}"onloadend"in k?k.onloadend=H:k.onreadystatechange=function(){!k||k.readyState!==4||k.status===0&&!(k.responseURL&&k.responseURL.indexOf("file:")===0)||setTimeout(H)},k.onabort=function(){k&&(i(new G("Request aborted",G.ECONNABORTED,r,k)),k=null)},k.onerror=function(se){const oe=se&&se.message?se.message:"Network Error",ge=new G(oe,G.ERR_NETWORK,r,k);ge.event=se||null,i(ge),k=null},k.ontimeout=function(){let se=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const oe=o.transitional||jo;o.timeoutErrorMessage&&(se=o.timeoutErrorMessage),i(new G(se,oe.clarifyTimeoutError?G.ETIMEDOUT:G.ECONNABORTED,r,k)),k=null},u===void 0&&l.setContentType(null),"setRequestHeader"in k&&w.forEach(l.toJSON(),function(se,oe){k.setRequestHeader(oe,se)}),w.isUndefined(o.withCredentials)||(k.withCredentials=!!o.withCredentials),d&&d!=="json"&&(k.responseType=o.responseType),v&&([L,I]=yr(v,!0),k.addEventListener("progress",L)),b&&k.upload&&([S,M]=yr(b),k.upload.addEventListener("progress",S),k.upload.addEventListener("loadend",M)),(o.cancelToken||o.signal)&&(x=se=>{k&&(i(!se||se.type?new dn(null,r,k):se),k.abort(),k=null)},o.cancelToken&&o.cancelToken.subscribe(x),o.signal&&(o.signal.aborted?x():o.signal.addEventListener("abort",x)));const re=Af(o.url);if(re&&Ue.protocols.indexOf(re)===-1){i(new G("Unsupported protocol "+re+":",G.ERR_BAD_REQUEST,r));return}k.send(u||null)})},Uf=(r,n)=>{const{length:i}=r=r?r.filter(Boolean):[];if(n||i){let o=new AbortController,u;const l=function(x){if(!u){u=!0,b();const S=x instanceof Error?x:this.reason;o.abort(S instanceof G?S:new dn(S instanceof Error?S.message:S))}};let d=n&&setTimeout(()=>{d=null,l(new G(`timeout ${n} of ms exceeded`,G.ETIMEDOUT))},n);const b=()=>{r&&(d&&clearTimeout(d),d=null,r.forEach(x=>{x.unsubscribe?x.unsubscribe(l):x.removeEventListener("abort",l)}),r=null)};r.forEach(x=>x.addEventListener("abort",l));const{signal:v}=o;return v.unsubscribe=()=>w.asap(b),v}},Ff=function*(r,n){let i=r.byteLength;if(i<n){yield r;return}let o=0,u;for(;o<i;)u=o+n,yield r.slice(o,u),o=u},Mf=async function*(r,n){for await(const i of Bf(r))yield*Ff(i,n)},Bf=async function*(r){if(r[Symbol.asyncIterator]){yield*r;return}const n=r.getReader();try{for(;;){const{done:i,value:o}=await n.read();if(i)break;yield o}}finally{await n.cancel()}},ea=(r,n,i,o)=>{const u=Mf(r,n);let l=0,d,b=v=>{d||(d=!0,o&&o(v))};return new ReadableStream({async pull(v){try{const{done:x,value:S}=await u.next();if(x){b(),v.close();return}let L=S.byteLength;if(i){let M=l+=L;i(M)}v.enqueue(new Uint8Array(S))}catch(x){throw b(x),x}},cancel(v){return b(v),u.return()}},{highWaterMark:2})},ta=64*1024,{isFunction:xr}=w,na=(({fetch:r,Request:n,Response:i})=>({fetch:r,Request:n,Response:i}))(w.global),{ReadableStream:ra,TextEncoder:ia}=w.global,sa=(r,...n)=>{try{return!!r(...n)}catch{return!1}},Wf=r=>{const{fetch:n,Request:i,Response:o}=Object.assign({},na,r),u=xr(n),l=xr(i),d=xr(o);if(!u)return!1;const b=u&&xr(ra),v=u&&(typeof ia=="function"?(P=>k=>P.encode(k))(new ia):async P=>new Uint8Array(await new i(P).arrayBuffer())),x=l&&b&&sa(()=>{let P=!1;const k=new i(Ue.origin,{body:new ra,method:"POST",get duplex(){return P=!0,"half"}}).headers.has("Content-Type");return P&&!k}),S=d&&b&&sa(()=>w.isReadableStream(new o("").body)),L={stream:S&&(P=>P.body)};u&&["text","arrayBuffer","blob","formData","stream"].forEach(P=>{!L[P]&&(L[P]=(k,H)=>{let re=k&&k[P];if(re)return re.call(k);throw new G(`Response type '${P}' is not supported`,G.ERR_NOT_SUPPORT,H)})});const M=async P=>{if(P==null)return 0;if(w.isBlob(P))return P.size;if(w.isSpecCompliantForm(P))return(await new i(Ue.origin,{method:"POST",body:P}).arrayBuffer()).byteLength;if(w.isArrayBufferView(P)||w.isArrayBuffer(P))return P.byteLength;if(w.isURLSearchParams(P)&&(P=P+""),w.isString(P))return(await v(P)).byteLength},I=async(P,k)=>w.toFiniteNumber(P.getContentLength())??M(k);return async P=>{let{url:k,method:H,data:re,signal:se,cancelToken:oe,timeout:ge,onDownloadProgress:D,onUploadProgress:me,responseType:ee,headers:Oe,withCredentials:Pe="same-origin",fetchOptions:xt}=Qo(P);ee=ee?(ee+"").toLowerCase():"text";let Se=Uf([se,oe&&oe.toAbortSignal()],ge),Fe=null;const de=Se&&Se.unsubscribe&&(()=>{Se.unsubscribe()});let j;try{if(me&&x&&H!=="get"&&H!=="head"&&(j=await I(Oe,re))!==0){let W=new i(k,{method:"POST",body:re,duplex:"half"}),ye;if(w.isFormData(re)&&(ye=W.headers.get("content-type"))&&Oe.setContentType(ye),W.body){const[Qt,gn]=Jo(j,yr(Zo(me)));re=ea(W.body,ta,Qt,gn)}}w.isString(Pe)||(Pe=Pe?"include":"omit");const ae=l&&"credentials"in i.prototype,ze={...xt,signal:Se,method:H.toUpperCase(),headers:Oe.normalize().toJSON(),body:re,duplex:"half",credentials:ae?Pe:void 0};Fe=l&&new i(k,ze);let be=await(l?n(Fe,xt):n(k,ze));const Le=S&&(ee==="stream"||ee==="response");if(S&&(D||Le&&de)){const W={};["status","statusText","headers"].forEach(Pr=>{W[Pr]=be[Pr]});const ye=w.toFiniteNumber(be.headers.get("content-length")),[Qt,gn]=D&&Jo(ye,yr(Zo(D),!0))||[];be=new o(ea(be.body,ta,Qt,()=>{gn&&gn(),de&&de()}),W)}ee=ee||"text";let jn=await L[w.findKey(L,ee)||"text"](be,P);return!Le&&de&&de(),await new Promise((W,ye)=>{Go(W,ye,{data:jn,headers:je.from(be.headers),status:be.status,statusText:be.statusText,config:P,request:Fe})})}catch(ae){throw de&&de(),ae&&ae.name==="TypeError"&&/Load failed|fetch/i.test(ae.message)?Object.assign(new G("Network Error",G.ERR_NETWORK,P,Fe),{cause:ae.cause||ae}):G.from(ae,ae&&ae.code,P,Fe)}}},$f=new Map,oa=r=>{let n=w.merge.call({skipUndefined:!0},na,r?r.env:null);const{fetch:i,Request:o,Response:u}=n,l=[o,u,i];let d=l.length,b=d,v,x,S=$f;for(;b--;)v=l[b],x=S.get(v),x===void 0&&S.set(v,x=b?new Map:Wf(n)),S=x;return x};oa();const Di={http:sf,xhr:Df,fetch:{get:oa}};w.forEach(Di,(r,n)=>{if(r){try{Object.defineProperty(r,"name",{value:n})}catch{}Object.defineProperty(r,"adapterName",{value:n})}});const aa=r=>`- ${r}`,qf=r=>w.isFunction(r)||r===null||r===!1,ua={getAdapter:(r,n)=>{r=w.isArray(r)?r:[r];const{length:i}=r;let o,u;const l={};for(let d=0;d<i;d++){o=r[d];let b;if(u=o,!qf(o)&&(u=Di[(b=String(o)).toLowerCase()],u===void 0))throw new G(`Unknown adapter '${b}'`);if(u&&(w.isFunction(u)||(u=u.get(n))))break;l[b||"#"+d]=u}if(!u){const d=Object.entries(l).map(([v,x])=>`adapter ${v} `+(x===!1?"is not supported by the environment":"is not available in the build"));let b=i?d.length>1?`since :
|
5
|
+
`+d.map(aa).join(`
|
6
|
+
`):" "+aa(d[0]):"as no adapter specified";throw new G("There is no suitable adapter to dispatch the request "+b,"ERR_NOT_SUPPORT")}return u},adapters:Di};function Ui(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new dn(null,r)}function ca(r){return Ui(r),r.headers=je.from(r.headers),r.data=Ni.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),ua.getAdapter(r.adapter||Fn.adapter,r)(r).then(function(n){return Ui(r),n.data=Ni.call(r,r.transformResponse,n),n.headers=je.from(n.headers),n},function(n){return Ko(n)||(Ui(r),n&&n.response&&(n.response.data=Ni.call(r,r.transformResponse,n.response),n.response.headers=je.from(n.response.headers))),Promise.reject(n)})}const la="1.12.0",Sr={};["object","boolean","number","function","string","symbol"].forEach((r,n)=>{Sr[r]=function(i){return typeof i===r||"a"+(n<1?"n ":" ")+r}});const fa={};Sr.transitional=function(r,n,i){function o(u,l){return"[Axios v"+la+"] Transitional option '"+u+"'"+l+(i?". "+i:"")}return(u,l,d)=>{if(r===!1)throw new G(o(l," has been removed"+(n?" in "+n:"")),G.ERR_DEPRECATED);return n&&!fa[l]&&(fa[l]=!0,console.warn(o(l," has been deprecated since v"+n+" and will be removed in the near future"))),r?r(u,l,d):!0}},Sr.spelling=function(r){return(n,i)=>(console.warn(`${i} is likely a misspelling of ${r}`),!0)};function Vf(r,n,i){if(typeof r!="object")throw new G("options must be an object",G.ERR_BAD_OPTION_VALUE);const o=Object.keys(r);let u=o.length;for(;u-- >0;){const l=o[u],d=n[l];if(d){const b=r[l],v=b===void 0||d(b,l,r);if(v!==!0)throw new G("option "+l+" must be "+v,G.ERR_BAD_OPTION_VALUE);continue}if(i!==!0)throw new G("Unknown option "+l,G.ERR_BAD_OPTION)}}const Cr={assertOptions:Vf,validators:Sr},yt=Cr.validators;let Zt=class{constructor(r){this.defaults=r||{},this.interceptors={request:new Vo,response:new Vo}}async request(r,n){try{return await this._request(r,n)}catch(i){if(i instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const u=o.stack?o.stack.replace(/^.+\n/,""):"";try{i.stack?u&&!String(i.stack).endsWith(u.replace(/^.+\n.+\n/,""))&&(i.stack+=`
|
7
|
+
`+u):i.stack=u}catch{}}throw i}}_request(r,n){typeof r=="string"?(n=n||{},n.url=r):n=r||{},n=Jt(this.defaults,n);const{transitional:i,paramsSerializer:o,headers:u}=n;i!==void 0&&Cr.assertOptions(i,{silentJSONParsing:yt.transitional(yt.boolean),forcedJSONParsing:yt.transitional(yt.boolean),clarifyTimeoutError:yt.transitional(yt.boolean)},!1),o!=null&&(w.isFunction(o)?n.paramsSerializer={serialize:o}:Cr.assertOptions(o,{encode:yt.function,serialize:yt.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Cr.assertOptions(n,{baseUrl:yt.spelling("baseURL"),withXsrfToken:yt.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=u&&w.merge(u.common,u[n.method]);u&&w.forEach(["delete","get","head","post","put","patch","common"],I=>{delete u[I]}),n.headers=je.concat(l,u);const d=[];let b=!0;this.interceptors.request.forEach(function(I){typeof I.runWhen=="function"&&I.runWhen(n)===!1||(b=b&&I.synchronous,d.unshift(I.fulfilled,I.rejected))});const v=[];this.interceptors.response.forEach(function(I){v.push(I.fulfilled,I.rejected)});let x,S=0,L;if(!b){const I=[ca.bind(this),void 0];for(I.unshift(...d),I.push(...v),L=I.length,x=Promise.resolve(n);S<L;)x=x.then(I[S++],I[S++]);return x}L=d.length;let M=n;for(S=0;S<L;){const I=d[S++],P=d[S++];try{M=I(M)}catch(k){P.call(this,k);break}}try{x=ca.call(this,M)}catch(I){return Promise.reject(I)}for(S=0,L=v.length;S<L;)x=x.then(v[S++],v[S++]);return x}getUri(r){r=Jt(this.defaults,r);const n=Yo(r.baseURL,r.url,r.allowAbsoluteUrls);return qo(n,r.params,r.paramsSerializer)}};w.forEach(["delete","get","head","options"],function(r){Zt.prototype[r]=function(n,i){return this.request(Jt(i||{},{method:r,url:n,data:(i||{}).data}))}}),w.forEach(["post","put","patch"],function(r){function n(i){return function(o,u,l){return this.request(Jt(l||{},{method:r,headers:i?{"Content-Type":"multipart/form-data"}:{},url:o,data:u}))}}Zt.prototype[r]=n(),Zt.prototype[r+"Form"]=n(!0)});let jf=class fl{constructor(n){if(typeof n!="function")throw new TypeError("executor must be a function.");let i;this.promise=new Promise(function(u){i=u});const o=this;this.promise.then(u=>{if(!o._listeners)return;let l=o._listeners.length;for(;l-- >0;)o._listeners[l](u);o._listeners=null}),this.promise.then=u=>{let l;const d=new Promise(b=>{o.subscribe(b),l=b}).then(u);return d.cancel=function(){o.unsubscribe(l)},d},n(function(u,l,d){o.reason||(o.reason=new dn(u,l,d),i(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]}unsubscribe(n){if(!this._listeners)return;const i=this._listeners.indexOf(n);i!==-1&&this._listeners.splice(i,1)}toAbortSignal(){const n=new AbortController,i=o=>{n.abort(o)};return this.subscribe(i),n.signal.unsubscribe=()=>this.unsubscribe(i),n.signal}static source(){let n;return{token:new fl(function(i){n=i}),cancel:n}}};function zf(r){return function(n){return r.apply(null,n)}}function Hf(r){return w.isObject(r)&&r.isAxiosError===!0}const Fi={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(Fi).forEach(([r,n])=>{Fi[n]=r});function ha(r){const n=new Zt(r),i=Ao(Zt.prototype.request,n);return w.extend(i,Zt.prototype,n,{allOwnKeys:!0}),w.extend(i,n,null,{allOwnKeys:!0}),i.create=function(o){return ha(Jt(r,o))},i}const Te=ha(Fn);Te.Axios=Zt,Te.CanceledError=dn,Te.CancelToken=jf,Te.isCancel=Ko,Te.VERSION=la,Te.toFormData=vr,Te.AxiosError=G,Te.Cancel=Te.CanceledError,Te.all=function(r){return Promise.all(r)},Te.spread=zf,Te.isAxiosError=Hf,Te.mergeConfig=Jt,Te.AxiosHeaders=je,Te.formToJSON=r=>zo(w.isHTMLForm(r)?new FormData(r):r),Te.getAdapter=ua.getAdapter,Te.HttpStatusCode=Fi,Te.default=Te;const{Axios:mw,AxiosError:_w,CanceledError:bw,isCancel:vw,CancelToken:ww,VERSION:yw,all:xw,Cancel:Sw,isAxiosError:Cw,spread:Tw,toFormData:Ew,AxiosHeaders:Aw,HttpStatusCode:Ow,formToJSON:Rw,getAdapter:Iw,mergeConfig:Pw}=Te,Mi=Te.create({baseURL:location.origin,timeout:6e4,params:{}});Mi.interceptors.response.use(r=>r,r=>{var n,i,o,u,l,d,b,v,x,S,L;if(r.response){if(r.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(P){P&&OpenC3Auth.setTokens()}),r.response.config.headers["Ignore-Errors"]&&r.response.config.headers["Ignore-Errors"].includes(r.response.status.toString()))return Promise.reject(r);let M=`HTTP ${r.response.status} - `;(n=r.response)!=null&&n.statusText&&(M+=`${r.response.statusText} `),(o=(i=r.response)==null?void 0:i.config)!=null&&o.data&&(M+=`${r.response.config.data} `),(l=(u=r.response)==null?void 0:u.data)!=null&&l.message?M+=`${r.response.data.message}`:(b=(d=r.response)==null?void 0:d.data)!=null&&b.exception?M+=`${r.response.data.exception}`:(S=(x=(v=r.response)==null?void 0:v.data)==null?void 0:x.error)!=null&&S.message?(r.response.data.error.class&&(M+=`${r.response.data.error.class} `),M+=`${r.response.data.error.message}`):M+=`${(L=r.response)==null?void 0:L.data}`;const{$cosmosNotify:I}=window;throw I&&I.serious({title:"Network error",body:M}),r}else throw r});const Tr=async function(r,n,{data:i,params:o={},headers:u,noAuth:l=!1,noScope:d=!1,onUploadProgress:b=!1}={}){if(!l){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}u.Authorization=localStorage.openc3Token}return u.manual=!0,!d&&!o.scope&&(o.scope=window.openc3Scope),Mi({method:r,url:n,data:i,params:o,headers:u,onUploadProgress:b})},Bi={Accept:"application/json"},da={...Bi,"Content-Type":"application/json"},pa={get:function(r,{params:n,headers:i=Bi,noScope:o,noAuth:u,onUploadProgress:l}={}){return Tr("get",r,{params:n,headers:i,noScope:o,noAuth:u,onUploadProgress:l})},put:function(r,{data:n,params:i,headers:o=da,noScope:u,noAuth:l,onUploadProgress:d}={}){return Tr("put",r,{data:n,params:i,headers:o,noScope:u,noAuth:l,onUploadProgress:d})},post:function(r,{data:n,params:i,headers:o=da,noScope:u,noAuth:l,onUploadProgress:d}={}){return Tr("post",r,{data:n,params:i,headers:o,noScope:u,noAuth:l,onUploadProgress:d})},delete:function(r,{params:n,headers:i=Bi,noScope:o,noAuth:u,onUploadProgress:l}={}){return Tr("delete",r,{params:n,headers:i,noScope:o,noAuth:u,onUploadProgress:l})}};let Er=()=>({emit(r,...n){for(let i=this.events[r]||[],o=0,u=i.length;o<u;o++)i[o](...n)},events:{},on(r,n){var i;return((i=this.events)[r]||(i[r]=[])).push(n),()=>{var o;this.events[r]=(o=this.events[r])==null?void 0:o.filter(u=>n!==u)}}});class Bn extends Error{constructor(n,i){n instanceof Error?(super(n.message),this.cause=n):super(n),this.reason=i,this.name="ReasonError"}}class Wi extends Bn{constructor(n){super("Rejected",n),this.name="SubscriptionRejectedError"}}class Kf extends Bn{constructor(n){super(n||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class ht extends Bn{constructor(n,i){i?super(n,i):super("Disconnected",n),this.name="DisconnectedError"}}class Gf extends ht{constructor(n){super(n,"stale_connection"),this.name="StaleConnectionError"}}function ga(r){return r?`{${Object.keys(r).sort().filter(n=>r[n]!==void 0).map(n=>{let i=JSON.stringify(r[n]);return`${JSON.stringify(n)}:${i}`}).join(",")}}`:""}class Jf{constructor(n){this.channel=n,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",n=>{if(n.type==="info"){this._state||(this._state=this.stateFromInfo(n));return}this._state&&(n.type==="join"?this._state[n.id]=n.info:n.type==="leave"&&delete this._state[n.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(n=>n()),this.listeners.length=0}async join(n,i){if(!this._info)return this._info={id:n,info:i},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let n=await this.channel.perform("$presence:leave");return delete this._info,n}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let n=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(n),this._state}finally{delete this._promise}}stateFromInfo(n){return n.records.reduce((i,{id:o,info:u})=>(i[o]=u,i),{})}}const Yt=Symbol("state");class ma{constructor(n={}){this.emitter=Er(),this.params=Object.freeze(n),this.presence=new Jf(this),this.initialConnect=!0,this[Yt]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=ga({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[Yt]}attached(n){if(this.receiver){if(this.receiver!==n)throw Error("Already connected to a different receiver");return!1}return this.receiver=n,!0}connecting(){this[Yt]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[Yt]="connected";let n=!1;this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:n})):this.emit("connect",{reconnect:!0,restored:n})}restored(){if(this.state==="connected")throw Error("Already connected");this[Yt]="connected";let n=!0,i=!0;this.initialConnect=!1,this.emit("connect",{reconnect:i,restored:n})}disconnected(n){this.state==="disconnected"||this.state==="closed"||(this[Yt]="disconnected",this.presence.reset(),this.emit("disconnect",n))}closed(n){this.state!=="closed"&&(this[Yt]="closed",delete this.receiver,this.initialConnect=!0,this.presence.dispose(),this.emit("close",n))}disconnect(){this.state==="idle"||this.state==="closed"||this.receiver.unsubscribe(this)}async perform(n,i){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,n,i)}async send(n){return this.perform(void 0,n)}async whisper(n){try{await this.perform("$whisper",n)}catch(i){let o=this.receiver?this.receiver.logger:null;o&&o.warn("whisper failed: ",i)}}receive(n,i){this.emit("message",n,i)}on(n,i){return this.emitter.on(n,i)}once(n,i){let o=this.emitter.on(n,(...u)=>{o(),i(...u)});return o}emit(n,...i){return this.emitter.emit(n,...i)}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((n,i)=>{let o=[()=>delete this._pendingSubscribe];o.push(this.on("connect",()=>{o.forEach(u=>u()),n()})),o.push(this.on("close",u=>{o.forEach(l=>l()),i(u||new Bn("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class Zf{constructor(n){this.id=n,this.intent="unsubscribed",this.state="idle",this.channels=[],this.disposed=!1,this._pendings=[]}add(n){this.channels.includes(n)||this.channels.push(n)}remove(n){let i=this.channels.indexOf(n);i>-1&&this.channels.splice(i,1)}notify(n,...i){this.state=n==="restored"?"connected":n,i.length===1?this.channels.forEach(o=>o[n](i[0])):this.channels.forEach(o=>o[n]())}pending(n){this._checkIntent(n);let i=this._pendings[0];return!i||i.intent!==n?Promise.resolve():i.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(n){this._checkIntent(n);let i,o={promise:new Promise(l=>{i=l}),intent:n,release:()=>{this._pendings.splice(this._pendings.indexOf(o),1),i(o)},canceled:!1,acquired:!1},u=this._pendingTop;return this._pendings.push(o),u&&await u.promise,this.gvl&&await this.gvl.acquire(o,n),o.acquired=!0,o}close(n){this.disposed=!0,this.intent=void 0,this.notify("closed",n)}_checkIntent(n){if(!(n==="unsubscribed"||n==="subscribed"))throw Error(`Unknown subscription intent: ${n}`)}get _pendingTop(){return this._pendings.length?this._pendings[this._pendings.length-1]:void 0}_mergeWithPending(n){let i=this._pendingTop;return!i||i.acquired||i.intent!==n?!1:(this._pendings.pop(),i.canceled=!0,!0)}}class Yf{constructor(){this.queue=[]}async acquire(n,i){i==="subscribed"&&(this.queue.push(n.promise.then(()=>{this.queue.splice(this.queue.indexOf(n),1)})),this.queue.length>1&&await this.queue[this.queue.length-2])}}class Xf{constructor(n){n.concurrentSubscribes===!1&&(this.glv=new Yf),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(n){return this._subscriptions[n]}create(n,{subscribe:i,unsubscribe:o}){let u=this._subscriptions[n]=new Zf(n);return u.remoteId=this._localToRemote[n],u.subscriber=i,u.unsubscriber=o,u.gvl=this.glv,u}remove(n){delete this._subscriptions[n],delete this._localToRemote[n]}storeRemoteId(n,i){this._localToRemote[n]=i;let o=this.get(n);o&&(o.remoteId=i)}}class Qf{constructor(n={}){this.subscriptions=new Xf(n),this._pendingMessages=[],this._remoteToLocal={}}subscribe(n,i){this._remoteToLocal[i]=n,this.subscriptions.storeRemoteId(n,i),this.flush(i)}unsubscribe(n){let i=this.subscriptions.get(n);if(!i)return;let o=i.remoteId;o&&delete this._remoteToLocal[o],this.subscriptions.remove(n)}transmit(n,i,o){let u=this._remoteToLocal[n];if(!u){this._pendingMessages.push([n,i,o]);return}let l=this.subscriptions.get(u);l&&l.channels.forEach(d=>{d.receive(i,o)})}notify(n,i,o){let u=this._remoteToLocal[n];if(!u)return;let l=this.subscriptions.get(u);l&&l.channels.forEach(d=>d.emit(i,o))}close(){this._pendingMessages.length=0}get size(){return this.channels.length}get channels(){return this.subscriptions.all().flatMap(n=>n.channels)}flush(n){let i=[];for(let o of this._pendingMessages)o[0]===n?this.transmit(o[0],o[1],o[2]):i.push(o);this._pendingMessages=i}}const _a={debug:0,info:1,warn:2,error:3};class ba{constructor(n){this.level=n||"warn"}log(n,i,o){_a[n]<_a[this.level]||this.writeLogEntry(n,i,o)}writeLogEntry(){throw Error("Not implemented")}debug(n,i){this.log("debug",n,i)}info(n,i){this.log("info",n,i)}warn(n,i){this.log("warn",n,i)}error(n,i){this.log("error",n,i)}}class Wn extends ba{writeLogEntry(){}}class eh{encode(n){return JSON.stringify(n)}decode(n){try{return JSON.parse(n)}catch{}}}let th=0;class va{constructor(n={}){let{logger:i}=n;this.logger=i||new Wn,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=n.subscribeCooldownInterval||250,this.subscribeRetryInterval=n.subscribeRetryInterval||5e3}attached(n){this.cable=n}subscribe(n,i){let o={channel:n};i&&Object.assign(o,i);let u=ga(o);if(this.pendingUnsubscriptions[u]){let d=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${d}`,u),new Promise(b=>{setTimeout(()=>{b(this.subscribe(n,i))},d)})}if(this.pendingSubscriptions[u])return this.logger.warn("subscription is already pending, skipping",u),Promise.reject(Error("Already subscribing"));let l=this.subscribeRetryInterval;return new Promise((d,b)=>{let v=++th;this.pendingSubscriptions[u]={resolve:d,reject:b,id:v},this.cable.send(this.buildSubscribeRequest(u)),this.maybeRetrySubscribe(v,u,l)})}buildSubscribeRequest(n){return{command:"subscribe",identifier:n}}maybeRetrySubscribe(n,i,o){setTimeout(()=>{let u=this.pendingSubscriptions[i];u&&u.id===n&&(this.logger.warn(`no subscription ack received in ${o}ms, retrying subscribe`,i),this.cable.send(this.buildSubscribeRequest(i)),this.maybeExpireSubscribe(n,i,o))},o)}maybeExpireSubscribe(n,i,o){setTimeout(()=>{let u=this.pendingSubscriptions[i];u&&u.id===n&&(delete this.pendingSubscriptions[i],u.reject(new Kf(`Haven't received subscription ack in ${o*2}ms for ${i}`)))},o)}unsubscribe(n){return this.cable.send({command:"unsubscribe",identifier:n}),this.pendingUnsubscriptions[n]=!0,setTimeout(()=>{delete this.pendingUnsubscriptions[n]},this.subscribeCooldownInterval),Promise.resolve()}perform(n,i,o){return i==="$whisper"?this.whisper(n,o):(o||(o={}),o.action=i,this.cable.send({command:"message",identifier:n,data:JSON.stringify(o)}),Promise.resolve())}whisper(n,i){return this.cable.send({command:"whisper",identifier:n,data:i}),Promise.resolve()}receive(n){if(typeof n!="object"){this.logger.error("unsupported message format",{message:n});return}let{type:i,identifier:o,message:u,reason:l,reconnect:d}=n;if(i==="ping")return this.cable.keepalive(n.message);if(this.cable.keepalive(),i==="welcome"){let b=n.sid;return b&&this.cable.setSessionId(b),this.cable.connected()}if(i==="disconnect"){let b=new ht(l);this.reset(b),d===!1?this.cable.closed(b):this.cable.disconnected(b);return}if(i==="confirm_subscription"){let b=this.pendingSubscriptions[o];if(!b){this.logger.error("subscription not found, unsubscribing",{type:i,identifier:o}),this.unsubscribe(o);return}return delete this.pendingSubscriptions[o],b.resolve(o)}if(i==="reject_subscription"){let b=this.pendingSubscriptions[o];return b?(delete this.pendingSubscriptions[o],b.reject(new Wi)):this.logger.error("subscription not found",{type:i,identifier:o})}if(u)return{identifier:o,message:u};this.logger.warn(`unknown message type: ${i}`,{message:n})}reset(n){for(let i in this.pendingSubscriptions)this.pendingSubscriptions[i].reject(n);this.pendingSubscriptions={}}recoverableClosure(){return!1}}const wa=()=>Date.now()/1e3|0;class nh extends va{constructor(n={}){super(n),this.streamsPositions={},this.subscriptionStreams={},this.pendingHistory={},this.pendingPresence={},this.presenceInfo={},this.restoreSince=n.historyTimestamp,this.disableSessionRecovery=n.disableSessionRecovery,this.restoreSince===void 0&&(this.restoreSince=wa()),this.sessionId=void 0,this.sendPongs=n.pongs}reset(n){for(let i in this.pendingPresence)this.pendingPresence[i].reject(n);return this.pendingPresence={},super.reset()}receive(n){if(typeof n!="object"){this.logger.error("unsupported message format",{message:n});return}let{type:i,identifier:o,message:u}=n;if(i==="disconnect")return delete this.sessionId,this.cable.setSessionId(""),super.receive(n);if(i==="reject_subscription")return super.receive(n);if(i==="confirm_subscription")return this.subscriptionStreams[o]||(this.subscriptionStreams[o]=new Set),super.receive(n);if(i==="ping")return this.restoreSince&&(this.restoreSince=wa()),this.sendPongs&&this.sendPong(),this.cable.keepalive(n.message);if(this.cable.keepalive(),i==="confirm_history"){this.logger.debug("history result received",n),this.cable.notify("history_received",o);return}if(i==="reject_history"){this.logger.warn("failed to retrieve history",n),this.cable.notify("history_not_found",o);return}if(i==="welcome"){if(this.disableSessionRecovery||(this.sessionId=n.sid,this.sessionId&&this.cable.setSessionId(this.sessionId)),n.restored){let l=n.restored_ids||Object.keys(this.subscriptionStreams);for(let d of l)this.cable.send({identifier:d,command:"history",history:this.historyRequestFor(d)}),this.presenceInfo[d]&&this.cable.send({identifier:d,command:"join",presence:this.presenceInfo[d]});return this.cable.restored(l)}return this.cable.connected(this.sessionId)}if(i==="presence"){let l=u.type;if(l==="info"){let d=this.pendingPresence[o];d&&(delete this.pendingPresence[o],d.resolve(u))}else if(l==="error"){let d=this.pendingPresence[o];d&&(delete this.pendingPresence[o],d.reject(new Error("failed to retrieve presence")))}return{type:i,identifier:o,message:u}}if(u){let l=this.trackStreamPosition(o,n.stream_id,n.epoch,n.offset);return{identifier:o,message:u,meta:l}}this.logger.warn(`unknown message type: ${i}`,{message:n})}perform(n,i,o){switch(i){case"$presence:join":return this.join(n,o);case"$presence:leave":return this.leave(n,o);case"$presence:info":return this.presence(n,o)}return super.perform(n,i,o)}unsubscribe(n){return delete this.presenceInfo[n],super.unsubscribe(n)}buildSubscribeRequest(n){let i=super.buildSubscribeRequest(n),o=this.historyRequestFor(n);o&&(i.history=o,this.pendingHistory[n]=!0);let u=this.presenceInfo[n];return u&&(i.presence=u),i}recoverableClosure(){return!!this.sessionId}historyRequestFor(n){let i={},o=!1;if(this.subscriptionStreams[n])for(let u of this.subscriptionStreams[n]){let l=this.streamsPositions[u];l&&(o=!0,i[u]=l)}if(!(!o&&!this.restoreSince))return{since:this.restoreSince,streams:i}}trackStreamPosition(n,i,o,u){if(!(!i||!o))return this.subscriptionStreams[n]||(this.subscriptionStreams[n]=new Set),this.subscriptionStreams[n].add(i),this.streamsPositions[i]={epoch:o,offset:u},{stream:i,epoch:o,offset:u}}async sendPong(){await new Promise(n=>setTimeout(n,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(n,i){return this.presenceInfo[n]=i,this.cable.send({command:"join",identifier:n,presence:i}),Promise.resolve()}async leave(n,i){return delete this.presenceInfo[n],this.cable.send({command:"leave",identifier:n,presence:i}),Promise.resolve()}presence(n,i){return this.pendingPresence[n]?(this.logger.warn("presence is already pending, skipping",n),Promise.reject(Error("presence request is already pending"))):new Promise((o,u)=>{this.pendingPresence[n]={resolve:o,reject:u},this.cable.send({command:"presence",identifier:n,data:i})})}}class rh extends Bn{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class $i extends ma{constructor(n,i){super(i),this.channelId=n}set channelId(n){this._channelId=n}get channelId(){return this._channelId}}pr($i,"identifier","__ghost__");const ih="$pubsub";class qi extends ma{async perform(n,i){if(n.startsWith("$"))return super.perform(n,i);throw Error("not implemented")}}pr(qi,"identifier",ih);const Xt=Symbol("state");let sh=class{constructor({transport:r,protocol:n,encoder:i,logger:o,lazy:u,hubOptions:l,performFailures:d,transportConfigurator:b}){this.emitter=Er(),this.transport=r,this.encoder=i,this.logger=o||new Wn,this.protocol=n,this.performFailures=d||"throw",this.protocol.attached(this),this.hub=new Qf(l||{}),this[Xt]="idle",this.handleClose=this.handleClose.bind(this),this.handleIncoming=this.handleIncoming.bind(this),this.transportConfigurator=b,this.transport.on("close",this.handleClose),this.transport.on("data",this.handleIncoming),this.initialConnect=!0,this.recovering=!1,u===!1&&this.connect().catch(()=>{})}get state(){return this[Xt]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let r=this.state==="idle";this[Xt]="connecting";let n=this.pendingConnect();this.logger.debug("connecting");try{this.transportConfigurator&&await this.transportConfigurator(this.transport,{initial:r}),await this.transport.open()}catch(i){this.handleClose(i)}return n}setSessionId(r){this.sessionId=r,this.transport.setParam("sid",r)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[Xt]="connected",this.recovering&&this.hub.subscriptions.all().forEach(n=>n.notify("disconnected",new ht("recovery_failed"))),this.hub.subscriptions.all().forEach(n=>this._resubscribe(n));let r=!1;this.recovering=!1,this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:r})):this.emit("connect",{reconnect:!0,restored:r})}restored(r){this.logger.info("connection recovered",{remoteIds:r}),this[Xt]="connected",this.hub.subscriptions.all().forEach(o=>{r&&o.remoteId&&r.includes(o.remoteId)?o.notify("restored"):(o.notify("disconnected",new ht("recovery_failed")),this._resubscribe(o))});let n=!this.initialConnect,i=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:n,restored:i})}notify(r,n,i){n&&typeof n!="string"&&(i=n,n=void 0),n?this.hub.notify(n,"info",{type:r,data:i}):this.emit("info",{type:r,data:i})}handleClose(r){this.logger.debug("transport closed",{error:r}),this.disconnected(new ht(r,"transport_closed"))}disconnected(r){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:r}),this[Xt]="disconnected",this.recovering=this.protocol.recoverableClosure(r),this.recovering?this.hub.subscriptions.all().forEach(n=>n.notify("connecting")):this.hub.subscriptions.all().forEach(n=>{n.notify("disconnected",r)}),this.protocol.reset(r),this.hub.close(),this.transport.close(),this.emit("disconnect",r))}closed(r){if(this.state==="closed"||this.state==="idle")return;let n;r&&(n=r instanceof ht?r:new ht(r,void 0)),this.logger.info("closed",{reason:r||"user"}),this[Xt]="closed";let i=n||new ht("cable_closed");this.hub.subscriptions.all().forEach(o=>o.notify("disconnected",i)),this.hub.close(),this.protocol.reset(),this.transport.close(),this.initialConnect=!0,this.emit("close",n)}disconnect(){this.closed()}handleIncoming(r){if(this.state==="closed"||this.state==="idle")return;let n=this.encoder.decode(r);if(n===void 0){this.logger.error("failed to decode message",{message:r});return}this.logger.debug("incoming data",n);let i=this.protocol.receive(n);if(i){this.logger.debug("processed incoming message",i);let{type:o,identifier:u,message:l,meta:d}=i;o?this.hub.notify(u,o,l):this.hub.transmit(u,l,d)}}send(r){if(this.state==="closed")throw Error("Cable is closed");let n=this.encoder.encode(r);if(n===void 0){this.logger.error("failed to encode message",{message:r});return}this.logger.debug("outgoing message",r),this.transport.send(n)}keepalive(r){this.emit("keepalive",r)}streamFrom(r){let n=new qi({stream_name:r});return this.subscribe(n)}streamFromSigned(r){let n=new qi({signed_stream_name:r});return this.subscribe(n)}subscribeTo(r,n){let i,o;return typeof r=="string"&&(o=r,r=$i),i=o?new r(o,n):new r(n),this.subscribe(i)}subscribe(r){if(!r.attached(this))return r;let n=r.identifier;r.connecting();let i=this.hub.subscriptions.get(n)||this.hub.subscriptions.create(n,{subscribe:o=>this._subscribe(o,r.channelId,r.params),unsubscribe:o=>this._unsubscribe(o)});return i.add(r),i.intent==="subscribed"&&i.state==="connected"&&r.connected(),i.ensureSubscribed(),r}async _resubscribe(r){r.intent!=="subscribed"||!r.channels[0]||(r.notify("connecting"),r.ensureResubscribed())}async _subscribe(r,n,i){let o=r.id;if(this.state==="idle"&&this.connect().catch(()=>{}),this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:o});return}this.logger.debug("acquiring subscribe lock",{identifier:o});let u=await r.acquire("subscribed");if(u.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:o}),u.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:o}),r.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),u.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:o}),u.release();return}if(r.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:o}),r.notify("connected"),u.release();return}let l={identifier:n,params:i};this.logger.debug("subscribing",l);try{let d=await this.protocol.subscribe(n,i);this.hub.subscribe(o,d),this.logger.debug("subscribed",{...l,remoteId:d}),r.notify("connected")}catch(d){if(d){if(d instanceof Wi&&this.logger.warn("rejected",l),d instanceof ht){this.logger.debug("disconnected during subscription; will retry on connect",l),u.release();return}this.logger.error("failed to subscribe",{error:d,...l})}r.close(d),this.hub.unsubscribe(o)}u.release()}unsubscribe(r){let n=r.identifier,i=this.hub.subscriptions.get(n);if(!i)throw Error(`Subscription not found: ${n}`);i.remove(r),r.closed(),i.maybeUnsubscribe()}async _unsubscribe(r){let n=r.id;this.logger.debug("acquiring unsubscribe lock",{identifier:n});let i=await r.acquire("unsubscribed");if(i.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:n}),i.release();return}if(this.logger.debug("unsubscribe lock has been acquired",{identifier:n}),r.intent!=="unsubscribed"){this.logger.debug("cancel unsubscribe, no longer needed",{identifier:n,intent:r.intent}),i.release();return}if(r.state==="disconnected"||r.state==="closed"){this.logger.debug(`already ${r.state} connected, skip unsubscribe command`,{identifier:n}),i.release();return}let o=r.remoteId;if(this.logger.debug("unsubscribing...",{remoteId:o}),this.state!=="connected"){this.logger.debug("unsubscribe skipped (cable is not connected)",{id:n}),r.close(),this.hub.unsubscribe(n),i.release();return}try{await this.protocol.unsubscribe(o),this.logger.debug("unsubscribed remotely",{id:n})}catch(u){u&&(u instanceof ht?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:n,error:u}):this.logger.error("unsubscribe failed",{id:n,error:u}))}r.intent==="unsubscribed"?(r.close(),this.hub.unsubscribe(n)):r.state="closed",i.release()}async perform(r,n,i){if(this.performFailures==="throw")return this._perform(r,n,i);try{return await this._perform(r,n,i)}catch(o){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:o});return}}async _perform(r,n,i){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new rh;let o=this.hub.subscriptions.get(r);if(!o)throw Error(`Subscription not found: ${r}`);if(await o.pending("subscribed"),o.intent!=="subscribed")throw Error(`Subscription is closed: ${r}`);let u=o.remoteId,l={id:u,action:n,payload:i};this.logger.debug("perform",l);try{let d=await this.protocol.perform(u,n,i);return d&&this.logger.debug("perform result",{message:d,request:l}),d}catch(d){throw this.logger.error("perform failed",{error:d,request:l}),d}}on(r,n){return this.emitter.on(r,n)}once(r,n){let i=this.emitter.on(r,(...o)=>{i(),n(...o)});return i}emit(r,...n){return this.emitter.emit(r,...n)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((r,n)=>{let i=[()=>delete this._pendingConnect];i.push(this.on("connect",()=>{i.forEach(o=>o()),r()})),i.push(this.on("close",o=>{i.forEach(u=>u()),n(o)})),i.push(this.on("disconnect",o=>{i.forEach(u=>u()),n(o)}))}),this._pendingConnect)}};const oh={maxMissingPings:2,maxReconnectAttempts:1/0},pn=()=>Date.now(),ya=(r,n)=>{n=n||{};let{backoffRate:i,jitterRatio:o,maxInterval:u}=n;return i=i||2,o===void 0&&(o=.5),l=>{let d=r*i**l,b=d*i,v=d+(b-d)*Math.random(),x=2*(Math.random()-.5)*o;return v=v*(1+x),u&&u<v&&(v=u),v}};let xa=class{constructor({pingInterval:r,...n}){if(this.pingInterval=r,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${r}`);if(n=Object.assign({},oh,n),this.strategy=n.reconnectStrategy,!this.strategy)throw Error("Reconnect strategy must be provided");this.maxMissingPings=n.maxMissingPings,this.maxReconnectAttempts=n.maxReconnectAttempts,this.logger=n.logger||new Wn,this.state="pending_connect",this.attempts=0,this.disconnectedAt=pn()}watch(r){this.target=r,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(r=>{this.logger.info("Failed at reconnecting: "+r)}),!0)}initListeners(){this.unbind=[],this.unbind.push(this.target.on("connect",()=>{this.attempts=0,this.pingedAt=pn(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=pn(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=pn(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=pn()})),this.unbind.push(()=>{this.cancelReconnect(),this.stopPolling()})}dispose(){delete this.target,this.unbind&&this.unbind.forEach(r=>r()),delete this.unbind}startPolling(){this.pollId&&clearTimeout(this.pollId);let r=this.pingInterval+(Math.random()-.5)*this.pingInterval*.5;this.pollId=setTimeout(()=>{this.checkStale(),this.state==="connected"&&this.startPolling()},r)}stopPolling(){this.pollId&&clearTimeout(this.pollId)}checkStale(){let r=pn()-this.pingedAt;r>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${r}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new Gf))}scheduleReconnect(){if(this.attempts>=this.maxReconnectAttempts){this.target.close();return}let r=this.strategy(this.attempts);this.attempts++,this.logger.info(`Reconnecting in ${r}ms (${this.attempts} attempt)`),this.state="pending_reconnect",this.reconnnectId=setTimeout(()=>this.reconnectNow(),r)}cancelReconnect(){this.reconnnectId&&(clearTimeout(this.reconnnectId),delete this.reconnnectId)}};class ah{constructor(n,i={}){this.transports=n,this.transport=null,this.emitter=Er(),this.unbind=[],this.logger=i.logger||new Wn}displayName(){return"fallbacked transport"}async open(){for(let n=0;n<this.transports.length;n++){let i=this.transports[n];try{this.transport=i,this.resetListeners(),this.logger.debug(`Trying to connect via ${i.displayName()}`),await i.open(),this.logger.debug(`Connected via ${i.displayName()}`);return}catch(o){this.logger.debug(`Failed to connect via ${i.displayName()}: ${o.message}`)}}throw this.transport=null,this.resetListeners(),new Error("Couldn't connect via any available transport")}send(n){if(!this.transport)throw new Error("No transport is open");this.transport.send(n)}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(n,i){this.transports.forEach(o=>{o.setParam(n,i)})}setToken(n,i){this.transports.forEach(o=>{o.setToken(n,i)})}on(n,i){return this.emitter.on(n,i)}once(n,i){let o=this.emitter.on(n,(...u)=>{o(),i(...u)});return o}get url(){return this.transport?this.transport.url:""}resetListeners(){this.unbind.forEach(n=>n()),this.unbind.length=0,this.transport&&this.unbind.push(this.transport.on("open",()=>{this.emitter.emit("open")}),this.transport.on("data",n=>{this.emitter.emit("data",n)}),this.transport.on("close",n=>{this.emitter.emit("close",n)}),this.transport.on("error",n=>{this.emitter.emit("error",n)}))}}class uh{constructor(n,i={}){this.url=n;let o=i.websocketImplementation;if(o)this.Impl=o;else if(typeof WebSocket<"u")this.Impl=WebSocket;else throw new Error("No WebSocket support");this.connected=!1,this.emitter=Er();let{format:u,subprotocol:l,authStrategy:d}=i;this.format=u||"text",this.connectionOptions=i.websocketOptions,this.authStrategy=d||"param",this.authProtocol="",this.subprotocol=l}displayName(){return"WebSocket("+this.url+")"}open(){let n=this.subprotocol;return this.authStrategy==="sub-protocol"&&(n=[this.subprotocol,this.authProtocol]),this.connectionOptions?this.ws=new this.Impl(this.url,n,this.connectionOptions):this.ws=new this.Impl(this.url,n),this.ws.binaryType="arraybuffer",this.initListeners(),new Promise((i,o)=>{let u=[];u.push(this.once("open",()=>{u.forEach(l=>l()),i()})),u.push(this.once("close",()=>{u.forEach(l=>l()),o(Error("WS connection closed"))}))})}setURL(n){this.url=n}setParam(n,i){let o=new URL(this.url);o.searchParams.set(n,i);let u=`${o.protocol}//${o.host}${o.pathname}?${o.searchParams}`;this.setURL(u)}setToken(n,i="jid"){if(this.authStrategy==="param")this.setParam(i,n);else if(this.authStrategy==="header"){this.connectionOptions=this.connectionOptions||{},this.connectionOptions.headers=this.connectionOptions.headers||{};let o=`x-${i}`.toLowerCase();o=Object.keys(this.connectionOptions.headers).find(u=>u.toLowerCase()===o)||o,this.connectionOptions.headers[o]=n}else if(this.authStrategy==="sub-protocol")this.authProtocol=`anycable-token.${n}`;else throw new Error("Unknown auth strategy: "+this.authStrategy)}send(n){if(!this.ws||!this.connected)throw Error("WebSocket is not connected");this.ws.send(n)}close(){this.ws?this.onclose():this.connected=!1}on(n,i){return this.emitter.on(n,i)}once(n,i){let o=this.emitter.on(n,(...u)=>{o(),i(...u)});return o}initListeners(){this.ws.onerror=n=>{this.connected&&this.emitter.emit("error",n.error||new Error("WS Error"))},this.ws.onclose=()=>{this.onclose()},this.ws.onmessage=n=>{let i=n.data;this.format==="binary"&&(i=new Uint8Array(i)),this.emitter.emit("data",i)},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 Sa={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function ch(r,n){if(typeof r=="object"&&typeof n>"u"&&(n=r,r=void 0),n=n||{},!r&&!n.transport)throw Error("URL or transport must be specified");n=Object.assign({},Sa,n);let{protocol:i,websocketImplementation:o,websocketFormat:u,websocketOptions:l,websocketAuthStrategy:d,fallbacks:b,logLevel:v,logger:x,transport:S,encoder:L,lazy:M,monitor:I,pingInterval:P,reconnectStrategy:k,maxMissingPings:H,maxReconnectAttempts:re,subprotocol:se,tokenRefresher:oe,historyTimestamp:ge,protocolOptions:D,concurrentSubscribes:me,performFailures:ee,transportConfigurator:Oe,auth:Pe}=n;if(x=x||new Wn(v),typeof i=="string"){se=se||i;let Fe=i.substring(0,i.lastIndexOf("-")),de=i.substring(i.lastIndexOf("-")+1);if(D=D||{},Fe==="actioncable-v1")i=new va({logger:x,...D});else if(Fe==="actioncable-v1-ext")i=new nh({logger:x,historyTimestamp:ge,...D});else throw Error(`Protocol is not supported yet: ${i}`);if(de==="json")L=L||new eh,u=u||"text";else if(de==="msgpack"){if(u="binary",!L)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(de==="protobuf"){if(u=u||"binary",!L)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: ${i}`)}if(!i)throw Error("Protocol must be specified");S=S||new uh(r,{websocketImplementation:o,websocketOptions:l,subprotocol:se,authStrategy:d,format:u}),b&&(S=new ah([S,...b],{logger:x})),Pe&&Pe.token&&S.setToken(Pe.token,Pe.param||"jid"),k=k||ya(P),I!==!1&&(I=I||new xa({pingInterval:P,reconnectStrategy:k,maxMissingPings:H,maxReconnectAttempts:re,logger:x}));let xt={concurrentSubscribes:me},Se=new sh({protocol:i,transport:S,encoder:L,logger:x,lazy:M,hubOptions:xt,performFailures:ee,transportConfigurator:Oe});return I&&(I.watch(Se),Se.monitor=I),oe&&lh(Se,async()=>{try{await oe(S)}catch(Fe){return x.error("Failed to refresh authentication token: "+Fe),!1}return Se.connect().catch(()=>{}),!0}),Se}function lh(r,n){let i=!1;r.on("connect",()=>i=!1),r.on("close",async o=>{if(o){if(i){r.logger.warn("Token auto-refresh is disabled",o);return}o.reason==="token_expired"&&(i=!0,await n())}})}class fh{constructor(n){this.channel=n}notify(n,...i){typeof this[n]=="function"&&this[n](...i)}perform(n,i={}){this.channel.perform(n,i)}send(n){this.channel.send(n)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}}class hh extends $i{constructor(n,i,o){super(n,i),this.subscription=new fh(this),Object.assign(this.subscription,o),this.on("connect",({reconnect:u})=>this.subscription.notify("connected",{reconnected:u})),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",u=>this.subscription.notify("received",u)),this.on("close",u=>{u&&u instanceof Wi?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class dh{constructor(n){this.cable=n}create(n,i){let o,u;typeof n=="object"?(o=n.channel,delete n.channel,u=n):(o=n,u={});let l=new hh(o,u,i);return l.subscription.notify("initialized"),this.cable.subscribe(l),l.subscription}findAll(n){return this.cable.hub.channels.filter(i=>i.identifier===n).map(i=>i.subscription)}}class ph{constructor(n){this.cable=n,this.subscriptions=new dh(n)}}class gh extends ba{writeLogEntry(n,i,o){o?console[n](i,o):console[n](i)}}class mh extends xa{watch(n){super.watch(n),this.initActivityListeners()}initActivityListeners(){if(typeof document<"u"&&typeof window<"u"&&document.addEventListener&&window.addEventListener){let n=()=>{document.hidden||this.reconnectNow()&&this.logger.debug("Trigger reconnect due to visibility change")},i=u=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:u})},o=()=>this.disconnect(new ht("page_frozen"));document.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",i,!1),window.addEventListener("online",i,!1),window.addEventListener("resume",i,!1),window.addEventListener("freeze",o,!1),this.unbind.push(()=>{document.removeEventListener("visibilitychange",n,!1),window.removeEventListener("focus",i,!1),window.removeEventListener("online",i,!1),window.removeEventListener("resume",i,!1),window.removeEventListener("freeze",o,!1)})}}disconnect(n){this.state==="disconnected"||this.state==="closed"||(this.logger.info("Disconnecting",{reason:n.message}),this.cancelReconnect(),this.stopPolling(),this.state="pending_disconnect",this.target.disconnected(n))}}const _h=["cable","action-cable"],bh="/cable",Ar=(r,n)=>{for(let i of _h){let o=r.head.querySelector(`meta[name='${i}-${n}']`);if(o)return o.getAttribute("content")}},Ca=r=>r.match(/wss?:\/\//)?r:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${r}`:r,vh=()=>{if(typeof document<"u"&&document.head){let r=Ar(document,"url");if(r)return Ca(r)}return Ca(bh)},wh=()=>{if(typeof document<"u"&&document.head){let r=Ar(document,"history-timestamp");if(r)return r|0}},yh=()=>{if(typeof document<"u"&&document.head)return Ar(document,"token")},xh=()=>{if(typeof document<"u"&&document.head)return Ar(document,"token-param")};function Sh(r,n){typeof r=="object"&&typeof n>"u"&&(n=r,r=void 0),r=r||vh(),n=n||{},n.historyTimestamp||(n.historyTimestamp=wh());let i=yh();if(i){let x=xh();n.auth=Object.assign({token:i,param:x},n.auth||{})}n=Object.assign({},Sa,n);let{logLevel:o,logger:u,pingInterval:l,reconnectStrategy:d,maxMissingPings:b,maxReconnectAttempts:v}=n;return u=n.logger=n.logger||new gh(o),d=n.reconnectStrategy=n.reconnectStrategy||ya(l),n.monitor!==!1&&(n.monitor=n.monitor||new mh({pingInterval:l,reconnectStrategy:d,maxMissingPings:b,maxReconnectAttempts:v,logger:u})),ch(r,n)}function Ch(r,n){let i=Sh(r,n);return new ph(i)}class Th{constructor(n="/openc3-api/cable"){this._cable=null,this._url=n}disconnect(){this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(n,i,o={},u={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(l=>{if(l&&OpenC3Auth.setTokens(),this._cable==null){let d=this._url+"?scope="+encodeURIComponent(i)+"&authorization="+encodeURIComponent(localStorage.openc3Token);d=new URL(d,document.baseURI).href,this._cable=Ch(d)}return this._cable.subscriptions.create({channel:n,...u},o)})}recordPing(){}}function $n(r){return Eh.test(r)}const Eh=/^-?[0-9]+$/;function Ta(r){return Ah.test(r)}const Ah=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function Ea(r,n){if($n(r))return Number.isSafeInteger(Number.parseInt(r,10));const i=Number.parseFloat(r),o=String(i);if(r===o)return!0;const u=Aa(r),l=Aa(o);return!!(u===l||(n==null?void 0:n.approx)===!0&&!$n(r)&&l.length>=14&&u.startsWith(l.substring(0,14)))}let qn=(function(r){return r.underflow="underflow",r.overflow="overflow",r.truncate_integer="truncate_integer",r.truncate_float="truncate_float",r})({});function Oh(r){if(Ea(r,{approx:!1}))return;if($n(r))return qn.truncate_integer;const n=Number.parseFloat(r);return Number.isFinite(n)?n===0?qn.underflow:qn.truncate_float:qn.overflow}function Aa(r){const{start:n,end:i}=Rh(r),o=r.substring(n,i),u=o.indexOf(".");return u===-1?o:o.substring(0,u)+o.substring(u+1)}function Rh(r){let n=0;for(r[0]==="-"&&n++;r[n]==="0"||r[n]===".";)n++;let i=r.lastIndexOf("e");for(i===-1&&(i=r.lastIndexOf("E")),i===-1&&(i=r.length);(r[i-1]==="0"||r[i-1]===".")&&i>n;)i--;return{start:n,end:i}}class Ih{constructor(n){if(pr(this,"isLosslessNumber",!0),!Ta(n))throw new Error(`Invalid number (value: "${n}")`);this.value=n}valueOf(){const n=Oh(this.value);if(n===void 0||n===qn.truncate_float)return Number.parseFloat(this.value);if($n(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${n} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}}function Ph(r){return r&&typeof r=="object"&&r.isLosslessNumber||!1}function kh(r){return new Ih(r)}function Lh(r,n){return Vi({"":r},"",r,n)}function Vi(r,n,i,o){return Array.isArray(i)?o.call(r,n,Dh(i,o)):i&&typeof i=="object"&&!Ph(i)?o.call(r,n,Nh(i,o)):o.call(r,n,i)}function Nh(r,n){for(const i of Object.keys(r)){const o=Vi(r,i,r[i],n);o!==void 0?r[i]=o:delete r[i]}return r}function Dh(r,n){for(let i=0;i<r.length;i++)r[i]=Vi(r,String(i),r[i],n);return r}function Uh(r,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:kh,o=0;const u=b();return P(u),H(),n?Lh(u,n):u;function l(){if(r.charCodeAt(o)===qh){o++,x();const j={};let ae=!0;for(;o<r.length&&r.charCodeAt(o)!==Ra;){ae?ae=!1:(M(),x());const ze=o,be=S();if(be===void 0){oe();return}x(),I();const Le=b();if(Le===void 0){Pe();return}Object.prototype.hasOwnProperty.call(j,be)&&!ji(Le,j[be])&&ge(be,ze+1),j[be]=Le}return r.charCodeAt(o)!==Ra&&D(),o++,j}}function d(){if(r.charCodeAt(o)===Vh){o++,x();const j=[];let ae=!0;for(;o<r.length&&r.charCodeAt(o)!==Ia;){ae?ae=!1:M();const ze=b();k(ze),j.push(ze)}return r.charCodeAt(o)!==Ia&&me(),o++,j}}function b(){x();const j=S()??L()??l()??d()??v("true",!0)??v("false",!1)??v("null",null);return x(),j}function v(j,ae){if(r.slice(o,o+j.length)===j)return o+=j.length,ae}function x(){for(;Fh(r.charCodeAt(o));)o++}function S(){if(r.charCodeAt(o)===zi){o++;let j="";for(;o<r.length&&r.charCodeAt(o)!==zi;){if(r.charCodeAt(o)===$h){const ae=r[o+1],ze=Wh[ae];ze!==void 0?(j+=ze,o++):ae==="u"?Or(r.charCodeAt(o+2))&&Or(r.charCodeAt(o+3))&&Or(r.charCodeAt(o+4))&&Or(r.charCodeAt(o+5))?(j+=String.fromCharCode(Number.parseInt(r.slice(o+2,o+6),16)),o+=5):xt(o):Oe(o)}else Bh(r.charCodeAt(o))?j+=r[o]:ee(r[o]);o++}return se(),o++,j}}function L(){const j=o;if(r.charCodeAt(o)===Pa&&(o++,re(j)),r.charCodeAt(o)===Hi)o++;else if(Mh(r.charCodeAt(o)))for(o++;Rr(r.charCodeAt(o));)o++;if(r.charCodeAt(o)===Yh)for(o++,re(j);Rr(r.charCodeAt(o));)o++;if(r.charCodeAt(o)===nd||r.charCodeAt(o)===td)for(o++,(r.charCodeAt(o)===Pa||r.charCodeAt(o)===Gh)&&o++,re(j);Rr(r.charCodeAt(o));)o++;if(o>j)return i(r.slice(j,o))}function M(){if(r.charCodeAt(o)!==Zh)throw new SyntaxError(`Comma ',' expected after value ${de()}`);o++}function I(){if(r.charCodeAt(o)!==Xh)throw new SyntaxError(`Colon ':' expected after property name ${de()}`);o++}function P(j){if(j===void 0)throw new SyntaxError(`JSON value expected ${de()}`)}function k(j){if(j===void 0)throw new SyntaxError(`Array item expected ${de()}`)}function H(){if(o<r.length)throw new SyntaxError(`Expected end of input ${de()}`)}function re(j){if(!Rr(r.charCodeAt(o))){const ae=r.slice(j,o);throw new SyntaxError(`Invalid number '${ae}', expecting a digit ${de()}`)}}function se(){if(r.charCodeAt(o)!==zi)throw new SyntaxError(`End of string '"' expected ${de()}`)}function oe(){throw new SyntaxError(`Quoted object key expected ${de()}`)}function ge(j,ae){throw new SyntaxError(`Duplicate key '${j}' encountered at position ${ae}`)}function D(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${de()}`)}function me(){throw new SyntaxError(`Array item or end of array ']' expected ${de()}`)}function ee(j){throw new SyntaxError(`Invalid character '${j}' ${Se()}`)}function Oe(j){const ae=r.slice(j,j+2);throw new SyntaxError(`Invalid escape character '${ae}' ${Se()}`)}function Pe(){throw new SyntaxError(`Object value expected after ':' ${Se()}`)}function xt(j){const ae=r.slice(j,j+6);throw new SyntaxError(`Invalid unicode character '${ae}' ${Se()}`)}function Se(){return`at position ${o}`}function Fe(){return o<r.length?`but got '${r[o]}'`:"but reached end of input"}function de(){return`${Fe()} ${Se()}`}}function Fh(r){return r===jh||r===zh||r===Hh||r===Kh}function Or(r){return r>=Hi&&r<=Ki||r>=Qh&&r<=rd||r>=ed&&r<=id}function Rr(r){return r>=Hi&&r<=Ki}function Mh(r){return r>=Jh&&r<=Ki}function Bh(r){return r>=32&&r<=1114111}function ji(r,n){return r===n?!0:Array.isArray(r)&&Array.isArray(n)?r.length===n.length&&r.every((i,o)=>ji(i,n[o])):Oa(r)&&Oa(n)?[...new Set([...Object.keys(r),...Object.keys(n)])].every(i=>ji(r[i],n[i])):!1}function Oa(r){return typeof r=="object"&&r!==null}const Wh={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
8
|
+
`,r:"\r",t:" "},$h=92,qh=123,Ra=125,Vh=91,Ia=93,jh=32,zh=10,Hh=9,Kh=13,zi=34,Gh=43,Pa=45,Hi=48,Jh=49,Ki=57,Zh=44,Yh=46,Xh=58,Qh=65,ed=97,td=69,nd=101,rd=70,id=102;function ka(r,n,i,o){return u(r);function u(v,x){if(Array.isArray(o)){const S=o.find(L=>L.test(v));if(S){const L=S.stringify(v);if(typeof L!="string"||!Ta(L))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${L})`);return L}}if(typeof v=="boolean"||typeof v=="number"||typeof v=="string"||v===null||v instanceof Date||v instanceof Boolean||v instanceof Number||v instanceof String)return JSON.stringify(v);if(v!=null&&v.isLosslessNumber||typeof v=="bigint")return v.toString();if(Array.isArray(v))return l(v);if(v&&typeof v=="object")return d(v)}function l(v,x){if(v.length===0)return"[]";let S="[";for(let L=0;L<v.length;L++){const M=v[L];typeof M<"u"&&typeof M!="function"?S+=u(M):S+="null",L<v.length-1&&(S+=",")}return S+="]",S}function d(v,x){if(typeof v.toJSON=="function")return ka(v.toJSON(),n,i,void 0);const S=Array.isArray(n)?n.map(String):Object.keys(v);if(S.length===0)return"{}";let L=!0,M="{";for(const I of S){const P=v[I];if(b(I,P)){L?L=!1:M+=",";const k=JSON.stringify(I);M+=`${k}:`,M+=u(P)}}return M+="}",M}function b(v,x){return typeof x<"u"&&typeof x!="function"&&typeof x!="symbol"}}function sd(r){return $n(r)&&!Ea(r)?BigInt(r):parseFloat(r)}class od{constructor(){pr(this,"id",1)}async exec(n,i,o={},u={},l=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return o.scope=window.openc3Scope,u.manual=!0,(await Mi.post("/openc3-api/api",{jsonrpc:"2.0",method:n,params:i,id:this.id,keyword_params:o},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...u},timeout:l,transformRequest:[(d,b)=>ka(d)],transformResponse:[d=>Uh(d,void 0,sd)]})).data.result}catch(d){let b=new Error;throw d.response?(b.name=d.response.data.error.data.class,b.message=d.response.data.error.data.message,b.object=d.response.data.error):d.request?(b.name="Request error",b.message="Request error, no response received"):b=d,b}}decode_openc3_type(n){if(n!==null&&typeof n=="object"&&n.json_class=="Float"&&n.raw){if(n.raw=="NaN")return NaN;if(n.raw=="Infinity")return 1/0;if(n.raw=="-Infinity")return-1/0}return null}encode_openc3_type(n){return Number.isNaN(n)?{json_class:"Float",raw:"NaN"}:n==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:n==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(n=>{n&&(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(n){return this.exec("set_offline_access",[n])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(n,i){return this.exec("map_target_to_interface",[n,i])}connect_interface(n,...i){return i.length>0?this.exec("connect_interface",[n,...i]):this.exec("connect_interface",[n])}disconnect_interface(n){return this.exec("disconnect_interface",[n])}interface_cmd(n,i,...o){return this.exec("interface_cmd",[n,i,...o])}get_all_router_info(){return this.exec("get_all_router_info",[])}connect_router(n){return this.exec("connect_router",[n])}disconnect_router(n){return this.exec("disconnect_router",[n])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(n){return this.exec("get_tlm_cnts",[n])}get_item(n,i,o){return this.exec("get_item",[n,i,o])}get_param(n,i,o){return this.exec("get_param",[n,i,o])}get_parameter(n,i,o){return this.exec("get_param",[n,i,o])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(n){return this.exec("set_limits_set",[n])}get_target(n){return this.exec("get_target",[n])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(n,i){return this.exec("get_tlm",[n,i])}get_telemetry(n,i){return this.exec("get_tlm",[n,i])}get_all_tlm(n){return this.exec("get_all_tlm",[n])}get_all_telemetry(n){return this.exec("get_all_tlm",[n])}get_all_tlm_names(n,i=!1){return this.exec("get_all_tlm_names",[n],{hidden:i})}get_all_telemetry_names(n){return this.exec("get_all_tlm_names",[n])}get_all_tlm_item_names(n){return this.exec("get_all_tlm_item_names",[n])}async get_tlm_packet(n,i,o,u=30){const l=await this.exec("get_tlm_packet",[n,i],{type:o,stale_time:u});if(l!=null){let d=l.length,b=null;for(let v=0;v<d;v++)b=this.decode_openc3_type(l[v][1]),b!==null&&(l[v][1]=b)}return l}get_packet_derived_items(n,i){return this.exec("get_packet_derived_items",[n,i])}get_tlm_buffer(n,i){return this.exec("get_tlm_buffer",[n,i])}get_tlm_available(n){return this.exec("get_tlm_available",[n])}async get_tlm_values(n,i=30,o=null,u=null,l=null){let d={stale_time:i};o!==null&&(d.cache_timeout=o),u!==null&&(d.start_time=u.toISOString()),l!==null&&(d.end_time=l.toISOString());const b=await this.exec("get_tlm_values",[n],d,{},1e4);if(b&&b.length>0){let v=b[0].length,x=null;for(let S=0;S<v;S++)x=this.decode_openc3_type(b[0][S]),x!==null&&(b[0][S]=x)}return b}get_limits(n,i,o){return this.exec("get_limits",[n,i,o])}async tlm(n,i,o,u="CONVERTED"){let l=null;if(i===void 0)l=await this.exec("tlm",[n]);else if(o===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(i))l=await this.exec("tlm",[n],{type:i});else{let b=new Error;throw b.name="TypeError",b.message=`Invalid data type ${i}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,b}else l=await this.exec("tlm",[n,i,o],{type:u});let d=this.decode_openc3_type(l);return d!==null&&(l=d),l}async inject_tlm(n,i,o=null,u="CONVERTED"){await this.exec("inject_tlm",[n,i,o],{type:u})}set_tlm(n,i,o,u){return this.exec("set_tlm",[n,i,o],{type:u})}override_tlm(n,i,o,u){return this.exec("override_tlm",[n,i,o],{type:u})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(n,i,o,u){return this.exec("normalize_tlm",[n,i,o],{type:u})}get_all_cmds(n){return this.exec("get_all_cmds",[n])}get_all_commands(n){return this.exec("get_all_cmds",[n])}get_all_cmd_names(n,i=!1){return this.exec("get_all_cmd_names",[n],{hidden:i})}get_all_command_names(n){return this.exec("get_all_cmd_names",[n])}get_cmd(n,i){return this.exec("get_cmd",[n,i])}get_command(n,i){return this.exec("get_cmd",[n,i])}get_cmd_cnts(n){return this.exec("get_cmd_cnts",[n])}get_cmd_value(n,i,o,u="CONVERTED"){return this.exec("get_cmd_value",[n,i,o,u])}get_cmd_buffer(n,i){return this.exec("get_cmd_buffer",[n,i])}_cmd(n,i,o,u,l,d={}){let b=null;for(let v in u)Object.prototype.hasOwnProperty.call(u,v)&&(b=this.encode_openc3_type(u[v]),b!==null&&(u[v]=b));return this.exec(n,[i,o,u],d,l)}get_cmd_hazardous(n,i,o,u={}){return i===void 0?this.exec("get_cmd_hazardous",n,{},u):this._cmd("get_cmd_hazardous",n,i,o,u)}cmd(n,i,o,u={},l={}){return i===void 0?this.exec("cmd",n,{},u):this._cmd("cmd",n,i,o,u,l)}cmd_no_range_check(n,i,o,u={},l={}){return i===void 0?this.exec("cmd_no_range_check",n,{},u,l):this._cmd("cmd_no_range_check",n,i,o,u,l)}cmd_raw(n,i,o,u={},l={}){return i===void 0?this.exec("cmd_raw",n,{},u,l):this._cmd("cmd_raw",n,i,o,u,l)}cmd_raw_no_range_check(n,i,o,u={},l={}){return i===void 0?this.exec("cmd_raw_no_range_check",n,{},u,l):this._cmd("cmd_raw_no_range_check",n,i,o,u,l)}cmd_no_hazardous_check(n,i,o,u={},l={}){return i===void 0?this.exec("cmd_no_hazardous_check",n,{},u,l):this._cmd("cmd_no_hazardous_check",n,i,o,u,l)}cmd_no_checks(n,i,o,u={},l={}){return i===void 0?this.exec("cmd_no_checks",n,{},u,l):this._cmd("cmd_no_checks",n,i,o,u,l)}cmd_raw_no_hazardous_check(n,i,o,u={},l={}){return i===void 0?this.exec("cmd_raw_no_hazardous_check",n,{},u,l):this._cmd("cmd_raw_no_hazardous_check",n,i,o,u,l)}cmd_raw_no_checks(n,i,o,u={},l={}){return i===void 0?this.exec("cmd_raw_no_checks",n,{},u,l):this._cmd("cmd_raw_no_checks",n,i,o,u,l)}build_cmd(n,i,o,u={},l={}){return i===void 0?this.exec("build_cmd",n):this._cmd("build_cmd",n,i,o,u,l)}build_command(n,i,o,u={},l={}){return i===void 0?this.exec("build_cmd",n):this._cmd("build_cmd",n,i,o,u,l)}get_interface_names(){return this.exec("get_interface_names",[])}send_raw(n,i){return this.exec("send_raw",[n,i])}list_configs(n){return this.exec("list_configs",[n])}load_config(n,i){return this.exec("load_config",[n,i])}save_config(n,i,o){return this.exec("save_config",[n,i,o])}delete_config(n,i){return this.exec("delete_config",[n,i])}enable_limits(n,i,o){return this.exec("enable_limits",[n,i,o])}disable_limits(n,i,o){return this.exec("disable_limits",[n,i,o])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(n){return this.exec("get_overall_limits_state",[n])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(n,i){return this.exec("get_setting",[n],i)}get_settings(n,i){return this.exec("get_settings",n,i)}set_setting(n,i){return this.exec("set_setting",[n,i])}update_news(){return this.exec("update_news",[])}update_plugin_store(){return this.exec("update_plugin_store",[])}save_setting(n,i){return this.exec("set_setting",[n,i])}get_metrics(){return this.exec("get_metrics",[])}async hashString(n){if(window.isSecureContext){const i=new TextEncoder().encode(n),o=await crypto.subtle.digest("SHA-256",i),u=new Uint8Array(o);return Array.from(u).map(l=>l.toString(16).padStart(2,"0")).join("")}}}const ad={components:{TargetPacketItemChooser:Eo},props:{modelValue:Boolean,components:{type:Array,default:null}},emits:["add","cancel","update:modelValue"],data(){return{selectedComponent:this.components[0],newPacket:null,newPacketCmdOrTlm:"tlm",newPacketMode:"RAW",valueTypes:["CONVERTED","RAW","FORMATTED","WITH_UNITS"],newPacketValueType:"WITH_UNITS",chooseItem:!1,disableRadioOptions:!1,headers:[{title:"Cmd/Tlm",value:"cmdOrTlm"},{title:"Target",value:"targetName"},{title:"Packet",value:"packetName"},{title:"Item",value:"itemName"},{title:"Mode",value:"mode"},{title:"ValueType",value:"valueType"},{title:"Delete",value:"delete"}],itemsPerPage:20,packets:[]}},computed:{valid:function(){return!(this.selectedComponent===null||this.packets.length===0)},show:{get(){return this.modelValue},set(r){this.$emit("update:modelValue",r)}},arrayComponent:function(){return this.selectedComponent.array}},watch:{newPacketCmdOrTlm:{immediate:!0,handler:function(){this.newPacket=null}},selectedComponent:{handler:function(){this.selectedComponent.items?(this.chooseItem=!0,this.newPacketMode="DECOM",this.disableRadioOptions=!0):(this.chooseItem=!1,this.newPacketMode="RAW",this.disableRadioOptions=!1)}}},methods:{addValue:function(r){let n=this.newPacketValueType;this.newPacketMode==="RAW"&&(n="N/A"),this.packets.push({cmdOrTlm:this.newPacketCmdOrTlm.toUpperCase(),targetName:r.targetName,packetName:r.packetName,itemName:r.itemName,mode:this.newPacketMode,valueType:n})},addComponent:function(r){this.$emit("add",{packets:this.packets,component:this.selectedComponent,mode:this.newPacketMode,valueType:this.newPacketValueType})},deleteItem:function(r){let n=this.packets.indexOf(r);this.packets.splice(n,1)},cancelAddComponent:function(){this.$emit("cancel",{})}}};function ud(r,n,i,o,u,l){const d=F("v-spacer"),b=F("v-toolbar"),v=F("v-col"),x=F("v-select"),S=F("v-row"),L=F("v-radio"),M=F("v-radio-group"),I=F("target-packet-item-chooser"),P=F("v-btn"),k=F("v-data-table"),H=F("v-container"),re=F("v-card-text"),se=F("v-card-actions"),oe=F("v-card"),ge=F("v-dialog");return J(),lt("div",null,[O(ge,{modelValue:l.show,"onUpdate:modelValue":n[5]||(n[5]=D=>l.show=D),width:"1200"},{default:R(()=>[O(oe,null,{default:R(()=>[O(b,{height:"24"},{default:R(()=>[O(d),n[6]||(n[6]=ln("span",null," Configure Component ",-1)),O(d)]),_:1}),O(re,null,{default:R(()=>[O(H,null,{default:R(()=>[O(S,{align:"center"},{default:R(()=>[O(v,null,{default:R(()=>[...n[7]||(n[7]=[we("Select Component:",-1)])]),_:1}),O(v,null,{default:R(()=>[O(x,{modelValue:u.selectedComponent,"onUpdate:modelValue":n[0]||(n[0]=D=>u.selectedComponent=D),"hide-details":"",density:"compact",variant:"outlined",items:i.components,"item-title":"label","item-value":"value","return-object":"","data-test":"select-component"},null,8,["modelValue","items"])]),_:1})]),_:1}),O(S,null,{default:R(()=>[O(v,null,{default:R(()=>[...n[8]||(n[8]=[we("Add packets for this component to process.",-1)])]),_:1})]),_:1}),O(S,null,{default:R(()=>[O(v,{class:"my-2"},{default:R(()=>[O(M,{modelValue:u.newPacketCmdOrTlm,"onUpdate:modelValue":n[1]||(n[1]=D=>u.newPacketCmdOrTlm=D),inline:"","hide-details":"",class:"mt-0"},{default:R(()=>[O(L,{label:"Command",value:"cmd","data-test":"command-packet-radio"}),O(L,{label:"Telemetry",value:"tlm","data-test":"telemetry-packet-radio"})]),_:1},8,["modelValue"])]),_:1})]),_:1}),O(S,null,{default:R(()=>[O(v,null,{default:R(()=>[O(I,{"button-text":u.chooseItem?"Add Item":"Add Packet",mode:u.newPacketCmdOrTlm,"choose-item":u.chooseItem,"allow-all-array-index":l.arrayComponent,onAddItem:l.addValue},null,8,["button-text","mode","choose-item","allow-all-array-index","onAddItem"])]),_:1})]),_:1}),O(S,null,{default:R(()=>[O(v,null,{default:R(()=>[O(M,{modelValue:u.newPacketMode,"onUpdate:modelValue":n[2]||(n[2]=D=>u.newPacketMode=D),inline:"","hide-details":""},{default:R(()=>[O(L,{label:"Raw",value:"RAW",disabled:u.disableRadioOptions,"data-test":"new-packet-raw-radio"},null,8,["disabled"]),O(L,{label:"Decom",value:"DECOM",disabled:u.disableRadioOptions,"data-test":"new-packet-decom-radio"},null,8,["disabled"])]),_:1},8,["modelValue"])]),_:1}),O(v,null,{default:R(()=>[u.newPacketMode==="DECOM"?(J(),ue(x,{key:0,modelValue:u.newPacketValueType,"onUpdate:modelValue":n[3]||(n[3]=D=>u.newPacketValueType=D),"hide-details":"",label:"Value Type","data-test":"add-packet-value-type",items:u.valueTypes},null,8,["modelValue","items"])):wt("",!0)]),_:1})]),_:1}),O(S,null,{default:R(()=>[O(v,null,{default:R(()=>[O(k,{"items-per-page":u.itemsPerPage,"onUpdate:itemsPerPage":n[4]||(n[4]=D=>u.itemsPerPage=D),headers:u.headers,items:u.packets,"items-per-page-options":[10,100],"multi-sort":"",density:"compact"},{"item.delete":R(({item:D})=>[O(P,{icon:"mdi-delete",variant:"text","aria-label":"Delete Item",onClick:me=>l.deleteItem(D)},null,8,["onClick"])]),_:1},8,["items-per-page","headers","items"])]),_:1})]),_:1})]),_:1})]),_:1}),O(se,{class:"px-2"},{default:R(()=>[O(d),O(P,{variant:"outlined","data-test":"cancel-component",onClick:l.cancelAddComponent},{default:R(()=>[...n[9]||(n[9]=[we(" Cancel ",-1)])]),_:1},8,["onClick"]),O(P,{variant:"flat","data-test":"add-component",disabled:!l.valid,onClick:l.addComponent},{default:R(()=>[...n[10]||(n[10]=[we(" Create ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])])}const cd=Ht(ad,[["render",ud]]),ld={mixins:[kn],props:{name:{type:String,default:null}},data(){return{widgetType:null}},computed:{url:function(){return`${window.location.origin}/tools/widgets/${this.name}/${this.name}.umd.min.js`}},watch:{latestData:function(r){typeof this.$refs.dynamic.receive=="function"&&this.$refs.dynamic.receive(r)}},async mounted(){try{this.widgetType=await System.import(this.url)}catch{throw new Error(`Unknown widget: ${this.name}`)}}};function fd(r,n,i,o,u,l){return J(),ue(Ei(u.widgetType),Ln({ref:"dynamic",config:r.currentConfig},{...r.$props,...r.$attrs},{onConfig:n[0]||(n[0]=d=>r.currentConfig=d)}),null,16,["config"])}const hd=Ht(ld,[["render",fd]]);var Ir=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function dd(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Vn={exports:{}};/**
|
9
|
+
* @license
|
10
|
+
* Lodash <https://lodash.com/>
|
11
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
12
|
+
* Released under MIT license <https://lodash.com/license>
|
13
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
14
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
15
|
+
*/var pd=Vn.exports,La;function gd(){return La||(La=1,(function(r,n){(function(){var i,o="4.17.21",u=200,l="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",d="Expected a function",b="Invalid `variable` option passed into `_.template`",v="__lodash_hash_undefined__",x=500,S="__lodash_placeholder__",L=1,M=2,I=4,P=1,k=2,H=1,re=2,se=4,oe=8,ge=16,D=32,me=64,ee=128,Oe=256,Pe=512,xt=30,Se="...",Fe=800,de=16,j=1,ae=2,ze=3,be=1/0,Le=9007199254740991,jn=17976931348623157e292,W=NaN,ye=4294967295,Qt=ye-1,gn=ye>>>1,Pr=[["ary",ee],["bind",H],["bindKey",re],["curry",oe],["curryRight",ge],["flip",Pe],["partial",D],["partialRight",me],["rearg",Oe]],mn="[object Arguments]",kr="[object Array]",Id="[object AsyncFunction]",zn="[object Boolean]",Hn="[object Date]",Pd="[object DOMException]",Lr="[object Error]",Nr="[object Function]",Na="[object GeneratorFunction]",dt="[object Map]",Kn="[object Number]",kd="[object Null]",At="[object Object]",Da="[object Promise]",Ld="[object Proxy]",Gn="[object RegExp]",pt="[object Set]",Jn="[object String]",Dr="[object Symbol]",Nd="[object Undefined]",Zn="[object WeakMap]",Dd="[object WeakSet]",Yn="[object ArrayBuffer]",_n="[object DataView]",Gi="[object Float32Array]",Ji="[object Float64Array]",Zi="[object Int8Array]",Yi="[object Int16Array]",Xi="[object Int32Array]",Qi="[object Uint8Array]",es="[object Uint8ClampedArray]",ts="[object Uint16Array]",ns="[object Uint32Array]",Ud=/\b__p \+= '';/g,Fd=/\b(__p \+=) '' \+/g,Md=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ua=/&(?:amp|lt|gt|quot|#39);/g,Fa=/[&<>"']/g,Bd=RegExp(Ua.source),Wd=RegExp(Fa.source),$d=/<%-([\s\S]+?)%>/g,qd=/<%([\s\S]+?)%>/g,Ma=/<%=([\s\S]+?)%>/g,Vd=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,jd=/^\w*$/,zd=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,rs=/[\\^$.*+?()[\]{}|]/g,Hd=RegExp(rs.source),is=/^\s+/,Kd=/\s/,Gd=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Jd=/\{\n\/\* \[wrapped with (.+)\] \*/,Zd=/,? & /,Yd=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Xd=/[()=,{}\[\]\/\s]/,Qd=/\\(\\)?/g,ep=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ba=/\w*$/,tp=/^[-+]0x[0-9a-f]+$/i,np=/^0b[01]+$/i,rp=/^\[object .+?Constructor\]$/,ip=/^0o[0-7]+$/i,sp=/^(?:0|[1-9]\d*)$/,op=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ur=/($^)/,ap=/['\n\r\u2028\u2029\\]/g,Fr="\\ud800-\\udfff",up="\\u0300-\\u036f",cp="\\ufe20-\\ufe2f",lp="\\u20d0-\\u20ff",Wa=up+cp+lp,$a="\\u2700-\\u27bf",qa="a-z\\xdf-\\xf6\\xf8-\\xff",fp="\\xac\\xb1\\xd7\\xf7",hp="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",dp="\\u2000-\\u206f",pp=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Va="A-Z\\xc0-\\xd6\\xd8-\\xde",ja="\\ufe0e\\ufe0f",za=fp+hp+dp+pp,ss="['’]",gp="["+Fr+"]",Ha="["+za+"]",Mr="["+Wa+"]",Ka="\\d+",mp="["+$a+"]",Ga="["+qa+"]",Ja="[^"+Fr+za+Ka+$a+qa+Va+"]",os="\\ud83c[\\udffb-\\udfff]",_p="(?:"+Mr+"|"+os+")",Za="[^"+Fr+"]",as="(?:\\ud83c[\\udde6-\\uddff]){2}",us="[\\ud800-\\udbff][\\udc00-\\udfff]",bn="["+Va+"]",Ya="\\u200d",Xa="(?:"+Ga+"|"+Ja+")",bp="(?:"+bn+"|"+Ja+")",Qa="(?:"+ss+"(?:d|ll|m|re|s|t|ve))?",eu="(?:"+ss+"(?:D|LL|M|RE|S|T|VE))?",tu=_p+"?",nu="["+ja+"]?",vp="(?:"+Ya+"(?:"+[Za,as,us].join("|")+")"+nu+tu+")*",wp="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",yp="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ru=nu+tu+vp,xp="(?:"+[mp,as,us].join("|")+")"+ru,Sp="(?:"+[Za+Mr+"?",Mr,as,us,gp].join("|")+")",Cp=RegExp(ss,"g"),Tp=RegExp(Mr,"g"),cs=RegExp(os+"(?="+os+")|"+Sp+ru,"g"),Ep=RegExp([bn+"?"+Ga+"+"+Qa+"(?="+[Ha,bn,"$"].join("|")+")",bp+"+"+eu+"(?="+[Ha,bn+Xa,"$"].join("|")+")",bn+"?"+Xa+"+"+Qa,bn+"+"+eu,yp,wp,Ka,xp].join("|"),"g"),Ap=RegExp("["+Ya+Fr+Wa+ja+"]"),Op=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Rp=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ip=-1,_e={};_e[Gi]=_e[Ji]=_e[Zi]=_e[Yi]=_e[Xi]=_e[Qi]=_e[es]=_e[ts]=_e[ns]=!0,_e[mn]=_e[kr]=_e[Yn]=_e[zn]=_e[_n]=_e[Hn]=_e[Lr]=_e[Nr]=_e[dt]=_e[Kn]=_e[At]=_e[Gn]=_e[pt]=_e[Jn]=_e[Zn]=!1;var pe={};pe[mn]=pe[kr]=pe[Yn]=pe[_n]=pe[zn]=pe[Hn]=pe[Gi]=pe[Ji]=pe[Zi]=pe[Yi]=pe[Xi]=pe[dt]=pe[Kn]=pe[At]=pe[Gn]=pe[pt]=pe[Jn]=pe[Dr]=pe[Qi]=pe[es]=pe[ts]=pe[ns]=!0,pe[Lr]=pe[Nr]=pe[Zn]=!1;var Pp={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},kp={"&":"&","<":"<",">":">",'"':""","'":"'"},Lp={"&":"&","<":"<",">":">",""":'"',"'":"'"},Np={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Dp=parseFloat,Up=parseInt,iu=typeof Ir=="object"&&Ir&&Ir.Object===Object&&Ir,Fp=typeof self=="object"&&self&&self.Object===Object&&self,Ne=iu||Fp||Function("return this")(),ls=n&&!n.nodeType&&n,en=ls&&!0&&r&&!r.nodeType&&r,su=en&&en.exports===ls,fs=su&&iu.process,nt=(function(){try{var m=en&&en.require&&en.require("util").types;return m||fs&&fs.binding&&fs.binding("util")}catch{}})(),ou=nt&&nt.isArrayBuffer,au=nt&&nt.isDate,uu=nt&&nt.isMap,cu=nt&&nt.isRegExp,lu=nt&&nt.isSet,fu=nt&&nt.isTypedArray;function Ze(m,C,y){switch(y.length){case 0:return m.call(C);case 1:return m.call(C,y[0]);case 2:return m.call(C,y[0],y[1]);case 3:return m.call(C,y[0],y[1],y[2])}return m.apply(C,y)}function Mp(m,C,y,U){for(var z=-1,ce=m==null?0:m.length;++z<ce;){var Re=m[z];C(U,Re,y(Re),m)}return U}function rt(m,C){for(var y=-1,U=m==null?0:m.length;++y<U&&C(m[y],y,m)!==!1;);return m}function Bp(m,C){for(var y=m==null?0:m.length;y--&&C(m[y],y,m)!==!1;);return m}function hu(m,C){for(var y=-1,U=m==null?0:m.length;++y<U;)if(!C(m[y],y,m))return!1;return!0}function Ft(m,C){for(var y=-1,U=m==null?0:m.length,z=0,ce=[];++y<U;){var Re=m[y];C(Re,y,m)&&(ce[z++]=Re)}return ce}function Br(m,C){var y=m==null?0:m.length;return!!y&&vn(m,C,0)>-1}function hs(m,C,y){for(var U=-1,z=m==null?0:m.length;++U<z;)if(y(C,m[U]))return!0;return!1}function ve(m,C){for(var y=-1,U=m==null?0:m.length,z=Array(U);++y<U;)z[y]=C(m[y],y,m);return z}function Mt(m,C){for(var y=-1,U=C.length,z=m.length;++y<U;)m[z+y]=C[y];return m}function ds(m,C,y,U){var z=-1,ce=m==null?0:m.length;for(U&&ce&&(y=m[++z]);++z<ce;)y=C(y,m[z],z,m);return y}function Wp(m,C,y,U){var z=m==null?0:m.length;for(U&&z&&(y=m[--z]);z--;)y=C(y,m[z],z,m);return y}function ps(m,C){for(var y=-1,U=m==null?0:m.length;++y<U;)if(C(m[y],y,m))return!0;return!1}var $p=gs("length");function qp(m){return m.split("")}function Vp(m){return m.match(Yd)||[]}function du(m,C,y){var U;return y(m,function(z,ce,Re){if(C(z,ce,Re))return U=ce,!1}),U}function Wr(m,C,y,U){for(var z=m.length,ce=y+(U?1:-1);U?ce--:++ce<z;)if(C(m[ce],ce,m))return ce;return-1}function vn(m,C,y){return C===C?tg(m,C,y):Wr(m,pu,y)}function jp(m,C,y,U){for(var z=y-1,ce=m.length;++z<ce;)if(U(m[z],C))return z;return-1}function pu(m){return m!==m}function gu(m,C){var y=m==null?0:m.length;return y?_s(m,C)/y:W}function gs(m){return function(C){return C==null?i:C[m]}}function ms(m){return function(C){return m==null?i:m[C]}}function mu(m,C,y,U,z){return z(m,function(ce,Re,he){y=U?(U=!1,ce):C(y,ce,Re,he)}),y}function zp(m,C){var y=m.length;for(m.sort(C);y--;)m[y]=m[y].value;return m}function _s(m,C){for(var y,U=-1,z=m.length;++U<z;){var ce=C(m[U]);ce!==i&&(y=y===i?ce:y+ce)}return y}function bs(m,C){for(var y=-1,U=Array(m);++y<m;)U[y]=C(y);return U}function Hp(m,C){return ve(C,function(y){return[y,m[y]]})}function _u(m){return m&&m.slice(0,yu(m)+1).replace(is,"")}function Ye(m){return function(C){return m(C)}}function vs(m,C){return ve(C,function(y){return m[y]})}function Xn(m,C){return m.has(C)}function bu(m,C){for(var y=-1,U=m.length;++y<U&&vn(C,m[y],0)>-1;);return y}function vu(m,C){for(var y=m.length;y--&&vn(C,m[y],0)>-1;);return y}function Kp(m,C){for(var y=m.length,U=0;y--;)m[y]===C&&++U;return U}var Gp=ms(Pp),Jp=ms(kp);function Zp(m){return"\\"+Np[m]}function Yp(m,C){return m==null?i:m[C]}function wn(m){return Ap.test(m)}function Xp(m){return Op.test(m)}function Qp(m){for(var C,y=[];!(C=m.next()).done;)y.push(C.value);return y}function ws(m){var C=-1,y=Array(m.size);return m.forEach(function(U,z){y[++C]=[z,U]}),y}function wu(m,C){return function(y){return m(C(y))}}function Bt(m,C){for(var y=-1,U=m.length,z=0,ce=[];++y<U;){var Re=m[y];(Re===C||Re===S)&&(m[y]=S,ce[z++]=y)}return ce}function $r(m){var C=-1,y=Array(m.size);return m.forEach(function(U){y[++C]=U}),y}function eg(m){var C=-1,y=Array(m.size);return m.forEach(function(U){y[++C]=[U,U]}),y}function tg(m,C,y){for(var U=y-1,z=m.length;++U<z;)if(m[U]===C)return U;return-1}function ng(m,C,y){for(var U=y+1;U--;)if(m[U]===C)return U;return U}function yn(m){return wn(m)?ig(m):$p(m)}function gt(m){return wn(m)?sg(m):qp(m)}function yu(m){for(var C=m.length;C--&&Kd.test(m.charAt(C)););return C}var rg=ms(Lp);function ig(m){for(var C=cs.lastIndex=0;cs.test(m);)++C;return C}function sg(m){return m.match(cs)||[]}function og(m){return m.match(Ep)||[]}var ag=(function m(C){C=C==null?Ne:xn.defaults(Ne.Object(),C,xn.pick(Ne,Rp));var y=C.Array,U=C.Date,z=C.Error,ce=C.Function,Re=C.Math,he=C.Object,ys=C.RegExp,ug=C.String,it=C.TypeError,qr=y.prototype,cg=ce.prototype,Sn=he.prototype,Vr=C["__core-js_shared__"],jr=cg.toString,fe=Sn.hasOwnProperty,lg=0,xu=(function(){var e=/[^.]+$/.exec(Vr&&Vr.keys&&Vr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})(),zr=Sn.toString,fg=jr.call(he),hg=Ne._,dg=ys("^"+jr.call(fe).replace(rs,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Hr=su?C.Buffer:i,Wt=C.Symbol,Kr=C.Uint8Array,Su=Hr?Hr.allocUnsafe:i,Gr=wu(he.getPrototypeOf,he),Cu=he.create,Tu=Sn.propertyIsEnumerable,Jr=qr.splice,Eu=Wt?Wt.isConcatSpreadable:i,Qn=Wt?Wt.iterator:i,tn=Wt?Wt.toStringTag:i,Zr=(function(){try{var e=an(he,"defineProperty");return e({},"",{}),e}catch{}})(),pg=C.clearTimeout!==Ne.clearTimeout&&C.clearTimeout,gg=U&&U.now!==Ne.Date.now&&U.now,mg=C.setTimeout!==Ne.setTimeout&&C.setTimeout,Yr=Re.ceil,Xr=Re.floor,xs=he.getOwnPropertySymbols,_g=Hr?Hr.isBuffer:i,Au=C.isFinite,bg=qr.join,vg=wu(he.keys,he),Ie=Re.max,Me=Re.min,wg=U.now,yg=C.parseInt,Ou=Re.random,xg=qr.reverse,Ss=an(C,"DataView"),er=an(C,"Map"),Cs=an(C,"Promise"),Cn=an(C,"Set"),tr=an(C,"WeakMap"),nr=an(he,"create"),Qr=tr&&new tr,Tn={},Sg=un(Ss),Cg=un(er),Tg=un(Cs),Eg=un(Cn),Ag=un(tr),ei=Wt?Wt.prototype:i,rr=ei?ei.valueOf:i,Ru=ei?ei.toString:i;function f(e){if(Ce(e)&&!K(e)&&!(e instanceof te)){if(e instanceof st)return e;if(fe.call(e,"__wrapped__"))return Ic(e)}return new st(e)}var En=(function(){function e(){}return function(t){if(!xe(t))return{};if(Cu)return Cu(t);e.prototype=t;var s=new e;return e.prototype=i,s}})();function ti(){}function st(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}f.templateSettings={escape:$d,evaluate:qd,interpolate:Ma,variable:"",imports:{_:f}},f.prototype=ti.prototype,f.prototype.constructor=f,st.prototype=En(ti.prototype),st.prototype.constructor=st;function te(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ye,this.__views__=[]}function Og(){var e=new te(this.__wrapped__);return e.__actions__=He(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=He(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=He(this.__views__),e}function Rg(){if(this.__filtered__){var e=new te(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function Ig(){var e=this.__wrapped__.value(),t=this.__dir__,s=K(e),a=t<0,c=s?e.length:0,h=qm(0,c,this.__views__),p=h.start,g=h.end,_=g-p,T=a?g:p-1,E=this.__iteratees__,A=E.length,N=0,B=Me(_,this.__takeCount__);if(!s||!a&&c==_&&B==_)return Qu(e,this.__actions__);var q=[];e:for(;_--&&N<B;){T+=t;for(var Y=-1,V=e[T];++Y<A;){var Q=E[Y],ie=Q.iteratee,et=Q.type,qe=ie(V);if(et==ae)V=qe;else if(!qe){if(et==j)continue e;break e}}q[N++]=V}return q}te.prototype=En(ti.prototype),te.prototype.constructor=te;function nn(e){var t=-1,s=e==null?0:e.length;for(this.clear();++t<s;){var a=e[t];this.set(a[0],a[1])}}function Pg(){this.__data__=nr?nr(null):{},this.size=0}function kg(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function Lg(e){var t=this.__data__;if(nr){var s=t[e];return s===v?i:s}return fe.call(t,e)?t[e]:i}function Ng(e){var t=this.__data__;return nr?t[e]!==i:fe.call(t,e)}function Dg(e,t){var s=this.__data__;return this.size+=this.has(e)?0:1,s[e]=nr&&t===i?v:t,this}nn.prototype.clear=Pg,nn.prototype.delete=kg,nn.prototype.get=Lg,nn.prototype.has=Ng,nn.prototype.set=Dg;function Ot(e){var t=-1,s=e==null?0:e.length;for(this.clear();++t<s;){var a=e[t];this.set(a[0],a[1])}}function Ug(){this.__data__=[],this.size=0}function Fg(e){var t=this.__data__,s=ni(t,e);if(s<0)return!1;var a=t.length-1;return s==a?t.pop():Jr.call(t,s,1),--this.size,!0}function Mg(e){var t=this.__data__,s=ni(t,e);return s<0?i:t[s][1]}function Bg(e){return ni(this.__data__,e)>-1}function Wg(e,t){var s=this.__data__,a=ni(s,e);return a<0?(++this.size,s.push([e,t])):s[a][1]=t,this}Ot.prototype.clear=Ug,Ot.prototype.delete=Fg,Ot.prototype.get=Mg,Ot.prototype.has=Bg,Ot.prototype.set=Wg;function Rt(e){var t=-1,s=e==null?0:e.length;for(this.clear();++t<s;){var a=e[t];this.set(a[0],a[1])}}function $g(){this.size=0,this.__data__={hash:new nn,map:new(er||Ot),string:new nn}}function qg(e){var t=pi(this,e).delete(e);return this.size-=t?1:0,t}function Vg(e){return pi(this,e).get(e)}function jg(e){return pi(this,e).has(e)}function zg(e,t){var s=pi(this,e),a=s.size;return s.set(e,t),this.size+=s.size==a?0:1,this}Rt.prototype.clear=$g,Rt.prototype.delete=qg,Rt.prototype.get=Vg,Rt.prototype.has=jg,Rt.prototype.set=zg;function rn(e){var t=-1,s=e==null?0:e.length;for(this.__data__=new Rt;++t<s;)this.add(e[t])}function Hg(e){return this.__data__.set(e,v),this}function Kg(e){return this.__data__.has(e)}rn.prototype.add=rn.prototype.push=Hg,rn.prototype.has=Kg;function mt(e){var t=this.__data__=new Ot(e);this.size=t.size}function Gg(){this.__data__=new Ot,this.size=0}function Jg(e){var t=this.__data__,s=t.delete(e);return this.size=t.size,s}function Zg(e){return this.__data__.get(e)}function Yg(e){return this.__data__.has(e)}function Xg(e,t){var s=this.__data__;if(s instanceof Ot){var a=s.__data__;if(!er||a.length<u-1)return a.push([e,t]),this.size=++s.size,this;s=this.__data__=new Rt(a)}return s.set(e,t),this.size=s.size,this}mt.prototype.clear=Gg,mt.prototype.delete=Jg,mt.prototype.get=Zg,mt.prototype.has=Yg,mt.prototype.set=Xg;function Iu(e,t){var s=K(e),a=!s&&cn(e),c=!s&&!a&&zt(e),h=!s&&!a&&!c&&In(e),p=s||a||c||h,g=p?bs(e.length,ug):[],_=g.length;for(var T in e)(t||fe.call(e,T))&&!(p&&(T=="length"||c&&(T=="offset"||T=="parent")||h&&(T=="buffer"||T=="byteLength"||T=="byteOffset")||Lt(T,_)))&&g.push(T);return g}function Pu(e){var t=e.length;return t?e[Ds(0,t-1)]:i}function Qg(e,t){return gi(He(e),sn(t,0,e.length))}function em(e){return gi(He(e))}function Ts(e,t,s){(s!==i&&!_t(e[t],s)||s===i&&!(t in e))&&It(e,t,s)}function ir(e,t,s){var a=e[t];(!(fe.call(e,t)&&_t(a,s))||s===i&&!(t in e))&&It(e,t,s)}function ni(e,t){for(var s=e.length;s--;)if(_t(e[s][0],t))return s;return-1}function tm(e,t,s,a){return $t(e,function(c,h,p){t(a,c,s(c),p)}),a}function ku(e,t){return e&&Ct(t,ke(t),e)}function nm(e,t){return e&&Ct(t,Ge(t),e)}function It(e,t,s){t=="__proto__"&&Zr?Zr(e,t,{configurable:!0,enumerable:!0,value:s,writable:!0}):e[t]=s}function Es(e,t){for(var s=-1,a=t.length,c=y(a),h=e==null;++s<a;)c[s]=h?i:oo(e,t[s]);return c}function sn(e,t,s){return e===e&&(s!==i&&(e=e<=s?e:s),t!==i&&(e=e>=t?e:t)),e}function ot(e,t,s,a,c,h){var p,g=t&L,_=t&M,T=t&I;if(s&&(p=c?s(e,a,c,h):s(e)),p!==i)return p;if(!xe(e))return e;var E=K(e);if(E){if(p=jm(e),!g)return He(e,p)}else{var A=Be(e),N=A==Nr||A==Na;if(zt(e))return nc(e,g);if(A==At||A==mn||N&&!c){if(p=_||N?{}:yc(e),!g)return _?Lm(e,nm(p,e)):km(e,ku(p,e))}else{if(!pe[A])return c?e:{};p=zm(e,A,g)}}h||(h=new mt);var B=h.get(e);if(B)return B;h.set(e,p),Zc(e)?e.forEach(function(V){p.add(ot(V,t,s,V,e,h))}):Gc(e)&&e.forEach(function(V,Q){p.set(Q,ot(V,t,s,Q,e,h))});var q=T?_?Hs:zs:_?Ge:ke,Y=E?i:q(e);return rt(Y||e,function(V,Q){Y&&(Q=V,V=e[Q]),ir(p,Q,ot(V,t,s,Q,e,h))}),p}function rm(e){var t=ke(e);return function(s){return Lu(s,e,t)}}function Lu(e,t,s){var a=s.length;if(e==null)return!a;for(e=he(e);a--;){var c=s[a],h=t[c],p=e[c];if(p===i&&!(c in e)||!h(p))return!1}return!0}function Nu(e,t,s){if(typeof e!="function")throw new it(d);return fr(function(){e.apply(i,s)},t)}function sr(e,t,s,a){var c=-1,h=Br,p=!0,g=e.length,_=[],T=t.length;if(!g)return _;s&&(t=ve(t,Ye(s))),a?(h=hs,p=!1):t.length>=u&&(h=Xn,p=!1,t=new rn(t));e:for(;++c<g;){var E=e[c],A=s==null?E:s(E);if(E=a||E!==0?E:0,p&&A===A){for(var N=T;N--;)if(t[N]===A)continue e;_.push(E)}else h(t,A,a)||_.push(E)}return _}var $t=ac(St),Du=ac(Os,!0);function im(e,t){var s=!0;return $t(e,function(a,c,h){return s=!!t(a,c,h),s}),s}function ri(e,t,s){for(var a=-1,c=e.length;++a<c;){var h=e[a],p=t(h);if(p!=null&&(g===i?p===p&&!Qe(p):s(p,g)))var g=p,_=h}return _}function sm(e,t,s,a){var c=e.length;for(s=Z(s),s<0&&(s=-s>c?0:c+s),a=a===i||a>c?c:Z(a),a<0&&(a+=c),a=s>a?0:Xc(a);s<a;)e[s++]=t;return e}function Uu(e,t){var s=[];return $t(e,function(a,c,h){t(a,c,h)&&s.push(a)}),s}function De(e,t,s,a,c){var h=-1,p=e.length;for(s||(s=Km),c||(c=[]);++h<p;){var g=e[h];t>0&&s(g)?t>1?De(g,t-1,s,a,c):Mt(c,g):a||(c[c.length]=g)}return c}var As=uc(),Fu=uc(!0);function St(e,t){return e&&As(e,t,ke)}function Os(e,t){return e&&Fu(e,t,ke)}function ii(e,t){return Ft(t,function(s){return Nt(e[s])})}function on(e,t){t=Vt(t,e);for(var s=0,a=t.length;e!=null&&s<a;)e=e[Tt(t[s++])];return s&&s==a?e:i}function Mu(e,t,s){var a=t(e);return K(e)?a:Mt(a,s(e))}function We(e){return e==null?e===i?Nd:kd:tn&&tn in he(e)?$m(e):e_(e)}function Rs(e,t){return e>t}function om(e,t){return e!=null&&fe.call(e,t)}function am(e,t){return e!=null&&t in he(e)}function um(e,t,s){return e>=Me(t,s)&&e<Ie(t,s)}function Is(e,t,s){for(var a=s?hs:Br,c=e[0].length,h=e.length,p=h,g=y(h),_=1/0,T=[];p--;){var E=e[p];p&&t&&(E=ve(E,Ye(t))),_=Me(E.length,_),g[p]=!s&&(t||c>=120&&E.length>=120)?new rn(p&&E):i}E=e[0];var A=-1,N=g[0];e:for(;++A<c&&T.length<_;){var B=E[A],q=t?t(B):B;if(B=s||B!==0?B:0,!(N?Xn(N,q):a(T,q,s))){for(p=h;--p;){var Y=g[p];if(!(Y?Xn(Y,q):a(e[p],q,s)))continue e}N&&N.push(q),T.push(B)}}return T}function cm(e,t,s,a){return St(e,function(c,h,p){t(a,s(c),h,p)}),a}function or(e,t,s){t=Vt(t,e),e=Tc(e,t);var a=e==null?e:e[Tt(ut(t))];return a==null?i:Ze(a,e,s)}function Bu(e){return Ce(e)&&We(e)==mn}function lm(e){return Ce(e)&&We(e)==Yn}function fm(e){return Ce(e)&&We(e)==Hn}function ar(e,t,s,a,c){return e===t?!0:e==null||t==null||!Ce(e)&&!Ce(t)?e!==e&&t!==t:hm(e,t,s,a,ar,c)}function hm(e,t,s,a,c,h){var p=K(e),g=K(t),_=p?kr:Be(e),T=g?kr:Be(t);_=_==mn?At:_,T=T==mn?At:T;var E=_==At,A=T==At,N=_==T;if(N&&zt(e)){if(!zt(t))return!1;p=!0,E=!1}if(N&&!E)return h||(h=new mt),p||In(e)?bc(e,t,s,a,c,h):Bm(e,t,_,s,a,c,h);if(!(s&P)){var B=E&&fe.call(e,"__wrapped__"),q=A&&fe.call(t,"__wrapped__");if(B||q){var Y=B?e.value():e,V=q?t.value():t;return h||(h=new mt),c(Y,V,s,a,h)}}return N?(h||(h=new mt),Wm(e,t,s,a,c,h)):!1}function dm(e){return Ce(e)&&Be(e)==dt}function Ps(e,t,s,a){var c=s.length,h=c,p=!a;if(e==null)return!h;for(e=he(e);c--;){var g=s[c];if(p&&g[2]?g[1]!==e[g[0]]:!(g[0]in e))return!1}for(;++c<h;){g=s[c];var _=g[0],T=e[_],E=g[1];if(p&&g[2]){if(T===i&&!(_ in e))return!1}else{var A=new mt;if(a)var N=a(T,E,_,e,t,A);if(!(N===i?ar(E,T,P|k,a,A):N))return!1}}return!0}function Wu(e){if(!xe(e)||Jm(e))return!1;var t=Nt(e)?dg:rp;return t.test(un(e))}function pm(e){return Ce(e)&&We(e)==Gn}function gm(e){return Ce(e)&&Be(e)==pt}function mm(e){return Ce(e)&&yi(e.length)&&!!_e[We(e)]}function $u(e){return typeof e=="function"?e:e==null?Je:typeof e=="object"?K(e)?ju(e[0],e[1]):Vu(e):cl(e)}function ks(e){if(!lr(e))return vg(e);var t=[];for(var s in he(e))fe.call(e,s)&&s!="constructor"&&t.push(s);return t}function _m(e){if(!xe(e))return Qm(e);var t=lr(e),s=[];for(var a in e)a=="constructor"&&(t||!fe.call(e,a))||s.push(a);return s}function Ls(e,t){return e<t}function qu(e,t){var s=-1,a=Ke(e)?y(e.length):[];return $t(e,function(c,h,p){a[++s]=t(c,h,p)}),a}function Vu(e){var t=Gs(e);return t.length==1&&t[0][2]?Sc(t[0][0],t[0][1]):function(s){return s===e||Ps(s,e,t)}}function ju(e,t){return Zs(e)&&xc(t)?Sc(Tt(e),t):function(s){var a=oo(s,e);return a===i&&a===t?ao(s,e):ar(t,a,P|k)}}function si(e,t,s,a,c){e!==t&&As(t,function(h,p){if(c||(c=new mt),xe(h))bm(e,t,p,s,si,a,c);else{var g=a?a(Xs(e,p),h,p+"",e,t,c):i;g===i&&(g=h),Ts(e,p,g)}},Ge)}function bm(e,t,s,a,c,h,p){var g=Xs(e,s),_=Xs(t,s),T=p.get(_);if(T){Ts(e,s,T);return}var E=h?h(g,_,s+"",e,t,p):i,A=E===i;if(A){var N=K(_),B=!N&&zt(_),q=!N&&!B&&In(_);E=_,N||B||q?K(g)?E=g:Ee(g)?E=He(g):B?(A=!1,E=nc(_,!0)):q?(A=!1,E=rc(_,!0)):E=[]:hr(_)||cn(_)?(E=g,cn(g)?E=Qc(g):(!xe(g)||Nt(g))&&(E=yc(_))):A=!1}A&&(p.set(_,E),c(E,_,a,h,p),p.delete(_)),Ts(e,s,E)}function zu(e,t){var s=e.length;if(s)return t+=t<0?s:0,Lt(t,s)?e[t]:i}function Hu(e,t,s){t.length?t=ve(t,function(h){return K(h)?function(p){return on(p,h.length===1?h[0]:h)}:h}):t=[Je];var a=-1;t=ve(t,Ye($()));var c=qu(e,function(h,p,g){var _=ve(t,function(T){return T(h)});return{criteria:_,index:++a,value:h}});return zp(c,function(h,p){return Pm(h,p,s)})}function vm(e,t){return Ku(e,t,function(s,a){return ao(e,a)})}function Ku(e,t,s){for(var a=-1,c=t.length,h={};++a<c;){var p=t[a],g=on(e,p);s(g,p)&&ur(h,Vt(p,e),g)}return h}function wm(e){return function(t){return on(t,e)}}function Ns(e,t,s,a){var c=a?jp:vn,h=-1,p=t.length,g=e;for(e===t&&(t=He(t)),s&&(g=ve(e,Ye(s)));++h<p;)for(var _=0,T=t[h],E=s?s(T):T;(_=c(g,E,_,a))>-1;)g!==e&&Jr.call(g,_,1),Jr.call(e,_,1);return e}function Gu(e,t){for(var s=e?t.length:0,a=s-1;s--;){var c=t[s];if(s==a||c!==h){var h=c;Lt(c)?Jr.call(e,c,1):Ms(e,c)}}return e}function Ds(e,t){return e+Xr(Ou()*(t-e+1))}function ym(e,t,s,a){for(var c=-1,h=Ie(Yr((t-e)/(s||1)),0),p=y(h);h--;)p[a?h:++c]=e,e+=s;return p}function Us(e,t){var s="";if(!e||t<1||t>Le)return s;do t%2&&(s+=e),t=Xr(t/2),t&&(e+=e);while(t);return s}function X(e,t){return Qs(Cc(e,t,Je),e+"")}function xm(e){return Pu(Pn(e))}function Sm(e,t){var s=Pn(e);return gi(s,sn(t,0,s.length))}function ur(e,t,s,a){if(!xe(e))return e;t=Vt(t,e);for(var c=-1,h=t.length,p=h-1,g=e;g!=null&&++c<h;){var _=Tt(t[c]),T=s;if(_==="__proto__"||_==="constructor"||_==="prototype")return e;if(c!=p){var E=g[_];T=a?a(E,_,g):i,T===i&&(T=xe(E)?E:Lt(t[c+1])?[]:{})}ir(g,_,T),g=g[_]}return e}var Ju=Qr?function(e,t){return Qr.set(e,t),e}:Je,Cm=Zr?function(e,t){return Zr(e,"toString",{configurable:!0,enumerable:!1,value:co(t),writable:!0})}:Je;function Tm(e){return gi(Pn(e))}function at(e,t,s){var a=-1,c=e.length;t<0&&(t=-t>c?0:c+t),s=s>c?c:s,s<0&&(s+=c),c=t>s?0:s-t>>>0,t>>>=0;for(var h=y(c);++a<c;)h[a]=e[a+t];return h}function Em(e,t){var s;return $t(e,function(a,c,h){return s=t(a,c,h),!s}),!!s}function oi(e,t,s){var a=0,c=e==null?a:e.length;if(typeof t=="number"&&t===t&&c<=gn){for(;a<c;){var h=a+c>>>1,p=e[h];p!==null&&!Qe(p)&&(s?p<=t:p<t)?a=h+1:c=h}return c}return Fs(e,t,Je,s)}function Fs(e,t,s,a){var c=0,h=e==null?0:e.length;if(h===0)return 0;t=s(t);for(var p=t!==t,g=t===null,_=Qe(t),T=t===i;c<h;){var E=Xr((c+h)/2),A=s(e[E]),N=A!==i,B=A===null,q=A===A,Y=Qe(A);if(p)var V=a||q;else T?V=q&&(a||N):g?V=q&&N&&(a||!B):_?V=q&&N&&!B&&(a||!Y):B||Y?V=!1:V=a?A<=t:A<t;V?c=E+1:h=E}return Me(h,Qt)}function Zu(e,t){for(var s=-1,a=e.length,c=0,h=[];++s<a;){var p=e[s],g=t?t(p):p;if(!s||!_t(g,_)){var _=g;h[c++]=p===0?0:p}}return h}function Yu(e){return typeof e=="number"?e:Qe(e)?W:+e}function Xe(e){if(typeof e=="string")return e;if(K(e))return ve(e,Xe)+"";if(Qe(e))return Ru?Ru.call(e):"";var t=e+"";return t=="0"&&1/e==-be?"-0":t}function qt(e,t,s){var a=-1,c=Br,h=e.length,p=!0,g=[],_=g;if(s)p=!1,c=hs;else if(h>=u){var T=t?null:Fm(e);if(T)return $r(T);p=!1,c=Xn,_=new rn}else _=t?[]:g;e:for(;++a<h;){var E=e[a],A=t?t(E):E;if(E=s||E!==0?E:0,p&&A===A){for(var N=_.length;N--;)if(_[N]===A)continue e;t&&_.push(A),g.push(E)}else c(_,A,s)||(_!==g&&_.push(A),g.push(E))}return g}function Ms(e,t){return t=Vt(t,e),e=Tc(e,t),e==null||delete e[Tt(ut(t))]}function Xu(e,t,s,a){return ur(e,t,s(on(e,t)),a)}function ai(e,t,s,a){for(var c=e.length,h=a?c:-1;(a?h--:++h<c)&&t(e[h],h,e););return s?at(e,a?0:h,a?h+1:c):at(e,a?h+1:0,a?c:h)}function Qu(e,t){var s=e;return s instanceof te&&(s=s.value()),ds(t,function(a,c){return c.func.apply(c.thisArg,Mt([a],c.args))},s)}function Bs(e,t,s){var a=e.length;if(a<2)return a?qt(e[0]):[];for(var c=-1,h=y(a);++c<a;)for(var p=e[c],g=-1;++g<a;)g!=c&&(h[c]=sr(h[c]||p,e[g],t,s));return qt(De(h,1),t,s)}function ec(e,t,s){for(var a=-1,c=e.length,h=t.length,p={};++a<c;){var g=a<h?t[a]:i;s(p,e[a],g)}return p}function Ws(e){return Ee(e)?e:[]}function $s(e){return typeof e=="function"?e:Je}function Vt(e,t){return K(e)?e:Zs(e,t)?[e]:Rc(le(e))}var Am=X;function jt(e,t,s){var a=e.length;return s=s===i?a:s,!t&&s>=a?e:at(e,t,s)}var tc=pg||function(e){return Ne.clearTimeout(e)};function nc(e,t){if(t)return e.slice();var s=e.length,a=Su?Su(s):new e.constructor(s);return e.copy(a),a}function qs(e){var t=new e.constructor(e.byteLength);return new Kr(t).set(new Kr(e)),t}function Om(e,t){var s=t?qs(e.buffer):e.buffer;return new e.constructor(s,e.byteOffset,e.byteLength)}function Rm(e){var t=new e.constructor(e.source,Ba.exec(e));return t.lastIndex=e.lastIndex,t}function Im(e){return rr?he(rr.call(e)):{}}function rc(e,t){var s=t?qs(e.buffer):e.buffer;return new e.constructor(s,e.byteOffset,e.length)}function ic(e,t){if(e!==t){var s=e!==i,a=e===null,c=e===e,h=Qe(e),p=t!==i,g=t===null,_=t===t,T=Qe(t);if(!g&&!T&&!h&&e>t||h&&p&&_&&!g&&!T||a&&p&&_||!s&&_||!c)return 1;if(!a&&!h&&!T&&e<t||T&&s&&c&&!a&&!h||g&&s&&c||!p&&c||!_)return-1}return 0}function Pm(e,t,s){for(var a=-1,c=e.criteria,h=t.criteria,p=c.length,g=s.length;++a<p;){var _=ic(c[a],h[a]);if(_){if(a>=g)return _;var T=s[a];return _*(T=="desc"?-1:1)}}return e.index-t.index}function sc(e,t,s,a){for(var c=-1,h=e.length,p=s.length,g=-1,_=t.length,T=Ie(h-p,0),E=y(_+T),A=!a;++g<_;)E[g]=t[g];for(;++c<p;)(A||c<h)&&(E[s[c]]=e[c]);for(;T--;)E[g++]=e[c++];return E}function oc(e,t,s,a){for(var c=-1,h=e.length,p=-1,g=s.length,_=-1,T=t.length,E=Ie(h-g,0),A=y(E+T),N=!a;++c<E;)A[c]=e[c];for(var B=c;++_<T;)A[B+_]=t[_];for(;++p<g;)(N||c<h)&&(A[B+s[p]]=e[c++]);return A}function He(e,t){var s=-1,a=e.length;for(t||(t=y(a));++s<a;)t[s]=e[s];return t}function Ct(e,t,s,a){var c=!s;s||(s={});for(var h=-1,p=t.length;++h<p;){var g=t[h],_=a?a(s[g],e[g],g,s,e):i;_===i&&(_=e[g]),c?It(s,g,_):ir(s,g,_)}return s}function km(e,t){return Ct(e,Js(e),t)}function Lm(e,t){return Ct(e,vc(e),t)}function ui(e,t){return function(s,a){var c=K(s)?Mp:tm,h=t?t():{};return c(s,e,$(a,2),h)}}function An(e){return X(function(t,s){var a=-1,c=s.length,h=c>1?s[c-1]:i,p=c>2?s[2]:i;for(h=e.length>3&&typeof h=="function"?(c--,h):i,p&&$e(s[0],s[1],p)&&(h=c<3?i:h,c=1),t=he(t);++a<c;){var g=s[a];g&&e(t,g,a,h)}return t})}function ac(e,t){return function(s,a){if(s==null)return s;if(!Ke(s))return e(s,a);for(var c=s.length,h=t?c:-1,p=he(s);(t?h--:++h<c)&&a(p[h],h,p)!==!1;);return s}}function uc(e){return function(t,s,a){for(var c=-1,h=he(t),p=a(t),g=p.length;g--;){var _=p[e?g:++c];if(s(h[_],_,h)===!1)break}return t}}function Nm(e,t,s){var a=t&H,c=cr(e);function h(){var p=this&&this!==Ne&&this instanceof h?c:e;return p.apply(a?s:this,arguments)}return h}function cc(e){return function(t){t=le(t);var s=wn(t)?gt(t):i,a=s?s[0]:t.charAt(0),c=s?jt(s,1).join(""):t.slice(1);return a[e]()+c}}function On(e){return function(t){return ds(al(ol(t).replace(Cp,"")),e,"")}}function cr(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var s=En(e.prototype),a=e.apply(s,t);return xe(a)?a:s}}function Dm(e,t,s){var a=cr(e);function c(){for(var h=arguments.length,p=y(h),g=h,_=Rn(c);g--;)p[g]=arguments[g];var T=h<3&&p[0]!==_&&p[h-1]!==_?[]:Bt(p,_);if(h-=T.length,h<s)return pc(e,t,ci,c.placeholder,i,p,T,i,i,s-h);var E=this&&this!==Ne&&this instanceof c?a:e;return Ze(E,this,p)}return c}function lc(e){return function(t,s,a){var c=he(t);if(!Ke(t)){var h=$(s,3);t=ke(t),s=function(g){return h(c[g],g,c)}}var p=e(t,s,a);return p>-1?c[h?t[p]:p]:i}}function fc(e){return kt(function(t){var s=t.length,a=s,c=st.prototype.thru;for(e&&t.reverse();a--;){var h=t[a];if(typeof h!="function")throw new it(d);if(c&&!p&&di(h)=="wrapper")var p=new st([],!0)}for(a=p?a:s;++a<s;){h=t[a];var g=di(h),_=g=="wrapper"?Ks(h):i;_&&Ys(_[0])&&_[1]==(ee|oe|D|Oe)&&!_[4].length&&_[9]==1?p=p[di(_[0])].apply(p,_[3]):p=h.length==1&&Ys(h)?p[g]():p.thru(h)}return function(){var T=arguments,E=T[0];if(p&&T.length==1&&K(E))return p.plant(E).value();for(var A=0,N=s?t[A].apply(this,T):E;++A<s;)N=t[A].call(this,N);return N}})}function ci(e,t,s,a,c,h,p,g,_,T){var E=t&ee,A=t&H,N=t&re,B=t&(oe|ge),q=t&Pe,Y=N?i:cr(e);function V(){for(var Q=arguments.length,ie=y(Q),et=Q;et--;)ie[et]=arguments[et];if(B)var qe=Rn(V),tt=Kp(ie,qe);if(a&&(ie=sc(ie,a,c,B)),h&&(ie=oc(ie,h,p,B)),Q-=tt,B&&Q<T){var Ae=Bt(ie,qe);return pc(e,t,ci,V.placeholder,s,ie,Ae,g,_,T-Q)}var bt=A?s:this,Ut=N?bt[e]:e;return Q=ie.length,g?ie=t_(ie,g):q&&Q>1&&ie.reverse(),E&&_<Q&&(ie.length=_),this&&this!==Ne&&this instanceof V&&(Ut=Y||cr(Ut)),Ut.apply(bt,ie)}return V}function hc(e,t){return function(s,a){return cm(s,e,t(a),{})}}function li(e,t){return function(s,a){var c;if(s===i&&a===i)return t;if(s!==i&&(c=s),a!==i){if(c===i)return a;typeof s=="string"||typeof a=="string"?(s=Xe(s),a=Xe(a)):(s=Yu(s),a=Yu(a)),c=e(s,a)}return c}}function Vs(e){return kt(function(t){return t=ve(t,Ye($())),X(function(s){var a=this;return e(t,function(c){return Ze(c,a,s)})})})}function fi(e,t){t=t===i?" ":Xe(t);var s=t.length;if(s<2)return s?Us(t,e):t;var a=Us(t,Yr(e/yn(t)));return wn(t)?jt(gt(a),0,e).join(""):a.slice(0,e)}function Um(e,t,s,a){var c=t&H,h=cr(e);function p(){for(var g=-1,_=arguments.length,T=-1,E=a.length,A=y(E+_),N=this&&this!==Ne&&this instanceof p?h:e;++T<E;)A[T]=a[T];for(;_--;)A[T++]=arguments[++g];return Ze(N,c?s:this,A)}return p}function dc(e){return function(t,s,a){return a&&typeof a!="number"&&$e(t,s,a)&&(s=a=i),t=Dt(t),s===i?(s=t,t=0):s=Dt(s),a=a===i?t<s?1:-1:Dt(a),ym(t,s,a,e)}}function hi(e){return function(t,s){return typeof t=="string"&&typeof s=="string"||(t=ct(t),s=ct(s)),e(t,s)}}function pc(e,t,s,a,c,h,p,g,_,T){var E=t&oe,A=E?p:i,N=E?i:p,B=E?h:i,q=E?i:h;t|=E?D:me,t&=~(E?me:D),t&se||(t&=-4);var Y=[e,t,c,B,A,q,N,g,_,T],V=s.apply(i,Y);return Ys(e)&&Ec(V,Y),V.placeholder=a,Ac(V,e,t)}function js(e){var t=Re[e];return function(s,a){if(s=ct(s),a=a==null?0:Me(Z(a),292),a&&Au(s)){var c=(le(s)+"e").split("e"),h=t(c[0]+"e"+(+c[1]+a));return c=(le(h)+"e").split("e"),+(c[0]+"e"+(+c[1]-a))}return t(s)}}var Fm=Cn&&1/$r(new Cn([,-0]))[1]==be?function(e){return new Cn(e)}:ho;function gc(e){return function(t){var s=Be(t);return s==dt?ws(t):s==pt?eg(t):Hp(t,e(t))}}function Pt(e,t,s,a,c,h,p,g){var _=t&re;if(!_&&typeof e!="function")throw new it(d);var T=a?a.length:0;if(T||(t&=-97,a=c=i),p=p===i?p:Ie(Z(p),0),g=g===i?g:Z(g),T-=c?c.length:0,t&me){var E=a,A=c;a=c=i}var N=_?i:Ks(e),B=[e,t,s,a,c,E,A,h,p,g];if(N&&Xm(B,N),e=B[0],t=B[1],s=B[2],a=B[3],c=B[4],g=B[9]=B[9]===i?_?0:e.length:Ie(B[9]-T,0),!g&&t&(oe|ge)&&(t&=-25),!t||t==H)var q=Nm(e,t,s);else t==oe||t==ge?q=Dm(e,t,g):(t==D||t==(H|D))&&!c.length?q=Um(e,t,s,a):q=ci.apply(i,B);var Y=N?Ju:Ec;return Ac(Y(q,B),e,t)}function mc(e,t,s,a){return e===i||_t(e,Sn[s])&&!fe.call(a,s)?t:e}function _c(e,t,s,a,c,h){return xe(e)&&xe(t)&&(h.set(t,e),si(e,t,i,_c,h),h.delete(t)),e}function Mm(e){return hr(e)?i:e}function bc(e,t,s,a,c,h){var p=s&P,g=e.length,_=t.length;if(g!=_&&!(p&&_>g))return!1;var T=h.get(e),E=h.get(t);if(T&&E)return T==t&&E==e;var A=-1,N=!0,B=s&k?new rn:i;for(h.set(e,t),h.set(t,e);++A<g;){var q=e[A],Y=t[A];if(a)var V=p?a(Y,q,A,t,e,h):a(q,Y,A,e,t,h);if(V!==i){if(V)continue;N=!1;break}if(B){if(!ps(t,function(Q,ie){if(!Xn(B,ie)&&(q===Q||c(q,Q,s,a,h)))return B.push(ie)})){N=!1;break}}else if(!(q===Y||c(q,Y,s,a,h))){N=!1;break}}return h.delete(e),h.delete(t),N}function Bm(e,t,s,a,c,h,p){switch(s){case _n:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Yn:return!(e.byteLength!=t.byteLength||!h(new Kr(e),new Kr(t)));case zn:case Hn:case Kn:return _t(+e,+t);case Lr:return e.name==t.name&&e.message==t.message;case Gn:case Jn:return e==t+"";case dt:var g=ws;case pt:var _=a&P;if(g||(g=$r),e.size!=t.size&&!_)return!1;var T=p.get(e);if(T)return T==t;a|=k,p.set(e,t);var E=bc(g(e),g(t),a,c,h,p);return p.delete(e),E;case Dr:if(rr)return rr.call(e)==rr.call(t)}return!1}function Wm(e,t,s,a,c,h){var p=s&P,g=zs(e),_=g.length,T=zs(t),E=T.length;if(_!=E&&!p)return!1;for(var A=_;A--;){var N=g[A];if(!(p?N in t:fe.call(t,N)))return!1}var B=h.get(e),q=h.get(t);if(B&&q)return B==t&&q==e;var Y=!0;h.set(e,t),h.set(t,e);for(var V=p;++A<_;){N=g[A];var Q=e[N],ie=t[N];if(a)var et=p?a(ie,Q,N,t,e,h):a(Q,ie,N,e,t,h);if(!(et===i?Q===ie||c(Q,ie,s,a,h):et)){Y=!1;break}V||(V=N=="constructor")}if(Y&&!V){var qe=e.constructor,tt=t.constructor;qe!=tt&&"constructor"in e&&"constructor"in t&&!(typeof qe=="function"&&qe instanceof qe&&typeof tt=="function"&&tt instanceof tt)&&(Y=!1)}return h.delete(e),h.delete(t),Y}function kt(e){return Qs(Cc(e,i,Lc),e+"")}function zs(e){return Mu(e,ke,Js)}function Hs(e){return Mu(e,Ge,vc)}var Ks=Qr?function(e){return Qr.get(e)}:ho;function di(e){for(var t=e.name+"",s=Tn[t],a=fe.call(Tn,t)?s.length:0;a--;){var c=s[a],h=c.func;if(h==null||h==e)return c.name}return t}function Rn(e){var t=fe.call(f,"placeholder")?f:e;return t.placeholder}function $(){var e=f.iteratee||lo;return e=e===lo?$u:e,arguments.length?e(arguments[0],arguments[1]):e}function pi(e,t){var s=e.__data__;return Gm(t)?s[typeof t=="string"?"string":"hash"]:s.map}function Gs(e){for(var t=ke(e),s=t.length;s--;){var a=t[s],c=e[a];t[s]=[a,c,xc(c)]}return t}function an(e,t){var s=Yp(e,t);return Wu(s)?s:i}function $m(e){var t=fe.call(e,tn),s=e[tn];try{e[tn]=i;var a=!0}catch{}var c=zr.call(e);return a&&(t?e[tn]=s:delete e[tn]),c}var Js=xs?function(e){return e==null?[]:(e=he(e),Ft(xs(e),function(t){return Tu.call(e,t)}))}:po,vc=xs?function(e){for(var t=[];e;)Mt(t,Js(e)),e=Gr(e);return t}:po,Be=We;(Ss&&Be(new Ss(new ArrayBuffer(1)))!=_n||er&&Be(new er)!=dt||Cs&&Be(Cs.resolve())!=Da||Cn&&Be(new Cn)!=pt||tr&&Be(new tr)!=Zn)&&(Be=function(e){var t=We(e),s=t==At?e.constructor:i,a=s?un(s):"";if(a)switch(a){case Sg:return _n;case Cg:return dt;case Tg:return Da;case Eg:return pt;case Ag:return Zn}return t});function qm(e,t,s){for(var a=-1,c=s.length;++a<c;){var h=s[a],p=h.size;switch(h.type){case"drop":e+=p;break;case"dropRight":t-=p;break;case"take":t=Me(t,e+p);break;case"takeRight":e=Ie(e,t-p);break}}return{start:e,end:t}}function Vm(e){var t=e.match(Jd);return t?t[1].split(Zd):[]}function wc(e,t,s){t=Vt(t,e);for(var a=-1,c=t.length,h=!1;++a<c;){var p=Tt(t[a]);if(!(h=e!=null&&s(e,p)))break;e=e[p]}return h||++a!=c?h:(c=e==null?0:e.length,!!c&&yi(c)&&Lt(p,c)&&(K(e)||cn(e)))}function jm(e){var t=e.length,s=new e.constructor(t);return t&&typeof e[0]=="string"&&fe.call(e,"index")&&(s.index=e.index,s.input=e.input),s}function yc(e){return typeof e.constructor=="function"&&!lr(e)?En(Gr(e)):{}}function zm(e,t,s){var a=e.constructor;switch(t){case Yn:return qs(e);case zn:case Hn:return new a(+e);case _n:return Om(e,s);case Gi:case Ji:case Zi:case Yi:case Xi:case Qi:case es:case ts:case ns:return rc(e,s);case dt:return new a;case Kn:case Jn:return new a(e);case Gn:return Rm(e);case pt:return new a;case Dr:return Im(e)}}function Hm(e,t){var s=t.length;if(!s)return e;var a=s-1;return t[a]=(s>1?"& ":"")+t[a],t=t.join(s>2?", ":" "),e.replace(Gd,`{
|
16
|
+
/* [wrapped with `+t+`] */
|
17
|
+
`)}function Km(e){return K(e)||cn(e)||!!(Eu&&e&&e[Eu])}function Lt(e,t){var s=typeof e;return t=t??Le,!!t&&(s=="number"||s!="symbol"&&sp.test(e))&&e>-1&&e%1==0&&e<t}function $e(e,t,s){if(!xe(s))return!1;var a=typeof t;return(a=="number"?Ke(s)&&Lt(t,s.length):a=="string"&&t in s)?_t(s[t],e):!1}function Zs(e,t){if(K(e))return!1;var s=typeof e;return s=="number"||s=="symbol"||s=="boolean"||e==null||Qe(e)?!0:jd.test(e)||!Vd.test(e)||t!=null&&e in he(t)}function Gm(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ys(e){var t=di(e),s=f[t];if(typeof s!="function"||!(t in te.prototype))return!1;if(e===s)return!0;var a=Ks(s);return!!a&&e===a[0]}function Jm(e){return!!xu&&xu in e}var Zm=Vr?Nt:go;function lr(e){var t=e&&e.constructor,s=typeof t=="function"&&t.prototype||Sn;return e===s}function xc(e){return e===e&&!xe(e)}function Sc(e,t){return function(s){return s==null?!1:s[e]===t&&(t!==i||e in he(s))}}function Ym(e){var t=vi(e,function(a){return s.size===x&&s.clear(),a}),s=t.cache;return t}function Xm(e,t){var s=e[1],a=t[1],c=s|a,h=c<(H|re|ee),p=a==ee&&s==oe||a==ee&&s==Oe&&e[7].length<=t[8]||a==(ee|Oe)&&t[7].length<=t[8]&&s==oe;if(!(h||p))return e;a&H&&(e[2]=t[2],c|=s&H?0:se);var g=t[3];if(g){var _=e[3];e[3]=_?sc(_,g,t[4]):g,e[4]=_?Bt(e[3],S):t[4]}return g=t[5],g&&(_=e[5],e[5]=_?oc(_,g,t[6]):g,e[6]=_?Bt(e[5],S):t[6]),g=t[7],g&&(e[7]=g),a&ee&&(e[8]=e[8]==null?t[8]:Me(e[8],t[8])),e[9]==null&&(e[9]=t[9]),e[0]=t[0],e[1]=c,e}function Qm(e){var t=[];if(e!=null)for(var s in he(e))t.push(s);return t}function e_(e){return zr.call(e)}function Cc(e,t,s){return t=Ie(t===i?e.length-1:t,0),function(){for(var a=arguments,c=-1,h=Ie(a.length-t,0),p=y(h);++c<h;)p[c]=a[t+c];c=-1;for(var g=y(t+1);++c<t;)g[c]=a[c];return g[t]=s(p),Ze(e,this,g)}}function Tc(e,t){return t.length<2?e:on(e,at(t,0,-1))}function t_(e,t){for(var s=e.length,a=Me(t.length,s),c=He(e);a--;){var h=t[a];e[a]=Lt(h,s)?c[h]:i}return e}function Xs(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var Ec=Oc(Ju),fr=mg||function(e,t){return Ne.setTimeout(e,t)},Qs=Oc(Cm);function Ac(e,t,s){var a=t+"";return Qs(e,Hm(a,n_(Vm(a),s)))}function Oc(e){var t=0,s=0;return function(){var a=wg(),c=de-(a-s);if(s=a,c>0){if(++t>=Fe)return arguments[0]}else t=0;return e.apply(i,arguments)}}function gi(e,t){var s=-1,a=e.length,c=a-1;for(t=t===i?a:t;++s<t;){var h=Ds(s,c),p=e[h];e[h]=e[s],e[s]=p}return e.length=t,e}var Rc=Ym(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(zd,function(s,a,c,h){t.push(c?h.replace(Qd,"$1"):a||s)}),t});function Tt(e){if(typeof e=="string"||Qe(e))return e;var t=e+"";return t=="0"&&1/e==-be?"-0":t}function un(e){if(e!=null){try{return jr.call(e)}catch{}try{return e+""}catch{}}return""}function n_(e,t){return rt(Pr,function(s){var a="_."+s[0];t&s[1]&&!Br(e,a)&&e.push(a)}),e.sort()}function Ic(e){if(e instanceof te)return e.clone();var t=new st(e.__wrapped__,e.__chain__);return t.__actions__=He(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function r_(e,t,s){(s?$e(e,t,s):t===i)?t=1:t=Ie(Z(t),0);var a=e==null?0:e.length;if(!a||t<1)return[];for(var c=0,h=0,p=y(Yr(a/t));c<a;)p[h++]=at(e,c,c+=t);return p}function i_(e){for(var t=-1,s=e==null?0:e.length,a=0,c=[];++t<s;){var h=e[t];h&&(c[a++]=h)}return c}function s_(){var e=arguments.length;if(!e)return[];for(var t=y(e-1),s=arguments[0],a=e;a--;)t[a-1]=arguments[a];return Mt(K(s)?He(s):[s],De(t,1))}var o_=X(function(e,t){return Ee(e)?sr(e,De(t,1,Ee,!0)):[]}),a_=X(function(e,t){var s=ut(t);return Ee(s)&&(s=i),Ee(e)?sr(e,De(t,1,Ee,!0),$(s,2)):[]}),u_=X(function(e,t){var s=ut(t);return Ee(s)&&(s=i),Ee(e)?sr(e,De(t,1,Ee,!0),i,s):[]});function c_(e,t,s){var a=e==null?0:e.length;return a?(t=s||t===i?1:Z(t),at(e,t<0?0:t,a)):[]}function l_(e,t,s){var a=e==null?0:e.length;return a?(t=s||t===i?1:Z(t),t=a-t,at(e,0,t<0?0:t)):[]}function f_(e,t){return e&&e.length?ai(e,$(t,3),!0,!0):[]}function h_(e,t){return e&&e.length?ai(e,$(t,3),!0):[]}function d_(e,t,s,a){var c=e==null?0:e.length;return c?(s&&typeof s!="number"&&$e(e,t,s)&&(s=0,a=c),sm(e,t,s,a)):[]}function Pc(e,t,s){var a=e==null?0:e.length;if(!a)return-1;var c=s==null?0:Z(s);return c<0&&(c=Ie(a+c,0)),Wr(e,$(t,3),c)}function kc(e,t,s){var a=e==null?0:e.length;if(!a)return-1;var c=a-1;return s!==i&&(c=Z(s),c=s<0?Ie(a+c,0):Me(c,a-1)),Wr(e,$(t,3),c,!0)}function Lc(e){var t=e==null?0:e.length;return t?De(e,1):[]}function p_(e){var t=e==null?0:e.length;return t?De(e,be):[]}function g_(e,t){var s=e==null?0:e.length;return s?(t=t===i?1:Z(t),De(e,t)):[]}function m_(e){for(var t=-1,s=e==null?0:e.length,a={};++t<s;){var c=e[t];a[c[0]]=c[1]}return a}function Nc(e){return e&&e.length?e[0]:i}function __(e,t,s){var a=e==null?0:e.length;if(!a)return-1;var c=s==null?0:Z(s);return c<0&&(c=Ie(a+c,0)),vn(e,t,c)}function b_(e){var t=e==null?0:e.length;return t?at(e,0,-1):[]}var v_=X(function(e){var t=ve(e,Ws);return t.length&&t[0]===e[0]?Is(t):[]}),w_=X(function(e){var t=ut(e),s=ve(e,Ws);return t===ut(s)?t=i:s.pop(),s.length&&s[0]===e[0]?Is(s,$(t,2)):[]}),y_=X(function(e){var t=ut(e),s=ve(e,Ws);return t=typeof t=="function"?t:i,t&&s.pop(),s.length&&s[0]===e[0]?Is(s,i,t):[]});function x_(e,t){return e==null?"":bg.call(e,t)}function ut(e){var t=e==null?0:e.length;return t?e[t-1]:i}function S_(e,t,s){var a=e==null?0:e.length;if(!a)return-1;var c=a;return s!==i&&(c=Z(s),c=c<0?Ie(a+c,0):Me(c,a-1)),t===t?ng(e,t,c):Wr(e,pu,c,!0)}function C_(e,t){return e&&e.length?zu(e,Z(t)):i}var T_=X(Dc);function Dc(e,t){return e&&e.length&&t&&t.length?Ns(e,t):e}function E_(e,t,s){return e&&e.length&&t&&t.length?Ns(e,t,$(s,2)):e}function A_(e,t,s){return e&&e.length&&t&&t.length?Ns(e,t,i,s):e}var O_=kt(function(e,t){var s=e==null?0:e.length,a=Es(e,t);return Gu(e,ve(t,function(c){return Lt(c,s)?+c:c}).sort(ic)),a});function R_(e,t){var s=[];if(!(e&&e.length))return s;var a=-1,c=[],h=e.length;for(t=$(t,3);++a<h;){var p=e[a];t(p,a,e)&&(s.push(p),c.push(a))}return Gu(e,c),s}function eo(e){return e==null?e:xg.call(e)}function I_(e,t,s){var a=e==null?0:e.length;return a?(s&&typeof s!="number"&&$e(e,t,s)?(t=0,s=a):(t=t==null?0:Z(t),s=s===i?a:Z(s)),at(e,t,s)):[]}function P_(e,t){return oi(e,t)}function k_(e,t,s){return Fs(e,t,$(s,2))}function L_(e,t){var s=e==null?0:e.length;if(s){var a=oi(e,t);if(a<s&&_t(e[a],t))return a}return-1}function N_(e,t){return oi(e,t,!0)}function D_(e,t,s){return Fs(e,t,$(s,2),!0)}function U_(e,t){var s=e==null?0:e.length;if(s){var a=oi(e,t,!0)-1;if(_t(e[a],t))return a}return-1}function F_(e){return e&&e.length?Zu(e):[]}function M_(e,t){return e&&e.length?Zu(e,$(t,2)):[]}function B_(e){var t=e==null?0:e.length;return t?at(e,1,t):[]}function W_(e,t,s){return e&&e.length?(t=s||t===i?1:Z(t),at(e,0,t<0?0:t)):[]}function $_(e,t,s){var a=e==null?0:e.length;return a?(t=s||t===i?1:Z(t),t=a-t,at(e,t<0?0:t,a)):[]}function q_(e,t){return e&&e.length?ai(e,$(t,3),!1,!0):[]}function V_(e,t){return e&&e.length?ai(e,$(t,3)):[]}var j_=X(function(e){return qt(De(e,1,Ee,!0))}),z_=X(function(e){var t=ut(e);return Ee(t)&&(t=i),qt(De(e,1,Ee,!0),$(t,2))}),H_=X(function(e){var t=ut(e);return t=typeof t=="function"?t:i,qt(De(e,1,Ee,!0),i,t)});function K_(e){return e&&e.length?qt(e):[]}function G_(e,t){return e&&e.length?qt(e,$(t,2)):[]}function J_(e,t){return t=typeof t=="function"?t:i,e&&e.length?qt(e,i,t):[]}function to(e){if(!(e&&e.length))return[];var t=0;return e=Ft(e,function(s){if(Ee(s))return t=Ie(s.length,t),!0}),bs(t,function(s){return ve(e,gs(s))})}function Uc(e,t){if(!(e&&e.length))return[];var s=to(e);return t==null?s:ve(s,function(a){return Ze(t,i,a)})}var Z_=X(function(e,t){return Ee(e)?sr(e,t):[]}),Y_=X(function(e){return Bs(Ft(e,Ee))}),X_=X(function(e){var t=ut(e);return Ee(t)&&(t=i),Bs(Ft(e,Ee),$(t,2))}),Q_=X(function(e){var t=ut(e);return t=typeof t=="function"?t:i,Bs(Ft(e,Ee),i,t)}),eb=X(to);function tb(e,t){return ec(e||[],t||[],ir)}function nb(e,t){return ec(e||[],t||[],ur)}var rb=X(function(e){var t=e.length,s=t>1?e[t-1]:i;return s=typeof s=="function"?(e.pop(),s):i,Uc(e,s)});function Fc(e){var t=f(e);return t.__chain__=!0,t}function ib(e,t){return t(e),e}function mi(e,t){return t(e)}var sb=kt(function(e){var t=e.length,s=t?e[0]:0,a=this.__wrapped__,c=function(h){return Es(h,e)};return t>1||this.__actions__.length||!(a instanceof te)||!Lt(s)?this.thru(c):(a=a.slice(s,+s+(t?1:0)),a.__actions__.push({func:mi,args:[c],thisArg:i}),new st(a,this.__chain__).thru(function(h){return t&&!h.length&&h.push(i),h}))});function ob(){return Fc(this)}function ab(){return new st(this.value(),this.__chain__)}function ub(){this.__values__===i&&(this.__values__=Yc(this.value()));var e=this.__index__>=this.__values__.length,t=e?i:this.__values__[this.__index__++];return{done:e,value:t}}function cb(){return this}function lb(e){for(var t,s=this;s instanceof ti;){var a=Ic(s);a.__index__=0,a.__values__=i,t?c.__wrapped__=a:t=a;var c=a;s=s.__wrapped__}return c.__wrapped__=e,t}function fb(){var e=this.__wrapped__;if(e instanceof te){var t=e;return this.__actions__.length&&(t=new te(this)),t=t.reverse(),t.__actions__.push({func:mi,args:[eo],thisArg:i}),new st(t,this.__chain__)}return this.thru(eo)}function hb(){return Qu(this.__wrapped__,this.__actions__)}var db=ui(function(e,t,s){fe.call(e,s)?++e[s]:It(e,s,1)});function pb(e,t,s){var a=K(e)?hu:im;return s&&$e(e,t,s)&&(t=i),a(e,$(t,3))}function gb(e,t){var s=K(e)?Ft:Uu;return s(e,$(t,3))}var mb=lc(Pc),_b=lc(kc);function bb(e,t){return De(_i(e,t),1)}function vb(e,t){return De(_i(e,t),be)}function wb(e,t,s){return s=s===i?1:Z(s),De(_i(e,t),s)}function Mc(e,t){var s=K(e)?rt:$t;return s(e,$(t,3))}function Bc(e,t){var s=K(e)?Bp:Du;return s(e,$(t,3))}var yb=ui(function(e,t,s){fe.call(e,s)?e[s].push(t):It(e,s,[t])});function xb(e,t,s,a){e=Ke(e)?e:Pn(e),s=s&&!a?Z(s):0;var c=e.length;return s<0&&(s=Ie(c+s,0)),xi(e)?s<=c&&e.indexOf(t,s)>-1:!!c&&vn(e,t,s)>-1}var Sb=X(function(e,t,s){var a=-1,c=typeof t=="function",h=Ke(e)?y(e.length):[];return $t(e,function(p){h[++a]=c?Ze(t,p,s):or(p,t,s)}),h}),Cb=ui(function(e,t,s){It(e,s,t)});function _i(e,t){var s=K(e)?ve:qu;return s(e,$(t,3))}function Tb(e,t,s,a){return e==null?[]:(K(t)||(t=t==null?[]:[t]),s=a?i:s,K(s)||(s=s==null?[]:[s]),Hu(e,t,s))}var Eb=ui(function(e,t,s){e[s?0:1].push(t)},function(){return[[],[]]});function Ab(e,t,s){var a=K(e)?ds:mu,c=arguments.length<3;return a(e,$(t,4),s,c,$t)}function Ob(e,t,s){var a=K(e)?Wp:mu,c=arguments.length<3;return a(e,$(t,4),s,c,Du)}function Rb(e,t){var s=K(e)?Ft:Uu;return s(e,wi($(t,3)))}function Ib(e){var t=K(e)?Pu:xm;return t(e)}function Pb(e,t,s){(s?$e(e,t,s):t===i)?t=1:t=Z(t);var a=K(e)?Qg:Sm;return a(e,t)}function kb(e){var t=K(e)?em:Tm;return t(e)}function Lb(e){if(e==null)return 0;if(Ke(e))return xi(e)?yn(e):e.length;var t=Be(e);return t==dt||t==pt?e.size:ks(e).length}function Nb(e,t,s){var a=K(e)?ps:Em;return s&&$e(e,t,s)&&(t=i),a(e,$(t,3))}var Db=X(function(e,t){if(e==null)return[];var s=t.length;return s>1&&$e(e,t[0],t[1])?t=[]:s>2&&$e(t[0],t[1],t[2])&&(t=[t[0]]),Hu(e,De(t,1),[])}),bi=gg||function(){return Ne.Date.now()};function Ub(e,t){if(typeof t!="function")throw new it(d);return e=Z(e),function(){if(--e<1)return t.apply(this,arguments)}}function Wc(e,t,s){return t=s?i:t,t=e&&t==null?e.length:t,Pt(e,ee,i,i,i,i,t)}function $c(e,t){var s;if(typeof t!="function")throw new it(d);return e=Z(e),function(){return--e>0&&(s=t.apply(this,arguments)),e<=1&&(t=i),s}}var no=X(function(e,t,s){var a=H;if(s.length){var c=Bt(s,Rn(no));a|=D}return Pt(e,a,t,s,c)}),qc=X(function(e,t,s){var a=H|re;if(s.length){var c=Bt(s,Rn(qc));a|=D}return Pt(t,a,e,s,c)});function Vc(e,t,s){t=s?i:t;var a=Pt(e,oe,i,i,i,i,i,t);return a.placeholder=Vc.placeholder,a}function jc(e,t,s){t=s?i:t;var a=Pt(e,ge,i,i,i,i,i,t);return a.placeholder=jc.placeholder,a}function zc(e,t,s){var a,c,h,p,g,_,T=0,E=!1,A=!1,N=!0;if(typeof e!="function")throw new it(d);t=ct(t)||0,xe(s)&&(E=!!s.leading,A="maxWait"in s,h=A?Ie(ct(s.maxWait)||0,t):h,N="trailing"in s?!!s.trailing:N);function B(Ae){var bt=a,Ut=c;return a=c=i,T=Ae,p=e.apply(Ut,bt),p}function q(Ae){return T=Ae,g=fr(Q,t),E?B(Ae):p}function Y(Ae){var bt=Ae-_,Ut=Ae-T,ll=t-bt;return A?Me(ll,h-Ut):ll}function V(Ae){var bt=Ae-_,Ut=Ae-T;return _===i||bt>=t||bt<0||A&&Ut>=h}function Q(){var Ae=bi();if(V(Ae))return ie(Ae);g=fr(Q,Y(Ae))}function ie(Ae){return g=i,N&&a?B(Ae):(a=c=i,p)}function et(){g!==i&&tc(g),T=0,a=_=c=g=i}function qe(){return g===i?p:ie(bi())}function tt(){var Ae=bi(),bt=V(Ae);if(a=arguments,c=this,_=Ae,bt){if(g===i)return q(_);if(A)return tc(g),g=fr(Q,t),B(_)}return g===i&&(g=fr(Q,t)),p}return tt.cancel=et,tt.flush=qe,tt}var Fb=X(function(e,t){return Nu(e,1,t)}),Mb=X(function(e,t,s){return Nu(e,ct(t)||0,s)});function Bb(e){return Pt(e,Pe)}function vi(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new it(d);var s=function(){var a=arguments,c=t?t.apply(this,a):a[0],h=s.cache;if(h.has(c))return h.get(c);var p=e.apply(this,a);return s.cache=h.set(c,p)||h,p};return s.cache=new(vi.Cache||Rt),s}vi.Cache=Rt;function wi(e){if(typeof e!="function")throw new it(d);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function Wb(e){return $c(2,e)}var $b=Am(function(e,t){t=t.length==1&&K(t[0])?ve(t[0],Ye($())):ve(De(t,1),Ye($()));var s=t.length;return X(function(a){for(var c=-1,h=Me(a.length,s);++c<h;)a[c]=t[c].call(this,a[c]);return Ze(e,this,a)})}),ro=X(function(e,t){var s=Bt(t,Rn(ro));return Pt(e,D,i,t,s)}),Hc=X(function(e,t){var s=Bt(t,Rn(Hc));return Pt(e,me,i,t,s)}),qb=kt(function(e,t){return Pt(e,Oe,i,i,i,t)});function Vb(e,t){if(typeof e!="function")throw new it(d);return t=t===i?t:Z(t),X(e,t)}function jb(e,t){if(typeof e!="function")throw new it(d);return t=t==null?0:Ie(Z(t),0),X(function(s){var a=s[t],c=jt(s,0,t);return a&&Mt(c,a),Ze(e,this,c)})}function zb(e,t,s){var a=!0,c=!0;if(typeof e!="function")throw new it(d);return xe(s)&&(a="leading"in s?!!s.leading:a,c="trailing"in s?!!s.trailing:c),zc(e,t,{leading:a,maxWait:t,trailing:c})}function Hb(e){return Wc(e,1)}function Kb(e,t){return ro($s(t),e)}function Gb(){if(!arguments.length)return[];var e=arguments[0];return K(e)?e:[e]}function Jb(e){return ot(e,I)}function Zb(e,t){return t=typeof t=="function"?t:i,ot(e,I,t)}function Yb(e){return ot(e,L|I)}function Xb(e,t){return t=typeof t=="function"?t:i,ot(e,L|I,t)}function Qb(e,t){return t==null||Lu(e,t,ke(t))}function _t(e,t){return e===t||e!==e&&t!==t}var ev=hi(Rs),tv=hi(function(e,t){return e>=t}),cn=Bu((function(){return arguments})())?Bu:function(e){return Ce(e)&&fe.call(e,"callee")&&!Tu.call(e,"callee")},K=y.isArray,nv=ou?Ye(ou):lm;function Ke(e){return e!=null&&yi(e.length)&&!Nt(e)}function Ee(e){return Ce(e)&&Ke(e)}function rv(e){return e===!0||e===!1||Ce(e)&&We(e)==zn}var zt=_g||go,iv=au?Ye(au):fm;function sv(e){return Ce(e)&&e.nodeType===1&&!hr(e)}function ov(e){if(e==null)return!0;if(Ke(e)&&(K(e)||typeof e=="string"||typeof e.splice=="function"||zt(e)||In(e)||cn(e)))return!e.length;var t=Be(e);if(t==dt||t==pt)return!e.size;if(lr(e))return!ks(e).length;for(var s in e)if(fe.call(e,s))return!1;return!0}function av(e,t){return ar(e,t)}function uv(e,t,s){s=typeof s=="function"?s:i;var a=s?s(e,t):i;return a===i?ar(e,t,i,s):!!a}function io(e){if(!Ce(e))return!1;var t=We(e);return t==Lr||t==Pd||typeof e.message=="string"&&typeof e.name=="string"&&!hr(e)}function cv(e){return typeof e=="number"&&Au(e)}function Nt(e){if(!xe(e))return!1;var t=We(e);return t==Nr||t==Na||t==Id||t==Ld}function Kc(e){return typeof e=="number"&&e==Z(e)}function yi(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Le}function xe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Ce(e){return e!=null&&typeof e=="object"}var Gc=uu?Ye(uu):dm;function lv(e,t){return e===t||Ps(e,t,Gs(t))}function fv(e,t,s){return s=typeof s=="function"?s:i,Ps(e,t,Gs(t),s)}function hv(e){return Jc(e)&&e!=+e}function dv(e){if(Zm(e))throw new z(l);return Wu(e)}function pv(e){return e===null}function gv(e){return e==null}function Jc(e){return typeof e=="number"||Ce(e)&&We(e)==Kn}function hr(e){if(!Ce(e)||We(e)!=At)return!1;var t=Gr(e);if(t===null)return!0;var s=fe.call(t,"constructor")&&t.constructor;return typeof s=="function"&&s instanceof s&&jr.call(s)==fg}var so=cu?Ye(cu):pm;function mv(e){return Kc(e)&&e>=-Le&&e<=Le}var Zc=lu?Ye(lu):gm;function xi(e){return typeof e=="string"||!K(e)&&Ce(e)&&We(e)==Jn}function Qe(e){return typeof e=="symbol"||Ce(e)&&We(e)==Dr}var In=fu?Ye(fu):mm;function _v(e){return e===i}function bv(e){return Ce(e)&&Be(e)==Zn}function vv(e){return Ce(e)&&We(e)==Dd}var wv=hi(Ls),yv=hi(function(e,t){return e<=t});function Yc(e){if(!e)return[];if(Ke(e))return xi(e)?gt(e):He(e);if(Qn&&e[Qn])return Qp(e[Qn]());var t=Be(e),s=t==dt?ws:t==pt?$r:Pn;return s(e)}function Dt(e){if(!e)return e===0?e:0;if(e=ct(e),e===be||e===-be){var t=e<0?-1:1;return t*jn}return e===e?e:0}function Z(e){var t=Dt(e),s=t%1;return t===t?s?t-s:t:0}function Xc(e){return e?sn(Z(e),0,ye):0}function ct(e){if(typeof e=="number")return e;if(Qe(e))return W;if(xe(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=xe(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=_u(e);var s=np.test(e);return s||ip.test(e)?Up(e.slice(2),s?2:8):tp.test(e)?W:+e}function Qc(e){return Ct(e,Ge(e))}function xv(e){return e?sn(Z(e),-Le,Le):e===0?e:0}function le(e){return e==null?"":Xe(e)}var Sv=An(function(e,t){if(lr(t)||Ke(t)){Ct(t,ke(t),e);return}for(var s in t)fe.call(t,s)&&ir(e,s,t[s])}),el=An(function(e,t){Ct(t,Ge(t),e)}),Si=An(function(e,t,s,a){Ct(t,Ge(t),e,a)}),Cv=An(function(e,t,s,a){Ct(t,ke(t),e,a)}),Tv=kt(Es);function Ev(e,t){var s=En(e);return t==null?s:ku(s,t)}var Av=X(function(e,t){e=he(e);var s=-1,a=t.length,c=a>2?t[2]:i;for(c&&$e(t[0],t[1],c)&&(a=1);++s<a;)for(var h=t[s],p=Ge(h),g=-1,_=p.length;++g<_;){var T=p[g],E=e[T];(E===i||_t(E,Sn[T])&&!fe.call(e,T))&&(e[T]=h[T])}return e}),Ov=X(function(e){return e.push(i,_c),Ze(tl,i,e)});function Rv(e,t){return du(e,$(t,3),St)}function Iv(e,t){return du(e,$(t,3),Os)}function Pv(e,t){return e==null?e:As(e,$(t,3),Ge)}function kv(e,t){return e==null?e:Fu(e,$(t,3),Ge)}function Lv(e,t){return e&&St(e,$(t,3))}function Nv(e,t){return e&&Os(e,$(t,3))}function Dv(e){return e==null?[]:ii(e,ke(e))}function Uv(e){return e==null?[]:ii(e,Ge(e))}function oo(e,t,s){var a=e==null?i:on(e,t);return a===i?s:a}function Fv(e,t){return e!=null&&wc(e,t,om)}function ao(e,t){return e!=null&&wc(e,t,am)}var Mv=hc(function(e,t,s){t!=null&&typeof t.toString!="function"&&(t=zr.call(t)),e[t]=s},co(Je)),Bv=hc(function(e,t,s){t!=null&&typeof t.toString!="function"&&(t=zr.call(t)),fe.call(e,t)?e[t].push(s):e[t]=[s]},$),Wv=X(or);function ke(e){return Ke(e)?Iu(e):ks(e)}function Ge(e){return Ke(e)?Iu(e,!0):_m(e)}function $v(e,t){var s={};return t=$(t,3),St(e,function(a,c,h){It(s,t(a,c,h),a)}),s}function qv(e,t){var s={};return t=$(t,3),St(e,function(a,c,h){It(s,c,t(a,c,h))}),s}var Vv=An(function(e,t,s){si(e,t,s)}),tl=An(function(e,t,s,a){si(e,t,s,a)}),jv=kt(function(e,t){var s={};if(e==null)return s;var a=!1;t=ve(t,function(h){return h=Vt(h,e),a||(a=h.length>1),h}),Ct(e,Hs(e),s),a&&(s=ot(s,L|M|I,Mm));for(var c=t.length;c--;)Ms(s,t[c]);return s});function zv(e,t){return nl(e,wi($(t)))}var Hv=kt(function(e,t){return e==null?{}:vm(e,t)});function nl(e,t){if(e==null)return{};var s=ve(Hs(e),function(a){return[a]});return t=$(t),Ku(e,s,function(a,c){return t(a,c[0])})}function Kv(e,t,s){t=Vt(t,e);var a=-1,c=t.length;for(c||(c=1,e=i);++a<c;){var h=e==null?i:e[Tt(t[a])];h===i&&(a=c,h=s),e=Nt(h)?h.call(e):h}return e}function Gv(e,t,s){return e==null?e:ur(e,t,s)}function Jv(e,t,s,a){return a=typeof a=="function"?a:i,e==null?e:ur(e,t,s,a)}var rl=gc(ke),il=gc(Ge);function Zv(e,t,s){var a=K(e),c=a||zt(e)||In(e);if(t=$(t,4),s==null){var h=e&&e.constructor;c?s=a?new h:[]:xe(e)?s=Nt(h)?En(Gr(e)):{}:s={}}return(c?rt:St)(e,function(p,g,_){return t(s,p,g,_)}),s}function Yv(e,t){return e==null?!0:Ms(e,t)}function Xv(e,t,s){return e==null?e:Xu(e,t,$s(s))}function Qv(e,t,s,a){return a=typeof a=="function"?a:i,e==null?e:Xu(e,t,$s(s),a)}function Pn(e){return e==null?[]:vs(e,ke(e))}function e0(e){return e==null?[]:vs(e,Ge(e))}function t0(e,t,s){return s===i&&(s=t,t=i),s!==i&&(s=ct(s),s=s===s?s:0),t!==i&&(t=ct(t),t=t===t?t:0),sn(ct(e),t,s)}function n0(e,t,s){return t=Dt(t),s===i?(s=t,t=0):s=Dt(s),e=ct(e),um(e,t,s)}function r0(e,t,s){if(s&&typeof s!="boolean"&&$e(e,t,s)&&(t=s=i),s===i&&(typeof t=="boolean"?(s=t,t=i):typeof e=="boolean"&&(s=e,e=i)),e===i&&t===i?(e=0,t=1):(e=Dt(e),t===i?(t=e,e=0):t=Dt(t)),e>t){var a=e;e=t,t=a}if(s||e%1||t%1){var c=Ou();return Me(e+c*(t-e+Dp("1e-"+((c+"").length-1))),t)}return Ds(e,t)}var i0=On(function(e,t,s){return t=t.toLowerCase(),e+(s?sl(t):t)});function sl(e){return uo(le(e).toLowerCase())}function ol(e){return e=le(e),e&&e.replace(op,Gp).replace(Tp,"")}function s0(e,t,s){e=le(e),t=Xe(t);var a=e.length;s=s===i?a:sn(Z(s),0,a);var c=s;return s-=t.length,s>=0&&e.slice(s,c)==t}function o0(e){return e=le(e),e&&Wd.test(e)?e.replace(Fa,Jp):e}function a0(e){return e=le(e),e&&Hd.test(e)?e.replace(rs,"\\$&"):e}var u0=On(function(e,t,s){return e+(s?"-":"")+t.toLowerCase()}),c0=On(function(e,t,s){return e+(s?" ":"")+t.toLowerCase()}),l0=cc("toLowerCase");function f0(e,t,s){e=le(e),t=Z(t);var a=t?yn(e):0;if(!t||a>=t)return e;var c=(t-a)/2;return fi(Xr(c),s)+e+fi(Yr(c),s)}function h0(e,t,s){e=le(e),t=Z(t);var a=t?yn(e):0;return t&&a<t?e+fi(t-a,s):e}function d0(e,t,s){e=le(e),t=Z(t);var a=t?yn(e):0;return t&&a<t?fi(t-a,s)+e:e}function p0(e,t,s){return s||t==null?t=0:t&&(t=+t),yg(le(e).replace(is,""),t||0)}function g0(e,t,s){return(s?$e(e,t,s):t===i)?t=1:t=Z(t),Us(le(e),t)}function m0(){var e=arguments,t=le(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var _0=On(function(e,t,s){return e+(s?"_":"")+t.toLowerCase()});function b0(e,t,s){return s&&typeof s!="number"&&$e(e,t,s)&&(t=s=i),s=s===i?ye:s>>>0,s?(e=le(e),e&&(typeof t=="string"||t!=null&&!so(t))&&(t=Xe(t),!t&&wn(e))?jt(gt(e),0,s):e.split(t,s)):[]}var v0=On(function(e,t,s){return e+(s?" ":"")+uo(t)});function w0(e,t,s){return e=le(e),s=s==null?0:sn(Z(s),0,e.length),t=Xe(t),e.slice(s,s+t.length)==t}function y0(e,t,s){var a=f.templateSettings;s&&$e(e,t,s)&&(t=i),e=le(e),t=Si({},t,a,mc);var c=Si({},t.imports,a.imports,mc),h=ke(c),p=vs(c,h),g,_,T=0,E=t.interpolate||Ur,A="__p += '",N=ys((t.escape||Ur).source+"|"+E.source+"|"+(E===Ma?ep:Ur).source+"|"+(t.evaluate||Ur).source+"|$","g"),B="//# sourceURL="+(fe.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ip+"]")+`
|
18
|
+
`;e.replace(N,function(V,Q,ie,et,qe,tt){return ie||(ie=et),A+=e.slice(T,tt).replace(ap,Zp),Q&&(g=!0,A+=`' +
|
19
|
+
__e(`+Q+`) +
|
20
|
+
'`),qe&&(_=!0,A+=`';
|
21
|
+
`+qe+`;
|
22
|
+
__p += '`),ie&&(A+=`' +
|
23
|
+
((__t = (`+ie+`)) == null ? '' : __t) +
|
24
|
+
'`),T=tt+V.length,V}),A+=`';
|
25
|
+
`;var q=fe.call(t,"variable")&&t.variable;if(!q)A=`with (obj) {
|
26
|
+
`+A+`
|
27
|
+
}
|
28
|
+
`;else if(Xd.test(q))throw new z(b);A=(_?A.replace(Ud,""):A).replace(Fd,"$1").replace(Md,"$1;"),A="function("+(q||"obj")+`) {
|
29
|
+
`+(q?"":`obj || (obj = {});
|
30
|
+
`)+"var __t, __p = ''"+(g?", __e = _.escape":"")+(_?`, __j = Array.prototype.join;
|
31
|
+
function print() { __p += __j.call(arguments, '') }
|
32
|
+
`:`;
|
33
|
+
`)+A+`return __p
|
34
|
+
}`;var Y=ul(function(){return ce(h,B+"return "+A).apply(i,p)});if(Y.source=A,io(Y))throw Y;return Y}function x0(e){return le(e).toLowerCase()}function S0(e){return le(e).toUpperCase()}function C0(e,t,s){if(e=le(e),e&&(s||t===i))return _u(e);if(!e||!(t=Xe(t)))return e;var a=gt(e),c=gt(t),h=bu(a,c),p=vu(a,c)+1;return jt(a,h,p).join("")}function T0(e,t,s){if(e=le(e),e&&(s||t===i))return e.slice(0,yu(e)+1);if(!e||!(t=Xe(t)))return e;var a=gt(e),c=vu(a,gt(t))+1;return jt(a,0,c).join("")}function E0(e,t,s){if(e=le(e),e&&(s||t===i))return e.replace(is,"");if(!e||!(t=Xe(t)))return e;var a=gt(e),c=bu(a,gt(t));return jt(a,c).join("")}function A0(e,t){var s=xt,a=Se;if(xe(t)){var c="separator"in t?t.separator:c;s="length"in t?Z(t.length):s,a="omission"in t?Xe(t.omission):a}e=le(e);var h=e.length;if(wn(e)){var p=gt(e);h=p.length}if(s>=h)return e;var g=s-yn(a);if(g<1)return a;var _=p?jt(p,0,g).join(""):e.slice(0,g);if(c===i)return _+a;if(p&&(g+=_.length-g),so(c)){if(e.slice(g).search(c)){var T,E=_;for(c.global||(c=ys(c.source,le(Ba.exec(c))+"g")),c.lastIndex=0;T=c.exec(E);)var A=T.index;_=_.slice(0,A===i?g:A)}}else if(e.indexOf(Xe(c),g)!=g){var N=_.lastIndexOf(c);N>-1&&(_=_.slice(0,N))}return _+a}function O0(e){return e=le(e),e&&Bd.test(e)?e.replace(Ua,rg):e}var R0=On(function(e,t,s){return e+(s?" ":"")+t.toUpperCase()}),uo=cc("toUpperCase");function al(e,t,s){return e=le(e),t=s?i:t,t===i?Xp(e)?og(e):Vp(e):e.match(t)||[]}var ul=X(function(e,t){try{return Ze(e,i,t)}catch(s){return io(s)?s:new z(s)}}),I0=kt(function(e,t){return rt(t,function(s){s=Tt(s),It(e,s,no(e[s],e))}),e});function P0(e){var t=e==null?0:e.length,s=$();return e=t?ve(e,function(a){if(typeof a[1]!="function")throw new it(d);return[s(a[0]),a[1]]}):[],X(function(a){for(var c=-1;++c<t;){var h=e[c];if(Ze(h[0],this,a))return Ze(h[1],this,a)}})}function k0(e){return rm(ot(e,L))}function co(e){return function(){return e}}function L0(e,t){return e==null||e!==e?t:e}var N0=fc(),D0=fc(!0);function Je(e){return e}function lo(e){return $u(typeof e=="function"?e:ot(e,L))}function U0(e){return Vu(ot(e,L))}function F0(e,t){return ju(e,ot(t,L))}var M0=X(function(e,t){return function(s){return or(s,e,t)}}),B0=X(function(e,t){return function(s){return or(e,s,t)}});function fo(e,t,s){var a=ke(t),c=ii(t,a);s==null&&!(xe(t)&&(c.length||!a.length))&&(s=t,t=e,e=this,c=ii(t,ke(t)));var h=!(xe(s)&&"chain"in s)||!!s.chain,p=Nt(e);return rt(c,function(g){var _=t[g];e[g]=_,p&&(e.prototype[g]=function(){var T=this.__chain__;if(h||T){var E=e(this.__wrapped__),A=E.__actions__=He(this.__actions__);return A.push({func:_,args:arguments,thisArg:e}),E.__chain__=T,E}return _.apply(e,Mt([this.value()],arguments))})}),e}function W0(){return Ne._===this&&(Ne._=hg),this}function ho(){}function $0(e){return e=Z(e),X(function(t){return zu(t,e)})}var q0=Vs(ve),V0=Vs(hu),j0=Vs(ps);function cl(e){return Zs(e)?gs(Tt(e)):wm(e)}function z0(e){return function(t){return e==null?i:on(e,t)}}var H0=dc(),K0=dc(!0);function po(){return[]}function go(){return!1}function G0(){return{}}function J0(){return""}function Z0(){return!0}function Y0(e,t){if(e=Z(e),e<1||e>Le)return[];var s=ye,a=Me(e,ye);t=$(t),e-=ye;for(var c=bs(a,t);++s<e;)t(s);return c}function X0(e){return K(e)?ve(e,Tt):Qe(e)?[e]:He(Rc(le(e)))}function Q0(e){var t=++lg;return le(e)+t}var ew=li(function(e,t){return e+t},0),tw=js("ceil"),nw=li(function(e,t){return e/t},1),rw=js("floor");function iw(e){return e&&e.length?ri(e,Je,Rs):i}function sw(e,t){return e&&e.length?ri(e,$(t,2),Rs):i}function ow(e){return gu(e,Je)}function aw(e,t){return gu(e,$(t,2))}function uw(e){return e&&e.length?ri(e,Je,Ls):i}function cw(e,t){return e&&e.length?ri(e,$(t,2),Ls):i}var lw=li(function(e,t){return e*t},1),fw=js("round"),hw=li(function(e,t){return e-t},0);function dw(e){return e&&e.length?_s(e,Je):0}function pw(e,t){return e&&e.length?_s(e,$(t,2)):0}return f.after=Ub,f.ary=Wc,f.assign=Sv,f.assignIn=el,f.assignInWith=Si,f.assignWith=Cv,f.at=Tv,f.before=$c,f.bind=no,f.bindAll=I0,f.bindKey=qc,f.castArray=Gb,f.chain=Fc,f.chunk=r_,f.compact=i_,f.concat=s_,f.cond=P0,f.conforms=k0,f.constant=co,f.countBy=db,f.create=Ev,f.curry=Vc,f.curryRight=jc,f.debounce=zc,f.defaults=Av,f.defaultsDeep=Ov,f.defer=Fb,f.delay=Mb,f.difference=o_,f.differenceBy=a_,f.differenceWith=u_,f.drop=c_,f.dropRight=l_,f.dropRightWhile=f_,f.dropWhile=h_,f.fill=d_,f.filter=gb,f.flatMap=bb,f.flatMapDeep=vb,f.flatMapDepth=wb,f.flatten=Lc,f.flattenDeep=p_,f.flattenDepth=g_,f.flip=Bb,f.flow=N0,f.flowRight=D0,f.fromPairs=m_,f.functions=Dv,f.functionsIn=Uv,f.groupBy=yb,f.initial=b_,f.intersection=v_,f.intersectionBy=w_,f.intersectionWith=y_,f.invert=Mv,f.invertBy=Bv,f.invokeMap=Sb,f.iteratee=lo,f.keyBy=Cb,f.keys=ke,f.keysIn=Ge,f.map=_i,f.mapKeys=$v,f.mapValues=qv,f.matches=U0,f.matchesProperty=F0,f.memoize=vi,f.merge=Vv,f.mergeWith=tl,f.method=M0,f.methodOf=B0,f.mixin=fo,f.negate=wi,f.nthArg=$0,f.omit=jv,f.omitBy=zv,f.once=Wb,f.orderBy=Tb,f.over=q0,f.overArgs=$b,f.overEvery=V0,f.overSome=j0,f.partial=ro,f.partialRight=Hc,f.partition=Eb,f.pick=Hv,f.pickBy=nl,f.property=cl,f.propertyOf=z0,f.pull=T_,f.pullAll=Dc,f.pullAllBy=E_,f.pullAllWith=A_,f.pullAt=O_,f.range=H0,f.rangeRight=K0,f.rearg=qb,f.reject=Rb,f.remove=R_,f.rest=Vb,f.reverse=eo,f.sampleSize=Pb,f.set=Gv,f.setWith=Jv,f.shuffle=kb,f.slice=I_,f.sortBy=Db,f.sortedUniq=F_,f.sortedUniqBy=M_,f.split=b0,f.spread=jb,f.tail=B_,f.take=W_,f.takeRight=$_,f.takeRightWhile=q_,f.takeWhile=V_,f.tap=ib,f.throttle=zb,f.thru=mi,f.toArray=Yc,f.toPairs=rl,f.toPairsIn=il,f.toPath=X0,f.toPlainObject=Qc,f.transform=Zv,f.unary=Hb,f.union=j_,f.unionBy=z_,f.unionWith=H_,f.uniq=K_,f.uniqBy=G_,f.uniqWith=J_,f.unset=Yv,f.unzip=to,f.unzipWith=Uc,f.update=Xv,f.updateWith=Qv,f.values=Pn,f.valuesIn=e0,f.without=Z_,f.words=al,f.wrap=Kb,f.xor=Y_,f.xorBy=X_,f.xorWith=Q_,f.zip=eb,f.zipObject=tb,f.zipObjectDeep=nb,f.zipWith=rb,f.entries=rl,f.entriesIn=il,f.extend=el,f.extendWith=Si,fo(f,f),f.add=ew,f.attempt=ul,f.camelCase=i0,f.capitalize=sl,f.ceil=tw,f.clamp=t0,f.clone=Jb,f.cloneDeep=Yb,f.cloneDeepWith=Xb,f.cloneWith=Zb,f.conformsTo=Qb,f.deburr=ol,f.defaultTo=L0,f.divide=nw,f.endsWith=s0,f.eq=_t,f.escape=o0,f.escapeRegExp=a0,f.every=pb,f.find=mb,f.findIndex=Pc,f.findKey=Rv,f.findLast=_b,f.findLastIndex=kc,f.findLastKey=Iv,f.floor=rw,f.forEach=Mc,f.forEachRight=Bc,f.forIn=Pv,f.forInRight=kv,f.forOwn=Lv,f.forOwnRight=Nv,f.get=oo,f.gt=ev,f.gte=tv,f.has=Fv,f.hasIn=ao,f.head=Nc,f.identity=Je,f.includes=xb,f.indexOf=__,f.inRange=n0,f.invoke=Wv,f.isArguments=cn,f.isArray=K,f.isArrayBuffer=nv,f.isArrayLike=Ke,f.isArrayLikeObject=Ee,f.isBoolean=rv,f.isBuffer=zt,f.isDate=iv,f.isElement=sv,f.isEmpty=ov,f.isEqual=av,f.isEqualWith=uv,f.isError=io,f.isFinite=cv,f.isFunction=Nt,f.isInteger=Kc,f.isLength=yi,f.isMap=Gc,f.isMatch=lv,f.isMatchWith=fv,f.isNaN=hv,f.isNative=dv,f.isNil=gv,f.isNull=pv,f.isNumber=Jc,f.isObject=xe,f.isObjectLike=Ce,f.isPlainObject=hr,f.isRegExp=so,f.isSafeInteger=mv,f.isSet=Zc,f.isString=xi,f.isSymbol=Qe,f.isTypedArray=In,f.isUndefined=_v,f.isWeakMap=bv,f.isWeakSet=vv,f.join=x_,f.kebabCase=u0,f.last=ut,f.lastIndexOf=S_,f.lowerCase=c0,f.lowerFirst=l0,f.lt=wv,f.lte=yv,f.max=iw,f.maxBy=sw,f.mean=ow,f.meanBy=aw,f.min=uw,f.minBy=cw,f.stubArray=po,f.stubFalse=go,f.stubObject=G0,f.stubString=J0,f.stubTrue=Z0,f.multiply=lw,f.nth=C_,f.noConflict=W0,f.noop=ho,f.now=bi,f.pad=f0,f.padEnd=h0,f.padStart=d0,f.parseInt=p0,f.random=r0,f.reduce=Ab,f.reduceRight=Ob,f.repeat=g0,f.replace=m0,f.result=Kv,f.round=fw,f.runInContext=m,f.sample=Ib,f.size=Lb,f.snakeCase=_0,f.some=Nb,f.sortedIndex=P_,f.sortedIndexBy=k_,f.sortedIndexOf=L_,f.sortedLastIndex=N_,f.sortedLastIndexBy=D_,f.sortedLastIndexOf=U_,f.startCase=v0,f.startsWith=w0,f.subtract=hw,f.sum=dw,f.sumBy=pw,f.template=y0,f.times=Y0,f.toFinite=Dt,f.toInteger=Z,f.toLength=Xc,f.toLower=x0,f.toNumber=ct,f.toSafeInteger=xv,f.toString=le,f.toUpper=S0,f.trim=C0,f.trimEnd=T0,f.trimStart=E0,f.truncate=A0,f.unescape=O0,f.uniqueId=Q0,f.upperCase=R0,f.upperFirst=uo,f.each=Mc,f.eachRight=Bc,f.first=Nc,fo(f,(function(){var e={};return St(f,function(t,s){fe.call(f.prototype,s)||(e[s]=t)}),e})(),{chain:!1}),f.VERSION=o,rt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){f[e].placeholder=f}),rt(["drop","take"],function(e,t){te.prototype[e]=function(s){s=s===i?1:Ie(Z(s),0);var a=this.__filtered__&&!t?new te(this):this.clone();return a.__filtered__?a.__takeCount__=Me(s,a.__takeCount__):a.__views__.push({size:Me(s,ye),type:e+(a.__dir__<0?"Right":"")}),a},te.prototype[e+"Right"]=function(s){return this.reverse()[e](s).reverse()}}),rt(["filter","map","takeWhile"],function(e,t){var s=t+1,a=s==j||s==ze;te.prototype[e]=function(c){var h=this.clone();return h.__iteratees__.push({iteratee:$(c,3),type:s}),h.__filtered__=h.__filtered__||a,h}}),rt(["head","last"],function(e,t){var s="take"+(t?"Right":"");te.prototype[e]=function(){return this[s](1).value()[0]}}),rt(["initial","tail"],function(e,t){var s="drop"+(t?"":"Right");te.prototype[e]=function(){return this.__filtered__?new te(this):this[s](1)}}),te.prototype.compact=function(){return this.filter(Je)},te.prototype.find=function(e){return this.filter(e).head()},te.prototype.findLast=function(e){return this.reverse().find(e)},te.prototype.invokeMap=X(function(e,t){return typeof e=="function"?new te(this):this.map(function(s){return or(s,e,t)})}),te.prototype.reject=function(e){return this.filter(wi($(e)))},te.prototype.slice=function(e,t){e=Z(e);var s=this;return s.__filtered__&&(e>0||t<0)?new te(s):(e<0?s=s.takeRight(-e):e&&(s=s.drop(e)),t!==i&&(t=Z(t),s=t<0?s.dropRight(-t):s.take(t-e)),s)},te.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},te.prototype.toArray=function(){return this.take(ye)},St(te.prototype,function(e,t){var s=/^(?:filter|find|map|reject)|While$/.test(t),a=/^(?:head|last)$/.test(t),c=f[a?"take"+(t=="last"?"Right":""):t],h=a||/^find/.test(t);c&&(f.prototype[t]=function(){var p=this.__wrapped__,g=a?[1]:arguments,_=p instanceof te,T=g[0],E=_||K(p),A=function(Q){var ie=c.apply(f,Mt([Q],g));return a&&N?ie[0]:ie};E&&s&&typeof T=="function"&&T.length!=1&&(_=E=!1);var N=this.__chain__,B=!!this.__actions__.length,q=h&&!N,Y=_&&!B;if(!h&&E){p=Y?p:new te(this);var V=e.apply(p,g);return V.__actions__.push({func:mi,args:[A],thisArg:i}),new st(V,N)}return q&&Y?e.apply(this,g):(V=this.thru(A),q?a?V.value()[0]:V.value():V)})}),rt(["pop","push","shift","sort","splice","unshift"],function(e){var t=qr[e],s=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",a=/^(?:pop|shift)$/.test(e);f.prototype[e]=function(){var c=arguments;if(a&&!this.__chain__){var h=this.value();return t.apply(K(h)?h:[],c)}return this[s](function(p){return t.apply(K(p)?p:[],c)})}}),St(te.prototype,function(e,t){var s=f[t];if(s){var a=s.name+"";fe.call(Tn,a)||(Tn[a]=[]),Tn[a].push({name:t,func:s})}}),Tn[ci(i,re).name]=[{name:"wrapper",func:i}],te.prototype.clone=Og,te.prototype.reverse=Rg,te.prototype.value=Ig,f.prototype.at=sb,f.prototype.chain=ob,f.prototype.commit=ab,f.prototype.next=ub,f.prototype.plant=lb,f.prototype.reverse=fb,f.prototype.toJSON=f.prototype.valueOf=f.prototype.value=hb,f.prototype.first=f.prototype.head,Qn&&(f.prototype[Qn]=cb),f}),xn=ag();en?((en.exports=xn)._=xn,ls._=xn):Ne._=xn}).call(pd)})(Vn,Vn.exports)),Vn.exports}var md=gd();const _d=dd(md),bd={components:{DataViewerHistoryComponent:dr},mixins:[kn],watch:{latestData:function(r){this.$refs.history.receive(r)}},methods:{calculatePacketText:function(r){let n="";if(this.currentConfig.showTimestamp){const i=r.__time/1e6,o=(i/1e3).toFixed(7),u=new Date(i).toISOString();let l=`********************************************
|
35
|
+
`;l+=`* Received seconds: ${o}
|
36
|
+
`,l+=`* Received time: ${u}
|
37
|
+
`,l+=`********************************************
|
38
|
+
`,n=`${l}${n}`}return"buffer"in r?n+=_d.chunk([...r.buffer],this.currentConfig.bytesPerLine).map((i,o)=>{let u=i.map(b=>b.charCodeAt(0).toString(16).padStart(2,"0")),l=this.currentConfig.bytesPerLine*3-1,d=u.join(" ").padEnd(l," ");return this.currentConfig.showAscii&&(d+=" ",u=i.map(b=>b.replaceAll(/\n/g,"\\n").replaceAll(/\r/g,"\\r")),d+=u.join("")),this.currentConfig.showLineAddress&&(d=`${(o*this.currentConfig.bytesPerLine).toString(16).padStart(8,"0")}: ${d}`),d}).join(`
|
39
|
+
`):n+=Object.keys(r).filter(i=>i.slice(0,2)!="__").map(i=>`${i}: ${r[i]}`).join(`
|
40
|
+
`),n}}};function vd(r,n,i,o,u,l){const d=F("data-viewer-history-component");return J(),ue(d,{ref:"history",config:r.currentConfig,packets:r.currentPackets,"calculate-packet-text":l.calculatePacketText,onConfig:n[0]||(n[0]=b=>r.currentConfig=b)},null,8,["config","packets","calculate-packet-text"])}const wd=Ht(bd,[["render",vd]]),yd={components:{DataViewerHistoryComponent:dr},mixins:[kn],watch:{latestData:function(r){this.$refs.history.receive(r)}},created:function(){const r={history:300,showTimestamp:!0,packetsToShow:10,newestAtTop:!0};this.currentConfig={...r,...this.currentConfig}},methods:{calculatePacketText:function(r){return Object.keys(r).filter(n=>n.includes("DECOM__TLM")).flatMap(n=>{const i=r[n];return Array.isArray(i)?i.join(`
|
41
|
+
`):`${i}`}).join(`
|
42
|
+
`)}}};function xd(r,n,i,o,u,l){const d=F("data-viewer-history-component");return J(),ue(d,{ref:"history",config:r.currentConfig,packets:r.currentPackets,"calculate-packet-text":l.calculatePacketText,onConfig:n[0]||(n[0]=b=>r.currentConfig=b)},null,8,["config","packets","calculate-packet-text"])}const Sd=Ht(yd,[["render",xd]]),Cd={components:{DataViewerHistoryComponent:dr},mixins:[kn],watch:{latestData:function(r){this.$refs.history.receive(r)}},created:function(){const r={history:300,showTimestamp:!0,packetsToShow:10,newestAtTop:!0};this.currentConfig={...r,...this.currentConfig}},methods:{calculatePacketText:function(r){let n="";if(this.currentConfig.showTimestamp){const i=r.__time/1e6;n=`Time: ${new Date(i).toISOString()} `}return n+=Object.keys(r).map(i=>{if(i.includes("DECOM__TLM"))return`${i.split("__")[4]}: ${r[i]}`}).filter(i=>i!==void 0).join(" "),n}}};function Td(r,n,i,o,u,l){const d=F("data-viewer-history-component");return J(),ue(d,{ref:"history",config:r.currentConfig,packets:r.currentPackets,"calculate-packet-text":l.calculatePacketText,onConfig:n[0]||(n[0]=b=>r.currentConfig=b)},null,8,["config","packets","calculate-packet-text"])}const Ed={components:{AddComponentDialog:cd,OpenConfigDialog:wo,SaveConfigDialog:vo,DynamicComponent:hd,DumpComponent:wd,EventMessageComponent:Sd,ValueComponent:Ht(Cd,[["render",Td]]),TopBar:ml},mixins:[_o,bo],data(){return{title:"Data Viewer",configKey:"data_viewer",api:null,timeZone:"local",components:[{label:"COSMOS Packet Raw/Decom",value:"DumpComponent",items:!1},{label:"COSMOS Item Value",value:"ValueComponent",items:!0},{label:"COSMOS Event Message",value:"EventMessageComponent",items:!0,array:!0}],counter:0,panel:0,componentType:null,componentName:null,openConfig:!1,saveConfig:!1,cable:new Th,subscription:null,startDate:null,startTime:null,endDate:null,endTime:null,rules:{required:r=>!!r||"Required"},autoStart:!1,canStart:!1,running:!1,curTab:null,receivedPackets:{},menus:[{label:"File",items:[{label:"Open Configuration",icon:"mdi-folder-open",command:()=>{this.openConfig=!0}},{label:"Save Configuration",icon:"mdi-content-save",command:()=>{this.saveConfig=!0}},{label:"Reset Configuration",icon:"mdi-monitor-shimmer",command:()=>{this.resetConfig(),this.resetConfigBase()}}]}],warning:!1,warningText:"",error:!1,errorText:"",connectionFailure:!1,config:{tabs:[]},tabNameDialog:!1,newTabName:"",showTabMenu:!1,tabMenuX:0,tabMenuY:0,showAddComponentDialog:!1}},computed:{startEndTime:function(){let r=null,n=null;try{this.timeZone==="local"?(r=new Date(this.startDate+" "+this.startTime),this.endDate!==null&&this.endTime!==null&&(n=new Date(this.endDate+" "+this.endTime))):(r=new Date(this.startDate+" "+this.startTime+"Z"),this.endDate!==null&&this.endTime!==null&&(n=new Date(this.endDate+" "+this.endTime+"Z")))}catch{return}return{start_time:r.getTime()*1e6,end_time:n?n.getTime()*1e6:null}},allPackets:function(){return this.config.tabs.flatMap(r=>r.packets)}},watch:{canStart:function(r,n){r===!0&&this.autoStart&&this.start()},config:{handler:function(){this.saveDefaultConfig(this.config)},deep:!0}},async created(){this.api=new od,await this.api.get_setting("time_zone").then(n=>{n&&(this.timeZone=n)}).catch(n=>{});let r=new Date;this.startDate=this.formatDate(r,this.timeZone),this.startTime=this.formatTimeHMS(r,this.timeZone),pa.get("/openc3-api/widgets").then(n=>{n.data.forEach(i=>{const o=i.match(/DATAVIEWER([A-Z]+)/);o&&pa.get(`/openc3-api/widgets/${i}`).then(u=>{let l=u.data.label,d=u.data.items;l===null&&(l=u.data.name.slice(10),l=l.charAt(0)+l.slice(1).toLowerCase()),this.components.push({label:l,value:o[0],items:d})})})}),this.subscribe()},mounted:function(){if(this.$route.query&&this.$route.query.config)this.autoStart=!0,this.openConfiguration(this.$route.query.config,!0);else{let r=this.loadDefaultConfig();JSON.stringify(r)!=="{}"&&(this.autoStart=!0,this.config=r)}},unmounted:function(){this.subscription&&this.subscription.unsubscribe(),this.cable.disconnect()},methods:{packetTitle:function(r){return r.itemName!==void 0?`${r.targetName} ${r.packetName} ${r.itemName}`:`${r.targetName} ${r.packetName} [ ${r.mode} ]`},start:function(){if(this.autoStart=!1,this.startEndTime.start_time>new Date().getTime()*1e6){this.warningText="Start date/time is in the future!",this.warning=!0;return}if(this.startEndTime.start_time===this.startEndTime.end_time){this.warningText="Start date/time is equal to end date/time!",this.warning=!0;return}this.startEndTime.end_time&&this.startEndTime.end_time>new Date().getTime()*1e6&&(this.warningText="Note: End date/time is greater than current date/time. Data will continue to stream in real-time until "+this.endDate+" "+this.endTime+" is reached.",this.warning=!0),this.running=!0,this.addToSubscription()},stop:function(){this.running=!1,this.removeFromSubscription()},subscribe:function(){this.cable.createSubscription("StreamingChannel",window.openc3Scope,{received:r=>this.received(r),connected:()=>{this.canStart=!0,this.connectionFailure=!1},disconnected:r=>{r.allowReconnect&&(this.stop(),this.canStart=!1,this.warningText="OpenC3 backend connection disconnected.",this.warning=!0,this.connectionFailure=!0)},rejected:()=>{this.warningText="OpenC3 backend connection rejected.",this.warning=!0}}).then(r=>{this.subscription=r,this.running&&this.addToSubscription()})},addToSubscription:function(r){r=r||this.allPackets;let n=[],i=[];if(r.forEach(o=>{o.itemName!==void 0?n.push(o):i.push(o)}),n.length>0&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(o=>{o&&OpenC3Auth.setTokens(),this.subscription.perform("add",{scope:window.openc3Scope,token:localStorage.openc3Token,items:n.map(this.itemSubscriptionKey),...this.startEndTime})}),i.length>0){const o=i.reduce((u,l)=>(u[l.mode]?u[l.mode].push(l):u[l.mode]=[l],u),{});Object.keys(o).forEach(u=>{o[u]=[...new Set(o[u])]}),OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(u=>{u&&OpenC3Auth.setTokens(),Object.keys(o).forEach(l=>{this.subscription.perform("add",{scope:window.openc3Scope,token:localStorage.openc3Token,packets:o[l].map(this.subscriptionKey),...this.startEndTime})})})}},removeFromSubscription:function(r){r=r||this.allPackets;let n=[],i=[];r.forEach(o=>{o.itemName!==void 0?n.push(o):i.push(o)}),n.length>0&&this.subscription.perform("remove",{scope:window.openc3Scope,token:localStorage.openc3Token,items:n.map(this.itemSubscriptionKey)}),i.length>0&&this.subscription.perform("remove",{scope:window.openc3Scope,token:localStorage.openc3Token,packets:i.map(this.subscriptionKey)})},received:function(r){if(this.cable.recordPing(),r.error){this.errorText=r.error,this.error=!0;return}if(r.length)if(r[0].__type==="ITEMS")this.config.tabs.forEach((n,i)=>{if(!n.items)return;let o=n.packets.map(l=>this.itemKey(l)),u=r.map(l=>{let d={};d.__type=l.__type,d.__time=l.__time;let b=!1;if(o.forEach(v=>{l[v]&&(b=!0,d[v]=l[v])}),b)return d}).filter(Boolean);u&&typeof this.$refs[n.ref][0].receive=="function"&&this.$refs[n.ref][0].receive(u)});else{const n=r.reduce((i,o)=>(i[o.__packet]?i[o.__packet].push(o):i[o.__packet]=[o],i),{});this.config.tabs.forEach((i,o)=>{i.items||i.packets.forEach(u=>{let l=this.packetKey(u);this.receivedPackets[l]=!0,n[l]&&typeof this.$refs[i.ref][0].receive=="function"&&this.$refs[i.ref][0].receive(n[l])})}),this.receivedPackets={...this.receivedPackets}}},packetKey:function(r){let n=r.mode+"__";return r.cmdOrTlm==="TLM"?n+="TLM":n+="CMD",n+=`__${r.targetName}__${r.packetName}`,r.mode==="DECOM"&&(n+=`__${r.valueType}`),n},itemKey:function(r){let n=r.mode+"__";return r.cmdOrTlm==="TLM"?n+="TLM":n+="CMD",n+=`__${r.targetName}__${r.packetName}__${r.itemName}`,r.mode==="DECOM"&&(n+=`__${r.valueType}`),n},subscriptionKey:function(r){const n=r.cmdOrTlm.toUpperCase();let i=`${r.mode}__${n}__${r.targetName}__${r.packetName}`;return r.mode==="DECOM"&&(i+=`__${r.valueType}`),i},itemSubscriptionKey:function(r){return`DECOM__TLM__${r.targetName}__${r.packetName}__${r.itemName}__${r.valueType}`},resetConfig:function(){this.stop(),this.receivedPackets={},this.config.tabs=[]},openConfiguration:function(r,n=!1){this.openConfigBase(r,n,i=>{this.stop(),this.receivedPackets={},this.config=i,this.autoStart===!1&&this.start()})},saveConfiguration:function(r){this.saveConfigBase(r,this.config)},addTab:function(){this.cancelTabRename(),this.showAddComponentDialog=!0},cancelTabRename:function(){this.tabNameDialog=!1,this.newTabName=""},tabMenu:function(r,n){this.curTab=n,r.preventDefault(),this.showTabMenu=!1,this.tabMenuX=r.clientX,this.tabMenuY=r.clientY,this.$nextTick(()=>{this.showTabMenu=!0})},openTabNameDialog:function(){this.newTabName=this.config.tabs[this.curTab].tabName,this.tabNameDialog=!0},renameTab:function(){this.config.tabs[this.curTab].tabName=this.newTabName,this.tabNameDialog=!1},packetSelected:function(r){this.newPacket={target:r.targetName,packet:r.packetName,cmdOrTlm:this.newPacketCmdOrTlm}},addComponent:function(r){let n=r.component.value,i=r.component.value;r.component.value.includes("DATAVIEWER")&&(n="DynamicComponent",i=`${r.component.value.charAt(0).toUpperCase()+r.component.value.slice(1).toLowerCase()}Widget`),this.config.tabs.push({name:r.component.label,tabName:this.packetTitle(r.packets[0]),packets:[...r.packets],type:n,component:i,items:r.component.items,config:{timeZone:this.timeZone},ref:Date.now()}),this.curTab=this.config.tabs.length-1,this.running&&this.addToSubscription(r.packets),this.cancelAddComponent()},cancelAddComponent:function(){this.showAddComponentDialog=!1},deleteComponent:function(r){if(this.config.tabs[r].packets[0].itemName!==void 0){let n=[];this.config.tabs.forEach((o,u)=>{o.items&&u!==r&&(n=n.concat(o.packets.map(this.itemKey)))});let i=this.config.tabs[r].packets.filter(o=>n.indexOf(this.itemKey(o))===-1);i.length>0&&this.removeFromSubscription(i)}else{let n=[];this.config.tabs.forEach((o,u)=>{o.items||u!==r&&(n=n.concat(o.packets.map(this.packetKey)))});let i=this.config.tabs[r].packets.filter(o=>n.indexOf(this.packetKey(o))===-1);i.length>0&&this.removeFromSubscription(i)}this.config.tabs.splice(r,1)}}},Ad={class:"mb-3"},Od=["textContent"];function Rd(r,n,i,o,u,l){const d=F("top-bar"),b=F("v-expansion-panel-title"),v=F("v-text-field"),x=F("v-col"),S=F("v-btn"),L=F("v-row"),M=F("v-container"),I=F("v-expansion-panel-text"),P=F("v-expansion-panel"),k=F("v-expansion-panels"),H=F("v-alert"),re=F("v-tab"),se=F("v-tabs"),oe=F("v-divider"),ge=F("v-card-title"),D=F("v-card-text"),me=F("v-card"),ee=F("v-tabs-window-item"),Oe=F("v-tabs-window"),Pe=F("open-config-dialog"),xt=F("save-config-dialog"),Se=F("v-spacer"),Fe=F("v-toolbar"),de=F("v-card-actions"),j=F("v-dialog"),ae=F("v-list-item-title"),ze=F("v-list-item"),be=F("v-list"),Le=F("v-menu"),jn=F("add-component-dialog");return J(),lt(Et,null,[O(d,{menus:u.menus,title:u.title},null,8,["menus","title"]),O(me,null,{default:R(()=>[O(k,{modelValue:u.panel,"onUpdate:modelValue":n[4]||(n[4]=W=>u.panel=W),style:{"margin-bottom":"5px"}},{default:R(()=>[O(P,null,{default:R(()=>[O(b,{class:"pulse-i"}),O(I,null,{default:R(()=>[O(M,null,{default:R(()=>[O(L,{dense:""},{default:R(()=>[O(x,null,{default:R(()=>[O(v,{modelValue:u.startDate,"onUpdate:modelValue":n[0]||(n[0]=W=>u.startDate=W),label:"Start Date",type:"date",rules:[u.rules.required],"data-test":"start-date"},null,8,["modelValue","rules"])]),_:1}),O(x,null,{default:R(()=>[O(v,{modelValue:u.startTime,"onUpdate:modelValue":n[1]||(n[1]=W=>u.startTime=W),label:"Start Time",type:"time",step:"1",rules:[u.rules.required],"data-test":"start-time"},null,8,["modelValue","rules"])]),_:1}),O(x,null,{default:R(()=>[O(v,{modelValue:u.endDate,"onUpdate:modelValue":n[2]||(n[2]=W=>u.endDate=W),label:"End Date",type:"date",rules:u.endTime?[u.rules.required]:[],"data-test":"end-date"},null,8,["modelValue","rules"])]),_:1}),O(x,null,{default:R(()=>[O(v,{modelValue:u.endTime,"onUpdate:modelValue":n[3]||(n[3]=W=>u.endTime=W),label:"End Time",type:"time",step:"1",rules:u.endDate?[u.rules.required]:[],"data-test":"end-time"},null,8,["modelValue","rules"])]),_:1}),O(x,{cols:"auto",class:"pt-4"},{default:R(()=>[u.running?(J(),ue(S,{key:0,color:"primary",width:"100","data-test":"stop-button",onClick:l.stop},{default:R(()=>[...n[15]||(n[15]=[we(" Stop ",-1)])]),_:1},8,["onClick"])):(J(),ue(S,{key:1,disabled:!u.canStart,color:"primary",width:"100",class:"pulse","data-test":"start-button",onClick:l.start},{default:R(()=>[...n[16]||(n[16]=[we(" Start ",-1)])]),_:1},8,["disabled","onClick"]))]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"]),xo(ln("div",Ad,[O(H,{modelValue:u.warning,"onUpdate:modelValue":n[5]||(n[5]=W=>u.warning=W),type:"warning",closable:""},{default:R(()=>[we(vt(u.warningText),1)]),_:1},8,["modelValue"]),O(H,{modelValue:u.error,"onUpdate:modelValue":n[6]||(n[6]=W=>u.error=W),type:"error",closable:""},{default:R(()=>[we(vt(u.errorText),1)]),_:1},8,["modelValue"]),O(H,{modelValue:u.connectionFailure,"onUpdate:modelValue":n[7]||(n[7]=W=>u.connectionFailure=W),type:"error"},{default:R(()=>[...n[17]||(n[17]=[we(" OpenC3 backend connection failed. ",-1)])]),_:1},8,["modelValue"])],512),[[So,u.warning||u.error||u.connectionFailure]]),(J(),ue(se,{ref:"tabs",key:`v-tabs_${u.config.tabs.length}`,modelValue:u.curTab,"onUpdate:modelValue":n[8]||(n[8]=W=>u.curTab=W)},{default:R(()=>[(J(!0),lt(Et,null,Kt(u.config.tabs,(W,ye)=>(J(),ue(re,{key:ye,"data-test":"tab",onContextmenu:Qt=>l.tabMenu(Qt,ye)},{default:R(()=>[we(vt(W.tabName)+" ",1),O(S,{variant:"text",icon:"mdi-close",onClick:()=>l.deleteComponent(ye)},null,8,["onClick"])]),_:2},1032,["onContextmenu"]))),128)),O(S,{icon:"mdi-tab-plus",class:Co(["ml-2",u.config.tabs.length===0?"pulse":""]),variant:"text","data-test":"new-tab",onClick:l.addTab},null,8,["class","onClick"])]),_:1},8,["modelValue"])),(J(),ue(Oe,{key:`v-tabs-window_${u.config.tabs.length}`,"model-value":u.curTab},{default:R(()=>[(J(!0),lt(Et,null,Kt(u.config.tabs,W=>(J(),ue(ee,{key:W.ref,eager:""},{default:R(()=>[(J(),ue(To,null,[O(me,{flat:""},{default:R(()=>[O(oe),O(ge,{class:"pa-3 d-flex align-center"},{default:R(()=>[ln("span",{textContent:vt(W.name)},null,8,Od)]),_:2},1024),(J(),ue(Ei(W.type),Ln({ref_for:!0},r.$attrs,{ref_for:!0,ref:W.ref,name:W.component,config:W.config,packets:W.packets,onConfig:ye=>W.config=ye}),null,16,["name","config","packets","onConfig"])),u.receivedPackets.length===0?(J(),ue(D,{key:0},{default:R(()=>[...n[18]||(n[18]=[we(" No data! Make sure to hit the START button! ",-1)])]),_:1})):wt("",!0)]),_:2},1024)],1024))]),_:2},1024))),128))]),_:1},8,["model-value"])),u.config.tabs.length?wt("",!0):(J(),ue(me,{key:0},{default:R(()=>[O(ge,null,{default:R(()=>[...n[19]||(n[19]=[we("You're not viewing any packets",-1)])]),_:1}),O(D,null,{default:R(()=>[...n[20]||(n[20]=[we("Click the new tab icon to start.",-1)])]),_:1})]),_:1}))]),_:1}),u.openConfig?(J(),ue(Pe,{key:0,modelValue:u.openConfig,"onUpdate:modelValue":n[9]||(n[9]=W=>u.openConfig=W),"config-key":u.configKey,onSuccess:l.openConfiguration},null,8,["modelValue","config-key","onSuccess"])):wt("",!0),u.saveConfig?(J(),ue(xt,{key:1,modelValue:u.saveConfig,"onUpdate:modelValue":n[10]||(n[10]=W=>u.saveConfig=W),"config-key":u.configKey,onSuccess:l.saveConfiguration},null,8,["modelValue","config-key","onSuccess"])):wt("",!0),O(j,{modelValue:u.tabNameDialog,"onUpdate:modelValue":n[12]||(n[12]=W=>u.tabNameDialog=W),width:"600"},{default:R(()=>[O(me,null,{default:R(()=>[O(Fe,{height:"24"},{default:R(()=>[O(Se),n[21]||(n[21]=ln("span",null," DataViewer: Rename Tab",-1)),O(Se)]),_:1}),O(D,null,{default:R(()=>[O(v,{modelValue:u.newTabName,"onUpdate:modelValue":n[11]||(n[11]=W=>u.newTabName=W),label:"Tab name","data-test":"rename-tab-input"},null,8,["modelValue"])]),_:1}),O(de,{class:"px-2"},{default:R(()=>[O(Se),O(S,{variant:"outlined","data-test":"cancel-rename",onClick:l.cancelTabRename},{default:R(()=>[...n[22]||(n[22]=[we(" Cancel ",-1)])]),_:1},8,["onClick"]),O(S,{variant:"flat","data-test":"rename",disabled:!u.newTabName,onClick:l.renameTab},{default:R(()=>[...n[23]||(n[23]=[we(" Rename ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"]),O(Le,{modelValue:u.showTabMenu,"onUpdate:modelValue":n[13]||(n[13]=W=>u.showTabMenu=W),target:[u.tabMenuX,u.tabMenuY]},{default:R(()=>[O(be,null,{default:R(()=>[O(ze,{"data-test":"context-menu-rename"},{default:R(()=>[O(ae,{style:{cursor:"pointer"},onClick:l.openTabNameDialog},{default:R(()=>[...n[24]||(n[24]=[we(" Rename ",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue","target"]),u.showAddComponentDialog?(J(),ue(jn,{key:2,modelValue:u.showAddComponentDialog,"onUpdate:modelValue":n[14]||(n[14]=W=>u.showAddComponentDialog=W),components:u.components,onAdd:l.addComponent,onCancel:l.cancelAddComponent},null,8,["modelValue","components","onAdd","onCancel"])):wt("",!0)],64)}const Lw=hl("default",Ht(Ed,[["render",Rd],["__scopeId","data-v-aea826ef"]]))})}}));
|
@@ -1 +1 @@
|
|
1
|
-
System.register(["./Widget-
|
1
|
+
System.register(["./Widget-BIXl-Pk5-9dc1a91f2536d1588361.js","./main-5b14a263506be329b487.js","vue","vue-router","single-spa","vuex","vuetify"],(function(d,V){"use strict";var l,a,n,r,s,u,o;return{setters:[e=>{l=e.o},e=>{a=e.d,n=e.R},e=>{r=e.resolveComponent,s=e.createBlock,u=e.openBlock,o=e.normalizeStyle},null,null,null,null],execute:(function(){const e={mixins:[l,n],data(){return{label:"Date",dateValue:""}},created(){this.parameters[0]&&(this.label=this.parameters[0]),this.dateValue=this.formatDate(new Date,this.screenTimeZone)},methods:{text(){return this.dateValue},date(){return this.dateValue}}};function c(m,i,v,y,t,b){const h=r("v-text-field");return u(),s(h,{modelValue:t.dateValue,"onUpdate:modelValue":i[0]||(i[0]=p=>t.dateValue=p),label:t.label,style:o(m.computedStyle),type:"date","hide-details":""},null,8,["modelValue","label","style"])}const f=d("default",a(e,[["render",c]]))})}}));
|