cosmosc2-tool-dataviewer 5.0.2 → 5.0.3

Sign up to get free protection for your applications and to get access to all the features.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cosmosc2-tool-dataviewer
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.2
4
+ version: 5.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Melton
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-04-28 00:00:00.000000000 Z
12
+ date: 2022-05-13 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: " This plugin adds the COSMOS Data Viewer tool\n"
15
15
  email:
@@ -26,8 +26,8 @@ files:
26
26
  - tools/dataviewer/index.html
27
27
  - tools/dataviewer/js/14.js
28
28
  - tools/dataviewer/js/14.js.map
29
- - tools/dataviewer/js/686.js
30
- - tools/dataviewer/js/686.js.map
29
+ - tools/dataviewer/js/836.js
30
+ - tools/dataviewer/js/836.js.map
31
31
  - tools/dataviewer/js/app.js
32
32
  - tools/dataviewer/js/app.js.map
33
33
  homepage: https://github.com/BallAerospace/COSMOS
@@ -50,7 +50,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
50
50
  - !ruby/object:Gem::Version
51
51
  version: '0'
52
52
  requirements: []
53
- rubygems_version: 3.3.5
53
+ rubygems_version: 3.3.13
54
54
  signing_key:
55
55
  specification_version: 4
56
56
  summary: Ball Aerospace COSMOS
