openc3-cosmos-tool-dataviewer 5.4.1 → 5.4.3.pre.beta0.20230214172956

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b328cf398542701b0fa74e240e05252e26425ac179eaa5429101e817d67057e6
4
- data.tar.gz: 2be61bca406589097faa014e3df07b2fa81fa0f614907463f33c61cb800c0da1
3
+ metadata.gz: 3ad5bbc8fa384da0364d7f9adc9cdec76bd8a6b7c1e46d6632d7bc84784b66c7
4
+ data.tar.gz: 62a7a251ebdf91b1681659cd62ef0f355f17dcc1d6c8c2b09828b8fd537cfe5f
5
5
  SHA512:
6
- metadata.gz: 1def2724d33b1ed814c8efea39231cc06fb924e6bb29af4a6ce3adb65346e2bc0e021f899dbfe7398feefb4bc5adf9eb267df1b245d2ae5abfbe81b1cbcb7489
7
- data.tar.gz: 97480c974795da51db264f279228e3d101f1255c4ebbad42123554d324f8f2d40b3ef18f39e259934ef672918291e0a195a271d663e52e072161630cdc8838c5
6
+ metadata.gz: 1759612a6073cf477535ac11139341e5e461e332314a29a43fdd54f0641a4a10710ba124319aa02a11ff6c301f736de09ebb4669d34c0ea4d06cb53ba23065dd
7
+ data.tar.gz: 7388bb049f03a2558a2b1b57b6998cda4cf202ebf8c24a35d9d05a6bd51a6e4d3f740f1578ceb1868037aafb2cd4240419c6b451bf8114d4ce7ace87b96311d7
@@ -0,0 +1,2 @@
1
+ (self["webpackChunk_openc3_cosmos_tool_dataviewer"]=self["webpackChunk_openc3_cosmos_tool_dataviewer"]||[]).push([[784],{2784:function(n,e,t){"use strict";t.r(e),t.d(e,{default:function(){return kn}});t(8178);function l(){var n="/openc3/plugins/packages/openc3-cosmos-tool-dataviewer/src/tools/DataViewer/DataViewer.vue",e="d01d411e8e10b335da79aeb0d7efe5725cee2d2e",t=new Function("return this")(),o="__coverage__",i={path:"/openc3/plugins/packages/openc3-cosmos-tool-dataviewer/src/tools/DataViewer/DataViewer.vue",statementMap:{0:{start:{line:1,column:13},end:{line:2,column:1}},1:{start:{line:1,column:39},end:{line:1,column:43}},2:{start:{line:1,column:47},end:{line:1,column:59}},3:{start:{line:1,column:60},end:{line:1,column:6808}},4:{start:{line:1,column:352},end:{line:1,column:369}},5:{start:{line:1,column:594},end:{line:1,column:611}},6:{start:{line:1,column:838},end:{line:1,column:853}},7:{start:{line:1,column:1089},end:{line:1,column:1104}},8:{start:{line:1,column:1773},end:{line:1,column:1788}},9:{start:{line:1,column:1960},end:{line:1,column:1973}},10:{start:{line:1,column:2136},end:{line:1,column:2161}},11:{start:{line:1,column:2337},end:{line:1,column:2351}},12:{start:{line:1,column:2421},end:{line:1,column:2568}},13:{start:{line:1,column:2505},end:{line:1,column:2530}},14:{start:{line:1,column:2789},end:{line:1,column:2803}},15:{start:{line:1,column:2872},end:{line:1,column:4508}},16:{start:{line:1,column:2977},end:{line:1,column:4054}},17:{start:{line:1,column:3264},end:{line:1,column:3303}},18:{start:{line:1,column:3698},end:{line:1,column:3723}},19:{start:{line:1,column:4365},end:{line:1,column:4395}},20:{start:{line:1,column:4796},end:{line:1,column:4832}},21:{start:{line:1,column:4890},end:{line:1,column:4908}},22:{start:{line:1,column:5047},end:{line:1,column:5083}},23:{start:{line:1,column:5141},end:{line:1,column:5159}},24:{start:{line:1,column:5292},end:{line:1,column:5313}},25:{start:{line:1,column:5608},end:{line:1,column:5626}},26:{start:{line:1,column:6156},end:{line:1,column:6175}},27:{start:{line:1,column:6734},end:{line:1,column:6764}},28:{start:{line:3,column:22},end:{line:3,column:24}}},fnMap:{0:{name:"render",decl:{start:{line:1,column:22},end:{line:1,column:28}},loc:{start:{line:1,column:30},end:{line:2,column:1}},line:1},1:{name:"(anonymous_1)",decl:{start:{line:1,column:336},end:{line:1,column:337}},loc:{start:{line:1,column:351},end:{line:1,column:370}},line:1},2:{name:"(anonymous_2)",decl:{start:{line:1,column:578},end:{line:1,column:579}},loc:{start:{line:1,column:593},end:{line:1,column:612}},line:1},3:{name:"(anonymous_3)",decl:{start:{line:1,column:822},end:{line:1,column:823}},loc:{start:{line:1,column:837},end:{line:1,column:854}},line:1},4:{name:"(anonymous_4)",decl:{start:{line:1,column:1073},end:{line:1,column:1074}},loc:{start:{line:1,column:1088},end:{line:1,column:1105}},line:1},5:{name:"(anonymous_5)",decl:{start:{line:1,column:1757},end:{line:1,column:1758}},loc:{start:{line:1,column:1772},end:{line:1,column:1789}},line:1},6:{name:"(anonymous_6)",decl:{start:{line:1,column:1944},end:{line:1,column:1945}},loc:{start:{line:1,column:1959},end:{line:1,column:1974}},line:1},7:{name:"(anonymous_7)",decl:{start:{line:1,column:2120},end:{line:1,column:2121}},loc:{start:{line:1,column:2135},end:{line:1,column:2162}},line:1},8:{name:"(anonymous_8)",decl:{start:{line:1,column:2321},end:{line:1,column:2322}},loc:{start:{line:1,column:2336},end:{line:1,column:2352}},line:1},9:{name:"(anonymous_9)",decl:{start:{line:1,column:2401},end:{line:1,column:2402}},loc:{start:{line:1,column:2420},end:{line:1,column:2569}},line:1},10:{name:"(anonymous_10)",decl:{start:{line:1,column:2494},end:{line:1,column:2495}},loc:{start:{line:1,column:2505},end:{line:1,column:2530}},line:1},11:{name:"(anonymous_11)",decl:{start:{line:1,column:2773},end:{line:1,column:2774}},loc:{start:{line:1,column:2788},end:{line:1,column:2804}},line:1},12:{name:"(anonymous_12)",decl:{start:{line:1,column:2852},end:{line:1,column:2853}},loc:{start:{line:1,column:2871},end:{line:1,column:4509}},line:1},13:{name:"(anonymous_13)",decl:{start:{line:1,column:2948},end:{line:1,column:2949}},loc:{start:{line:1,column:2976},end:{line:1,column:4055}},line:1},14:{name:"(anonymous_14)",decl:{start:{line:1,column:3258},end:{line:1,column:3259}},loc:{start:{line:1,column:3264},end:{line:1,column:3303}},line:1},15:{name:"(anonymous_15)",decl:{start:{line:1,column:3682},end:{line:1,column:3683}},loc:{start:{line:1,column:3698},end:{line:1,column:3723}},line:1},16:{name:"(anonymous_16)",decl:{start:{line:1,column:4359},end:{line:1,column:4360}},loc:{start:{line:1,column:4365},end:{line:1,column:4395}},line:1},17:{name:"(anonymous_17)",decl:{start:{line:1,column:4779},end:{line:1,column:4780}},loc:{start:{line:1,column:4795},end:{line:1,column:4833}},line:1},18:{name:"(anonymous_18)",decl:{start:{line:1,column:4874},end:{line:1,column:4875}},loc:{start:{line:1,column:4889},end:{line:1,column:4909}},line:1},19:{name:"(anonymous_19)",decl:{start:{line:1,column:5030},end:{line:1,column:5031}},loc:{start:{line:1,column:5046},end:{line:1,column:5084}},line:1},20:{name:"(anonymous_20)",decl:{start:{line:1,column:5125},end:{line:1,column:5126}},loc:{start:{line:1,column:5140},end:{line:1,column:5160}},line:1},21:{name:"(anonymous_21)",decl:{start:{line:1,column:5276},end:{line:1,column:5277}},loc:{start:{line:1,column:5291},end:{line:1,column:5314}},line:1},22:{name:"(anonymous_22)",decl:{start:{line:1,column:5592},end:{line:1,column:5593}},loc:{start:{line:1,column:5607},end:{line:1,column:5627}},line:1},23:{name:"(anonymous_23)",decl:{start:{line:1,column:6140},end:{line:1,column:6141}},loc:{start:{line:1,column:6155},end:{line:1,column:6176}},line:1},24:{name:"(anonymous_24)",decl:{start:{line:1,column:6718},end:{line:1,column:6719}},loc:{start:{line:1,column:6733},end:{line:1,column:6765}},line:1}},branchMap:{0:{loc:{start:{line:1,column:722},end:{line:1,column:761}},type:"cond-expr",locations:[{start:{line:1,column:736},end:{line:1,column:756}},{start:{line:1,column:759},end:{line:1,column:761}}],line:1},1:{loc:{start:{line:1,column:973},end:{line:1,column:1012}},type:"cond-expr",locations:[{start:{line:1,column:987},end:{line:1,column:1007}},{start:{line:1,column:1010},end:{line:1,column:1012}}],line:1},2:{loc:{start:{line:1,column:1189},end:{line:1,column:1472}},type:"cond-expr",locations:[{start:{line:1,column:1203},end:{line:1,column:1323}},{start:{line:1,column:1324},end:{line:1,column:1472}}],line:1},3:{loc:{start:{line:1,column:1540},end:{line:1,column:1589}},type:"binary-expr",locations:[{start:{line:1,column:1540},end:{line:1,column:1551}},{start:{line:1,column:1555},end:{line:1,column:1564}},{start:{line:1,column:1568},end:{line:1,column:1589}}],line:1},4:{loc:{start:{line:1,column:3375},end:{line:1,column:3919}},type:"cond-expr",locations:[{start:{line:1,column:3414},end:{line:1,column:3727}},{start:{line:1,column:3728},end:{line:1,column:3919}}],line:1},5:{loc:{start:{line:1,column:3920},end:{line:1,column:4050}},type:"cond-expr",locations:[{start:{line:1,column:3966},end:{line:1,column:4041}},{start:{line:1,column:4042},end:{line:1,column:4050}}],line:1},6:{loc:{start:{line:1,column:4057},end:{line:1,column:4290}},type:"cond-expr",locations:[{start:{line:1,column:4079},end:{line:1,column:4281}},{start:{line:1,column:4282},end:{line:1,column:4290}}],line:1},7:{loc:{start:{line:1,column:4514},end:{line:1,column:4690}},type:"cond-expr",locations:[{start:{line:1,column:4540},end:{line:1,column:4681}},{start:{line:1,column:4682},end:{line:1,column:4690}}],line:1},8:{loc:{start:{line:1,column:4695},end:{line:1,column:4945}},type:"cond-expr",locations:[{start:{line:1,column:4712},end:{line:1,column:4936}},{start:{line:1,column:4937},end:{line:1,column:4945}}],line:1},9:{loc:{start:{line:1,column:4946},end:{line:1,column:5196}},type:"cond-expr",locations:[{start:{line:1,column:4963},end:{line:1,column:5187}},{start:{line:1,column:5188},end:{line:1,column:5196}}],line:1}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"d01d411e8e10b335da79aeb0d7efe5725cee2d2e"},a=t[o]||(t[o]={});a[n]&&a[n].hash===e||(a[n]=i);var c=a[n];return l=function(){return c},c}l(),l().s[0]++;var o=function(){l().f[0]++;var n=(l().s[1]++,this),e=(l().s[2]++,n._self._c);return l().s[3]++,e("div",[e("top-bar",{attrs:{menus:n.menus,title:n.title}}),e("v-row",{attrs:{dense:""}},[e("v-col",[e("v-text-field",{attrs:{label:"Start Date",type:"date",rules:[n.rules.required],"data-test":"start-date"},model:{value:n.startDate,callback:function(e){l().f[1]++,l().s[4]++,n.startDate=e},expression:"startDate"}})],1),e("v-col",[e("v-text-field",{attrs:{label:"Start Time",type:"time",step:"1",rules:[n.rules.required],"data-test":"start-time"},model:{value:n.startTime,callback:function(e){l().f[2]++,l().s[5]++,n.startTime=e},expression:"startTime"}})],1),e("v-col",[e("v-text-field",{attrs:{label:"End Date",type:"date",rules:n.endTime?(l().b[0][0]++,[n.rules.required]):(l().b[0][1]++,[]),"data-test":"end-date"},model:{value:n.endDate,callback:function(e){l().f[3]++,l().s[6]++,n.endDate=e},expression:"endDate"}})],1),e("v-col",[e("v-text-field",{attrs:{label:"End Time",type:"time",step:"1",rules:n.endDate?(l().b[1][0]++,[n.rules.required]):(l().b[1][1]++,[]),"data-test":"end-time"},model:{value:n.endTime,callback:function(e){l().f[4]++,l().s[7]++,n.endTime=e},expression:"endTime"}})],1),e("v-col",{staticClass:"pt-4",attrs:{cols:"auto"}},[n.running?(l().b[2][0]++,e("v-btn",{attrs:{color:"primary",width:"100","data-test":"stop-button"},on:{click:n.stop}},[n._v(" Stop ")])):(l().b[2][1]++,e("v-btn",{attrs:{disabled:!n.canStart,color:"primary",width:"100","data-test":"start-button"},on:{click:n.start}},[n._v(" Start ")]))],1)],1),e("div",{directives:[{name:"show",rawName:"v-show",value:(l().b[3][0]++,n.warning||(l().b[3][1]++,n.error)||(l().b[3][2]++,n.connectionFailure)),expression:"warning || error || connectionFailure"}],staticClass:"mb-3"},[e("v-alert",{attrs:{type:"warning",dismissible:""},model:{value:n.warning,callback:function(e){l().f[5]++,l().s[8]++,n.warning=e},expression:"warning"}},[n._v(" "+n._s(n.warningText)+" ")]),e("v-alert",{attrs:{type:"error",dismissible:""},model:{value:n.error,callback:function(e){l().f[6]++,l().s[9]++,n.error=e},expression:"error"}},[n._v(" "+n._s(n.errorText)+" ")]),e("v-alert",{attrs:{type:"error"},model:{value:n.connectionFailure,callback:function(e){l().f[7]++,l().s[10]++,n.connectionFailure=e},expression:"connectionFailure"}},[n._v(" OpenC3 backend connection failed. ")])],1),e("v-card",[e("v-tabs",{ref:"tabs",model:{value:n.curTab,callback:function(e){l().f[8]++,l().s[11]++,n.curTab=e},expression:"curTab"}},[n._l(n.config.tabs,(function(t,o){return l().f[9]++,l().s[12]++,e("v-tab",{key:o,attrs:{"data-test":"tab"},on:{contextmenu:function(e){return l().f[10]++,l().s[13]++,n.tabMenu(e,o)}}},[n._v(" "+n._s(t.name)+" ")])})),e("v-btn",{staticClass:"mt-2 ml-2",attrs:{icon:"","data-test":"new-tab"},on:{click:n.addTab}},[e("v-icon",[n._v("mdi-tab-plus")])],1)],2),e("v-tabs-items",{model:{value:n.curTab,callback:function(e){l().f[11]++,l().s[14]++,n.curTab=e},expression:"curTab"}},n._l(n.config.tabs,(function(t,o){return l().f[12]++,l().s[15]++,e("v-tab-item",{key:o,attrs:{eager:""}},[n._l(t.packets,(function(t,i){return l().f[13]++,l().s[16]++,e("v-card",{key:"".concat(o,"-").concat(i),attrs:{flat:""}},[e("v-divider"),e("v-card-title",{staticClass:"pa-3"},[e("span",{domProps:{textContent:n._s(n.packetTitle(t))}}),e("v-spacer"),e("v-btn",{attrs:{icon:"","data-test":"delete-packet"},on:{click:function(){return l().f[14]++,l().s[17]++,n.deleteComponent(o,i)}}},[e("v-icon",{attrs:{color:"red"}},[n._v("mdi-delete")])],1)],1),"DumpComponent"===t.component?(l().b[4][0]++,e("dump-component",{directives:[{name:"show",rawName:"v-show",value:n.receivedPackets[n.packetKey(t)],expression:"receivedPackets[packetKey(packet)]"}],ref:"".concat(n.packetKey(t),"-display"),refInFor:!0,attrs:{config:t.config},on:{"config-change":function(n){return l().f[15]++,l().s[18]++,t.config=n}}})):(l().b[4][1]++,e("v-card-text",[e("v-alert",{attrs:{type:"error"}},[n._v(" Component missing: "),e("span",{staticClass:"text-component-missing-name"},[n._v(" "+n._s(t.component)+" ")])])],1)),n.receivedPackets[n.packetKey(t)]?(l().b[5][1]++,n._e()):(l().b[5][0]++,e("v-card-text",[n._v(" No data! Make sure to hit the START button! ")]))],1)})),t.packets.length?(l().b[6][1]++,n._e()):(l().b[6][0]++,e("v-card",[e("v-card-title",[n._v(" This tab is empty ")]),e("v-card-text",[n._v(" Click the button below to add packets. Right click on the tab name above to rename or delete this tab. ")])],1)),e("v-btn",{attrs:{block:"","data-test":"new-packet"},on:{click:function(){return l().f[16]++,l().s[19]++,n.openComponentDialog(o)}}},[e("v-icon",{staticClass:"mr-2"},[n._v("$astro-add-large")]),n._v(" Click here to add a packet ")],1)],2)})),1),n.config.tabs.length?(l().b[7][1]++,n._e()):(l().b[7][0]++,e("v-card",[e("v-card-title",[n._v("You're not viewing any packets")]),e("v-card-text",[n._v("Click the new tab icon to start.")])],1))],1),n.openConfig?(l().b[8][0]++,e("open-config-dialog",{attrs:{tool:n.toolName},on:{success:function(e){return l().f[17]++,l().s[20]++,n.openConfiguration(e)}},model:{value:n.openConfig,callback:function(e){l().f[18]++,l().s[21]++,n.openConfig=e},expression:"openConfig"}})):(l().b[8][1]++,n._e()),n.saveConfig?(l().b[9][0]++,e("save-config-dialog",{attrs:{tool:n.toolName},on:{success:function(e){return l().f[19]++,l().s[22]++,n.saveConfiguration(e)}},model:{value:n.saveConfig,callback:function(e){l().f[20]++,l().s[23]++,n.saveConfig=e},expression:"saveConfig"}})):(l().b[9][1]++,n._e()),e("v-dialog",{attrs:{width:"600"},model:{value:n.tabNameDialog,callback:function(e){l().f[21]++,l().s[24]++,n.tabNameDialog=e},expression:"tabNameDialog"}},[e("v-card",[e("v-system-bar",[e("v-spacer"),e("span",[n._v(" DataViewer: Rename Tab")]),e("v-spacer")],1),e("v-card-text",[e("v-text-field",{attrs:{label:"Tab name","data-test":"rename-tab-input"},model:{value:n.newTabName,callback:function(e){l().f[22]++,l().s[25]++,n.newTabName=e},expression:"newTabName"}})],1),e("v-card-actions",[e("v-spacer"),e("v-btn",{staticClass:"mx-2",attrs:{outlined:"","data-test":"cancel-rename"},on:{click:n.cancelTabRename}},[n._v(" Cancel ")]),e("v-btn",{staticClass:"mx-2",attrs:{color:"primary","data-test":"rename",disabled:!n.newTabName},on:{click:n.renameTab}},[n._v(" Rename ")])],1)],1)],1),e("v-menu",{attrs:{"position-x":n.tabMenuX,"position-y":n.tabMenuY,absolute:"","offset-y":""},model:{value:n.showTabMenu,callback:function(e){l().f[23]++,l().s[26]++,n.showTabMenu=e},expression:"showTabMenu"}},[e("v-list",[e("v-list-item",{attrs:{"data-test":"context-menu-rename"}},[e("v-list-item-title",{staticStyle:{cursor:"pointer"},on:{click:n.openTabNameDialog}},[n._v(" Rename ")])],1),e("v-list-item",{attrs:{"data-test":"context-menu-delete"}},[e("v-list-item-title",{staticStyle:{cursor:"pointer"},on:{click:n.deleteTab}},[n._v(" Delete ")])],1)],1)],1),e("add-component-dialog",{on:{add:n.addComponent,cancel:n.cancelAddComponent},model:{value:n.showAddComponentDialog,callback:function(e){l().f[24]++,l().s[27]++,n.showAddComponentDialog=e},expression:"showAddComponentDialog"}})],1)},i=(l().s[28]++,[]),a=t(5789),c=t(9502),s=t(6964),r=(t(4870),t(3985),t(8188),t(3108),t(6728),t(1939),t(4769),t(3450),t(6710),t(9805),t(8966)),u=t(6259),m=t(426),d=t(7871),A=t(2261),p=(t(1372),t(1245),t(7950),t(9529),t(3675),t(4898),t(5825),t(7170),t(8857),t(8329),t(6279),t(427),t(171),t(7093),t(1159),t(2516),t(4349),t(5273),t(6729),t(1801),t(574),t(5787),t(9271),t(3160),t(5688),t(3157),t(3333),t(315),t(556),t(9224),t(2649),t(14),t(1996),t(7233),t(8673),t(5734),t(8233),t(1235),t(9644)),f=t.n(p),h=t(4091),v=new h["default"],C=f().create({baseURL:location.origin,timeout:6e4,params:{}});C.interceptors.response.use((function(n){return n}),(function(n){if(n.response){var e,t,l,o,i,a,c,s,r,u;if(401===n.response.status&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0),n.response.headers["ignore-errors"]&&n.response.headers["ignore-errors"].includes(n.response.status.toString()))return Promise.reject(n);var m="HTTP ".concat(n.response.status," - ");if(null!==(e=n.response)&&void 0!==e&&e.statusText&&(m+="".concat(n.response.statusText," ")),null!==(t=n.response)&&void 0!==t&&null!==(l=t.config)&&void 0!==l&&l.data&&(m+="".concat(n.response.config.data," ")),null!==(o=n.response)&&void 0!==o&&null!==(i=o.data)&&void 0!==i&&i.message)m+="".concat(n.response.data.message);else if(null!==(a=n.response)&&void 0!==a&&null!==(c=a.data)&&void 0!==c&&c.exception)m+="".concat(n.response.data.exception);else if(null!==(s=n.response)&&void 0!==s&&null!==(r=s.data)&&void 0!==r&&null!==(u=r.error)&&void 0!==u&&u.message)n.response.data.error.class&&(m+="".concat(n.response.data.error.class," ")),m+="".concat(n.response.data.error.message);else{var d;m+="".concat(null===(d=n.response)||void 0===d?void 0:d.data)}throw v.$notify&&v.$notify.serious({title:"Network error",body:m}),n}throw n}));var g=C,b=function(){function n(){(0,m.Z)(this,n),(0,A.Z)(this,"id",1)}return(0,d.Z)(n,[{key:"exec",value:function(){var n=(0,c.Z)((0,a.Z)().mark((function n(e,t){var l,o,i,c,r=arguments;return(0,a.Z)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return l=r.length>2&&void 0!==r[2]?r[2]:{},o=r.length>3&&void 0!==r[3]?r[3]:{},n.prev=2,n.next=5,OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity);case 5:n.next=10;break;case 7:n.prev=7,n.t0=n["catch"](2),OpenC3Auth.login();case 10:return this.id=this.id+1,n.prev=11,l["scope"]=window.openc3Scope,n.next=15,g.post("/openc3-api/api",{jsonrpc:"2.0",method:e,params:t,id:this.id,keyword_params:l},{headers:(0,s.Z)({Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc"},o)});case 15:return i=n.sent,n.abrupt("return",i.data.result);case 19:throw n.prev=19,n.t1=n["catch"](11),c=new Error,n.t1.response?(c.name=n.t1.response.data.error.data.class,c.message=n.t1.response.data.error.data.message):n.t1.request?(c.name="Request error",c.message="Request error, no response received"):c.name="Unknown error",c;case 24:case"end":return n.stop()}}),n,this,[[2,7],[11,19]])})));function e(e,t){return n.apply(this,arguments)}return e}()},{key:"decode_openc3_type",value:function(n){if(null!==n&&"object"===(0,u.Z)(n)&&"Float"==n.json_class&&n.raw){if("NaN"==n.raw)return NaN;if("Infinity"==n.raw)return 1/0;if("-Infinity"==n.raw)return-1/0}return null}},{key:"encode_openc3_type",value:function(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}},{key:"ensure_offline_access",value:function(){var n=this;this.offline_access_needed().then((function(e){e&&(localStorage.openc3OfflineToken?n.set_offline_access(localStorage.openc3OfflineToken).then((function(){delete localStorage.openc3OfflineToken})):OpenC3Auth.getOfflineAccess())}))}},{key:"offline_access_needed",value:function(){return this.exec("offline_access_needed",[])}},{key:"set_offline_access",value:function(n){return this.exec("set_offline_access",[n])}},{key:"get_all_interface_info",value:function(){return this.exec("get_all_interface_info",[])}},{key:"map_target_to_interface",value:function(n,e){return this.exec("map_target_to_interface",[n,e])}},{key:"connect_interface",value:function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),l=1;l<e;l++)t[l-1]=arguments[l];return t.length>0?this.exec("connect_interface",[n,t]):this.exec("connect_interface",[n])}},{key:"disconnect_interface",value:function(n){return this.exec("disconnect_interface",[n])}},{key:"get_all_router_info",value:function(){return this.exec("get_all_router_info",[])}},{key:"connect_router",value:function(n){return this.exec("connect_router",[n])}},{key:"disconnect_router",value:function(n){return this.exec("disconnect_router",[n])}},{key:"get_target_interfaces",value:function(){return this.exec("get_target_interfaces",[])}},{key:"get_all_target_info",value:function(){return this.exec("get_all_target_info",[])}},{key:"get_tlm_cnts",value:function(n){return this.exec("get_tlm_cnts",[n])}},{key:"get_item",value:function(n,e,t){return this.exec("get_item",[n,e,t])}},{key:"get_parameter",value:function(n,e,t){return this.exec("get_parameter",[n,e,t])}},{key:"get_all_packet_logger_info",value:function(){return this.exec("get_all_packet_logger_info",[])}},{key:"start_logging",value:function(){return this.exec("start_logging",[])}},{key:"stop_logging",value:function(){return this.exec("stop_logging",[])}},{key:"start_cmd_log",value:function(n){return this.exec("start_cmd_log",[n])}},{key:"start_tlm_log",value:function(n){return this.exec("start_tlm_log",[n])}},{key:"stop_cmd_log",value:function(n){return this.exec("stop_cmd_log",[n])}},{key:"stop_tlm_log",value:function(n){return this.exec("stop_tlm_log",[n])}},{key:"get_server_status",value:function(){return this.exec("get_server_status",[])}},{key:"get_limits_sets",value:function(){return this.exec("get_limits_sets",[])}},{key:"get_limits_set",value:function(){return this.exec("get_limits_set",[])}},{key:"set_limits_set",value:function(n){return this.exec("set_limits_set",[n])}},{key:"get_background_tasks",value:function(){return this.exec("get_background_tasks",[])}},{key:"start_background_task",value:function(n){return this.exec("start_background_task",[n])}},{key:"stop_background_task",value:function(n){return this.exec("stop_background_task",[n])}},{key:"get_target",value:function(n){return this.exec("get_target",[n])}},{key:"get_target_list",value:function(){return this.exec("get_target_list",[])}},{key:"get_telemetry",value:function(n,e){return this.exec("get_telemetry",[n,e])}},{key:"get_all_telemetry",value:function(n){return this.exec("get_all_telemetry",[n])}},{key:"get_all_telemetry_names",value:function(n){return this.exec("get_all_telemetry_names",[n])}},{key:"get_tlm_packet",value:function(){var n=(0,c.Z)((0,a.Z)().mark((function n(e,t,l){var o,i,c,s,r,u=arguments;return(0,a.Z)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return o=u.length>3&&void 0!==u[3]?u[3]:30,n.next=3,this.exec("get_tlm_packet",[e,t],{type:l,stale_time:o});case 3:if(i=n.sent,null!=i)for(c=i.length,s=null,r=0;r<c;r++)s=this.decode_openc3_type(i[r][1]),null!==s&&(i[r][1]=s);return n.abrupt("return",i);case 6:case"end":return n.stop()}}),n,this)})));function e(e,t,l){return n.apply(this,arguments)}return e}()},{key:"get_packet_derived_items",value:function(n,e){return this.exec("get_packet_derived_items",[n,e])}},{key:"get_tlm_buffer",value:function(n,e){return this.exec("get_tlm_buffer",[n,e])}},{key:"get_tlm_values",value:function(){var n=(0,c.Z)((0,a.Z)().mark((function n(e){var t,l,o,i,c,s=arguments;return(0,a.Z)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return t=s.length>1&&void 0!==s[1]?s[1]:30,n.next=3,this.exec("get_tlm_values",[e],{stale_time:t});case 3:for(l=n.sent,o=l[0].length,i=null,c=0;c<o;c++)i=this.decode_openc3_type(l[0][c]),null!==i&&(l[0][c]=i);return n.abrupt("return",l);case 8:case"end":return n.stop()}}),n,this)})));function e(e){return n.apply(this,arguments)}return e}()},{key:"get_limits",value:function(n,e,t){return this.exec("get_limits",[n,e,t])}},{key:"tlm",value:function(){var n=(0,c.Z)((0,a.Z)().mark((function n(e,t,l){var o,i,c,s,r=arguments;return(0,a.Z)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(o=r.length>3&&void 0!==r[3]?r[3]:"CONVERTED",i=null,void 0!==t){n.next=8;break}return n.next=5,this.exec("tlm",[e]);case 5:i=n.sent,n.next=24;break;case 8:if(void 0!==l){n.next=21;break}if(!["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(t)){n.next=15;break}return n.next=12,this.exec("tlm",[e],{type:t});case 12:i=n.sent,n.next=19;break;case 15:throw c=new Error,c.name="TypeError",c.message="Invalid data type ".concat(t,". Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS."),c;case 19:n.next=24;break;case 21:return n.next=23,this.exec("tlm",[e,t,l],{type:o});case 23:i=n.sent;case 24:return s=this.decode_openc3_type(i),null!==s&&(i=s),n.abrupt("return",i);case 27:case"end":return n.stop()}}),n,this)})));function e(e,t,l){return n.apply(this,arguments)}return e}()},{key:"inject_tlm",value:function(){var n=(0,c.Z)((0,a.Z)().mark((function n(e,t){var l,o,i=arguments;return(0,a.Z)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return l=i.length>2&&void 0!==i[2]?i[2]:null,o=i.length>3&&void 0!==i[3]?i[3]:"CONVERTED",n.next=4,this.exec("inject_tlm",[e,t,l],{type:o});case 4:data=n.sent;case 5:case"end":return n.stop()}}),n,this)})));function e(e,t){return n.apply(this,arguments)}return e}()},{key:"set_tlm",value:function(n,e,t,l){return this.exec("set_tlm",[n,e,t],{type:l})}},{key:"override_tlm",value:function(n,e,t,l){return this.exec("override_tlm",[n,e,t],{type:l})}},{key:"get_overrides",value:function(){return this.exec("get_overrides")}},{key:"normalize_tlm",value:function(n,e,t,l){return this.exec("normalize_tlm",[n,e,t],{type:l})}},{key:"get_all_commands",value:function(n){return this.exec("get_all_commands",[n])}},{key:"get_all_command_names",value:function(n){return this.exec("get_all_command_names",[n])}},{key:"get_command",value:function(n,e){return this.exec("get_command",[n,e])}},{key:"get_cmd_cnts",value:function(n){return this.exec("get_cmd_cnts",[n])}},{key:"get_cmd_value",value:function(n,e,t){var l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"CONVERTED";return this.exec("get_cmd_value",[n,e,t,l])}},{key:"get_cmd_buffer",value:function(n,e){return this.exec("get_cmd_buffer",[n,e])}},{key:"_cmd",value:function(n,e,t,l,o){var i=null;for(var a in l)Object.prototype.hasOwnProperty.call(l,a)&&(i=this.encode_openc3_type(l[a]),null!==i&&(l[a]=i));return this.exec(n,[e,t,l],{},o)}},{key:"get_cmd_hazardous",value:function(n,e,t){return void 0===e?this.exec("get_cmd_hazardous",n):this._cmd("get_cmd_hazardous",n,e,t)}},{key:"cmd",value:function(n,e,t){var l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return void 0===e?this.exec("cmd",n,{},l):this._cmd("cmd",n,e,t,l)}},{key:"cmd_no_range_check",value:function(n,e,t){return void 0===e?this.exec("cmd_no_range_check",n):this._cmd("cmd_no_range_check",n,e,t)}},{key:"cmd_raw",value:function(n,e,t){return void 0===e?this.exec("cmd_raw",n):this._cmd("cmd_raw",n,e,t)}},{key:"cmd_raw_no_range_check",value:function(n,e,t){return void 0===e?this.exec("cmd_raw_no_range_check",n):this._cmd("cmd_raw_no_range_check",n,e,t)}},{key:"cmd_no_hazardous_check",value:function(n,e,t){return void 0===e?this.exec("cmd_no_hazardous_check",n):this._cmd("cmd_no_hazardous_check",n,e,t)}},{key:"cmd_no_checks",value:function(n,e,t){return void 0===e?this.exec("cmd_no_checks",n):this._cmd("cmd_no_checks",n,e,t)}},{key:"cmd_raw_no_hazardous_check",value:function(n,e,t){return void 0===e?this.exec("cmd_raw_no_hazardous_check",n):this._cmd("cmd_raw_no_hazardous_check",n,e,t)}},{key:"cmd_raw_no_checks",value:function(n,e,t){return void 0===e?this.exec("cmd_raw_no_checks",n):this._cmd("cmd_raw_no_checks",n,e,t)}},{key:"get_interface_names",value:function(){return this.exec("get_interface_names",[])}},{key:"send_raw",value:function(n,e){return this.exec("send_raw",[n,e])}},{key:"list_configs",value:function(n){return this.exec("list_configs",[n])}},{key:"load_config",value:function(n,e){return this.exec("load_config",[n,e])}},{key:"save_config",value:function(n,e,t){return this.exec("save_config",[n,e,t])}},{key:"delete_config",value:function(n,e){return this.exec("delete_config",[n,e])}},{key:"enable_limits",value:function(n,e,t){return this.exec("enable_limits",[n,e,t])}},{key:"disable_limits",value:function(n,e,t){return this.exec("disable_limits",[n,e,t])}},{key:"get_out_of_limits",value:function(){return this.exec("get_out_of_limits",[])}},{key:"get_overall_limits_state",value:function(n){return this.exec("get_overall_limits_state",[n])}},{key:"list_settings",value:function(){return this.exec("list_settings",[])}},{key:"get_all_settings",value:function(){return this.exec("get_all_settings",[])}},{key:"get_setting",value:function(n){return this.exec("get_setting",[n])}},{key:"get_settings",value:function(n){return this.exec("get_settings",n)}},{key:"save_setting",value:function(n,e){return this.exec("save_setting",[n,e])}},{key:"get_metrics",value:function(){return this.exec("get_metrics",[])}},{key:"hashString",value:function(){var n=(0,c.Z)((0,a.Z)().mark((function n(e){var t,l,o;return(0,a.Z)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(!window.isSecureContext){n.next=7;break}return t=(new TextEncoder).encode(e),n.next=4,crypto.subtle.digest("SHA-256",t);case 4:return l=n.sent,o=new Uint8Array(l),n.abrupt("return",Array.from(o).map((function(n){return n.toString(16).padStart(2,"0")})).join(""));case 7:case"end":return n.stop()}}),n)})));function e(e){return n.apply(this,arguments)}return e}()}]),n}(),k=(t(4083),t(4908),function(){var n=this,e=n._self._c;return e("v-dialog",{attrs:{width:"600"},on:{keydown:function(e){return!e.type.indexOf("key")&&n._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:n.cancel.apply(null,arguments)}},model:{value:n.show,callback:function(e){n.show=e},expression:"show"}},[e("v-card",[e("form",{on:{submit:function(e){return e.preventDefault(),n.success.apply(null,arguments)}}},[e("v-system-bar",[e("v-spacer"),e("span",[n._v("Open Configuration")]),e("v-spacer")],1),e("v-card-text",[e("div",{staticClass:"pa-3"},[e("v-row",{attrs:{dense:""}},[e("v-text-field",{attrs:{label:"search",type:"text","data-test":"search","prepend-icon":"mdi-magnify","clear-icon":"mdi-close-circle-outline",clearable:"",autofocus:"","single-line":"","hide-details":""},model:{value:n.search,callback:function(e){n.search=e},expression:"search"}})],1),e("v-data-table",{attrs:{"show-select":"","single-select":"","item-key":"configId",search:n.search,headers:n.headers,items:n.configs,"items-per-page":5,"footer-props":{"items-per-page-options":[5]}},on:{"item-selected":n.itemSelected,"click:row":function(n,e){return e.select(n)}},scopedSlots:n._u([{key:"item.actions",fn:function(t){var l=t.item;return[e("v-btn",{staticClass:"mt-1",attrs:{"data-test":"item-delete",icon:""},on:{click:function(e){return n.deleteConfig(l)}}},[e("v-icon",[n._v("mdi-delete")])],1)]}}])}),e("v-row",{attrs:{dense:""}},[e("span",{directives:[{name:"show",rawName:"v-show",value:n.error,expression:"error"}],staticClass:"ma-2 red--text",domProps:{textContent:n._s(n.error)}})]),e("v-row",[e("v-btn",{attrs:{type:"submit",color:"success","data-test":"open-config-submit-btn",disabled:!!n.error},on:{click:function(e){return e.preventDefault(),n.success.apply(null,arguments)}}},[n._v(" Ok ")]),e("v-spacer"),e("v-btn",{attrs:{color:"primary","data-test":"open-config-cancel-btn"},on:{click:n.cancel}},[n._v(" Cancel ")])],1)],1)])],1)])],1)}),_=[],y={props:{tool:String,value:Boolean},data:function(){return{configs:[],headers:[{text:"Configuration",value:"config"},{text:"Actions",value:"actions",align:"end",sortable:!1}],search:null,selectedItem:null}},computed:{error:function(){return""===this.selectedItem||null===this.selectedItem?"Must select a config":null},show:{get:function(){return this.value},set:function(n){this.$emit("input",n)}}},mounted:function(){var n=this,e=-1;(new b).list_configs(this.tool).then((function(t){n.configs=t.map((function(n){return e+=1,{configId:e,config:n}}))})).catch((function(e){n.$emit("warning","Failed to connect to OpenC3. ".concat(e))}))},methods:{itemSelected:function(n){n.value?this.selectedItem=n.item:this.selectedItem=null},success:function(){this.$emit("success",this.selectedItem.config),this.show=!1,this.search=null,this.selectedItem=null},cancel:function(){this.show=!1,this.search=null,this.selectedItem=null},deleteConfig:function(n){var e=this;this.$dialog.confirm("Are you sure you want to delete: ".concat(n.config),{okText:"Delete",cancelText:"Cancel"}).then((function(t){e.selectedItem.config===n.config&&(e.selectedItem=null),e.configs.splice(e.configs.indexOf(n),1),(new b).delete_config(e.tool,n.config)})).catch((function(t){t&&e.$emit("warning","Failed to delete config ".concat(n.config," Error: ").concat(t))}))}}},w=y,x=t(3483),T=(0,x.Z)(w,k,_,!1,null,"88421d46",null),N=T.exports,S=function(){var n=this,e=n._self._c;return e("v-dialog",{attrs:{width:"600"},on:{keydown:function(e){return!e.type.indexOf("key")&&n._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:n.cancel.apply(null,arguments)}},model:{value:n.show,callback:function(e){n.show=e},expression:"show"}},[e("v-card",[e("form",{on:{submit:function(e){return e.preventDefault(),n.success.apply(null,arguments)}}},[e("v-system-bar",[e("v-spacer"),e("span",[n._v("Save Configuration")]),e("v-spacer")],1),e("v-card-text",[e("div",{staticClass:"pa-3"},[e("v-row",{attrs:{dense:""}},[e("v-text-field",{attrs:{label:"search",type:"text","data-test":"search","prepend-icon":"mdi-magnify","clear-icon":"mdi-close-circle-outline",clearable:"","single-line":"","hide-details":""},model:{value:n.search,callback:function(e){n.search=e},expression:"search"}})],1),e("v-data-table",{attrs:{"show-select":"","single-select":"","item-key":"configId",search:n.search,headers:n.headers,items:n.configs,"items-per-page":5,"footer-props":{"items-per-page-options":[5]}},on:{"item-selected":n.itemSelected,"click:row":function(n,e){return e.select(n)}},scopedSlots:n._u([{key:"item.actions",fn:function(t){var l=t.item;return[e("v-btn",{staticClass:"mt-1",attrs:{icon:"","data-test":"item-delete"},on:{click:function(e){return n.deleteConfig(l)}}},[e("v-icon",[n._v("mdi-delete")])],1)]}}])}),e("v-row",{attrs:{dense:""}},[e("v-text-field",{attrs:{"hide-details":"",autofocus:"",disabled:!!n.selectedItem,label:"Configuration Name","data-test":"name-input-save-config-dialog"},model:{value:n.configName,callback:function(e){n.configName=e},expression:"configName"}})],1),e("v-row",{attrs:{dense:""}},[e("span",{directives:[{name:"show",rawName:"v-show",value:n.error,expression:"error"}],staticClass:"ma-2 red--text",domProps:{textContent:n._s(n.error)}})]),e("v-row",[e("v-spacer"),e("v-btn",{staticClass:"mx-2",attrs:{outlined:""},on:{click:n.cancel}},[n._v(" Cancel ")]),e("v-btn",{staticClass:"mx-2",attrs:{type:"submit",color:"primary","data-test":"save-config-submit-btn",disabled:!!n.error},on:{click:function(e){return e.preventDefault(),n.success.apply(null,arguments)}}},[n._v(" Ok ")])],1)],1)])],1)])],1)},D=[],P={props:{tool:String,value:Boolean},data:function(){return{configName:"",configs:[],headers:[{text:"Configuration",value:"config"},{text:"Actions",value:"actions",align:"end",sortable:!1}],search:null,selectedItem:null}},computed:{error:function(){return""===this.configName?"Config must have a name":null},show:{get:function(){return this.value},set:function(n){this.$emit("input",n)}}},mounted:function(){var n=this,e=-1;(new b).list_configs(this.tool).then((function(t){n.configs=t.map((function(n){return e+=1,{configId:e,config:n}}))})).catch((function(e){n.$emit("warning","Failed to connect to OpenC3. ".concat(e))}))},methods:{itemSelected:function(n){n.value?(this.selectedItem=n.item,this.configName=n.item.config):(this.selectedItem=null,this.configName="")},success:function(){this.$emit("success",this.configName),this.show=!1,this.search=null,this.selectedItem=null,this.configName=""},cancel:function(){this.show=!1,this.search=null,this.selectedItem=null,this.configName=""},deleteConfig:function(n){var e=this;this.$dialog.confirm("Are you sure you want to delete: ".concat(n.config),{okText:"Delete",cancelText:"Cancel"}).then((function(t){e.configName===n.config&&(e.selectedItem=null,e.configName=""),e.configs.splice(e.configs.indexOf(n.config),1),(new b).delete_config(e.tool,n.config)})).catch((function(t){t&&e.$emit("warning","Failed to delete config ".concat(n.config," Error: ").concat(t))}))}}},O=P,I=(0,x.Z)(O,S,D,!1,null,null,null),M=I.exports,R=(t(4115),t(634),function(){var n=this,e=n._self._c;return e("v-container",{staticClass:"c-chooser px-0"},[e("v-row",[e("v-col",{attrs:{cols:n.colSize,"data-test":"select-target"}},[e("v-autocomplete",{attrs:{label:"Select Target","hide-details":"",dense:"",items:n.targetNames,"item-text":"label","item-value":"value"},on:{change:n.targetNameChanged},model:{value:n.selectedTargetName,callback:function(e){n.selectedTargetName=e},expression:"selectedTargetName"}})],1),e("v-col",{attrs:{cols:n.colSize,"data-test":"select-packet"}},[e("v-autocomplete",{attrs:{label:"Select Packet","hide-details":"",dense:"",disabled:n.packetsDisabled||n.buttonDisabled,items:n.packetNames,"item-text":"label","item-value":"value"},on:{change:n.packetNameChanged},model:{value:n.selectedPacketName,callback:function(e){n.selectedPacketName=e},expression:"selectedPacketName"}})],1),n.chooseItem&&!n.buttonDisabled?e("v-col",{attrs:{cols:n.colSize,"data-test":"select-item"}},[e("v-autocomplete",{attrs:{label:"Select Item","hide-details":"",dense:"",disabled:n.itemsDisabled||n.buttonDisabled,items:n.itemNames,"item-text":"label","item-value":"value"},on:{change:function(e){return n.itemNameChanged(e)}},model:{value:n.selectedItemName,callback:function(e){n.selectedItemName=e},expression:"selectedItemName"}})],1):n._e(),n.buttonText?e("v-col",{attrs:{cols:n.colSize}},[e("v-btn",{attrs:{disabled:n.buttonDisabled,block:"",color:"primary","data-test":"select-send"},on:{click:n.buttonPressed}},[n._v(" "+n._s(n.actualButtonText)+" ")])],1):n._e()],1),e("v-row",{attrs:{"no-gutters":""}},[n.hazardous?e("v-col",{staticClass:"openc3-yellow",attrs:{cols:n.colSize}},[n._v(" Description: "+n._s(n.description)+" (HAZARDOUS) ")]):e("v-col",{attrs:{cols:n.colSize}},[n._v(" Description: "+n._s(n.description)+" ")])],1)],1)}),E=[],L=(t(1951),t(9228),{props:{allowAll:{type:Boolean,default:!1},allowAllTargets:{type:Boolean,default:!1},buttonText:{type:String,default:null},chooseItem:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},initialTargetName:{type:String,default:""},initialPacketName:{type:String,default:""},initialItemName:{type:String,default:""},mode:{type:String,default:"tlm",validator:function(n){return["cmd","tlm"].includes(n)}},reduced:{type:String,default:"DECOM",validator:function(n){return["REDUCED_DAY","REDUCED_HOUR","REDUCED_MINUTE","DECOM"].includes(n)}},unknown:{type:Boolean,default:!1},vertical:{type:Boolean,default:!1}},data:function(){var n,e,t;return{targetNames:[],packetNames:[],itemNames:[],selectedTargetName:null===(n=this.initialTargetName)||void 0===n?void 0:n.toUpperCase(),selectedPacketName:null===(e=this.initialPacketName)||void 0===e?void 0:e.toUpperCase(),selectedItemName:null===(t=this.initialItemName)||void 0===t?void 0:t.toUpperCase(),description:"",hazardous:!1,internalDisabled:!1,packetsDisabled:!1,itemsDisabled:!1,api:null,ALL:{label:"[ ALL ]",value:"ALL",description:"ALL"},UNKNOWN:{label:"[ UNKNOWN ]",value:"UNKNOWN",description:"UNKNOWN"}}},created:function(){var n=this;this.internalDisabled=!0,this.api=new b,this.api.get_target_list().then((function(e){n.targetNames=e.flatMap((function(n){return"UNKNOWN"==n?[]:{label:n,value:n}})),n.allowAllTargets&&n.targetNames.unshift(n.ALL),n.selectedTargetName||(n.selectedTargetName=n.targetNames[0].value,n.targetNameChanged(n.selectedTargetName)),n.updatePackets(),n.unknown&&n.targetNames.push(n.UNKNOWN)}))},computed:{actualButtonText:function(){return"ALL"===this.selectedPacketName?"Add Target":"ALL"===this.selectedItemName?"Add Packet":this.buttonText},buttonDisabled:function(){return this.disabled||this.internalDisabled},targetChooserStyle:function(){return this.chooseItem||this.buttonText?{width:"25%",float:"left","margin-right":"5px"}:{width:"49%",float:"left"}},packetChooserStyle:function(){return this.chooseItem||this.buttonText?{width:"25%",float:"left","margin-right":"5px"}:{width:"50%",float:"right"}},colSize:function(){return!!this.vertical&&12}},watch:{mode:function(n,e){this.updatePackets(),this.itemNames=[]},reduced:function(n,e){this.updateItems()}},methods:{updatePackets:function(){var n=this;if("UNKNOWN"===this.selectedTargetName)return this.packetNames=[this.UNKNOWN],this.selectedPacketName=this.packetNames[0].value,this.packetNameChanged(this.UNKNOWN.value),void(this.description="UNKNOWN");if("ALL"===this.selectedTargetName)return this.packetNames=[this.ALL],this.selectedPacketName=this.packetNames[0].value,this.packetNameChanged(this.ALL.value),void(this.description="ALL");this.internalDisabled=!0;var e="tlm"===this.mode?"get_all_telemetry_names":"get_all_command_names";this.api[e](this.selectedTargetName).then((function(e){n.packetNames=e.map((function(n){return{label:n,value:n}})),n.allowAll&&n.packetNames.unshift(n.ALL),n.selectedPacketName||(n.selectedPacketName=n.packetNames[0].value),n.packetNameChanged(n.selectedPacketName);n.packetNames.find((function(e){return e.value===n.selectedPacketName}));n.chooseItem&&n.updateItems(),n.internalDisabled=!1}))},updateItems:function(){var n=this;if("ALL"!==this.selectedPacketName){this.internalDisabled=!0;var e="tlm"===this.mode?"get_telemetry":"get_command";this.api[e](this.selectedTargetName,this.selectedPacketName).then((function(e){n.itemNames=e.items.map((function(e){return"DECOM"===n.reduced?[{label:e.name,value:e.name,description:e.description}]:n.makeReducedItems(e)})).reduce((function(n,e){return n.concat(e)}),[]),n.allowAll&&n.itemNames.unshift(n.ALL),n.selectedItemName||(n.selectedItemName=n.itemNames[0].value),n.description=n.itemNames[0].description,n.internalDisabled=!1,n.$emit("on-set",{targetName:n.selectedTargetName,packetName:n.selectedPacketName,itemName:n.selectedItemName,reduced:n.reduced})}))}},makeReducedItems:function(n){var e=!n.array_size&&!n.states;return e&&["UINT","INT","FLOAT"].includes(n.data_type)?["MIN","MAX","AVG","STDDEV"].map((function(e){return{label:"".concat(n.name,"_").concat(e),value:"".concat(n.name,"_").concat(e),description:"".concat(e," ").concat(n.description)}})):[]},targetNameChanged:function(n){this.selectedTargetName=n,this.selectedPacketName="",this.selectedItemName="",this.updatePackets()},packetNameChanged:function(n){var e=this;if("ALL"===n)this.itemsDisabled=!0,this.internalDisabled=!1;else{this.itemsDisabled=!1;var t=this.packetNames.find((function(e){return n===e.value}));this.selectedPacketName=t.value;var l="tlm"===this.mode?"get_telemetry":"get_command";this.api[l](this.selectedTargetName,this.selectedPacketName).then((function(n){e.description=n.description,e.hazardous=n.hazardous}))}this.chooseItem?(this.selectedItemName="",this.updateItems()):this.$emit("on-set",{targetName:this.selectedTargetName,packetName:this.selectedPacketName,reduced:this.reduced})},itemNameChanged:function(n){var e=this.itemNames.find((function(e){return n===e.value}));this.selectedItemName=e.value,this.description=e.description,this.$emit("on-set",{targetName:this.selectedTargetName,packetName:this.selectedPacketName,itemName:this.selectedItemName,reduced:this.reduced})},buttonPressed:function(){"ALL"===this.selectedPacketName?this.allTargetPacketItems():"ALL"===this.selectedItemName?this.allPacketItems():this.chooseItem?this.$emit("click",{targetName:this.selectedTargetName,packetName:this.selectedPacketName,itemName:this.selectedItemName,reduced:this.reduced}):this.$emit("click",{targetName:this.selectedTargetName,packetName:this.selectedPacketName,reduced:this.reduced})},allTargetPacketItems:function(){var n=this;this.packetNames.forEach((function(e){if(e!==n.ALL){var t="tlm"===n.mode?"get_telemetry":"get_command";n.api[t](n.selectedTargetName,e.value).then((function(t){t.items.forEach((function(t){n.$emit("click",{targetName:n.selectedTargetName,packetName:e.value,itemName:t["name"],reduced:n.reduced})}))}))}}))},allPacketItems:function(){var n=this;this.itemNames.forEach((function(e){e!==n.ALL&&n.$emit("click",{targetName:n.selectedTargetName,packetName:n.selectedPacketName,itemName:e.value,reduced:n.reduced})}))}}}),$=L,F=(t(2003),(0,x.Z)($,R,E,!1,null,null,null)),V=F.exports,U=t(7146);U.ju.staleThreshold=10;var Z=function(){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/openc3-api/cable";(0,m.Z)(this,n),this._cable=U.zD(e)}return(0,d.Z)(n,[{key:"disconnect",value:function(){this._cable.disconnect()}},{key:"createSubscription",value:function(n,e){var t=this,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then((function(){return t._cable.subscriptions.create((0,s.Z)({channel:n,scope:e,token:localStorage.openc3Token},o),l)}))}},{key:"recordPing",value:function(){this._cable.connection.monitor.recordPing()}}]),n}(),j=function(){var n=this,e=n._self._c;return e("mounting-portal",{attrs:{"mount-to":"#openc3-menu",append:""}},[e("div",{staticClass:"v-toolbar__content"},[n._l(n.menus,(function(t,l){return e("v-menu",{key:l,attrs:{"offset-y":""},scopedSlots:n._u([{key:"activator",fn:function(l){var o=l.on,i=l.attrs;return[e("v-btn",n._g(n._b({staticClass:"mx-1",attrs:{outlined:"","data-test":n.formatDT("".concat(n.title," ").concat(t.label))}},"v-btn",i,!1),o),[e("span",{domProps:{textContent:n._s(t.label)}}),e("v-icon",{attrs:{right:""}},[n._v(" mdi-menu-down ")])],1)]}}],null,!0)},[e("v-list",[e("v-radio-group",{staticClass:"ma-0 pa-0",attrs:{value:t.radioGroup,"hide-details":"",dense:""}},[n._l(t.items,(function(l,o){return[l.divider?e("v-divider"):e("v-list-item",{key:o,attrs:{disabled:l.disabled,"data-test":n.formatDT("".concat(n.title," ").concat(t.label," ").concat(l.label))},on:{click:function(n){return l.command(l)}}},[l.radio?e("v-list-item-action",[e("v-radio",{attrs:{color:"secondary",label:l.label,value:l.label}})],1):n._e(),l.checkbox?e("v-list-item-action",[e("v-checkbox",{attrs:{color:"secondary",label:l.label},model:{value:l.checked,callback:function(e){n.$set(l,"checked",e)},expression:"option.checked"}})],1):n._e(),l.icon?e("v-list-item-icon",[e("v-icon",{attrs:{disabled:l.disabled}},[n._v(n._s(l.icon))])],1):n._e(),l.radio||l.checkbox?n._e():e("v-list-item-title",{style:"cursor: pointer;"+(l.disabled?"opacity: 0.2":"")},[n._v(n._s(l.label))])],1)]}))],2)],1)],1)})),e("v-spacer"),e("v-toolbar-title",[n._v(n._s(n.title))]),e("v-spacer")],2)])},B=[],W=(t(5940),t(1639),{props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},methods:{formatDT:function(n){return n.replaceAll(" ","-").toLowerCase()}},mounted:function(){"COSMOS "===this.title.substring(0,7)?document.title=this.title.substring(7):document.title=this.title}}),z=W,H=(t(4888),(0,x.Z)(z,j,B,!1,null,"2eb37f67",null)),K=H.exports;function Y(){var n="/openc3/plugins/packages/openc3-cosmos-tool-dataviewer/src/tools/DataViewer/DumpComponent.vue",e="38575d9d3edd84859534fc46b6613f3b6203bbff",t=new Function("return this")(),l="__coverage__",o={path:"/openc3/plugins/packages/openc3-cosmos-tool-dataviewer/src/tools/DataViewer/DumpComponent.vue",statementMap:{0:{start:{line:1,column:13},end:{line:2,column:1}},1:{start:{line:1,column:39},end:{line:1,column:43}},2:{start:{line:1,column:47},end:{line:1,column:59}},3:{start:{line:1,column:60},end:{line:1,column:4427}},4:{start:{line:1,column:337},end:{line:1,column:355}},5:{start:{line:1,column:709},end:{line:1,column:728}},6:{start:{line:1,column:1222},end:{line:1,column:1438}},7:{start:{line:1,column:1761},end:{line:1,column:1803}},8:{start:{line:1,column:2215},end:{line:1,column:2262}},9:{start:{line:1,column:2728},end:{line:1,column:2779}},10:{start:{line:1,column:3009},end:{line:1,column:3058}},11:{start:{line:1,column:3377},end:{line:1,column:3425}},12:{start:{line:1,column:3806},end:{line:1,column:3855}},13:{start:{line:3,column:22},end:{line:3,column:24}}},fnMap:{0:{name:"render",decl:{start:{line:1,column:22},end:{line:1,column:28}},loc:{start:{line:1,column:30},end:{line:2,column:1}},line:1},1:{name:"(anonymous_1)",decl:{start:{line:1,column:321},end:{line:1,column:322}},loc:{start:{line:1,column:336},end:{line:1,column:356}},line:1},2:{name:"(anonymous_2)",decl:{start:{line:1,column:693},end:{line:1,column:694}},loc:{start:{line:1,column:708},end:{line:1,column:729}},line:1},3:{name:"(anonymous_3)",decl:{start:{line:1,column:1198},end:{line:1,column:1199}},loc:{start:{line:1,column:1221},end:{line:1,column:1439}},line:1},4:{name:"(anonymous_4)",decl:{start:{line:1,column:1745},end:{line:1,column:1746}},loc:{start:{line:1,column:1760},end:{line:1,column:1804}},line:1},5:{name:"(anonymous_5)",decl:{start:{line:1,column:2199},end:{line:1,column:2200}},loc:{start:{line:1,column:2214},end:{line:1,column:2263}},line:1},6:{name:"(anonymous_6)",decl:{start:{line:1,column:2712},end:{line:1,column:2713}},loc:{start:{line:1,column:2727},end:{line:1,column:2780}},line:1},7:{name:"(anonymous_7)",decl:{start:{line:1,column:2993},end:{line:1,column:2994}},loc:{start:{line:1,column:3008},end:{line:1,column:3059}},line:1},8:{name:"(anonymous_8)",decl:{start:{line:1,column:3361},end:{line:1,column:3362}},loc:{start:{line:1,column:3376},end:{line:1,column:3426}},line:1},9:{name:"(anonymous_9)",decl:{start:{line:1,column:3790},end:{line:1,column:3791}},loc:{start:{line:1,column:3805},end:{line:1,column:3856}},line:1}},branchMap:{0:{loc:{start:{line:1,column:1610},end:{line:1,column:2066}},type:"cond-expr",locations:[{start:{line:1,column:1631},end:{line:1,column:2057}},{start:{line:1,column:2058},end:{line:1,column:2066}}],line:1},1:{loc:{start:{line:1,column:2531},end:{line:1,column:2835}},type:"cond-expr",locations:[{start:{line:1,column:2552},end:{line:1,column:2826}},{start:{line:1,column:2827},end:{line:1,column:2835}}],line:1},2:{loc:{start:{line:1,column:3120},end:{line:1,column:3478}},type:"cond-expr",locations:[{start:{line:1,column:3141},end:{line:1,column:3469}},{start:{line:1,column:3470},end:{line:1,column:3478}}],line:1},3:{loc:{start:{line:1,column:4282},end:{line:1,column:4405}},type:"cond-expr",locations:[{start:{line:1,column:4295},end:{line:1,column:4349}},{start:{line:1,column:4350},end:{line:1,column:4405}}],line:1}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"38575d9d3edd84859534fc46b6613f3b6203bbff"},i=t[l]||(t[l]={});i[n]&&i[n].hash===e||(i[n]=o);var a=i[n];return Y=function(){return a},a}Y(),Y().s[0]++;var q=function(){Y().f[0]++;var n=(Y().s[1]++,this),e=(Y().s[2]++,n._self._c);return Y().s[3]++,e("v-container",{staticClass:"pt-0"},[e("v-row",{attrs:{dense:""}},[e("v-col",[e("v-text-field",{staticClass:"pt-0 mt-0",attrs:{label:"Search","append-icon":"mdi-magnify","single-line":"","hide-details":""},model:{value:n.filterText,callback:function(e){Y().f[1]++,Y().s[4]++,n.filterText=e},expression:"filterText"}})],1)],1),e("v-row",[e("v-col",[e("v-slider",{attrs:{"prepend-icon":"mdi-step-backward","append-icon":"mdi-step-forward",min:1-n.history.length,max:0,"hide-details":""},on:{mousedown:n.pause,"click:prepend":n.stepBackward,"click:append":n.stepForward},model:{value:n.pauseOffset,callback:function(e){Y().f[2]++,Y().s[5]++,n.pauseOffset=e},expression:"pauseOffset"}})],1)],1),e("v-row",{attrs:{dense:"","no-gutters":""}},[e("v-col",[e("div",{staticClass:"text-area-container"},[e("v-textarea",{ref:"textarea",attrs:{value:n.displayText,readonly:"",solo:"",flat:"","hide-details":"","data-test":"dump-component-text-area"}}),e("div",{staticClass:"floating-buttons"},[e("v-menu",{attrs:{"close-on-content-click":!1,"min-width":900,"nudge-left":910},scopedSlots:n._u([{key:"activator",fn:function(t){var l=t.on,o=t.attrs;return Y().f[3]++,Y().s[6]++,[e("v-btn",n._g(n._b({staticClass:"ml-2",attrs:{color:"secondary",fab:"",small:"","data-test":"dump-component-open-settings"}},"v-btn",o,!1),l),[e("v-icon",[n._v("$astro-settings")])],1)]}}])},[e("v-card",[e("v-card-title",{attrs:{"data-test":"display-settings-card"}},[n._v(" Display settings ")]),e("v-card-text",[e("v-row",{attrs:{"no-gutters":""}},["RAW"===n.mode?(Y().b[0][0]++,e("v-col",[e("v-radio-group",{attrs:{label:"Display format"},model:{value:n.currentConfig.format,callback:function(e){Y().f[4]++,Y().s[7]++,n.$set(n.currentConfig,"format",e)},expression:"currentConfig.format"}},[e("v-radio",{attrs:{label:"Hex",value:"hex","data-test":"dump-component-settings-format-hex"}}),e("v-radio",{attrs:{label:"ASCII",value:"ascii","data-test":"dump-component-settings-format-ascii"}})],1)],1)):(Y().b[0][1]++,n._e()),e("v-col",[e("v-radio-group",{attrs:{label:"Print newest packets to the"},model:{value:n.currentConfig.newestAtTop,callback:function(e){Y().f[5]++,Y().s[8]++,n.$set(n.currentConfig,"newestAtTop",e)},expression:"currentConfig.newestAtTop"}},[e("v-radio",{attrs:{label:"Top",value:"","data-test":"dump-component-settings-newest-top"}}),e("v-radio",{attrs:{label:"Bottom",value:!1,"data-test":"dump-component-settings-newest-bottom"}})],1)],1),e("v-col",["RAW"===n.mode?(Y().b[1][0]++,e("v-switch",{attrs:{label:"Show line address","data-test":"dump-component-settings-show-address"},model:{value:n.currentConfig.showLineAddress,callback:function(e){Y().f[6]++,Y().s[9]++,n.$set(n.currentConfig,"showLineAddress",e)},expression:"currentConfig.showLineAddress"}})):(Y().b[1][1]++,n._e()),e("v-switch",{attrs:{label:"Show timestamp","data-test":"dump-component-settings-show-timestamp"},model:{value:n.currentConfig.showTimestamp,callback:function(e){Y().f[7]++,Y().s[10]++,n.$set(n.currentConfig,"showTimestamp",e)},expression:"currentConfig.showTimestamp"}})],1),e("v-col",["RAW"===n.mode?(Y().b[2][0]++,e("v-text-field",{attrs:{label:"Bytes per line",type:"number",min:"1","data-test":"dump-component-settings-num-bytes"},on:{change:n.validateBytesPerLine},model:{value:n.currentConfig.bytesPerLine,callback:function(e){Y().f[8]++,Y().s[11]++,n.$set(n.currentConfig,"bytesPerLine",e)},expression:"currentConfig.bytesPerLine"}})):(Y().b[2][1]++,n._e()),e("v-text-field",{attrs:{label:"Packets to show",type:"number",hint:"Maximum: ".concat(this.history.length),"persistent-hint":"",min:1,max:this.history.length,"data-test":"dump-component-settings-num-packets"},on:{change:n.validatePacketsToShow},model:{value:n.currentConfig.packetsToShow,callback:function(e){Y().f[9]++,Y().s[12]++,n.$set(n.currentConfig,"packetsToShow",e)},expression:"currentConfig.packetsToShow"}})],1)],1)],1)],1)],1),e("v-btn",{staticClass:"ml-2",attrs:{color:"secondary",fab:"",small:"","data-test":"dump-component-download"},on:{click:n.download}},[e("v-icon",[n._v("mdi-file-download")])],1),e("v-btn",{staticClass:"ml-2",class:{pulse:n.paused},attrs:{color:"primary",fab:"","data-test":"dump-component-play-pause"},on:{click:n.togglePlayPause}},[n.paused?(Y().b[3][0]++,e("v-icon",{attrs:{large:""}},[n._v("mdi-play")])):(Y().b[3][1]++,e("v-icon",{attrs:{large:""}},[n._v("mdi-pause")]))],1)],1)],1)])],1)],1)},G=(Y().s[13]++,[]),X=t(615),J=(t(4707),t(1497),t(5640),t(1871),t(2501),t(5342),t(6886),t(4121),t(523),t(6635)),Q=t.n(J);function nn(){var n="/openc3/plugins/packages/openc3-cosmos-tool-dataviewer/src/tools/DataViewer/Component.js",e="48c2214403f85b01c7e4a598949cb1852166f23f",t=new Function("return this")(),l="__coverage__",o={path:"/openc3/plugins/packages/openc3-cosmos-tool-dataviewer/src/tools/DataViewer/Component.js",statementMap:{0:{start:{line:30,column:4},end:{line:33,column:5}},1:{start:{line:37,column:6},end:{line:41,column:17}},2:{start:{line:48,column:8},end:{line:48,column:40}},3:{start:{line:53,column:4},end:{line:57,column:5}},4:{start:{line:54,column:6},end:{line:56,column:7}},5:{start:{line:63,column:6},end:{line:63,column:30}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:29,column:8},end:{line:29,column:9}},loc:{start:{line:29,column:20},end:{line:34,column:3}},line:29},1:{name:"(anonymous_1)",decl:{start:{line:36,column:10},end:{line:36,column:11}},loc:{start:{line:36,column:22},end:{line:42,column:5}},line:36},2:{name:"(anonymous_2)",decl:{start:{line:47,column:15},end:{line:47,column:16}},loc:{start:{line:47,column:30},end:{line:49,column:7}},line:47},3:{name:"(anonymous_3)",decl:{start:{line:52,column:11},end:{line:52,column:12}},loc:{start:{line:52,column:23},end:{line:58,column:3}},line:52},4:{name:"(anonymous_4)",decl:{start:{line:60,column:13},end:{line:60,column:14}},loc:{start:{line:60,column:29},end:{line:64,column:5}},line:60}},branchMap:{0:{loc:{start:{line:37,column:13},end:{line:41,column:17}},type:"cond-expr",locations:[{start:{line:40,column:10},end:{line:40,column:15}},{start:{line:41,column:10},end:{line:41,column:17}}],line:37},1:{loc:{start:{line:37,column:13},end:{line:39,column:40}},type:"binary-expr",locations:[{start:{line:37,column:13},end:{line:37,column:30}},{start:{line:38,column:8},end:{line:38,column:36}},{start:{line:39,column:8},end:{line:39,column:40}}],line:37},2:{loc:{start:{line:53,column:4},end:{line:57,column:5}},type:"if",locations:[{start:{line:53,column:4},end:{line:57,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:53}},s:{0:0,1:0,2:0,3:0,4:0,5:0},f:{0:0,1:0,2:0,3:0,4:0},b:{0:[0,0],1:[0,0,0],2:[0,0]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"48c2214403f85b01c7e4a598949cb1852166f23f"},i=t[l]||(t[l]={});i[n]&&i[n].hash===e||(i[n]=o);var a=i[n];return nn=function(){return a},a}nn();var en={props:{config:{type:Object}},data:function(){return nn().f[0]++,nn().s[0]++,{currentConfig:{},lastReceived:null}},computed:{mode:function(){return nn().f[1]++,nn().s[1]++,nn().b[1][0]++,this.lastReceived&&(nn().b[1][1]++,this.lastReceived.length>0)&&(nn().b[1][2]++,"buffer"in this.lastReceived[0])?(nn().b[0][0]++,"RAW"):(nn().b[0][1]++,"DECOM")}},watch:{currentConfig:{deep:!0,handler:function(n){nn().f[2]++,nn().s[2]++,this.$emit("config-change",n)}}},created:function(){nn().f[3]++,nn().s[3]++,this.config?(nn().b[2][0]++,nn().s[4]++,this.currentConfig=(0,s.Z)({},this.config)):nn().b[2][1]++},methods:{receive:function(n){nn().f[4]++,nn().s[5]++,this.lastReceived=n}}};function tn(){var n="/openc3/plugins/packages/openc3-cosmos-tool-dataviewer/src/tools/DataViewer/DumpComponent.vue",e="1e43f9a2d433379cf4434c6dbf617b9d5e598b63",t=new Function("return this")(),l="__coverage__",o={path:"/openc3/plugins/packages/openc3-cosmos-tool-dataviewer/src/tools/DataViewer/DumpComponent.vue",statementMap:{0:{start:{line:6,column:25},end:{line:6,column:28}},1:{start:{line:11,column:4},end:{line:22,column:5}},2:{start:{line:28,column:6},end:{line:28,column:171}},3:{start:{line:31,column:6},end:{line:31,column:104}},4:{start:{line:36,column:6},end:{line:58,column:8}},5:{start:{line:37,column:8},end:{line:37,column:28}},6:{start:{line:38,column:22},end:{line:40,column:9}},7:{start:{line:41,column:8},end:{line:43,column:9}},8:{start:{line:42,column:10},end:{line:42,column:46}},9:{start:{line:44,column:8},end:{line:44,column:73}},10:{start:{line:45,column:8},end:{line:45,column:51}},11:{start:{line:46,column:8},end:{line:57,column:9}},12:{start:{line:47,column:29},end:{line:47,column:62}},13:{start:{line:48,column:10},end:{line:56,column:11}},14:{start:{line:49,column:12},end:{line:55,column:13}},15:{start:{line:50,column:14},end:{line:50,column:43}},16:{start:{line:51,column:19},end:{line:55,column:13}},17:{start:{line:52,column:14},end:{line:52,column:71}},18:{start:{line:54,column:14},end:{line:54,column:53}},19:{start:{line:59,column:6},end:{line:59,column:28}},20:{start:{line:60,column:6},end:{line:62,column:7}},21:{start:{line:61,column:8},end:{line:61,column:35}},22:{start:{line:65,column:6},end:{line:71,column:7}},23:{start:{line:66,column:8},end:{line:66,column:43}},24:{start:{line:67,column:8},end:{line:67,column:49}},25:{start:{line:69,column:8},end:{line:69,column:28}},26:{start:{line:70,column:8},end:{line:70,column:33}},27:{start:{line:74,column:6},end:{line:74,column:31}},28:{start:{line:77,column:6},end:{line:77,column:31}},29:{start:{line:81,column:26},end:{line:88,column:5}},30:{start:{line:89,column:4},end:{line:92,column:5}},31:{start:{line:95,column:4},end:{line:95,column:75}},32:{start:{line:100,column:6},end:{line:111,column:7}},33:{start:{line:101,column:8},end:{line:104,column:9}},34:{start:{line:106,column:8},end:{line:110,column:9}},35:{start:{line:116,column:8},end:{line:116,column:60}},36:{start:{line:117,column:6},end:{line:120,column:8}},37:{start:{line:118,column:8},end:{line:119,column:58}},38:{start:{line:123,column:20},end:{line:123,column:67}},39:{start:{line:125,column:25},end:{line:125,column:74}},40:{start:{line:126,column:6},end:{line:131,column:35}},41:{start:{line:127,column:28},end:{line:127,column:34}},42:{start:{line:132,column:6},end:{line:136,column:7}},43:{start:{line:134,column:31},end:{line:134,column:77}},44:{start:{line:135,column:8},end:{line:135,column:50}},45:{start:{line:138,column:18},end:{line:138,column:63}},46:{start:{line:139,column:6},end:{line:139,column:35}},47:{start:{line:140,column:6},end:{line:142,column:7}},48:{start:{line:141,column:8},end:{line:141,column:35}},49:{start:{line:143,column:6},end:{line:143,column:45}},50:{start:{line:146,column:6},end:{line:146,column:71}},51:{start:{line:149,column:17},end:{line:149,column:19}},52:{start:{line:150,column:6},end:{line:159,column:7}},53:{start:{line:151,column:29},end:{line:151,column:52}},54:{start:{line:152,column:32},end:{line:152,column:64}},55:{start:{line:153,column:29},end:{line:153,column:65}},56:{start:{line:154,column:24},end:{line:154,column:72}},57:{start:{line:155,column:8},end:{line:155,column:63}},58:{start:{line:156,column:8},end:{line:156,column:57}},59:{start:{line:157,column:8},end:{line:157,column:69}},60:{start:{line:158,column:8},end:{line:158,column:36}},61:{start:{line:160,column:6},end:{line:194,column:7}},62:{start:{line:162,column:8},end:{line:188,column:21}},63:{start:{line:165,column:30},end:{line:165,column:32}},64:{start:{line:166,column:12},end:{line:177,column:13}},65:{start:{line:167,column:14},end:{line:172,column:15}},66:{start:{line:168,column:16},end:{line:171,column:35}},67:{start:{line:174,column:14},end:{line:176,column:15}},68:{start:{line:175,column:16},end:{line:175,column:64}},69:{start:{line:178,column:23},end:{line:178,column:44}},70:{start:{line:180,column:12},end:{line:185,column:13}},71:{start:{line:181,column:30},end:{line:183,column:33}},72:{start:{line:184,column:14},end:{line:184,column:42}},73:{start:{line:186,column:12},end:{line:186,column:23}},74:{start:{line:190,column:8},end:{line:193,column:21}},75:{start:{line:191,column:28},end:{line:191,column:52}},76:{start:{line:192,column:25},end:{line:192,column:51}},77:{start:{line:195,column:6},end:{line:195,column:35}},78:{start:{line:196,column:6},end:{line:196,column:17}},79:{start:{line:199,column:6},end:{line:201,column:7}},80:{start:{line:200,column:8},end:{line:200,column:43}},81:{start:{line:204,column:6},end:{line:208,column:7}},82:{start:{line:205,column:8},end:{line:205,column:62}},83:{start:{line:206,column:13},end:{line:208,column:7}},84:{start:{line:207,column:8},end:{line:207,column:44}},85:{start:{line:211,column:19},end:{line:213,column:8}},86:{start:{line:215,column:19},end:{line:215,column:46}},87:{start:{line:216,column:16},end:{line:216,column:41}},88:{start:{line:217,column:6},end:{line:217,column:21}},89:{start:{line:218,column:6},end:{line:221,column:7}},90:{start:{line:222,column:6},end:{line:222,column:18}},91:{start:{line:223,column:6},end:{line:223,column:37}},92:{start:{line:226,column:6},end:{line:226,column:24}},93:{start:{line:229,column:6},end:{line:229,column:32}},94:{start:{line:232,column:6},end:{line:232,column:18}},95:{start:{line:233,column:6},end:{line:233,column:24}},96:{start:{line:236,column:6},end:{line:236,column:18}},97:{start:{line:237,column:6},end:{line:237,column:24}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:10,column:8},end:{line:10,column:9}},loc:{start:{line:10,column:20},end:{line:23,column:3}},line:10},1:{name:"(anonymous_1)",decl:{start:{line:27,column:24},end:{line:27,column:25}},loc:{start:{line:27,column:36},end:{line:29,column:5}},line:27},2:{name:"(anonymous_2)",decl:{start:{line:30,column:26},end:{line:30,column:27}},loc:{start:{line:30,column:38},end:{line:32,column:5}},line:30},3:{name:"(anonymous_3)",decl:{start:{line:35,column:18},end:{line:35,column:19}},loc:{start:{line:35,column:34},end:{line:63,column:5}},line:35},4:{name:"(anonymous_4)",decl:{start:{line:36,column:19},end:{line:36,column:20}},loc:{start:{line:36,column:31},end:{line:58,column:7}},line:36},5:{name:"(anonymous_5)",decl:{start:{line:64,column:12},end:{line:64,column:13}},loc:{start:{line:64,column:27},end:{line:72,column:5}},line:64},6:{name:"(anonymous_6)",decl:{start:{line:73,column:24},end:{line:73,column:25}},loc:{start:{line:73,column:36},end:{line:75,column:5}},line:73},7:{name:"(anonymous_7)",decl:{start:{line:76,column:37},end:{line:76,column:38}},loc:{start:{line:76,column:49},end:{line:78,column:5}},line:76},8:{name:"(anonymous_8)",decl:{start:{line:80,column:11},end:{line:80,column:12}},loc:{start:{line:80,column:23},end:{line:93,column:3}},line:80},9:{name:"(anonymous_9)",decl:{start:{line:94,column:11},end:{line:94,column:12}},loc:{start:{line:94,column:23},end:{line:96,column:3}},line:94},10:{name:"(anonymous_10)",decl:{start:{line:98,column:21},end:{line:98,column:22}},loc:{start:{line:98,column:33},end:{line:112,column:5}},line:98},11:{name:"(anonymous_11)",decl:{start:{line:113,column:26},end:{line:113,column:27}},loc:{start:{line:113,column:38},end:{line:121,column:5}},line:113},12:{name:"(anonymous_12)",decl:{start:{line:117,column:21},end:{line:117,column:22}},loc:{start:{line:117,column:27},end:{line:120,column:7}},line:117},13:{name:"(anonymous_13)",decl:{start:{line:122,column:24},end:{line:122,column:25}},loc:{start:{line:122,column:36},end:{line:144,column:5}},line:122},14:{name:"(anonymous_14)",decl:{start:{line:127,column:16},end:{line:127,column:17}},loc:{start:{line:127,column:28},end:{line:127,column:34}},line:127},15:{name:"(anonymous_15)",decl:{start:{line:145,column:19},end:{line:145,column:20}},loc:{start:{line:145,column:35},end:{line:147,column:5}},line:145},16:{name:"(anonymous_16)",decl:{start:{line:148,column:25},end:{line:148,column:26}},loc:{start:{line:148,column:43},end:{line:197,column:5}},line:148},17:{name:"(anonymous_17)",decl:{start:{line:163,column:15},end:{line:163,column:16}},loc:{start:{line:163,column:37},end:{line:187,column:11}},line:163},18:{name:"(anonymous_18)",decl:{start:{line:167,column:42},end:{line:167,column:43}},loc:{start:{line:168,column:16},end:{line:171,column:35}},line:168},19:{name:"(anonymous_19)",decl:{start:{line:174,column:42},end:{line:174,column:43}},loc:{start:{line:175,column:16},end:{line:175,column:64}},line:175},20:{name:"(anonymous_20)",decl:{start:{line:191,column:18},end:{line:191,column:19}},loc:{start:{line:191,column:28},end:{line:191,column:52}},line:191},21:{name:"(anonymous_21)",decl:{start:{line:192,column:15},end:{line:192,column:16}},loc:{start:{line:192,column:25},end:{line:192,column:51}},line:192},22:{name:"(anonymous_22)",decl:{start:{line:198,column:26},end:{line:198,column:27}},loc:{start:{line:198,column:38},end:{line:202,column:5}},line:198},23:{name:"(anonymous_23)",decl:{start:{line:203,column:27},end:{line:203,column:28}},loc:{start:{line:203,column:39},end:{line:209,column:5}},line:203},24:{name:"(anonymous_24)",decl:{start:{line:210,column:14},end:{line:210,column:15}},loc:{start:{line:210,column:26},end:{line:224,column:5}},line:210},25:{name:"(anonymous_25)",decl:{start:{line:225,column:11},end:{line:225,column:12}},loc:{start:{line:225,column:23},end:{line:227,column:5}},line:225},26:{name:"(anonymous_26)",decl:{start:{line:228,column:21},end:{line:228,column:22}},loc:{start:{line:228,column:33},end:{line:230,column:5}},line:228},27:{name:"(anonymous_27)",decl:{start:{line:231,column:18},end:{line:231,column:19}},loc:{start:{line:231,column:30},end:{line:234,column:5}},line:231},28:{name:"(anonymous_28)",decl:{start:{line:235,column:17},end:{line:235,column:18}},loc:{start:{line:235,column:29},end:{line:238,column:5}},line:235}},branchMap:{0:{loc:{start:{line:41,column:8},end:{line:43,column:9}},type:"if",locations:[{start:{line:41,column:8},end:{line:43,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:41},1:{loc:{start:{line:46,column:8},end:{line:57,column:9}},type:"if",locations:[{start:{line:46,column:8},end:{line:57,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:46},2:{loc:{start:{line:48,column:10},end:{line:56,column:11}},type:"if",locations:[{start:{line:48,column:10},end:{line:56,column:11}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:48},3:{loc:{start:{line:49,column:12},end:{line:55,column:13}},type:"if",locations:[{start:{line:49,column:12},end:{line:55,column:13}},{start:{line:51,column:19},end:{line:55,column:13}}],line:49},4:{loc:{start:{line:51,column:19},end:{line:55,column:13}},type:"if",locations:[{start:{line:51,column:19},end:{line:55,column:13}},{start:{line:53,column:19},end:{line:55,column:13}}],line:51},5:{loc:{start:{line:60,column:6},end:{line:62,column:7}},type:"if",locations:[{start:{line:60,column:6},end:{line:62,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:60},6:{loc:{start:{line:60,column:10},end:{line:60,column:57}},type:"binary-expr",locations:[{start:{line:60,column:10},end:{line:60,column:22}},{start:{line:60,column:26},end:{line:60,column:57}}],line:60},7:{loc:{start:{line:65,column:6},end:{line:71,column:7}},type:"if",locations:[{start:{line:65,column:6},end:{line:71,column:7}},{start:{line:68,column:13},end:{line:71,column:7}}],line:65},8:{loc:{start:{line:100,column:6},end:{line:111,column:7}},type:"if",locations:[{start:{line:100,column:6},end:{line:111,column:7}},{start:{line:105,column:13},end:{line:111,column:7}}],line:100},9:{loc:{start:{line:123,column:20},end:{line:123,column:67}},type:"cond-expr",locations:[{start:{line:123,column:34},end:{line:123,column:52}},{start:{line:123,column:55},end:{line:123,column:67}}],line:123},10:{loc:{start:{line:125,column:25},end:{line:125,column:74}},type:"cond-expr",locations:[{start:{line:125,column:39},end:{line:125,column:52}},{start:{line:125,column:55},end:{line:125,column:74}}],line:125},11:{loc:{start:{line:132,column:6},end:{line:136,column:7}},type:"if",locations:[{start:{line:132,column:6},end:{line:136,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:132},12:{loc:{start:{line:140,column:6},end:{line:142,column:7}},type:"if",locations:[{start:{line:140,column:6},end:{line:142,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:140},13:{loc:{start:{line:150,column:6},end:{line:159,column:7}},type:"if",locations:[{start:{line:150,column:6},end:{line:159,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:150},14:{loc:{start:{line:160,column:6},end:{line:194,column:7}},type:"if",locations:[{start:{line:160,column:6},end:{line:194,column:7}},{start:{line:189,column:13},end:{line:194,column:7}}],line:160},15:{loc:{start:{line:166,column:12},end:{line:177,column:13}},type:"if",locations:[{start:{line:166,column:12},end:{line:177,column:13}},{start:{line:173,column:19},end:{line:177,column:13}}],line:166},16:{loc:{start:{line:180,column:12},end:{line:185,column:13}},type:"if",locations:[{start:{line:180,column:12},end:{line:185,column:13}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:180},17:{loc:{start:{line:199,column:6},end:{line:201,column:7}},type:"if",locations:[{start:{line:199,column:6},end:{line:201,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:199},18:{loc:{start:{line:204,column:6},end:{line:208,column:7}},type:"if",locations:[{start:{line:204,column:6},end:{line:208,column:7}},{start:{line:206,column:13},end:{line:208,column:7}}],line:204},19:{loc:{start:{line:206,column:13},end:{line:208,column:7}},type:"if",locations:[{start:{line:206,column:13},end:{line:208,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:206}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0,54:0,55:0,56:0,57:0,58:0,59:0,60:0,61:0,62:0,63:0,64:0,65:0,66:0,67:0,68:0,69:0,70:0,71:0,72:0,73:0,74:0,75:0,76:0,77:0,78:0,79:0,80:0,81:0,82:0,83:0,84:0,85:0,86:0,87:0,88:0,89:0,90:0,91:0,92:0,93:0,94:0,95:0,96:0,97:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0],11:[0,0],12:[0,0],13:[0,0],14:[0,0],15:[0,0],16:[0,0],17:[0,0],18:[0,0],19:[0,0]},inputSourceMap:{version:3,sources:["DumpComponent.vue"],names:[],mappings:";AA8LA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"DumpComponent.vue",sourceRoot:"src/tools/DataViewer",sourcesContent:['\x3c!--\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n\n# Modified by OpenC3, Inc.\n# All changes Copyright 2022, OpenC3, Inc.\n# All Rights Reserved\n#\n# This file may also be used under the terms of a commercial license\n# if purchased from OpenC3, Inc.\n--\x3e\n\n<template>\n <v-container class="pt-0">\n <v-row dense>\n <v-col>\n <v-text-field\n v-model="filterText"\n class="pt-0 mt-0"\n label="Search"\n append-icon="mdi-magnify"\n single-line\n hide-details\n />\n </v-col>\n </v-row>\n <v-row>\n <v-col>\n <v-slider\n v-model="pauseOffset"\n v-on:mousedown="pause"\n @click:prepend="stepBackward"\n @click:append="stepForward"\n prepend-icon="mdi-step-backward"\n append-icon="mdi-step-forward"\n :min="1 - history.length"\n :max="0"\n hide-details\n />\n </v-col>\n </v-row>\n <v-row dense no-gutters>\n <v-col>\n <div class="text-area-container">\n <v-textarea\n ref="textarea"\n :value="displayText"\n readonly\n solo\n flat\n hide-details\n data-test="dump-component-text-area"\n />\n <div class="floating-buttons">\n <v-menu\n :close-on-content-click="false"\n :min-width="900"\n :nudge-left="910"\n >\n <template v-slot:activator="{ on, attrs }">\n <v-btn\n class="ml-2"\n color="secondary"\n v-bind="attrs"\n v-on="on"\n fab\n small\n data-test="dump-component-open-settings"\n >\n <v-icon>$astro-settings</v-icon>\n </v-btn>\n </template>\n <v-card>\n <v-card-title data-test="display-settings-card">\n Display settings\n </v-card-title>\n <v-card-text>\n <v-row no-gutters>\n <v-col v-if="mode === \'RAW\'">\n <v-radio-group\n v-model="currentConfig.format"\n label="Display format"\n >\n <v-radio\n label="Hex"\n value="hex"\n data-test="dump-component-settings-format-hex"\n />\n <v-radio\n label="ASCII"\n value="ascii"\n data-test="dump-component-settings-format-ascii"\n />\n </v-radio-group>\n </v-col>\n <v-col>\n <v-radio-group\n v-model="currentConfig.newestAtTop"\n label="Print newest packets to the"\n >\n <v-radio\n label="Top"\n value\n data-test="dump-component-settings-newest-top"\n />\n <v-radio\n label="Bottom"\n :value="false"\n data-test="dump-component-settings-newest-bottom"\n />\n </v-radio-group>\n </v-col>\n <v-col>\n <v-switch\n v-if="mode === \'RAW\'"\n v-model="currentConfig.showLineAddress"\n label="Show line address"\n data-test="dump-component-settings-show-address"\n />\n <v-switch\n v-model="currentConfig.showTimestamp"\n label="Show timestamp"\n data-test="dump-component-settings-show-timestamp"\n />\n </v-col>\n <v-col>\n <v-text-field\n v-if="mode === \'RAW\'"\n v-model="currentConfig.bytesPerLine"\n label="Bytes per line"\n type="number"\n min="1"\n v-on:change="validateBytesPerLine"\n data-test="dump-component-settings-num-bytes"\n />\n <v-text-field\n v-model="currentConfig.packetsToShow"\n label="Packets to show"\n type="number"\n :hint="`Maximum: ${this.history.length}`"\n persistent-hint\n :min="1"\n :max="this.history.length"\n v-on:change="validatePacketsToShow"\n data-test="dump-component-settings-num-packets"\n />\n </v-col>\n </v-row>\n </v-card-text>\n </v-card>\n </v-menu>\n <v-btn\n class="ml-2"\n v-on:click="download"\n color="secondary"\n fab\n small\n data-test="dump-component-download"\n >\n <v-icon>mdi-file-download</v-icon>\n </v-btn>\n <v-btn\n class="ml-2"\n :class="{ pulse: paused }"\n v-on:click="togglePlayPause"\n color="primary"\n fab\n data-test="dump-component-play-pause"\n >\n <v-icon large v-if="paused">mdi-play</v-icon>\n <v-icon large v-else>mdi-pause</v-icon>\n </v-btn>\n </div>\n </div>\n </v-col>\n </v-row>\n </v-container>\n</template>\n\n<script>\nimport _ from \'lodash\'\nimport { format } from \'date-fns\'\nimport Component from \'./Component\'\n\nconst HISTORY_MAX_SIZE = 100 // TODO: put in config, or make the component learn it based on packet size, or something?\n\nexport default {\n mixins: [Component],\n data: function () {\n return {\n history: new Array(HISTORY_MAX_SIZE),\n historyPointer: -1, // index of the newest packet in history\n filterText: \'\',\n paused: false,\n pausedAt: 0,\n pauseOffset: 0,\n pausedHistory: [],\n textarea: null,\n displayText: null,\n packetSize: 0,\n }\n },\n computed: {\n // These are just here to trigger their respective watch functions above\n // There\'s a better solution to this in Vue 3 v3.vuejs.org/api/computed-watch-api.html#watching-multiple-sources\n allInstantSettings: function () {\n return `${this.currentConfig.format}|${this.currentConfig.showLineAddress}|${this.currentConfig.showTimestamp}|${this.currentConfig.newestAtTop}|${this.pauseOffset}`\n },\n allDebouncedSettings: function () {\n return `${this.currentConfig.bytesPerLine}|${this.currentConfig.packetsToShow}|${this.filterText}`\n },\n },\n watch: {\n lastReceived: function (data) {\n data.forEach((packet) => {\n delete packet.packet\n let decoded = {\n ...packet,\n }\n if (\'buffer\' in packet) {\n decoded.buffer = atob(packet.buffer)\n }\n this.historyPointer = ++this.historyPointer % this.history.length\n this.history[this.historyPointer] = decoded\n if (!this.paused) {\n const packetText = this.calculatePacketText(decoded)\n if (this.matchesSearch(packetText)) {\n if (!this.displayText) {\n this.displayText = packetText\n } else if (this.currentConfig.newestAtTop) {\n this.displayText = `${packetText}\\n\\n${this.displayText}`\n } else {\n this.displayText += `\\n\\n${packetText}`\n }\n }\n }\n })\n this.trimDisplayText()\n if (!this.paused && !this.currentConfig.newestAtTop) {\n this.updateScrollPosition()\n }\n },\n paused: function (val) {\n if (val) {\n this.pausedAt = this.historyPointer\n this.pausedHistory = this.history.slice()\n } else {\n this.pauseOffset = 0\n this.rebuildDisplayText()\n }\n },\n allInstantSettings: function () {\n this.rebuildDisplayText()\n },\n allDebouncedSettings: _.debounce(function () {\n this.rebuildDisplayText()\n }, 300),\n },\n created: function () {\n const defaultConfig = {\n format: \'hex\',\n showLineAddress: true,\n showTimestamp: true,\n bytesPerLine: 16,\n packetsToShow: 1,\n newestAtTop: false,\n }\n this.currentConfig = {\n ...defaultConfig, // In case anything isn\'t defined in this.config\n ...this.currentConfig,\n }\n },\n mounted: function () {\n this.textarea = this.$refs.textarea.$el.querySelectorAll(\'textarea\')[0]\n },\n methods: {\n trimDisplayText: function () {\n // Could make this more robust by counting lines instead, but that\'s slower\n if (this.currentConfig.newestAtTop) {\n this.displayText = this.displayText.substring(\n 0,\n this.packetSize * this.currentConfig.packetsToShow\n )\n } else {\n this.displayText = this.displayText.substring(\n this.displayText.length -\n (this.packetSize + 2) * this.currentConfig.packetsToShow +\n 2\n )\n }\n },\n updateScrollPosition: function () {\n // Alternatively, only set if it\'s at the bottom already?\n const currentScrollOffset =\n this.textarea.scrollTop - this.textarea.scrollHeight\n this.$nextTick(() => {\n this.textarea.scrollTop =\n this.textarea.scrollHeight + currentScrollOffset\n })\n },\n rebuildDisplayText: function () {\n let packets = this.paused ? this.pausedHistory : this.history\n // Order packets chronologically and filter out the ones that aren\'t needed\n const breakpoint = this.paused ? this.pausedAt : this.historyPointer\n packets = packets\n .filter((packet) => packet) // in case history hasn\'t been filled yet\n .slice(breakpoint + 1)\n .concat(packets.slice(0, breakpoint + 1))\n .map(this.calculatePacketText) // convert to display text\n .filter(this.matchesSearch)\n if (this.paused) {\n // Remove any that are after the slider (offset)\n const sliderPosition = Math.max(packets.length + this.pauseOffset, 1) // Always show at least one\n packets = packets.slice(0, sliderPosition)\n }\n // Take however many are supposed to be shown\n const end = Math.max(this.currentConfig.packetsToShow, 1) // Always show at least one\n packets = packets.slice(-end)\n if (this.currentConfig.newestAtTop) {\n packets = packets.reverse()\n }\n this.displayText = packets.join(\'\\n\\n\')\n },\n matchesSearch: function (text) {\n return text.toLowerCase().includes(this.filterText.toLowerCase())\n },\n calculatePacketText: function (packet) {\n let text = \'\'\n if (this.currentConfig.showTimestamp) {\n const milliseconds = packet.__time / 1000000\n const receivedSeconds = (milliseconds / 1000).toFixed(7)\n const receivedDate = new Date(milliseconds).toISOString()\n let timestamp = \'********************************************\\n\'\n timestamp += `* Received seconds: ${receivedSeconds}\\n`\n timestamp += `* Received time: ${receivedDate}\\n`\n timestamp += \'********************************************\\n\'\n text = `${timestamp}${text}`\n }\n if (\'buffer\' in packet) {\n // Split its buffer into lines of the selected length\n text += _.chunk([...packet.buffer], this.currentConfig.bytesPerLine)\n .map((lineBytes, index) => {\n // Map each line into ASCII or hex values\n let mappedBytes = []\n if (this.currentConfig.format === \'ascii\') {\n mappedBytes = lineBytes.map((byte) =>\n byte\n .replaceAll(/\\n/, \'\\\\n\')\n .replaceAll(/\\r/, \'\\\\r\')\n .padStart(2, \' \')\n )\n } else {\n mappedBytes = lineBytes.map((byte) =>\n byte.charCodeAt(0).toString(16).padStart(2, \'0\')\n )\n }\n let line = mappedBytes.join(\' \')\n // Prepend the line address if needed\n if (this.currentConfig.showLineAddress) {\n const address = (index * this.currentConfig.bytesPerLine)\n .toString(16)\n .padStart(8, \'0\')\n line = `${address}: ${line}`\n }\n return line\n })\n .join(\'\\n\') // end of one line\n } else {\n text += Object.keys(packet)\n .filter((item) => item.slice(0, 2) != \'__\')\n .map((item) => `${item}: ${packet[item]}`)\n .join(\'\\n\')\n }\n this.packetSize = text.length // Set this every time in case it changes with rebuildDisplayText\n return text\n },\n validateBytesPerLine: function () {\n if (this.currentConfig.bytesPerLine < 1) {\n this.currentConfig.bytesPerLine = 1\n }\n },\n validatePacketsToShow: function () {\n if (this.currentConfig.packetsToShow > this.history.length) {\n this.currentConfig.packetsToShow = this.history.length\n } else if (this.currentConfig.packetsToShow < 1) {\n this.currentConfig.packetsToShow = 1\n }\n },\n download: function () {\n const blob = new Blob([this.displayText], {\n type: \'text/plain\',\n })\n // Make a link and then \'click\' on it to start the download\n const link = document.createElement(\'a\')\n let url = URL.createObjectURL(blob)\n link.href = url\n link.setAttribute(\n \'download\',\n `${format(new Date(), \'yyyy_MM_dd_HH_mm_ss\')}.txt`\n )\n link.click()\n window.URL.revokeObjectURL(url)\n },\n pause: function () {\n this.paused = true\n },\n togglePlayPause: function () {\n this.paused = !this.paused\n },\n stepBackward: function () {\n this.pause()\n this.pauseOffset--\n },\n stepForward: function () {\n this.pause()\n this.pauseOffset++\n },\n },\n}\n<\/script>\n\n<style lang="scss" scoped>\n.text-area-container {\n position: relative;\n\n .v-textarea {\n font-family: \'Courier New\', Courier, monospace;\n }\n\n .floating-buttons {\n position: absolute;\n top: 12px;\n right: 24px;\n }\n}\n\n.pulse {\n animation: pulse 1s infinite;\n}\n\n@keyframes pulse {\n 0% {\n opacity: 1;\n }\n\n 50% {\n opacity: 0.5;\n }\n}\n</style>\n']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"1e43f9a2d433379cf4434c6dbf617b9d5e598b63"},i=t[l]||(t[l]={});i[n]&&i[n].hash===e||(i[n]=o);var a=i[n];return tn=function(){return a},a}tn();var ln=(tn().s[0]++,100),on={mixins:[en],data:function(){return tn().f[0]++,tn().s[1]++,{history:new Array(ln),historyPointer:-1,filterText:"",paused:!1,pausedAt:0,pauseOffset:0,pausedHistory:[],textarea:null,displayText:null,packetSize:0}},computed:{allInstantSettings:function(){return tn().f[1]++,tn().s[2]++,"".concat(this.currentConfig.format,"|").concat(this.currentConfig.showLineAddress,"|").concat(this.currentConfig.showTimestamp,"|").concat(this.currentConfig.newestAtTop,"|").concat(this.pauseOffset)},allDebouncedSettings:function(){return tn().f[2]++,tn().s[3]++,"".concat(this.currentConfig.bytesPerLine,"|").concat(this.currentConfig.packetsToShow,"|").concat(this.filterText)}},watch:{lastReceived:function(n){var e=this;tn().f[3]++,tn().s[4]++,n.forEach((function(n){tn().f[4]++,tn().s[5]++,delete n.packet;var t=(tn().s[6]++,(0,s.Z)({},n));if(tn().s[7]++,"buffer"in n?(tn().b[0][0]++,tn().s[8]++,t.buffer=atob(n.buffer)):tn().b[0][1]++,tn().s[9]++,e.historyPointer=++e.historyPointer%e.history.length,tn().s[10]++,e.history[e.historyPointer]=t,tn().s[11]++,e.paused)tn().b[1][1]++;else{tn().b[1][0]++;var l=(tn().s[12]++,e.calculatePacketText(t));tn().s[13]++,e.matchesSearch(l)?(tn().b[2][0]++,tn().s[14]++,e.displayText?(tn().b[3][1]++,tn().s[16]++,e.currentConfig.newestAtTop?(tn().b[4][0]++,tn().s[17]++,e.displayText="".concat(l,"\n\n").concat(e.displayText)):(tn().b[4][1]++,tn().s[18]++,e.displayText+="\n\n".concat(l))):(tn().b[3][0]++,tn().s[15]++,e.displayText=l)):tn().b[2][1]++}})),tn().s[19]++,this.trimDisplayText(),tn().s[20]++,tn().b[6][0]++,this.paused||(tn().b[6][1]++,this.currentConfig.newestAtTop)?tn().b[5][1]++:(tn().b[5][0]++,tn().s[21]++,this.updateScrollPosition())},paused:function(n){tn().f[5]++,tn().s[22]++,n?(tn().b[7][0]++,tn().s[23]++,this.pausedAt=this.historyPointer,tn().s[24]++,this.pausedHistory=this.history.slice()):(tn().b[7][1]++,tn().s[25]++,this.pauseOffset=0,tn().s[26]++,this.rebuildDisplayText())},allInstantSettings:function(){tn().f[6]++,tn().s[27]++,this.rebuildDisplayText()},allDebouncedSettings:Q().debounce((function(){tn().f[7]++,tn().s[28]++,this.rebuildDisplayText()}),300)},created:function(){tn().f[8]++;var n=(tn().s[29]++,{format:"hex",showLineAddress:!0,showTimestamp:!0,bytesPerLine:16,packetsToShow:1,newestAtTop:!1});tn().s[30]++,this.currentConfig=(0,s.Z)((0,s.Z)({},n),this.currentConfig)},mounted:function(){tn().f[9]++,tn().s[31]++,this.textarea=this.$refs.textarea.$el.querySelectorAll("textarea")[0]},methods:{trimDisplayText:function(){tn().f[10]++,tn().s[32]++,this.currentConfig.newestAtTop?(tn().b[8][0]++,tn().s[33]++,this.displayText=this.displayText.substring(0,this.packetSize*this.currentConfig.packetsToShow)):(tn().b[8][1]++,tn().s[34]++,this.displayText=this.displayText.substring(this.displayText.length-(this.packetSize+2)*this.currentConfig.packetsToShow+2))},updateScrollPosition:function(){var n=this;tn().f[11]++;var e=(tn().s[35]++,this.textarea.scrollTop-this.textarea.scrollHeight);tn().s[36]++,this.$nextTick((function(){tn().f[12]++,tn().s[37]++,n.textarea.scrollTop=n.textarea.scrollHeight+e}))},rebuildDisplayText:function(){tn().f[13]++;var n=(tn().s[38]++,this.paused?(tn().b[9][0]++,this.pausedHistory):(tn().b[9][1]++,this.history)),e=(tn().s[39]++,this.paused?(tn().b[10][0]++,this.pausedAt):(tn().b[10][1]++,this.historyPointer));if(tn().s[40]++,n=n.filter((function(n){return tn().f[14]++,tn().s[41]++,n})).slice(e+1).concat(n.slice(0,e+1)).map(this.calculatePacketText).filter(this.matchesSearch),tn().s[42]++,this.paused){tn().b[11][0]++;var t=(tn().s[43]++,Math.max(n.length+this.pauseOffset,1));tn().s[44]++,n=n.slice(0,t)}else tn().b[11][1]++;var l=(tn().s[45]++,Math.max(this.currentConfig.packetsToShow,1));tn().s[46]++,n=n.slice(-l),tn().s[47]++,this.currentConfig.newestAtTop?(tn().b[12][0]++,tn().s[48]++,n=n.reverse()):tn().b[12][1]++,tn().s[49]++,this.displayText=n.join("\n\n")},matchesSearch:function(n){return tn().f[15]++,tn().s[50]++,n.toLowerCase().includes(this.filterText.toLowerCase())},calculatePacketText:function(n){var e=this;tn().f[16]++;var t=(tn().s[51]++,"");if(tn().s[52]++,this.currentConfig.showTimestamp){tn().b[13][0]++;var l=(tn().s[53]++,n.__time/1e6),o=(tn().s[54]++,(l/1e3).toFixed(7)),i=(tn().s[55]++,new Date(l).toISOString()),a=(tn().s[56]++,"********************************************\n");tn().s[57]++,a+="* Received seconds: ".concat(o,"\n"),tn().s[58]++,a+="* Received time: ".concat(i,"\n"),tn().s[59]++,a+="********************************************\n",tn().s[60]++,t="".concat(a).concat(t)}else tn().b[13][1]++;return tn().s[61]++,"buffer"in n?(tn().b[14][0]++,tn().s[62]++,t+=Q().chunk((0,X.Z)(n.buffer),this.currentConfig.bytesPerLine).map((function(n,t){tn().f[17]++;var l=(tn().s[63]++,[]);tn().s[64]++,"ascii"===e.currentConfig.format?(tn().b[15][0]++,tn().s[65]++,l=n.map((function(n){return tn().f[18]++,tn().s[66]++,n.replaceAll(/\n/,"\\n").replaceAll(/\r/,"\\r").padStart(2," ")}))):(tn().b[15][1]++,tn().s[67]++,l=n.map((function(n){return tn().f[19]++,tn().s[68]++,n.charCodeAt(0).toString(16).padStart(2,"0")})));var o=(tn().s[69]++,l.join(" "));if(tn().s[70]++,e.currentConfig.showLineAddress){tn().b[16][0]++;var i=(tn().s[71]++,(t*e.currentConfig.bytesPerLine).toString(16).padStart(8,"0"));tn().s[72]++,o="".concat(i,": ").concat(o)}else tn().b[16][1]++;return tn().s[73]++,o})).join("\n")):(tn().b[14][1]++,tn().s[74]++,t+=Object.keys(n).filter((function(n){return tn().f[20]++,tn().s[75]++,"__"!=n.slice(0,2)})).map((function(e){return tn().f[21]++,tn().s[76]++,"".concat(e,": ").concat(n[e])})).join("\n")),tn().s[77]++,this.packetSize=t.length,tn().s[78]++,t},validateBytesPerLine:function(){tn().f[22]++,tn().s[79]++,this.currentConfig.bytesPerLine<1?(tn().b[17][0]++,tn().s[80]++,this.currentConfig.bytesPerLine=1):tn().b[17][1]++},validatePacketsToShow:function(){tn().f[23]++,tn().s[81]++,this.currentConfig.packetsToShow>this.history.length?(tn().b[18][0]++,tn().s[82]++,this.currentConfig.packetsToShow=this.history.length):(tn().b[18][1]++,tn().s[83]++,this.currentConfig.packetsToShow<1?(tn().b[19][0]++,tn().s[84]++,this.currentConfig.packetsToShow=1):tn().b[19][1]++)},download:function(){tn().f[24]++;var n=(tn().s[85]++,new Blob([this.displayText],{type:"text/plain"})),e=(tn().s[86]++,document.createElement("a")),t=(tn().s[87]++,URL.createObjectURL(n));tn().s[88]++,e.href=t,tn().s[89]++,e.setAttribute("download","".concat((0,r.Z)(new Date,"yyyy_MM_dd_HH_mm_ss"),".txt")),tn().s[90]++,e.click(),tn().s[91]++,window.URL.revokeObjectURL(t)},pause:function(){tn().f[25]++,tn().s[92]++,this.paused=!0},togglePlayPause:function(){tn().f[26]++,tn().s[93]++,this.paused=!this.paused},stepBackward:function(){tn().f[27]++,tn().s[94]++,this.pause(),tn().s[95]++,this.pauseOffset--},stepForward:function(){tn().f[28]++,tn().s[96]++,this.pause(),tn().s[97]++,this.pauseOffset++}}},an=on,cn=(t(1789),(0,x.Z)(an,q,G,!1,null,"178f1219",null)),sn=cn.exports;function rn(){var n="/openc3/plugins/packages/openc3-cosmos-tool-dataviewer/src/tools/DataViewer/AddComponentDialog.vue",e="829d8db8ecfb50505da7776c57cb197d8b0cbe64",t=new Function("return this")(),l="__coverage__",o={path:"/openc3/plugins/packages/openc3-cosmos-tool-dataviewer/src/tools/DataViewer/AddComponentDialog.vue",statementMap:{0:{start:{line:1,column:13},end:{line:2,column:1}},1:{start:{line:1,column:39},end:{line:1,column:43}},2:{start:{line:1,column:47},end:{line:1,column:59}},3:{start:{line:1,column:60},end:{line:1,column:2010}},4:{start:{line:1,column:163},end:{line:1,column:175}},5:{start:{line:1,column:513},end:{line:1,column:538}},6:{start:{line:1,column:1059},end:{line:1,column:1080}},7:{start:{line:1,column:1563},end:{line:1,column:1589}},8:{start:{line:3,column:22},end:{line:3,column:24}}},fnMap:{0:{name:"render",decl:{start:{line:1,column:22},end:{line:1,column:28}},loc:{start:{line:1,column:30},end:{line:2,column:1}},line:1},1:{name:"(anonymous_1)",decl:{start:{line:1,column:147},end:{line:1,column:148}},loc:{start:{line:1,column:162},end:{line:1,column:176}},line:1},2:{name:"(anonymous_2)",decl:{start:{line:1,column:497},end:{line:1,column:498}},loc:{start:{line:1,column:512},end:{line:1,column:539}},line:1},3:{name:"(anonymous_3)",decl:{start:{line:1,column:1043},end:{line:1,column:1044}},loc:{start:{line:1,column:1058},end:{line:1,column:1081}},line:1},4:{name:"(anonymous_4)",decl:{start:{line:1,column:1547},end:{line:1,column:1548}},loc:{start:{line:1,column:1562},end:{line:1,column:1590}},line:1}},branchMap:{0:{loc:{start:{line:1,column:1347},end:{line:1,column:1634}},type:"cond-expr",locations:[{start:{line:1,column:1379},end:{line:1,column:1625}},{start:{line:1,column:1626},end:{line:1,column:1634}}],line:1}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0},f:{0:0,1:0,2:0,3:0,4:0},b:{0:[0,0]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"829d8db8ecfb50505da7776c57cb197d8b0cbe64"},i=t[l]||(t[l]={});i[n]&&i[n].hash===e||(i[n]=o);var a=i[n];return rn=function(){return a},a}rn(),rn().s[0]++;var un=function(){rn().f[0]++;var n=(rn().s[1]++,this),e=(rn().s[2]++,n._self._c);return rn().s[3]++,e("div",[e("v-dialog",{attrs:{width:"600"},model:{value:n.show,callback:function(e){rn().f[1]++,rn().s[4]++,n.show=e},expression:"show"}},[e("v-card",[e("v-system-bar",[e("v-spacer"),e("span",[n._v(" DataViewer: Add A Packet ")]),e("v-spacer")],1),e("v-card-text",[e("v-row",[e("v-col",{staticClass:"my-2"},[e("v-radio-group",{staticClass:"mt-0",attrs:{row:"","hide-details":""},model:{value:n.newPacketCmdOrTlm,callback:function(e){rn().f[2]++,rn().s[5]++,n.newPacketCmdOrTlm=e},expression:"newPacketCmdOrTlm"}},[e("v-radio",{attrs:{label:"Command",value:"cmd","data-test":"command-packet-radio"}}),e("v-radio",{attrs:{label:"Telemetry",value:"tlm","data-test":"telemetry-packet-radio"}})],1)],1)],1),e("v-row",[e("v-col",[e("target-packet-item-chooser",{attrs:{mode:n.newPacketCmdOrTlm,unknown:""},on:{"on-set":n.packetSelected}})],1)],1),e("v-row",[e("v-col",[e("v-radio-group",{attrs:{row:"","hide-details":""},model:{value:n.newPacketMode,callback:function(e){rn().f[3]++,rn().s[6]++,n.newPacketMode=e},expression:"newPacketMode"}},[e("v-radio",{attrs:{label:"Raw",value:"RAW","data-test":"new-packet-raw-radio"}}),e("v-radio",{attrs:{label:"Decom",value:"DECOM",disabled:n.disableRadioOptions,"data-test":"new-packet-decom-radio"}})],1)],1),e("v-col",["DECOM"===n.newPacketMode?(rn().b[0][0]++,e("v-select",{attrs:{"hide-details":"",label:"Value Type","data-test":"add-packet-value-type",items:n.valueTypes},model:{value:n.newPacketValueType,callback:function(e){rn().f[4]++,rn().s[7]++,n.newPacketValueType=e},expression:"newPacketValueType"}})):(rn().b[0][1]++,n._e())],1)],1)],1),e("v-card-actions",[e("v-spacer"),e("v-btn",{staticClass:"mx-2",attrs:{outlined:"","data-test":"cancel-packet-button"},on:{click:n.cancelAddComponent}},[n._v(" Cancel ")]),e("v-btn",{staticClass:"mx-2",attrs:{color:"primary","data-test":"add-packet-button",disabled:!n.newPacket},on:{click:n.addComponent}},[n._v(" Add ")])],1)],1)],1)],1)},mn=(rn().s[8]++,[]);function dn(){var n="/openc3/plugins/packages/openc3-cosmos-tool-dataviewer/src/tools/DataViewer/AddComponentDialog.vue",e="3d53688dc46e4e226a15e09a738b560a923239a1",t=new Function("return this")(),l="__coverage__",o={path:"/openc3/plugins/packages/openc3-cosmos-tool-dataviewer/src/tools/DataViewer/AddComponentDialog.vue",statementMap:{0:{start:{line:12,column:4},end:{line:18,column:5}},1:{start:{line:22,column:6},end:{line:24,column:7}},2:{start:{line:23,column:8},end:{line:23,column:50}},3:{start:{line:25,column:6},end:{line:25,column:18}},4:{start:{line:29,column:8},end:{line:29,column:25}},5:{start:{line:32,column:8},end:{line:32,column:34}},6:{start:{line:40,column:8},end:{line:40,column:29}},7:{start:{line:46,column:6},end:{line:50,column:7}},8:{start:{line:51,column:6},end:{line:53,column:7}},9:{start:{line:52,column:8},end:{line:52,column:34}},10:{start:{line:56,column:6},end:{line:62,column:8}},11:{start:{line:65,column:6},end:{line:65,column:30}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:11,column:2},end:{line:11,column:3}},loc:{start:{line:11,column:9},end:{line:19,column:3}},line:11},1:{name:"(anonymous_1)",decl:{start:{line:21,column:25},end:{line:21,column:26}},loc:{start:{line:21,column:37},end:{line:26,column:5}},line:21},2:{name:"(anonymous_2)",decl:{start:{line:28,column:6},end:{line:28,column:7}},loc:{start:{line:28,column:12},end:{line:30,column:7}},line:28},3:{name:"(anonymous_3)",decl:{start:{line:31,column:6},end:{line:31,column:7}},loc:{start:{line:31,column:17},end:{line:33,column:7}},line:31},4:{name:"(anonymous_4)",decl:{start:{line:39,column:15},end:{line:39,column:16}},loc:{start:{line:39,column:27},end:{line:41,column:7}},line:39},5:{name:"(anonymous_5)",decl:{start:{line:45,column:20},end:{line:45,column:21}},loc:{start:{line:45,column:37},end:{line:54,column:5}},line:45},6:{name:"(anonymous_6)",decl:{start:{line:55,column:18},end:{line:55,column:19}},loc:{start:{line:55,column:35},end:{line:63,column:5}},line:55},7:{name:"(anonymous_7)",decl:{start:{line:64,column:24},end:{line:64,column:25}},loc:{start:{line:64,column:36},end:{line:66,column:5}},line:64}},branchMap:{0:{loc:{start:{line:22,column:6},end:{line:24,column:7}},type:"if",locations:[{start:{line:22,column:6},end:{line:24,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:22},1:{loc:{start:{line:51,column:6},end:{line:53,column:7}},type:"if",locations:[{start:{line:51,column:6},end:{line:53,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:51}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0},b:{0:[0,0],1:[0,0]},inputSourceMap:{version:3,sources:["AddComponentDialog.vue"],names:[],mappings:";AAqHA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"AddComponentDialog.vue",sourceRoot:"src/tools/DataViewer",sourcesContent:['\x3c!--\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addstopums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n\n# Modified by OpenC3, Inc.\n# All changes Copyright 2022, OpenC3, Inc.\n# All Rights Reserved\n#\n# This file may also be used under the terms of a commercial license \n# if purchased from OpenC3, Inc.\n--\x3e\n\n<template>\n <div>\n \x3c!-- Dialog for adding a new component to a tab --\x3e\n <v-dialog v-model="show" width="600">\n <v-card>\n <v-system-bar>\n <v-spacer />\n <span> DataViewer: Add A Packet </span>\n <v-spacer />\n </v-system-bar>\n <v-card-text>\n <v-row>\n <v-col class="my-2">\n <v-radio-group\n v-model="newPacketCmdOrTlm"\n row\n hide-details\n class="mt-0"\n >\n <v-radio\n label="Command"\n value="cmd"\n data-test="command-packet-radio"\n />\n <v-radio\n label="Telemetry"\n value="tlm"\n data-test="telemetry-packet-radio"\n />\n </v-radio-group>\n </v-col>\n </v-row>\n <v-row>\n <v-col>\n <target-packet-item-chooser\n :mode="newPacketCmdOrTlm"\n unknown\n @on-set="packetSelected"\n />\n </v-col>\n </v-row>\n <v-row>\n <v-col>\n <v-radio-group v-model="newPacketMode" row hide-details>\n <v-radio\n label="Raw"\n value="RAW"\n data-test="new-packet-raw-radio"\n />\n <v-radio\n label="Decom"\n value="DECOM"\n :disabled="disableRadioOptions"\n data-test="new-packet-decom-radio"\n />\n </v-radio-group>\n </v-col>\n <v-col>\n <v-select\n v-if="newPacketMode === \'DECOM\'"\n v-model="newPacketValueType"\n hide-details\n label="Value Type"\n data-test="add-packet-value-type"\n :items="valueTypes"\n />\n </v-col>\n </v-row>\n </v-card-text>\n <v-card-actions>\n <v-spacer />\n <v-btn\n outlined\n class="mx-2"\n data-test="cancel-packet-button"\n @click="cancelAddComponent"\n >\n Cancel\n </v-btn>\n <v-btn\n color="primary"\n class="mx-2"\n data-test="add-packet-button"\n :disabled="!newPacket"\n @click="addComponent"\n >\n Add\n </v-btn>\n </v-card-actions>\n </v-card>\n </v-dialog>\n </div>\n</template>\n\n<script>\nimport TargetPacketItemChooser from \'@openc3/tool-common/src/components/TargetPacketItemChooser\'\n\nexport default {\n components: {\n TargetPacketItemChooser,\n },\n props: {\n value: Boolean, // value is the default prop when using v-model\n },\n data() {\n return {\n newPacket: null,\n newPacketCmdOrTlm: \'tlm\',\n newPacketMode: \'RAW\',\n valueTypes: [\'CONVERTED\', \'RAW\', \'FORMATTED\', \'WITH_UNITS\'],\n newPacketValueType: \'WITH_UNITS\',\n }\n },\n computed: {\n disableRadioOptions: function () {\n if (this.newPacket) {\n return this.newPacket.packet === \'UNKNOWN\'\n }\n return false\n },\n show: {\n get() {\n return this.value\n },\n set(value) {\n this.$emit(\'input\', value) // input is the default event when using v-model\n },\n },\n },\n watch: {\n newPacketCmdOrTlm: {\n immediate: true,\n handler: function () {\n this.newPacket = null\n },\n },\n },\n methods: {\n packetSelected: function (event) {\n this.newPacket = {\n target: event.targetName,\n packet: event.packetName,\n cmdOrTlm: this.newPacketCmdOrTlm,\n }\n if (event.packetName == \'UNKNOWN\') {\n this.newPacketMode = \'RAW\'\n }\n },\n addComponent: function (event) {\n this.$emit(\'add\', {\n ...this.newPacket,\n component: \'DumpComponent\',\n config: {},\n mode: this.newPacketMode,\n valueType: this.newPacketValueType,\n })\n },\n cancelAddComponent: function () {\n this.$emit(\'cancel\', {})\n },\n },\n}\n<\/script>\n']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"3d53688dc46e4e226a15e09a738b560a923239a1"},i=t[l]||(t[l]={});i[n]&&i[n].hash===e||(i[n]=o);var a=i[n];return dn=function(){return a},a}dn();var An={components:{TargetPacketItemChooser:V},props:{value:Boolean},data:function(){return dn().f[0]++,dn().s[0]++,{newPacket:null,newPacketCmdOrTlm:"tlm",newPacketMode:"RAW",valueTypes:["CONVERTED","RAW","FORMATTED","WITH_UNITS"],newPacketValueType:"WITH_UNITS"}},computed:{disableRadioOptions:function(){return dn().f[1]++,dn().s[1]++,this.newPacket?(dn().b[0][0]++,dn().s[2]++,"UNKNOWN"===this.newPacket.packet):(dn().b[0][1]++,dn().s[3]++,!1)},show:{get:function(){return dn().f[2]++,dn().s[4]++,this.value},set:function(n){dn().f[3]++,dn().s[5]++,this.$emit("input",n)}}},watch:{newPacketCmdOrTlm:{immediate:!0,handler:function(){dn().f[4]++,dn().s[6]++,this.newPacket=null}}},methods:{packetSelected:function(n){dn().f[5]++,dn().s[7]++,this.newPacket={target:n.targetName,packet:n.packetName,cmdOrTlm:this.newPacketCmdOrTlm},dn().s[8]++,"UNKNOWN"==n.packetName?(dn().b[1][0]++,dn().s[9]++,this.newPacketMode="RAW"):dn().b[1][1]++},addComponent:function(n){dn().f[6]++,dn().s[10]++,this.$emit("add",(0,s.Z)((0,s.Z)({},this.newPacket),{},{component:"DumpComponent",config:{},mode:this.newPacketMode,valueType:this.newPacketValueType}))},cancelAddComponent:function(){dn().f[7]++,dn().s[11]++,this.$emit("cancel",{})}}},pn=An,fn=(0,x.Z)(pn,un,mn,!1,null,null,null),hn=fn.exports;function vn(){var n="/openc3/plugins/packages/openc3-cosmos-tool-dataviewer/src/tools/DataViewer/DataViewer.vue",e="99a7a78702934a0afca6d6a5f4d20b7d0b2676d8",t=new Function("return this")(),l="__coverage__",o={path:"/openc3/plugins/packages/openc3-cosmos-tool-dataviewer/src/tools/DataViewer/DataViewer.vue",statementMap:{0:{start:{line:22,column:4},end:{line:77,column:5}},1:{start:{line:35,column:29},end:{line:35,column:50}},2:{start:{line:49,column:16},end:{line:49,column:38}},3:{start:{line:56,column:16},end:{line:56,column:38}},4:{start:{line:81,column:6},end:{line:87,column:7}},5:{start:{line:90,column:6},end:{line:92,column:8}},6:{start:{line:91,column:8},end:{line:91,column:26}},7:{start:{line:97,column:6},end:{line:97,column:23}},8:{start:{line:101,column:4},end:{line:101,column:30}},9:{start:{line:102,column:4},end:{line:102,column:20}},10:{start:{line:105,column:27},end:{line:105,column:66}},11:{start:{line:106,column:4},end:{line:108,column:5}},12:{start:{line:107,column:6},end:{line:107,column:44}},13:{start:{line:111,column:4},end:{line:113,column:5}},14:{start:{line:112,column:6},end:{line:112,column:37}},15:{start:{line:114,column:4},end:{line:114,column:27}},16:{start:{line:118,column:6},end:{line:118,column:67}},17:{start:{line:121,column:6},end:{line:121,column:53}},18:{start:{line:121,column:27},end:{line:121,column:53}},19:{start:{line:125,column:6},end:{line:129,column:7}},20:{start:{line:126,column:8},end:{line:126,column:62}},21:{start:{line:127,column:8},end:{line:127,column:27}},22:{start:{line:128,column:8},end:{line:128,column:14}},23:{start:{line:131,column:6},end:{line:135,column:7}},24:{start:{line:132,column:8},end:{line:132,column:71}},25:{start:{line:133,column:8},end:{line:133,column:27}},26:{start:{line:134,column:8},end:{line:134,column:14}},27:{start:{line:137,column:6},end:{line:145,column:7}},28:{start:{line:138,column:8},end:{line:143,column:24}},29:{start:{line:144,column:8},end:{line:144,column:27}},30:{start:{line:146,column:6},end:{line:146,column:25}},31:{start:{line:147,column:6},end:{line:147,column:37}},32:{start:{line:150,column:6},end:{line:150,column:26}},33:{start:{line:151,column:6},end:{line:151,column:42}},34:{start:{line:154,column:6},end:{line:176,column:10}},35:{start:{line:156,column:30},end:{line:156,column:49}},36:{start:{line:158,column:12},end:{line:158,column:32}},37:{start:{line:159,column:12},end:{line:159,column:42}},38:{start:{line:162,column:12},end:{line:162,column:23}},39:{start:{line:163,column:12},end:{line:163,column:33}},40:{start:{line:164,column:12},end:{line:164,column:72}},41:{start:{line:165,column:12},end:{line:165,column:31}},42:{start:{line:166,column:12},end:{line:166,column:41}},43:{start:{line:169,column:12},end:{line:169,column:68}},44:{start:{line:170,column:12},end:{line:170,column:31}},45:{start:{line:174,column:10},end:{line:174,column:42}},46:{start:{line:175,column:10},end:{line:175,column:59}},47:{start:{line:175,column:28},end:{line:175,column:59}},48:{start:{line:179,column:6},end:{line:179,column:42}},49:{start:{line:181,column:25},end:{line:188,column:12}},50:{start:{line:182,column:8},end:{line:186,column:9}},51:{start:{line:183,column:10},end:{line:183,column:42}},52:{start:{line:185,column:10},end:{line:185,column:40}},53:{start:{line:187,column:8},end:{line:187,column:21}},54:{start:{line:189,column:6},end:{line:198,column:8}},55:{start:{line:190,column:8},end:{line:197,column:10}},56:{start:{line:191,column:10},end:{line:196,column:12}},57:{start:{line:201,column:6},end:{line:201,column:42}},58:{start:{line:202,column:6},end:{line:206,column:8}},59:{start:{line:209,column:6},end:{line:209,column:29}},60:{start:{line:210,column:6},end:{line:214,column:7}},61:{start:{line:211,column:8},end:{line:211,column:43}},62:{start:{line:212,column:8},end:{line:212,column:25}},63:{start:{line:213,column:8},end:{line:213,column:14}},64:{start:{line:215,column:21},end:{line:215,column:42}},65:{start:{line:216,column:6},end:{line:219,column:7}},66:{start:{line:217,column:8},end:{line:217,column:19}},67:{start:{line:218,column:8},end:{line:218,column:14}},68:{start:{line:220,column:29},end:{line:227,column:12}},69:{start:{line:221,column:8},end:{line:225,column:9}},70:{start:{line:222,column:10},end:{line:222,column:46}},71:{start:{line:224,column:10},end:{line:224,column:44}},72:{start:{line:226,column:8},end:{line:226,column:21}},73:{start:{line:228,column:6},end:{line:235,column:8}},74:{start:{line:230,column:8},end:{line:230,column:31}},75:{start:{line:231,column:8},end:{line:233,column:10}},76:{start:{line:232,column:10},end:{line:232,column:55}},77:{start:{line:234,column:8},end:{line:234,column:47}},78:{start:{line:236,column:6},end:{line:236,column:56}},79:{start:{line:239,column:16},end:{line:239,column:34}},80:{start:{line:240,column:6},end:{line:244,column:7}},81:{start:{line:241,column:8},end:{line:241,column:20}},82:{start:{line:243,column:8},end:{line:243,column:20}},83:{start:{line:245,column:6},end:{line:245,column:51}},84:{start:{line:246,column:6},end:{line:246,column:65}},85:{start:{line:246,column:35},end:{line:246,column:65}},86:{start:{line:247,column:6},end:{line:247,column:16}},87:{start:{line:250,column:23},end:{line:250,column:52}},88:{start:{line:251,column:16},end:{line:251,column:81}},89:{start:{line:252,column:6},end:{line:252,column:65}},90:{start:{line:252,column:35},end:{line:252,column:65}},91:{start:{line:253,column:6},end:{line:253,column:16}},92:{start:{line:256,column:6},end:{line:256,column:52}},93:{start:{line:257,column:6},end:{line:257,column:65}},94:{start:{line:257,column:29},end:{line:257,column:65}},95:{start:{line:258,column:6},end:{line:258,column:31}},96:{start:{line:259,column:21},end:{line:259,column:68}},97:{start:{line:260,column:6},end:{line:262,column:7}},98:{start:{line:261,column:8},end:{line:261,column:42}},99:{start:{line:263,column:6},end:{line:263,column:76}},100:{start:{line:263,column:45},end:{line:263,column:76}},101:{start:{line:266,column:6},end:{line:266,column:52}},102:{start:{line:267,column:6},end:{line:267,column:76}},103:{start:{line:270,column:6},end:{line:274,column:8}},104:{start:{line:275,column:6},end:{line:275,column:28}},105:{start:{line:278,column:6},end:{line:278,column:32}},106:{start:{line:279,column:6},end:{line:279,column:26}},107:{start:{line:282,column:6},end:{line:282,column:28}},108:{start:{line:283,column:6},end:{line:283,column:28}},109:{start:{line:284,column:6},end:{line:284,column:30}},110:{start:{line:285,column:6},end:{line:285,column:35}},111:{start:{line:286,column:6},end:{line:286,column:35}},112:{start:{line:287,column:6},end:{line:289,column:8}},113:{start:{line:288,column:8},end:{line:288,column:31}},114:{start:{line:292,column:6},end:{line:292,column:61}},115:{start:{line:293,column:6},end:{line:293,column:31}},116:{start:{line:296,column:6},end:{line:296,column:61}},117:{start:{line:297,column:6},end:{line:297,column:32}},118:{start:{line:300,column:6},end:{line:300,column:48}},119:{start:{line:303,column:6},end:{line:303,column:28}},120:{start:{line:304,column:6},end:{line:304,column:40}},121:{start:{line:307,column:6},end:{line:311,column:7}},122:{start:{line:314,column:6},end:{line:314,column:58}},123:{start:{line:315,column:6},end:{line:317,column:7}},124:{start:{line:316,column:8},end:{line:316,column:46}},125:{start:{line:318,column:6},end:{line:318,column:31}},126:{start:{line:321,column:6},end:{line:321,column:41}},127:{start:{line:324,column:21},end:{line:324,column:68}},128:{start:{line:325,column:6},end:{line:325,column:63}},129:{start:{line:326,column:6},end:{line:326,column:50}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:21,column:2},end:{line:21,column:3}},loc:{start:{line:21,column:9},end:{line:78,column:3}},line:21},1:{name:"(anonymous_1)",decl:{start:{line:35,column:18},end:{line:35,column:19}},loc:{start:{line:35,column:29},end:{line:35,column:50}},line:35},2:{name:"(anonymous_2)",decl:{start:{line:48,column:23},end:{line:48,column:24}},loc:{start:{line:48,column:29},end:{line:50,column:15}},line:48},3:{name:"(anonymous_3)",decl:{start:{line:55,column:23},end:{line:55,column:24}},loc:{start:{line:55,column:29},end:{line:57,column:15}},line:55},4:{name:"(anonymous_4)",decl:{start:{line:80,column:18},end:{line:80,column:19}},loc:{start:{line:80,column:30},end:{line:88,column:5}},line:80},5:{name:"(anonymous_5)",decl:{start:{line:89,column:16},end:{line:89,column:17}},loc:{start:{line:89,column:28},end:{line:93,column:5}},line:89},6:{name:"(anonymous_6)",decl:{start:{line:90,column:38},end:{line:90,column:39}},loc:{start:{line:90,column:47},end:{line:92,column:7}},line:90},7:{name:"(anonymous_7)",decl:{start:{line:96,column:26},end:{line:96,column:27}},loc:{start:{line:96,column:38},end:{line:98,column:5}},line:96},8:{name:"(anonymous_8)",decl:{start:{line:100,column:2},end:{line:100,column:3}},loc:{start:{line:100,column:12},end:{line:103,column:3}},line:100},9:{name:"(anonymous_9)",decl:{start:{line:104,column:11},end:{line:104,column:12}},loc:{start:{line:104,column:23},end:{line:109,column:3}},line:104},10:{name:"(anonymous_10)",decl:{start:{line:110,column:13},end:{line:110,column:14}},loc:{start:{line:110,column:25},end:{line:115,column:3}},line:110},11:{name:"(anonymous_11)",decl:{start:{line:117,column:17},end:{line:117,column:18}},loc:{start:{line:117,column:35},end:{line:119,column:5}},line:117},12:{name:"(anonymous_12)",decl:{start:{line:120,column:16},end:{line:120,column:17}},loc:{start:{line:120,column:28},end:{line:122,column:5}},line:120},13:{name:"(anonymous_13)",decl:{start:{line:123,column:11},end:{line:123,column:12}},loc:{start:{line:123,column:23},end:{line:148,column:5}},line:123},14:{name:"(anonymous_14)",decl:{start:{line:149,column:10},end:{line:149,column:11}},loc:{start:{line:149,column:22},end:{line:152,column:5}},line:149},15:{name:"(anonymous_15)",decl:{start:{line:153,column:15},end:{line:153,column:16}},loc:{start:{line:153,column:27},end:{line:177,column:5}},line:153},16:{name:"(anonymous_16)",decl:{start:{line:156,column:20},end:{line:156,column:21}},loc:{start:{line:156,column:30},end:{line:156,column:49}},line:156},17:{name:"(anonymous_17)",decl:{start:{line:157,column:21},end:{line:157,column:22}},loc:{start:{line:157,column:27},end:{line:160,column:11}},line:157},18:{name:"(anonymous_18)",decl:{start:{line:161,column:24},end:{line:161,column:25}},loc:{start:{line:161,column:30},end:{line:167,column:11}},line:161},19:{name:"(anonymous_19)",decl:{start:{line:168,column:20},end:{line:168,column:21}},loc:{start:{line:168,column:26},end:{line:171,column:11}},line:168},20:{name:"(anonymous_20)",decl:{start:{line:173,column:14},end:{line:173,column:15}},loc:{start:{line:173,column:32},end:{line:176,column:9}},line:173},21:{name:"(anonymous_21)",decl:{start:{line:178,column:30},end:{line:178,column:31}},loc:{start:{line:178,column:49},end:{line:199,column:5}},line:178},22:{name:"(anonymous_22)",decl:{start:{line:181,column:40},end:{line:181,column:41}},loc:{start:{line:181,column:60},end:{line:188,column:7}},line:181},23:{name:"(anonymous_23)",decl:{start:{line:189,column:65},end:{line:189,column:66}},loc:{start:{line:189,column:71},end:{line:198,column:7}},line:189},24:{name:"(anonymous_24)",decl:{start:{line:190,column:40},end:{line:190,column:41}},loc:{start:{line:190,column:50},end:{line:197,column:9}},line:190},25:{name:"(anonymous_25)",decl:{start:{line:200,column:35},end:{line:200,column:36}},loc:{start:{line:200,column:54},end:{line:207,column:5}},line:200},26:{name:"(anonymous_26)",decl:{start:{line:208,column:14},end:{line:208,column:15}},loc:{start:{line:208,column:35},end:{line:237,column:5}},line:208},27:{name:"(anonymous_27)",decl:{start:{line:220,column:43},end:{line:220,column:44}},loc:{start:{line:220,column:63},end:{line:227,column:7}},line:220},28:{name:"(anonymous_28)",decl:{start:{line:228,column:42},end:{line:228,column:43}},loc:{start:{line:228,column:58},end:{line:235,column:7}},line:228},29:{name:"(anonymous_29)",decl:{start:{line:231,column:52},end:{line:231,column:53}},loc:{start:{line:231,column:67},end:{line:233,column:9}},line:231},30:{name:"(anonymous_30)",decl:{start:{line:238,column:15},end:{line:238,column:16}},loc:{start:{line:238,column:33},end:{line:248,column:5}},line:238},31:{name:"(anonymous_31)",decl:{start:{line:249,column:21},end:{line:249,column:22}},loc:{start:{line:249,column:39},end:{line:254,column:5}},line:249},32:{name:"(anonymous_32)",decl:{start:{line:255,column:23},end:{line:255,column:24}},loc:{start:{line:255,column:45},end:{line:264,column:5}},line:255},33:{name:"(anonymous_33)",decl:{start:{line:265,column:23},end:{line:265,column:24}},loc:{start:{line:265,column:39},end:{line:268,column:5}},line:265},34:{name:"(anonymous_34)",decl:{start:{line:269,column:12},end:{line:269,column:13}},loc:{start:{line:269,column:24},end:{line:276,column:5}},line:269},35:{name:"(anonymous_35)",decl:{start:{line:277,column:21},end:{line:277,column:22}},loc:{start:{line:277,column:33},end:{line:280,column:5}},line:277},36:{name:"(anonymous_36)",decl:{start:{line:281,column:13},end:{line:281,column:14}},loc:{start:{line:281,column:37},end:{line:290,column:5}},line:281},37:{name:"(anonymous_37)",decl:{start:{line:287,column:21},end:{line:287,column:22}},loc:{start:{line:287,column:27},end:{line:289,column:7}},line:287},38:{name:"(anonymous_38)",decl:{start:{line:291,column:23},end:{line:291,column:24}},loc:{start:{line:291,column:35},end:{line:294,column:5}},line:291},39:{name:"(anonymous_39)",decl:{start:{line:295,column:15},end:{line:295,column:16}},loc:{start:{line:295,column:27},end:{line:298,column:5}},line:295},40:{name:"(anonymous_40)",decl:{start:{line:299,column:15},end:{line:299,column:16}},loc:{start:{line:299,column:27},end:{line:301,column:5}},line:299},41:{name:"(anonymous_41)",decl:{start:{line:302,column:25},end:{line:302,column:26}},loc:{start:{line:302,column:42},end:{line:305,column:5}},line:302},42:{name:"(anonymous_42)",decl:{start:{line:306,column:20},end:{line:306,column:21}},loc:{start:{line:306,column:37},end:{line:312,column:5}},line:306},43:{name:"(anonymous_43)",decl:{start:{line:313,column:18},end:{line:313,column:19}},loc:{start:{line:313,column:35},end:{line:319,column:5}},line:313},44:{name:"(anonymous_44)",decl:{start:{line:320,column:24},end:{line:320,column:25}},loc:{start:{line:320,column:41},end:{line:322,column:5}},line:320},45:{name:"(anonymous_45)",decl:{start:{line:323,column:21},end:{line:323,column:22}},loc:{start:{line:323,column:54},end:{line:327,column:5}},line:323}},branchMap:{0:{loc:{start:{line:35,column:29},end:{line:35,column:50}},type:"binary-expr",locations:[{start:{line:35,column:29},end:{line:35,column:36}},{start:{line:35,column:40},end:{line:35,column:50}}],line:35},1:{loc:{start:{line:84,column:18},end:{line:86,column:16}},type:"cond-expr",locations:[{start:{line:85,column:12},end:{line:85,column:77}},{start:{line:86,column:12},end:{line:86,column:16}}],line:84},2:{loc:{start:{line:106,column:4},end:{line:108,column:5}},type:"if",locations:[{start:{line:106,column:4},end:{line:108,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:106},3:{loc:{start:{line:111,column:4},end:{line:113,column:5}},type:"if",locations:[{start:{line:111,column:4},end:{line:113,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:111},4:{loc:{start:{line:121,column:6},end:{line:121,column:53}},type:"if",locations:[{start:{line:121,column:6},end:{line:121,column:53}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:121},5:{loc:{start:{line:125,column:6},end:{line:129,column:7}},type:"if",locations:[{start:{line:125,column:6},end:{line:129,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:125},6:{loc:{start:{line:131,column:6},end:{line:135,column:7}},type:"if",locations:[{start:{line:131,column:6},end:{line:135,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:131},7:{loc:{start:{line:137,column:6},end:{line:145,column:7}},type:"if",locations:[{start:{line:137,column:6},end:{line:145,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:137},8:{loc:{start:{line:175,column:10},end:{line:175,column:59}},type:"if",locations:[{start:{line:175,column:10},end:{line:175,column:59}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:175},9:{loc:{start:{line:179,column:16},end:{line:179,column:42}},type:"binary-expr",locations:[{start:{line:179,column:16},end:{line:179,column:23}},{start:{line:179,column:27},end:{line:179,column:42}}],line:179},10:{loc:{start:{line:182,column:8},end:{line:186,column:9}},type:"if",locations:[{start:{line:182,column:8},end:{line:186,column:9}},{start:{line:184,column:15},end:{line:186,column:9}}],line:182},11:{loc:{start:{line:201,column:16},end:{line:201,column:42}},type:"binary-expr",locations:[{start:{line:201,column:16},end:{line:201,column:23}},{start:{line:201,column:27},end:{line:201,column:42}}],line:201},12:{loc:{start:{line:210,column:6},end:{line:214,column:7}},type:"if",locations:[{start:{line:210,column:6},end:{line:214,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:210},13:{loc:{start:{line:216,column:6},end:{line:219,column:7}},type:"if",locations:[{start:{line:216,column:6},end:{line:219,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:216},14:{loc:{start:{line:221,column:8},end:{line:225,column:9}},type:"if",locations:[{start:{line:221,column:8},end:{line:225,column:9}},{start:{line:223,column:15},end:{line:225,column:9}}],line:221},15:{loc:{start:{line:240,column:6},end:{line:244,column:7}},type:"if",locations:[{start:{line:240,column:6},end:{line:244,column:7}},{start:{line:242,column:13},end:{line:244,column:7}}],line:240},16:{loc:{start:{line:246,column:6},end:{line:246,column:65}},type:"if",locations:[{start:{line:246,column:6},end:{line:246,column:65}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:246},17:{loc:{start:{line:252,column:6},end:{line:252,column:65}},type:"if",locations:[{start:{line:252,column:6},end:{line:252,column:65}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:252},18:{loc:{start:{line:257,column:6},end:{line:257,column:65}},type:"if",locations:[{start:{line:257,column:6},end:{line:257,column:65}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:257},19:{loc:{start:{line:260,column:6},end:{line:262,column:7}},type:"if",locations:[{start:{line:260,column:6},end:{line:262,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:260},20:{loc:{start:{line:263,column:6},end:{line:263,column:76}},type:"if",locations:[{start:{line:263,column:6},end:{line:263,column:76}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:263},21:{loc:{start:{line:263,column:10},end:{line:263,column:43}},type:"binary-expr",locations:[{start:{line:263,column:10},end:{line:263,column:27}},{start:{line:263,column:31},end:{line:263,column:43}}],line:263},22:{loc:{start:{line:315,column:6},end:{line:317,column:7}},type:"if",locations:[{start:{line:315,column:6},end:{line:317,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:315}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0,54:0,55:0,56:0,57:0,58:0,59:0,60:0,61:0,62:0,63:0,64:0,65:0,66:0,67:0,68:0,69:0,70:0,71:0,72:0,73:0,74:0,75:0,76:0,77:0,78:0,79:0,80:0,81:0,82:0,83:0,84:0,85:0,86:0,87:0,88:0,89:0,90:0,91:0,92:0,93:0,94:0,95:0,96:0,97:0,98:0,99:0,100:0,101:0,102:0,103:0,104:0,105:0,106:0,107:0,108:0,109:0,110:0,111:0,112:0,113:0,114:0,115:0,116:0,117:0,118:0,119:0,120:0,121:0,122:0,123:0,124:0,125:0,126:0,127:0,128:0,129:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0],11:[0,0],12:[0,0],13:[0,0],14:[0,0],15:[0,0],16:[0,0],17:[0,0],18:[0,0],19:[0,0],20:[0,0],21:[0,0],22:[0,0]},inputSourceMap:{version:3,sources:["DataViewer.vue"],names:[],mappings:";AA4PA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"DataViewer.vue",sourceRoot:"src/tools/DataViewer",sourcesContent:['\x3c!--\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n\n# Modified by OpenC3, Inc.\n# All changes Copyright 2022, OpenC3, Inc.\n# All Rights Reserved\n#\n# This file may also be used under the terms of a commercial license\n# if purchased from OpenC3, Inc.\n--\x3e\n\n<template>\n <div>\n <top-bar :menus="menus" :title="title" />\n <v-row dense>\n <v-col>\n <v-text-field\n v-model="startDate"\n label="Start Date"\n type="date"\n :rules="[rules.required]"\n data-test="start-date"\n />\n </v-col>\n <v-col>\n <v-text-field\n v-model="startTime"\n label="Start Time"\n type="time"\n step="1"\n :rules="[rules.required]"\n data-test="start-time"\n />\n </v-col>\n <v-col>\n <v-text-field\n v-model="endDate"\n label="End Date"\n type="date"\n :rules="endTime ? [rules.required] : []"\n data-test="end-date"\n />\n </v-col>\n <v-col>\n <v-text-field\n v-model="endTime"\n label="End Time"\n type="time"\n step="1"\n :rules="endDate ? [rules.required] : []"\n data-test="end-time"\n />\n </v-col>\n <v-col cols="auto" class="pt-4">\n <v-btn\n v-if="running"\n color="primary"\n width="100"\n data-test="stop-button"\n @click="stop"\n >\n Stop\n </v-btn>\n <v-btn\n v-else\n :disabled="!canStart"\n color="primary"\n width="100"\n data-test="start-button"\n @click="start"\n >\n Start\n </v-btn>\n </v-col>\n </v-row>\n <div class="mb-3" v-show="warning || error || connectionFailure">\n <v-alert type="warning" v-model="warning" dismissible>\n {{ warningText }}\n </v-alert>\n <v-alert type="error" v-model="error" dismissible>\n {{ errorText }}\n </v-alert>\n <v-alert type="error" v-model="connectionFailure">\n OpenC3 backend connection failed.\n </v-alert>\n </div>\n <v-card>\n <v-tabs ref="tabs" v-model="curTab">\n <v-tab\n v-for="(tab, index) in config.tabs"\n :key="index"\n @contextmenu="(event) => tabMenu(event, index)"\n data-test="tab"\n >\n {{ tab.name }}\n </v-tab>\n <v-btn class="mt-2 ml-2" @click="addTab" icon data-test="new-tab">\n <v-icon>mdi-tab-plus</v-icon>\n </v-btn>\n </v-tabs>\n <v-tabs-items v-model="curTab">\n <v-tab-item v-for="(tab, index) in config.tabs" :key="index" eager>\n <v-card\n v-for="(packet, packetIndex) in tab.packets"\n :key="`${index}-${packetIndex}`"\n flat\n >\n <v-divider />\n <v-card-title class="pa-3">\n <span v-text="packetTitle(packet)" />\n <v-spacer />\n <v-btn\n @click="() => deleteComponent(index, packetIndex)"\n icon\n data-test="delete-packet"\n >\n <v-icon color="red">mdi-delete</v-icon>\n </v-btn>\n </v-card-title>\n <dump-component\n v-if="packet.component === \'DumpComponent\'"\n v-show="receivedPackets[packetKey(packet)]"\n :ref="`${packetKey(packet)}-display`"\n :config="packet.config"\n @config-change="(newConfig) => (packet.config = newConfig)"\n />\n <v-card-text v-else>\n <v-alert type="error">\n Component missing:\n <span class="text-component-missing-name">\n {{ packet.component }}\n </span>\n </v-alert>\n </v-card-text>\n <v-card-text v-if="!receivedPackets[packetKey(packet)]">\n No data! Make sure to hit the START button!\n </v-card-text>\n </v-card>\n <v-card v-if="!tab.packets.length">\n <v-card-title> This tab is empty </v-card-title>\n <v-card-text>\n Click the button below to add packets. Right click on the tab name\n above to rename or delete this tab.\n </v-card-text>\n </v-card>\n <v-btn\n block\n @click="() => openComponentDialog(index)"\n data-test="new-packet"\n >\n <v-icon class="mr-2">$astro-add-large</v-icon>\n Click here to add a packet\n </v-btn>\n </v-tab-item>\n </v-tabs-items>\n <v-card v-if="!config.tabs.length">\n <v-card-title>You\'re not viewing any packets</v-card-title>\n <v-card-text>Click the new tab icon to start.</v-card-text>\n </v-card>\n </v-card>\n \x3c!-- Dialogs for opening and saving configs --\x3e\n <open-config-dialog\n v-if="openConfig"\n v-model="openConfig"\n :tool="toolName"\n @success="openConfiguration($event)"\n />\n <save-config-dialog\n v-if="saveConfig"\n v-model="saveConfig"\n :tool="toolName"\n @success="saveConfiguration($event)"\n />\n \x3c!-- Dialog for renaming a new tab --\x3e\n <v-dialog v-model="tabNameDialog" width="600">\n <v-card>\n <v-system-bar>\n <v-spacer />\n <span> DataViewer: Rename Tab</span>\n <v-spacer />\n </v-system-bar>\n <v-card-text>\n <v-text-field\n v-model="newTabName"\n label="Tab name"\n data-test="rename-tab-input"\n />\n </v-card-text>\n <v-card-actions>\n <v-spacer />\n <v-btn\n outlined\n class="mx-2"\n data-test="cancel-rename"\n @click="cancelTabRename"\n >\n Cancel\n </v-btn>\n <v-btn\n color="primary"\n class="mx-2"\n data-test="rename"\n :disabled="!newTabName"\n @click="renameTab"\n >\n Rename\n </v-btn>\n </v-card-actions>\n </v-card>\n </v-dialog>\n \x3c!-- Menu for right clicking on a tab --\x3e\n <v-menu\n v-model="showTabMenu"\n :position-x="tabMenuX"\n :position-y="tabMenuY"\n absolute\n offset-y\n >\n <v-list>\n <v-list-item data-test="context-menu-rename">\n <v-list-item-title style="cursor: pointer" @click="openTabNameDialog">\n Rename\n </v-list-item-title>\n </v-list-item>\n <v-list-item data-test="context-menu-delete">\n <v-list-item-title style="cursor: pointer" @click="deleteTab">\n Delete\n </v-list-item-title>\n </v-list-item>\n </v-list>\n </v-menu>\n \x3c!-- Dialog for adding a new component to a tab --\x3e\n <add-component-dialog\n v-model="showAddComponentDialog"\n @add="addComponent"\n @cancel="cancelAddComponent"\n />\n </div>\n</template>\n\n<script>\nimport { format, isValid, parse } from \'date-fns\'\nimport { OpenC3Api } from \'@openc3/tool-common/src/services/openc3-api\'\nimport OpenConfigDialog from \'@openc3/tool-common/src/components/OpenConfigDialog\'\nimport SaveConfigDialog from \'@openc3/tool-common/src/components/SaveConfigDialog\'\nimport TargetPacketItemChooser from \'@openc3/tool-common/src/components/TargetPacketItemChooser\'\nimport Cable from \'@openc3/tool-common/src/services/cable.js\'\nimport TopBar from \'@openc3/tool-common/src/components/TopBar\'\n\nimport DumpComponent from \'@/tools/DataViewer/DumpComponent\'\nimport AddComponentDialog from \'@/tools/DataViewer/AddComponentDialog\'\n\nexport default {\n components: {\n AddComponentDialog,\n OpenConfigDialog,\n SaveConfigDialog,\n DumpComponent,\n TopBar,\n },\n data() {\n return {\n title: \'COSMOS Data Viewer\',\n toolName: \'data-viewer\',\n openConfig: false,\n saveConfig: false,\n api: null,\n cable: new Cable(),\n subscription: null,\n startDate: format(new Date(), \'yyyy-MM-dd\'),\n startTime: format(new Date(), \'HH:mm:ss\'),\n endDate: \'\',\n endTime: \'\',\n rules: {\n required: (value) => !!value || \'Required\',\n },\n canStart: false,\n running: false,\n curTab: null,\n receivedPackets: {},\n menus: [\n {\n label: \'File\',\n items: [\n {\n label: \'Open Configuration\',\n icon: \'mdi-folder-open\',\n command: () => {\n this.openConfig = true\n },\n },\n {\n label: \'Save Configuration\',\n icon: \'mdi-content-save\',\n command: () => {\n this.saveConfig = true\n },\n },\n ],\n },\n ],\n warning: false,\n warningText: \'\',\n error: false,\n errorText: \'\',\n connectionFailure: false,\n config: {\n tabs: [],\n },\n tabNameDialog: false,\n newTabName: \'\',\n showTabMenu: false,\n tabMenuX: 0,\n tabMenuY: 0,\n activeTab: 0,\n showAddComponentDialog: false,\n }\n },\n computed: {\n startEndTime: function () {\n return {\n start_time:\n new Date(this.startDate + \' \' + this.startTime).getTime() * 1_000_000,\n end_time: this.endDate\n ? new Date(this.endDate + \' \' + this.endTime).getTime() * 1_000_000\n : null,\n }\n },\n allPackets: function () {\n return this.config.tabs.flatMap((tab) => {\n return tab.packets\n })\n },\n },\n watch: {\n \'config.tabs.length\': function () {\n this.resizeTabs()\n },\n },\n created() {\n this.api = new OpenC3Api()\n this.subscribe()\n },\n mounted: function () {\n const previousConfig = localStorage[\'lastconfig__data_viewer\']\n if (previousConfig) {\n this.openConfiguration(previousConfig)\n }\n },\n destroyed: function () {\n if (this.subscription) {\n this.subscription.unsubscribe()\n }\n this.cable.disconnect()\n },\n methods: {\n packetTitle: function (packet) {\n return `${packet.target} ${packet.packet} [ ${packet.mode} ]`\n },\n resizeTabs: function () {\n if (this.$refs.tabs) this.$refs.tabs.onResize()\n },\n start: function () {\n // Check for a future start time\n if (new Date(this.startDate + \' \' + this.startTime) > Date.now()) {\n this.warningText = \'Start date/time is in the future!\'\n this.warning = true\n return\n }\n // Check for an empty time period\n if (this.startEndTime.start_time === this.startEndTime.end_time) {\n this.warningText = \'Start date/time is equal to end date/time!\'\n this.warning = true\n return\n }\n // Check for a future End Time\n if (new Date(this.endDate + \' \' + this.endTime) > Date.now()) {\n this.warningText =\n \'Note: End date/time is greater than current date/time. Data will continue to stream in real-time until \' +\n this.endDate +\n \' \' +\n this.endTime +\n \' is reached.\'\n this.warning = true\n }\n this.running = true\n this.addPacketsToSubscription()\n },\n stop: function () {\n this.running = false\n this.removePacketsFromSubscription()\n },\n subscribe: function () {\n this.cable\n .createSubscription(\'StreamingChannel\', window.openc3Scope, {\n received: (data) => this.received(data),\n connected: () => {\n this.canStart = true\n this.connectionFailure = false\n },\n disconnected: () => {\n this.stop()\n this.canStart = false\n this.warningText = \'OpenC3 backend connection disconnected.\'\n this.warning = true\n this.connectionFailure = true\n },\n rejected: () => {\n this.warningText = \'OpenC3 backend connection rejected.\'\n this.warning = true\n },\n })\n .then((subscription) => {\n this.subscription = subscription\n if (this.running) this.addPacketsToSubscription()\n })\n },\n addPacketsToSubscription: function (packets) {\n packets = packets || this.allPackets\n // Group by mode\n const modeGroups = packets.reduce((groups, packet) => {\n if (groups[packet.mode]) {\n groups[packet.mode].push(packet)\n } else {\n groups[packet.mode] = [packet]\n }\n return groups\n }, {})\n OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(() => {\n Object.keys(modeGroups).forEach((mode) => {\n this.subscription.perform(\'add\', {\n scope: window.openc3Scope,\n token: localStorage.openc3Token,\n packets: modeGroups[mode].map(this.subscriptionKey),\n ...this.startEndTime,\n })\n })\n })\n },\n removePacketsFromSubscription: function (packets) {\n packets = packets || this.allPackets\n this.subscription.perform(\'remove\', {\n scope: window.openc3Scope,\n token: localStorage.openc3Token,\n packets: packets.map(this.subscriptionKey),\n })\n },\n received: function (json_data) {\n this.cable.recordPing()\n if (json_data[\'error\']) {\n this.errorText = json_data[\'error\']\n this.error = true\n return\n }\n const parsed = JSON.parse(json_data)\n if (!parsed.length) {\n this.stop()\n return\n }\n const groupedPackets = parsed.reduce((groups, packet) => {\n if (groups[packet.__packet]) {\n groups[packet.__packet].push(packet)\n } else {\n groups[packet.__packet] = [packet]\n }\n return groups\n }, {})\n Object.keys(groupedPackets).forEach((packetName) => {\n // eslint-disable-next-line\n console.log(packetName)\n this.$refs[`${packetName}-display`].forEach((component) => {\n component.receive(groupedPackets[packetName])\n })\n this.receivedPackets[packetName] = true\n })\n this.receivedPackets = { ...this.receivedPackets }\n },\n packetKey: function (packet) {\n let key = packet.mode + \'__\'\n if (packet.cmdOrTlm === \'tlm\') {\n key += \'TLM\'\n } else {\n key += \'CMD\'\n }\n key += `__${packet.target}__${packet.packet}`\n if (packet.mode === \'DECOM\') key += `__${packet.valueType}`\n return key\n },\n subscriptionKey: function (packet) {\n const cmdOrTlm = packet.cmdOrTlm.toUpperCase()\n let key = `${packet.mode}__${cmdOrTlm}__${packet.target}__${packet.packet}`\n if (packet.mode === \'DECOM\') key += `__${packet.valueType}`\n return key\n },\n openConfiguration: async function (name) {\n localStorage[\'lastconfig__data_viewer\'] = name\n if (this.subscription) this.removePacketsFromSubscription()\n this.receivedPackets = {}\n let response = await this.api.load_config(this.toolName, name)\n if (response) {\n this.config = JSON.parse(response)\n }\n if (this.subscription && this.running) this.addPacketsToSubscription()\n },\n saveConfiguration: function (name) {\n localStorage[\'lastconfig__data_viewer\'] = name\n this.api.save_config(this.toolName, name, JSON.stringify(this.config))\n },\n addTab: function () {\n this.config.tabs.push({\n // name: this.newTabName,\n name: \'New Tab\',\n packets: [],\n })\n this.cancelTabRename()\n },\n cancelTabRename: function () {\n this.tabNameDialog = false\n this.newTabName = \'\'\n },\n tabMenu: function (event, index) {\n this.activeTab = index\n event.preventDefault()\n this.showTabMenu = false\n this.tabMenuX = event.clientX\n this.tabMenuY = event.clientY\n this.$nextTick(() => {\n this.showTabMenu = true\n })\n },\n openTabNameDialog: function () {\n this.newTabName = this.config.tabs[this.activeTab].name\n this.tabNameDialog = true\n },\n renameTab: function () {\n this.config.tabs[this.activeTab].name = this.newTabName\n this.tabNameDialog = false\n },\n deleteTab: function () {\n this.config.tabs.splice(this.activeTab, 1)\n },\n openComponentDialog: function (index) {\n this.activeTab = index\n this.showAddComponentDialog = true\n },\n packetSelected: function (event) {\n this.newPacket = {\n target: event.targetName,\n packet: event.packetName,\n cmdOrTlm: this.newPacketCmdOrTlm,\n }\n },\n addComponent: function (event) {\n this.config.tabs[this.activeTab].packets.push(event)\n if (this.running) {\n this.addPacketsToSubscription([event])\n }\n this.cancelAddComponent()\n },\n cancelAddComponent: function (event) {\n this.showAddComponentDialog = false\n },\n deleteComponent: function (tabIndex, packetIndex) {\n const packet = this.config.tabs[tabIndex].packets[packetIndex]\n this.config.tabs[tabIndex].packets.splice(packetIndex, 1)\n this.removePacketsFromSubscription([packet])\n },\n },\n}\n<\/script>\n\n<style scoped>\n.text-component-missing-name {\n font-family: \'Courier New\', Courier, monospace;\n}\n\n.v-tabs-items {\n overflow: visible;\n}\n</style>\n']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"99a7a78702934a0afca6d6a5f4d20b7d0b2676d8"},i=t[l]||(t[l]={});i[n]&&i[n].hash===e||(i[n]=o);var a=i[n];return vn=function(){return a},a}vn();var Cn={components:{AddComponentDialog:hn,OpenConfigDialog:N,SaveConfigDialog:M,DumpComponent:sn,TopBar:K},data:function(){var n=this;return vn().f[0]++,vn().s[0]++,{title:"COSMOS Data Viewer",toolName:"data-viewer",openConfig:!1,saveConfig:!1,api:null,cable:new Z,subscription:null,startDate:(0,r.Z)(new Date,"yyyy-MM-dd"),startTime:(0,r.Z)(new Date,"HH:mm:ss"),endDate:"",endTime:"",rules:{required:function(n){return vn().f[1]++,vn().s[1]++,vn().b[0][0]++,!!n||(vn().b[0][1]++,"Required")}},canStart:!1,running:!1,curTab:null,receivedPackets:{},menus:[{label:"File",items:[{label:"Open Configuration",icon:"mdi-folder-open",command:function(){vn().f[2]++,vn().s[2]++,n.openConfig=!0}},{label:"Save Configuration",icon:"mdi-content-save",command:function(){vn().f[3]++,vn().s[3]++,n.saveConfig=!0}}]}],warning:!1,warningText:"",error:!1,errorText:"",connectionFailure:!1,config:{tabs:[]},tabNameDialog:!1,newTabName:"",showTabMenu:!1,tabMenuX:0,tabMenuY:0,activeTab:0,showAddComponentDialog:!1}},computed:{startEndTime:function(){return vn().f[4]++,vn().s[4]++,{start_time:1e6*new Date(this.startDate+" "+this.startTime).getTime(),end_time:this.endDate?(vn().b[1][0]++,1e6*new Date(this.endDate+" "+this.endTime).getTime()):(vn().b[1][1]++,null)}},allPackets:function(){return vn().f[5]++,vn().s[5]++,this.config.tabs.flatMap((function(n){return vn().f[6]++,vn().s[6]++,n.packets}))}},watch:{"config.tabs.length":function(){vn().f[7]++,vn().s[7]++,this.resizeTabs()}},created:function(){vn().f[8]++,vn().s[8]++,this.api=new b,vn().s[9]++,this.subscribe()},mounted:function(){vn().f[9]++;var n=(vn().s[10]++,localStorage["lastconfig__data_viewer"]);vn().s[11]++,n?(vn().b[2][0]++,vn().s[12]++,this.openConfiguration(n)):vn().b[2][1]++},destroyed:function(){vn().f[10]++,vn().s[13]++,this.subscription?(vn().b[3][0]++,vn().s[14]++,this.subscription.unsubscribe()):vn().b[3][1]++,vn().s[15]++,this.cable.disconnect()},methods:{packetTitle:function(n){return vn().f[11]++,vn().s[16]++,"".concat(n.target," ").concat(n.packet," [ ").concat(n.mode," ]")},resizeTabs:function(){vn().f[12]++,vn().s[17]++,this.$refs.tabs?(vn().b[4][0]++,vn().s[18]++,this.$refs.tabs.onResize()):vn().b[4][1]++},start:function(){return vn().f[13]++,vn().s[19]++,new Date(this.startDate+" "+this.startTime)>Date.now()?(vn().b[5][0]++,vn().s[20]++,this.warningText="Start date/time is in the future!",vn().s[21]++,this.warning=!0,void vn().s[22]++):(vn().b[5][1]++,vn().s[23]++,this.startEndTime.start_time===this.startEndTime.end_time?(vn().b[6][0]++,vn().s[24]++,this.warningText="Start date/time is equal to end date/time!",vn().s[25]++,this.warning=!0,void vn().s[26]++):(vn().b[6][1]++,vn().s[27]++,new Date(this.endDate+" "+this.endTime)>Date.now()?(vn().b[7][0]++,vn().s[28]++,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.",vn().s[29]++,this.warning=!0):vn().b[7][1]++,vn().s[30]++,this.running=!0,vn().s[31]++,void this.addPacketsToSubscription()))},stop:function(){vn().f[14]++,vn().s[32]++,this.running=!1,vn().s[33]++,this.removePacketsFromSubscription()},subscribe:function(){var n=this;vn().f[15]++,vn().s[34]++,this.cable.createSubscription("StreamingChannel",window.openc3Scope,{received:function(e){return vn().f[16]++,vn().s[35]++,n.received(e)},connected:function(){vn().f[17]++,vn().s[36]++,n.canStart=!0,vn().s[37]++,n.connectionFailure=!1},disconnected:function(){vn().f[18]++,vn().s[38]++,n.stop(),vn().s[39]++,n.canStart=!1,vn().s[40]++,n.warningText="OpenC3 backend connection disconnected.",vn().s[41]++,n.warning=!0,vn().s[42]++,n.connectionFailure=!0},rejected:function(){vn().f[19]++,vn().s[43]++,n.warningText="OpenC3 backend connection rejected.",vn().s[44]++,n.warning=!0}}).then((function(e){vn().f[20]++,vn().s[45]++,n.subscription=e,vn().s[46]++,n.running?(vn().b[8][0]++,vn().s[47]++,n.addPacketsToSubscription()):vn().b[8][1]++}))},addPacketsToSubscription:function(n){var e=this;vn().f[21]++,vn().s[48]++,vn().b[9][0]++,n=n||(vn().b[9][1]++,this.allPackets);var t=(vn().s[49]++,n.reduce((function(n,e){return vn().f[22]++,vn().s[50]++,n[e.mode]?(vn().b[10][0]++,vn().s[51]++,n[e.mode].push(e)):(vn().b[10][1]++,vn().s[52]++,n[e.mode]=[e]),vn().s[53]++,n}),{}));vn().s[54]++,OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then((function(){vn().f[23]++,vn().s[55]++,Object.keys(t).forEach((function(n){vn().f[24]++,vn().s[56]++,e.subscription.perform("add",(0,s.Z)({scope:window.openc3Scope,token:localStorage.openc3Token,packets:t[n].map(e.subscriptionKey)},e.startEndTime))}))}))},removePacketsFromSubscription:function(n){vn().f[25]++,vn().s[57]++,vn().b[11][0]++,n=n||(vn().b[11][1]++,this.allPackets),vn().s[58]++,this.subscription.perform("remove",{scope:window.openc3Scope,token:localStorage.openc3Token,packets:n.map(this.subscriptionKey)})},received:function(n){var e=this;if(vn().f[26]++,vn().s[59]++,this.cable.recordPing(),vn().s[60]++,n["error"])return vn().b[12][0]++,vn().s[61]++,this.errorText=n["error"],vn().s[62]++,this.error=!0,void vn().s[63]++;vn().b[12][1]++;var t=(vn().s[64]++,JSON.parse(n));if(vn().s[65]++,!t.length)return vn().b[13][0]++,vn().s[66]++,this.stop(),void vn().s[67]++;vn().b[13][1]++;var l=(vn().s[68]++,t.reduce((function(n,e){return vn().f[27]++,vn().s[69]++,n[e.__packet]?(vn().b[14][0]++,vn().s[70]++,n[e.__packet].push(e)):(vn().b[14][1]++,vn().s[71]++,n[e.__packet]=[e]),vn().s[72]++,n}),{}));vn().s[73]++,Object.keys(l).forEach((function(n){vn().f[28]++,vn().s[74]++,console.log(n),vn().s[75]++,e.$refs["".concat(n,"-display")].forEach((function(e){vn().f[29]++,vn().s[76]++,e.receive(l[n])})),vn().s[77]++,e.receivedPackets[n]=!0})),vn().s[78]++,this.receivedPackets=(0,s.Z)({},this.receivedPackets)},packetKey:function(n){vn().f[30]++;var e=(vn().s[79]++,n.mode+"__");return vn().s[80]++,"tlm"===n.cmdOrTlm?(vn().b[15][0]++,vn().s[81]++,e+="TLM"):(vn().b[15][1]++,vn().s[82]++,e+="CMD"),vn().s[83]++,e+="__".concat(n.target,"__").concat(n.packet),vn().s[84]++,"DECOM"===n.mode?(vn().b[16][0]++,vn().s[85]++,e+="__".concat(n.valueType)):vn().b[16][1]++,vn().s[86]++,e},subscriptionKey:function(n){vn().f[31]++;var e=(vn().s[87]++,n.cmdOrTlm.toUpperCase()),t=(vn().s[88]++,"".concat(n.mode,"__").concat(e,"__").concat(n.target,"__").concat(n.packet));return vn().s[89]++,"DECOM"===n.mode?(vn().b[17][0]++,vn().s[90]++,t+="__".concat(n.valueType)):vn().b[17][1]++,vn().s[91]++,t},openConfiguration:function(){var n=(0,c.Z)((0,a.Z)().mark((function n(e){var t;return(0,a.Z)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return vn().f[32]++,vn().s[92]++,localStorage["lastconfig__data_viewer"]=e,vn().s[93]++,this.subscription?(vn().b[18][0]++,vn().s[94]++,this.removePacketsFromSubscription()):vn().b[18][1]++,vn().s[95]++,this.receivedPackets={},vn().s[96]++,n.next=10,this.api.load_config(this.toolName,e);case 10:t=n.sent,vn().s[97]++,t?(vn().b[19][0]++,vn().s[98]++,this.config=JSON.parse(t)):vn().b[19][1]++,vn().s[99]++,vn().b[21][0]++,this.subscription&&(vn().b[21][1]++,this.running)?(vn().b[20][0]++,vn().s[100]++,this.addPacketsToSubscription()):vn().b[20][1]++;case 15:case"end":return n.stop()}}),n,this)})));function e(e){return n.apply(this,arguments)}return e}(),saveConfiguration:function(n){vn().f[33]++,vn().s[101]++,localStorage["lastconfig__data_viewer"]=n,vn().s[102]++,this.api.save_config(this.toolName,n,JSON.stringify(this.config))},addTab:function(){vn().f[34]++,vn().s[103]++,this.config.tabs.push({name:"New Tab",packets:[]}),vn().s[104]++,this.cancelTabRename()},cancelTabRename:function(){vn().f[35]++,vn().s[105]++,this.tabNameDialog=!1,vn().s[106]++,this.newTabName=""},tabMenu:function(n,e){var t=this;vn().f[36]++,vn().s[107]++,this.activeTab=e,vn().s[108]++,n.preventDefault(),vn().s[109]++,this.showTabMenu=!1,vn().s[110]++,this.tabMenuX=n.clientX,vn().s[111]++,this.tabMenuY=n.clientY,vn().s[112]++,this.$nextTick((function(){vn().f[37]++,vn().s[113]++,t.showTabMenu=!0}))},openTabNameDialog:function(){vn().f[38]++,vn().s[114]++,this.newTabName=this.config.tabs[this.activeTab].name,vn().s[115]++,this.tabNameDialog=!0},renameTab:function(){vn().f[39]++,vn().s[116]++,this.config.tabs[this.activeTab].name=this.newTabName,vn().s[117]++,this.tabNameDialog=!1},deleteTab:function(){vn().f[40]++,vn().s[118]++,this.config.tabs.splice(this.activeTab,1)},openComponentDialog:function(n){vn().f[41]++,vn().s[119]++,this.activeTab=n,vn().s[120]++,this.showAddComponentDialog=!0},packetSelected:function(n){vn().f[42]++,vn().s[121]++,this.newPacket={target:n.targetName,packet:n.packetName,cmdOrTlm:this.newPacketCmdOrTlm}},addComponent:function(n){vn().f[43]++,vn().s[122]++,this.config.tabs[this.activeTab].packets.push(n),vn().s[123]++,this.running?(vn().b[22][0]++,vn().s[124]++,this.addPacketsToSubscription([n])):vn().b[22][1]++,vn().s[125]++,this.cancelAddComponent()},cancelAddComponent:function(n){vn().f[44]++,vn().s[126]++,this.showAddComponentDialog=!1},deleteComponent:function(n,e){vn().f[45]++;var t=(vn().s[127]++,this.config.tabs[n].packets[e]);vn().s[128]++,this.config.tabs[n].packets.splice(e,1),vn().s[129]++,this.removePacketsFromSubscription([t])}}},gn=Cn,bn=(t(6668),(0,x.Z)(gn,o,i,!1,null,"49eeef70",null)),kn=bn.exports},6652:function(n,e,t){"use strict";t.r(e);var l=t(9601),o=t.n(l),i=t(2609),a=t.n(i),c=a()(o());c.push([n.id,".text-component-missing-name[data-v-49eeef70]{font-family:Courier New,Courier,monospace}.v-tabs-items[data-v-49eeef70]{overflow:visible}",""]),e["default"]=c},2392:function(n,e,t){"use strict";t.r(e);var l=t(9601),o=t.n(l),i=t(2609),a=t.n(i),c=a()(o());c.push([n.id,".v-badge__badge{height:auto;padding:0}",""]),e["default"]=c},6294:function(n,e,t){"use strict";t.r(e);var l=t(9601),o=t.n(l),i=t(2609),a=t.n(i),c=a()(o());c.push([n.id,".v-list[data-v-2eb37f67] .v-label{margin-left:5px}.v-list-item__icon[data-v-2eb37f67]{margin-right:15px!important}.v-list-item__title[data-v-2eb37f67]{color:#fff}",""]),e["default"]=c},1060:function(n,e,t){"use strict";t.r(e);var l=t(9601),o=t.n(l),i=t(2609),a=t.n(i),c=a()(o());c.push([n.id,".text-area-container[data-v-178f1219]{position:relative}.text-area-container .v-textarea[data-v-178f1219]{font-family:Courier New,Courier,monospace}.text-area-container .floating-buttons[data-v-178f1219]{position:absolute;top:12px;right:24px}.pulse[data-v-178f1219]{-webkit-animation:pulse-178f1219 1s infinite;animation:pulse-178f1219 1s infinite}@-webkit-keyframes pulse-178f1219{0%{opacity:1}50%{opacity:.5}}@keyframes pulse-178f1219{0%{opacity:1}50%{opacity:.5}}",""]),e["default"]=c},6668:function(n,e,t){var l=t(6652);l.__esModule&&(l=l.default),"string"===typeof l&&(l=[[n.id,l,""]]),l.locals&&(n.exports=l.locals);var o=t(3514).Z;o("346f306d",l,!0,{sourceMap:!1,shadowMode:!1})},2003:function(n,e,t){var l=t(2392);l.__esModule&&(l=l.default),"string"===typeof l&&(l=[[n.id,l,""]]),l.locals&&(n.exports=l.locals);var o=t(3514).Z;o("4f05f1a7",l,!0,{sourceMap:!1,shadowMode:!1})},4888:function(n,e,t){var l=t(6294);l.__esModule&&(l=l.default),"string"===typeof l&&(l=[[n.id,l,""]]),l.locals&&(n.exports=l.locals);var o=t(3514).Z;o("706a3f6d",l,!0,{sourceMap:!1,shadowMode:!1})},1789:function(n,e,t){var l=t(1060);l.__esModule&&(l=l.default),"string"===typeof l&&(l=[[n.id,l,""]]),l.locals&&(n.exports=l.locals);var o=t(3514).Z;o("2b72fdb8",l,!0,{sourceMap:!1,shadowMode:!1})}}]);
2
+ //# sourceMappingURL=784.js.map