openc3-cosmos-tool-admin 5.15.2 → 5.16.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4c2be12108b6fd926a1ec2670ec2377c6e50a2197045179bc9b46ac36f73a679
4
- data.tar.gz: 49365f1486beed95f95747772f2a0bc0c105cc0b8716d3dc07435bfb6f1aec14
3
+ metadata.gz: a21356ddc7a5862e92a406384cd3e1cd085ee00f8134ad67f26f63168282512d
4
+ data.tar.gz: bf5d41175ca6627fbefdcf86d51d263b3713998c4f6dd58bb4bace6d8b7bd115
5
5
  SHA512:
6
- metadata.gz: a421832ace482159c2afddd74ff0df4c35e62a0f04121b6205c2673a0a74df0cf64f3ca7ddc5883e431285032be095da3f0c6deb0d1c943564c747e79ee70ced
7
- data.tar.gz: 3af4bdba35ef5d553bce81efb4326ebe3360c626b17304c5962bd457d08f5b921d96bb3ce0f2e6b95b29c02af9bcd4249a9c65fd246309ff84891be9c92c8cad
6
+ metadata.gz: 0b0842cae9d0b011170f413d093b1ec8b95807a4e0f90ee68195b10aad74126a0faf064cc9e58161cfdef4b0d812cde9f21f7a8c6d1f21557989d96db696d910
7
+ data.tar.gz: b27087b054e4e2ea4739adc1277e8c32cb12654765c24708a2c5f0ec7c51df40b5b0c831c1f6119e3e6d4df517e5f18ddd8fc947def4f4eb77fe2d7cc0a7ca7a
@@ -1 +1,4 @@
1
- <!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Vue App</title><script defer="defer" src="/tools/admin/js/app.js"></script></head><body><div id="app"></div></body></html>
1
+ <!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Vue App</title><main><h1>Your Microfrontend is not here</h1><p>The @openc3/cosmos-tool-admin microfrontend is running in "integrated" mode, since standalone-single-spa-webpack-plugin is disabled. This means that it does not work as a standalone application without changing configuration.</p><h2>How do I develop this microfrontend?</h2><p>To develop this microfrontend, try the following steps:</p><ol><li>Copy the following URL to your clipboard: <a target="_blank" rel="noopener" id="mf-url"></a></li><li>In a new browser tab, go to the your single-spa web app. This is where your "root config" is running. You do not have to run the root config locally if it is already running on a deployed environment - go to the deployed environment directly.</li><li>In the browser console, run <code>localStorage.setItem('devtools', true);</code> Refresh the page.</li><li>A yellowish rectangle should appear at the bottom right of your screen. Click on it. Find the name @openc3/cosmos-tool-admin and click on it. If it is not present, click on Add New Module.</li><li>Paste the URL above into the input that appears. Refresh the page.</li><li>Congrats, your local code is now being used!</li></ol><p></p><p>For further information about "integrated" mode, see the following links:</p><ul><li><a target="_blank" rel="noopener" href="https://single-spa.js.org/docs/recommended-setup#local-development">Local Development Overview</a></li><li><a target="_blank" rel="noopener" href="https://github.com/joeldenning/import-map-overrides">Import Map Overrides Documentation</a></li></ul><p></p><h2>If you prefer Standalone mode</h2><p>To run this microfrontend in "standalone" mode, the standalone-single-spa-webpack-plugin must not be disabled. In some cases, this is done by running <code>npm run start:standalone</code>. Alternatively, you can add <code>--env standalone</code> to your package.json start script if you are using webpack-config-single-spa.</p>If neither of those work for you, see more details about enabling standalone mode at <a target="_blank" rel="noopener" href="https://github.com/single-spa/standalone-single-spa-webpack-plugin">Standalone Plugin Documentation</a>.<p></p><script>const mfLink = document.getElementById('mf-url');
2
+ const fullSrc = new URL('/tools/admin//tools/admin/js/app.js', window.location.href);
3
+ mfLink.href = fullSrc;
4
+ mfLink.textContent = fullSrc;</script></main></head><body><div id="app"></div></body></html>
@@ -1,2 +1,2 @@
1
- "use strict";(self["webpackChunk_openc3_cosmos_tool_admin"]=self["webpackChunk_openc3_cosmos_tool_admin"]||[]).push([[314],{2673:(e,t,s)=>{s.d(t,{A:()=>i});var r=s(4625),n=s(1649);const o=new n["default"],a=r.A.create({baseURL:location.origin,timeout:6e4,params:{}});a.interceptors.response.use((e=>e),(e=>{if(e.response){var t,s,r,n,a;if(401===e.response.status&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then((function(e){e&&OpenC3Auth.setTokens()})),e.response.config.headers["Ignore-Errors"]&&e.response.config.headers["Ignore-Errors"].includes(e.response.status.toString()))return Promise.reject(e);let l=`HTTP ${e.response.status} - `;if(null!==(t=e.response)&&void 0!==t&&t.statusText&&(l+=`${e.response.statusText} `),null!==(s=e.response)&&void 0!==s&&null!==(s=s.config)&&void 0!==s&&s.data&&(l+=`${e.response.config.data} `),null!==(r=e.response)&&void 0!==r&&null!==(r=r.data)&&void 0!==r&&r.message)l+=`${e.response.data.message}`;else if(null!==(n=e.response)&&void 0!==n&&null!==(n=n.data)&&void 0!==n&&n.exception)l+=`${e.response.data.exception}`;else if(null!==(a=e.response)&&void 0!==a&&null!==(a=a.data)&&void 0!==a&&null!==(a=a.error)&&void 0!==a&&a.message)e.response.data.error.class&&(l+=`${e.response.data.error.class} `),l+=`${e.response.data.error.message}`;else{var i;l+=`${null===(i=e.response)||void 0===i?void 0:i.data}`}throw o.$notify&&o.$notify.serious({title:"Network error",body:l}),e}throw e}));const i=a},3038:(e,t,s)=>{s.r(t),s.d(t,{default:()=>U});var r=function(){var e=this,t=e._self._c;return t("div",[t("v-card",[t("v-card-title",[e._v(" Reset suppressed warnings ")]),e._v(" "),t("v-card-subtitle",[e._v('\n This resets "don\'t show this again" dialogs on this browser\n ')]),e._v(" "),t("v-card-text",{staticClass:"pb-0 ml-2"},[e.suppressedWarnings.length?[t("v-checkbox",{staticClass:"mt-0",attrs:{label:"Select all","data-test":"select-all-suppressed-warnings"},model:{value:e.selectAllSuppressedWarnings,callback:function(t){e.selectAllSuppressedWarnings=t},expression:"selectAllSuppressedWarnings"}}),e._v(" "),e._l(e.suppressedWarnings,(function(s){return t("v-checkbox",{key:s.key,staticClass:"mt-0",attrs:{label:s.text,value:s.key,dense:""},model:{value:e.selectedSuppressedWarnings,callback:function(t){e.selectedSuppressedWarnings=t},expression:"selectedSuppressedWarnings"}})}))]:[e._v(" No warnings to reset ")]],2),e._v(" "),t("v-card-actions",[t("v-btn",{staticClass:"ml-2",attrs:{disabled:!e.selectedSuppressedWarnings.length,color:"warning",text:"","data-test":"reset-suppressed-warnings"},on:{click:e.resetSuppressedWarnings}},[e._v("\n Reset\n ")])],1)],1),e._v(" "),t("v-divider"),e._v(" "),t("v-card",[t("v-card-title",[e._v(" Clear default configs ")]),e._v(" "),t("v-card-subtitle",[e._v("\n This clears the default tool configs on this browser\n ")]),e._v(" "),t("v-card-text",{staticClass:"pb-0 ml-2"},[e.lastConfigs.length?[t("v-checkbox",{staticClass:"mt-0",attrs:{label:"Select all","data-test":"select-all-default-configs"},model:{value:e.selectAllLastConfigs,callback:function(t){e.selectAllLastConfigs=t},expression:"selectAllLastConfigs"}}),e._v(" "),e._l(e.lastConfigs,(function(s){return t("v-checkbox",{key:s.key,staticClass:"mt-0",attrs:{label:s.text,value:s.key,dense:""},model:{value:e.selectedLastConfigs,callback:function(t){e.selectedLastConfigs=t},expression:"selectedLastConfigs"}})}))]:[e._v(" No configs to clear ")]],2),e._v(" "),t("v-card-actions",[t("v-btn",{staticClass:"ml-2",attrs:{disabled:!e.selectedLastConfigs.length,color:"warning",text:"","data-test":"clear-default-configs"},on:{click:e.clearLastConfigs}},[e._v("\n Clear\n ")])],1)],1),e._v(" "),t("v-divider"),e._v(" "),t("astro-settings"),e._v(" "),t("v-divider"),e._v(" "),t("classification-banner-settings"),e._v(" "),t("v-divider"),e._v(" "),t("v-card",[t("v-card-title",[e._v(" Source code URL ")]),e._v(" "),t("v-card-subtitle",[e._v('\n This sets the URL for the "Source" link in the footer. This is required\n under the AGPL license.\n ')]),e._v(" "),t("v-card-text",{staticClass:"pb-0 ml-2"},[t("v-text-field",{attrs:{label:"Source URL","data-test":"source-url"},model:{value:e.sourceUrl,callback:function(t){e.sourceUrl=t},expression:"sourceUrl"}})],1),e._v(" "),t("v-card-actions",[t("v-container",{staticClass:"pt-0"},[t("v-row",{attrs:{dense:""}},[t("v-col",{staticClass:"pl-0"},[t("v-btn",{attrs:{color:"success",text:"","data-test":"save-source-url"},on:{click:e.saveSourceUrl}},[e._v("\n Save\n ")])],1)],1),e._v(" "),t("v-alert",{attrs:{type:"error",dismissible:"",dense:""},model:{value:e.sourceUrlErrorSaving,callback:function(t){e.sourceUrlErrorSaving=t},expression:"sourceUrlErrorSaving"}},[e._v("\n Error saving\n ")]),e._v(" "),t("v-alert",{attrs:{type:"success",dismissible:"",dense:""},model:{value:e.sourceUrlSuccessSaving,callback:function(t){e.sourceUrlSuccessSaving=t},expression:"sourceUrlSuccessSaving"}},[e._v("\n Saved! (Refresh the page to see changes)\n ")])],1)],1)],1),e._v(" "),t("v-divider"),e._v(" "),t("v-card",[t("v-card-title",[e._v(" Rubygems URL ")]),e._v(" "),t("v-card-subtitle",[e._v("\n This sets the URL for installing dependency rubygems. Also used for\n rubygem discovery.\n ")]),e._v(" "),t("v-card-text",{staticClass:"pb-0 ml-2"},[t("v-text-field",{attrs:{label:"Rubygems URL","data-test":"rubygems-url"},model:{value:e.rubygemsUrl,callback:function(t){e.rubygemsUrl=t},expression:"rubygemsUrl"}})],1),e._v(" "),t("v-card-actions",[t("v-container",{staticClass:"pt-0"},[t("v-row",{attrs:{dense:""}},[t("v-col",{staticClass:"pl-0"},[t("v-btn",{attrs:{color:"success",text:"","data-test":"save-rubygems-url"},on:{click:e.saveRubygemsUrl}},[e._v("\n Save\n ")])],1)],1),e._v(" "),t("v-alert",{attrs:{type:"error",dismissible:"",dense:""},model:{value:e.rubygemsUrlErrorSaving,callback:function(t){e.rubygemsUrlErrorSaving=t},expression:"rubygemsUrlErrorSaving"}},[e._v("\n Error saving\n ")]),e._v(" "),t("v-alert",{attrs:{type:"success",dismissible:"",dense:""},model:{value:e.rubygemsUrlSuccessSaving,callback:function(t){e.rubygemsUrlSuccessSaving=t},expression:"rubygemsUrlSuccessSaving"}},[e._v("\n Saved! (Refresh the page to see changes)\n ")])],1)],1)],1),e._v(" "),t("v-divider"),e._v(" "),t("v-card",[t("v-card-title",[e._v(" Pypi URL ")]),e._v(" "),t("v-card-subtitle",[e._v("\n This sets the URL for installing dependency python packages. Also used\n for package discovery.\n ")]),e._v(" "),t("v-card-text",{staticClass:"pb-0 ml-2"},[t("v-text-field",{attrs:{label:"Pypi URL","data-test":"pypi-url"},model:{value:e.pypiUrl,callback:function(t){e.pypiUrl=t},expression:"pypiUrl"}})],1),e._v(" "),t("v-card-actions",[t("v-container",{staticClass:"pt-0"},[t("v-row",{attrs:{dense:""}},[t("v-col",{staticClass:"pl-0"},[t("v-btn",{attrs:{color:"success",text:"","data-test":"save-pypi-url"},on:{click:e.savePypiUrl}},[e._v("\n Save\n ")])],1)],1),e._v(" "),t("v-alert",{attrs:{type:"error",dismissible:"",dense:""},model:{value:e.pypiUrlErrorSaving,callback:function(t){e.pypiUrlErrorSaving=t},expression:"pypiUrlErrorSaving"}},[e._v("\n Error saving\n ")]),e._v(" "),t("v-alert",{attrs:{type:"success",dismissible:"",dense:""},model:{value:e.pypiUrlSuccessSaving,callback:function(t){e.pypiUrlSuccessSaving=t},expression:"pypiUrlSuccessSaving"}},[e._v("\n Saved! (Refresh the page to see changes)\n ")])],1)],1)],1)],1)},n=[],o=(s(4293),s(8715),s(7010),s(942)),a=(s(7107),s(2482),s(7067),s(4147),s(2682),s(785),s(8357),s(6196),s(821),s(6554),s(8472),s(7404),s(5803),s(3912),s(2673));class i{constructor(){(0,o.A)(this,"id",1)}async exec(e,t,s={},r={},n=6e4){try{let e=await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity);e&&OpenC3Auth.setTokens()}catch(i){OpenC3Auth.login()}this.id=this.id+1;try{s["scope"]=window.openc3Scope;const o=await a.A.post("/openc3-api/api",{jsonrpc:"2.0",method:e,params:t,id:this.id,keyword_params:s},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...r},timeout:n});return o.data.result}catch(i){var o=new Error;throw i.response?(o.name=i.response.data.error.data.class,o.message=i.response.data.error.data.message):i.request?(o.name="Request error",o.message="Request error, no response received"):o.name="Unknown error",o}}decode_openc3_type(e){if(null!==e&&"object"===typeof 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}encode_openc3_type(e){return Number.isNaN(e)?{json_class:"Float",raw:"NaN"}:e==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:e==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then((e=>{e&&(localStorage.openc3OfflineToken?this.set_offline_access(localStorage.openc3OfflineToken).then((()=>{delete localStorage.openc3OfflineToken})):OpenC3Auth.getOfflineAccess())}))}offline_access_needed(){return this.exec("offline_access_needed",[])}set_offline_access(e){return this.exec("set_offline_access",[e])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(e,t){return this.exec("map_target_to_interface",[e,t])}connect_interface(e,...t){return t.length>0?this.exec("connect_interface",[e,...t]):this.exec("connect_interface",[e])}disconnect_interface(e){return this.exec("disconnect_interface",[e])}interface_cmd(e,t,...s){return this.exec("interface_cmd",[e,t,...s])}get_all_router_info(){return this.exec("get_all_router_info",[])}connect_router(e){return this.exec("connect_router",[e])}disconnect_router(e){return this.exec("disconnect_router",[e])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_all_target_info(){return this.exec("get_all_target_info",[])}get_tlm_cnts(e){return this.exec("get_tlm_cnts",[e])}get_item(e,t,s){return this.exec("get_item",[e,t,s])}get_param(e,t,s){return this.exec("get_param",[e,t,s])}get_parameter(e,t,s){return this.exec("get_parameter",[e,t,s])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(e){return this.exec("set_limits_set",[e])}get_target(e){return this.exec("get_target",[e])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_list",[])}get_tlm(e,t){return this.exec("get_tlm",[e,t])}get_telemetry(e,t){return this.exec("get_telemetry",[e,t])}get_all_tlm(e){return this.exec("get_all_tlm",[e])}get_all_telemetry(e){return this.exec("get_all_telemetry",[e])}get_all_tlm_names(e){return this.exec("get_all_tlm_names",[e])}get_all_telemetry_names(e){return this.exec("get_all_telemetry_names",[e])}async get_tlm_packet(e,t,s,r=30){const n=await this.exec("get_tlm_packet",[e,t],{type:s,stale_time:r});if(null!=n)for(var o=n.length,a=null,i=0;i<o;i++)a=this.decode_openc3_type(n[i][1]),null!==a&&(n[i][1]=a);return n}get_packet_derived_items(e,t){return this.exec("get_packet_derived_items",[e,t])}get_tlm_buffer(e,t){return this.exec("get_tlm_buffer",[e,t])}async get_tlm_values(e,t=30,s=null){let r={stale_time:t};null!==s&&(r["cache_timeout"]=s);const n=await this.exec("get_tlm_values",[e],r,{},1e4);for(var o=n[0].length,a=null,i=0;i<o;i++)a=this.decode_openc3_type(n[0][i]),null!==a&&(n[0][i]=a);return n}get_limits(e,t,s){return this.exec("get_limits",[e,t,s])}async tlm(e,t,s,r="CONVERTED"){let n=null;if(void 0===t)n=await this.exec("tlm",[e]);else if(void 0===s){if(!["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(t)){var o=new Error;throw o.name="TypeError",o.message=`Invalid data type ${t}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,o}n=await this.exec("tlm",[e],{type:t})}else n=await this.exec("tlm",[e,t,s],{type:r});var a=this.decode_openc3_type(n);return null!==a&&(n=a),n}async inject_tlm(e,t,s=null,r="CONVERTED"){data=await this.exec("inject_tlm",[e,t,s],{type:r})}set_tlm(e,t,s,r){return this.exec("set_tlm",[e,t,s],{type:r})}override_tlm(e,t,s,r){return this.exec("override_tlm",[e,t,s],{type:r})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(e,t,s,r){return this.exec("normalize_tlm",[e,t,s],{type:r})}get_all_cmds(e){return this.exec("get_all_cmds",[e])}get_all_commands(e){return this.exec("get_all_commands",[e])}get_all_cmd_names(e){return this.exec("get_all_cmd_names",[e])}get_all_command_names(e){return this.exec("get_all_command_names",[e])}get_cmd(e,t){return this.exec("get_cmd",[e,t])}get_command(e,t){return this.exec("get_command",[e,t])}get_cmd_cnts(e){return this.exec("get_cmd_cnts",[e])}get_cmd_value(e,t,s,r="CONVERTED"){return this.exec("get_cmd_value",[e,t,s,r])}get_cmd_buffer(e,t){return this.exec("get_cmd_buffer",[e,t])}_cmd(e,t,s,r,n){var o=null;for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(o=this.encode_openc3_type(r[a]),null!==o&&(r[a]=o));return this.exec(e,[t,s,r],{},n)}get_cmd_hazardous(e,t,s){return void 0===t?this.exec("get_cmd_hazardous",e):this._cmd("get_cmd_hazardous",e,t,s)}cmd(e,t,s,r={}){return void 0===t?this.exec("cmd",e,{},r):this._cmd("cmd",e,t,s,r)}cmd_no_range_check(e,t,s){return void 0===t?this.exec("cmd_no_range_check",e):this._cmd("cmd_no_range_check",e,t,s)}cmd_raw(e,t,s){return void 0===t?this.exec("cmd_raw",e):this._cmd("cmd_raw",e,t,s)}cmd_raw_no_range_check(e,t,s){return void 0===t?this.exec("cmd_raw_no_range_check",e):this._cmd("cmd_raw_no_range_check",e,t,s)}cmd_no_hazardous_check(e,t,s){return void 0===t?this.exec("cmd_no_hazardous_check",e):this._cmd("cmd_no_hazardous_check",e,t,s)}cmd_no_checks(e,t,s){return void 0===t?this.exec("cmd_no_checks",e):this._cmd("cmd_no_checks",e,t,s)}cmd_raw_no_hazardous_check(e,t,s){return void 0===t?this.exec("cmd_raw_no_hazardous_check",e):this._cmd("cmd_raw_no_hazardous_check",e,t,s)}cmd_raw_no_checks(e,t,s){return void 0===t?this.exec("cmd_raw_no_checks",e):this._cmd("cmd_raw_no_checks",e,t,s)}build_cmd(e,t,s){return void 0===t?this.exec("build_cmd",e):this._cmd("build_cmd",e,t,s)}build_command(e,t,s){return void 0===t?this.exec("build_command",e):this._cmd("build_command",e,t,s)}get_interface_names(){return this.exec("get_interface_names",[])}send_raw(e,t){return this.exec("send_raw",[e,t])}list_configs(e){return this.exec("list_configs",[e])}load_config(e,t){return this.exec("load_config",[e,t])}save_config(e,t,s){return this.exec("save_config",[e,t,s])}delete_config(e,t){return this.exec("delete_config",[e,t])}enable_limits(e,t,s){return this.exec("enable_limits",[e,t,s])}disable_limits(e,t,s){return this.exec("disable_limits",[e,t,s])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(e){return this.exec("get_overall_limits_state",[e])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(e){return this.exec("get_setting",[e])}get_settings(e){return this.exec("get_settings",e)}set_setting(e,t){return this.exec("set_setting",[e,t])}save_setting(e,t){return this.exec("save_setting",[e,t])}get_metrics(){return this.exec("get_metrics",[])}async hashString(e){if(window.isSecureContext){const t=(new TextEncoder).encode(e),s=await crypto.subtle.digest("SHA-256",t),r=new Uint8Array(s);return Array.from(r).map((e=>e.toString(16).padStart(2,"0"))).join("")}}}var l=function(){var e=this,t=e._self._c;return t("v-card",[t("v-card-title",[e._v("Astro Settings")]),e._v(" "),t("v-card-text",{staticClass:"pb-0"},[t("v-alert",{attrs:{type:"error",dismissible:"",dense:""},model:{value:e.errorLoading,callback:function(t){e.errorLoading=t},expression:"errorLoading"}},[e._v("\n Error loading previous configuration due to "+e._s(e.errorText)+"\n ")]),e._v(" "),t("v-container",{staticClass:"pb-0"},[t("v-row",{attrs:{dense:""}},[t("v-col",[t("v-switch",{attrs:{label:"Hide Astro Clock","data-test":"hide-astro-clock"},model:{value:e.hideClock,callback:function(t){e.hideClock=t},expression:"hideClock"}})],1)],1)],1)],1),e._v(" "),t("v-card-actions",[t("v-container",{staticClass:"pt-0"},[t("v-row",{attrs:{dense:""}},[t("v-col",{staticClass:"pl-0"},[t("v-btn",{attrs:{color:"success",text:"","data-test":"save-astro-settings"},on:{click:e.save}},[e._v("\n Save\n ")])],1)],1),e._v(" "),t("v-alert",{attrs:{type:"error",dismissible:"",dense:""},model:{value:e.errorSaving,callback:function(t){e.errorSaving=t},expression:"errorSaving"}},[e._v("\n Error saving due to "+e._s(e.errorText)+"\n ")]),e._v(" "),t("v-alert",{attrs:{type:"success",dismissible:"",dense:""},model:{value:e.successSaving,callback:function(t){e.successSaving=t},expression:"successSaving"}},[e._v("\n Saved! (Refresh the page to see changes)\n ")])],1)],1)],1)},c=[];const u="astro",d={data(){return{api:null,errorLoading:!1,errorSaving:!1,errorText:"",successSaving:!1,hideClock:!1}},computed:{saveObj:function(){return JSON.stringify({hideClock:this.hideClock})}},created(){this.api=new i,this.load()},methods:{load:function(){this.api.get_setting(u).then((e=>{if(this.errorLoading=!1,e){const t=JSON.parse(e);this.hideClock=t.hideClock}})).catch((e=>{this.errorText=e,this.errorLoading=!0}))},save:function(){this.api.set_setting(u,this.saveObj).then((()=>{this.errorSaving=!1,this.successSaving=!0})).catch((e=>{this.errorText=e,this.errorSaving=!0}))}}},_=d;var g=s(2401),v=(0,g.A)(_,l,c,!1,null,null,null);const p=v.exports;var h=function(){var e=this,t=e._self._c;return t("v-card",[t("v-card-title",[e._v("Classification Banner Settings")]),e._v(" "),t("v-card-text",{staticClass:"pb-0"},[t("v-alert",{attrs:{type:"error",dismissible:"",dense:""},model:{value:e.errorLoading,callback:function(t){e.errorLoading=t},expression:"errorLoading"}},[e._v("\n Error loading previous configuration due to "+e._s(e.errorText)+"\n ")]),e._v(" "),t("v-container",{staticClass:"pb-0"},[t("v-row",{attrs:{dense:""}},[t("v-col",[t("v-text-field",{attrs:{label:"Text","data-test":"classification-banner-text"},model:{value:e.text,callback:function(t){e.text=t},expression:"text"}})],1)],1),e._v(" "),t("v-row",{attrs:{dense:""}},[t("v-col",[t("v-select",{attrs:{label:"Background color",items:e.colors,"data-test":"classification-banner-background-color"},scopedSlots:e._u([e.selectedBackgroundColor?{key:"prepend-inner",fn:function(){return[t("v-icon",{attrs:{color:e.selectedBackgroundColor}},[e._v(" mdi-square ")])]},proxy:!0}:null,{key:"item",fn:function(s){return[s.item.value?t("v-icon",{staticClass:"pr-1",attrs:{color:s.item.value}},[e._v("\n mdi-square\n ")]):e._e(),e._v("\n "+e._s(s.item.text)+"\n ")]}}],null,!0),model:{value:e.selectedBackgroundColor,callback:function(t){e.selectedBackgroundColor=t},expression:"selectedBackgroundColor"}})],1),e._v(" "),t("v-col",[t("v-text-field",{attrs:{label:"Custom background color",hint:e.customColorHint,disabled:!1!==e.selectedBackgroundColor,rules:[e.rules.customColor],"data-test":"classification-banner-custom-background-color"},scopedSlots:e._u([{key:"prepend-inner",fn:function(){return[t("v-icon",{directives:[{name:"show",rawName:"v-show",value:!e.selectedBackgroundColor,expression:"!selectedBackgroundColor"}],attrs:{color:e.customBackgroundColor}},[e._v("\n mdi-square\n ")])]},proxy:!0}]),model:{value:e.customBackgroundColor,callback:function(t){e.customBackgroundColor=t},expression:"customBackgroundColor"}})],1),e._v(" "),t("v-col",[t("v-select",{attrs:{label:"Font color",items:e.colors,"data-test":"classification-banner-font-color"},scopedSlots:e._u([e.selectedFontColor?{key:"prepend-inner",fn:function(){return[t("v-icon",{directives:[{name:"show",rawName:"v-show",value:e.selectedFontColor,expression:"selectedFontColor"}],attrs:{color:e.selectedFontColor}},[e._v("\n mdi-square\n ")])]},proxy:!0}:null,{key:"item",fn:function(s){return[s.item.value?t("v-icon",{staticClass:"pr-1",attrs:{color:s.item.value}},[e._v("\n mdi-square\n ")]):e._e(),e._v("\n "+e._s(s.item.text)+"\n ")]}}],null,!0),model:{value:e.selectedFontColor,callback:function(t){e.selectedFontColor=t},expression:"selectedFontColor"}})],1),e._v(" "),t("v-col",[t("v-text-field",{attrs:{label:"Custom font color",hint:e.customColorHint,disabled:!1!==e.selectedFontColor,rules:[e.rules.customColor],"data-test":"classification-banner-custom-font-color"},scopedSlots:e._u([{key:"prepend-inner",fn:function(){return[t("v-icon",{directives:[{name:"show",rawName:"v-show",value:!e.selectedFontColor,expression:"!selectedFontColor"}],attrs:{color:e.customFontColor}},[e._v("\n mdi-square\n ")])]},proxy:!0}]),model:{value:e.customFontColor,callback:function(t){e.customFontColor=t},expression:"customFontColor"}})],1)],1),e._v(" "),t("v-row",{attrs:{dense:""}},[t("v-col",[t("v-switch",{attrs:{label:"Display top banner","data-test":"display-top-banner"},model:{value:e.displayTopBanner,callback:function(t){e.displayTopBanner=t},expression:"displayTopBanner"}})],1),e._v(" "),t("v-col",[t("v-text-field",{attrs:{label:"Top height",disabled:!e.displayTopBanner,type:"number",suffix:"px","data-test":"classification-banner-top-height"},model:{value:e.topHeight,callback:function(t){e.topHeight=t},expression:"topHeight"}})],1),e._v(" "),t("v-col",[t("v-switch",{attrs:{label:"Display bottom banner","data-test":"display-bottom-banner"},model:{value:e.displayBottomBanner,callback:function(t){e.displayBottomBanner=t},expression:"displayBottomBanner"}})],1),e._v(" "),t("v-col",[t("v-text-field",{attrs:{label:"Bottom height",disabled:!e.displayBottomBanner,type:"number",suffix:"px","data-test":"classification-banner-bottom-height"},model:{value:e.bottomHeight,callback:function(t){e.bottomHeight=t},expression:"bottomHeight"}})],1)],1)],1)],1),e._v(" "),t("v-card-actions",[t("v-container",{staticClass:"pt-0"},[t("v-row",{attrs:{dense:""}},[t("v-col",{staticClass:"pl-0"},[t("v-btn",{attrs:{disabled:!e.formValid,color:"success",text:"","data-test":"save-classification-banner"},on:{click:e.save}},[e._v("\n Save\n ")])],1)],1),e._v(" "),t("v-alert",{attrs:{type:"error",dismissible:"",dense:""},model:{value:e.errorSaving,callback:function(t){e.errorSaving=t},expression:"errorSaving"}},[e._v("\n Error saving due to "+e._s(e.errorText)+"\n ")]),e._v(" "),t("v-alert",{attrs:{type:"success",dismissible:"",dense:""},model:{value:e.successSaving,callback:function(t){e.successSaving=t},expression:"successSaving"}},[e._v("\n Saved! (Refresh the page to see changes)\n ")])],1)],1)],1)},m=[];const f="classification_banner",x={data(){return{api:null,errorLoading:!1,errorSaving:!1,errorText:"",successSaving:!1,text:"",displayTopBanner:!1,displayBottomBanner:!1,topHeight:0,bottomHeight:0,selectedBackgroundColor:"red",customBackgroundColor:"",selectedFontColor:"white",customFontColor:"",customColorHint:"Enter a 3 or 6-digit hex color code",colors:[{text:"Yellow",value:"yellow"},{text:"Orange",value:"orange"},{text:"Red",value:"red"},{text:"Purple",value:"purple"},{text:"Blue",value:"blue"},{text:"Green",value:"green"},{text:"Black",value:"black"},{text:"White",value:"white"},{text:"Custom",value:!1}],rules:{customColor:e=>/^#(?:[0-9a-fA-F]{3}){1,2}$/.test(e)||this.customColorHint}}},computed:{saveObj:function(){return JSON.stringify({text:this.text,fontColor:this.selectedFontColor||this.customFontColor,backgroundColor:this.selectedBackgroundColor||this.customBackgroundColor,topHeight:this.displayTopBanner?this.topHeight:0,bottomHeight:this.displayBottomBanner?this.bottomHeight:0})},formValid:function(){return(this.selectedFontColor||!0===this.rules.customColor(this.customFontColor))&&(this.selectedBackgroundColor||!0===this.rules.customColor(this.customBackgroundColor))}},watch:{displayTopBanner:function(e){this.topHeight=e?20:0},displayBottomBanner:function(e){this.bottomHeight=e?20:0},customFontColor:function(e){e&&e.length&&!e.startsWith("#")&&(this.customFontColor=`#${e}`)},customBackgroundColor:function(e){e&&e.length&&!e.startsWith("#")&&(this.customBackgroundColor=`#${e}`)}},created(){this.api=new i,this.load()},methods:{load:function(){this.api.get_setting(f).then((e=>{if(this.errorLoading=!1,e){const t=JSON.parse(e);this.text=t.text,this.topHeight=t.topHeight,this.bottomHeight=t.bottomHeight,this.displayTopBanner=0!==t.topHeight,this.displayBottomBanner=0!==t.bottomHeight,t.backgroundColor&&t.backgroundColor.startsWith("#")?(this.customBackgroundColor=t.backgroundColor,this.selectedBackgroundColor=!1):this.selectedBackgroundColor=t.backgroundColor,t.fontColor&&t.fontColor.startsWith("#")?(this.customFontColor=t.fontColor,this.selectedFontColor=!1):this.selectedFontColor=t.fontColor}})).catch((e=>{this.errorText=e,this.errorLoading=!0}))},save:function(){this.api.set_setting(f,this.saveObj).then((()=>{this.errorSaving=!1,this.successSaving=!0})).catch((e=>{this.errorText=e,this.errorSaving=!0}))}}},b=x;var y=(0,g.A)(b,h,m,!1,null,null,null);const C=y.exports,S={components:{AstroSettings:p,ClassificationBannerSettings:C},data(){return{api:new i,suppressedWarnings:[],selectedSuppressedWarnings:[],selectAllSuppressedWarnings:!1,lastConfigs:[],selectedLastConfigs:[],selectAllLastConfigs:!1,sourceUrl:"",rubygemsUrl:"",pypiUrl:"",sourceUrlErrorSaving:!1,sourceUrlSuccessSaving:!1,rubygemsUrlErrorSaving:!1,rubygemsUrlSuccessSaving:!1,pypiUrlErrorSaving:!1,pypiUrlSuccessSaving:!1}},watch:{selectAllSuppressedWarnings:function(e){this.selectedSuppressedWarnings=e?this.suppressedWarnings.map((e=>e.key)):[]},selectAllLastConfigs:function(e){this.selectedLastConfigs=e?this.lastConfigs.map((e=>e.key)):[]}},created(){this.loadSuppressedWarnings(),this.loadLastConfigs(),this.loadSourceUrl(),this.loadRubygemsUrl(),this.loadPypiUrl()},methods:{loadSuppressedWarnings:function(){this.suppressedWarnings=Object.keys(localStorage).filter((e=>e.startsWith("suppresswarning__"))).map(this.localStorageKeyToDisplayObject),this.selectedSuppressedWarnings=[]},resetSuppressedWarnings:function(){this.deleteLocalStorageKeys(this.selectedSuppressedWarnings),this.loadSuppressedWarnings()},loadLastConfigs:function(){this.lastConfigs=Object.keys(localStorage).filter((e=>e.endsWith("__default"))).map((e=>{const t=e.split("__")[0].replaceAll("_"," ");return{key:e,text:t.charAt(0).toUpperCase()+t.slice(1)}})),this.selectedLastConfigs=[]},clearLastConfigs:function(){this.deleteLocalStorageKeys(this.selectedLastConfigs),this.loadLastConfigs()},deleteLocalStorageKeys:function(e){for(const t of e)delete localStorage[t]},localStorageKeyToDisplayObject:function(e){const t=e.split("__")[0].replaceAll("_"," ");return{key:e,text:t.charAt(0).toUpperCase()+t.slice(1),value:localStorage[e]}},loadSourceUrl:function(){this.api.get_setting("source_url").then((e=>{this.sourceUrl=e})).catch((()=>{this.sourceUrl="https://github.com/OpenC3/cosmos"}))},saveSourceUrl:function(){this.api.set_setting("source_url",this.sourceUrl).then((()=>{this.sourceUrlErrorSaving=!1,this.sourceUrlSuccessSaving=!0})).catch((()=>{this.sourceUrlErrorSaving=!0}))},loadRubygemsUrl:function(){this.api.get_setting("rubygems_url").then((e=>{this.rubygemsUrl=e})).catch((()=>{this.rubygemsUrl="https://rubygems.org"}))},saveRubygemsUrl:function(){this.api.set_setting("rubygems_url",this.rubygemsUrl).then((()=>{this.rubygemsUrlErrorSaving=!1,this.rubygemsUrlSuccessSaving=!0})).catch((()=>{this.rubygemsUrlErrorSaving=!0}))},loadPypiUrl:function(){this.api.get_setting("pypi_url").then((e=>{this.pypiUrl=e})).catch((()=>{this.pypiUrl="https://pypi.org/simple"}))},savePypiUrl:function(){this.api.set_setting("pypi_url",this.pypiUrl).then((()=>{this.pypiUrlErrorSaving=!1,this.pypiUrlSuccessSaving=!0})).catch((()=>{this.pypiUrlErrorSaving=!0}))}}},k=S;var w=(0,g.A)(k,r,n,!1,null,null,null);const U=w.exports},286:(e,t,s)=>{var r=s(4578),n=TypeError;e.exports=function(e,t){if(r(t,e))return e;throw new n("Incorrect invocation")}},7825:(e,t,s)=>{var r=s(6881);e.exports=r([].slice)},9295:(e,t,s)=>{var r=s(7825),n=Math.floor,o=function(e,t){var s=e.length;if(s<8){var a,i,l=1;while(l<s){i=l,a=e[l];while(i&&t(e[i-1],a)>0)e[i]=e[--i];i!==l++&&(e[i]=a)}}else{var c=n(s/2),u=o(r(e,0,c),t),d=o(r(e,c),t),_=u.length,g=d.length,v=0,p=0;while(v<_||p<g)e[v+p]=v<_&&p<g?t(u[v],d[p])<=0?u[v++]:d[p++]:v<_?u[v++]:d[p++]}return e};e.exports=o},997:(e,t,s)=>{var r=s(4530),n=s(4466);e.exports=function(e,t,s){return s.get&&r(s.get,t,{getter:!0}),s.set&&r(s.set,t,{setter:!0}),n.f(e,t,s)}},4320:(e,t,s)=>{var r=s(7509);e.exports=function(e,t,s){for(var n in t)r(e,n,t[n],s);return e}},5821:(e,t,s)=>{var r=s(5691),n=s(4977),o=s(9055),a=r(r.bind);e.exports=function(e,t){return n(e),void 0===t?e:o?a(e,t):function(){return e.apply(t,arguments)}}},5691:(e,t,s)=>{var r=s(8689),n=s(6881);e.exports=function(e){if("Function"===r(e))return n(e)}},9874:(e,t,s)=>{var r=s(5438),n=s(2913),o=s(4318),a=s(9164),i=s(4282),l=i("iterator");e.exports=function(e){if(!o(e))return n(e,l)||n(e,"@@iterator")||a[r(e)]}},2350:(e,t,s)=>{var r=s(9944),n=s(4977),o=s(3770),a=s(3174),i=s(9874),l=TypeError;e.exports=function(e,t){var s=arguments.length<2?i(e):t;if(n(s))return o(r(s,e));throw new l(a(e)+" is not iterable")}},8146:(e,t,s)=>{var r=s(4282),n=s(9164),o=r("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(n.Array===e||a[o]===e)}},473:(e,t,s)=>{var r=s(831),n=s(8689),o=s(4282),a=o("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[a])?!!t:"RegExp"===n(e))}},3113:(e,t,s)=>{var r=s(9944),n=s(4418),o=s(4578),a=s(4932),i=RegExp.prototype;e.exports=function(e){var t=e.flags;return void 0!==t||"flags"in i||n(e,"flags")||!o(i,e)?t:r(a,e)}},8715:(e,t,s)=>{var r=s(5613),n=s(9944),o=s(6881),a=s(9509),i=s(4188),l=s(4318),c=s(473),u=s(2618),d=s(2913),_=s(3113),g=s(1113),v=s(4282),p=s(1942),h=v("replace"),m=TypeError,f=o("".indexOf),x=o("".replace),b=o("".slice),y=Math.max;r({target:"String",proto:!0},{replaceAll:function(e,t){var s,r,o,v,C,S,k,w,U,T=a(this),B=0,E=0,A="";if(!l(e)){if(s=c(e),s&&(r=u(a(_(e))),!~f(r,"g")))throw new m("`.replaceAll` does not allow non-global regexes");if(o=d(e,h),o)return n(o,e,T,t);if(p&&s)return x(u(T),e,t)}v=u(T),C=u(e),S=i(t),S||(t=u(t)),k=C.length,w=y(1,k),B=f(v,C);while(-1!==B)U=S?u(t(C,B,v)):g(C,v,B,[],void 0,t),A+=b(v,E,B)+U,E=B+k,B=B+w>v.length?-1:f(v,C,B+w);return E<v.length&&(A+=b(v,E)),A}})}}]);
2
- //# sourceMappingURL=314.js.map
1
+ "use strict";(self["webpackChunk_openc3_cosmos_tool_admin"]=self["webpackChunk_openc3_cosmos_tool_admin"]||[]).push([[383],{2673:(e,t,s)=>{s.d(t,{A:()=>i});var r=s(4625),n=s(1649);const o=new n["default"],a=r.A.create({baseURL:location.origin,timeout:6e4,params:{}});a.interceptors.response.use((e=>e),(e=>{if(e.response){var t,s,r,n,a;if(401===e.response.status&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then((function(e){e&&OpenC3Auth.setTokens()})),e.response.config.headers["Ignore-Errors"]&&e.response.config.headers["Ignore-Errors"].includes(e.response.status.toString()))return Promise.reject(e);let l=`HTTP ${e.response.status} - `;if(null!==(t=e.response)&&void 0!==t&&t.statusText&&(l+=`${e.response.statusText} `),null!==(s=e.response)&&void 0!==s&&null!==(s=s.config)&&void 0!==s&&s.data&&(l+=`${e.response.config.data} `),null!==(r=e.response)&&void 0!==r&&null!==(r=r.data)&&void 0!==r&&r.message)l+=`${e.response.data.message}`;else if(null!==(n=e.response)&&void 0!==n&&null!==(n=n.data)&&void 0!==n&&n.exception)l+=`${e.response.data.exception}`;else if(null!==(a=e.response)&&void 0!==a&&null!==(a=a.data)&&void 0!==a&&null!==(a=a.error)&&void 0!==a&&a.message)e.response.data.error.class&&(l+=`${e.response.data.error.class} `),l+=`${e.response.data.error.message}`;else{var i;l+=`${null===(i=e.response)||void 0===i?void 0:i.data}`}throw o.$notify&&o.$notify.serious({title:"Network error",body:l}),e}throw e}));const i=a},7699:(e,t,s)=>{s.r(t),s.d(t,{default:()=>U});var r=function(){var e=this,t=e._self._c;return t("div",[t("v-card",[t("v-card-title",[e._v(" Reset suppressed warnings ")]),e._v(" "),t("v-card-subtitle",[e._v('\n This resets "don\'t show this again" dialogs on this browser\n ')]),e._v(" "),t("v-card-text",{staticClass:"pb-0 ml-2"},[e.suppressedWarnings.length?[t("v-checkbox",{staticClass:"mt-0",attrs:{label:"Select all","data-test":"select-all-suppressed-warnings"},model:{value:e.selectAllSuppressedWarnings,callback:function(t){e.selectAllSuppressedWarnings=t},expression:"selectAllSuppressedWarnings"}}),e._v(" "),e._l(e.suppressedWarnings,(function(s){return t("v-checkbox",{key:s.key,staticClass:"mt-0",attrs:{label:s.text,value:s.key,dense:""},model:{value:e.selectedSuppressedWarnings,callback:function(t){e.selectedSuppressedWarnings=t},expression:"selectedSuppressedWarnings"}})}))]:[e._v(" No warnings to reset ")]],2),e._v(" "),t("v-card-actions",[t("v-btn",{staticClass:"ml-2",attrs:{disabled:!e.selectedSuppressedWarnings.length,color:"warning",text:"","data-test":"reset-suppressed-warnings"},on:{click:e.resetSuppressedWarnings}},[e._v("\n Reset\n ")])],1)],1),e._v(" "),t("v-divider"),e._v(" "),t("v-card",[t("v-card-title",[e._v(" Clear default configs ")]),e._v(" "),t("v-card-subtitle",[e._v("\n This clears the default tool configs on this browser\n ")]),e._v(" "),t("v-card-text",{staticClass:"pb-0 ml-2"},[e.lastConfigs.length?[t("v-checkbox",{staticClass:"mt-0",attrs:{label:"Select all","data-test":"select-all-default-configs"},model:{value:e.selectAllLastConfigs,callback:function(t){e.selectAllLastConfigs=t},expression:"selectAllLastConfigs"}}),e._v(" "),e._l(e.lastConfigs,(function(s){return t("v-checkbox",{key:s.key,staticClass:"mt-0",attrs:{label:s.text,value:s.key,dense:""},model:{value:e.selectedLastConfigs,callback:function(t){e.selectedLastConfigs=t},expression:"selectedLastConfigs"}})}))]:[e._v(" No configs to clear ")]],2),e._v(" "),t("v-card-actions",[t("v-btn",{staticClass:"ml-2",attrs:{disabled:!e.selectedLastConfigs.length,color:"warning",text:"","data-test":"clear-default-configs"},on:{click:e.clearLastConfigs}},[e._v("\n Clear\n ")])],1)],1),e._v(" "),t("v-divider"),e._v(" "),t("astro-settings"),e._v(" "),t("v-divider"),e._v(" "),t("classification-banner-settings"),e._v(" "),t("v-divider"),e._v(" "),t("v-card",[t("v-card-title",[e._v(" Source code URL ")]),e._v(" "),t("v-card-subtitle",[e._v('\n This sets the URL for the "Source" link in the footer. This is required\n under the AGPL license.\n ')]),e._v(" "),t("v-card-text",{staticClass:"pb-0 ml-2"},[t("v-text-field",{attrs:{label:"Source URL","data-test":"source-url"},model:{value:e.sourceUrl,callback:function(t){e.sourceUrl=t},expression:"sourceUrl"}})],1),e._v(" "),t("v-card-actions",[t("v-container",{staticClass:"pt-0"},[t("v-row",{attrs:{dense:""}},[t("v-col",{staticClass:"pl-0"},[t("v-btn",{attrs:{color:"success",text:"","data-test":"save-source-url"},on:{click:e.saveSourceUrl}},[e._v("\n Save\n ")])],1)],1),e._v(" "),t("v-alert",{attrs:{type:"error",dismissible:"",dense:""},model:{value:e.sourceUrlErrorSaving,callback:function(t){e.sourceUrlErrorSaving=t},expression:"sourceUrlErrorSaving"}},[e._v("\n Error saving\n ")]),e._v(" "),t("v-alert",{attrs:{type:"success",dismissible:"",dense:""},model:{value:e.sourceUrlSuccessSaving,callback:function(t){e.sourceUrlSuccessSaving=t},expression:"sourceUrlSuccessSaving"}},[e._v("\n Saved! (Refresh the page to see changes)\n ")])],1)],1)],1),e._v(" "),t("v-divider"),e._v(" "),t("v-card",[t("v-card-title",[e._v(" Rubygems URL ")]),e._v(" "),t("v-card-subtitle",[e._v("\n This sets the URL for installing dependency rubygems. Also used for\n rubygem discovery.\n ")]),e._v(" "),t("v-card-text",{staticClass:"pb-0 ml-2"},[t("v-text-field",{attrs:{label:"Rubygems URL","data-test":"rubygems-url"},model:{value:e.rubygemsUrl,callback:function(t){e.rubygemsUrl=t},expression:"rubygemsUrl"}})],1),e._v(" "),t("v-card-actions",[t("v-container",{staticClass:"pt-0"},[t("v-row",{attrs:{dense:""}},[t("v-col",{staticClass:"pl-0"},[t("v-btn",{attrs:{color:"success",text:"","data-test":"save-rubygems-url"},on:{click:e.saveRubygemsUrl}},[e._v("\n Save\n ")])],1)],1),e._v(" "),t("v-alert",{attrs:{type:"error",dismissible:"",dense:""},model:{value:e.rubygemsUrlErrorSaving,callback:function(t){e.rubygemsUrlErrorSaving=t},expression:"rubygemsUrlErrorSaving"}},[e._v("\n Error saving\n ")]),e._v(" "),t("v-alert",{attrs:{type:"success",dismissible:"",dense:""},model:{value:e.rubygemsUrlSuccessSaving,callback:function(t){e.rubygemsUrlSuccessSaving=t},expression:"rubygemsUrlSuccessSaving"}},[e._v("\n Saved! (Refresh the page to see changes)\n ")])],1)],1)],1),e._v(" "),t("v-divider"),e._v(" "),t("v-card",[t("v-card-title",[e._v(" Pypi URL ")]),e._v(" "),t("v-card-subtitle",[e._v("\n This sets the URL for installing dependency python packages. Also used\n for package discovery.\n ")]),e._v(" "),t("v-card-text",{staticClass:"pb-0 ml-2"},[t("v-text-field",{attrs:{label:"Pypi URL","data-test":"pypi-url"},model:{value:e.pypiUrl,callback:function(t){e.pypiUrl=t},expression:"pypiUrl"}})],1),e._v(" "),t("v-card-actions",[t("v-container",{staticClass:"pt-0"},[t("v-row",{attrs:{dense:""}},[t("v-col",{staticClass:"pl-0"},[t("v-btn",{attrs:{color:"success",text:"","data-test":"save-pypi-url"},on:{click:e.savePypiUrl}},[e._v("\n Save\n ")])],1)],1),e._v(" "),t("v-alert",{attrs:{type:"error",dismissible:"",dense:""},model:{value:e.pypiUrlErrorSaving,callback:function(t){e.pypiUrlErrorSaving=t},expression:"pypiUrlErrorSaving"}},[e._v("\n Error saving\n ")]),e._v(" "),t("v-alert",{attrs:{type:"success",dismissible:"",dense:""},model:{value:e.pypiUrlSuccessSaving,callback:function(t){e.pypiUrlSuccessSaving=t},expression:"pypiUrlSuccessSaving"}},[e._v("\n Saved! (Refresh the page to see changes)\n ")])],1)],1)],1)],1)},n=[],o=(s(4293),s(8715),s(7010),s(814)),a=(s(7107),s(2482),s(7067),s(4147),s(2682),s(785),s(8357),s(6196),s(821),s(6554),s(8472),s(7404),s(5803),s(3912),s(2673));class i{constructor(){(0,o.A)(this,"id",1)}async exec(e,t,s={},r={},n=6e4){try{let e=await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity);e&&OpenC3Auth.setTokens()}catch(i){OpenC3Auth.login()}this.id=this.id+1;try{s["scope"]=window.openc3Scope;const o=await a.A.post("/openc3-api/api",{jsonrpc:"2.0",method:e,params:t,id:this.id,keyword_params:s},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...r},timeout:n});return o.data.result}catch(i){var o=new Error;throw i.response?(o.name=i.response.data.error.data.class,o.message=i.response.data.error.data.message):i.request?(o.name="Request error",o.message="Request error, no response received"):o.name="Unknown error",o}}decode_openc3_type(e){if(null!==e&&"object"===typeof 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}encode_openc3_type(e){return Number.isNaN(e)?{json_class:"Float",raw:"NaN"}:e==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:e==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then((e=>{e&&(localStorage.openc3OfflineToken?this.set_offline_access(localStorage.openc3OfflineToken).then((()=>{delete localStorage.openc3OfflineToken})):OpenC3Auth.getOfflineAccess())}))}offline_access_needed(){return this.exec("offline_access_needed",[])}set_offline_access(e){return this.exec("set_offline_access",[e])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(e,t){return this.exec("map_target_to_interface",[e,t])}connect_interface(e,...t){return t.length>0?this.exec("connect_interface",[e,...t]):this.exec("connect_interface",[e])}disconnect_interface(e){return this.exec("disconnect_interface",[e])}interface_cmd(e,t,...s){return this.exec("interface_cmd",[e,t,...s])}get_all_router_info(){return this.exec("get_all_router_info",[])}connect_router(e){return this.exec("connect_router",[e])}disconnect_router(e){return this.exec("disconnect_router",[e])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_all_target_info(){return this.exec("get_all_target_info",[])}get_tlm_cnts(e){return this.exec("get_tlm_cnts",[e])}get_item(e,t,s){return this.exec("get_item",[e,t,s])}get_param(e,t,s){return this.exec("get_param",[e,t,s])}get_parameter(e,t,s){return this.exec("get_parameter",[e,t,s])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(e){return this.exec("set_limits_set",[e])}get_target(e){return this.exec("get_target",[e])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_list",[])}get_tlm(e,t){return this.exec("get_tlm",[e,t])}get_telemetry(e,t){return this.exec("get_telemetry",[e,t])}get_all_tlm(e){return this.exec("get_all_tlm",[e])}get_all_telemetry(e){return this.exec("get_all_telemetry",[e])}get_all_tlm_names(e){return this.exec("get_all_tlm_names",[e])}get_all_telemetry_names(e){return this.exec("get_all_telemetry_names",[e])}async get_tlm_packet(e,t,s,r=30){const n=await this.exec("get_tlm_packet",[e,t],{type:s,stale_time:r});if(null!=n)for(var o=n.length,a=null,i=0;i<o;i++)a=this.decode_openc3_type(n[i][1]),null!==a&&(n[i][1]=a);return n}get_packet_derived_items(e,t){return this.exec("get_packet_derived_items",[e,t])}get_tlm_buffer(e,t){return this.exec("get_tlm_buffer",[e,t])}async get_tlm_values(e,t=30,s=null){let r={stale_time:t};null!==s&&(r["cache_timeout"]=s);const n=await this.exec("get_tlm_values",[e],r,{},1e4);for(var o=n[0].length,a=null,i=0;i<o;i++)a=this.decode_openc3_type(n[0][i]),null!==a&&(n[0][i]=a);return n}get_limits(e,t,s){return this.exec("get_limits",[e,t,s])}async tlm(e,t,s,r="CONVERTED"){let n=null;if(void 0===t)n=await this.exec("tlm",[e]);else if(void 0===s){if(!["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(t)){var o=new Error;throw o.name="TypeError",o.message=`Invalid data type ${t}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,o}n=await this.exec("tlm",[e],{type:t})}else n=await this.exec("tlm",[e,t,s],{type:r});var a=this.decode_openc3_type(n);return null!==a&&(n=a),n}async inject_tlm(e,t,s=null,r="CONVERTED"){data=await this.exec("inject_tlm",[e,t,s],{type:r})}set_tlm(e,t,s,r){return this.exec("set_tlm",[e,t,s],{type:r})}override_tlm(e,t,s,r){return this.exec("override_tlm",[e,t,s],{type:r})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(e,t,s,r){return this.exec("normalize_tlm",[e,t,s],{type:r})}get_all_cmds(e){return this.exec("get_all_cmds",[e])}get_all_commands(e){return this.exec("get_all_commands",[e])}get_all_cmd_names(e){return this.exec("get_all_cmd_names",[e])}get_all_command_names(e){return this.exec("get_all_command_names",[e])}get_cmd(e,t){return this.exec("get_cmd",[e,t])}get_command(e,t){return this.exec("get_command",[e,t])}get_cmd_cnts(e){return this.exec("get_cmd_cnts",[e])}get_cmd_value(e,t,s,r="CONVERTED"){return this.exec("get_cmd_value",[e,t,s,r])}get_cmd_buffer(e,t){return this.exec("get_cmd_buffer",[e,t])}_cmd(e,t,s,r,n){var o=null;for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(o=this.encode_openc3_type(r[a]),null!==o&&(r[a]=o));return this.exec(e,[t,s,r],{},n)}get_cmd_hazardous(e,t,s){return void 0===t?this.exec("get_cmd_hazardous",e):this._cmd("get_cmd_hazardous",e,t,s)}cmd(e,t,s,r={}){return void 0===t?this.exec("cmd",e,{},r):this._cmd("cmd",e,t,s,r)}cmd_no_range_check(e,t,s){return void 0===t?this.exec("cmd_no_range_check",e):this._cmd("cmd_no_range_check",e,t,s)}cmd_raw(e,t,s){return void 0===t?this.exec("cmd_raw",e):this._cmd("cmd_raw",e,t,s)}cmd_raw_no_range_check(e,t,s){return void 0===t?this.exec("cmd_raw_no_range_check",e):this._cmd("cmd_raw_no_range_check",e,t,s)}cmd_no_hazardous_check(e,t,s){return void 0===t?this.exec("cmd_no_hazardous_check",e):this._cmd("cmd_no_hazardous_check",e,t,s)}cmd_no_checks(e,t,s){return void 0===t?this.exec("cmd_no_checks",e):this._cmd("cmd_no_checks",e,t,s)}cmd_raw_no_hazardous_check(e,t,s){return void 0===t?this.exec("cmd_raw_no_hazardous_check",e):this._cmd("cmd_raw_no_hazardous_check",e,t,s)}cmd_raw_no_checks(e,t,s){return void 0===t?this.exec("cmd_raw_no_checks",e):this._cmd("cmd_raw_no_checks",e,t,s)}build_cmd(e,t,s){return void 0===t?this.exec("build_cmd",e):this._cmd("build_cmd",e,t,s)}build_command(e,t,s){return void 0===t?this.exec("build_command",e):this._cmd("build_command",e,t,s)}get_interface_names(){return this.exec("get_interface_names",[])}send_raw(e,t){return this.exec("send_raw",[e,t])}list_configs(e){return this.exec("list_configs",[e])}load_config(e,t){return this.exec("load_config",[e,t])}save_config(e,t,s){return this.exec("save_config",[e,t,s])}delete_config(e,t){return this.exec("delete_config",[e,t])}enable_limits(e,t,s){return this.exec("enable_limits",[e,t,s])}disable_limits(e,t,s){return this.exec("disable_limits",[e,t,s])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(e){return this.exec("get_overall_limits_state",[e])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(e){return this.exec("get_setting",[e])}get_settings(e){return this.exec("get_settings",e)}set_setting(e,t){return this.exec("set_setting",[e,t])}save_setting(e,t){return this.exec("save_setting",[e,t])}get_metrics(){return this.exec("get_metrics",[])}async hashString(e){if(window.isSecureContext){const t=(new TextEncoder).encode(e),s=await crypto.subtle.digest("SHA-256",t),r=new Uint8Array(s);return Array.from(r).map((e=>e.toString(16).padStart(2,"0"))).join("")}}}var l=function(){var e=this,t=e._self._c;return t("v-card",[t("v-card-title",[e._v("Astro Settings")]),e._v(" "),t("v-card-text",{staticClass:"pb-0"},[t("v-alert",{attrs:{type:"error",dismissible:"",dense:""},model:{value:e.errorLoading,callback:function(t){e.errorLoading=t},expression:"errorLoading"}},[e._v("\n Error loading previous configuration due to "+e._s(e.errorText)+"\n ")]),e._v(" "),t("v-container",{staticClass:"pb-0"},[t("v-row",{attrs:{dense:""}},[t("v-col",[t("v-switch",{attrs:{label:"Hide Astro Clock","data-test":"hide-astro-clock"},model:{value:e.hideClock,callback:function(t){e.hideClock=t},expression:"hideClock"}})],1)],1)],1)],1),e._v(" "),t("v-card-actions",[t("v-container",{staticClass:"pt-0"},[t("v-row",{attrs:{dense:""}},[t("v-col",{staticClass:"pl-0"},[t("v-btn",{attrs:{color:"success",text:"","data-test":"save-astro-settings"},on:{click:e.save}},[e._v("\n Save\n ")])],1)],1),e._v(" "),t("v-alert",{attrs:{type:"error",dismissible:"",dense:""},model:{value:e.errorSaving,callback:function(t){e.errorSaving=t},expression:"errorSaving"}},[e._v("\n Error saving due to "+e._s(e.errorText)+"\n ")]),e._v(" "),t("v-alert",{attrs:{type:"success",dismissible:"",dense:""},model:{value:e.successSaving,callback:function(t){e.successSaving=t},expression:"successSaving"}},[e._v("\n Saved! (Refresh the page to see changes)\n ")])],1)],1)],1)},c=[];const u="astro",d={data(){return{api:null,errorLoading:!1,errorSaving:!1,errorText:"",successSaving:!1,hideClock:!1}},computed:{saveObj:function(){return JSON.stringify({hideClock:this.hideClock})}},created(){this.api=new i,this.load()},methods:{load:function(){this.api.get_setting(u).then((e=>{if(this.errorLoading=!1,e){const t=JSON.parse(e);this.hideClock=t.hideClock}})).catch((e=>{this.errorText=e,this.errorLoading=!0}))},save:function(){this.api.set_setting(u,this.saveObj).then((()=>{this.errorSaving=!1,this.successSaving=!0})).catch((e=>{this.errorText=e,this.errorSaving=!0}))}}},_=d;var g=s(2401),v=(0,g.A)(_,l,c,!1,null,null,null);const p=v.exports;var h=function(){var e=this,t=e._self._c;return t("v-card",[t("v-card-title",[e._v("Classification Banner Settings")]),e._v(" "),t("v-card-text",{staticClass:"pb-0"},[t("v-alert",{attrs:{type:"error",dismissible:"",dense:""},model:{value:e.errorLoading,callback:function(t){e.errorLoading=t},expression:"errorLoading"}},[e._v("\n Error loading previous configuration due to "+e._s(e.errorText)+"\n ")]),e._v(" "),t("v-container",{staticClass:"pb-0"},[t("v-row",{attrs:{dense:""}},[t("v-col",[t("v-text-field",{attrs:{label:"Text","data-test":"classification-banner-text"},model:{value:e.text,callback:function(t){e.text=t},expression:"text"}})],1)],1),e._v(" "),t("v-row",{attrs:{dense:""}},[t("v-col",[t("v-select",{attrs:{label:"Background color",items:e.colors,"data-test":"classification-banner-background-color"},scopedSlots:e._u([e.selectedBackgroundColor?{key:"prepend-inner",fn:function(){return[t("v-icon",{attrs:{color:e.selectedBackgroundColor}},[e._v(" mdi-square ")])]},proxy:!0}:null,{key:"item",fn:function(s){return[s.item.value?t("v-icon",{staticClass:"pr-1",attrs:{color:s.item.value}},[e._v("\n mdi-square\n ")]):e._e(),e._v("\n "+e._s(s.item.text)+"\n ")]}}],null,!0),model:{value:e.selectedBackgroundColor,callback:function(t){e.selectedBackgroundColor=t},expression:"selectedBackgroundColor"}})],1),e._v(" "),t("v-col",[t("v-text-field",{attrs:{label:"Custom background color",hint:e.customColorHint,disabled:!1!==e.selectedBackgroundColor,rules:[e.rules.customColor],"data-test":"classification-banner-custom-background-color"},scopedSlots:e._u([{key:"prepend-inner",fn:function(){return[t("v-icon",{directives:[{name:"show",rawName:"v-show",value:!e.selectedBackgroundColor,expression:"!selectedBackgroundColor"}],attrs:{color:e.customBackgroundColor}},[e._v("\n mdi-square\n ")])]},proxy:!0}]),model:{value:e.customBackgroundColor,callback:function(t){e.customBackgroundColor=t},expression:"customBackgroundColor"}})],1),e._v(" "),t("v-col",[t("v-select",{attrs:{label:"Font color",items:e.colors,"data-test":"classification-banner-font-color"},scopedSlots:e._u([e.selectedFontColor?{key:"prepend-inner",fn:function(){return[t("v-icon",{directives:[{name:"show",rawName:"v-show",value:e.selectedFontColor,expression:"selectedFontColor"}],attrs:{color:e.selectedFontColor}},[e._v("\n mdi-square\n ")])]},proxy:!0}:null,{key:"item",fn:function(s){return[s.item.value?t("v-icon",{staticClass:"pr-1",attrs:{color:s.item.value}},[e._v("\n mdi-square\n ")]):e._e(),e._v("\n "+e._s(s.item.text)+"\n ")]}}],null,!0),model:{value:e.selectedFontColor,callback:function(t){e.selectedFontColor=t},expression:"selectedFontColor"}})],1),e._v(" "),t("v-col",[t("v-text-field",{attrs:{label:"Custom font color",hint:e.customColorHint,disabled:!1!==e.selectedFontColor,rules:[e.rules.customColor],"data-test":"classification-banner-custom-font-color"},scopedSlots:e._u([{key:"prepend-inner",fn:function(){return[t("v-icon",{directives:[{name:"show",rawName:"v-show",value:!e.selectedFontColor,expression:"!selectedFontColor"}],attrs:{color:e.customFontColor}},[e._v("\n mdi-square\n ")])]},proxy:!0}]),model:{value:e.customFontColor,callback:function(t){e.customFontColor=t},expression:"customFontColor"}})],1)],1),e._v(" "),t("v-row",{attrs:{dense:""}},[t("v-col",[t("v-switch",{attrs:{label:"Display top banner","data-test":"display-top-banner"},model:{value:e.displayTopBanner,callback:function(t){e.displayTopBanner=t},expression:"displayTopBanner"}})],1),e._v(" "),t("v-col",[t("v-text-field",{attrs:{label:"Top height",disabled:!e.displayTopBanner,type:"number",suffix:"px","data-test":"classification-banner-top-height"},model:{value:e.topHeight,callback:function(t){e.topHeight=t},expression:"topHeight"}})],1),e._v(" "),t("v-col",[t("v-switch",{attrs:{label:"Display bottom banner","data-test":"display-bottom-banner"},model:{value:e.displayBottomBanner,callback:function(t){e.displayBottomBanner=t},expression:"displayBottomBanner"}})],1),e._v(" "),t("v-col",[t("v-text-field",{attrs:{label:"Bottom height",disabled:!e.displayBottomBanner,type:"number",suffix:"px","data-test":"classification-banner-bottom-height"},model:{value:e.bottomHeight,callback:function(t){e.bottomHeight=t},expression:"bottomHeight"}})],1)],1)],1)],1),e._v(" "),t("v-card-actions",[t("v-container",{staticClass:"pt-0"},[t("v-row",{attrs:{dense:""}},[t("v-col",{staticClass:"pl-0"},[t("v-btn",{attrs:{disabled:!e.formValid,color:"success",text:"","data-test":"save-classification-banner"},on:{click:e.save}},[e._v("\n Save\n ")])],1)],1),e._v(" "),t("v-alert",{attrs:{type:"error",dismissible:"",dense:""},model:{value:e.errorSaving,callback:function(t){e.errorSaving=t},expression:"errorSaving"}},[e._v("\n Error saving due to "+e._s(e.errorText)+"\n ")]),e._v(" "),t("v-alert",{attrs:{type:"success",dismissible:"",dense:""},model:{value:e.successSaving,callback:function(t){e.successSaving=t},expression:"successSaving"}},[e._v("\n Saved! (Refresh the page to see changes)\n ")])],1)],1)],1)},m=[];const f="classification_banner",x={data(){return{api:null,errorLoading:!1,errorSaving:!1,errorText:"",successSaving:!1,text:"",displayTopBanner:!1,displayBottomBanner:!1,topHeight:0,bottomHeight:0,selectedBackgroundColor:"red",customBackgroundColor:"",selectedFontColor:"white",customFontColor:"",customColorHint:"Enter a 3 or 6-digit hex color code",colors:[{text:"Yellow",value:"yellow"},{text:"Orange",value:"orange"},{text:"Red",value:"red"},{text:"Purple",value:"purple"},{text:"Blue",value:"blue"},{text:"Green",value:"green"},{text:"Black",value:"black"},{text:"White",value:"white"},{text:"Custom",value:!1}],rules:{customColor:e=>/^#(?:[0-9a-fA-F]{3}){1,2}$/.test(e)||this.customColorHint}}},computed:{saveObj:function(){return JSON.stringify({text:this.text,fontColor:this.selectedFontColor||this.customFontColor,backgroundColor:this.selectedBackgroundColor||this.customBackgroundColor,topHeight:this.displayTopBanner?this.topHeight:0,bottomHeight:this.displayBottomBanner?this.bottomHeight:0})},formValid:function(){return(this.selectedFontColor||!0===this.rules.customColor(this.customFontColor))&&(this.selectedBackgroundColor||!0===this.rules.customColor(this.customBackgroundColor))}},watch:{displayTopBanner:function(e){this.topHeight=e?20:0},displayBottomBanner:function(e){this.bottomHeight=e?20:0},customFontColor:function(e){e&&e.length&&!e.startsWith("#")&&(this.customFontColor=`#${e}`)},customBackgroundColor:function(e){e&&e.length&&!e.startsWith("#")&&(this.customBackgroundColor=`#${e}`)}},created(){this.api=new i,this.load()},methods:{load:function(){this.api.get_setting(f).then((e=>{if(this.errorLoading=!1,e){const t=JSON.parse(e);this.text=t.text,this.topHeight=t.topHeight,this.bottomHeight=t.bottomHeight,this.displayTopBanner=0!==t.topHeight,this.displayBottomBanner=0!==t.bottomHeight,t.backgroundColor&&t.backgroundColor.startsWith("#")?(this.customBackgroundColor=t.backgroundColor,this.selectedBackgroundColor=!1):this.selectedBackgroundColor=t.backgroundColor,t.fontColor&&t.fontColor.startsWith("#")?(this.customFontColor=t.fontColor,this.selectedFontColor=!1):this.selectedFontColor=t.fontColor}})).catch((e=>{this.errorText=e,this.errorLoading=!0}))},save:function(){this.api.set_setting(f,this.saveObj).then((()=>{this.errorSaving=!1,this.successSaving=!0})).catch((e=>{this.errorText=e,this.errorSaving=!0}))}}},b=x;var y=(0,g.A)(b,h,m,!1,null,null,null);const C=y.exports,S={components:{AstroSettings:p,ClassificationBannerSettings:C},data(){return{api:new i,suppressedWarnings:[],selectedSuppressedWarnings:[],selectAllSuppressedWarnings:!1,lastConfigs:[],selectedLastConfigs:[],selectAllLastConfigs:!1,sourceUrl:"",rubygemsUrl:"",pypiUrl:"",sourceUrlErrorSaving:!1,sourceUrlSuccessSaving:!1,rubygemsUrlErrorSaving:!1,rubygemsUrlSuccessSaving:!1,pypiUrlErrorSaving:!1,pypiUrlSuccessSaving:!1}},watch:{selectAllSuppressedWarnings:function(e){this.selectedSuppressedWarnings=e?this.suppressedWarnings.map((e=>e.key)):[]},selectAllLastConfigs:function(e){this.selectedLastConfigs=e?this.lastConfigs.map((e=>e.key)):[]}},created(){this.loadSuppressedWarnings(),this.loadLastConfigs(),this.loadSourceUrl(),this.loadRubygemsUrl(),this.loadPypiUrl()},methods:{loadSuppressedWarnings:function(){this.suppressedWarnings=Object.keys(localStorage).filter((e=>e.startsWith("suppresswarning__"))).map(this.localStorageKeyToDisplayObject),this.selectedSuppressedWarnings=[]},resetSuppressedWarnings:function(){this.deleteLocalStorageKeys(this.selectedSuppressedWarnings),this.loadSuppressedWarnings()},loadLastConfigs:function(){this.lastConfigs=Object.keys(localStorage).filter((e=>e.endsWith("__default"))).map((e=>{const t=e.split("__")[0].replaceAll("_"," ");return{key:e,text:t.charAt(0).toUpperCase()+t.slice(1)}})),this.selectedLastConfigs=[]},clearLastConfigs:function(){this.deleteLocalStorageKeys(this.selectedLastConfigs),this.loadLastConfigs()},deleteLocalStorageKeys:function(e){for(const t of e)delete localStorage[t]},localStorageKeyToDisplayObject:function(e){const t=e.split("__")[0].replaceAll("_"," ");return{key:e,text:t.charAt(0).toUpperCase()+t.slice(1),value:localStorage[e]}},loadSourceUrl:function(){this.api.get_setting("source_url").then((e=>{this.sourceUrl=e})).catch((()=>{this.sourceUrl="https://github.com/OpenC3/cosmos"}))},saveSourceUrl:function(){this.api.set_setting("source_url",this.sourceUrl).then((()=>{this.sourceUrlErrorSaving=!1,this.sourceUrlSuccessSaving=!0})).catch((()=>{this.sourceUrlErrorSaving=!0}))},loadRubygemsUrl:function(){this.api.get_setting("rubygems_url").then((e=>{this.rubygemsUrl=e})).catch((()=>{this.rubygemsUrl="https://rubygems.org"}))},saveRubygemsUrl:function(){this.api.set_setting("rubygems_url",this.rubygemsUrl).then((()=>{this.rubygemsUrlErrorSaving=!1,this.rubygemsUrlSuccessSaving=!0})).catch((()=>{this.rubygemsUrlErrorSaving=!0}))},loadPypiUrl:function(){this.api.get_setting("pypi_url").then((e=>{this.pypiUrl=e})).catch((()=>{this.pypiUrl="https://pypi.org"}))},savePypiUrl:function(){this.api.set_setting("pypi_url",this.pypiUrl).then((()=>{this.pypiUrlErrorSaving=!1,this.pypiUrlSuccessSaving=!0})).catch((()=>{this.pypiUrlErrorSaving=!0}))}}},k=S;var w=(0,g.A)(k,r,n,!1,null,null,null);const U=w.exports},286:(e,t,s)=>{var r=s(4578),n=TypeError;e.exports=function(e,t){if(r(t,e))return e;throw new n("Incorrect invocation")}},7825:(e,t,s)=>{var r=s(6881);e.exports=r([].slice)},9295:(e,t,s)=>{var r=s(7825),n=Math.floor,o=function(e,t){var s=e.length;if(s<8){var a,i,l=1;while(l<s){i=l,a=e[l];while(i&&t(e[i-1],a)>0)e[i]=e[--i];i!==l++&&(e[i]=a)}}else{var c=n(s/2),u=o(r(e,0,c),t),d=o(r(e,c),t),_=u.length,g=d.length,v=0,p=0;while(v<_||p<g)e[v+p]=v<_&&p<g?t(u[v],d[p])<=0?u[v++]:d[p++]:v<_?u[v++]:d[p++]}return e};e.exports=o},997:(e,t,s)=>{var r=s(4530),n=s(4466);e.exports=function(e,t,s){return s.get&&r(s.get,t,{getter:!0}),s.set&&r(s.set,t,{setter:!0}),n.f(e,t,s)}},4320:(e,t,s)=>{var r=s(7509);e.exports=function(e,t,s){for(var n in t)r(e,n,t[n],s);return e}},5821:(e,t,s)=>{var r=s(5691),n=s(4977),o=s(9055),a=r(r.bind);e.exports=function(e,t){return n(e),void 0===t?e:o?a(e,t):function(){return e.apply(t,arguments)}}},5691:(e,t,s)=>{var r=s(8689),n=s(6881);e.exports=function(e){if("Function"===r(e))return n(e)}},9874:(e,t,s)=>{var r=s(5438),n=s(2913),o=s(4318),a=s(9164),i=s(4282),l=i("iterator");e.exports=function(e){if(!o(e))return n(e,l)||n(e,"@@iterator")||a[r(e)]}},2350:(e,t,s)=>{var r=s(9944),n=s(4977),o=s(3770),a=s(3174),i=s(9874),l=TypeError;e.exports=function(e,t){var s=arguments.length<2?i(e):t;if(n(s))return o(r(s,e));throw new l(a(e)+" is not iterable")}},8146:(e,t,s)=>{var r=s(4282),n=s(9164),o=r("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(n.Array===e||a[o]===e)}},473:(e,t,s)=>{var r=s(831),n=s(8689),o=s(4282),a=o("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[a])?!!t:"RegExp"===n(e))}},3113:(e,t,s)=>{var r=s(9944),n=s(4418),o=s(4578),a=s(4932),i=RegExp.prototype;e.exports=function(e){var t=e.flags;return void 0!==t||"flags"in i||n(e,"flags")||!o(i,e)?t:r(a,e)}},8715:(e,t,s)=>{var r=s(5613),n=s(9944),o=s(6881),a=s(9509),i=s(4188),l=s(4318),c=s(473),u=s(2618),d=s(2913),_=s(3113),g=s(1113),v=s(4282),p=s(1942),h=v("replace"),m=TypeError,f=o("".indexOf),x=o("".replace),b=o("".slice),y=Math.max;r({target:"String",proto:!0},{replaceAll:function(e,t){var s,r,o,v,C,S,k,w,U,T=a(this),B=0,E=0,A="";if(!l(e)){if(s=c(e),s&&(r=u(a(_(e))),!~f(r,"g")))throw new m("`.replaceAll` does not allow non-global regexes");if(o=d(e,h),o)return n(o,e,T,t);if(p&&s)return x(u(T),e,t)}v=u(T),C=u(e),S=i(t),S||(t=u(t)),k=C.length,w=y(1,k),B=f(v,C);while(-1!==B)U=S?u(t(C,B,v)):g(C,v,B,[],void 0,t),A+=b(v,E,B)+U,E=B+k,B=B+w>v.length?-1:f(v,C,B+w);return E<v.length&&(A+=b(v,E)),A}})}}]);
2
+ //# sourceMappingURL=383.js.map