@@ -1,2 +0,0 @@
1
- (self["webpackChunk_cosmosc2_tool_dataviewer"]=self["webpackChunk_cosmosc2_tool_dataviewer"]||[]).push([[686],{5686:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return ve}});var i=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",[t("top-bar",{attrs:{menus:e.menus,title:e.title}}),t("v-row",{attrs:{dense:""}},[t("v-col",[t("v-text-field",{attrs:{label:"Start Date",type:"date",rules:[e.rules.required],"data-test":"start-date"},model:{value:e.startDate,callback:function(n){e.startDate=n},expression:"startDate"}})],1),t("v-col",[t("v-text-field",{attrs:{label:"Start Time",type:"time",step:"1",rules:[e.rules.required],"data-test":"start-time"},model:{value:e.startTime,callback:function(n){e.startTime=n},expression:"startTime"}})],1),t("v-col",[t("v-text-field",{attrs:{label:"End Date",type:"date",rules:e.endTime?[e.rules.required]:[],"data-test":"end-date"},model:{value:e.endDate,callback:function(n){e.endDate=n},expression:"endDate"}})],1),t("v-col",[t("v-text-field",{attrs:{label:"End Time",type:"time",step:"1",rules:e.endDate?[e.rules.required]:[],"data-test":"end-time"},model:{value:e.endTime,callback:function(n){e.endTime=n},expression:"endTime"}})],1),t("v-col",{staticClass:"pt-4",attrs:{cols:"auto"}},[e.running?t("v-btn",{attrs:{color:"red",width:"100","data-test":"stop-button"},on:{click:e.stop}},[e._v(" Stop ")]):t("v-btn",{attrs:{disabled:!e.canStart,color:"green",width:"100","data-test":"start-button"},on:{click:e.start}},[e._v(" Start ")])],1)],1),t("div",{directives:[{name:"show",rawName:"v-show",value:e.warning||e.error||e.connectionFailure,expression:"warning || error || connectionFailure"}],staticClass:"mb-3"},[t("v-alert",{attrs:{type:"warning",dismissible:""},model:{value:e.warning,callback:function(n){e.warning=n},expression:"warning"}},[e._v(" "+e._s(e.warningText)+" ")]),t("v-alert",{attrs:{type:"error",dismissible:""},model:{value:e.error,callback:function(n){e.error=n},expression:"error"}},[e._v(" "+e._s(e.errorText)+" ")]),t("v-alert",{attrs:{type:"error"},model:{value:e.connectionFailure,callback:function(n){e.connectionFailure=n},expression:"connectionFailure"}},[e._v(" COSMOS backend connection failed. ")])],1),t("v-card",[t("v-tabs",{ref:"tabs",model:{value:e.curTab,callback:function(n){e.curTab=n},expression:"curTab"}},[e._l(e.config.tabs,(function(n,i){return t("v-tab",{key:i,attrs:{"data-test":"tab"},on:{contextmenu:function(n){return e.tabMenu(n,i)}}},[e._v(" "+e._s(n.name)+" ")])})),t("v-btn",{staticClass:"mt-2 ml-2",attrs:{icon:"","data-test":"new-tab"},on:{click:e.addTab}},[t("v-icon",[e._v("mdi-tab-plus")])],1)],2),t("v-tabs-items",{model:{value:e.curTab,callback:function(n){e.curTab=n},expression:"curTab"}},e._l(e.config.tabs,(function(n,i){return t("v-tab-item",{key:i,attrs:{eager:""}},[e._l(n.packets,(function(n,o){return t("v-card",{key:i+"-"+o,attrs:{flat:""}},[t("v-divider"),t("v-card-title",{staticClass:"pa-3"},[t("span",{domProps:{textContent:e._s(e.packetTitle(n))}}),t("v-spacer"),t("v-btn",{attrs:{icon:"","data-test":"delete-packet"},on:{click:function(){return e.deleteComponent(i,o)}}},[t("v-icon",{attrs:{color:"red"}},[e._v("mdi-delete")])],1)],1),"DumpComponent"===n.component?t("dump-component",{directives:[{name:"show",rawName:"v-show",value:e.receivedPackets[e.topicKey(n)],expression:"receivedPackets[topicKey(packet)]"}],ref:e.topicKey(n)+"-display",refInFor:!0,attrs:{config:n.config},on:{"config-change":function(e){return n.config=e}}}):t("v-card-text",[t("v-alert",{attrs:{type:"error"}},[e._v(" Component missing: "),t("span",{staticClass:"text-component-missing-name"},[e._v(" "+e._s(n.component)+" ")])])],1),e.receivedPackets[e.topicKey(n)]?e._e():t("v-card-text",[e._v(" No data! Make sure to hit the START button! ")])],1)})),n.packets.length?e._e():t("v-card",[t("v-card-title",[e._v(" This tab is empty ")]),t("v-card-text",[e._v(" Click the button below to add packets. Right click on the tab name above to rename or delete this tab. ")])],1),t("v-btn",{attrs:{block:"","data-test":"new-packet"},on:{click:function(){return e.openComponentDialog(i)}}},[t("v-icon",{staticClass:"mr-2"},[e._v("$astro-add-large")]),e._v(" Click here to add a packet ")],1)],2)})),1),e.config.tabs.length?e._e():t("v-card",[t("v-card-title",[e._v("You're not viewing any packets")]),t("v-card-text",[e._v("Click the new tab icon to start.")])],1)],1),e.openConfig?t("open-config-dialog",{attrs:{tool:e.toolName},on:{success:function(n){return e.openConfiguration(n)}},model:{value:e.openConfig,callback:function(n){e.openConfig=n},expression:"openConfig"}}):e._e(),e.saveConfig?t("save-config-dialog",{attrs:{tool:e.toolName},on:{success:function(n){return e.saveConfiguration(n)}},model:{value:e.saveConfig,callback:function(n){e.saveConfig=n},expression:"saveConfig"}}):e._e(),t("v-dialog",{attrs:{width:"600"},model:{value:e.tabNameDialog,callback:function(n){e.tabNameDialog=n},expression:"tabNameDialog"}},[t("v-card",[t("v-system-bar",[t("v-spacer"),t("span",[e._v(" DataViewer: Rename Tab")]),t("v-spacer")],1),t("v-card-text",[t("v-text-field",{attrs:{label:"Tab name","data-test":"rename-tab-input"},model:{value:e.newTabName,callback:function(n){e.newTabName=n},expression:"newTabName"}})],1),t("v-card-actions",[t("v-spacer"),t("v-btn",{staticClass:"mx-2",attrs:{outlined:"","data-test":"cancel-rename"},on:{click:e.cancelTabRename}},[e._v(" Cancel ")]),t("v-btn",{staticClass:"mx-2",attrs:{color:"primary","data-test":"rename",disabled:!e.newTabName},on:{click:e.renameTab}},[e._v(" Rename ")])],1)],1)],1),t("v-menu",{attrs:{"position-x":e.tabMenuX,"position-y":e.tabMenuY,absolute:"","offset-y":""},model:{value:e.showTabMenu,callback:function(n){e.showTabMenu=n},expression:"showTabMenu"}},[t("v-list",[t("v-list-item",{attrs:{"data-test":"context-menu-rename"}},[t("v-list-item-title",{staticStyle:{cursor:"pointer"},on:{click:e.openTabNameDialog}},[e._v(" Rename ")])],1),t("v-list-item",{attrs:{"data-test":"context-menu-delete"}},[t("v-list-item-title",{staticStyle:{cursor:"pointer"},on:{click:e.deleteTab}},[e._v(" Delete ")])],1)],1)],1),t("add-component-dialog",{on:{add:e.addComponent,cancel:e.cancelAddComponent},model:{value:e.showAddComponentDialog,callback:function(n){e.showAddComponentDialog=n},expression:"showAddComponentDialog"}})],1)},o=[],l=t(9490),a=t(8373),c=(t(5047),t(4870),t(3985),t(8188),t(8178),t(3108),t(1939),t(4769),t(3450),t(6710),t(9805),t(5881)),s=t(570),r=t(7475),u=t(6330),m=t(2209),d=t(3696),A=(t(1372),t(1245),t(7950),t(9644)),p=t.n(A),f=t(4091),h=new f["default"],v=p().create({baseURL:location.origin,timeout:1e4,params:{}});v.interceptors.response.use((function(e){return e}),(function(e){if(401===e.response.status)delete localStorage.cosmosToken,CosmosAuth.login(location.href);else{var n,t,i,o,l,a,c,s="HTTP ".concat(e.response.status," - ");if(null!==(n=e.response)&&void 0!==n&&null!==(t=n.data)&&void 0!==t&&t.message)s+="".concat(e.response.data.message);else if(null!==(i=e.response)&&void 0!==i&&null!==(o=i.data)&&void 0!==o&&o.exception)s+="".concat(e.response.data.exception);else if(null!==(l=e.response)&&void 0!==l&&null!==(a=l.data)&&void 0!==a&&null!==(c=a.error)&&void 0!==c&&c.message)e.response.data.error.class&&(s+="".concat(e.response.data.error.class," ")),s+="".concat(e.response.data.error.message);else{var r;s+="".concat(null===(r=e.response)||void 0===r?void 0:r.data)}h.$notify.serious({title:"Network error",body:s})}throw e}));var C=v,g=function(){function e(){(0,u.Z)(this,e),(0,d.Z)(this,"id",1)}return(0,m.Z)(e,[{key:"exec",value:function(){var e=(0,l.Z)(regeneratorRuntime.mark((function e(n,t){var i,o,l,a=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return i=a.length>2&&void 0!==a[2]?a[2]:{},e.prev=1,e.next=4,CosmosAuth.updateToken(CosmosAuth.defaultMinValidity);case 4:e.next=9;break;case 6:e.prev=6,e.t0=e["catch"](1),CosmosAuth.login();case 9:return this.id=this.id+1,e.prev=10,i["scope"]=localStorage.scope,e.next=14,C.post("/cosmos-api/api",{jsonrpc:"2.0",method:n,params:t,id:this.id,keyword_params:i},{headers:{Authorization:localStorage.cosmosToken,"Content-Type":"application/json-rpc"}});case 14:return o=e.sent,e.abrupt("return",o.data.result);case 18:throw e.prev=18,e.t1=e["catch"](10),l=new Error,e.t1.response?(l.name=e.t1.response.data.error.data.class,l.message=e.t1.response.data.error.data.message):e.t1.request?(l.name="Request error",l.message="Request error, no response received"):l.name="Unknown error",l;case 23:case"end":return e.stop()}}),e,this,[[1,6],[10,18]])})));function n(n,t){return e.apply(this,arguments)}return n}()},{key:"decode_cosmos_type",value:function(e){if(null!==e&&"object"===(0,r.Z)(e)&&"Float"==e.json_class&&e.raw){if("NaN"==e.raw)return NaN;if("Infinity"==e.raw)return 1/0;if("-Infinity"==e.raw)return-1/0}return null}},{key:"encode_cosmos_type",value:function(e){return Number.isNaN(e)?{json_class:"Float",raw:"NaN"}:e==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:e==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}},{key:"get_all_interface_info",value:function(){return this.exec("get_all_interface_info",[])}},{key:"connect_interface",value:function(e){return this.exec("connect_interface",[e])}},{key:"disconnect_interface",value:function(e){return this.exec("disconnect_interface",[e])}},{key:"get_all_router_info",value:function(){return this.exec("get_all_router_info",[])}},{key:"connect_router",value:function(e){return this.exec("connect_router",[e])}},{key:"disconnect_router",value:function(e){return this.exec("disconnect_router",[e])}},{key:"get_all_target_info",value:function(){return this.exec("get_all_target_info",[])}},{key:"get_all_cmd_info",value:function(){return this.exec("get_all_cmd_info",[])}},{key:"get_all_tlm_info",value:function(){return this.exec("get_all_tlm_info",[])}},{key:"get_item",value:function(e,n,t){return this.exec("get_item",[e,n,t])}},{key:"get_parameter",value:function(e,n,t){return this.exec("get_parameter",[e,n,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(e){return this.exec("start_cmd_log",[e])}},{key:"start_tlm_log",value:function(e){return this.exec("start_tlm_log",[e])}},{key:"stop_cmd_log",value:function(e){return this.exec("stop_cmd_log",[e])}},{key:"stop_tlm_log",value:function(e){return this.exec("stop_tlm_log",[e])}},{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(e){return this.exec("set_limits_set",[e])}},{key:"get_background_tasks",value:function(){return this.exec("get_background_tasks",[])}},{key:"start_background_task",value:function(e){return this.exec("start_background_task",[e])}},{key:"stop_background_task",value:function(e){return this.exec("stop_background_task",[e])}},{key:"get_oldest_logfile",value:function(){return this.exec("get_oldest_logfile",[])}},{key:"get_target",value:function(e){return this.exec("get_target",[e])}},{key:"get_target_list",value:function(){return this.exec("get_target_list",[])}},{key:"get_telemetry",value:function(e,n){return this.exec("get_telemetry",[e,n])}},{key:"get_all_telemetry",value:function(e){return this.exec("get_all_telemetry",[e])}},{key:"get_tlm_packet",value:function(){var e=(0,l.Z)(regeneratorRuntime.mark((function e(n,t,i){var o,l,a,c;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.exec("get_tlm_packet",[n,t],{type:i});case 2:if(o=e.sent,null!=o)for(l=o.length,a=null,c=0;c<l;c++)a=this.decode_cosmos_type(o[c][1]),null!==a&&(o[c][1]=a);return e.abrupt("return",o);case 5:case"end":return e.stop()}}),e,this)})));function n(n,t,i){return e.apply(this,arguments)}return n}()},{key:"get_packet_derived_items",value:function(e,n){return this.exec("get_packet_derived_items",[e,n])}},{key:"get_tlm_buffer",value:function(e,n){return this.exec("get_tlm_buffer",[e,n])}},{key:"get_tlm_values",value:function(){var e=(0,l.Z)(regeneratorRuntime.mark((function e(n){var t,i,o,l;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.exec("get_tlm_values",[n]);case 2:for(t=e.sent,i=t[0].length,o=null,l=0;l<i;l++)o=this.decode_cosmos_type(t[0][l]),null!==o&&(t[0][l]=o);return e.abrupt("return",t);case 7:case"end":return e.stop()}}),e,this)})));function n(n){return e.apply(this,arguments)}return n}()},{key:"get_limits",value:function(e,n,t){return this.exec("get_limits",[e,n,t])}},{key:"tlm",value:function(){var e=(0,l.Z)(regeneratorRuntime.mark((function e(n,t,i){var o,l;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.exec("tlm",[n,t,i]);case 2:return o=e.sent,l=this.decode_cosmos_type(o),null!==l&&(0,s.Z)("data"),e.abrupt("return",o);case 6:case"end":return e.stop()}}),e,this)})));function n(n,t,i){return e.apply(this,arguments)}return n}()},{key:"get_all_commands",value:function(e){return this.exec("get_all_commands",[e])}},{key:"get_command",value:function(e,n){return this.exec("get_command",[e,n])}},{key:"get_cmd_value",value:function(e,n,t){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"CONVERTED";return this.exec("get_cmd_value",[e,n,t,i])}},{key:"get_cmd_buffer",value:function(e,n){return this.exec("get_cmd_buffer",[e,n])}},{key:"_cmd",value:function(e,n,t,i){var o=null;for(var l in i)Object.prototype.hasOwnProperty.call(i,l)&&(o=this.encode_cosmos_type(i[l]),null!==o&&(i[l]=o));return this.exec(e,[n,t,i])}},{key:"get_cmd_hazardous",value:function(e,n,t){return void 0===n?this.exec("get_cmd_hazardous",e):this._cmd("get_cmd_hazardous",e,n,t)}},{key:"cmd",value:function(e,n,t){return void 0===n?this.exec("cmd",e):this._cmd("cmd",e,n,t)}},{key:"cmd_no_range_check",value:function(e,n,t){return void 0===n?this.exec("cmd_no_range_check",e):this._cmd("cmd_no_range_check",e,n,t)}},{key:"cmd_raw",value:function(e,n,t){return void 0===n?this.exec("cmd_raw",e):this._cmd("cmd_raw",e,n,t)}},{key:"cmd_raw_no_range_check",value:function(e,n,t){return void 0===n?this.exec("cmd_raw_no_range_check",e):this._cmd("cmd_raw_no_range_check",e,n,t)}},{key:"cmd_no_hazardous_check",value:function(e,n,t){return void 0===n?this.exec("cmd_no_hazardous_check",e):this._cmd("cmd_no_hazardous_check",e,n,t)}},{key:"cmd_no_checks",value:function(e,n,t){return void 0===n?this.exec("cmd_no_checks",e):this._cmd("cmd_no_checks",e,n,t)}},{key:"cmd_raw_no_hazardous_check",value:function(e,n,t){return void 0===n?this.exec("cmd_raw_no_hazardous_check",e):this._cmd("cmd_raw_no_hazardous_check",e,n,t)}},{key:"cmd_raw_no_checks",value:function(e,n,t){return void 0===n?this.exec("cmd_raw_no_checks",e):this._cmd("cmd_raw_no_checks",e,n,t)}},{key:"get_interface_names",value:function(){return this.exec("get_interface_names",[])}},{key:"send_raw",value:function(e,n){return this.exec("send_raw",[e,n])}},{key:"list_configs",value:function(e){return this.exec("list_configs",[e])}},{key:"load_config",value:function(e,n){return this.exec("load_config",[e,n])}},{key:"save_config",value:function(e,n,t){return this.exec("save_config",[e,n,t])}},{key:"delete_config",value:function(e,n){return this.exec("delete_config",[e,n])}},{key:"get_out_of_limits",value:function(){return this.exec("get_out_of_limits",[])}},{key:"get_overall_limits_state",value:function(e){return this.exec("get_overall_limits_state",[e])}},{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(e){return this.exec("get_setting",[e])}},{key:"get_settings",value:function(e){return this.exec("get_settings",e)}},{key:"save_setting",value:function(e,n){return this.exec("save_setting",[e,n])}}]),e}(),b=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("v-dialog",{attrs:{width:"600"},on:{keydown:function(n){return!n.type.indexOf("key")&&e._k(n.keyCode,"esc",27,n.key,["Esc","Escape"])?null:e.cancel.apply(null,arguments)}},model:{value:e.show,callback:function(n){e.show=n},expression:"show"}},[t("v-card",[t("form",{on:{submit:function(n){return n.preventDefault(),e.success.apply(null,arguments)}}},[t("v-system-bar",[t("v-spacer"),t("span",[e._v("Open Configuration")]),t("v-spacer")],1),t("v-card-text",[t("div",{staticClass:"pa-3"},[t("v-row",{attrs:{dense:""}},[t("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:e.search,callback:function(n){e.search=n},expression:"search"}})],1),t("v-data-table",{attrs:{"show-select":"","single-select":"","item-key":"configId",search:e.search,headers:e.headers,items:e.configs,"items-per-page":5,"footer-props":{"items-per-page-options":[5]}},on:{"item-selected":e.itemSelected,"click:row":function(e,n){return n.select(e)}},scopedSlots:e._u([{key:"item.actions",fn:function(n){var i=n.item;return[t("v-btn",{staticClass:"mt-1",attrs:{"data-test":"item-delete",icon:""},on:{click:function(n){return e.deleteConfig(i)}}},[t("v-icon",[e._v("mdi-delete")])],1)]}}])}),t("v-row",{attrs:{dense:""}},[t("span",{directives:[{name:"show",rawName:"v-show",value:e.error,expression:"error"}],staticClass:"ma-2 red--text",domProps:{textContent:e._s(e.error)}})]),t("v-row",[t("v-btn",{attrs:{type:"submit",color:"success","data-test":"open-config-submit-btn",disabled:!!e.error},on:{click:function(n){return n.preventDefault(),e.success.apply(null,arguments)}}},[e._v(" Ok ")]),t("v-spacer"),t("v-btn",{attrs:{color:"primary","data-test":"open-config-cancel-btn"},on:{click:e.cancel}},[e._v(" Cancel ")])],1)],1)])],1)])],1)},k=[],y=(t(4908),t(4083),{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(e){this.$emit("input",e)}}},mounted:function(){var e=this,n=-1;(new g).list_configs(this.tool).then((function(t){e.configs=t.map((function(e){return n+=1,{configId:n,config:e}}))})).catch((function(n){e.$emit("warning","Failed to connect to Cosmos. ".concat(n))}))},methods:{itemSelected:function(e){e.value?this.selectedItem=e.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(e){var n=this;this.$dialog.confirm("Are you sure you want to delete: ".concat(e.config),{okText:"Delete",cancelText:"Cancel"}).then((function(t){n.selectedItem.config===e.config&&(n.selectedItem=null),n.configs.splice(n.configs.indexOf(e),1),(new g).delete_config(n.tool,e.config)})).catch((function(t){t&&n.$emit("warning","Failed to delete config ".concat(e.config," Error: ").concat(t))}))}}}),_=y,w=t(3287),T=(0,w.Z)(_,b,k,!1,null,"4f9dd098",null),x=T.exports,N=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("v-dialog",{attrs:{width:"600"},on:{keydown:function(n){return!n.type.indexOf("key")&&e._k(n.keyCode,"esc",27,n.key,["Esc","Escape"])?null:e.cancel.apply(null,arguments)}},model:{value:e.show,callback:function(n){e.show=n},expression:"show"}},[t("v-card",[t("form",{on:{submit:function(n){return n.preventDefault(),e.success.apply(null,arguments)}}},[t("v-system-bar",[t("v-spacer"),t("span",[e._v("Save Configuration")]),t("v-spacer")],1),t("v-card-text",[t("div",{staticClass:"pa-3"},[t("v-row",{attrs:{dense:""}},[t("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:e.search,callback:function(n){e.search=n},expression:"search"}})],1),t("v-data-table",{attrs:{"show-select":"","single-select":"","item-key":"configId",search:e.search,headers:e.headers,items:e.configs,"items-per-page":5,"footer-props":{"items-per-page-options":[5]}},on:{"item-selected":e.itemSelected,"click:row":function(e,n){return n.select(e)}},scopedSlots:e._u([{key:"item.actions",fn:function(n){var i=n.item;return[t("v-btn",{staticClass:"mt-1",attrs:{icon:"","data-test":"item-delete"},on:{click:function(n){return e.deleteConfig(i)}}},[t("v-icon",[e._v("mdi-delete")])],1)]}}])}),t("v-row",{attrs:{dense:""}},[t("v-text-field",{attrs:{"hide-details":"",autofocus:"",disabled:!!e.selectedItem,label:"Configuration Name","data-test":"name-input-save-config-dialog"},model:{value:e.configName,callback:function(n){e.configName=n},expression:"configName"}})],1),t("v-row",{attrs:{dense:""}},[t("span",{directives:[{name:"show",rawName:"v-show",value:e.error,expression:"error"}],staticClass:"ma-2 red--text",domProps:{textContent:e._s(e.error)}})]),t("v-row",[t("v-spacer"),t("v-btn",{staticClass:"mx-2",attrs:{outlined:""},on:{click:e.cancel}},[e._v(" Cancel ")]),t("v-btn",{staticClass:"mx-2",attrs:{type:"submit",color:"primary","data-test":"save-config-submit-btn",disabled:!!e.error},on:{click:function(n){return n.preventDefault(),e.success.apply(null,arguments)}}},[e._v(" Ok ")])],1)],1)])],1)])],1)},S=[],D={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(e){this.$emit("input",e)}}},mounted:function(){var e=this,n=-1;(new g).list_configs(this.tool).then((function(t){e.configs=t.map((function(e){return n+=1,{configId:n,config:e}}))})).catch((function(n){e.$emit("warning","Failed to connect to Cosmos. ".concat(n))}))},methods:{itemSelected:function(e){e.value?(this.selectedItem=e.item,this.configName=e.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(e){var n=this;this.$dialog.confirm("Are you sure you want to delete: ".concat(e.config),{okText:"Delete",cancelText:"Cancel"}).then((function(t){n.configName===e.config&&(n.selectedItem=null,n.configName=""),n.configs.splice(n.configs.indexOf(e.config),1),(new g).delete_config(n.tool,e.config)})).catch((function(t){t&&n.$emit("warning","Failed to delete config ".concat(e.config," Error: ").concat(t))}))}}},P=D,O=(0,w.Z)(P,N,S,!1,null,null,null),M=O.exports,I=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("v-container",{staticClass:"c-chooser px-0"},[t("v-row",[t("v-col",{attrs:{cols:e.colSize,"data-test":"select-target"}},[t("v-select",{attrs:{label:"Select Target","hide-details":"",dense:"",items:e.targetNames,"item-text":"label","item-value":"value"},on:{change:e.targetNameChanged},model:{value:e.selectedTargetName,callback:function(n){e.selectedTargetName=n},expression:"selectedTargetName"}})],1),t("v-col",{attrs:{cols:e.colSize,"data-test":"select-packet"}},[t("v-select",{attrs:{label:"Select Packet","hide-details":"",dense:"",disabled:e.packetsDisabled,items:e.packetNames,"item-text":"label","item-value":"value"},on:{change:e.packetNameChanged},model:{value:e.selectedPacketName,callback:function(n){e.selectedPacketName=n},expression:"selectedPacketName"}})],1),e.chooseItem&&!e.buttonDisabled?t("v-col",{attrs:{cols:e.colSize,"data-test":"select-item"}},[t("v-select",{attrs:{label:"Select Item","hide-details":"",dense:"",disabled:e.itemsDisabled,items:e.itemNames,"item-text":"label","item-value":"value"},on:{change:function(n){return e.itemNameChanged(n)}},model:{value:e.selectedItemName,callback:function(n){e.selectedItemName=n},expression:"selectedItemName"}})],1):e._e(),e.buttonText?t("v-col",{attrs:{cols:e.colSize}},[t("v-btn",{attrs:{disabled:e.buttonDisabled,block:"",color:"primary","data-test":"select-send"},on:{click:e.buttonPressed}},[e._v(" "+e._s(e.actualButtonText)+" ")])],1):e._e()],1),t("v-row",{attrs:{"no-gutters":""}},[t("v-col",{attrs:{cols:e.colSize}},[e._v("Description: "+e._s(e.description))])],1)],1)},R=[],E=(t(9529),t(4115),t(634),t(9228),{props:{allowAll:{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(e){return["cmd","tlm"].includes(e)}},reduced:{type:String,default:"DECOM",validator:function(e){return["REDUCED_DAY","REDUCED_HOUR","REDUCED_MINUTE","DECOM"].includes(e)}},unknown:{type:Boolean,default:!1},vertical:{type:Boolean,default:!1}},data:function(){var e,n,t;return{targetNames:[],packetNames:[],itemNames:[],selectedTargetName:null===(e=this.initialTargetName)||void 0===e?void 0:e.toUpperCase(),selectedPacketName:null===(n=this.initialPacketName)||void 0===n?void 0:n.toUpperCase(),selectedItemName:null===(t=this.initialItemName)||void 0===t?void 0:t.toUpperCase(),description:"",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 e=this;this.internalDisabled=!0,this.api=new g,this.api.get_target_list().then((function(n){e.targetNames=n.map((function(e){return{label:e,value:e}})),e.selectedTargetName||(e.selectedTargetName=e.targetNames[0].value,e.targetNameChanged(e.selectedTargetName)),e.updatePackets(),e.unknown&&e.targetNames.push(e.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(e,n){this.updatePackets(),this.itemNames=[]},reduced:function(e,n){this.updateItems()}},methods:{updatePackets:function(){var e=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");this.internalDisabled=!0;var n="tlm"===this.mode?"get_all_telemetry":"get_all_commands";this.api[n](this.selectedTargetName).then((function(n){e.packetNames=n.map((function(e){return{label:e.packet_name,value:e.packet_name,description:e.description}})),e.allowAll&&e.packetNames.unshift(e.ALL),e.selectedPacketName||(e.selectedPacketName=e.packetNames[0].value,e.packetNameChanged(e.selectedPacketName));var t=e.packetNames.find((function(n){return n.value===e.selectedPacketName}));e.description=t.description,e.chooseItem&&e.updateItems(),e.internalDisabled=!1}))},updateItems:function(){var e=this;if("ALL"!==this.selectedPacketName){this.internalDisabled=!0;var n="tlm"===this.mode?"get_telemetry":"get_command";this.api[n](this.selectedTargetName,this.selectedPacketName).then((function(n){e.itemNames=n.items.map((function(n){return"DECOM"===e.reduced?[{label:n.name,value:n.name,description:n.description}]:e.makeReducedItems(n)})).reduce((function(e,n){return e.concat(n)}),[]),e.allowAll&&e.itemNames.unshift(e.ALL),e.selectedItemName||(e.selectedItemName=e.itemNames[0].value),e.description=e.itemNames[0].description,e.internalDisabled=!1,e.$emit("on-set",{targetName:e.selectedTargetName,packetName:e.selectedPacketName,itemName:e.selectedItemName,reduced:e.reduced})}))}},makeReducedItems:function(e){var n=!e.array_size&&!e.states;return n&&["UINT","INT","FLOAT"].includes(e.data_type)?["MIN","MAX","AVG","STDDEV"].map((function(n){return{label:"".concat(e.name,"_").concat(n),value:"".concat(e.name,"_").concat(n),description:"".concat(n," ").concat(e.description)}})):[]},targetNameChanged:function(e){this.selectedTargetName=e,this.selectedPacketName="",this.selectedItemName="",this.updatePackets()},packetNameChanged:function(e){if("ALL"===e)this.itemsDisabled=!0,this.internalDisabled=!1;else{this.itemsDisabled=!1;var n=this.packetNames.find((function(n){return e===n.value}));this.selectedPacketName=n.value,this.description=n.description}this.chooseItem?(this.selectedItemName="",this.updateItems()):this.$emit("on-set",{targetName:this.selectedTargetName,packetName:this.selectedPacketName,reduced:this.reduced})},itemNameChanged:function(e){var n=this.itemNames.find((function(n){return e===n.value}));this.selectedItemName=n.value,this.description=n.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 e=this;this.packetNames.forEach((function(n){if(n!==e.ALL){var t="tlm"===e.mode?"get_telemetry":"get_command";e.api[t](e.selectedTargetName,n.value).then((function(t){t.items.forEach((function(t){e.$emit("click",{targetName:e.selectedTargetName,packetName:n.value,itemName:t["name"],reduced:e.reduced})}))}))}}))},allPacketItems:function(){var e=this;this.itemNames.forEach((function(n){n!==e.ALL&&e.$emit("click",{targetName:e.selectedTargetName,packetName:e.selectedPacketName,itemName:n.value,reduced:e.reduced})}))}}}),$=E,L=(0,w.Z)($,I,R,!1,null,null,null),F=L.exports,U=t(5563),V=function(){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/cosmos-api/cable";(0,u.Z)(this,e),this._cable=U.createConsumer(n)}return(0,m.Z)(e,[{key:"disconnect",value:function(){this._cable.disconnect()}},{key:"createSubscription",value:function(e,n){var t=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return CosmosAuth.updateToken(CosmosAuth.defaultMinValidity).then((function(){return t._cable.subscriptions.create((0,a.Z)({channel:e,scope:n,token:localStorage.cosmosToken},o),i)}))}}]),e}(),B=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("mounting-portal",{attrs:{"mount-to":"#cosmos-menu",append:""}},[t("div",{staticClass:"v-toolbar__content"},[e._l(e.menus,(function(n,i){return t("v-menu",{key:i,attrs:{"offset-y":""},scopedSlots:e._u([{key:"activator",fn:function(i){var o=i.on,l=i.attrs;return[t("v-btn",e._g(e._b({staticClass:"mx-1",attrs:{outlined:"","data-test":e.formatDT(e.title+" "+n.label)}},"v-btn",l,!1),o),[t("span",{domProps:{textContent:e._s(n.label)}}),t("v-icon",{attrs:{right:""}},[e._v(" mdi-menu-down ")])],1)]}}],null,!0)},[t("v-list",[t("v-radio-group",{staticClass:"ma-0 pa-0",attrs:{value:n.radioGroup,"hide-details":"",dense:""}},[e._l(n.items,(function(i,o){return[i.divider?t("v-divider",{key:o}):t("v-list-item",{key:o,attrs:{disabled:i.disabled,"data-test":e.formatDT(e.title+" "+n.label+" "+i.label)},on:{click:i.command}},[i.radio?t("v-list-item-action",[t("v-radio",{attrs:{color:"secondary",label:i.label,value:i.label}})],1):e._e(),i.checkbox?t("v-list-item-action",[t("v-checkbox",{attrs:{color:"secondary",label:i.label,value:i.label},model:{value:e.checked,callback:function(n){e.checked=n},expression:"checked"}})],1):e._e(),i.icon?t("v-list-item-icon",[t("v-icon",{attrs:{disabled:i.disabled},domProps:{textContent:e._s(i.icon)}})],1):e._e(),i.radio||i.checkbox?e._e():t("v-list-item-title",{style:"cursor: pointer;"+(i.disabled?"opacity: 0.2":""),domProps:{textContent:e._s(i.label)}})],1)]}))],2)],1)],1)})),t("v-spacer"),t("v-toolbar-title",{domProps:{textContent:e._s(e.title)}}),t("v-spacer")],2)])},j=[],W=(t(5940),t(1639),{props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},methods:{formatDT:function(e){return e.replaceAll(" ","-").toLowerCase()}}}),Z=W,H=(t(7162),(0,w.Z)(Z,B,j,!1,null,"e3bb7458",null)),z=H.exports,K=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("v-container",{staticClass:"pt-0"},[t("v-row",{attrs:{dense:""}},[t("v-col",[t("v-text-field",{staticClass:"pt-0 mt-0",attrs:{label:"Search","append-icon":"mdi-magnify","single-line":"","hide-details":""},model:{value:e.filterText,callback:function(n){e.filterText=n},expression:"filterText"}})],1)],1),t("v-row",[t("v-col",[t("v-slider",{attrs:{"prepend-icon":"mdi-step-backward","append-icon":"mdi-step-forward",min:1-e.history.length,max:0,"hide-details":""},on:{mousedown:e.pause,"click:prepend":e.stepBackward,"click:append":e.stepForward},model:{value:e.pauseOffset,callback:function(n){e.pauseOffset=n},expression:"pauseOffset"}})],1)],1),t("v-row",{attrs:{dense:"","no-gutters":""}},[t("v-col",[t("div",{staticClass:"text-area-container"},[t("v-textarea",{ref:"textarea",attrs:{value:e.displayText,"auto-grow":1===e.receivedCount,readonly:"",solo:"",flat:"","hide-details":"","data-test":"dump-component-text-area"}}),t("div",{staticClass:"floating-buttons"},[t("v-menu",{attrs:{"close-on-content-click":!1,"min-width":900,"nudge-left":910},scopedSlots:e._u([{key:"activator",fn:function(n){var i=n.on,o=n.attrs;return[t("v-btn",e._g(e._b({staticClass:"ml-2",attrs:{color:"secondary",fab:"",small:"","data-test":"dump-component-open-settings"}},"v-btn",o,!1),i),[t("v-icon",[e._v("$astro-settings")])],1)]}}])},[t("v-card",[t("v-card-title",{attrs:{"data-test":"display-settings-card"}},[e._v(" Display settings ")]),t("v-card-text",[t("v-row",{attrs:{"no-gutters":""}},["RAW"===e.mode?t("v-col",[t("v-radio-group",{attrs:{label:"Display format"},model:{value:e.currentConfig.format,callback:function(n){e.$set(e.currentConfig,"format",n)},expression:"currentConfig.format"}},[t("v-radio",{attrs:{label:"Hex",value:"hex","data-test":"dump-component-settings-format-hex"}}),t("v-radio",{attrs:{label:"ASCII",value:"ascii","data-test":"dump-component-settings-format-ascii"}})],1)],1):e._e(),t("v-col",[t("v-radio-group",{attrs:{label:"Print newest packets to the"},model:{value:e.currentConfig.newestAtTop,callback:function(n){e.$set(e.currentConfig,"newestAtTop",n)},expression:"currentConfig.newestAtTop"}},[t("v-radio",{attrs:{label:"Top",value:"","data-test":"dump-component-settings-newest-top"}}),t("v-radio",{attrs:{label:"Bottom",value:!1,"data-test":"dump-component-settings-newest-bottom"}})],1)],1),t("v-col",["RAW"===e.mode?t("v-switch",{attrs:{label:"Show line address","data-test":"dump-component-settings-show-address"},model:{value:e.currentConfig.showLineAddress,callback:function(n){e.$set(e.currentConfig,"showLineAddress",n)},expression:"currentConfig.showLineAddress"}}):e._e(),t("v-switch",{attrs:{label:"Show timestamp","data-test":"dump-component-settings-show-timestamp"},model:{value:e.currentConfig.showTimestamp,callback:function(n){e.$set(e.currentConfig,"showTimestamp",n)},expression:"currentConfig.showTimestamp"}})],1),t("v-col",["RAW"===e.mode?t("v-text-field",{attrs:{label:"Bytes per line",type:"number",min:"1","data-test":"dump-component-settings-num-bytes"},on:{change:e.validateBytesPerLine},model:{value:e.currentConfig.bytesPerLine,callback:function(n){e.$set(e.currentConfig,"bytesPerLine",n)},expression:"currentConfig.bytesPerLine"}}):e._e(),t("v-text-field",{attrs:{label:"Packets to show",type:"number",hint:"Maximum: "+this.history.length,"persistent-hint":"",min:1,max:this.history.length,"data-test":"dump-component-settings-num-packets"},on:{change:e.validatePacketsToShow},model:{value:e.currentConfig.packetsToShow,callback:function(n){e.$set(e.currentConfig,"packetsToShow",n)},expression:"currentConfig.packetsToShow"}})],1)],1)],1)],1)],1),t("v-btn",{staticClass:"ml-2",attrs:{color:"secondary",fab:"",small:"","data-test":"dump-component-download"},on:{click:e.download}},[t("v-icon",[e._v("mdi-file-download")])],1),t("v-btn",{staticClass:"ml-2",class:{pulse:e.paused},attrs:{color:"primary",fab:"","data-test":"dump-component-play-pause"},on:{click:e.togglePlayPause}},[e.paused?t("v-icon",{attrs:{large:""}},[e._v("mdi-play")]):t("v-icon",{attrs:{large:""}},[e._v("mdi-pause")])],1)],1)],1)])],1)],1)},Y=[],q=t(5225),G=(t(4707),t(1497),t(5640),t(1871),t(2501),t(5342),t(1235),t(5734),t(8233),t(8673),t(6886),t(4121),t(523),t(6635)),X=t.n(G);function J(){var e="/cosmos/plugins/packages/cosmosc2-tool-dataviewer/src/tools/DataViewer/Component.js",n="728ad71a93ea813fc1183b04ab0a6c4d4b8fd7aa",t=new Function("return this")(),i="__coverage__",o={path:"/cosmos/plugins/packages/cosmosc2-tool-dataviewer/src/tools/DataViewer/Component.js",statementMap:{0:{start:{line:27,column:4},end:{line:30,column:5}},1:{start:{line:34,column:6},end:{line:38,column:17}},2:{start:{line:45,column:8},end:{line:45,column:40}},3:{start:{line:50,column:4},end:{line:54,column:5}},4:{start:{line:51,column:6},end:{line:53,column:7}},5:{start:{line:60,column:6},end:{line:60,column:30}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:26,column:8},end:{line:26,column:9}},loc:{start:{line:26,column:20},end:{line:31,column:3}},line:26},1:{name:"(anonymous_1)",decl:{start:{line:33,column:10},end:{line:33,column:11}},loc:{start:{line:33,column:22},end:{line:39,column:5}},line:33},2:{name:"(anonymous_2)",decl:{start:{line:44,column:15},end:{line:44,column:16}},loc:{start:{line:44,column:30},end:{line:46,column:7}},line:44},3:{name:"(anonymous_3)",decl:{start:{line:49,column:11},end:{line:49,column:12}},loc:{start:{line:49,column:23},end:{line:55,column:3}},line:49},4:{name:"(anonymous_4)",decl:{start:{line:57,column:13},end:{line:57,column:14}},loc:{start:{line:57,column:29},end:{line:61,column:5}},line:57}},branchMap:{0:{loc:{start:{line:34,column:13},end:{line:38,column:17}},type:"cond-expr",locations:[{start:{line:37,column:10},end:{line:37,column:15}},{start:{line:38,column:10},end:{line:38,column:17}}],line:34},1:{loc:{start:{line:34,column:13},end:{line:36,column:40}},type:"binary-expr",locations:[{start:{line:34,column:13},end:{line:34,column:30}},{start:{line:35,column:8},end:{line:35,column:36}},{start:{line:36,column:8},end:{line:36,column:40}}],line:34},2:{loc:{start:{line:50,column:4},end:{line:54,column:5}},type:"if",locations:[{start:{line:50,column:4},end:{line:54,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:50}},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:"728ad71a93ea813fc1183b04ab0a6c4d4b8fd7aa"},l=t[i]||(t[i]={});l[e]&&l[e].hash===n||(l[e]=o);var a=l[e];return J=function(){return a},a}J();var Q={props:{config:{type:Object}},data:function(){return J().f[0]++,J().s[0]++,{currentConfig:{},lastReceived:null}},computed:{mode:function(){return J().f[1]++,J().s[1]++,J().b[1][0]++,this.lastReceived&&(J().b[1][1]++,this.lastReceived.length>0)&&(J().b[1][2]++,"buffer"in this.lastReceived[0])?(J().b[0][0]++,"RAW"):(J().b[0][1]++,"DECOM")}},watch:{currentConfig:{deep:!0,handler:function(e){J().f[2]++,J().s[2]++,this.$emit("config-change",e)}}},created:function(){J().f[3]++,J().s[3]++,this.config?(J().b[2][0]++,J().s[4]++,this.currentConfig=(0,a.Z)({},this.config)):J().b[2][1]++},methods:{receive:function(e){J().f[4]++,J().s[5]++,this.lastReceived=e}}};function ee(){var e="/cosmos/plugins/packages/cosmosc2-tool-dataviewer/src/tools/DataViewer/DumpComponent.vue",n="9c1491f377f561df576e93e44d0b5bb9cb041d30",t=new Function("return this")(),i="__coverage__",o={path:"/cosmos/plugins/packages/cosmosc2-tool-dataviewer/src/tools/DataViewer/DumpComponent.vue",statementMap:{0:{start:{line:193,column:25},end:{line:193,column:28}},1:{start:{line:198,column:4},end:{line:210,column:5}},2:{start:{line:216,column:6},end:{line:216,column:171}},3:{start:{line:219,column:6},end:{line:219,column:104}},4:{start:{line:224,column:6},end:{line:247,column:8}},5:{start:{line:225,column:8},end:{line:225,column:28}},6:{start:{line:226,column:22},end:{line:229,column:9}},7:{start:{line:230,column:8},end:{line:232,column:9}},8:{start:{line:231,column:10},end:{line:231,column:46}},9:{start:{line:233,column:8},end:{line:233,column:73}},10:{start:{line:234,column:8},end:{line:234,column:51}},11:{start:{line:235,column:8},end:{line:246,column:9}},12:{start:{line:236,column:29},end:{line:236,column:62}},13:{start:{line:237,column:10},end:{line:245,column:11}},14:{start:{line:238,column:12},end:{line:244,column:13}},15:{start:{line:239,column:14},end:{line:239,column:43}},16:{start:{line:240,column:19},end:{line:244,column:13}},17:{start:{line:241,column:14},end:{line:241,column:71}},18:{start:{line:243,column:14},end:{line:243,column:53}},19:{start:{line:248,column:6},end:{line:248,column:28}},20:{start:{line:249,column:6},end:{line:251,column:7}},21:{start:{line:250,column:8},end:{line:250,column:35}},22:{start:{line:254,column:6},end:{line:260,column:7}},23:{start:{line:255,column:8},end:{line:255,column:43}},24:{start:{line:256,column:8},end:{line:256,column:49}},25:{start:{line:258,column:8},end:{line:258,column:28}},26:{start:{line:259,column:8},end:{line:259,column:33}},27:{start:{line:263,column:6},end:{line:263,column:31}},28:{start:{line:266,column:6},end:{line:266,column:31}},29:{start:{line:270,column:26},end:{line:277,column:5}},30:{start:{line:278,column:4},end:{line:281,column:5}},31:{start:{line:284,column:4},end:{line:284,column:75}},32:{start:{line:289,column:6},end:{line:300,column:7}},33:{start:{line:290,column:8},end:{line:293,column:9}},34:{start:{line:295,column:8},end:{line:299,column:9}},35:{start:{line:305,column:8},end:{line:305,column:60}},36:{start:{line:306,column:6},end:{line:309,column:8}},37:{start:{line:307,column:8},end:{line:308,column:58}},38:{start:{line:312,column:20},end:{line:312,column:67}},39:{start:{line:314,column:25},end:{line:314,column:74}},40:{start:{line:315,column:6},end:{line:320,column:35}},41:{start:{line:316,column:28},end:{line:316,column:34}},42:{start:{line:321,column:6},end:{line:325,column:7}},43:{start:{line:323,column:31},end:{line:323,column:77}},44:{start:{line:324,column:8},end:{line:324,column:50}},45:{start:{line:327,column:18},end:{line:327,column:63}},46:{start:{line:328,column:6},end:{line:328,column:35}},47:{start:{line:329,column:6},end:{line:331,column:7}},48:{start:{line:330,column:8},end:{line:330,column:35}},49:{start:{line:332,column:6},end:{line:332,column:45}},50:{start:{line:335,column:6},end:{line:335,column:71}},51:{start:{line:338,column:17},end:{line:338,column:19}},52:{start:{line:339,column:6},end:{line:350,column:7}},53:{start:{line:340,column:29},end:{line:340,column:50}},54:{start:{line:341,column:32},end:{line:341,column:64}},55:{start:{line:342,column:29},end:{line:342,column:65}},56:{start:{line:344,column:24},end:{line:344,column:72}},57:{start:{line:345,column:8},end:{line:345,column:63}},58:{start:{line:346,column:8},end:{line:346,column:57}},59:{start:{line:348,column:8},end:{line:348,column:69}},60:{start:{line:349,column:8},end:{line:349,column:36}},61:{start:{line:351,column:6},end:{line:382,column:7}},62:{start:{line:353,column:8},end:{line:376,column:21}},63:{start:{line:356,column:30},end:{line:356,column:32}},64:{start:{line:357,column:12},end:{line:365,column:13}},65:{start:{line:358,column:14},end:{line:360,column:15}},66:{start:{line:359,column:16},end:{line:359,column:79}},67:{start:{line:362,column:14},end:{line:364,column:15}},68:{start:{line:363,column:16},end:{line:363,column:64}},69:{start:{line:366,column:23},end:{line:366,column:44}},70:{start:{line:368,column:12},end:{line:373,column:13}},71:{start:{line:369,column:30},end:{line:371,column:33}},72:{start:{line:372,column:14},end:{line:372,column:42}},73:{start:{line:374,column:12},end:{line:374,column:23}},74:{start:{line:378,column:8},end:{line:381,column:21}},75:{start:{line:379,column:28},end:{line:379,column:42}},76:{start:{line:380,column:25},end:{line:380,column:51}},77:{start:{line:383,column:6},end:{line:383,column:35}},78:{start:{line:384,column:6},end:{line:384,column:17}},79:{start:{line:387,column:6},end:{line:389,column:7}},80:{start:{line:388,column:8},end:{line:388,column:43}},81:{start:{line:392,column:6},end:{line:396,column:7}},82:{start:{line:393,column:8},end:{line:393,column:62}},83:{start:{line:394,column:13},end:{line:396,column:7}},84:{start:{line:395,column:8},end:{line:395,column:44}},85:{start:{line:399,column:19},end:{line:401,column:8}},86:{start:{line:403,column:19},end:{line:403,column:46}},87:{start:{line:404,column:16},end:{line:404,column:41}},88:{start:{line:405,column:6},end:{line:405,column:21}},89:{start:{line:406,column:6},end:{line:409,column:7}},90:{start:{line:410,column:6},end:{line:410,column:18}},91:{start:{line:411,column:6},end:{line:411,column:37}},92:{start:{line:414,column:6},end:{line:414,column:24}},93:{start:{line:417,column:6},end:{line:417,column:32}},94:{start:{line:420,column:6},end:{line:420,column:18}},95:{start:{line:421,column:6},end:{line:421,column:24}},96:{start:{line:424,column:6},end:{line:424,column:18}},97:{start:{line:425,column:6},end:{line:425,column:24}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:197,column:8},end:{line:197,column:9}},loc:{start:{line:197,column:20},end:{line:211,column:3}},line:197},1:{name:"(anonymous_1)",decl:{start:{line:215,column:24},end:{line:215,column:25}},loc:{start:{line:215,column:36},end:{line:217,column:5}},line:215},2:{name:"(anonymous_2)",decl:{start:{line:218,column:26},end:{line:218,column:27}},loc:{start:{line:218,column:38},end:{line:220,column:5}},line:218},3:{name:"(anonymous_3)",decl:{start:{line:223,column:18},end:{line:223,column:19}},loc:{start:{line:223,column:34},end:{line:252,column:5}},line:223},4:{name:"(anonymous_4)",decl:{start:{line:224,column:19},end:{line:224,column:20}},loc:{start:{line:224,column:31},end:{line:247,column:7}},line:224},5:{name:"(anonymous_5)",decl:{start:{line:253,column:12},end:{line:253,column:13}},loc:{start:{line:253,column:27},end:{line:261,column:5}},line:253},6:{name:"(anonymous_6)",decl:{start:{line:262,column:24},end:{line:262,column:25}},loc:{start:{line:262,column:36},end:{line:264,column:5}},line:262},7:{name:"(anonymous_7)",decl:{start:{line:265,column:37},end:{line:265,column:38}},loc:{start:{line:265,column:49},end:{line:267,column:5}},line:265},8:{name:"(anonymous_8)",decl:{start:{line:269,column:11},end:{line:269,column:12}},loc:{start:{line:269,column:23},end:{line:282,column:3}},line:269},9:{name:"(anonymous_9)",decl:{start:{line:283,column:11},end:{line:283,column:12}},loc:{start:{line:283,column:23},end:{line:285,column:3}},line:283},10:{name:"(anonymous_10)",decl:{start:{line:287,column:21},end:{line:287,column:22}},loc:{start:{line:287,column:33},end:{line:301,column:5}},line:287},11:{name:"(anonymous_11)",decl:{start:{line:302,column:26},end:{line:302,column:27}},loc:{start:{line:302,column:38},end:{line:310,column:5}},line:302},12:{name:"(anonymous_12)",decl:{start:{line:306,column:21},end:{line:306,column:22}},loc:{start:{line:306,column:27},end:{line:309,column:7}},line:306},13:{name:"(anonymous_13)",decl:{start:{line:311,column:24},end:{line:311,column:25}},loc:{start:{line:311,column:36},end:{line:333,column:5}},line:311},14:{name:"(anonymous_14)",decl:{start:{line:316,column:16},end:{line:316,column:17}},loc:{start:{line:316,column:28},end:{line:316,column:34}},line:316},15:{name:"(anonymous_15)",decl:{start:{line:334,column:19},end:{line:334,column:20}},loc:{start:{line:334,column:35},end:{line:336,column:5}},line:334},16:{name:"(anonymous_16)",decl:{start:{line:337,column:25},end:{line:337,column:26}},loc:{start:{line:337,column:43},end:{line:385,column:5}},line:337},17:{name:"(anonymous_17)",decl:{start:{line:354,column:15},end:{line:354,column:16}},loc:{start:{line:354,column:37},end:{line:375,column:11}},line:354},18:{name:"(anonymous_18)",decl:{start:{line:358,column:42},end:{line:358,column:43}},loc:{start:{line:359,column:16},end:{line:359,column:79}},line:359},19:{name:"(anonymous_19)",decl:{start:{line:362,column:42},end:{line:362,column:43}},loc:{start:{line:363,column:16},end:{line:363,column:64}},line:363},20:{name:"(anonymous_20)",decl:{start:{line:379,column:18},end:{line:379,column:19}},loc:{start:{line:379,column:28},end:{line:379,column:42}},line:379},21:{name:"(anonymous_21)",decl:{start:{line:380,column:15},end:{line:380,column:16}},loc:{start:{line:380,column:25},end:{line:380,column:51}},line:380},22:{name:"(anonymous_22)",decl:{start:{line:386,column:26},end:{line:386,column:27}},loc:{start:{line:386,column:38},end:{line:390,column:5}},line:386},23:{name:"(anonymous_23)",decl:{start:{line:391,column:27},end:{line:391,column:28}},loc:{start:{line:391,column:39},end:{line:397,column:5}},line:391},24:{name:"(anonymous_24)",decl:{start:{line:398,column:14},end:{line:398,column:15}},loc:{start:{line:398,column:26},end:{line:412,column:5}},line:398},25:{name:"(anonymous_25)",decl:{start:{line:413,column:11},end:{line:413,column:12}},loc:{start:{line:413,column:23},end:{line:415,column:5}},line:413},26:{name:"(anonymous_26)",decl:{start:{line:416,column:21},end:{line:416,column:22}},loc:{start:{line:416,column:33},end:{line:418,column:5}},line:416},27:{name:"(anonymous_27)",decl:{start:{line:419,column:18},end:{line:419,column:19}},loc:{start:{line:419,column:30},end:{line:422,column:5}},line:419},28:{name:"(anonymous_28)",decl:{start:{line:423,column:17},end:{line:423,column:18}},loc:{start:{line:423,column:29},end:{line:426,column:5}},line:423}},branchMap:{0:{loc:{start:{line:230,column:8},end:{line:232,column:9}},type:"if",locations:[{start:{line:230,column:8},end:{line:232,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:230},1:{loc:{start:{line:235,column:8},end:{line:246,column:9}},type:"if",locations:[{start:{line:235,column:8},end:{line:246,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:235},2:{loc:{start:{line:237,column:10},end:{line:245,column:11}},type:"if",locations:[{start:{line:237,column:10},end:{line:245,column:11}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:237},3:{loc:{start:{line:238,column:12},end:{line:244,column:13}},type:"if",locations:[{start:{line:238,column:12},end:{line:244,column:13}},{start:{line:240,column:19},end:{line:244,column:13}}],line:238},4:{loc:{start:{line:240,column:19},end:{line:244,column:13}},type:"if",locations:[{start:{line:240,column:19},end:{line:244,column:13}},{start:{line:242,column:19},end:{line:244,column:13}}],line:240},5:{loc:{start:{line:249,column:6},end:{line:251,column:7}},type:"if",locations:[{start:{line:249,column:6},end:{line:251,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:249},6:{loc:{start:{line:249,column:10},end:{line:249,column:57}},type:"binary-expr",locations:[{start:{line:249,column:10},end:{line:249,column:22}},{start:{line:249,column:26},end:{line:249,column:57}}],line:249},7:{loc:{start:{line:254,column:6},end:{line:260,column:7}},type:"if",locations:[{start:{line:254,column:6},end:{line:260,column:7}},{start:{line:257,column:13},end:{line:260,column:7}}],line:254},8:{loc:{start:{line:289,column:6},end:{line:300,column:7}},type:"if",locations:[{start:{line:289,column:6},end:{line:300,column:7}},{start:{line:294,column:13},end:{line:300,column:7}}],line:289},9:{loc:{start:{line:312,column:20},end:{line:312,column:67}},type:"cond-expr",locations:[{start:{line:312,column:34},end:{line:312,column:52}},{start:{line:312,column:55},end:{line:312,column:67}}],line:312},10:{loc:{start:{line:314,column:25},end:{line:314,column:74}},type:"cond-expr",locations:[{start:{line:314,column:39},end:{line:314,column:52}},{start:{line:314,column:55},end:{line:314,column:74}}],line:314},11:{loc:{start:{line:321,column:6},end:{line:325,column:7}},type:"if",locations:[{start:{line:321,column:6},end:{line:325,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:321},12:{loc:{start:{line:329,column:6},end:{line:331,column:7}},type:"if",locations:[{start:{line:329,column:6},end:{line:331,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:329},13:{loc:{start:{line:339,column:6},end:{line:350,column:7}},type:"if",locations:[{start:{line:339,column:6},end:{line:350,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:339},14:{loc:{start:{line:351,column:6},end:{line:382,column:7}},type:"if",locations:[{start:{line:351,column:6},end:{line:382,column:7}},{start:{line:377,column:13},end:{line:382,column:7}}],line:351},15:{loc:{start:{line:357,column:12},end:{line:365,column:13}},type:"if",locations:[{start:{line:357,column:12},end:{line:365,column:13}},{start:{line:361,column:19},end:{line:365,column:13}}],line:357},16:{loc:{start:{line:368,column:12},end:{line:373,column:13}},type:"if",locations:[{start:{line:368,column:12},end:{line:373,column:13}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:368},17:{loc:{start:{line:387,column:6},end:{line:389,column:7}},type:"if",locations:[{start:{line:387,column:6},end:{line:389,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:387},18:{loc:{start:{line:392,column:6},end:{line:396,column:7}},type:"if",locations:[{start:{line:392,column:6},end:{line:396,column:7}},{start:{line:394,column:13},end:{line:396,column:7}}],line:392},19:{loc:{start:{line:394,column:13},end:{line:396,column:7}},type:"if",locations:[{start:{line:394,column:13},end:{line:396,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:394}},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:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4LA;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;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# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\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 :auto-grow="receivedCount === 1"\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 receivedCount: 0,\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 receivedCount: ++this.receivedCount,\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 // const receivedCt = packet.receivedCount.toString().padEnd(20, \' \') // Padding fixes issue where opening asterisks would get deleted by trimDisplayText\n let timestamp = \'********************************************\\n\'\n timestamp += `* Received seconds: ${receivedSeconds}\\n`\n timestamp += `* Received time: ${receivedDate}\\n`\n // timestamp += `* Received count: ${receivedCt}\\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.replace(/\\n/, \'\\\\n\').replace(/\\r/, \'\\\\r\').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 != \'time\')\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:"9c1491f377f561df576e93e44d0b5bb9cb041d30"},l=t[i]||(t[i]={});l[e]&&l[e].hash===n||(l[e]=o);var a=l[e];return ee=function(){return a},a}ee();var ne=(ee().s[0]++,100),te={mixins:[Q],data:function(){return ee().f[0]++,ee().s[1]++,{history:new Array(ne),historyPointer:-1,receivedCount:0,filterText:"",paused:!1,pausedAt:0,pauseOffset:0,pausedHistory:[],textarea:null,displayText:null,packetSize:0}},computed:{allInstantSettings:function(){return ee().f[1]++,ee().s[2]++,"".concat(this.currentConfig.format,"|").concat(this.currentConfig.showLineAddress,"|").concat(this.currentConfig.showTimestamp,"|").concat(this.currentConfig.newestAtTop,"|").concat(this.pauseOffset)},allDebouncedSettings:function(){return ee().f[2]++,ee().s[3]++,"".concat(this.currentConfig.bytesPerLine,"|").concat(this.currentConfig.packetsToShow,"|").concat(this.filterText)}},watch:{lastReceived:function(e){var n=this;ee().f[3]++,ee().s[4]++,e.forEach((function(e){ee().f[4]++,ee().s[5]++,delete e.packet;var t=(ee().s[6]++,(0,a.Z)((0,a.Z)({},e),{},{receivedCount:++n.receivedCount}));if(ee().s[7]++,"buffer"in e?(ee().b[0][0]++,ee().s[8]++,t.buffer=atob(e.buffer)):ee().b[0][1]++,ee().s[9]++,n.historyPointer=++n.historyPointer%n.history.length,ee().s[10]++,n.history[n.historyPointer]=t,ee().s[11]++,n.paused)ee().b[1][1]++;else{ee().b[1][0]++;var i=(ee().s[12]++,n.calculatePacketText(t));ee().s[13]++,n.matchesSearch(i)?(ee().b[2][0]++,ee().s[14]++,n.displayText?(ee().b[3][1]++,ee().s[16]++,n.currentConfig.newestAtTop?(ee().b[4][0]++,ee().s[17]++,n.displayText="".concat(i,"\n\n").concat(n.displayText)):(ee().b[4][1]++,ee().s[18]++,n.displayText+="\n\n".concat(i))):(ee().b[3][0]++,ee().s[15]++,n.displayText=i)):ee().b[2][1]++}})),ee().s[19]++,this.trimDisplayText(),ee().s[20]++,ee().b[6][0]++,this.paused||(ee().b[6][1]++,this.currentConfig.newestAtTop)?ee().b[5][1]++:(ee().b[5][0]++,ee().s[21]++,this.updateScrollPosition())},paused:function(e){ee().f[5]++,ee().s[22]++,e?(ee().b[7][0]++,ee().s[23]++,this.pausedAt=this.historyPointer,ee().s[24]++,this.pausedHistory=this.history.slice()):(ee().b[7][1]++,ee().s[25]++,this.pauseOffset=0,ee().s[26]++,this.rebuildDisplayText())},allInstantSettings:function(){ee().f[6]++,ee().s[27]++,this.rebuildDisplayText()},allDebouncedSettings:X().debounce((function(){ee().f[7]++,ee().s[28]++,this.rebuildDisplayText()}),300)},created:function(){ee().f[8]++;var e=(ee().s[29]++,{format:"hex",showLineAddress:!0,showTimestamp:!0,bytesPerLine:16,packetsToShow:1,newestAtTop:!1});ee().s[30]++,this.currentConfig=(0,a.Z)((0,a.Z)({},e),this.currentConfig)},mounted:function(){ee().f[9]++,ee().s[31]++,this.textarea=this.$refs.textarea.$el.querySelectorAll("textarea")[0]},methods:{trimDisplayText:function(){ee().f[10]++,ee().s[32]++,this.currentConfig.newestAtTop?(ee().b[8][0]++,ee().s[33]++,this.displayText=this.displayText.substring(0,this.packetSize*this.currentConfig.packetsToShow)):(ee().b[8][1]++,ee().s[34]++,this.displayText=this.displayText.substring(this.displayText.length-(this.packetSize+2)*this.currentConfig.packetsToShow+2))},updateScrollPosition:function(){var e=this;ee().f[11]++;var n=(ee().s[35]++,this.textarea.scrollTop-this.textarea.scrollHeight);ee().s[36]++,this.$nextTick((function(){ee().f[12]++,ee().s[37]++,e.textarea.scrollTop=e.textarea.scrollHeight+n}))},rebuildDisplayText:function(){ee().f[13]++;var e=(ee().s[38]++,this.paused?(ee().b[9][0]++,this.pausedHistory):(ee().b[9][1]++,this.history)),n=(ee().s[39]++,this.paused?(ee().b[10][0]++,this.pausedAt):(ee().b[10][1]++,this.historyPointer));if(ee().s[40]++,e=e.filter((function(e){return ee().f[14]++,ee().s[41]++,e})).slice(n+1).concat(e.slice(0,n+1)).map(this.calculatePacketText).filter(this.matchesSearch),ee().s[42]++,this.paused){ee().b[11][0]++;var t=(ee().s[43]++,Math.max(e.length+this.pauseOffset,1));ee().s[44]++,e=e.slice(0,t)}else ee().b[11][1]++;var i=(ee().s[45]++,Math.max(this.currentConfig.packetsToShow,1));ee().s[46]++,e=e.slice(-i),ee().s[47]++,this.currentConfig.newestAtTop?(ee().b[12][0]++,ee().s[48]++,e=e.reverse()):ee().b[12][1]++,ee().s[49]++,this.displayText=e.join("\n\n")},matchesSearch:function(e){return ee().f[15]++,ee().s[50]++,e.toLowerCase().includes(this.filterText.toLowerCase())},calculatePacketText:function(e){var n=this;ee().f[16]++;var t=(ee().s[51]++,"");if(ee().s[52]++,this.currentConfig.showTimestamp){ee().b[13][0]++;var i=(ee().s[53]++,e.time/1e6),o=(ee().s[54]++,(i/1e3).toFixed(7)),l=(ee().s[55]++,new Date(i).toISOString()),a=(ee().s[56]++,"********************************************\n");ee().s[57]++,a+="* Received seconds: ".concat(o,"\n"),ee().s[58]++,a+="* Received time: ".concat(l,"\n"),ee().s[59]++,a+="********************************************\n",ee().s[60]++,t="".concat(a).concat(t)}else ee().b[13][1]++;return ee().s[61]++,"buffer"in e?(ee().b[14][0]++,ee().s[62]++,t+=X().chunk((0,q.Z)(e.buffer),this.currentConfig.bytesPerLine).map((function(e,t){ee().f[17]++;var i=(ee().s[63]++,[]);ee().s[64]++,"ascii"===n.currentConfig.format?(ee().b[15][0]++,ee().s[65]++,i=e.map((function(e){return ee().f[18]++,ee().s[66]++,e.replace(/\n/,"\\n").replace(/\r/,"\\r").padStart(2," ")}))):(ee().b[15][1]++,ee().s[67]++,i=e.map((function(e){return ee().f[19]++,ee().s[68]++,e.charCodeAt(0).toString(16).padStart(2,"0")})));var o=(ee().s[69]++,i.join(" "));if(ee().s[70]++,n.currentConfig.showLineAddress){ee().b[16][0]++;var l=(ee().s[71]++,(t*n.currentConfig.bytesPerLine).toString(16).padStart(8,"0"));ee().s[72]++,o="".concat(l,": ").concat(o)}else ee().b[16][1]++;return ee().s[73]++,o})).join("\n")):(ee().b[14][1]++,ee().s[74]++,t+=Object.keys(e).filter((function(e){return ee().f[20]++,ee().s[75]++,"time"!=e})).map((function(n){return ee().f[21]++,ee().s[76]++,"".concat(n,": ").concat(e[n])})).join("\n")),ee().s[77]++,this.packetSize=t.length,ee().s[78]++,t},validateBytesPerLine:function(){ee().f[22]++,ee().s[79]++,this.currentConfig.bytesPerLine<1?(ee().b[17][0]++,ee().s[80]++,this.currentConfig.bytesPerLine=1):ee().b[17][1]++},validatePacketsToShow:function(){ee().f[23]++,ee().s[81]++,this.currentConfig.packetsToShow>this.history.length?(ee().b[18][0]++,ee().s[82]++,this.currentConfig.packetsToShow=this.history.length):(ee().b[18][1]++,ee().s[83]++,this.currentConfig.packetsToShow<1?(ee().b[19][0]++,ee().s[84]++,this.currentConfig.packetsToShow=1):ee().b[19][1]++)},download:function(){ee().f[24]++;var e=(ee().s[85]++,new Blob([this.displayText],{type:"text/plain"})),n=(ee().s[86]++,document.createElement("a")),t=(ee().s[87]++,URL.createObjectURL(e));ee().s[88]++,n.href=t,ee().s[89]++,n.setAttribute("download","".concat((0,c.Z)(new Date,"yyyy_MM_dd_HH_mm_ss"),".txt")),ee().s[90]++,n.click(),ee().s[91]++,window.URL.revokeObjectURL(t)},pause:function(){ee().f[25]++,ee().s[92]++,this.paused=!0},togglePlayPause:function(){ee().f[26]++,ee().s[93]++,this.paused=!this.paused},stepBackward:function(){ee().f[27]++,ee().s[94]++,this.pause(),ee().s[95]++,this.pauseOffset--},stepForward:function(){ee().f[28]++,ee().s[96]++,this.pause(),ee().s[97]++,this.pauseOffset++}}},ie=te,oe=(t(780),(0,w.Z)(ie,K,Y,!1,null,"fa489178",null)),le=oe.exports,ae=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",[t("v-dialog",{attrs:{width:"600"},model:{value:e.show,callback:function(n){e.show=n},expression:"show"}},[t("v-card",[t("v-system-bar",[t("v-spacer"),t("span",[e._v(" DataViewer: Add A Packet ")]),t("v-spacer")],1),t("v-card-text",[t("v-row",[t("v-col",{staticClass:"my-2"},[t("v-radio-group",{staticClass:"mt-0",attrs:{row:"","hide-details":""},model:{value:e.newPacketCmdOrTlm,callback:function(n){e.newPacketCmdOrTlm=n},expression:"newPacketCmdOrTlm"}},[t("v-radio",{attrs:{label:"Command",value:"cmd","data-test":"command-packet-radio"}}),t("v-radio",{attrs:{label:"Telemetry",value:"tlm","data-test":"telemetry-packet-radio"}})],1)],1)],1),t("v-row",[t("v-col",[t("target-packet-item-chooser",{attrs:{mode:e.newPacketCmdOrTlm,unknown:""},on:{"on-set":e.packetSelected}})],1)],1),t("v-row",[t("v-col",[t("v-radio-group",{attrs:{row:"","hide-details":""},model:{value:e.newPacketMode,callback:function(n){e.newPacketMode=n},expression:"newPacketMode"}},[t("v-radio",{attrs:{label:"Raw",value:"RAW","data-test":"new-packet-raw-radio"}}),t("v-radio",{attrs:{label:"Decom",value:"DECOM",disabled:e.disableRadioOptions,"data-test":"new-packet-decom-radio"}})],1)],1),t("v-col",["DECOM"===e.newPacketMode?t("v-select",{attrs:{"hide-details":"",label:"Value Type","data-test":"add-packet-value-type",items:e.valueTypes},model:{value:e.newPacketValueType,callback:function(n){e.newPacketValueType=n},expression:"newPacketValueType"}}):e._e()],1)],1)],1),t("v-card-actions",[t("v-spacer"),t("v-btn",{staticClass:"mx-2",attrs:{outlined:"","data-test":"cancel-packet-button"},on:{click:e.cancelAddComponent}},[e._v(" Cancel ")]),t("v-btn",{staticClass:"mx-2",attrs:{color:"primary","data-test":"add-packet-button",disabled:!e.newPacket},on:{click:e.addComponent}},[e._v(" Add ")])],1)],1)],1)],1)},ce=[];function se(){var e="/cosmos/plugins/packages/cosmosc2-tool-dataviewer/src/tools/DataViewer/AddComponentDialog.vue",n="390b31b3ebc862de98eddcd039cb331eee293b9a",t=new Function("return this")(),i="__coverage__",o={path:"/cosmos/plugins/packages/cosmosc2-tool-dataviewer/src/tools/DataViewer/AddComponentDialog.vue",statementMap:{0:{start:{line:125,column:4},end:{line:131,column:5}},1:{start:{line:135,column:6},end:{line:137,column:7}},2:{start:{line:136,column:8},end:{line:136,column:50}},3:{start:{line:138,column:6},end:{line:138,column:18}},4:{start:{line:142,column:8},end:{line:142,column:25}},5:{start:{line:145,column:8},end:{line:145,column:34}},6:{start:{line:153,column:8},end:{line:153,column:29}},7:{start:{line:159,column:6},end:{line:163,column:7}},8:{start:{line:164,column:6},end:{line:166,column:7}},9:{start:{line:165,column:8},end:{line:165,column:34}},10:{start:{line:169,column:6},end:{line:175,column:8}},11:{start:{line:178,column:6},end:{line:178,column:30}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:124,column:2},end:{line:124,column:3}},loc:{start:{line:124,column:9},end:{line:132,column:3}},line:124},1:{name:"(anonymous_1)",decl:{start:{line:134,column:25},end:{line:134,column:26}},loc:{start:{line:134,column:37},end:{line:139,column:5}},line:134},2:{name:"(anonymous_2)",decl:{start:{line:141,column:6},end:{line:141,column:7}},loc:{start:{line:141,column:12},end:{line:143,column:7}},line:141},3:{name:"(anonymous_3)",decl:{start:{line:144,column:6},end:{line:144,column:7}},loc:{start:{line:144,column:17},end:{line:146,column:7}},line:144},4:{name:"(anonymous_4)",decl:{start:{line:152,column:15},end:{line:152,column:16}},loc:{start:{line:152,column:27},end:{line:154,column:7}},line:152},5:{name:"(anonymous_5)",decl:{start:{line:158,column:20},end:{line:158,column:21}},loc:{start:{line:158,column:37},end:{line:167,column:5}},line:158},6:{name:"(anonymous_6)",decl:{start:{line:168,column:18},end:{line:168,column:19}},loc:{start:{line:168,column:35},end:{line:176,column:5}},line:168},7:{name:"(anonymous_7)",decl:{start:{line:177,column:24},end:{line:177,column:25}},loc:{start:{line:177,column:36},end:{line:179,column:5}},line:177}},branchMap:{0:{loc:{start:{line:135,column:6},end:{line:137,column:7}},type:"if",locations:[{start:{line:135,column:6},end:{line:137,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:135},1:{loc:{start:{line:164,column:6},end:{line:166,column:7}},type:"if",locations:[{start:{line:164,column:6},end:{line:166,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:164}},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:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkHA;;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# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\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 \'@cosmosc2/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:"390b31b3ebc862de98eddcd039cb331eee293b9a"},l=t[i]||(t[i]={});l[e]&&l[e].hash===n||(l[e]=o);var a=l[e];return se=function(){return a},a}se();var re={components:{TargetPacketItemChooser:F},props:{value:Boolean},data:function(){return se().f[0]++,se().s[0]++,{newPacket:null,newPacketCmdOrTlm:"tlm",newPacketMode:"RAW",valueTypes:["CONVERTED","RAW","FORMATTED","WITH_UNITS"],newPacketValueType:"WITH_UNITS"}},computed:{disableRadioOptions:function(){return se().f[1]++,se().s[1]++,this.newPacket?(se().b[0][0]++,se().s[2]++,"UNKNOWN"===this.newPacket.packet):(se().b[0][1]++,se().s[3]++,!1)},show:{get:function(){return se().f[2]++,se().s[4]++,this.value},set:function(e){se().f[3]++,se().s[5]++,this.$emit("input",e)}}},watch:{newPacketCmdOrTlm:{immediate:!0,handler:function(){se().f[4]++,se().s[6]++,this.newPacket=null}}},methods:{packetSelected:function(e){se().f[5]++,se().s[7]++,this.newPacket={target:e.targetName,packet:e.packetName,cmdOrTlm:this.newPacketCmdOrTlm},se().s[8]++,"UNKNOWN"==e.packetName?(se().b[1][0]++,se().s[9]++,this.newPacketMode="RAW"):se().b[1][1]++},addComponent:function(e){se().f[6]++,se().s[10]++,this.$emit("add",(0,a.Z)((0,a.Z)({},this.newPacket),{},{component:"DumpComponent",config:{},mode:this.newPacketMode,valueType:this.newPacketValueType}))},cancelAddComponent:function(){se().f[7]++,se().s[11]++,this.$emit("cancel",{})}}},ue=re,me=(0,w.Z)(ue,ae,ce,!1,null,null,null),de=me.exports;function Ae(){var e="/cosmos/plugins/packages/cosmosc2-tool-dataviewer/src/tools/DataViewer/DataViewer.vue",n="888e9ac262b9da478da800759827c57df844ab13",t=new Function("return this")(),i="__coverage__",o={path:"/cosmos/plugins/packages/cosmosc2-tool-dataviewer/src/tools/DataViewer/DataViewer.vue",statementMap:{0:{start:{line:270,column:4},end:{line:325,column:5}},1:{start:{line:283,column:29},end:{line:283,column:50}},2:{start:{line:297,column:16},end:{line:297,column:38}},3:{start:{line:304,column:16},end:{line:304,column:38}},4:{start:{line:329,column:6},end:{line:335,column:7}},5:{start:{line:338,column:6},end:{line:340,column:8}},6:{start:{line:339,column:8},end:{line:339,column:26}},7:{start:{line:345,column:6},end:{line:345,column:23}},8:{start:{line:349,column:4},end:{line:349,column:30}},9:{start:{line:350,column:4},end:{line:350,column:20}},10:{start:{line:353,column:27},end:{line:353,column:66}},11:{start:{line:354,column:4},end:{line:356,column:5}},12:{start:{line:355,column:6},end:{line:355,column:44}},13:{start:{line:359,column:4},end:{line:361,column:5}},14:{start:{line:360,column:6},end:{line:360,column:37}},15:{start:{line:362,column:4},end:{line:362,column:27}},16:{start:{line:366,column:6},end:{line:366,column:67}},17:{start:{line:369,column:6},end:{line:369,column:53}},18:{start:{line:369,column:27},end:{line:369,column:53}},19:{start:{line:373,column:6},end:{line:377,column:7}},20:{start:{line:374,column:8},end:{line:374,column:62}},21:{start:{line:375,column:8},end:{line:375,column:27}},22:{start:{line:376,column:8},end:{line:376,column:14}},23:{start:{line:379,column:6},end:{line:383,column:7}},24:{start:{line:380,column:8},end:{line:380,column:71}},25:{start:{line:381,column:8},end:{line:381,column:27}},26:{start:{line:382,column:8},end:{line:382,column:14}},27:{start:{line:385,column:6},end:{line:393,column:7}},28:{start:{line:386,column:8},end:{line:391,column:24}},29:{start:{line:392,column:8},end:{line:392,column:27}},30:{start:{line:394,column:6},end:{line:394,column:25}},31:{start:{line:395,column:6},end:{line:395,column:37}},32:{start:{line:398,column:6},end:{line:398,column:26}},33:{start:{line:399,column:6},end:{line:399,column:42}},34:{start:{line:402,column:6},end:{line:424,column:10}},35:{start:{line:404,column:30},end:{line:404,column:49}},36:{start:{line:406,column:12},end:{line:406,column:32}},37:{start:{line:407,column:12},end:{line:407,column:42}},38:{start:{line:410,column:12},end:{line:410,column:23}},39:{start:{line:411,column:12},end:{line:411,column:33}},40:{start:{line:412,column:12},end:{line:412,column:72}},41:{start:{line:413,column:12},end:{line:413,column:31}},42:{start:{line:414,column:12},end:{line:414,column:41}},43:{start:{line:417,column:12},end:{line:417,column:68}},44:{start:{line:418,column:12},end:{line:418,column:31}},45:{start:{line:422,column:10},end:{line:422,column:42}},46:{start:{line:423,column:10},end:{line:423,column:59}},47:{start:{line:423,column:28},end:{line:423,column:59}},48:{start:{line:427,column:6},end:{line:427,column:42}},49:{start:{line:429,column:25},end:{line:436,column:12}},50:{start:{line:430,column:8},end:{line:434,column:9}},51:{start:{line:431,column:10},end:{line:431,column:42}},52:{start:{line:433,column:10},end:{line:433,column:40}},53:{start:{line:435,column:8},end:{line:435,column:21}},54:{start:{line:437,column:6},end:{line:447,column:8}},55:{start:{line:438,column:8},end:{line:446,column:10}},56:{start:{line:439,column:10},end:{line:445,column:12}},57:{start:{line:450,column:6},end:{line:450,column:42}},58:{start:{line:451,column:6},end:{line:454,column:8}},59:{start:{line:457,column:6},end:{line:461,column:7}},60:{start:{line:458,column:8},end:{line:458,column:43}},61:{start:{line:459,column:8},end:{line:459,column:25}},62:{start:{line:460,column:8},end:{line:460,column:14}},63:{start:{line:462,column:21},end:{line:462,column:42}},64:{start:{line:463,column:6},end:{line:466,column:7}},65:{start:{line:464,column:8},end:{line:464,column:19}},66:{start:{line:465,column:8},end:{line:465,column:14}},67:{start:{line:467,column:29},end:{line:474,column:12}},68:{start:{line:468,column:8},end:{line:472,column:9}},69:{start:{line:469,column:10},end:{line:469,column:44}},70:{start:{line:471,column:10},end:{line:471,column:42}},71:{start:{line:473,column:8},end:{line:473,column:21}},72:{start:{line:475,column:6},end:{line:480,column:8}},73:{start:{line:476,column:8},end:{line:478,column:10}},74:{start:{line:477,column:10},end:{line:477,column:55}},75:{start:{line:479,column:8},end:{line:479,column:47}},76:{start:{line:481,column:6},end:{line:481,column:56}},77:{start:{line:484,column:16},end:{line:484,column:27}},78:{start:{line:485,column:6},end:{line:489,column:7}},79:{start:{line:486,column:8},end:{line:486,column:62}},80:{start:{line:488,column:8},end:{line:488,column:63}},81:{start:{line:490,column:6},end:{line:490,column:51}},82:{start:{line:491,column:6},end:{line:491,column:65}},83:{start:{line:491,column:35},end:{line:491,column:65}},84:{start:{line:492,column:6},end:{line:492,column:16}},85:{start:{line:495,column:23},end:{line:495,column:52}},86:{start:{line:496,column:16},end:{line:496,column:65}},87:{start:{line:497,column:6},end:{line:497,column:65}},88:{start:{line:497,column:35},end:{line:497,column:65}},89:{start:{line:498,column:6},end:{line:498,column:16}},90:{start:{line:501,column:6},end:{line:501,column:52}},91:{start:{line:502,column:6},end:{line:502,column:65}},92:{start:{line:502,column:29},end:{line:502,column:65}},93:{start:{line:503,column:6},end:{line:503,column:31}},94:{start:{line:504,column:21},end:{line:504,column:68}},95:{start:{line:505,column:6},end:{line:507,column:7}},96:{start:{line:506,column:8},end:{line:506,column:42}},97:{start:{line:508,column:6},end:{line:508,column:76}},98:{start:{line:508,column:45},end:{line:508,column:76}},99:{start:{line:511,column:6},end:{line:511,column:52}},100:{start:{line:512,column:6},end:{line:512,column:76}},101:{start:{line:515,column:6},end:{line:519,column:8}},102:{start:{line:520,column:6},end:{line:520,column:28}},103:{start:{line:523,column:6},end:{line:523,column:32}},104:{start:{line:524,column:6},end:{line:524,column:26}},105:{start:{line:527,column:6},end:{line:527,column:28}},106:{start:{line:528,column:6},end:{line:528,column:28}},107:{start:{line:529,column:6},end:{line:529,column:30}},108:{start:{line:530,column:6},end:{line:530,column:35}},109:{start:{line:531,column:6},end:{line:531,column:35}},110:{start:{line:532,column:6},end:{line:534,column:8}},111:{start:{line:533,column:8},end:{line:533,column:31}},112:{start:{line:537,column:6},end:{line:537,column:61}},113:{start:{line:538,column:6},end:{line:538,column:31}},114:{start:{line:541,column:6},end:{line:541,column:61}},115:{start:{line:542,column:6},end:{line:542,column:32}},116:{start:{line:545,column:6},end:{line:545,column:48}},117:{start:{line:548,column:6},end:{line:548,column:28}},118:{start:{line:549,column:6},end:{line:549,column:40}},119:{start:{line:552,column:6},end:{line:556,column:7}},120:{start:{line:559,column:6},end:{line:559,column:58}},121:{start:{line:560,column:6},end:{line:562,column:7}},122:{start:{line:561,column:8},end:{line:561,column:46}},123:{start:{line:563,column:6},end:{line:563,column:31}},124:{start:{line:566,column:6},end:{line:566,column:41}},125:{start:{line:569,column:21},end:{line:569,column:68}},126:{start:{line:570,column:6},end:{line:570,column:63}},127:{start:{line:571,column:6},end:{line:571,column:50}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:269,column:2},end:{line:269,column:3}},loc:{start:{line:269,column:9},end:{line:326,column:3}},line:269},1:{name:"(anonymous_1)",decl:{start:{line:283,column:18},end:{line:283,column:19}},loc:{start:{line:283,column:29},end:{line:283,column:50}},line:283},2:{name:"(anonymous_2)",decl:{start:{line:296,column:23},end:{line:296,column:24}},loc:{start:{line:296,column:29},end:{line:298,column:15}},line:296},3:{name:"(anonymous_3)",decl:{start:{line:303,column:23},end:{line:303,column:24}},loc:{start:{line:303,column:29},end:{line:305,column:15}},line:303},4:{name:"(anonymous_4)",decl:{start:{line:328,column:18},end:{line:328,column:19}},loc:{start:{line:328,column:30},end:{line:336,column:5}},line:328},5:{name:"(anonymous_5)",decl:{start:{line:337,column:16},end:{line:337,column:17}},loc:{start:{line:337,column:28},end:{line:341,column:5}},line:337},6:{name:"(anonymous_6)",decl:{start:{line:338,column:38},end:{line:338,column:39}},loc:{start:{line:338,column:47},end:{line:340,column:7}},line:338},7:{name:"(anonymous_7)",decl:{start:{line:344,column:26},end:{line:344,column:27}},loc:{start:{line:344,column:38},end:{line:346,column:5}},line:344},8:{name:"(anonymous_8)",decl:{start:{line:348,column:2},end:{line:348,column:3}},loc:{start:{line:348,column:12},end:{line:351,column:3}},line:348},9:{name:"(anonymous_9)",decl:{start:{line:352,column:11},end:{line:352,column:12}},loc:{start:{line:352,column:23},end:{line:357,column:3}},line:352},10:{name:"(anonymous_10)",decl:{start:{line:358,column:13},end:{line:358,column:14}},loc:{start:{line:358,column:25},end:{line:363,column:3}},line:358},11:{name:"(anonymous_11)",decl:{start:{line:365,column:17},end:{line:365,column:18}},loc:{start:{line:365,column:35},end:{line:367,column:5}},line:365},12:{name:"(anonymous_12)",decl:{start:{line:368,column:16},end:{line:368,column:17}},loc:{start:{line:368,column:28},end:{line:370,column:5}},line:368},13:{name:"(anonymous_13)",decl:{start:{line:371,column:11},end:{line:371,column:12}},loc:{start:{line:371,column:23},end:{line:396,column:5}},line:371},14:{name:"(anonymous_14)",decl:{start:{line:397,column:10},end:{line:397,column:11}},loc:{start:{line:397,column:22},end:{line:400,column:5}},line:397},15:{name:"(anonymous_15)",decl:{start:{line:401,column:15},end:{line:401,column:16}},loc:{start:{line:401,column:27},end:{line:425,column:5}},line:401},16:{name:"(anonymous_16)",decl:{start:{line:404,column:20},end:{line:404,column:21}},loc:{start:{line:404,column:30},end:{line:404,column:49}},line:404},17:{name:"(anonymous_17)",decl:{start:{line:405,column:21},end:{line:405,column:22}},loc:{start:{line:405,column:27},end:{line:408,column:11}},line:405},18:{name:"(anonymous_18)",decl:{start:{line:409,column:24},end:{line:409,column:25}},loc:{start:{line:409,column:30},end:{line:415,column:11}},line:409},19:{name:"(anonymous_19)",decl:{start:{line:416,column:20},end:{line:416,column:21}},loc:{start:{line:416,column:26},end:{line:419,column:11}},line:416},20:{name:"(anonymous_20)",decl:{start:{line:421,column:14},end:{line:421,column:15}},loc:{start:{line:421,column:32},end:{line:424,column:9}},line:421},21:{name:"(anonymous_21)",decl:{start:{line:426,column:30},end:{line:426,column:31}},loc:{start:{line:426,column:49},end:{line:448,column:5}},line:426},22:{name:"(anonymous_22)",decl:{start:{line:429,column:40},end:{line:429,column:41}},loc:{start:{line:429,column:60},end:{line:436,column:7}},line:429},23:{name:"(anonymous_23)",decl:{start:{line:437,column:65},end:{line:437,column:66}},loc:{start:{line:437,column:71},end:{line:447,column:7}},line:437},24:{name:"(anonymous_24)",decl:{start:{line:438,column:40},end:{line:438,column:41}},loc:{start:{line:438,column:50},end:{line:446,column:9}},line:438},25:{name:"(anonymous_25)",decl:{start:{line:449,column:35},end:{line:449,column:36}},loc:{start:{line:449,column:54},end:{line:455,column:5}},line:449},26:{name:"(anonymous_26)",decl:{start:{line:456,column:14},end:{line:456,column:15}},loc:{start:{line:456,column:35},end:{line:482,column:5}},line:456},27:{name:"(anonymous_27)",decl:{start:{line:467,column:43},end:{line:467,column:44}},loc:{start:{line:467,column:63},end:{line:474,column:7}},line:467},28:{name:"(anonymous_28)",decl:{start:{line:475,column:42},end:{line:475,column:43}},loc:{start:{line:475,column:58},end:{line:480,column:7}},line:475},29:{name:"(anonymous_29)",decl:{start:{line:476,column:52},end:{line:476,column:53}},loc:{start:{line:476,column:67},end:{line:478,column:9}},line:476},30:{name:"(anonymous_30)",decl:{start:{line:483,column:14},end:{line:483,column:15}},loc:{start:{line:483,column:32},end:{line:493,column:5}},line:483},31:{name:"(anonymous_31)",decl:{start:{line:494,column:21},end:{line:494,column:22}},loc:{start:{line:494,column:39},end:{line:499,column:5}},line:494},32:{name:"(anonymous_32)",decl:{start:{line:500,column:23},end:{line:500,column:24}},loc:{start:{line:500,column:45},end:{line:509,column:5}},line:500},33:{name:"(anonymous_33)",decl:{start:{line:510,column:23},end:{line:510,column:24}},loc:{start:{line:510,column:39},end:{line:513,column:5}},line:510},34:{name:"(anonymous_34)",decl:{start:{line:514,column:12},end:{line:514,column:13}},loc:{start:{line:514,column:24},end:{line:521,column:5}},line:514},35:{name:"(anonymous_35)",decl:{start:{line:522,column:21},end:{line:522,column:22}},loc:{start:{line:522,column:33},end:{line:525,column:5}},line:522},36:{name:"(anonymous_36)",decl:{start:{line:526,column:13},end:{line:526,column:14}},loc:{start:{line:526,column:37},end:{line:535,column:5}},line:526},37:{name:"(anonymous_37)",decl:{start:{line:532,column:21},end:{line:532,column:22}},loc:{start:{line:532,column:27},end:{line:534,column:7}},line:532},38:{name:"(anonymous_38)",decl:{start:{line:536,column:23},end:{line:536,column:24}},loc:{start:{line:536,column:35},end:{line:539,column:5}},line:536},39:{name:"(anonymous_39)",decl:{start:{line:540,column:15},end:{line:540,column:16}},loc:{start:{line:540,column:27},end:{line:543,column:5}},line:540},40:{name:"(anonymous_40)",decl:{start:{line:544,column:15},end:{line:544,column:16}},loc:{start:{line:544,column:27},end:{line:546,column:5}},line:544},41:{name:"(anonymous_41)",decl:{start:{line:547,column:25},end:{line:547,column:26}},loc:{start:{line:547,column:42},end:{line:550,column:5}},line:547},42:{name:"(anonymous_42)",decl:{start:{line:551,column:20},end:{line:551,column:21}},loc:{start:{line:551,column:37},end:{line:557,column:5}},line:551},43:{name:"(anonymous_43)",decl:{start:{line:558,column:18},end:{line:558,column:19}},loc:{start:{line:558,column:35},end:{line:564,column:5}},line:558},44:{name:"(anonymous_44)",decl:{start:{line:565,column:24},end:{line:565,column:25}},loc:{start:{line:565,column:41},end:{line:567,column:5}},line:565},45:{name:"(anonymous_45)",decl:{start:{line:568,column:21},end:{line:568,column:22}},loc:{start:{line:568,column:54},end:{line:572,column:5}},line:568}},branchMap:{0:{loc:{start:{line:283,column:29},end:{line:283,column:50}},type:"binary-expr",locations:[{start:{line:283,column:29},end:{line:283,column:36}},{start:{line:283,column:40},end:{line:283,column:50}}],line:283},1:{loc:{start:{line:332,column:18},end:{line:334,column:16}},type:"cond-expr",locations:[{start:{line:333,column:12},end:{line:333,column:77}},{start:{line:334,column:12},end:{line:334,column:16}}],line:332},2:{loc:{start:{line:354,column:4},end:{line:356,column:5}},type:"if",locations:[{start:{line:354,column:4},end:{line:356,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:354},3:{loc:{start:{line:359,column:4},end:{line:361,column:5}},type:"if",locations:[{start:{line:359,column:4},end:{line:361,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:359},4:{loc:{start:{line:369,column:6},end:{line:369,column:53}},type:"if",locations:[{start:{line:369,column:6},end:{line:369,column:53}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:369},5:{loc:{start:{line:373,column:6},end:{line:377,column:7}},type:"if",locations:[{start:{line:373,column:6},end:{line:377,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:373},6:{loc:{start:{line:379,column:6},end:{line:383,column:7}},type:"if",locations:[{start:{line:379,column:6},end:{line:383,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:379},7:{loc:{start:{line:385,column:6},end:{line:393,column:7}},type:"if",locations:[{start:{line:385,column:6},end:{line:393,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:385},8:{loc:{start:{line:423,column:10},end:{line:423,column:59}},type:"if",locations:[{start:{line:423,column:10},end:{line:423,column:59}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:423},9:{loc:{start:{line:427,column:16},end:{line:427,column:42}},type:"binary-expr",locations:[{start:{line:427,column:16},end:{line:427,column:23}},{start:{line:427,column:27},end:{line:427,column:42}}],line:427},10:{loc:{start:{line:430,column:8},end:{line:434,column:9}},type:"if",locations:[{start:{line:430,column:8},end:{line:434,column:9}},{start:{line:432,column:15},end:{line:434,column:9}}],line:430},11:{loc:{start:{line:450,column:16},end:{line:450,column:42}},type:"binary-expr",locations:[{start:{line:450,column:16},end:{line:450,column:23}},{start:{line:450,column:27},end:{line:450,column:42}}],line:450},12:{loc:{start:{line:457,column:6},end:{line:461,column:7}},type:"if",locations:[{start:{line:457,column:6},end:{line:461,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:457},13:{loc:{start:{line:463,column:6},end:{line:466,column:7}},type:"if",locations:[{start:{line:463,column:6},end:{line:466,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:463},14:{loc:{start:{line:468,column:8},end:{line:472,column:9}},type:"if",locations:[{start:{line:468,column:8},end:{line:472,column:9}},{start:{line:470,column:15},end:{line:472,column:9}}],line:468},15:{loc:{start:{line:485,column:6},end:{line:489,column:7}},type:"if",locations:[{start:{line:485,column:6},end:{line:489,column:7}},{start:{line:487,column:13},end:{line:489,column:7}}],line:485},16:{loc:{start:{line:486,column:15},end:{line:486,column:62}},type:"cond-expr",locations:[{start:{line:486,column:41},end:{line:486,column:48}},{start:{line:486,column:51},end:{line:486,column:62}}],line:486},17:{loc:{start:{line:488,column:15},end:{line:488,column:63}},type:"cond-expr",locations:[{start:{line:488,column:41},end:{line:488,column:51}},{start:{line:488,column:54},end:{line:488,column:63}}],line:488},18:{loc:{start:{line:491,column:6},end:{line:491,column:65}},type:"if",locations:[{start:{line:491,column:6},end:{line:491,column:65}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:491},19:{loc:{start:{line:497,column:6},end:{line:497,column:65}},type:"if",locations:[{start:{line:497,column:6},end:{line:497,column:65}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:497},20:{loc:{start:{line:502,column:6},end:{line:502,column:65}},type:"if",locations:[{start:{line:502,column:6},end:{line:502,column:65}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:502},21:{loc:{start:{line:505,column:6},end:{line:507,column:7}},type:"if",locations:[{start:{line:505,column:6},end:{line:507,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:505},22:{loc:{start:{line:508,column:6},end:{line:508,column:76}},type:"if",locations:[{start:{line:508,column:6},end:{line:508,column:76}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:508},23:{loc:{start:{line:508,column:10},end:{line:508,column:43}},type:"binary-expr",locations:[{start:{line:508,column:10},end:{line:508,column:27}},{start:{line:508,column:31},end:{line:508,column:43}}],line:508},24:{loc:{start:{line:560,column:6},end:{line:562,column:7}},type:"if",locations:[{start:{line:560,column:6},end:{line:562,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:560}},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},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],23:[0,0],24:[0,0]},inputSourceMap:{version:3,sources:["DataViewer.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyPA;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",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# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\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="red"\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="green"\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 COSMOS 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[topicKey(packet)]"\n :ref="`${topicKey(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[topicKey(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 { CosmosApi } from \'@cosmosc2/tool-common/src/services/cosmos-api\'\nimport OpenConfigDialog from \'@cosmosc2/tool-common/src/components/OpenConfigDialog\'\nimport SaveConfigDialog from \'@cosmosc2/tool-common/src/components/SaveConfigDialog\'\nimport TargetPacketItemChooser from \'@cosmosc2/tool-common/src/components/TargetPacketItemChooser\'\nimport Cable from \'@cosmosc2/tool-common/src/services/cable.js\'\nimport TopBar from \'@cosmosc2/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: \'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 CosmosApi()\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\', localStorage.scope, {\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 = \'COSMOS backend connection disconnected.\'\n this.warning = true\n this.connectionFailure = true\n },\n rejected: () => {\n this.warningText = \'COSMOS 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 CosmosAuth.updateToken(CosmosAuth.defaultMinValidity).then(() => {\n Object.keys(modeGroups).forEach((mode) => {\n this.subscription.perform(\'add\', {\n scope: localStorage.scope,\n token: localStorage.cosmosToken,\n packets: modeGroups[mode].map(this.subscriptionKey),\n mode: mode,\n ...this.startEndTime,\n })\n })\n })\n },\n removePacketsFromSubscription: function (packets) {\n packets = packets || this.allPackets\n this.subscription.perform(\'remove\', {\n scope: localStorage.scope,\n packets: packets.map(this.subscriptionKey),\n })\n },\n received: function (json_data) {\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 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 topicKey: function (packet) {\n let key = \'DEFAULT__\'\n if (packet.cmdOrTlm === \'tlm\') {\n key += packet.mode === \'DECOM\' ? \'DECOM\' : \'TELEMETRY\'\n } else {\n key += packet.mode === \'DECOM\' ? \'DECOMCMD\' : \'COMMAND\'\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 = `${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:"888e9ac262b9da478da800759827c57df844ab13"},l=t[i]||(t[i]={});l[e]&&l[e].hash===n||(l[e]=o);var a=l[e];return Ae=function(){return a},a}Ae();var pe={components:{AddComponentDialog:de,OpenConfigDialog:x,SaveConfigDialog:M,DumpComponent:le,TopBar:z},data:function(){var e=this;return Ae().f[0]++,Ae().s[0]++,{title:"Data Viewer",toolName:"data-viewer",openConfig:!1,saveConfig:!1,api:null,cable:new V,subscription:null,startDate:(0,c.Z)(new Date,"yyyy-MM-dd"),startTime:(0,c.Z)(new Date,"HH:mm:ss"),endDate:"",endTime:"",rules:{required:function(e){return Ae().f[1]++,Ae().s[1]++,Ae().b[0][0]++,!!e||(Ae().b[0][1]++,"Required")}},canStart:!1,running:!1,curTab:null,receivedPackets:{},menus:[{label:"File",items:[{label:"Open Configuration",icon:"mdi-folder-open",command:function(){Ae().f[2]++,Ae().s[2]++,e.openConfig=!0}},{label:"Save Configuration",icon:"mdi-content-save",command:function(){Ae().f[3]++,Ae().s[3]++,e.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 Ae().f[4]++,Ae().s[4]++,{start_time:1e6*new Date(this.startDate+" "+this.startTime).getTime(),end_time:this.endDate?(Ae().b[1][0]++,1e6*new Date(this.endDate+" "+this.endTime).getTime()):(Ae().b[1][1]++,null)}},allPackets:function(){return Ae().f[5]++,Ae().s[5]++,this.config.tabs.flatMap((function(e){return Ae().f[6]++,Ae().s[6]++,e.packets}))}},watch:{"config.tabs.length":function(){Ae().f[7]++,Ae().s[7]++,this.resizeTabs()}},created:function(){Ae().f[8]++,Ae().s[8]++,this.api=new g,Ae().s[9]++,this.subscribe()},mounted:function(){Ae().f[9]++;var e=(Ae().s[10]++,localStorage["lastconfig__data_viewer"]);Ae().s[11]++,e?(Ae().b[2][0]++,Ae().s[12]++,this.openConfiguration(e)):Ae().b[2][1]++},destroyed:function(){Ae().f[10]++,Ae().s[13]++,this.subscription?(Ae().b[3][0]++,Ae().s[14]++,this.subscription.unsubscribe()):Ae().b[3][1]++,Ae().s[15]++,this.cable.disconnect()},methods:{packetTitle:function(e){return Ae().f[11]++,Ae().s[16]++,"".concat(e.target," ").concat(e.packet," [ ").concat(e.mode," ]")},resizeTabs:function(){Ae().f[12]++,Ae().s[17]++,this.$refs.tabs?(Ae().b[4][0]++,Ae().s[18]++,this.$refs.tabs.onResize()):Ae().b[4][1]++},start:function(){return Ae().f[13]++,Ae().s[19]++,new Date(this.startDate+" "+this.startTime)>Date.now()?(Ae().b[5][0]++,Ae().s[20]++,this.warningText="Start date/time is in the future!",Ae().s[21]++,this.warning=!0,void Ae().s[22]++):(Ae().b[5][1]++,Ae().s[23]++,this.startEndTime.start_time===this.startEndTime.end_time?(Ae().b[6][0]++,Ae().s[24]++,this.warningText="Start date/time is equal to end date/time!",Ae().s[25]++,this.warning=!0,void Ae().s[26]++):(Ae().b[6][1]++,Ae().s[27]++,new Date(this.endDate+" "+this.endTime)>Date.now()?(Ae().b[7][0]++,Ae().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.",Ae().s[29]++,this.warning=!0):Ae().b[7][1]++,Ae().s[30]++,this.running=!0,Ae().s[31]++,void this.addPacketsToSubscription()))},stop:function(){Ae().f[14]++,Ae().s[32]++,this.running=!1,Ae().s[33]++,this.removePacketsFromSubscription()},subscribe:function(){var e=this;Ae().f[15]++,Ae().s[34]++,this.cable.createSubscription("StreamingChannel",localStorage.scope,{received:function(n){return Ae().f[16]++,Ae().s[35]++,e.received(n)},connected:function(){Ae().f[17]++,Ae().s[36]++,e.canStart=!0,Ae().s[37]++,e.connectionFailure=!1},disconnected:function(){Ae().f[18]++,Ae().s[38]++,e.stop(),Ae().s[39]++,e.canStart=!1,Ae().s[40]++,e.warningText="COSMOS backend connection disconnected.",Ae().s[41]++,e.warning=!0,Ae().s[42]++,e.connectionFailure=!0},rejected:function(){Ae().f[19]++,Ae().s[43]++,e.warningText="COSMOS backend connection rejected.",Ae().s[44]++,e.warning=!0}}).then((function(n){Ae().f[20]++,Ae().s[45]++,e.subscription=n,Ae().s[46]++,e.running?(Ae().b[8][0]++,Ae().s[47]++,e.addPacketsToSubscription()):Ae().b[8][1]++}))},addPacketsToSubscription:function(e){var n=this;Ae().f[21]++,Ae().s[48]++,Ae().b[9][0]++,e=e||(Ae().b[9][1]++,this.allPackets);var t=(Ae().s[49]++,e.reduce((function(e,n){return Ae().f[22]++,Ae().s[50]++,e[n.mode]?(Ae().b[10][0]++,Ae().s[51]++,e[n.mode].push(n)):(Ae().b[10][1]++,Ae().s[52]++,e[n.mode]=[n]),Ae().s[53]++,e}),{}));Ae().s[54]++,CosmosAuth.updateToken(CosmosAuth.defaultMinValidity).then((function(){Ae().f[23]++,Ae().s[55]++,Object.keys(t).forEach((function(e){Ae().f[24]++,Ae().s[56]++,n.subscription.perform("add",(0,a.Z)({scope:localStorage.scope,token:localStorage.cosmosToken,packets:t[e].map(n.subscriptionKey),mode:e},n.startEndTime))}))}))},removePacketsFromSubscription:function(e){Ae().f[25]++,Ae().s[57]++,Ae().b[11][0]++,e=e||(Ae().b[11][1]++,this.allPackets),Ae().s[58]++,this.subscription.perform("remove",{scope:localStorage.scope,packets:e.map(this.subscriptionKey)})},received:function(e){var n=this;if(Ae().f[26]++,Ae().s[59]++,e["error"])return Ae().b[12][0]++,Ae().s[60]++,this.errorText=e["error"],Ae().s[61]++,this.error=!0,void Ae().s[62]++;Ae().b[12][1]++;var t=(Ae().s[63]++,JSON.parse(e));if(Ae().s[64]++,!t.length)return Ae().b[13][0]++,Ae().s[65]++,this.stop(),void Ae().s[66]++;Ae().b[13][1]++;var i=(Ae().s[67]++,t.reduce((function(e,n){return Ae().f[27]++,Ae().s[68]++,e[n.packet]?(Ae().b[14][0]++,Ae().s[69]++,e[n.packet].push(n)):(Ae().b[14][1]++,Ae().s[70]++,e[n.packet]=[n]),Ae().s[71]++,e}),{}));Ae().s[72]++,Object.keys(i).forEach((function(e){Ae().f[28]++,Ae().s[73]++,n.$refs["".concat(e,"-display")].forEach((function(n){Ae().f[29]++,Ae().s[74]++,n.receive(i[e])})),Ae().s[75]++,n.receivedPackets[e]=!0})),Ae().s[76]++,this.receivedPackets=(0,a.Z)({},this.receivedPackets)},topicKey:function(e){Ae().f[30]++;var n=(Ae().s[77]++,"DEFAULT__");return Ae().s[78]++,"tlm"===e.cmdOrTlm?(Ae().b[15][0]++,Ae().s[79]++,n+="DECOM"===e.mode?(Ae().b[16][0]++,"DECOM"):(Ae().b[16][1]++,"TELEMETRY")):(Ae().b[15][1]++,Ae().s[80]++,n+="DECOM"===e.mode?(Ae().b[17][0]++,"DECOMCMD"):(Ae().b[17][1]++,"COMMAND")),Ae().s[81]++,n+="__".concat(e.target,"__").concat(e.packet),Ae().s[82]++,"DECOM"===e.mode?(Ae().b[18][0]++,Ae().s[83]++,n+="__".concat(e.valueType)):Ae().b[18][1]++,Ae().s[84]++,n},subscriptionKey:function(e){Ae().f[31]++;var n=(Ae().s[85]++,e.cmdOrTlm.toUpperCase()),t=(Ae().s[86]++,"".concat(n,"__").concat(e.target,"__").concat(e.packet));return Ae().s[87]++,"DECOM"===e.mode?(Ae().b[19][0]++,Ae().s[88]++,t+="__".concat(e.valueType)):Ae().b[19][1]++,Ae().s[89]++,t},openConfiguration:function(){var e=(0,l.Z)(regeneratorRuntime.mark((function e(n){var t;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return Ae().f[32]++,Ae().s[90]++,localStorage["lastconfig__data_viewer"]=n,Ae().s[91]++,this.subscription?(Ae().b[20][0]++,Ae().s[92]++,this.removePacketsFromSubscription()):Ae().b[20][1]++,Ae().s[93]++,this.receivedPackets={},Ae().s[94]++,e.next=10,this.api.load_config(this.toolName,n);case 10:t=e.sent,Ae().s[95]++,t?(Ae().b[21][0]++,Ae().s[96]++,this.config=JSON.parse(t)):Ae().b[21][1]++,Ae().s[97]++,Ae().b[23][0]++,this.subscription&&(Ae().b[23][1]++,this.running)?(Ae().b[22][0]++,Ae().s[98]++,this.addPacketsToSubscription()):Ae().b[22][1]++;case 15:case"end":return e.stop()}}),e,this)})));function n(n){return e.apply(this,arguments)}return n}(),saveConfiguration:function(e){Ae().f[33]++,Ae().s[99]++,localStorage["lastconfig__data_viewer"]=e,Ae().s[100]++,this.api.save_config(this.toolName,e,JSON.stringify(this.config))},addTab:function(){Ae().f[34]++,Ae().s[101]++,this.config.tabs.push({name:"New Tab",packets:[]}),Ae().s[102]++,this.cancelTabRename()},cancelTabRename:function(){Ae().f[35]++,Ae().s[103]++,this.tabNameDialog=!1,Ae().s[104]++,this.newTabName=""},tabMenu:function(e,n){var t=this;Ae().f[36]++,Ae().s[105]++,this.activeTab=n,Ae().s[106]++,e.preventDefault(),Ae().s[107]++,this.showTabMenu=!1,Ae().s[108]++,this.tabMenuX=e.clientX,Ae().s[109]++,this.tabMenuY=e.clientY,Ae().s[110]++,this.$nextTick((function(){Ae().f[37]++,Ae().s[111]++,t.showTabMenu=!0}))},openTabNameDialog:function(){Ae().f[38]++,Ae().s[112]++,this.newTabName=this.config.tabs[this.activeTab].name,Ae().s[113]++,this.tabNameDialog=!0},renameTab:function(){Ae().f[39]++,Ae().s[114]++,this.config.tabs[this.activeTab].name=this.newTabName,Ae().s[115]++,this.tabNameDialog=!1},deleteTab:function(){Ae().f[40]++,Ae().s[116]++,this.config.tabs.splice(this.activeTab,1)},openComponentDialog:function(e){Ae().f[41]++,Ae().s[117]++,this.activeTab=e,Ae().s[118]++,this.showAddComponentDialog=!0},packetSelected:function(e){Ae().f[42]++,Ae().s[119]++,this.newPacket={target:e.targetName,packet:e.packetName,cmdOrTlm:this.newPacketCmdOrTlm}},addComponent:function(e){Ae().f[43]++,Ae().s[120]++,this.config.tabs[this.activeTab].packets.push(e),Ae().s[121]++,this.running?(Ae().b[24][0]++,Ae().s[122]++,this.addPacketsToSubscription([e])):Ae().b[24][1]++,Ae().s[123]++,this.cancelAddComponent()},cancelAddComponent:function(e){Ae().f[44]++,Ae().s[124]++,this.showAddComponentDialog=!1},deleteComponent:function(e,n){Ae().f[45]++;var t=(Ae().s[125]++,this.config.tabs[e].packets[n]);Ae().s[126]++,this.config.tabs[e].packets.splice(n,1),Ae().s[127]++,this.removePacketsFromSubscription([t])}}},fe=pe,he=(t(6210),(0,w.Z)(fe,i,o,!1,null,"0a2f1734",null)),ve=he.exports},3938:function(e,n,t){"use strict";t.r(n);var i=t(3467),o=t.n(i),l=t(8715),a=t.n(l),c=a()(o());c.push([e.id,".v-list[data-v-e3bb7458] .v-label{margin-left:5px}.v-list-item__icon[data-v-e3bb7458]{margin-right:15px!important}.v-list-item__title[data-v-e3bb7458]{color:#fff}",""]),n["default"]=c},2474:function(e,n,t){"use strict";t.r(n);var i=t(3467),o=t.n(i),l=t(8715),a=t.n(l),c=a()(o());c.push([e.id,".text-component-missing-name[data-v-0a2f1734]{font-family:Courier New,Courier,monospace}.v-tabs-items[data-v-0a2f1734]{overflow:visible}",""]),n["default"]=c},5319:function(e,n,t){"use strict";t.r(n);var i=t(3467),o=t.n(i),l=t(8715),a=t.n(l),c=a()(o());c.push([e.id,".text-area-container[data-v-fa489178]{position:relative}.text-area-container .v-textarea[data-v-fa489178]{font-family:Courier New,Courier,monospace}.text-area-container .floating-buttons[data-v-fa489178]{position:absolute;top:12px;right:24px}.pulse[data-v-fa489178]{-webkit-animation:pulse-data-v-fa489178 1s infinite;animation:pulse-data-v-fa489178 1s infinite}@-webkit-keyframes pulse-data-v-fa489178{0%{opacity:1}50%{opacity:.5}}@keyframes pulse-data-v-fa489178{0%{opacity:1}50%{opacity:.5}}",""]),n["default"]=c},7162:function(e,n,t){var i=t(3938);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.id,i,""]]),i.locals&&(e.exports=i.locals);var o=t(3514).Z;o("a2f2c426",i,!0,{sourceMap:!1,shadowMode:!1})},6210:function(e,n,t){var i=t(2474);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.id,i,""]]),i.locals&&(e.exports=i.locals);var o=t(3514).Z;o("ffb2d77e",i,!0,{sourceMap:!1,shadowMode:!1})},780:function(e,n,t){var i=t(5319);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.id,i,""]]),i.locals&&(e.exports=i.locals);var o=t(3514).Z;o("5ed7b84f",i,!0,{sourceMap:!1,shadowMode:!1})}}]);
2
- //# sourceMappingURL=686.js.map