openc3-cosmos-tool-cmdsender 6.10.0 → 6.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/tools/cmdsender/{ArrayWidget-DQRQ7dPa-699f8e0c4787f3c994ce.js → ArrayWidget-CR7Wpw3N-71a95f597872813c0689.js} +2 -2
- data/tools/cmdsender/{ArrayplotWidget-BeSfz3MR-db61e4209adad756dce5.js → ArrayplotWidget-DDEd-jRJ-60dc7d3f9dce7dc32e94.js} +1 -1
- data/tools/cmdsender/{BarColumn-BdIaQfOz-8f7671ac0e3f5d6183a3.js → BarColumn-XWs-3Cwb-d909b65d94c4087e290a.js} +1 -1
- data/tools/cmdsender/{BlockWidget-DSFKrUxl-98d9df2c999fcb7584dd.js → BlockWidget-CfFgdNSv-eeb9cb47fe8baddc6d80.js} +2 -2
- data/tools/cmdsender/{ButtonWidget-CFbjdxSr-2c6c2083a5f26780417c.js → ButtonWidget-BaSvtElA-52c726670462e6051815.js} +1 -1
- data/tools/cmdsender/{CanvasWidget-BloYxuKE-4e0c5fd2b6d87d92b837.js → CanvasWidget-DcwDi5Zk-454f46a3bf12cca89a01.js} +1 -1
- data/tools/cmdsender/{CanvasdotWidget-CZxUOPRd-51a546992689b163471c.js → CanvasdotWidget--awMOWyz-f11a187c612a06ca675f.js} +1 -1
- data/tools/cmdsender/{CanvasimageWidget-ULQq3nqZ-7e43b906bb1ef2545d47.js → CanvasimageWidget-YP1pCtvb-67e74a9a09545625295a.js} +1 -1
- data/tools/cmdsender/{CanvasimagevalueWidget-jFCVXYhi-8a4246252346a1369e88.js → CanvasimagevalueWidget-CjVHb2uj-16f9beca7142c39409d4.js} +1 -1
- data/tools/cmdsender/{CanvaslabelWidget-DQhBI1vZ-5f54241892ed0911dfcf.js → CanvaslabelWidget-DoMplTTO-826caa102a9d821822c5.js} +1 -1
- data/tools/cmdsender/{CanvaslabelvalueWidget-C4REgztL-4c1a8dddf0dc7529c72a.js → CanvaslabelvalueWidget-Dyo_ogHn-b5ae46c1dd27b8bb5869.js} +1 -1
- data/tools/cmdsender/{CanvaslineWidget-S4PCEvZM-5dd66fb5b0d7f3529b54.js → CanvaslineWidget-D7W1TIxm-d2160ceb34dd5d27a8b7.js} +1 -1
- data/tools/cmdsender/{CanvaslinevalueWidget-597khOSA-2a7b62f150da68e32563.js → CanvaslinevalueWidget-BOZyJuLE-5544770e2ea8d6411878.js} +1 -1
- data/tools/cmdsender/CheckbuttonWidget-B1E4BC6v-147c8225607eb29a4268.js +1 -0
- data/tools/cmdsender/{ComboboxWidget-BMcHS4g5-da7d763151b53d0f27d6.js → ComboboxWidget-BExUBH57-a5cfa4555c513cce01ce.js} +1 -1
- data/tools/cmdsender/{CommandSender-efbe6a173b982451db6c.js → CommandSender-ae78d399d284d09e53de.js} +2 -2
- data/tools/cmdsender/{CriticalCmdDialog-CVLyYtng-1cd647b8d5fa87b133f5.js → CriticalCmdDialog-BtzhxuZi-e85f2c8438ad68a9d3da.js} +1 -1
- data/tools/cmdsender/DateWidget-_ZmPsi2l-a468791a9f76a20473a9.js +1 -0
- data/tools/cmdsender/{DetailsDialog-q9piPmHq-b4c281690acabe3abe08.js → DetailsDialog-Bq7SS7bc-2f2a56c47870518b9d9b.js} +1 -1
- data/tools/cmdsender/{DynamicWidget-DHL7pbgW-80ec2521c68c876231a8.js → DynamicWidget-DHL7pbgW-f4f3da41c584a22113ac.js} +1 -1
- data/tools/cmdsender/{FormatvalueWidget-Cm-HmAmw-fa63fd1db75285288ff5.js → FormatvalueWidget-4C0vrL2i-7fe64a0baa477015e022.js} +1 -1
- data/tools/cmdsender/{Graph-BEodMaxQ-883ece99d82821dcc0e5.js → Graph-B7KPo9Ul-e6301053fd85752406dd.js} +1 -1
- data/tools/cmdsender/{GraphWidget-CAADBFV--18a98ad5d24c5890118c.js → GraphWidget-BpkPpAbd-04b98a104698323a5873.js} +1 -1
- data/tools/cmdsender/{HorizontalWidget-NcXIXxh7-cc6eddfd6e233f71348d.js → HorizontalWidget-DbEQYjFC-a50fec729ef4e9340dcf.js} +1 -1
- data/tools/cmdsender/HorizontalboxWidget-CTomf_Iy-1d471e3900d9a6cd1b02.js +1 -0
- data/tools/cmdsender/HorizontallineWidget-B7xx7ofY-3fd37611b469d01e71fb.js +1 -0
- data/tools/cmdsender/{IframeWidget-BBU3MkSq-2cb5fcddc13fa06e3647.js → IframeWidget-DK7rbULe-914abf8b75fc53bb6199.js} +1 -1
- data/tools/cmdsender/{ImageLoader-XAGgjKkq-78de9948cab2055db528.js → ImageLoader-C9rN_pSY-aab91c4c960a0c6fe802.js} +1 -1
- data/tools/cmdsender/{ImageviewerWidget-UByjeO63-1bce2491dc5e00aeaf8d.js → ImageviewerWidget-6d6Kl3W_-7fe22405aee7badbe13a.js} +1 -1
- data/tools/cmdsender/{LabelWidget-BsOpolUL-e611f08e3ef028a4e187.js → LabelWidget-D71FfOSw-bf40c4e4519e7dd5d642.js} +1 -1
- data/tools/cmdsender/LabelledWidget-D2ir5kVU-781c311f64a4cf3750f4.js +1 -0
- data/tools/cmdsender/LabelprogressbarWidget-C4_YbROz-f8d4937ecb5f2287d497.js +1 -0
- data/tools/cmdsender/LabelsparklineWidget-CdZ_pM2B-ad855f58951392165075.js +1 -0
- data/tools/cmdsender/{LabelvalueWidget-Dwqsh5o2-e633d3d82f8ebae4ed48.js → LabelvalueWidget-BS0EPY5h-2d5313c4dab2621aaaf5.js} +1 -1
- data/tools/cmdsender/{LabelvaluedescWidget-Cfu2vuja-8941baffebfc634b1e23.js → LabelvaluedescWidget-Cpr8_Voq-ed253eb6b74c5abc2bf6.js} +1 -1
- data/tools/cmdsender/{LabelvaluelimitsbarWidget-DYV68AJ_-f01ee674935744b2bc8a.js → LabelvaluelimitsbarWidget-DTcYbEQS-d7cbe3d4759ebd1100f5.js} +1 -1
- data/tools/cmdsender/LabelvaluelimitscolumnWidget-D0ltQ9Ta-71f43c06c109311dabe6.js +1 -0
- data/tools/cmdsender/{LabelvaluerangebarWidget-3EaUB6E6-201414f16d5868989c4d.js → LabelvaluerangebarWidget-O8IHjvHs-700c8d99ed1d5650a08f.js} +1 -1
- data/tools/cmdsender/Layout-DW5yNlp7-b9370d997159e91c5fbd.js +1 -0
- data/tools/cmdsender/{LedWidget-Gi6GXtrW-4105eb96888212ff6a48.js → LedWidget-DUvJ2v8k-ecc7eede155f68e1bb04.js} +1 -1
- data/tools/cmdsender/{LimitsbarWidget-BTZQY9XQ-a0181123f0db2fdd5f33.js → LimitsbarWidget-BehZv0-k-bbe5724ca4aed6302ec5.js} +1 -1
- data/tools/cmdsender/{LimitscolorWidget-CFnmvlrA-32edd2dd5f19963059b8.js → LimitscolorWidget-FXT0ZPPH-7da3e72eab516c717309.js} +1 -1
- data/tools/cmdsender/{LimitscolumnWidget-DSsz36tT-f103d23b66a7fa252c45.js → LimitscolumnWidget-CjBy-CCI-a7bed9f44f6a7249951c.js} +1 -1
- data/tools/cmdsender/{LinegraphWidget-CeBijgDo-b9ab00028aae73e40f22.js → LinegraphWidget-lmu_tFKd-3290be9bc55bb94e9d17.js} +1 -1
- data/tools/cmdsender/{MatrixbycolumnsWidget-DX9uhjAv-8fd69b6bab40478f0e16.js → MatrixbycolumnsWidget-CCF7rCkV-cb889302166b40829a67.js} +1 -1
- data/tools/cmdsender/{ProgressbarWidget-DJepvOip-24d343822053d1ab2b5a.js → ProgressbarWidget-B5WN658S-249a46f31100527434be.js} +1 -1
- data/tools/cmdsender/RadiobuttonWidget-B_3nys46-d3364a3fcc2f7a148401.js +1 -0
- data/tools/cmdsender/{RadiogroupWidget-CUucj6aT-6c53e9a6c8155e83f947.js → RadiogroupWidget-BiMIL9li-7e07c8e34e6f9295ca45.js} +1 -1
- data/tools/cmdsender/{RangebarWidget-Bu4rqlrx-4a71694e157ebada281a.js → RangebarWidget-Dn0GASdi-e17e8bfcf95082ee845b.js} +1 -1
- data/tools/cmdsender/{RollupWidget-ByLvEEau-c0a3d0a26f191d5e213f.js → RollupWidget-b62qcG5K-d7cbed5b1f4a7f1e018c.js} +1 -1
- data/tools/cmdsender/ScrollwindowWidget-Dn29gs-U-53012fa605021d8902a4.js +1 -0
- data/tools/cmdsender/{SignalWidget-qvL2YZJA-7739b490a969610639ea.js → SignalWidget-CLi6qask-e635cfb48e4513cdb0df.js} +1 -1
- data/tools/cmdsender/SpacerWidget-BCA3gdap-debb8e03392295fabf8d.js +1 -0
- data/tools/cmdsender/SparklineWidget-D8mb4zLt-753c16610c9ba62dcb90.js +1 -0
- data/tools/cmdsender/TabbookWidget-Bkt4g02d-ecb43b5ab76ff6bb7cad.js +1 -0
- data/tools/cmdsender/{TargetPacketItemChooser-oSQHf8Ht-7192d1612f8fe086bbf5.js → TargetPacketItemChooser-DGcXvdTX-9a84d1e22c0160d2883d.js} +1 -1
- data/tools/cmdsender/{TextboxWidget-DbwpPVGB-2a1be2fa122a6cb9683c.js → TextboxWidget-CR05wO-t-ef1f0e470b5e7399a5ed.js} +1 -1
- data/tools/cmdsender/{TextfieldWidget-DzMlTMYW-41bb3a56bbe69cefaf08.js → TextfieldWidget-Be_Pz2bF-182bedc553b8c8aa4f36.js} +1 -1
- data/tools/cmdsender/{TimeWidget-BHybAfg8-3790dfeb548ead5664c5.js → TimeWidget-Dy8zpkC6-98743605432d1bd006cd.js} +1 -1
- data/tools/cmdsender/TitleWidget-BcmxUDzM-8aff813a3961edb4d8f3.js +1 -0
- data/tools/cmdsender/{VWidget-D06LY-Yc-d698fc3b05f0c1732417.js → VWidget-CBmUpKSV-6b02d3a0f3f075876f51.js} +1 -1
- data/tools/cmdsender/{ValueWidget-CGT0LV_n-3387717dc96486fb634e.js → ValueWidget-BxWrHkYY-2d182c526ed107038c7f.js} +1 -1
- data/tools/cmdsender/ValuelimitsbarWidget-BdY02gqc-59bfb7f336290b921d20.js +1 -0
- data/tools/cmdsender/{ValuelimitscolumnWidget-jzxrQd-f-f26ba548786f9860fd27.js → ValuelimitscolumnWidget-CuJ6rqtC-cfd0a241361cea816049.js} +1 -1
- data/tools/cmdsender/{ValuerangebarWidget-C8ckuAeh-5fc05ae966ab0f0d0e02.js → ValuerangebarWidget-C5rolGDi-e470e629832218db384e.js} +1 -1
- data/tools/cmdsender/VerticalWidget-DsnEzKZ2-7e039b4c1a831fa02793.js +1 -0
- data/tools/cmdsender/VerticalboxWidget-CzDgveBl-cf3682d1a15e64e4c0e5.js +1 -0
- data/tools/cmdsender/{Widget-DXvVFSH5-ae2d2ee57773da92942f.js → Widget-VCl8Ts8s-42e238022b560bd33b86.js} +1 -1
- data/tools/cmdsender/{main-3c23de0ae474ebedfc99.js → main-db7a4880a68f839e9da9.js} +34 -34
- data/tools/cmdsender/main.js +1 -1
- metadata +70 -70
- data/tools/cmdsender/CheckbuttonWidget-BcblKat3-4d10123493287cc9cf7b.js +0 -1
- data/tools/cmdsender/DateWidget-BpnMzSBn-cc909167ce73916cfb5b.js +0 -1
- data/tools/cmdsender/HorizontalboxWidget-CW9XX4uH-78c136a91c395eb8b8a6.js +0 -1
- data/tools/cmdsender/HorizontallineWidget-Cu2dDt7k-26eb3c3d93e54011d641.js +0 -1
- data/tools/cmdsender/LabelledWidget-DVOGpgZ--e8f453f67719bf74923f.js +0 -1
- data/tools/cmdsender/LabelprogressbarWidget-BeE9fDs6-bf6b5645e3e61e4f37c3.js +0 -1
- data/tools/cmdsender/LabelsparklineWidget-Bj7trKML-8a16bc2f645d5e57f3b1.js +0 -1
- data/tools/cmdsender/LabelvaluelimitscolumnWidget-CtaoTixt-9481ec06797add7dd693.js +0 -1
- data/tools/cmdsender/Layout-DNR3xnku-5db77e3d5c52c35294d3.js +0 -1
- data/tools/cmdsender/RadiobuttonWidget-4e8ROIfg-975ee6c8b9a55e3b1028.js +0 -1
- data/tools/cmdsender/ScrollwindowWidget-CXJ9QGN1-95e9947940194c98c955.js +0 -1
- data/tools/cmdsender/SpacerWidget-CaWx41K7-29b6be6cc322bd4e3aa4.js +0 -1
- data/tools/cmdsender/SparklineWidget-BkNSRypJ-9c1d94241ae70e6c9846.js +0 -1
- data/tools/cmdsender/TabbookWidget-MsrRG1vn-4d269ac5face5e5bd1f9.js +0 -1
- data/tools/cmdsender/TitleWidget-DL_sE5YE-34f4ce9102e950fdf255.js +0 -1
- data/tools/cmdsender/ValuelimitsbarWidget-CmpyPO-1-da29e726ed36f828eb62.js +0 -1
- data/tools/cmdsender/VerticalWidget-qN82km_m-f95f90cb500d8c09d160.js +0 -1
- data/tools/cmdsender/VerticalboxWidget-CiJZDlHJ-10099596bd15bd20c582.js +0 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: be9ccc3fdf1c4eba8f714465ed42dc7be69cffc90de9e75ee8865de8489ea807
|
|
4
|
+
data.tar.gz: 69b2128918070c7d7684aa9117a3a06c3cb79baf67ceeb6a1feb07851f11161e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5e8bc856208233c62cdfde3cc4e01804847a53441346fee5b6f5534d52ab5250bd3b8d66e0c3c7c9b52580d66e1a0ae36a2cafd9dcee4577b17242f1104cd5fb
|
|
7
|
+
data.tar.gz: 923bf56a9a3cd7d7e4cd1f5341f4c32485520f616c23301a1024fff5c228825df0b6497fea3468c10dc6ff96ea7c49423575b4393b53416e971100565908afb9
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./main-
|
|
2
|
-
`,o=0;if(Array.isArray(e)){for(const m of e)this.formatter&&((r=this.formatter)==null?void 0:r.toLowerCase())!=="nil"?
|
|
1
|
+
System.register(["./main-db7a4880a68f839e9da9.js","vue","./DetailsDialog-Bq7SS7bc-2f2a56c47870518b9d9b.js","single-spa","./VWidget-CBmUpKSV-6b02d3a0f3f075876f51.js","vue-router","vuex","vuetify","./Widget-VCl8Ts8s-42e238022b560bd33b86.js"],function(B,E){"use strict";var h,a,c,u,i,d,p,l,g,f,v,w,y,x,C,V;return{setters:[t=>{h=t.d},t=>{a=t.resolveComponent,c=t.createElementBlock,u=t.openBlock,i=t.createVNode,d=t.normalizeStyle,p=t.normalizeClass,l=t.withCtx,g=t.Fragment,f=t.renderList,v=t.createBlock,w=t.withModifiers,y=t.createTextVNode,x=t.toDisplayString},t=>{C=t.P},null,t=>{V=t.h},null,null,null,null],execute:function(){const t={components:{DetailsDialog:C},data:function(){return{width:200,height:100,itemsPerRow:4,formatter:null}},mixins:[V],computed:{aging(){return{"--aging":this.grayLevel}}},created:function(){this.width=this.setWidth(this.parameters[3],"px",this.width),this.height=this.setHeight(this.parameters[4],"px",this.height),this.parameters[5]&&(this.formatter=this.parameters[5]),this.parameters[6]&&(this.itemsPerRow=parseInt(this.parameters[6]))},methods:{getType:function(){let e="CONVERTED";return this.parameters[7]&&(e=this.parameters[7]),e},formatValue:function(e){var r;let s="",k=" ",S=`
|
|
2
|
+
`,o=0;if(Array.isArray(e)){for(const m of e)this.formatter&&((r=this.formatter)==null?void 0:r.toLowerCase())!=="nil"?s+=sprintf(this.formatter,m):s+=m,o+=1,o%this.itemsPerRow===0?(o=0,s+=S):s+=k;return s.trim()}else return e}}},D={class:"array-widget-container"};function _(e,r,s,k,S,o){const m=a("v-textarea"),z=a("v-list-item-title"),M=a("v-list-item"),N=a("v-list"),P=a("v-menu"),T=a("details-dialog");return u(),c("div",D,[i(m,{variant:"solo",density:"compact",readonly:"","no-resize":"","auto-grow":"",rows:"2","hide-details":"","model-value":e._value,class:p(e.valueClass),style:d([e.computedStyle,o.aging]),"data-test":"array-widget",onContextmenu:e.showContextMenu},null,8,["model-value","class","style","onContextmenu"]),i(P,{modelValue:e.contextMenuShown,"onUpdate:modelValue":r[0]||(r[0]=n=>e.contextMenuShown=n),target:[e.x,e.y]},{default:l(()=>[i(N,null,{default:l(()=>[(u(!0),c(g,null,f(e.contextMenuOptions,(n,j)=>(u(),v(M,{key:j,onClick:w(n.action,["stop"])},{default:l(()=>[i(z,null,{default:l(()=>[y(x(n.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),i(T,{"target-name":e.parameters[0],"packet-name":e.parameters[1],"item-name":e.parameters[2],modelValue:e.viewDetails,"onUpdate:modelValue":r[1]||(r[1]=n=>e.viewDetails=n)},null,8,["target-name","packet-name","item-name","modelValue"])])}const L=B("default",h(t,[["render",_],["__scopeId","data-v-62b9e9e1"]]))}}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./main-
|
|
1
|
+
System.register(["./main-db7a4880a68f839e9da9.js","./GraphWidget-BpkPpAbd-04b98a104698323a5873.js","vue","vue-router","single-spa","vuex","vuetify","./Widget-VCl8Ts8s-42e238022b560bd33b86.js"],function(m,k){"use strict";var c,l,d,h,u,p;return{setters:[s=>{c=s.d,l=s.f,d=s.P},s=>{h=s.M},s=>{u=s.createElementBlock,p=s.openBlock},null,null,null,null,null],execute:function(){const s={mixins:[h],data:function(){return{items:[],indexes:{},data:[[]],cable:new d,subscription:null,graph:null,xAxis:null,title:"Array Plot",colorIndex:0,colors:["#00c7cb","#938bdb","#4dacff","lime","darkorange","red","gold","hotpink","tan","cyan","maroon","blue","teal","purple","green","brown","lightblue","white","black"]}},computed:{dataOnly(){return this.data[1]}},watch:{dataOnly:function(){this.graph&&this.graph.setData(this.data)}},created(){for(const[e,t]of this.items.entries())this.data.push([]),this.indexes[this.subscriptionKey(t)]=e+1,t.color=this.colors[this.colorIndex],this.colorIndex++;this.appliedSettings.forEach(e=>{switch(e[0]){case"TITLE":this.title=e[1];break;case"X_AXIS":this.xAxis={start:parseFloat(e[1]),step:parseFloat(e[2])};break}})},mounted(){let e=[];this.items.forEach(n=>{e.push({label:this.itemName(n),stroke:n.color,width:2,value:(r,i)=>typeof i=="string"||isNaN(i)?"NaN":i==null?"--":i.toFixed(3)})});let t={title:this.title,width:this.size.width,height:this.size.height,scales:{x:{time:!1},y:{time:!1,range:(n,r,i)=>[r,i]}},axes:[{stroke:"white",grid:{show:!0,stroke:"rgba(255, 255, 255, .1)",width:2}},{stroke:"white",grid:{show:!0,stroke:"rgba(255, 255, 255, .1)",width:2}}],series:[{label:"X Value"},...e]};this.graph=new l(t,this.data,document.getElementById(`chart${this.id}`)),this.subscribe()},beforeUnmount:function(){this.cable.disconnect()},methods:{subscribe:function(){this.cable.createSubscription("StreamingChannel",window.openc3Scope,{received:e=>this.received(e),connected:()=>{this.addItemsToSubscription(this.items)},disconnected:e=>{e.allowReconnect&&this.errors.push({type:"disconnected",message:"OpenC3 backend connection disconnected",time:new Date().getTime()})},rejected:()=>{this.errors.push({type:"rejected",message:"OpenC3 backend connection rejected",time:new Date().getTime()})}}).then(e=>{this.subscription=e})},received:function(e){for(let t of e){let n=[];for(const[r,i]of Object.entries(t)){r==="__time"&&(this.xAxis?n=Array.from({length:this.data[1].length},(f,o)=>this.xAxis.start+o*this.xAxis.step):n.length===0&&(n=Array.from({length:this.data[1].length},(f,o)=>o)),this.data[0]=n);let a=this.indexes[r];a&&(Array.isArray(i[0])?(this.data[a]=i[1],n=i[0]):this.data[a]=i)}}},addItemsToSubscription:function(e=this.items){this.subscription&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(t=>{t&&OpenC3Auth.setTokens(),this.subscription.perform("add",{scope:window.openc3Scope,token:localStorage.openc3Token,items:e.map(this.subscriptionKey),start_time:null,end_time:null})})},itemName:function(e){return`${e.targetName} ${e.packetName} ${e.itemName}`},subscriptionKey:function(e){let t=`${e.reduced}__TLM__${e.targetName}__${e.packetName}__${e.itemName}__${e.valueType}`;return(e.reduced==="REDUCED_MINUTE"||e.reduced==="REDUCED_HOUR"||e.reduced==="REDUCED_DAY")&&(t+=`__${e.reducedType}`),t}}},b=["id"];function g(e,t,n,r,i,a){return p(),u("div",{id:`chart${e.id}`,class:"pa-1"},null,8,b)}const w=m("default",c(s,[["render",g]]))}}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./Widget-
|
|
1
|
+
System.register(["./Widget-VCl8Ts8s-42e238022b560bd33b86.js","./main-db7a4880a68f839e9da9.js"],function(a,n){"use strict";var h,l;return{setters:[s=>{h=s.o},s=>{l=s.B}],execute:function(){const s=a("l",{mixins:[h],data(){return{minValue:null,maxValue:null,redLow:0,yellowLow:0,greenLow:0,greenHigh:0,yellowHigh:0,redHigh:0,blue:0,api:null,limitsSettings:{DEFAULT:[]},currentLimitsSet:"DEFAULT",currentSetRefreshInterval:null}},computed:{cssProps:function(){let t=this.screenValues[this.valueId][0],i=this.modifyLimits(this.limitsSettings[this.selectedLimitsSet]);return this.calcLimits(i),{"--height":this.height+"px","--width":this.width+"px","--container-height":this.height-5+"px","--position":this.calcPosition(t,i)+"%","--redlow-width":this.redLow+"%","--redhigh-width":this.redHigh+"%","--yellowlow-width":this.yellowLow+"%","--yellowhigh-width":this.yellowHigh+"%","--greenlow-width":this.greenLow+"%","--greenhigh-width":this.greenHigh+"%","--blue-width":this.blue+"%"}},selectedLimitsSet:function(){return this.limitsSettings.hasOwnProperty(this.currentLimitsSet)?this.currentLimitsSet:"DEFAULT"}},created(){this.api=new l,this.api.get_limits(this.parameters[0],this.parameters[1],this.parameters[2]).then(t=>{this.limitsSettings=t}),this.getCurrentLimitsSet(),this.currentSetRefreshInterval=setInterval(this.getCurrentLimitsSet,6e4),this.appliedSettings.forEach(t=>{t[0]==="MIN_VALUE"&&(this.minValue=parseInt(t[1])),t[0]==="MAX_VALUE"&&(this.maxValue=parseInt(t[1]))}),this.width=this.setWidth(this.parameters[4],"px",this.width),this.height=this.setHeight(this.parameters[5],"px",this.height),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__CONVERTED`,this.$emit("addItem",this.valueId)},destroyed(){this.$emit("deleteItem",this.valueId),clearInterval(this.currentSetRefreshInterval)},methods:{modifyLimits(t){if(!t)return;this.redLow=10,this.redHigh=10,this.minValue!==null&&(t[0]<=this.minValue&&(t[0]=this.minValue,this.redLow=0),t[1]<=this.minValue&&(t[1]=this.minValue),t[2]<=this.minValue&&(t[2]=this.minValue),t[3]<=this.minValue&&(t[3]=this.minValue),t.length>4&&t[4]<=this.minValue&&(t[4]=this.minValue),t.length>4&&t[5]<=this.minValue&&(t[5]=this.minValue)),this.maxValue!==null&&(t[0]>=this.maxValue&&(t[0]=this.maxValue),t[1]>=this.maxValue&&(t[1]=this.maxValue),t[2]>=this.maxValue&&(t[2]=this.maxValue),t[3]>=this.maxValue&&(t[3]=this.maxValue,this.redHigh=0),t.length>4&&t[4]>=this.maxValue&&(t[4]=this.maxValue),t.length>4&&t[5]>=this.maxValue&&(t[5]=this.maxValue)),t[0]==t[1]&&(this.yellowLow=0),t[2]==t[3]&&(this.yellowHigh=0);let i=80;return this.redLow==0&&(i+=10),this.redHigh==0&&(i+=10),this.scale=(t[3]-t[0])/i,t},calcPosition(t,i){if(!t||!i)return;let r=i[0]-10*this.scale;if(this.minValue&&this.minValue==i[0]&&(r=i[0]),i[3]-10*this.scale,this.maxValue&&this.maxValue==i[3]&&i[3],t.raw)return t.raw==="-Infinity"?0:100;if(t<this.min)return 0;if(t>this.max)return 100;{const e=parseInt((t-r)/this.scale);return e>100?100:e<0?0:e}},calcLimits(t){t&&(this.yellowLow=Math.round((t[1]-t[0])/this.scale),this.yellowHigh=Math.round((t[3]-t[2])/this.scale),t.length>4?(this.greenLow=Math.round((t[4]-t[1])/this.scale),this.greenHigh=Math.round((t[2]-t[5])/this.scale),this.blue=Math.round(100-this.redLow-this.yellowLow-this.greenLow-this.greenHigh-this.yellowHigh-this.redHigh)):(this.greenLow=Math.round(100-this.redLow-this.yellowLow-this.yellowHigh-this.redHigh),this.greenHigh=0,this.blue=0))},getCurrentLimitsSet:function(){this.api.get_limits_set().then(t=>{this.currentLimitsSet=t})}}})}}});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./main-
|
|
2
|
-
`,i=0,l=0;const d=this.bytesPerWord*this.wordsPerRow;for(const c of t.raw)this.addrFormat&&i===0&&(r+=sprintf(this.addrFormat,l),l+=d),r+=sprintf(this.formatter,c),i+=1,i%d===0?(i=0,r+=P):i%this.bytesPerWord===0&&(r+=
|
|
1
|
+
System.register(["./main-db7a4880a68f839e9da9.js","vue","./DetailsDialog-Bq7SS7bc-2f2a56c47870518b9d9b.js","single-spa","./VWidget-CBmUpKSV-6b02d3a0f3f075876f51.js","vue-router","vuex","vuetify","./Widget-VCl8Ts8s-42e238022b560bd33b86.js"],function(B,N){"use strict";var u,a,m,h,s,p,g,o,w,f,v,y,x,C,V,k;return{setters:[e=>{u=e.d},e=>{a=e.resolveComponent,m=e.createElementBlock,h=e.openBlock,s=e.createVNode,p=e.normalizeStyle,g=e.normalizeClass,o=e.withCtx,w=e.Fragment,f=e.renderList,v=e.createBlock,y=e.withModifiers,x=e.createTextVNode,C=e.toDisplayString},e=>{V=e.P},null,e=>{k=e.h},null,null,null,null],execute:function(){const e={components:{DetailsDialog:V},data:function(){return{width:400,height:400,bytesPerWord:4,wordsPerRow:4,addrFormat:null,formatter:"%02X"}},mixins:[k],computed:{aging(){return{"--aging":this.grayLevel}},rows:function(){return(this.height-16)/24}},created:function(){this.width=this.setWidth(this.parameters[3],"px",this.width),this.height=this.setHeight(this.parameters[4],"px",this.height),this.parameters[5]&&(this.formatter=this.parameters[5]),this.parameters[6]&&(this.bytesPerWord=parseInt(this.parameters[6])),this.parameters[7]&&(this.wordsPerRow=parseInt(this.parameters[7])),this.parameters[8]&&(this.addrFormat=this.parameters[8])},methods:{getType:function(){let t="RAW";return this.parameters[9]&&(t=this.parameters[9]),t},formatValue:function(t){let r="";if(t&&t.raw){let S=" ",P=`
|
|
2
|
+
`,i=0,l=0;const d=this.bytesPerWord*this.wordsPerRow;for(const c of t.raw)this.addrFormat&&i===0&&(r+=sprintf(this.addrFormat,l),l+=d),r+=sprintf(this.formatter,c),i+=1,i%d===0?(i=0,r+=P):i%this.bytesPerWord===0&&(r+=S)}else r=t;return r}}},D={class:"block-widget-container"};function W(t,r,S,P,i,l){const d=a("v-textarea"),c=a("v-list-item-title"),M=a("v-list-item"),_=a("v-list"),b=a("v-menu"),F=a("details-dialog");return h(),m("div",D,[s(d,{variant:"solo",density:"compact",readonly:"","no-resize":"","hide-details":"",rows:l.rows,width:t.width,"model-value":t._value,class:g(t.valueClass),style:p([t.computedStyle,l.aging]),"data-test":"valueText",onContextmenu:t.showContextMenu},null,8,["rows","width","model-value","class","style","onContextmenu"]),s(b,{modelValue:t.contextMenuShown,"onUpdate:modelValue":r[0]||(r[0]=n=>t.contextMenuShown=n),target:[t.x,t.y]},{default:o(()=>[s(_,null,{default:o(()=>[(h(!0),m(w,null,f(t.contextMenuOptions,(n,z)=>(h(),v(M,{key:z,onClick:y(n.action,["stop"])},{default:o(()=>[s(c,null,{default:o(()=>[x(C(n.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),s(F,{"target-name":t.parameters[0],"packet-name":t.parameters[1],"item-name":t.parameters[2],modelValue:t.viewDetails,"onUpdate:modelValue":r[1]||(r[1]=n=>t.viewDetails=n)},null,8,["target-name","packet-name","item-name","modelValue"])])}const R=B("default",u(e,[["render",W],["__scopeId","data-v-4d4589c2"]]))}}});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./main-
|
|
1
|
+
System.register(["./main-db7a4880a68f839e9da9.js","vue","./CriticalCmdDialog-BtzhxuZi-e85f2c8438ad68a9d3da.js","single-spa","./Widget-VCl8Ts8s-42e238022b560bd33b86.js","vue-router","vuex","vuetify"],function(exports,module){"use strict";var d,FA,BA,resolveComponent,createElementBlock,openBlock,createVNode,normalizeStyle,withCtx,createTextVNode,toDisplayString,createElementVNode,N,o;return{setters:[e=>{d=e.d,FA=e.F,BA=e.B},e=>{resolveComponent=e.resolveComponent,createElementBlock=e.createElementBlock,openBlock=e.openBlock,createVNode=e.createVNode,normalizeStyle=e.normalizeStyle,withCtx=e.withCtx,createTextVNode=e.createTextVNode,toDisplayString=e.toDisplayString,createElementVNode=e.createElementVNode},e=>{N=e.N},null,e=>{o=e.o},null,null,null],execute:function(){const _sfc_main={mixins:[o],components:{CriticalCmdDialog:N},data(){return{api:null,displaySendHazardous:!1,lastCmd:"",criticalCmdUuid:null,criticalCmdString:null,criticalCmdUser:null,displayCriticalCmd:!1}},computed:{buttonText(){return this.parameters[0]},eval(){return this.parameters[1]}},created(){this.api=new BA},methods:{async onClick(){const lines=this.eval.split(";;"),self=this,screen=this.screen,screenValues=this.screenValues,screenTimeZone=this.screenTimeZone,api=this.api,runScript=this.runScript;(self||screen||screenValues||screenTimeZone||api||runScript)&&this.$nextTick(()=>{});for(let i=0;i<lines.length;i++)try{const result=eval(lines[i].trim());result instanceof Promise&&await result}catch(e){if(e.message.includes("CriticalCmdError"))this.criticalCmdUuid=e.object.data.instance_variables["@uuid"],this.criticalCmdString=e.object.data.instance_variables["@cmd_string"],this.criticalCmdUser=e.object.data.instance_variables["@username"],this.displayCriticalCmd=!0;else if(e.message.includes("is Hazardous"))for(this.lastCmd=e.message.split(`
|
|
2
2
|
`).pop(),this.displaySendHazardous=!0;this.displaySendHazardous;)await new Promise(t=>setTimeout(t,500));else console.error(e)}},async sendHazardousCmd(){this.lastCmd=this.lastCmd.replace("cmd(","this.api.cmd_no_hazardous_check(");try{const result=eval(this.lastCmd);result instanceof Promise&&await result}catch(e){e.message.includes("CriticalCmdError")&&(this.criticalCmdUuid=e.object.data.instance_variables["@uuid"],this.criticalCmdString=e.object.data.instance_variables["@cmd_string"],this.criticalCmdUser=e.object.data.instance_variables["@username"],this.displayCriticalCmd=!0)}this.displaySendHazardous=!1},cancelHazardousCmd(){this.displaySendHazardous=!1},runScript(e,t=!0,s={}){let l=[];for(const a in s)l.push({key:a,value:s[a],readonly:!1});FA.post(`/script-api/scripts/${e}/run`,{data:{environment:l}}).then(a=>{t&&window.open(`/tools/scriptrunner/${a.data}`,"_blank")})}}},_hoisted_1={class:"mx-1"};function _sfc_render(e,t,s,l,a,r){const n=resolveComponent("v-btn"),m=resolveComponent("v-card-title"),u=resolveComponent("v-row"),C=resolveComponent("v-spacer"),p=resolveComponent("v-card-text"),h=resolveComponent("v-card"),v=resolveComponent("v-dialog"),V=resolveComponent("critical-cmd-dialog");return openBlock(),createElementBlock("div",null,[createVNode(n,{class:"ma-1",color:"primary",style:normalizeStyle(e.computedStyle),onClick:r.onClick},{default:withCtx(()=>[createTextVNode(toDisplayString(r.buttonText),1)]),_:1},8,["style","onClick"]),createVNode(v,{modelValue:a.displaySendHazardous,"onUpdate:modelValue":t[0]||(t[0]=c=>a.displaySendHazardous=c),"max-width":"300"},{default:withCtx(()=>[createVNode(h,null,{default:withCtx(()=>[createVNode(m,null,{default:withCtx(()=>[...t[2]||(t[2]=[createTextVNode("Hazardous",-1)])]),_:1}),createVNode(p,null,{default:withCtx(()=>[createElementVNode("div",_hoisted_1,[createVNode(u,{class:"my-2"},{default:withCtx(()=>[...t[3]||(t[3]=[createElementVNode("span",null," Warning: Command is Hazardous. Send? ",-1)])]),_:1}),createVNode(u,null,{default:withCtx(()=>[createVNode(C),createVNode(n,{onClick:r.cancelHazardousCmd,variant:"outlined"},{default:withCtx(()=>[...t[4]||(t[4]=[createTextVNode(" Cancel ",-1)])]),_:1},8,["onClick"]),createVNode(n,{onClick:r.sendHazardousCmd,class:"bg-primary mx-1"},{default:withCtx(()=>[...t[5]||(t[5]=[createTextVNode(" Send ",-1)])]),_:1},8,["onClick"])]),_:1})])]),_:1})]),_:1})]),_:1},8,["modelValue"]),createVNode(V,{uuid:a.criticalCmdUuid,cmdString:a.criticalCmdString,cmdUser:a.criticalCmdUser,modelValue:a.displayCriticalCmd,"onUpdate:modelValue":t[1]||(t[1]=c=>a.displayCriticalCmd=c)},null,8,["uuid","cmdString","cmdUser","modelValue"])])}const ButtonWidget=exports("default",d(_sfc_main,[["render",_sfc_render]]))}}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./Layout-
|
|
1
|
+
System.register(["./Layout-DW5yNlp7-b9370d997159e91c5fbd.js","vue","./main-db7a4880a68f839e9da9.js","./Widget-VCl8Ts8s-42e238022b560bd33b86.js","vue-router","single-spa","vuex","vuetify"],function(p,f){"use strict";var i,s,n,a,l,c,u,o,g;return{setters:[e=>{i=e.r},e=>{s=e.createElementBlock,n=e.openBlock,a=e.Fragment,l=e.renderList,c=e.createBlock,u=e.resolveDynamicComponent,o=e.mergeProps},e=>{g=e.d},null,null,null,null,null],execute:function(){const e={mixins:[i],computed:{width(){return this.parameters[0]+"px"},height(){return this.parameters[1]+"px"}}},d=["width","height"];function h(r,y,k,B,b,m){return n(),s("svg",{id:"canvas",width:m.width,height:m.height},[(n(!0),s(a,null,l(r.widgets,(t,v)=>(n(),c(u(t.type),o({ref_for:!0},r.listeners,{key:v,target:t.target,parameters:t.parameters,settings:t.settings,"screen-values":r.screenValues,"screen-time-zone":r.screenTimeZone,widgets:t.widgets,name:t.name,line:t.line,"line-number":t.lineNumber}),null,16,["target","parameters","settings","screen-values","screen-time-zone","widgets","name","line","line-number"]))),128))],8,d)}const w=p("default",g(e,[["render",h],["__scopeId","data-v-47bdfc3c"]]))}}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./Widget-
|
|
1
|
+
System.register(["./Widget-VCl8Ts8s-42e238022b560bd33b86.js","vue","./main-db7a4880a68f839e9da9.js","vue-router","single-spa","vuex","vuetify"],function(s,a){"use strict";var t,l,n,c;return{setters:[e=>{t=e.o},e=>{l=e.createElementBlock,n=e.openBlock},e=>{c=e.d},null,null,null,null],execute:function(){const e={mixins:[t]},u=["cx","cy","r","fill"];function i(r,m,f,p,d,v){return n(),l("circle",{cx:r.parameters[0],cy:r.parameters[1],r:r.parameters[3],fill:r.parameters[2]},null,8,u)}const o=s("default",c(e,[["render",i]]))}}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./Widget-
|
|
1
|
+
System.register(["./Widget-VCl8Ts8s-42e238022b560bd33b86.js","./ImageLoader-C9rN_pSY-aab91c4c960a0c6fe802.js","vue","./main-db7a4880a68f839e9da9.js","vue-router","single-spa","vuex","vuetify"],function(m,d){"use strict";var s,i,n,a,l,c,h;return{setters:[e=>{s=e.o},e=>{i=e.s},e=>{n=e.createElementBlock,a=e.createCommentVNode,l=e.openBlock,c=e.normalizeStyle},e=>{h=e.d},null,null,null,null],execute:function(){const e={mixins:[s,i],data:function(){return{imageUrl:null,screenTarget:null,screenName:null}},computed:{width:function(){return this.parameters[3]?`${this.parameters[3]}px`:"100%"},height:function(){return this.parameters[4]?`${this.parameters[4]}px`:"100%"},pointerStyle(){return this.screenTarget&&this.screenName?{cursor:"pointer"}:{cursor:"default"}}},created:function(){this.appliedSettings.forEach(t=>{t[0]==="SCREEN"&&(this.screenTarget=t[1],this.screenName=t[2])}),this.parameters[0].startsWith("http")?this.imageUrl=this.parameters[0]:this.getPresignedUrl(this.parameters[0]).then(t=>{this.imageUrl=t})},methods:{clickHandler(){this.screenTarget&&this.screenName&&this.$emit("open",this.screenTarget,this.screenName)}}},u=["href","x","y","width","height"];function p(t,o,y,k,N,r){return t.imageUrl?(l(),n("image",{key:0,href:t.imageUrl,x:t.parameters[1],y:t.parameters[2],width:r.width,height:r.height,style:c(r.pointerStyle),onClick:o[0]||(o[0]=(...g)=>r.clickHandler&&r.clickHandler(...g))},null,12,u)):a("",!0)}const f=m("default",h(e,[["render",p]]))}}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./Widget-
|
|
1
|
+
System.register(["./Widget-VCl8Ts8s-42e238022b560bd33b86.js","./ImageLoader-C9rN_pSY-aab91c4c960a0c6fe802.js","vue","./main-db7a4880a68f839e9da9.js","vue-router","single-spa","vuex","vuetify"],function(v,S){"use strict";var m,d,l,n,h,g,o,p,u,c,f;return{setters:[t=>{m=t.o},t=>{d=t.s},t=>{l=t.createElementBlock,n=t.openBlock,h=t.withDirectives,g=t.createCommentVNode,o=t.Fragment,p=t.renderList,u=t.normalizeStyle,c=t.vShow},t=>{f=t.d},null,null,null,null],execute:function(){const t={mixins:[m,d],data:function(){return{images:[],defaultImage:null,screenTarget:null,screenName:null}},computed:{selectedValue:function(){return this.screenValues[this.valueId]?this.screenValues[this.valueId][0]:null},showDefault:function(){return!this.images.some(r=>r.value==this.selectedValue)},pointerStyle(){return this.screenTarget&&this.screenName?{cursor:"pointer"}:{cursor:"default"}}},created:function(){this.appliedSettings.forEach(e=>{e[0]==="SCREEN"&&(this.screenTarget=e[1],this.screenName=e[2])}),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__${this.parameters[3]||"RAW"}`,this.$emit("addItem",this.valueId);const r=this.appliedSettings.filter(e=>e[0]==="IMAGE").map(async e=>{let i=e[2];return i.startsWith("http")||(i=await this.getPresignedUrl(i)),{url:i,value:e[1],x:e[3],y:e[4],width:e[5],height:e[6]}});if(Promise.all(r).then(e=>{this.images=e}),this.parameters[4]){const e={x:this.parameters[5],y:this.parameters[6],width:this.parameters[7]?`${this.parameters[7]}px`:"100%",height:this.parameters[8]?`${this.parameters[8]}px`:"100%"};let i=this.parameters[4];i.startsWith("http")?this.defaultImage={...e,url:i}:this.getPresignedUrl(i).then(y=>{this.defaultImage={...e,url:y}})}},unmounted:function(){this.$emit("deleteItem",this.valueId)},methods:{clickHandler(){this.screenTarget&&this.screenName&&this.$emit("open",this.screenTarget,this.screenName)}}},I=["href","x","y","width","height"],w=["href","x","y","width","height"];function k(r,e,i,y,$,a){return n(),l("g",null,[(n(!0),l(o,null,p(r.images,s=>h((n(),l("image",{key:s.value,href:s.url,x:s.x,y:s.y,width:s.width,height:s.height,style:u(a.pointerStyle),onClick:e[0]||(e[0]=(...x)=>a.clickHandler&&a.clickHandler(...x))},null,12,I)),[[c,s.value==a.selectedValue]])),128)),r.defaultImage?h((n(),l("image",{key:0,href:r.defaultImage.url,x:r.defaultImage.x,y:r.defaultImage.y,width:r.defaultImage.width,height:r.defaultImage.height,style:u(a.pointerStyle),onClick:e[1]||(e[1]=(...s)=>a.clickHandler&&a.clickHandler(...s))},null,12,w)),[[c,a.showDefault]]):g("",!0)])}const N=v("default",f(t,[["render",k]]))}}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./Widget-
|
|
1
|
+
System.register(["./Widget-VCl8Ts8s-42e238022b560bd33b86.js","vue","./main-db7a4880a68f839e9da9.js","vue-router","single-spa","vuex","vuetify"],function(o,p){"use strict";var r,l,n,s,i;return{setters:[e=>{r=e.o},e=>{l=e.createElementBlock,n=e.openBlock,s=e.toDisplayString},e=>{i=e.d},null,null,null,null],execute:function(){const e={mixins:[r],computed:{fillColor(){return this.parameters[3]?this.parameters[3]:"black"}}},a=["x","y","fill"];function u(t,f,x,d,y,c){return n(),l("text",{x:t.parameters[0],y:t.parameters[1],fill:c.fillColor},s(t.parameters[2]),9,a)}const m=o("default",i(e,[["render",u]]))}}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./Widget-
|
|
1
|
+
System.register(["./Widget-VCl8Ts8s-42e238022b560bd33b86.js","vue","./main-db7a4880a68f839e9da9.js","vue-router","single-spa","vuex","vuetify"],function(u,p){"use strict";var s,a,i,l,n;return{setters:[e=>{s=e.o},e=>{a=e.createElementBlock,i=e.openBlock,l=e.toDisplayString},e=>{n=e.d},null,null,null,null],execute:function(){const e={mixins:[s],data(){return{valueId:null}},computed:{_value(){return this.screenValues[this.valueId][0]},fontSize(){return this.parameters[5]?this.parameters[5]+"px":"14px"},fillColor(){return this.parameters[6]?this.parameters[6]:"black"}},created(){let t="CONVERTED";this.parameters[7]&&(t=this.parameters[7]),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__${t}`,this.$emit("addItem",this.valueId)},unmounted(){this.$emit("deleteItem",this.valueId)}},o=["x","y","font-size","fill"];function m(t,d,h,f,v,r){return i(),a("text",{x:t.parameters[3],y:t.parameters[4],"font-size":r.fontSize,fill:r.fillColor},l(r._value),9,o)}const c=u("default",n(e,[["render",m]]))}}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./Widget-
|
|
1
|
+
System.register(["./Widget-VCl8Ts8s-42e238022b560bd33b86.js","vue","./main-db7a4880a68f839e9da9.js","vue-router","single-spa","vuex","vuetify"],function(i,p){"use strict";var l,s,n,a,c;return{setters:[e=>{l=e.o},e=>{s=e.createElementBlock,n=e.openBlock,a=e.normalizeStyle},e=>{c=e.d},null,null,null,null],execute:function(){const e={mixins:[l],computed:{calcStyle(){let t="black";this.parameters[4]&&(t=this.parameters[4]);let r=1;return this.parameters[5]&&(r=this.parameters[5]),"stroke:"+t+";stroke-width:"+r}}},u=["x1","y1","x2","y2"];function o(t,r,d,k,x,m){return n(),s("line",{x1:t.parameters[0],y1:t.parameters[1],x2:t.parameters[2],y2:t.parameters[3],style:a(m.calcStyle)},null,12,u)}const y=i("default",c(e,[["render",o]]))}}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./Widget-
|
|
1
|
+
System.register(["./Widget-VCl8Ts8s-42e238022b560bd33b86.js","vue","./main-db7a4880a68f839e9da9.js","vue-router","single-spa","vuex","vuetify"],function(u,o){"use strict";var s,r,l,i,n;return{setters:[t=>{s=t.o},t=>{r=t.createElementBlock,l=t.openBlock,i=t.normalizeStyle},t=>{n=t.d},null,null,null,null],execute:function(){const t={mixins:[s],data(){return{valueId:0,valueMap:{}}},computed:{calcStyle(){let e="black";this.screenValues[this.valueId]&&(e=this.valueMap[this.screenValues[this.valueId][0]]);let a=1;return this.parameters[7]&&(a=this.parameters[7]),"stroke:"+e+";stroke-width:"+a}},created(){this.appliedSettings.forEach(a=>{a[0]==="VALUE_EQ"&&(this.valueMap[a[1]]=a[2])});let e="CONVERTED";this.parameters[8]&&(e=this.parameters[8]),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__${e}`,this.$emit("addItem",this.valueId)},unmounted(){this.$emit("deleteItem",this.valueId)}},c=["x1","y1","x2","y2"];function m(e,a,d,v,y,h){return l(),r("line",{x1:e.parameters[3],y1:e.parameters[4],x2:e.parameters[5],y2:e.parameters[6],style:i(h.calcStyle)},null,12,c)}const p=u("default",n(t,[["render",m]]))}}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./Widget-VCl8Ts8s-42e238022b560bd33b86.js","vue","./main-db7a4880a68f839e9da9.js","vue-router","single-spa","vuex","vuetify"],function(c,h){"use strict";var t,a,n,s,o,r;return{setters:[e=>{t=e.o},e=>{a=e.resolveComponent,n=e.createBlock,s=e.openBlock,o=e.normalizeStyle},e=>{r=e.d},null,null,null,null],execute:function(){const e={mixins:[t],data(){return{items:[],label:"Checkbox",value:!1}},created(){this.label=this.parameters[0],this.parameters[1]&&(this.value=!0)},methods:{checked(){return this.value}}};function i(d,u,k,y,l,b){const m=a("v-checkbox");return s(),n(m,{"hide-details":"",density:"compact",label:l.label,modelValue:l.value,"onUpdate:modelValue":u[0]||(u[0]=v=>l.value=v),style:o(d.computedStyle)},null,8,["label","modelValue","style"])}const p=c("default",r(e,[["render",i]]))}}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./Widget-
|
|
1
|
+
System.register(["./Widget-VCl8Ts8s-42e238022b560bd33b86.js","vue","./main-db7a4880a68f839e9da9.js","vue-router","single-spa","vuex","vuetify"],function(i,p){"use strict";var l,s,n,o,r,u;return{setters:[e=>{l=e.o},e=>{s=e.resolveComponent,n=e.createBlock,o=e.openBlock,r=e.normalizeStyle},e=>{u=e.d},null,null,null,null],execute:function(){const e={mixins:[l],data(){return{items:[],value:null}},created(){this.value=this.parameters[0],this.items=this.parameters},methods:{text(){return this.value}}};function c(m,a,h,f,t,k){const d=s("v-select");return o(),n(d,{"hide-details":"",density:"compact",variant:"outlined",items:t.items,modelValue:t.value,"onUpdate:modelValue":a[0]||(a[0]=v=>t.value=v),style:r(m.computedStyle)},null,8,["items","modelValue","style"])}const y=i("default",u(e,[["render",c]]))}}});
|
data/tools/cmdsender/{CommandSender-efbe6a173b982451db6c.js → CommandSender-ae78d399d284d09e53de.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
System.register(["./main-
|
|
1
|
+
System.register(["./main-db7a4880a68f839e9da9.js","vue","./TargetPacketItemChooser-DGcXvdTX-9a84d1e22c0160d2883d.js","./DetailsDialog-Bq7SS7bc-2f2a56c47870518b9d9b.js","./CriticalCmdDialog-BtzhxuZi-e85f2c8438ad68a9d3da.js","single-spa","vue-router","vuex","vuetify"],function(exports,module){"use strict";var d,UA,FA,BA,WA,Ik,bA,_export_sfc,resolveComponent,createBlock,openBlock,Teleport,createVNode,withCtx,createElementVNode,toDisplayString,createElementBlock,Fragment,renderList,ref,createTextVNode,mergeProps,createSlots,createCommentVNode,normalizeStyle,withDirectives,vShow,normalizeProps,guardReactiveProps,withKeys,withModifiers,renderSlot,normalizeClass,U,P$1,N$1;return{setters:[h=>{d=h.d,UA=h.U,FA=h.F,BA=h.B,WA=h.W,Ik=h.I,bA=h.b,_export_sfc=h._},h=>{resolveComponent=h.resolveComponent,createBlock=h.createBlock,openBlock=h.openBlock,Teleport=h.Teleport,createVNode=h.createVNode,withCtx=h.withCtx,createElementVNode=h.createElementVNode,toDisplayString=h.toDisplayString,createElementBlock=h.createElementBlock,Fragment=h.Fragment,renderList=h.renderList,ref=h.ref,createTextVNode=h.createTextVNode,mergeProps=h.mergeProps,createSlots=h.createSlots,createCommentVNode=h.createCommentVNode,normalizeStyle=h.normalizeStyle,withDirectives=h.withDirectives,vShow=h.vShow,normalizeProps=h.normalizeProps,guardReactiveProps=h.guardReactiveProps,withKeys=h.withKeys,withModifiers=h.withModifiers,renderSlot=h.renderSlot,normalizeClass=h.normalizeClass},h=>{U=h.U},h=>{P$1=h.P},h=>{N$1=h.N},null,null,null,null],execute:function(){var __vite_style__=document.createElement("style");__vite_style__.textContent=`.editor[data-v-afca9f0c]{margin-left:30px;height:50px;width:95%;position:relative;font-size:16px}
|
|
2
2
|
/*$vite$:1*/`,document.head.appendChild(__vite_style__);const $="openc3-ace-vim-mode-enabled",C="ace/keyboard/vim",K$1="openc3-ace-default-scripting-language",Z={isVimModeEnabled(){return localStorage.getItem($)==="true"},setVimMode(h){localStorage.setItem($,JSON.stringify(!!h))},toggleVimMode(h){this.isVimModeEnabled()?(h.setKeyboardHandler(null),this.setVimMode(!1)):(h.setKeyboardHandler(C),this.setVimMode(!0)),h.focus()},applyVimModeIfEnabled(h,{saveFn:f}={}){this.isVimModeEnabled()?(h.setKeyboardHandler(C),ace.config.loadModule(C,p=>{p.CodeMirror.Vim.defineEx("write","w",v=>{typeof f=="function"?f():v.ace.execCommand("save")})})):h.setKeyboardHandler(null)},getDefaultScriptingLanguage(){return localStorage.getItem(K$1)||"python"},setDefaultScriptingLanguage(h){(h==="ruby"||h==="python")&&localStorage.setItem(K$1,h)}},q$1={__name:"TopBarMenu",props:{menu:{type:Object,required:!0},title:{type:String,required:!0}},emits:["submenu-click"],setup(h,{emit:f}){const p=f,v=ref(!1);function fe(){v.value=!1}function M(w){return w.replaceAll(" ","-").toLowerCase()}return(w,A)=>{const a=resolveComponent("v-icon"),u=resolveComponent("v-btn"),n=resolveComponent("v-divider"),o=resolveComponent("v-list-item-title"),r=resolveComponent("v-list-item"),i=resolveComponent("v-list"),e=resolveComponent("v-menu"),t=resolveComponent("v-radio"),c=resolveComponent("v-list-item-action"),g=resolveComponent("v-radio-group"),m=resolveComponent("v-checkbox");return openBlock(),createBlock(e,{modelValue:v.value,"onUpdate:modelValue":A[0]||(A[0]=E=>v.value=E),"close-on-content-click":!1},{activator:withCtx(({props:E})=>[createVNode(u,mergeProps(E,{variant:"outlined",class:"mx-1 menu-button",text:h.menu.label,"data-test":M(`${h.title} ${h.menu.label}`)}),{append:withCtx(()=>[createVNode(a,{class:"menu-button-icon"},{default:withCtx(()=>[...A[1]||(A[1]=[createTextVNode(" mdi-menu-down ",-1)])]),_:1})]),_:1},16,["text","data-test"])]),default:withCtx(()=>[createVNode(i,null,{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(h.menu.items,(E,T)=>(openBlock(),createElementBlock(Fragment,null,[E.divider?(openBlock(),createBlock(n,{key:T+"-divider"})):E.subMenu&&E.subMenu.length>0?(openBlock(),createElementBlock("div",{key:T+"-submenu"},[(openBlock(),createBlock(e,{key:T,"open-on-hover":"",location:"right"},{activator:withCtx(({props:x})=>[(openBlock(),createBlock(r,mergeProps({ref_for:!0},x,{key:T,disabled:E.disabled}),createSlots({append:withCtx(()=>[createVNode(a,null,{default:withCtx(()=>[...A[2]||(A[2]=[createTextVNode(" mdi-chevron-right ",-1)])]),_:1})]),default:withCtx(()=>[!E.radio&&!E.checkbox?(openBlock(),createBlock(o,{key:0,style:normalizeStyle("cursor: pointer;"+(E.disabled?"opacity: 0.2":""))},{default:withCtx(()=>[createTextVNode(toDisplayString(E.label),1)]),_:2},1032,["style"])):createCommentVNode("",!0)]),_:2},[E.icon?{name:"prepend",fn:withCtx(()=>[createVNode(a,{disabled:E.disabled},{default:withCtx(()=>[createTextVNode(toDisplayString(E.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:withCtx(()=>[createVNode(i,null,{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(E.subMenu,(x,b)=>(openBlock(),createBlock(r,{key:b,"prepend-icon":x.icon,onClick:de=>p("submenu-click",x)},{default:withCtx(()=>[createVNode(o,null,{default:withCtx(()=>[createTextVNode(toDisplayString(x.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):E.radioGroup?(openBlock(),createBlock(g,{key:T+"-radio-group",class:"ma-0 pa-0",density:"compact","hide-details":"","model-value":E.value,"onUpdate:modelValue":E.command},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(E.choices,(x,b)=>(openBlock(),createBlock(r,{key:b+"-choice"},{default:withCtx(()=>[createVNode(c,{class:"list-action"},{default:withCtx(()=>[createVNode(t,{color:"secondary",label:x.label,value:x.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(openBlock(),createBlock(r,{key:T+"-list",disabled:E.disabled,"data-test":M(`${h.title} ${h.menu.label} ${E.label}`),onClick:()=>{E.command(E),E.checkbox||fe()}},createSlots({default:withCtx(()=>[E.checkbox?(openBlock(),createBlock(c,{key:0,class:"list-action"},{default:withCtx(()=>[createVNode(m,{modelValue:E.checked,"onUpdate:modelValue":x=>E.checked=x,label:E.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):createCommentVNode("",!0),!E.radio&&!E.checkbox?(openBlock(),createBlock(o,{key:1,style:normalizeStyle("cursor: pointer;"+(E.disabled?"opacity: 0.2":""))},{default:withCtx(()=>[createTextVNode(toDisplayString(E.label),1)]),_:2},1032,["style"])):createCommentVNode("",!0)]),_:2},[E.icon?{name:"prepend",fn:withCtx(()=>[createVNode(a,{icon:E.icon,disabled:E.disabled},null,8,["icon","disabled"])]),key:"0"}:void 0]),1032,["disabled","data-test","onClick"]))],64))),256))]),_:1})]),_:1},8,["modelValue"])}}},z$2={components:{TopBarMenu:q$1},props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},mounted(){document.title=this.title},methods:{subMenuClick(h){h.command(h),this.$refs.topmenu[0].isActive=!1}}},F$1={class:"app-title mr-2"};function J(h,f,p,v,fe,M){const w=resolveComponent("v-col"),A=resolveComponent("v-row"),a=resolveComponent("TopBarMenu");return openBlock(),createBlock(Teleport,{to:"#openc3-menu"},[createVNode(A,{"no-gutters":""},{default:withCtx(()=>[createVNode(w,{"align-self":"end"},{default:withCtx(()=>[createElementVNode("span",F$1,toDisplayString(p.title),1)]),_:1})]),_:1}),createVNode(A,{dense:"",class:"flex-nowrap"},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(p.menus,(u,n)=>(openBlock(),createBlock(a,{key:n+"-top-menu",ref_for:!0,ref:"topmenu",menu:u,title:p.title,onSubmenuClick:M.subMenuClick},null,8,["menu","title","onSubmenuClick"]))),128))]),_:1})])}const j=d(z$2,[["render",J],["__scopeId","data-v-b6581c4c"]]);let Q$1=class{constructor(){FA.get("/openc3-api/autocomplete/data/screen").then(f=>{this.autocompleteData=f.data}),this.api=new BA}async getCompletions(f,p,v,fe,M){let w=p.getLine(v.row).slice(0,v.column).trimStart().split(/ (?![^<]*>)/),A=this.autocompleteData;w.length>1&&(A=A.find(n=>n.caption===w[0]));let a={},u=!0;if(A&&A.params){A.params.length==w.length-1&&(u=!1);let n=A.params[w.length-2];if(n["Target name"])A=(await this.api.get_target_names()).reduce((o,r)=>(o[r]=1,o),{});else if(n["Packet name"]){let o=w[w.length-2];A=(await this.api.get_all_tlm(o)).reduce((r,i)=>(r[i.packet_name]=i.description,r),{}),A.LATEST="LATEST values from all packets"}else if(n["Item name"]){let o=w[w.length-3],r=w[w.length-2];if(r==="LATEST"){let i=await this.api.get_all_tlm_item_names(o);A={},i.forEach(e=>{A[e]=`LATEST ${e}`})}else A=(await this.api.get_tlm(o,r)).items.reduce((i,e)=>(i[e.name]=e.description,i),{})}else A=n;a=Object.keys(A||{}).map(o=>{let r={value:o+(u?" ":""),command:u&&"startAutocomplete"};return typeof A[o]=="string"&&(r.meta=A[o]),r})}else a=A;M(null,a)}};const ee$1={props:{modelValue:Boolean,target:{type:String,default:""},screen:{type:String,default:""},definition:{type:String,default:""},keywords:{type:Array,default:()=>[]},errors:{type:Array,default:()=>[]}},emits:["cancel","delete","save","update:modelValue"],data(){return{file:null,docsKeyword:"",contextMenu:!1,menuX:0,menuY:0}},computed:{editErrors:function(){if(this.definition===""&&!this.file)return["Input can not be blank."];if(this.errors.length!==0){let h=new Set,f=[];const p=this.errors.toSorted((v,fe)=>v.lineNumber-fe.lineNumber);for(const v of p){let fe=`At ${v.lineNumber}: (${v.line}) ${v.message}.`;v.usage&&(fe+=` Usage: ${v.usage}`),f.push(fe),h.add(v.message)}return f}return[]},show:{get(){return this.modelValue},set(h){this.$emit("update:modelValue",h)}}},mounted:function(){this.editor=bA.edit(this.$refs.editor),this.editor.setTheme("ace/theme/twilight");const h=this.buildScreenMode();this.editor.session.setMode(new h),this.editor.session.setTabSize(2),this.editor.session.setUseWrapMode(!0),this.editor.$blockScrolling=1/0,this.editor.setOption("enableBasicAutocompletion",!0),this.editor.setOption("enableLiveAutocompletion",!0),this.editor.completers=[new Q$1],this.editor.setHighlightActiveLine(!1),this.editor.setValue(this.definition),this.editor.clearSelection(),Z.applyVimModeIfEnabled(this.editor),this.editor.focus()},beforeUnmount(){this.editor.destroy(),this.editor.container.remove()},methods:{toggleVimMode:function(){Z.toggleVimMode(this.editor)},showContextMenu:function(h){this.menuX=h.pageX,this.menuY=h.pageY;let f=this.editor.getCursorPosition(),p=this.editor.session.getTokenAt(f.row,f.column);if(p){let v=p.value.trim();v.includes(" ")?this.docsKeyword=v.split(" ")[0]:this.docsKeyword=v,this.contextMenu=!0}},openDocumentation(){window.open(`${window.location.origin}/tools/staticdocs/docs/configuration/telemetry-screens#${this.docsKeyword.toLowerCase()}`,"_blank")},buildScreenMode(){let h=bA.require("ace/lib/oop"),f=bA.require("ace/mode/text_highlight_rules").TextHighlightRules,p=this.keywords.join("|"),v=function(){this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"\\b\\d+(?:\\.\\d+)?\\b"},{token:"keyword",regex:new RegExp(`^\\s*(${p})\\b`)}]},this.normalizeRules()};h.inherits(v,f);let fe=function(){this.HighlightRules=v},M=bA.require("ace/mode/text").Mode;return h.inherits(fe,M),(function(){this.$id="ace/mode/openc3"}).call(fe.prototype),fe},downloadScreen:function(){const h=new Blob([this.editor.getValue()],{type:"text/plain"}),f=document.createElement("a");f.href=URL.createObjectURL(h),f.setAttribute("download",`${this.screen.toLowerCase()}.txt`),f.click()},loadFile:function(){const h=new FileReader;h.readAsText(this.file);const f=this;h.onload=function(){f.editor.setValue(h.result),f.file=null}},deleteScreen:function(){this.$dialog.confirm("Are you sure you want to delete this screen?!",{okText:"Delete",cancelText:"Cancel"}).then(h=>{this.$emit("delete")})}}},te$1=["textContent"];function ne$1(h,f,p,v,fe,M){const w=resolveComponent("v-btn"),A=resolveComponent("v-spacer"),a=resolveComponent("v-toolbar"),u=resolveComponent("v-row"),n=resolveComponent("v-file-input"),o=resolveComponent("v-list-item-title"),r=resolveComponent("v-list-item"),i=resolveComponent("v-divider"),e=resolveComponent("v-list"),t=resolveComponent("v-menu"),c=resolveComponent("v-card-text"),g=resolveComponent("v-card"),m=resolveComponent("v-dialog");return openBlock(),createBlock(m,{modelValue:M.show,"onUpdate:modelValue":f[5]||(f[5]=E=>M.show=E),persistent:"",width:"75vw",onKeydown:f[6]||(f[6]=withKeys(E=>h.$emit("cancel"),["esc"]))},{default:withCtx(()=>[createVNode(g,null,{default:withCtx(()=>[createVNode(a,{height:"24"},{default:withCtx(()=>[createVNode(w,{class:"mx-2",icon:"mdi-delete",variant:"text",density:"compact","data-test":"delete-screen-icon",onClick:M.deleteScreen},null,8,["onClick"]),createVNode(A),createElementVNode("span",null," Edit Screen: "+toDisplayString(p.target)+" "+toDisplayString(p.screen),1),createVNode(A),createVNode(w,{class:"mx-2",icon:"mdi-download",variant:"text",density:"compact","data-test":"download-screen-icon",onClick:M.downloadScreen},null,8,["onClick"])]),_:1}),createVNode(c,{style:{"max-height":"90vh"}},{default:withCtx(()=>[createVNode(u,{class:"mt-3"},{default:withCtx(()=>[...f[7]||(f[7]=[createTextVNode(" Upload a screen file. ",-1)])]),_:1}),createVNode(u,{"no-gutters":"",align:"center"},{default:withCtx(()=>[createVNode(w,{disabled:!fe.file,color:"primary",class:"mr-3","data-test":"edit-screen-load",onClick:M.loadFile},{default:withCtx(()=>[...f[8]||(f[8]=[createTextVNode(" Load ",-1)])]),_:1},8,["disabled","onClick"]),createVNode(n,{modelValue:fe.file,"onUpdate:modelValue":f[0]||(f[0]=E=>fe.file=E),"truncate-length":"15",accept:".txt",label:"Click to select .txt screen file."},null,8,["modelValue"])]),_:1}),createVNode(u,{class:"mb-2"},{default:withCtx(()=>[...f[9]||(f[9]=[createTextVNode(" Edit the screen definition. ",-1)])]),_:1}),createVNode(u,{class:"mb-2"},{default:withCtx(()=>[createElementVNode("pre",{ref:"editor",class:"editor",onContextmenu:f[1]||(f[1]=withModifiers((...E)=>M.showContextMenu&&M.showContextMenu(...E),["prevent"]))},null,544),createVNode(t,{modelValue:fe.contextMenu,"onUpdate:modelValue":f[2]||(f[2]=E=>fe.contextMenu=E),target:[fe.menuX,fe.menuY]},{default:withCtx(()=>[createVNode(e,null,{default:withCtx(()=>[createVNode(r,{link:""},{default:withCtx(()=>[createVNode(o,{onClick:M.openDocumentation},{default:withCtx(()=>[createTextVNode(toDisplayString(fe.docsKeyword)+" documentation ",1)]),_:1},8,["onClick"])]),_:1}),createVNode(i),createVNode(r,{title:"Toggle Vim mode","prepend-icon":"extras:vim",onClick:M.toggleVimMode},null,8,["onClick"])]),_:1})]),_:1},8,["modelValue","target"])]),_:1}),createVNode(u,{style:{"max-height":"120px","overflow-y":"auto"}},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(M.editErrors,(E,T)=>(openBlock(),createElementBlock("div",{key:T},[createElementVNode("span",{class:"text-red",textContent:toDisplayString(E)},null,8,te$1)]))),128))]),_:1}),createVNode(u,{class:"mt-5"},{default:withCtx(()=>[f[12]||(f[12]=createElementVNode("span",null," Ctrl-space brings up autocomplete. Right click keywords for documentation. ",-1)),createVNode(A),createVNode(w,{class:"mx-2",variant:"outlined","data-test":"edit-screen-cancel",onClick:f[3]||(f[3]=E=>h.$emit("cancel"))},{default:withCtx(()=>[...f[10]||(f[10]=[createTextVNode(" Cancel ",-1)])]),_:1}),createVNode(w,{class:"mx-2",color:"primary","data-test":"edit-screen-save",onClick:f[4]||(f[4]=E=>h.$emit("save",h.editor.getValue()))},{default:withCtx(()=>[...f[11]||(f[11]=[createTextVNode(" Save ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const ie$2=d(ee$1,[["render",ne$1],["__scopeId","data-v-00a228d0"]]),z$1=20,ye$1={components:{EditScreenDialog:ie$2},mixins:[UA],props:{target:{type:String,default:""},screen:{type:String,default:""},definition:{type:String,default:""},keywords:{type:Array,default:()=>[]},initialFloated:{type:Boolean,default:!1},initialTop:{type:Number,default:0},initialLeft:{type:Number,default:0},initialZ:{type:Number,default:0},minZ:{type:Number,default:0},fixFloated:{type:Boolean,default:!1},count:{type:Number,default:0},showClose:{type:Boolean,default:!0},timeZone:{type:String,default:"local"},inline:{type:Boolean,default:!1},playbackMode:{type:String,default:"realtime"},playbackDateTime:{type:Date,default:null}},emits:["close-screen","delete-screen","drag-screen","edit-screen","float-screen","min-max-screen","unfloat-screen"],data(){return{api:null,backup:"",currentDefinition:this.definition,editDialog:!1,expand:!0,configParser:null,currentLayout:null,layoutStack:[],namedWidgets:{},dynamicWidgets:[],width:null,height:null,staleTime:30,cacheTimeout:.1,globalSettings:[],substitute:!1,original_target_name:null,force_substitute:!1,pollingPeriod:1,errors:[],errorDialog:!1,screenKey:null,dragX:0,dragY:0,floated:this.initialFloated,top:this.initialTop,left:this.initialLeft,zIndex:this.initialZ,changeCounter:0,screenItems:[],actualScreenItems:[],screenValues:{},updateCounter:0,updater:null,screenId:Ik.uniqueId("openc3-screen_"),tlmAvailableTimeout:null}},computed:{error:function(){if(this.errorDialog&&this.errors.length>0){let h=new Set,f="";for(const p of this.errors){if(h.has(p.message))continue;let v=`${p.time}: (${p.type}) ${p.message}
|
|
3
3
|
`;f+=v,h.add(p.message)}return f}return null},computedStyle(){var h;let f={};const p=this.width||((h=this.$refs.bar)==null?void 0:h.clientWidth);return this.floated&&(f.position="absolute",f.top=this.top+"px",f.left=this.left+"px",f.width=p+"px"),f}},watch:{count:{handler(h,f){this.currentDefinition=this.definition,this.rerender()}},playbackDateTime:{handler(h,f){this.playbackMode==="playback"&&h&&this.update()}},playbackMode:{handler(h,f){h==="realtime"?this.updateRefreshInterval():(clearInterval(this.updater),this.updater=null)}}},errorCaptured(h,f,p){return this.errors.length<z$1&&(h.usage?this.errors.push({type:"usage",message:h.message,usage:h.usage,line:h.line,lineNumber:h.lineNumber,time:new Date().getTime()}):this.errors.push({type:"error",message:h,time:new Date().getTime()})),!1},created(){this.api=new BA,this.configParser=new WA,this.parseDefinition(),this.screenKey=Math.floor(Math.random()*1e6)},mounted(){this.playbackMode==="realtime"&&this.updateRefreshInterval(),this.floated&&(this.$refs.bar.onmousedown=this.dragMouseDown,this.$refs.bar.parentElement.parentElement.style="z-index: "+this.zIndex)},unmounted(){this.updater!=null&&(clearInterval(this.updater),this.updater=null),this.tlmAvailableTimeout!=null&&(clearTimeout(this.tlmAvailableTimeout),this.tlmAvailableTimeout=null)},methods:{open(h,f){this.$parent.showScreen(h,f)},close(h,f){this.$parent.closeScreenByName(h,f)},closeAll(){this.$parent.closeAll()},clearErrors:function(){this.errors=[]},updateRefreshInterval:function(){let h=this.pollingPeriod*1e3;this.updater&&clearInterval(this.updater),this.updater=setInterval(()=>{this.update()},h)},parseDefinition:function(){if(this.clearErrors(),this.screenItems=[],this.namedWidgets={},this.layoutStack=[],this.dynamicWidgets=[],this.layoutStack.push({type:"VerticalWidget",parameters:[],widgets:[]}),this.currentLayout=this.layoutStack[this.layoutStack.length-1],this.configParser.parse_string(this.currentDefinition,"",!1,!0,(h,f,p,v)=>{if(h)switch(h){case"SCREEN":this.configParser.verify_num_parameters(3,4,`${h} <Width or AUTO> <Height or AUTO> <Polling Period>`),this.width=parseInt(f[0]),this.height=parseInt(f[1]),this.pollingPeriod=parseFloat(f[2]);break;case"END":this.configParser.verify_num_parameters(0,0,`${h}`),this.layoutStack.pop(),this.currentLayout=this.layoutStack[this.layoutStack.length-1];break;case"STALE_TIME":this.configParser.verify_num_parameters(1,1,`${h} <Time (s)>`),this.staleTime=parseInt(f[0]);break;case"SUBSETTING":this.configParser.verify_num_parameters(3,null,`${h} <Index> <Widget Type> <Widget Settings...>`),f[1]==="RAW"&&(f[1]="RAW__"+f[2].toLowerCase());case"SETTING":this.configParser.verify_num_parameters(2,null,`${h} <Widget Type> <Widget Settings...>`),f[0]==="RAW"&&(f[0]="RAW__"+f[1].toLowerCase()),(this.currentLayout.widgets[this.currentLayout.widgets.length-1]??this.currentLayout).settings.push(f);break;case"GLOBAL_SUBSETTING":this.configParser.verify_num_parameters(3,null,`${h} <Index> <Widget Type> <Widget Settings...>`),f[2]==="RAW"&&(f[2]="RAW__"+f[3].toLowerCase());case"GLOBAL_SETTING":this.configParser.verify_num_parameters(2,null,`${h} <Widget Type> <Widget Settings...>`),f[1]==="RAW"&&(f[1]="RAW__"+f[2].toLowerCase()),this.globalSettings.push(f);break;default:this.processWidget(h,f,p,v);break}}),typeof this.layoutStack[0]>"u"){let h=[],f=[];for(const p of this.dynamicWidgets)h.push(p.name),f.push(p.lineNumber);this.errors.length<z$1&&this.errors.push({type:"usage",message:`Unknown widget! Are these widgets: ${h.join(",")}?`,lineNumber:f.join(","),time:new Date().getTime()}),this.layoutStack[0]={type:"VerticalWidget",parameters:[],widgets:[]}}else this.applyGlobalSettings(this.layoutStack[0].widgets)},openEdit:function(){this.backup=this.currentDefinition.repeat(1),this.editDialog=!0},upScreen:function(){this.zIndex+=1,this.$refs.bar.parentElement.parentElement.style="z-index: "+this.zIndex,this.$emit("drag-screen",[this.floated,this.top,this.left,this.zIndex])},downScreen:function(){this.zIndex>this.minZ&&(this.zIndex-=1,this.$refs.bar.parentElement.parentElement.style="z-index: "+this.zIndex,this.$emit("drag-screen",[this.floated,this.top,this.left,this.zIndex]))},floatScreen:function(){if(this.floated)this.$refs.bar.onmousedown=null,this.$refs.bar.parentElement.parentElement.style="z-index: 0",this.floated=!1,this.$emit("unfloat-screen",[this.floated,this.top,this.left,this.zIndex]);else{let h=this.$refs.bar.parentElement.parentElement.parentElement.getBoundingClientRect(),f=this.$refs.bar.getBoundingClientRect();this.top=f.top-h.top-5,this.left=f.left-h.left-5,this.$refs.bar.onmousedown=this.dragMouseDown,this.$refs.bar.parentElement.parentElement.style="z-index: "+this.zIndex,this.floated=!0,this.$emit("float-screen",[this.floated,this.top,this.left,this.zIndex])}},dragMouseDown:function(h){h=h||window.event,h.preventDefault(),this.dragX=h.clientX,this.dragY=h.clientY,document.onmouseup=this.closeDragElement,document.onmousemove=this.elementDrag},elementDrag:function(h){h=h||window.event,h.preventDefault();let f=this.dragX-h.clientX,p=this.dragY-h.clientY;this.dragX=h.clientX,this.dragY=h.clientY,this.top=this.$refs.bar.offsetTop-p,this.left=this.$refs.bar.offsetLeft-f,this.$emit("drag-screen",[this.floated,this.top,this.left,this.zIndex])},closeDragElement:function(){document.onmouseup=null,document.onmousemove=null},rerender:function(){this.parseDefinition(),this.updateRefreshInterval(),this.screenKey=Math.floor(Math.random()*1e6),this.$nextTick(function(){this.clearErrors(),this.$emit("edit-screen")})},cancelEdit:function(){this.file=null,this.editDialog=!1,this.currentDefinition=this.backup,this.rerender()},saveEdit:function(h){this.editDialog=!1,this.currentDefinition=h,this.rerender(),this.$nextTick(function(){FA.post("/openc3-api/screen/",{data:{scope:window.openc3Scope,target:this.target,screen:this.screen,text:this.currentDefinition}},0)})},deleteScreen:function(){this.editDialog=!1,FA.delete(`/openc3-api/screen/${this.target}/${this.screen}`).then(h=>{this.$emit("delete-screen")})},minMaxTransition:function(){this.expand=!this.expand,this.$emit("min-max-screen")},processWidget:function(h,f,p,v){let fe=null;h==="NAMED_WIDGET"&&(this.configParser.verify_num_parameters(2,null,`${h} <Widget Name> <Widget Type> <Widget Settings... (optional)>`),fe=f[0].toUpperCase(),h=f[1].toUpperCase(),f=f.slice(2,f.length));const M=h.charAt(0).toUpperCase()+h.slice(1).toLowerCase()+"Widget";let w=[];if(w.push(["__SCREEN_ID__",this.screenId]),fe!==null&&w.push(["NAMED_WIDGET",fe]),h==="VERTICAL"||h==="VERTICALBOX"||h==="HORIZONTAL"||h==="HORIZONTALBOX"||h==="MATRIXBYCOLUMNS"||h==="TABBOOK"||h==="TABITEM"||h==="CANVAS"||h==="RADIOGROUP"||h==="SCROLLWINDOW"){const A={type:M,parameters:f,settings:w,screenValues:this.screenValues,screenTimeZone:this.timeZone,widgets:[]};this.layoutStack.push(A),this.currentLayout.widgets.push(A),this.currentLayout=A}else if(this.$options.components[M])this.currentLayout.widgets.push({type:M,target:this.target,parameters:f,settings:w,screenValues:this.screenValues,screenTimeZone:this.timeZone,line:p,lineNumber:v});else{let A={type:"DynamicWidget",target:this.target,parameters:f,settings:w,screenValues:this.screenValues,screenTimeZone:this.timeZone,name:M,line:p,lineNumber:v};this.currentLayout.widgets.push(A),this.dynamicWidgets.push(A)}},applyGlobalSettings:function(h){h.forEach(f=>{this.globalSettings.forEach(p=>{f.type.toLowerCase()===p[0].toLowerCase()+"widget"&&(f.settings.find(v=>v[0]===p[1])||f.settings.push(p.slice(1)))}),f.widgets&&this.applyGlobalSettings(f.widgets)})},update:function(){let h=this.playbackMode==="playback"?this.playbackDateTime:null;this.actualScreenItems.length!==0&&this.api.get_tlm_values(this.actualScreenItems,this.staleTime,this.cacheTimeout,h).then(f=>{f&&f.length>0&&this.updateValues(f)}).catch(f=>{let p=JSON.stringify(f,null,2);this.errors.find(v=>v.message===p)||this.errors.length<z$1&&this.errors.push({type:"error",message:p,time:new Date().getTime()})})},updateValues:function(h){if(this.updateCounter+=1,h.length!=this.screenItems.length||h.length!=this.actualScreenItems.length)console.log(`get_tlm_values mismatch: data.length: ${h.length}, screenItems.length: ${this.screenItems.length}, actualScreenItems.length: ${this.actualScreenItems.length}`,JSON.stringify(h),JSON.stringify(this.screenItems),JSON.stringify(this.actualScreenItems));else for(let f=0;f<h.length;f++)h[f].push(this.updateCounter),this.screenValues[this.screenItems[f]]=h[f]},debouncedUpdateTlmAvailable:function(){this.tlmAvailableTimeout!=null&&clearTimeout(this.tlmAvailableTimeout),this.tlmAvailableTimeout=setTimeout(()=>{this.api.get_tlm_available(this.screenItems).then(h=>{if(this.actualScreenItems=h,this.screenItems.length!=h.length)console.log("Error getting tlm available",this.screenItems,this.actualScreenItems);else for(let f=0;f<this.actualScreenItems.length;f++)if(this.actualScreenItems[f]===null){const p=this.screenItems[f].split("__"),v=this.currentDefinition.split(`
|
|
4
4
|
`),fe=v.findIndex(M=>M.includes(p[0])&&M.includes(p[1])&&M.includes(p[2]))+1;fe>0?this.errors.push({type:"usage",message:`Null for ${p.join(" ")}! Does it exist?`,line:v[fe-1],lineNumber:fe,time:new Date().getTime()}):this.errors.push({type:"error",message:`Null for ${p.join(" ")}! Does it exist?`,time:new Date().getTime()})}}).catch(h=>{console.log("Error getting tlm available",h),this.actualScreenItems=this.screenItems}),this.tlmAvailableTimeout=null},100)},addItem:function(h){this.screenItems.push(h),this.screenValues[h]=[null,null,0],this.debouncedUpdateTlmAvailable()},deleteItem:function(h){let f=this.screenItems.indexOf(h);this.screenItems.splice(f,1),this.debouncedUpdateTlmAvailable()}}},_e$1={ref:"screen",class:"pa-1",style:{position:"relative"}},be$1={key:1,class:"pa-1",style:{position:"relative"}};function xe$1(h,f,p,v,fe,M){const w=resolveComponent("v-btn"),A=resolveComponent("v-tooltip"),a=resolveComponent("v-spacer"),u=resolveComponent("v-toolbar"),n=resolveComponent("v-overlay"),o=resolveComponent("vertical-widget"),r=resolveComponent("v-expand-transition"),i=resolveComponent("v-card"),e=resolveComponent("edit-screen-dialog"),t=resolveComponent("v-textarea"),c=resolveComponent("v-card-actions"),g=resolveComponent("v-dialog");return openBlock(),createElementBlock("div",{ref:"bar",style:normalizeStyle(M.computedStyle)},[p.inline?createCommentVNode("",!0):(openBlock(),createBlock(i,{key:0,"min-height":fe.height,"min-width":fe.width,style:{cursor:"default"}},{default:withCtx(()=>[createVNode(u,{height:"24"},{default:withCtx(()=>[withDirectives(createVNode(w,{icon:"mdi-alert",variant:"text",density:"compact","data-test":"error-graph-icon","aria-label":"Show Errors",onClick:f[0]||(f[0]=()=>{fe.errorDialog=!0})},null,512),[[vShow,fe.errors.length!==0]]),createVNode(w,{icon:"mdi-pencil",variant:"text",density:"compact","data-test":"edit-screen-icon","aria-label":"Edit Screen",onClick:M.openEdit},null,8,["onClick"]),p.fixFloated?createCommentVNode("",!0):(openBlock(),createBlock(A,{key:0,"open-delay":600,location:"top"},{activator:withCtx(({props:m})=>[createElementVNode("div",normalizeProps(guardReactiveProps(m)),[createVNode(w,{icon:fe.floated?"mdi-balloon":"mdi-view-grid-outline",variant:"text",density:"compact","data-test":"float-screen-icon","aria-label":fe.floated?"Unfloat Screen":"Float Screen",onClick:M.floatScreen},null,8,["icon","aria-label","onClick"])],16)]),default:withCtx(()=>[createElementVNode("span",null,toDisplayString(fe.floated?"Unfloat Screen":"Float Screen"),1)]),_:1})),fe.floated?(openBlock(),createBlock(A,{key:1,"open-delay":600,location:"top"},{activator:withCtx(({props:m})=>[createElementVNode("div",normalizeProps(guardReactiveProps(m)),[createVNode(w,{icon:"mdi-arrow-up",variant:"text",density:"compact","data-test":"up-screen-icon","aria-label":"Move Screen Up",onClick:M.upScreen},null,8,["onClick"])],16)]),default:withCtx(()=>[f[6]||(f[6]=createElementVNode("span",null," Move Screen Up ",-1))]),_:1})):createCommentVNode("",!0),fe.floated&&fe.zIndex>p.minZ?(openBlock(),createBlock(A,{key:2,"open-delay":600,location:"top"},{activator:withCtx(({props:m})=>[createElementVNode("div",normalizeProps(guardReactiveProps(m)),[createVNode(w,{icon:"mdi-arrow-down",variant:"text",density:"compact","data-test":"down-screen-icon","aria-label":"Move Screen Down",onClick:M.downScreen},null,8,["onClick"])],16)]),default:withCtx(()=>[f[7]||(f[7]=createElementVNode("span",null," Move Screen Down ",-1))]),_:1})):createCommentVNode("",!0),createVNode(a),createElementVNode("span",null,toDisplayString(p.target)+" "+toDisplayString(p.screen),1),createVNode(a),fe.expand?(openBlock(),createBlock(w,{key:3,icon:"mdi-window-minimize",variant:"text",density:"compact","data-test":"minimize-screen-icon","aria-label":"Minimize Screen",onClick:M.minMaxTransition},null,8,["onClick"])):(openBlock(),createBlock(w,{key:4,icon:"mdi-window-maximize",variant:"text",density:"compact","data-test":"maximize-screen-icon","aria-label":"Maximize Screen",onClick:M.minMaxTransition},null,8,["onClick"])),p.showClose?(openBlock(),createBlock(w,{key:5,icon:"mdi-close-box",variant:"text",density:"compact","data-test":"close-screen-icon","aria-label":"Close Screen",onClick:f[1]||(f[1]=m=>h.$emit("close-screen"))})):createCommentVNode("",!0)]),_:1}),fe.editDialog?createCommentVNode("",!0):(openBlock(),createBlock(r,{key:0},{default:withCtx(()=>[withDirectives(createElementVNode("div",_e$1,[createVNode(n,{style:{"pointer-events":"none"},"model-value":fe.errors.length!==0,opacity:"0.8",absolute:"",attach:"","scroll-strategy":"none"},null,8,["model-value"]),(openBlock(),createBlock(o,{key:fe.screenKey,widgets:fe.layoutStack[0].widgets,"screen-values":fe.screenValues,"screen-time-zone":p.timeZone,onAddItem:M.addItem,onDeleteItem:M.deleteItem,onOpen:M.open,onClose:M.close,onCloseAll:M.closeAll},null,8,["widgets","screen-values","screen-time-zone","onAddItem","onDeleteItem","onOpen","onClose","onCloseAll"]))],512),[[vShow,fe.expand]])]),_:1}))]),_:1},8,["min-height","min-width"])),p.inline?(openBlock(),createElementBlock("div",be$1,[createVNode(n,{style:{"pointer-events":"none"},"model-value":fe.errors.length!==0,opacity:"0.8",absolute:"",attach:"","scroll-strategy":"none"},null,8,["model-value"]),withDirectives(createVNode(w,{icon:"mdi-alert",variant:"text",density:"compact","data-test":"error-graph-icon","aria-label":"Show Errors",onClick:f[2]||(f[2]=()=>{fe.errorDialog=!0})},null,512),[[vShow,fe.errors.length!==0]]),(openBlock(),createBlock(o,{key:fe.screenKey,widgets:fe.layoutStack[0].widgets,"screen-values":fe.screenValues,"screen-time-zone":p.timeZone,onAddItem:M.addItem,onDeleteItem:M.deleteItem,onOpen:M.open,onClose:M.close,onCloseAll:M.closeAll},null,8,["widgets","screen-values","screen-time-zone","onAddItem","onDeleteItem","onOpen","onClose","onCloseAll"]))])):createCommentVNode("",!0),fe.editDialog?(openBlock(),createBlock(e,{key:2,modelValue:fe.editDialog,"onUpdate:modelValue":f[3]||(f[3]=m=>fe.editDialog=m),target:p.target,screen:p.screen,definition:fe.currentDefinition,keywords:p.keywords,errors:fe.errors,onSave:M.saveEdit,onCancel:M.cancelEdit,onDelete:M.deleteScreen},null,8,["modelValue","target","screen","definition","keywords","errors","onSave","onCancel","onDelete"])):createCommentVNode("",!0),createVNode(g,{modelValue:fe.errorDialog,"onUpdate:modelValue":f[5]||(f[5]=m=>fe.errorDialog=m),width:"60vw"},{default:withCtx(()=>[createVNode(u,{height:"24"},{default:withCtx(()=>[createVNode(a),createElementVNode("span",null," Screen: "+toDisplayString(p.target)+" "+toDisplayString(p.screen)+" Errors ",1),createVNode(a)]),_:1}),createVNode(i,null,{default:withCtx(()=>[createVNode(t,{class:"errors",readonly:"",rows:"13","model-value":M.error},null,8,["model-value"]),createVNode(c,{class:"pb-5"},{default:withCtx(()=>[createVNode(a),createVNode(w,{variant:"outlined",class:"mr-2",onClick:M.clearErrors},{default:withCtx(()=>[...f[8]||(f[8]=[createTextVNode(" Clear Errors ",-1)])]),_:1},8,["onClick"]),createVNode(w,{variant:"flat",class:"mr-2",onClick:f[4]||(f[4]=m=>fe.errorDialog=!1)},{default:withCtx(()=>[...f[9]||(f[9]=[createTextVNode(" Close ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])],4)}const Ee$1=d(ye$1,[["render",xe$1],["__scopeId","data-v-dca85517"]]),s={methods:{isFloat(h){return!!(/^\s*[-+]?\d*\.\d+\s*$/.test(h)||/^\s*[-+]?(\d+((\.\d+)?)|(\.\d+))[eE][-+]?\d+\s*$/.test(h))},isInt(h){return!!(/^\s*[-+]?\d+\s*$/.test(h)||/^\s*0[xX][\dabcdefABCDEF]+\s*$/.test(h))},isArray(h){return/^\s*\[.*\]\s*$/.test(h)},removeQuotes(h){if(h.length<2)return h;let f=h.charAt(0);if(f!=='"'&&f!=="'")return h;let p=h.charAt(h.length-1);return f!==p?h:h.slice(1,-1)},convertToString(h){let f="";if(Object.prototype.toString.call(h).slice(8,-1)==="Array"){let p=h.length;f="[ ";for(let v=0;v<p;v++)Object.prototype.toString.call(h[v]).slice(8,-1)==="String"?f+='"'+h[v]+'"':f+=h[v],v!==p-1&&(f+=", ");f+=" ]"}else if(Object.prototype.toString.call(h).slice(8,-1)==="Object")if(h.json_class==="String"&&h.raw){f="0x";for(let p of h.raw)f+=p.toString(16).padStart(2,"0").toUpperCase()}else h.json_class==="Float"&&h.raw?f=h.raw:f=JSON.stringify(h).replace(/\\n/g,"");else f=String(h);return f}}},F={name:"CommandParameterEditor",mixins:[s],props:{modelValue:{type:[String,Number],default:void 0},states:{type:Object,default:()=>null},statesInHex:{type:Boolean,default:!1}},emits:["update:modelValue"],computed:{textFieldValue(){return this.convertToString(this.modelValue)},stateValue(){return this.statesInHex?"0x"+this.modelValue.toString(16):this.modelValue},selectValue(){return this.modelValue===""?null:this.modelValue},stateOptions(){return this.states?Object.keys(this.states).map(h=>({label:h,...this.states[h]})):null},hazardous(){var h,f;return((f=(h=Object.entries(this.states).find(([p,v])=>v.value===this.modelValue))==null?void 0:h.at(1))==null?void 0:f.hazardous)!==void 0},stateClass(){return this.hazardous?"hazardous mr-4":"mr-4"}},methods:{handleChange(h){this.$emit("update:modelValue",h)}}},q={key:1,class:"d-flex align-center"};function L(h,f,p,v,fe,M){const w=resolveComponent("v-text-field"),A=resolveComponent("v-select");return openBlock(),createElementBlock("div",null,[p.states?(openBlock(),createElementBlock("div",q,[createVNode(A,{items:M.stateOptions,"model-value":M.selectValue,"item-title":"label",class:normalizeClass(M.stateClass),"hide-details":"",density:"compact",variant:"outlined",placeholder:"Select...","min-width":"120px","data-test":"cmd-param-select","onUpdate:modelValue":M.handleChange},null,8,["items","model-value","class","onUpdate:modelValue"]),createVNode(w,{"model-value":M.stateValue,disabled:"","hide-details":"",density:"compact",variant:"outlined","min-width":"60px","data-test":"cmd-param-value"},null,8,["model-value"])])):(openBlock(),createBlock(w,{key:0,"model-value":M.textFieldValue,"hide-details":"",density:"compact",variant:"filled","data-test":"cmd-param-value","onUpdate:modelValue":M.handleChange},null,8,["model-value","onUpdate:modelValue"]))])}const H$1=d(F,[["render",L],["__scopeId","data-v-b38d5e7f"]]),z={name:"CommandEditor",components:{TargetPacketItemChooser:U,CommandParameterEditor:H$1,DetailsDialog:P$1},mixins:[s],props:{initialTargetName:{type:String,default:null},initialPacketName:{type:String,default:null},cmdString:{type:String,default:null},sendDisabled:{type:Boolean,default:!1},statesInHex:{type:Boolean,default:!1},showIgnoredParams:{type:Boolean,default:!1},cmdRaw:{type:Boolean,default:!1},showCommandButton:{type:Boolean,default:!0},showQueueSelect:{type:Boolean,default:!0}},emits:["command-changed","build-cmd"],data(){return{search:"",headers:[{title:"Name",value:"parameter_name"},{title:"Value or State",value:"val"},{title:"Units",value:"units"},{title:"Range",value:"range"},{title:"Description",value:"description"}],api:null,targetName:"",commandName:"",commandDescription:"",ignoredParams:[],computedRows:[],reservedItemNames:["PACKET_TIMESECONDS","PACKET_TIMEFORMATTED","RECEIVED_TIMESECONDS","RECEIVED_TIMEFORMATTED","RECEIVED_COUNT"],contextMenuShown:!1,viewDetails:!1,parameterName:"",x:0,y:0,contextMenuOptions:[{title:"Details",action:()=>{this.contextMenuShown=!1,this.viewDetails=!0}}]}},created(){this.api=new BA,this.cmdString?this.processCmdString():(this.targetName=this.initialTargetName,this.commandName=this.initialPacketName,this.updateCmdParams())},methods:{commandChanged(h){(this.targetName!==h.targetName||this.commandName!==h.packetName)&&(this.targetName=h.targetName,this.commandName=h.packetName,this.updateCmdParams()),this.$emit("command-changed",h)},buildCmd(h){this.$emit("build-cmd",h)},showContextMenu(h,f){h.preventDefault(),this.parameterName=f.item.parameter_name,this.contextMenuShown=!1,this.x=h.clientX,this.y=h.clientY,this.$nextTick(()=>{this.contextMenuShown=!0})},updateCmdParams(){this.ignoredParams=[],this.computedRows=[],this.targetName&&this.commandName&&this.api.get_target(this.targetName).then(h=>(this.ignoredParams=h.ignored_parameters,this.api.get_cmd(this.targetName,this.commandName)),h=>{console.error("Error getting ignored parameters:",h)}).then(h=>{h&&(h.items.forEach(f=>{if(!this.reservedItemNames.includes(f.name)&&!f.hidden&&(!this.ignoredParams.includes(f.name)||this.showIgnoredParams)){let p=f.default;!f.states&&f.data_type==="STRING"&&typeof f.default=="string"&&(p=`'${p}'`),f.required&&(p=null),f.format_string&&f.default&&(p=sprintf(f.format_string,f.default)),Object.prototype.toString.call(p).slice(8,-1)==="Object"&&(p=this.convertToString(p));let v="N/A";f.minimum!=null&&f.maximum!=null&&(f.data_type==="FLOAT"&&(f.minimum<-1e6&&(f.minimum=f.minimum.toExponential(3)),f.maximum>1e6&&(f.maximum=f.maximum.toExponential(3))),v=`${f.minimum}..${f.maximum}`),this.computedRows.push({parameter_name:f.name,val:p,states:f.states,description:f.description,range:v,units:f.units,type:f.data_type})}}),this.commandDescription=h.description,this.populateParametersFromParsed())},h=>{console.error("Error getting command parameters:",h)})},triggerUpdateCmdParams(){this.updateCmdParams()},getRows(){return this.computedRows},getCmdString(){let h=`${this.targetName} ${this.commandName}`;if(this.computedRows.length===0)return h;h+=" with";for(const f of this.computedRows){if(f.val===null)throw new Error(`Required parameter ${f.parameter_name} not set`);if(f.val!==null&&f.val!==void 0&&f.val!==""){if(f.states){const v=Object.entries(f.states).find(([,fe])=>fe.value===f.val);if(v){h+=` ${f.parameter_name} '${v[0]}',`;continue}}let p=this.convertToString(f.val);p.includes(" ")&&!this.isArray(p)?h+=` ${f.parameter_name} '${p}',`:h+=` ${f.parameter_name} ${p},`}}return h.slice(0,-1)},parseCmdString(h){const f=h.split(" ");if(f.length<2)return{target:"",command:"",params:{}};if(f.length===2)return{target:f[0],command:f[1],params:{}};if(f[2]!=="with")return{target:"",command:"",params:{}};const p=f[0],v=f[1];let fe={};const M=h.split(" with ")[1];let w=[],A=0,a="";for(let u of M)u==="["?(A++,a+=u):u==="]"?(A--,a+=u):u===","&&A===0?(w.push(a.trim()),a=""):a+=u;a.trim()!==""&&w.push(a.trim());for(let u of w){let n=u.indexOf(" ");if(n>0){let o=u.substring(0,n).trim(),r=u.substring(n+1).trim();fe[o]=r}}return{target:p,command:v,params:fe}},processCmdString(){const h=this.parseCmdString(this.cmdString);h.target&&h.command&&(this.targetName=h.target,this.commandName=h.command,this.parsedParameters=h.params,this.updateCmdParams())},populateParametersFromParsed(){!this.parsedParameters||Object.keys(this.parsedParameters).length===0||this.$nextTick(()=>{setTimeout(()=>{this.computedRows.forEach(h=>{if(this.parsedParameters.hasOwnProperty(h.parameter_name)){const f=this.parsedParameters[h.parameter_name];if(h.states&&typeof f=="string"){const p=Object.keys(h.states).find(v=>v===f||v.toLowerCase()===f.toLowerCase());p?h.val=h.states[p].value:h.val=f}else h.type==="STRING"&&typeof f=="string"?h.val=f.startsWith("'")||f.startsWith('"')?f:`'${f}'`:h.val=f}})},100)})}}},K={style:{padding:"10px"}};function G$1(h,f,p,v,fe,M){const w=resolveComponent("target-packet-item-chooser"),A=resolveComponent("v-spacer"),a=resolveComponent("v-text-field"),u=resolveComponent("v-card-title"),n=resolveComponent("command-parameter-editor"),o=resolveComponent("v-data-table"),r=resolveComponent("v-card"),i=resolveComponent("v-list-item-title"),e=resolveComponent("v-list-item"),t=resolveComponent("v-list"),c=resolveComponent("v-menu"),g=resolveComponent("details-dialog");return openBlock(),createBlock(r,null,{default:withCtx(()=>[createElementVNode("div",K,[createVNode(w,{"initial-target-name":fe.targetName,"initial-packet-name":fe.commandName,disabled:p.sendDisabled,"button-text":p.showCommandButton?"Send":null,"show-queue-select":p.showQueueSelect,mode:"cmd",onOnSet:f[0]||(f[0]=m=>M.commandChanged(m)),onAddItem:f[1]||(f[1]=m=>M.buildCmd(m))},null,8,["initial-target-name","initial-packet-name","disabled","button-text","show-queue-select"])]),fe.computedRows.length!==0?(openBlock(),createBlock(r,{key:0},{default:withCtx(()=>[createVNode(u,{class:"d-flex align-center justify-content-space-between"},{default:withCtx(()=>[f[5]||(f[5]=createTextVNode(" Parameters ",-1)),createVNode(A),createVNode(a,{modelValue:fe.search,"onUpdate:modelValue":f[2]||(f[2]=m=>fe.search=m),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",class:"search"},null,8,["modelValue"])]),_:1}),createVNode(o,{headers:fe.headers,items:fe.computedRows,search:fe.search,"items-per-page":-1,"hide-default-footer":"","multi-sort":"",density:"compact","onContextmenu:row":M.showContextMenu},{"item.val":withCtx(({item:m})=>[renderSlot(h.$slots,"parameter-editor",{item:m,statesInHex:p.statesInHex},()=>[createVNode(n,{modelValue:m.val,"onUpdate:modelValue":E=>m.val=E,states:m.states,"states-in-hex":p.statesInHex},null,8,["modelValue","onUpdate:modelValue","states","states-in-hex"])])]),_:3},8,["headers","items","search","onContextmenu:row"])]),_:3})):createCommentVNode("",!0),createVNode(c,{modelValue:fe.contextMenuShown,"onUpdate:modelValue":f[3]||(f[3]=m=>fe.contextMenuShown=m),target:[fe.x,fe.y]},{default:withCtx(()=>[createVNode(t,null,{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(fe.contextMenuOptions,(m,E)=>(openBlock(),createBlock(e,{key:E,onClick:withModifiers(m.action,["stop"])},{default:withCtx(()=>[createVNode(i,null,{default:withCtx(()=>[createTextVNode(toDisplayString(m.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),createVNode(g,{modelValue:fe.viewDetails,"onUpdate:modelValue":f[4]||(f[4]=m=>fe.viewDetails=m),"target-name":fe.targetName,"packet-name":fe.commandName,"item-name":fe.parameterName,type:"cmd"},null,8,["modelValue","target-name","packet-name","item-name"])]),_:3})}const ie$1=d(z,[["render",G$1]]);var ace$1={exports:{}},hasRequiredAce;function requireAce(){return hasRequiredAce||(hasRequiredAce=1,function(h,f){(function(){var p="ace",v=function(){return this}();!v&&typeof window<"u"&&(v=window);var fe=function(n,o,r){if(typeof n!="string"){fe.original?fe.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(r=o),fe.modules[n]||(fe.payloads[n]=r,fe.modules[n]=null)};fe.modules={},fe.payloads={};var M=function(n,o,r){if(typeof o=="string"){var i=a(n,o);if(i!=null)return r&&r(),i}else if(Object.prototype.toString.call(o)==="[object Array]"){for(var e=[],t=0,c=o.length;t<c;++t){var g=a(n,o[t]);if(g==null&&w.original)return;e.push(g)}return r&&r.apply(null,e)||!0}},w=function(n,o){var r=M("",n,o);return r==null&&w.original?w.original.apply(this,arguments):r},A=function(n,o){if(o.indexOf("!")!==-1){var r=o.split("!");return A(n,r[0])+"!"+A(n,r[1])}if(o.charAt(0)=="."){var i=n.split("/").slice(0,-1).join("/");for(o=i+"/"+o;o.indexOf(".")!==-1&&e!=o;){var e=o;o=o.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return o},a=function(n,o){o=A(n,o);var r=fe.modules[o];if(!r){if(r=fe.payloads[o],typeof r=="function"){var i={},e={id:o,uri:"",exports:i,packaged:!0},t=function(g,m){return M(o,g,m)},c=r(t,i,e);i=c||e.exports,fe.modules[o]=i,delete fe.payloads[o]}r=fe.modules[o]=i||r}return r};function u(n){var o=v;v[n]||(v[n]={}),o=v[n],(!o.define||!o.define.packaged)&&(fe.original=o.define,o.define=fe,o.define.packaged=!0),(!o.require||!o.require.packaged)&&(w.original=o.require,o.require=w,o.require.packaged=!0)}u(p)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(p,v,fe){function M(w,A,a){Object.defineProperty(w,A,{value:a,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||M(String.prototype,"startsWith",function(w,A){return A=A||0,this.lastIndexOf(w,A)===A}),String.prototype.endsWith||M(String.prototype,"endsWith",function(w,A){var a=this;(A===void 0||A>a.length)&&(A=a.length),A-=w.length;var u=a.indexOf(w,A);return u!==-1&&u===A}),String.prototype.repeat||M(String.prototype,"repeat",function(w){for(var A="",a=this;w>0;)w&1&&(A+=a),(w>>=1)&&(a+=a);return A}),String.prototype.includes||M(String.prototype,"includes",function(w,A){return this.indexOf(w,A)!=-1}),Object.assign||(Object.assign=function(w){if(w==null)throw new TypeError("Cannot convert undefined or null to object");for(var A=Object(w),a=1;a<arguments.length;a++){var u=arguments[a];u!=null&&Object.keys(u).forEach(function(n){A[n]=u[n]})}return A}),Object.values||(Object.values=function(w){return Object.keys(w).map(function(A){return w[A]})}),Array.prototype.find||M(Array.prototype,"find",function(w){for(var A=this.length,a=arguments[1],u=0;u<A;u++){var n=this[u];if(w.call(a,n,u,this))return n}}),Array.prototype.findIndex||M(Array.prototype,"findIndex",function(w){for(var A=this.length,a=arguments[1],u=0;u<A;u++){var n=this[u];if(w.call(a,n,u,this))return u}}),Array.prototype.includes||M(Array.prototype,"includes",function(w,A){return this.indexOf(w,A)!=-1}),Array.prototype.fill||M(Array.prototype,"fill",function(w){for(var A=this,a=A.length>>>0,u=arguments[1],n=u>>0,o=n<0?Math.max(a+n,0):Math.min(n,a),r=arguments[2],i=r===void 0?a:r>>0,e=i<0?Math.max(a+i,0):Math.min(i,a);o<e;)A[o]=w,o++;return A}),Array.of||M(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(p,v,fe){p("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(p,v,fe){v.deepCopy=function M(w){if(typeof w!="object"||!w)return w;var A;if(Array.isArray(w)){A=[];for(var a=0;a<w.length;a++)A[a]=M(w[a]);return A}if(Object.prototype.toString.call(w)!=="[object Object]")return w;A={};for(var a in w)A[a]=M(w[a]);return A}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(p,v,fe){v.last=function(A){return A[A.length-1]},v.stringReverse=function(A){return A.split("").reverse().join("")},v.stringRepeat=function(A,a){for(var u="";a>0;)a&1&&(u+=A),(a>>=1)&&(A+=A);return u};var M=/^\s\s*/,w=/\s\s*$/;v.stringTrimLeft=function(A){return A.replace(M,"")},v.stringTrimRight=function(A){return A.replace(w,"")},v.copyObject=function(A){var a={};for(var u in A)a[u]=A[u];return a},v.copyArray=function(A){for(var a=[],u=0,n=A.length;u<n;u++)A[u]&&typeof A[u]=="object"?a[u]=this.copyObject(A[u]):a[u]=A[u];return a},v.deepCopy=p("./deep_copy").deepCopy,v.arrayToMap=function(A){for(var a={},u=0;u<A.length;u++)a[A[u]]=1;return a},v.createMap=function(A){var a=Object.create(null);for(var u in A)a[u]=A[u];return a},v.arrayRemove=function(A,a){for(var u=0;u<=A.length;u++)a===A[u]&&A.splice(u,1)},v.escapeRegExp=function(A){return A.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},v.escapeHTML=function(A){return(""+A).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},v.getMatchOffsets=function(A,a){var u=[];return A.replace(a,function(n){u.push({offset:arguments[arguments.length-2],length:n.length})}),u},v.deferredCall=function(A){var a=null,u=function(){a=null,A()},n=function(o){return n.cancel(),a=setTimeout(u,o||0),n};return n.schedule=n,n.call=function(){return this.cancel(),A(),n},n.cancel=function(){return clearTimeout(a),a=null,n},n.isPending=function(){return a},n},v.delayedCall=function(A,a){var u=null,n=function(){u=null,A()},o=function(r){u==null&&(u=setTimeout(n,r||a))};return o.delay=function(r){u&&clearTimeout(u),u=setTimeout(n,r||a)},o.schedule=o,o.call=function(){this.cancel(),A()},o.cancel=function(){u&&clearTimeout(u),u=null},o.isPending=function(){return u},o},v.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},v.skipEmptyMatch=function(A,a,u){return u&&A.codePointAt(a)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(p,v,fe){v.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},v.getOS=function(){return v.isMac?v.OS.MAC:v.isLinux?v.OS.LINUX:v.OS.WINDOWS};var M=typeof navigator=="object"?navigator:{},w=(/mac|win|linux/i.exec(M.platform)||["other"])[0].toLowerCase(),A=M.userAgent||"",a=M.appName||"";v.isWin=w=="win",v.isMac=w=="mac",v.isLinux=w=="linux",v.isIE=a=="Microsoft Internet Explorer"||a.indexOf("MSAppHost")>=0?parseFloat((A.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((A.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),v.isOldIE=v.isIE&&v.isIE<9,v.isGecko=v.isMozilla=A.match(/ Gecko\/\d+/),v.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",v.isWebKit=parseFloat(A.split("WebKit/")[1])||void 0,v.isChrome=parseFloat(A.split(" Chrome/")[1])||void 0,v.isSafari=parseFloat(A.split(" Safari/")[1])&&!v.isChrome||void 0,v.isEdge=parseFloat(A.split(" Edge/")[1])||void 0,v.isAIR=A.indexOf("AdobeAIR")>=0,v.isAndroid=A.indexOf("Android")>=0,v.isChromeOS=A.indexOf(" CrOS ")>=0,v.isIOS=/iPad|iPhone|iPod/.test(A)&&!window.MSStream,v.isIOS&&(v.isMac=!0),v.isMobile=v.isIOS||v.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(p,v,fe){var M=p("./useragent"),w="http://www.w3.org/1999/xhtml";v.buildDom=function r(i,e,t){if(typeof i=="string"&&i){var c=document.createTextNode(i);return e&&e.appendChild(c),c}if(!Array.isArray(i))return i&&i.appendChild&&e&&e.appendChild(i),i;if(typeof i[0]!="string"||!i[0]){for(var g=[],m=0;m<i.length;m++){var E=r(i[m],e,t);E&&g.push(E)}return g}var T=document.createElement(i[0]),x=i[1],b=1;x&&typeof x=="object"&&!Array.isArray(x)&&(b=2);for(var m=b;m<i.length;m++)r(i[m],T,t);return b==2&&Object.keys(x).forEach(function(de){var Te=x[de];de==="class"?T.className=Array.isArray(Te)?Te.join(" "):Te:typeof Te=="function"||de=="value"||de[0]=="$"?T[de]=Te:de==="ref"?t&&(t[Te]=T):de==="style"?typeof Te=="string"&&(T.style.cssText=Te):Te!=null&&T.setAttribute(de,Te)}),e&&e.appendChild(T),T},v.getDocumentHead=function(r){return r||(r=document),r.head||r.getElementsByTagName("head")[0]||r.documentElement},v.createElement=function(r,i){return document.createElementNS?document.createElementNS(i||w,r):document.createElement(r)},v.removeChildren=function(r){r.innerHTML=""},v.createTextNode=function(r,i){var e=i?i.ownerDocument:document;return e.createTextNode(r)},v.createFragment=function(r){var i=r?r.ownerDocument:document;return i.createDocumentFragment()},v.hasCssClass=function(r,i){var e=(r.className+"").split(/\s+/g);return e.indexOf(i)!==-1},v.addCssClass=function(r,i){v.hasCssClass(r,i)||(r.className+=" "+i)},v.removeCssClass=function(r,i){for(var e=r.className.split(/\s+/g);;){var t=e.indexOf(i);if(t==-1)break;e.splice(t,1)}r.className=e.join(" ")},v.toggleCssClass=function(r,i){for(var e=r.className.split(/\s+/g),t=!0;;){var c=e.indexOf(i);if(c==-1)break;t=!1,e.splice(c,1)}return t&&e.push(i),r.className=e.join(" "),t},v.setCssClass=function(r,i,e){e?v.addCssClass(r,i):v.removeCssClass(r,i)},v.hasCssString=function(r,i){var e=0,t;if(i=i||document,t=i.querySelectorAll("style")){for(;e<t.length;)if(t[e++].id===r)return!0}},v.removeElementById=function(r,i){i=i||document,i.getElementById(r)&&i.getElementById(r).remove()};var A,a=[];v.useStrictCSP=function(r){A=r,r==!1?u():a||(a=[])};function u(){var r=a;a=null,r&&r.forEach(function(i){n(i[0],i[1])})}function n(r,i,e){if(!(typeof document>"u")){if(a){if(e)u();else if(e===!1)return a.push([r,i])}if(!A){var t=e;!e||!e.getRootNode?t=document:(t=e.getRootNode(),(!t||t==e)&&(t=document));var c=t.ownerDocument||t;if(i&&v.hasCssString(i,t))return null;i&&(r+=`
|
|
@@ -166,7 +166,7 @@ System.register(["./main-3c23de0ae474ebedfc99.js","vue","./TargetPacketItemChoos
|
|
|
166
166
|
.ace-tm .ace_indent-guide-active {
|
|
167
167
|
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
|
|
168
168
|
}
|
|
169
|
-
`}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(p,v,fe){v.isDark=!1,v.cssClass="ace-tm",v.cssText=p("./textmate-css"),v.$id="ace/theme/textmate";var M=p("../lib/dom");M.importCssString(v.cssText,v.cssClass,!1)}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(p,v,fe){"no use strict";var M=p("./lib/lang"),w=p("./lib/net"),A=p("./lib/dom"),a=p("./lib/app_config").AppConfig;fe.exports=v=new a;var u={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};v.get=function(i){if(!u.hasOwnProperty(i))throw new Error("Unknown config key: "+i);return u[i]},v.set=function(i,e){if(u.hasOwnProperty(i))u[i]=e;else if(this.setDefaultValue("",i,e)==!1)throw new Error("Unknown config key: "+i);i=="useStrictCSP"&&A.useStrictCSP(e)},v.all=function(){return M.copyObject(u)},v.$modes={},v.moduleUrl=function(i,e){if(u.$moduleUrls[i])return u.$moduleUrls[i];var t=i.split("/");e=e||t[t.length-2]||"";var c=e=="snippets"?"/":"-",g=t[t.length-1];if(e=="worker"&&c=="-"){var m=new RegExp("^"+e+"[\\-_]|[\\-_]"+e+"$","g");g=g.replace(m,"")}(!g||g==e)&&t.length>1&&(g=t[t.length-2]);var E=u[e+"Path"];return E==null?E=u.basePath:c=="/"&&(e=c=""),E&&E.slice(-1)!="/"&&(E+="/"),E+e+c+g+this.get("suffix")},v.setModuleUrl=function(i,e){return u.$moduleUrls[i]=e};var n=function(i,e){if(i==="ace/theme/textmate"||i==="./theme/textmate")return e(null,p("./theme/textmate"));if(o)return o(i,e);console.error("loader is not configured")},o;v.setLoader=function(i){o=i},v.dynamicModules=Object.create(null),v.$loading={},v.$loaded={},v.loadModule=function(i,e){var t;if(Array.isArray(i))var c=i[0],g=i[1];else if(typeof i=="string")var g=i;var m=function(E){if(E&&!v.$loading[g])return e&&e(E);if(v.$loading[g]||(v.$loading[g]=[]),v.$loading[g].push(e),!(v.$loading[g].length>1)){var T=function(){n(g,function(x,b){b&&(v.$loaded[g]=b),v._emit("load.module",{name:g,module:b});var de=v.$loading[g];v.$loading[g]=null,de.forEach(function(Te){Te&&Te(b)})})};if(!v.get("packaged"))return T();w.loadScript(v.moduleUrl(g,c),T),r()}};if(v.dynamicModules[g])v.dynamicModules[g]().then(function(E){E.default?m(E.default):m(E)});else{try{t=this.$require(g)}catch{}m(t||v.$loaded[g])}},v.$require=function(i){if(typeof fe.require=="function"){var e="require";return fe[e](i)}},v.setModuleLoader=function(i,e){v.dynamicModules[i]=e};var r=function(){!u.basePath&&!u.workerPath&&!u.modePath&&!u.themePath&&!Object.keys(u.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),r=function(){})};v.version="1.43.4"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(p,v,fe){p("./lib/fixoldbrowsers");var M=p("./config");M.setLoader(function(u,n){p([u],function(o){n(null,o)})});var w=function(){return this||typeof window<"u"&&window}();fe.exports=function(u){M.init=A,M.$require=p,u.require=p},A(!0);function A(u){if(!(!w||!w.document)){M.set("packaged",u||p.packaged||fe.packaged||w.define&&(void 0).packaged);var n={},o="",r=document.currentScript||document._currentScript,i=r&&r.ownerDocument||document;r&&r.src&&(o=r.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var e=i.getElementsByTagName("script"),t=0;t<e.length;t++){var c=e[t],g=c.src||c.getAttribute("src");if(g){for(var m=c.attributes,E=0,T=m.length;E<T;E++){var x=m[E];x.name.indexOf("data-ace-")===0&&(n[a(x.name.replace(/^data-ace-/,""))]=x.value)}var b=g.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);b&&(o=b[1])}}o&&(n.base=n.base||o,n.packaged=!0),n.basePath=n.base,n.workerPath=n.workerPath||n.base,n.modePath=n.modePath||n.base,n.themePath=n.themePath||n.base,delete n.base;for(var de in n)typeof n[de]<"u"&&M.set(de,n[de])}}function a(u){return u.replace(/-(.)/g,function(n,o){return o.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(p,v,fe){var M=function(){function w(A,a,u,n){this.start={row:A,column:a},this.end={row:u,column:n}}return w.prototype.isEqual=function(A){return this.start.row===A.start.row&&this.end.row===A.end.row&&this.start.column===A.start.column&&this.end.column===A.end.column},w.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},w.prototype.contains=function(A,a){return this.compare(A,a)==0},w.prototype.compareRange=function(A){var a,u=A.end,n=A.start;return a=this.compare(u.row,u.column),a==1?(a=this.compare(n.row,n.column),a==1?2:a==0?1:0):a==-1?-2:(a=this.compare(n.row,n.column),a==-1?-1:a==1?42:0)},w.prototype.comparePoint=function(A){return this.compare(A.row,A.column)},w.prototype.containsRange=function(A){return this.comparePoint(A.start)==0&&this.comparePoint(A.end)==0},w.prototype.intersects=function(A){var a=this.compareRange(A);return a==-1||a==0||a==1},w.prototype.isEnd=function(A,a){return this.end.row==A&&this.end.column==a},w.prototype.isStart=function(A,a){return this.start.row==A&&this.start.column==a},w.prototype.setStart=function(A,a){typeof A=="object"?(this.start.column=A.column,this.start.row=A.row):(this.start.row=A,this.start.column=a)},w.prototype.setEnd=function(A,a){typeof A=="object"?(this.end.column=A.column,this.end.row=A.row):(this.end.row=A,this.end.column=a)},w.prototype.inside=function(A,a){return this.compare(A,a)==0?!(this.isEnd(A,a)||this.isStart(A,a)):!1},w.prototype.insideStart=function(A,a){return this.compare(A,a)==0?!this.isEnd(A,a):!1},w.prototype.insideEnd=function(A,a){return this.compare(A,a)==0?!this.isStart(A,a):!1},w.prototype.compare=function(A,a){return!this.isMultiLine()&&A===this.start.row?a<this.start.column?-1:a>this.end.column?1:0:A<this.start.row?-1:A>this.end.row?1:this.start.row===A?a>=this.start.column?0:-1:this.end.row===A?a<=this.end.column?0:1:0},w.prototype.compareStart=function(A,a){return this.start.row==A&&this.start.column==a?-1:this.compare(A,a)},w.prototype.compareEnd=function(A,a){return this.end.row==A&&this.end.column==a?1:this.compare(A,a)},w.prototype.compareInside=function(A,a){return this.end.row==A&&this.end.column==a?1:this.start.row==A&&this.start.column==a?-1:this.compare(A,a)},w.prototype.clipRows=function(A,a){if(this.end.row>a)var u={row:a+1,column:0};else if(this.end.row<A)var u={row:A,column:0};if(this.start.row>a)var n={row:a+1,column:0};else if(this.start.row<A)var n={row:A,column:0};return w.fromPoints(n||this.start,u||this.end)},w.prototype.extend=function(A,a){var u=this.compare(A,a);if(u==0)return this;if(u==-1)var n={row:A,column:a};else var o={row:A,column:a};return w.fromPoints(n||this.start,o||this.end)},w.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},w.prototype.isMultiLine=function(){return this.start.row!==this.end.row},w.prototype.clone=function(){return w.fromPoints(this.start,this.end)},w.prototype.collapseRows=function(){return this.end.column==0?new w(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new w(this.start.row,0,this.end.row,0)},w.prototype.toScreenRange=function(A){var a=A.documentToScreenPosition(this.start),u=A.documentToScreenPosition(this.end);return new w(a.row,a.column,u.row,u.column)},w.prototype.moveBy=function(A,a){this.start.row+=A,this.start.column+=a,this.end.row+=A,this.end.column+=a},w}();M.fromPoints=function(w,A){return new M(w.row,w.column,A.row,A.column)},M.comparePoints=function(w,A){return w.row-A.row||w.column-A.column},v.Range=M}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(p,v,fe){for(var M=p("./oop"),w={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete","-13":"NumpadEnter",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",59:";",61:"=",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}},A={Command:224,Backspace:8,Tab:9,Return:13,Enter:13,Pause:19,Escape:27,PageUp:33,PageDown:34,End:35,Home:36,Insert:45,Delete:46,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Backquote:192,Minus:189,Equal:187,BracketLeft:219,Backslash:220,BracketRight:221,Semicolon:186,Quote:222,Comma:188,Period:190,Slash:191,Space:32,NumpadAdd:107,NumpadDecimal:110,NumpadSubtract:109,NumpadDivide:111,NumpadMultiply:106},a=0;a<10;a++)A["Digit"+a]=48+a,A["Numpad"+a]=96+a,w.PRINTABLE_KEYS[48+a]=""+a,w.FUNCTION_KEYS[96+a]="Numpad"+a;for(var a=65;a<91;a++){var u=String.fromCharCode(a+32);A["Key"+u.toUpperCase()]=a,w.PRINTABLE_KEYS[a]=u}for(var a=1;a<13;a++)A["F"+a]=111+a,w.FUNCTION_KEYS[111+a]="F"+a;var n={Shift:16,Control:17,Alt:18,Meta:224};for(var o in n)A[o]=A[o+"Left"]=A[o+"Right"]=n[o];v.$codeToKeyCode=A,w.PRINTABLE_KEYS[173]="-";for(var r in w.FUNCTION_KEYS){var i=w.FUNCTION_KEYS[r].toLowerCase();w[i]=parseInt(r,10)}for(var r in w.PRINTABLE_KEYS){var i=w.PRINTABLE_KEYS[r].toLowerCase();w[i]=parseInt(r,10)}M.mixin(w,w.MODIFIER_KEYS),M.mixin(w,w.PRINTABLE_KEYS),M.mixin(w,w.FUNCTION_KEYS),w.enter=w.return,w.escape=w.esc,w.del=w.delete,function(){for(var e=["cmd","ctrl","alt","shift"],t=Math.pow(2,e.length);t--;)w.KEY_MODS[t]=e.filter(function(c){return t&w.KEY_MODS[c]}).join("-")+"-"}(),w.KEY_MODS[0]="",w.KEY_MODS[-1]="input-",M.mixin(v,w),v.default=v,v.keyCodeToString=function(e){var t=w[e];return typeof t!="string"&&(t=String.fromCharCode(e)),t.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(p,v,fe){var M=p("./keys"),w=p("./useragent"),A=null,a=0,u;function n(){u=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return u={passive:!1},!0}})}catch{}}function o(){return u==null&&n(),u}function r(E,T,x){this.elem=E,this.type=T,this.callback=x}r.prototype.destroy=function(){e(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var i=v.addListener=function(E,T,x,b){E.addEventListener(T,x,o()),b&&b.$toDestroy.push(new r(E,T,x))},e=v.removeListener=function(E,T,x){E.removeEventListener(T,x,o())};v.stopEvent=function(E){return v.stopPropagation(E),v.preventDefault(E),!1},v.stopPropagation=function(E){E.stopPropagation&&E.stopPropagation()},v.preventDefault=function(E){E.preventDefault&&E.preventDefault()},v.getButton=function(E){return E.type=="dblclick"?0:E.type=="contextmenu"||w.isMac&&E.ctrlKey&&!E.altKey&&!E.shiftKey?2:E.button},v.capture=function(E,T,x){var b=E&&E.ownerDocument||document;function de(Te){T&&T(Te),x&&x(Te),e(b,"mousemove",T),e(b,"mouseup",de),e(b,"dragstart",de)}return i(b,"mousemove",T),i(b,"mouseup",de),i(b,"dragstart",de),de},v.addMouseWheelListener=function(E,T,x){i(E,"wheel",function(b){var de=.15,Te=b.deltaX||0,he=b.deltaY||0;switch(b.deltaMode){case b.DOM_DELTA_PIXEL:b.wheelX=Te*de,b.wheelY=he*de;break;case b.DOM_DELTA_LINE:var Y=15;b.wheelX=Te*Y,b.wheelY=he*Y;break;case b.DOM_DELTA_PAGE:var gt=150;b.wheelX=Te*gt,b.wheelY=he*gt;break}T(b)},x)},v.addMultiMouseDownListener=function(E,T,x,b,de){var Te=0,he,Y,gt,V={2:"dblclick",3:"tripleclick",4:"quadclick"};function O(S){if(v.getButton(S)!==0?Te=0:S.detail>1?(Te++,Te>4&&(Te=1)):Te=1,w.isIE){var y=Math.abs(S.clientX-he)>5||Math.abs(S.clientY-Y)>5;(!gt||y)&&(Te=1),gt&&clearTimeout(gt),gt=setTimeout(function(){gt=null},T[Te-1]||600),Te==1&&(he=S.clientX,Y=S.clientY)}if(S._clicks=Te,x[b]("mousedown",S),Te>4)Te=0;else if(Te>1)return x[b](V[Te],S)}Array.isArray(E)||(E=[E]),E.forEach(function(S){i(S,"mousedown",O,de)})};function t(E){return 0|(E.ctrlKey?1:0)|(E.altKey?2:0)|(E.shiftKey?4:0)|(E.metaKey?8:0)}v.getModifierString=function(E){return M.KEY_MODS[t(E)]};function c(E,T,x){var b=t(T);if(!x&&T.code&&(x=M.$codeToKeyCode[T.code]||x),!w.isMac&&A){if(T.getModifierState&&(T.getModifierState("OS")||T.getModifierState("Win"))&&(b|=8),A.altGr)if((3&b)!=3)A.altGr=0;else return;if(x===18||x===17){var de=T.location;if(x===17&&de===1)A[x]==1&&(a=T.timeStamp);else if(x===18&&b===3&&de===2){var Te=T.timeStamp-a;Te<50&&(A.altGr=!0)}}}if(x in M.MODIFIER_KEYS&&(x=-1),!(!b&&x===13&&T.location===3&&(E(T,b,-x),T.defaultPrevented))){if(w.isChromeOS&&b&8){if(E(T,b,x),T.defaultPrevented)return;b&=-9}return!b&&!(x in M.FUNCTION_KEYS)&&!(x in M.PRINTABLE_KEYS)?!1:E(T,b,x)}}v.addCommandKeyListener=function(E,T,x){var b=null;i(E,"keydown",function(de){A[de.keyCode]=(A[de.keyCode]||0)+1;var Te=c(T,de,de.keyCode);return b=de.defaultPrevented,Te},x),i(E,"keypress",function(de){b&&(de.ctrlKey||de.altKey||de.shiftKey||de.metaKey)&&(v.stopEvent(de),b=null)},x),i(E,"keyup",function(de){A[de.keyCode]=null},x),A||(g(),i(window,"focus",g))};function g(){A=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!w.isOldIE){var m=1;v.nextTick=function(E,T){T=T||window;var x="zero-timeout-message-"+m++,b=function(de){de.data==x&&(v.stopPropagation(de),e(T,"message",b),E())};i(T,"message",b),T.postMessage(x,"*")}}v.$idleBlocked=!1,v.onIdle=function(E,T){return setTimeout(function x(){v.$idleBlocked?setTimeout(x,100):E()},T)},v.$idleBlockId=null,v.blockIdle=function(E){v.$idleBlockId&&clearTimeout(v.$idleBlockId),v.$idleBlocked=!0,v.$idleBlockId=setTimeout(function(){v.$idleBlocked=!1},E||100)},v.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),v.nextFrame?v.nextFrame=v.nextFrame.bind(window):v.nextFrame=function(E){setTimeout(E,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(p,v,fe){var M;fe.exports={lineMode:!1,pasteCancelled:function(){return M&&M>Date.now()-50?!0:M=!1},cancel:function(){M=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(p,v,fe){var M=p("../lib/event"),w=p("../config").nls,A=p("../lib/useragent"),a=p("../lib/dom"),u=p("../lib/lang"),n=p("../clipboard"),o=A.isChrome<18,r=A.isIE,i=A.isChrome>63,e=400,t=p("../lib/keys"),c=t.KEY_MODS,g=A.isIOS,m=g?/\s/:/\n/,E=A.isMobile,T=function(){function x(b,de){var Te=this;this.host=de,this.text=a.createElement("textarea"),this.text.className="ace_text-input",this.text.setAttribute("wrap","off"),this.text.setAttribute("autocomplete","off"),this.text.setAttribute("autocorrect","off"),this.text.setAttribute("autocapitalize","off"),this.text.setAttribute("spellcheck","false"),this.text.style.opacity="0",b.insertBefore(this.text,b.firstChild),this.copied=!1,this.pasted=!1,this.inComposition=!1,this.sendingText=!1,this.tempStyle="",E||(this.text.style.fontSize="1px"),this.commandMode=!1,this.ignoreFocusEvents=!1,this.lastValue="",this.lastSelectionStart=0,this.lastSelectionEnd=0,this.lastRestoreEnd=0,this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,this.numberOfExtraLines=0;try{this.$isFocused=document.activeElement===this.text}catch{}this.cancelComposition=this.cancelComposition.bind(this),this.setAriaOptions({role:"textbox"}),M.addListener(this.text,"blur",function(he){Te.ignoreFocusEvents||(de.onBlur(he),Te.$isFocused=!1)},de),M.addListener(this.text,"focus",function(he){if(!Te.ignoreFocusEvents){if(Te.$isFocused=!0,A.isEdge)try{if(!document.hasFocus())return}catch{}de.onFocus(he),A.isEdge?setTimeout(Te.resetSelection.bind(Te)):Te.resetSelection()}},de),this.$focusScroll=!1,de.on("beforeEndOperation",function(){var he=de.curOp,Y=he&&he.command&&he.command.name;if(Y!="insertstring"){var gt=Y&&(he.docChanged||he.selectionChanged);Te.inComposition&>&&(Te.lastValue=Te.text.value="",Te.onCompositionEnd()),Te.resetSelection()}}),de.on("changeSelection",this.setAriaLabel.bind(this)),this.resetSelection=g?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&de.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,M.addCommandKeyListener(this.text,function(he,Y,gt){if(!Te.inComposition)return de.onCommandKey(he,Y,gt)},de),M.addListener(this.text,"select",this.onSelect.bind(this),de),M.addListener(this.text,"input",this.onInput.bind(this),de),M.addListener(this.text,"cut",this.onCut.bind(this),de),M.addListener(this.text,"copy",this.onCopy.bind(this),de),M.addListener(this.text,"paste",this.onPaste.bind(this),de),(!("oncut"in this.text)||!("oncopy"in this.text)||!("onpaste"in this.text))&&M.addListener(b,"keydown",function(he){if(!(A.isMac&&!he.metaKey||!he.ctrlKey))switch(he.keyCode){case 67:Te.onCopy(he);break;case 86:Te.onPaste(he);break;case 88:Te.onCut(he);break}},de),this.syncComposition=u.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),M.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),de),M.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),de),M.addListener(this.text,"keyup",this.onKeyup.bind(this),de),M.addListener(this.text,"keydown",this.syncComposition.bind(this),de),M.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),de),this.closeTimeout,M.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),de),M.addListener(this.text,"mousedown",function(he){he.preventDefault(),Te.onContextMenuClose()},de),M.addListener(de.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),de),M.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),de),g&&this.addIosSelectionHandler(b,de,this.text)}return x.prototype.addIosSelectionHandler=function(b,de,Te){var he=this,Y=null,gt=!1;Te.addEventListener("keydown",function(O){Y&&clearTimeout(Y),gt=!0},!0),Te.addEventListener("keyup",function(O){Y=setTimeout(function(){gt=!1},100)},!0);var V=function(O){if(document.activeElement===Te&&!(gt||he.inComposition||de.$mouseHandler.isMousePressed)&&!he.copied){var S=Te.selectionStart,y=Te.selectionEnd,I=null,ke=0;if(S==0?I=t.up:S==1?I=t.home:y>he.lastSelectionEnd&&he.lastValue[y]==`
|
|
169
|
+
`}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(p,v,fe){v.isDark=!1,v.cssClass="ace-tm",v.cssText=p("./textmate-css"),v.$id="ace/theme/textmate";var M=p("../lib/dom");M.importCssString(v.cssText,v.cssClass,!1)}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(p,v,fe){"no use strict";var M=p("./lib/lang"),w=p("./lib/net"),A=p("./lib/dom"),a=p("./lib/app_config").AppConfig;fe.exports=v=new a;var u={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};v.get=function(i){if(!u.hasOwnProperty(i))throw new Error("Unknown config key: "+i);return u[i]},v.set=function(i,e){if(u.hasOwnProperty(i))u[i]=e;else if(this.setDefaultValue("",i,e)==!1)throw new Error("Unknown config key: "+i);i=="useStrictCSP"&&A.useStrictCSP(e)},v.all=function(){return M.copyObject(u)},v.$modes={},v.moduleUrl=function(i,e){if(u.$moduleUrls[i])return u.$moduleUrls[i];var t=i.split("/");e=e||t[t.length-2]||"";var c=e=="snippets"?"/":"-",g=t[t.length-1];if(e=="worker"&&c=="-"){var m=new RegExp("^"+e+"[\\-_]|[\\-_]"+e+"$","g");g=g.replace(m,"")}(!g||g==e)&&t.length>1&&(g=t[t.length-2]);var E=u[e+"Path"];return E==null?E=u.basePath:c=="/"&&(e=c=""),E&&E.slice(-1)!="/"&&(E+="/"),E+e+c+g+this.get("suffix")},v.setModuleUrl=function(i,e){return u.$moduleUrls[i]=e};var n=function(i,e){if(i==="ace/theme/textmate"||i==="./theme/textmate")return e(null,p("./theme/textmate"));if(o)return o(i,e);console.error("loader is not configured")},o;v.setLoader=function(i){o=i},v.dynamicModules=Object.create(null),v.$loading={},v.$loaded={},v.loadModule=function(i,e){var t;if(Array.isArray(i))var c=i[0],g=i[1];else if(typeof i=="string")var g=i;var m=function(E){if(E&&!v.$loading[g])return e&&e(E);if(v.$loading[g]||(v.$loading[g]=[]),v.$loading[g].push(e),!(v.$loading[g].length>1)){var T=function(){n(g,function(x,b){b&&(v.$loaded[g]=b),v._emit("load.module",{name:g,module:b});var de=v.$loading[g];v.$loading[g]=null,de.forEach(function(Te){Te&&Te(b)})})};if(!v.get("packaged"))return T();w.loadScript(v.moduleUrl(g,c),T),r()}};if(v.dynamicModules[g])v.dynamicModules[g]().then(function(E){E.default?m(E.default):m(E)});else{try{t=this.$require(g)}catch{}m(t||v.$loaded[g])}},v.$require=function(i){if(typeof fe.require=="function"){var e="require";return fe[e](i)}},v.setModuleLoader=function(i,e){v.dynamicModules[i]=e};var r=function(){!u.basePath&&!u.workerPath&&!u.modePath&&!u.themePath&&!Object.keys(u.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),r=function(){})};v.version="1.43.5"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(p,v,fe){p("./lib/fixoldbrowsers");var M=p("./config");M.setLoader(function(u,n){p([u],function(o){n(null,o)})});var w=function(){return this||typeof window<"u"&&window}();fe.exports=function(u){M.init=A,M.$require=p,u.require=p},A(!0);function A(u){if(!(!w||!w.document)){M.set("packaged",u||p.packaged||fe.packaged||w.define&&(void 0).packaged);var n={},o="",r=document.currentScript||document._currentScript,i=r&&r.ownerDocument||document;r&&r.src&&(o=r.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var e=i.getElementsByTagName("script"),t=0;t<e.length;t++){var c=e[t],g=c.src||c.getAttribute("src");if(g){for(var m=c.attributes,E=0,T=m.length;E<T;E++){var x=m[E];x.name.indexOf("data-ace-")===0&&(n[a(x.name.replace(/^data-ace-/,""))]=x.value)}var b=g.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);b&&(o=b[1])}}o&&(n.base=n.base||o,n.packaged=!0),n.basePath=n.base,n.workerPath=n.workerPath||n.base,n.modePath=n.modePath||n.base,n.themePath=n.themePath||n.base,delete n.base;for(var de in n)typeof n[de]<"u"&&M.set(de,n[de])}}function a(u){return u.replace(/-(.)/g,function(n,o){return o.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(p,v,fe){var M=function(){function w(A,a,u,n){this.start={row:A,column:a},this.end={row:u,column:n}}return w.prototype.isEqual=function(A){return this.start.row===A.start.row&&this.end.row===A.end.row&&this.start.column===A.start.column&&this.end.column===A.end.column},w.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},w.prototype.contains=function(A,a){return this.compare(A,a)==0},w.prototype.compareRange=function(A){var a,u=A.end,n=A.start;return a=this.compare(u.row,u.column),a==1?(a=this.compare(n.row,n.column),a==1?2:a==0?1:0):a==-1?-2:(a=this.compare(n.row,n.column),a==-1?-1:a==1?42:0)},w.prototype.comparePoint=function(A){return this.compare(A.row,A.column)},w.prototype.containsRange=function(A){return this.comparePoint(A.start)==0&&this.comparePoint(A.end)==0},w.prototype.intersects=function(A){var a=this.compareRange(A);return a==-1||a==0||a==1},w.prototype.isEnd=function(A,a){return this.end.row==A&&this.end.column==a},w.prototype.isStart=function(A,a){return this.start.row==A&&this.start.column==a},w.prototype.setStart=function(A,a){typeof A=="object"?(this.start.column=A.column,this.start.row=A.row):(this.start.row=A,this.start.column=a)},w.prototype.setEnd=function(A,a){typeof A=="object"?(this.end.column=A.column,this.end.row=A.row):(this.end.row=A,this.end.column=a)},w.prototype.inside=function(A,a){return this.compare(A,a)==0?!(this.isEnd(A,a)||this.isStart(A,a)):!1},w.prototype.insideStart=function(A,a){return this.compare(A,a)==0?!this.isEnd(A,a):!1},w.prototype.insideEnd=function(A,a){return this.compare(A,a)==0?!this.isStart(A,a):!1},w.prototype.compare=function(A,a){return!this.isMultiLine()&&A===this.start.row?a<this.start.column?-1:a>this.end.column?1:0:A<this.start.row?-1:A>this.end.row?1:this.start.row===A?a>=this.start.column?0:-1:this.end.row===A?a<=this.end.column?0:1:0},w.prototype.compareStart=function(A,a){return this.start.row==A&&this.start.column==a?-1:this.compare(A,a)},w.prototype.compareEnd=function(A,a){return this.end.row==A&&this.end.column==a?1:this.compare(A,a)},w.prototype.compareInside=function(A,a){return this.end.row==A&&this.end.column==a?1:this.start.row==A&&this.start.column==a?-1:this.compare(A,a)},w.prototype.clipRows=function(A,a){if(this.end.row>a)var u={row:a+1,column:0};else if(this.end.row<A)var u={row:A,column:0};if(this.start.row>a)var n={row:a+1,column:0};else if(this.start.row<A)var n={row:A,column:0};return w.fromPoints(n||this.start,u||this.end)},w.prototype.extend=function(A,a){var u=this.compare(A,a);if(u==0)return this;if(u==-1)var n={row:A,column:a};else var o={row:A,column:a};return w.fromPoints(n||this.start,o||this.end)},w.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},w.prototype.isMultiLine=function(){return this.start.row!==this.end.row},w.prototype.clone=function(){return w.fromPoints(this.start,this.end)},w.prototype.collapseRows=function(){return this.end.column==0?new w(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new w(this.start.row,0,this.end.row,0)},w.prototype.toScreenRange=function(A){var a=A.documentToScreenPosition(this.start),u=A.documentToScreenPosition(this.end);return new w(a.row,a.column,u.row,u.column)},w.prototype.moveBy=function(A,a){this.start.row+=A,this.start.column+=a,this.end.row+=A,this.end.column+=a},w}();M.fromPoints=function(w,A){return new M(w.row,w.column,A.row,A.column)},M.comparePoints=function(w,A){return w.row-A.row||w.column-A.column},v.Range=M}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(p,v,fe){for(var M=p("./oop"),w={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete","-13":"NumpadEnter",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",59:";",61:"=",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}},A={Command:224,Backspace:8,Tab:9,Return:13,Enter:13,Pause:19,Escape:27,PageUp:33,PageDown:34,End:35,Home:36,Insert:45,Delete:46,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Backquote:192,Minus:189,Equal:187,BracketLeft:219,Backslash:220,BracketRight:221,Semicolon:186,Quote:222,Comma:188,Period:190,Slash:191,Space:32,NumpadAdd:107,NumpadDecimal:110,NumpadSubtract:109,NumpadDivide:111,NumpadMultiply:106},a=0;a<10;a++)A["Digit"+a]=48+a,A["Numpad"+a]=96+a,w.PRINTABLE_KEYS[48+a]=""+a,w.FUNCTION_KEYS[96+a]="Numpad"+a;for(var a=65;a<91;a++){var u=String.fromCharCode(a+32);A["Key"+u.toUpperCase()]=a,w.PRINTABLE_KEYS[a]=u}for(var a=1;a<13;a++)A["F"+a]=111+a,w.FUNCTION_KEYS[111+a]="F"+a;var n={Shift:16,Control:17,Alt:18,Meta:224};for(var o in n)A[o]=A[o+"Left"]=A[o+"Right"]=n[o];v.$codeToKeyCode=A,w.PRINTABLE_KEYS[173]="-";for(var r in w.FUNCTION_KEYS){var i=w.FUNCTION_KEYS[r].toLowerCase();w[i]=parseInt(r,10)}for(var r in w.PRINTABLE_KEYS){var i=w.PRINTABLE_KEYS[r].toLowerCase();w[i]=parseInt(r,10)}M.mixin(w,w.MODIFIER_KEYS),M.mixin(w,w.PRINTABLE_KEYS),M.mixin(w,w.FUNCTION_KEYS),w.enter=w.return,w.escape=w.esc,w.del=w.delete,function(){for(var e=["cmd","ctrl","alt","shift"],t=Math.pow(2,e.length);t--;)w.KEY_MODS[t]=e.filter(function(c){return t&w.KEY_MODS[c]}).join("-")+"-"}(),w.KEY_MODS[0]="",w.KEY_MODS[-1]="input-",M.mixin(v,w),v.default=v,v.keyCodeToString=function(e){var t=w[e];return typeof t!="string"&&(t=String.fromCharCode(e)),t.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(p,v,fe){var M=p("./keys"),w=p("./useragent"),A=null,a=0,u;function n(){u=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return u={passive:!1},!0}})}catch{}}function o(){return u==null&&n(),u}function r(E,T,x){this.elem=E,this.type=T,this.callback=x}r.prototype.destroy=function(){e(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var i=v.addListener=function(E,T,x,b){E.addEventListener(T,x,o()),b&&b.$toDestroy.push(new r(E,T,x))},e=v.removeListener=function(E,T,x){E.removeEventListener(T,x,o())};v.stopEvent=function(E){return v.stopPropagation(E),v.preventDefault(E),!1},v.stopPropagation=function(E){E.stopPropagation&&E.stopPropagation()},v.preventDefault=function(E){E.preventDefault&&E.preventDefault()},v.getButton=function(E){return E.type=="dblclick"?0:E.type=="contextmenu"||w.isMac&&E.ctrlKey&&!E.altKey&&!E.shiftKey?2:E.button},v.capture=function(E,T,x){var b=E&&E.ownerDocument||document;function de(Te){T&&T(Te),x&&x(Te),e(b,"mousemove",T),e(b,"mouseup",de),e(b,"dragstart",de)}return i(b,"mousemove",T),i(b,"mouseup",de),i(b,"dragstart",de),de},v.addMouseWheelListener=function(E,T,x){i(E,"wheel",function(b){var de=.15,Te=b.deltaX||0,he=b.deltaY||0;switch(b.deltaMode){case b.DOM_DELTA_PIXEL:b.wheelX=Te*de,b.wheelY=he*de;break;case b.DOM_DELTA_LINE:var Y=15;b.wheelX=Te*Y,b.wheelY=he*Y;break;case b.DOM_DELTA_PAGE:var gt=150;b.wheelX=Te*gt,b.wheelY=he*gt;break}T(b)},x)},v.addMultiMouseDownListener=function(E,T,x,b,de){var Te=0,he,Y,gt,V={2:"dblclick",3:"tripleclick",4:"quadclick"};function O(S){if(v.getButton(S)!==0?Te=0:S.detail>1?(Te++,Te>4&&(Te=1)):Te=1,w.isIE){var y=Math.abs(S.clientX-he)>5||Math.abs(S.clientY-Y)>5;(!gt||y)&&(Te=1),gt&&clearTimeout(gt),gt=setTimeout(function(){gt=null},T[Te-1]||600),Te==1&&(he=S.clientX,Y=S.clientY)}if(S._clicks=Te,x[b]("mousedown",S),Te>4)Te=0;else if(Te>1)return x[b](V[Te],S)}Array.isArray(E)||(E=[E]),E.forEach(function(S){i(S,"mousedown",O,de)})};function t(E){return 0|(E.ctrlKey?1:0)|(E.altKey?2:0)|(E.shiftKey?4:0)|(E.metaKey?8:0)}v.getModifierString=function(E){return M.KEY_MODS[t(E)]};function c(E,T,x){var b=t(T);if(!x&&T.code&&(x=M.$codeToKeyCode[T.code]||x),!w.isMac&&A){if(T.getModifierState&&(T.getModifierState("OS")||T.getModifierState("Win"))&&(b|=8),A.altGr)if((3&b)!=3)A.altGr=0;else return;if(x===18||x===17){var de=T.location;if(x===17&&de===1)A[x]==1&&(a=T.timeStamp);else if(x===18&&b===3&&de===2){var Te=T.timeStamp-a;Te<50&&(A.altGr=!0)}}}if(x in M.MODIFIER_KEYS&&(x=-1),!(!b&&x===13&&T.location===3&&(E(T,b,-x),T.defaultPrevented))){if(w.isChromeOS&&b&8){if(E(T,b,x),T.defaultPrevented)return;b&=-9}return!b&&!(x in M.FUNCTION_KEYS)&&!(x in M.PRINTABLE_KEYS)?!1:E(T,b,x)}}v.addCommandKeyListener=function(E,T,x){var b=null;i(E,"keydown",function(de){A[de.keyCode]=(A[de.keyCode]||0)+1;var Te=c(T,de,de.keyCode);return b=de.defaultPrevented,Te},x),i(E,"keypress",function(de){b&&(de.ctrlKey||de.altKey||de.shiftKey||de.metaKey)&&(v.stopEvent(de),b=null)},x),i(E,"keyup",function(de){A[de.keyCode]=null},x),A||(g(),i(window,"focus",g))};function g(){A=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!w.isOldIE){var m=1;v.nextTick=function(E,T){T=T||window;var x="zero-timeout-message-"+m++,b=function(de){de.data==x&&(v.stopPropagation(de),e(T,"message",b),E())};i(T,"message",b),T.postMessage(x,"*")}}v.$idleBlocked=!1,v.onIdle=function(E,T){return setTimeout(function x(){v.$idleBlocked?setTimeout(x,100):E()},T)},v.$idleBlockId=null,v.blockIdle=function(E){v.$idleBlockId&&clearTimeout(v.$idleBlockId),v.$idleBlocked=!0,v.$idleBlockId=setTimeout(function(){v.$idleBlocked=!1},E||100)},v.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),v.nextFrame?v.nextFrame=v.nextFrame.bind(window):v.nextFrame=function(E){setTimeout(E,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(p,v,fe){var M;fe.exports={lineMode:!1,pasteCancelled:function(){return M&&M>Date.now()-50?!0:M=!1},cancel:function(){M=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(p,v,fe){var M=p("../lib/event"),w=p("../config").nls,A=p("../lib/useragent"),a=p("../lib/dom"),u=p("../lib/lang"),n=p("../clipboard"),o=A.isChrome<18,r=A.isIE,i=A.isChrome>63,e=400,t=p("../lib/keys"),c=t.KEY_MODS,g=A.isIOS,m=g?/\s/:/\n/,E=A.isMobile,T=function(){function x(b,de){var Te=this;this.host=de,this.text=a.createElement("textarea"),this.text.className="ace_text-input",this.text.setAttribute("wrap","off"),this.text.setAttribute("autocomplete","off"),this.text.setAttribute("autocorrect","off"),this.text.setAttribute("autocapitalize","off"),this.text.setAttribute("spellcheck","false"),this.text.style.opacity="0",b.insertBefore(this.text,b.firstChild),this.copied=!1,this.pasted=!1,this.inComposition=!1,this.sendingText=!1,this.tempStyle="",E||(this.text.style.fontSize="1px"),this.commandMode=!1,this.ignoreFocusEvents=!1,this.lastValue="",this.lastSelectionStart=0,this.lastSelectionEnd=0,this.lastRestoreEnd=0,this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,this.numberOfExtraLines=0;try{this.$isFocused=document.activeElement===this.text}catch{}this.cancelComposition=this.cancelComposition.bind(this),this.setAriaOptions({role:"textbox"}),M.addListener(this.text,"blur",function(he){Te.ignoreFocusEvents||(de.onBlur(he),Te.$isFocused=!1)},de),M.addListener(this.text,"focus",function(he){if(!Te.ignoreFocusEvents){if(Te.$isFocused=!0,A.isEdge)try{if(!document.hasFocus())return}catch{}de.onFocus(he),A.isEdge?setTimeout(Te.resetSelection.bind(Te)):Te.resetSelection()}},de),this.$focusScroll=!1,de.on("beforeEndOperation",function(){var he=de.curOp,Y=he&&he.command&&he.command.name;if(Y!="insertstring"){var gt=Y&&(he.docChanged||he.selectionChanged);Te.inComposition&>&&(Te.lastValue=Te.text.value="",Te.onCompositionEnd()),Te.resetSelection()}}),de.on("changeSelection",this.setAriaLabel.bind(this)),this.resetSelection=g?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&de.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,M.addCommandKeyListener(this.text,function(he,Y,gt){if(!Te.inComposition)return de.onCommandKey(he,Y,gt)},de),M.addListener(this.text,"select",this.onSelect.bind(this),de),M.addListener(this.text,"input",this.onInput.bind(this),de),M.addListener(this.text,"cut",this.onCut.bind(this),de),M.addListener(this.text,"copy",this.onCopy.bind(this),de),M.addListener(this.text,"paste",this.onPaste.bind(this),de),(!("oncut"in this.text)||!("oncopy"in this.text)||!("onpaste"in this.text))&&M.addListener(b,"keydown",function(he){if(!(A.isMac&&!he.metaKey||!he.ctrlKey))switch(he.keyCode){case 67:Te.onCopy(he);break;case 86:Te.onPaste(he);break;case 88:Te.onCut(he);break}},de),this.syncComposition=u.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),M.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),de),M.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),de),M.addListener(this.text,"keyup",this.onKeyup.bind(this),de),M.addListener(this.text,"keydown",this.syncComposition.bind(this),de),M.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),de),this.closeTimeout,M.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),de),M.addListener(this.text,"mousedown",function(he){he.preventDefault(),Te.onContextMenuClose()},de),M.addListener(de.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),de),M.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),de),g&&this.addIosSelectionHandler(b,de,this.text)}return x.prototype.addIosSelectionHandler=function(b,de,Te){var he=this,Y=null,gt=!1;Te.addEventListener("keydown",function(O){Y&&clearTimeout(Y),gt=!0},!0),Te.addEventListener("keyup",function(O){Y=setTimeout(function(){gt=!1},100)},!0);var V=function(O){if(document.activeElement===Te&&!(gt||he.inComposition||de.$mouseHandler.isMousePressed)&&!he.copied){var S=Te.selectionStart,y=Te.selectionEnd,I=null,ke=0;if(S==0?I=t.up:S==1?I=t.home:y>he.lastSelectionEnd&&he.lastValue[y]==`
|
|
170
170
|
`?I=t.end:S<he.lastSelectionStart&&he.lastValue[S-1]==" "?(I=t.left,ke=c.option):S<he.lastSelectionStart||S==he.lastSelectionStart&&he.lastSelectionEnd!=he.lastSelectionStart&&S==y?I=t.left:y>he.lastSelectionEnd&&he.lastValue.slice(0,y).split(`
|
|
171
171
|
`).length>2?I=t.down:y>he.lastSelectionEnd&&he.lastValue[y-1]==" "?(I=t.right,ke=c.option):(y>he.lastSelectionEnd||y==he.lastSelectionEnd&&he.lastSelectionEnd!=he.lastSelectionStart&&S==y)&&(I=t.right),S!==y&&(ke|=c.shift),I){var Qe=de.onCommandKey({},ke,I);if(!Qe&&de.commands){I=t.keyCodeToString(I);var Je=de.commands.findKeyCommand(ke,I);Je&&de.execCommand(Je)}he.lastSelectionStart=S,he.lastSelectionEnd=y,he.resetSelection("")}}};document.addEventListener("selectionchange",V),de.on("destroy",function(){document.removeEventListener("selectionchange",V)})},x.prototype.onContextMenuClose=function(){var b=this;clearTimeout(this.closeTimeout),this.closeTimeout=setTimeout(function(){b.tempStyle&&(b.text.style.cssText=b.tempStyle,b.tempStyle=""),b.host.renderer.$isMousePressed=!1,b.host.renderer.$keepTextAreaAtCursor&&b.host.renderer.$moveTextAreaToCursor()},0)},x.prototype.$onContextMenu=function(b){this.host.textInput.onContextMenu(b),this.onContextMenuClose()},x.prototype.onKeyup=function(b){b.keyCode==27&&this.text.value.length<this.text.selectionStart&&(this.inComposition||(this.lastValue=this.text.value),this.lastSelectionStart=this.lastSelectionEnd=-1,this.resetSelection()),this.syncComposition()},x.prototype.cancelComposition=function(){this.ignoreFocusEvents=!0,this.text.blur(),this.text.focus(),this.ignoreFocusEvents=!1},x.prototype.onCompositionStart=function(b){if(!(this.inComposition||!this.host.onCompositionStart||this.host.$readOnly)&&(this.inComposition={},!this.commandMode)){b.data&&(this.inComposition.useTextareaForIME=!1),setTimeout(this.onCompositionUpdate.bind(this),0),this.host._signal("compositionStart"),this.host.on("mousedown",this.cancelComposition);var de=this.host.getSelectionRange();de.end.row=de.start.row,de.end.column=de.start.column,this.inComposition.markerRange=de,this.inComposition.selectionStart=this.lastSelectionStart,this.host.onCompositionStart(this.inComposition),this.inComposition.useTextareaForIME?(this.lastValue=this.text.value="",this.lastSelectionStart=0,this.lastSelectionEnd=0):(this.text.msGetInputContext&&(this.inComposition.context=this.text.msGetInputContext()),this.text.getInputContext&&(this.inComposition.context=this.text.getInputContext()))}},x.prototype.onCompositionUpdate=function(){if(!(!this.inComposition||!this.host.onCompositionUpdate||this.host.$readOnly)){if(this.commandMode)return this.cancelComposition();if(this.inComposition.useTextareaForIME)this.host.onCompositionUpdate(this.text.value);else{var b=this.text.value;this.sendText(b),this.inComposition.markerRange&&(this.inComposition.context&&(this.inComposition.markerRange.start.column=this.inComposition.selectionStart=this.inComposition.context.compositionStartOffset),this.inComposition.markerRange.end.column=this.inComposition.markerRange.start.column+this.lastSelectionEnd-this.inComposition.selectionStart+this.lastRestoreEnd)}}},x.prototype.onCompositionEnd=function(b){!this.host.onCompositionEnd||this.host.$readOnly||(this.inComposition=!1,this.host.onCompositionEnd(),this.host.off("mousedown",this.cancelComposition),b&&this.onInput())},x.prototype.onCut=function(b){this.doCopy(b,!0)},x.prototype.onCopy=function(b){this.doCopy(b,!1)},x.prototype.onPaste=function(b){var de=this.handleClipboardData(b);n.pasteCancelled()||(typeof de=="string"?(de&&this.host.onPaste(de,b),A.isIE&&setTimeout(this.resetSelection),M.preventDefault(b)):(this.text.value="",this.pasted=!0))},x.prototype.doCopy=function(b,de){var Te=this,he=this.host.getCopyText();if(!he)return M.preventDefault(b);this.handleClipboardData(b,he)?(g&&(this.resetSelection(he),this.copied=he,setTimeout(function(){Te.copied=!1},10)),de?this.host.onCut():this.host.onCopy(),M.preventDefault(b)):(this.copied=!0,this.text.value=he,this.text.select(),setTimeout(function(){Te.copied=!1,Te.resetSelection(),de?Te.host.onCut():Te.host.onCopy()}))},x.prototype.handleClipboardData=function(b,de,Te){var he=b.clipboardData||window.clipboardData;if(!(!he||o)){var Y=r||Te?"Text":"text/plain";try{return de?he.setData(Y,de)!==!1:he.getData(Y)}catch(gt){if(!Te)return this.handleClipboardData(gt,de,!0)}}},x.prototype.onInput=function(b){if(this.inComposition)return this.onCompositionUpdate();if(b&&b.inputType){if(b.inputType=="historyUndo")return this.host.execCommand("undo");if(b.inputType=="historyRedo")return this.host.execCommand("redo")}var de=this.text.value,Te=this.sendText(de,!0);(de.length>e+100||m.test(Te)||E&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},x.prototype.sendText=function(b,de){if(this.afterContextMenu&&(this.afterContextMenu=!1),this.pasted)return this.resetSelection(),b&&this.host.onPaste(b),this.pasted=!1,"";for(var Te=this.text.selectionStart,he=this.text.selectionEnd,Y=this.lastSelectionStart,gt=this.lastValue.length-this.lastSelectionEnd,V=b,O=b.length-Te,S=b.length-he,y=0;Y>0&&this.lastValue[y]==b[y];)y++,Y--;for(V=V.slice(y),y=1;gt>0&&this.lastValue.length-y>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-y]==b[b.length-y];)y++,gt--;O-=y-1,S-=y-1;var I=V.length-y+1;if(I<0&&(Y=-I,I=0),V=V.slice(0,I),!de&&!V&&!O&&!Y&&!gt&&!S)return"";this.sendingText=!0;var ke=!1;return A.isAndroid&&V==". "&&(V=" ",ke=!0),V&&!Y&&!gt&&!O&&!S||this.commandMode?this.host.onTextInput(V):this.host.onTextInput(V,{extendLeft:Y,extendRight:gt,restoreStart:O,restoreEnd:S}),this.sendingText=!1,this.lastValue=b,this.lastSelectionStart=Te,this.lastSelectionEnd=he,this.lastRestoreEnd=S,ke?`
|
|
172
172
|
`:V},x.prototype.onSelect=function(b){var de=this;if(!this.inComposition){var Te=function(he){return he.selectionStart===0&&he.selectionEnd>=de.lastValue.length&&he.value===de.lastValue&&de.lastValue&&he.selectionEnd!==de.lastSelectionEnd};this.copied?this.copied=!1:Te(this.text)?(this.host.selectAll(),this.resetSelection()):E&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection()}},x.prototype.$resetSelectionIOS=function(b){if(!(!this.$isFocused||this.copied&&!b||this.sendingText)){b||(b="");var de=`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./main-
|
|
1
|
+
System.register(["./main-db7a4880a68f839e9da9.js","vue"],function(b,j){"use strict";var g,m,u,r,f,w,s,t,k,v,n,h,V;return{setters:[a=>{g=a.d,m=a.w,u=a.F},a=>{r=a.resolveComponent,f=a.createBlock,w=a.openBlock,s=a.withCtx,t=a.createVNode,k=a.createElementVNode,v=a.createCommentVNode,n=a.createTextVNode,h=a.toDisplayString,V=a.withModifiers}],execute:function(){const a={props:{uuid:String,cmdUser:String,cmdString:String,persistent:{type:Boolean,default:!1},modelValue:Boolean},data(){return{updater:null,username:null,password:null,canApprove:!1,error:!1,errorText:""}},computed:{show:{get(){return this.modelValue},set(o){this.$emit("update:modelValue",o)}},formValid:function(){return!!this.password&&!!this.username},disableButtons:function(){return!this.formValid&&!this.canApprove}},watch:{modelValue:function(o,e){o?(u.get("/openc3-api/criticalcmd/canapprove/"+this.uuid).then(i=>{i.data.status==="ok"&&(this.canApprove=!0)}),this.updater=setInterval(()=>{this.uuid?u.get("/openc3-api/criticalcmd/status/"+this.uuid).then(i=>{i.data.status!=="WAITING"&&(this.$emit("status",i.data.status),this.show=!1)}):this.show=!1},1e3)):(clearInterval(this.updater),this.updater=null,this.canApprove=!1,this.username=null,this.password=null)}},beforeUnmount(){clearInterval(this.updater),this.updater=null,this.canApprove=!1,this.username=null,this.password=null},methods:{async approve(){if(this.canApprove)await u.post("/openc3-api/criticalcmd/approve/"+this.uuid,{}).then(o=>{o.status==200&&(this.$emit("status","APPROVED"),this.show=!1,this.error=!1)});else{let o=await this.getKeycloakToken();m.post("/openc3-api/criticalcmd/approve/"+this.uuid,{},{headers:{Authorization:o,"Content-Type":"application/json"},params:{scope:window.openc3Scope},timeout:5e3}).then(e=>{this.$emit("status","APPROVED"),this.show=!1,this.error=!1}).catch(e=>{this.error=!0,e.response?this.errorText=e.response.data.message:this.errorText=e.message})}},async reject(){if(this.canApprove)await u.post("/openc3-api/criticalcmd/reject/"+this.uuid,{}).then(o=>{o.status==200&&(this.$emit("status","REJECTED"),this.show=!1,this.error=!1)});else{let o=await this.getKeycloakToken();(await m.post("/openc3-api/criticalcmd/reject/"+this.uuid,{},{headers:{Authorization:o,"Content-Type":"application/json"},params:{scope:window.openc3Scope},timeout:5e3})).status==200&&(this.$emit("status","REJECTED"),this.show=!1,this.error=!1)}},async getKeycloakToken(){return(await m.post(localStorage.keycloakUrl+"/realms/"+localStorage.keycloakRealm+"/protocol/openid-connect/token",{username:this.username,password:this.password,client_id:localStorage.keycloakClientId,grant_type:"password",scope:"openid"},{headers:{"Content-Type":"application/x-www-form-urlencoded"},timeout:5e3})).data.access_token}}};function A(o,e,i,I,l,p){const y=r("v-spacer"),x=r("v-toolbar"),T=r("v-alert"),d=r("v-row"),C=r("v-text-field"),_=r("v-btn"),S=r("v-container"),U=r("v-card-text"),E=r("v-card"),N=r("v-dialog");return w(),f(N,{modelValue:p.show,"onUpdate:modelValue":e[3]||(e[3]=c=>p.show=c),persistent:i.persistent,width:"600"},{default:s(()=>[t(E,null,{default:s(()=>[t(x,{height:"24"},{default:s(()=>[t(y),e[4]||(e[4]=k("span",null," Waiting for Critical Command Approval ",-1)),t(y)]),_:1}),t(U,null,{default:s(()=>[t(S,{fluid:""},{default:s(()=>[t(T,{modelValue:l.error,"onUpdate:modelValue":e[0]||(e[0]=c=>l.error=c),type:"error",closable:""},{default:s(()=>[n(h(l.errorText),1)]),_:1},8,["modelValue"]),t(d,{class:"pt-4",style:{color:"white"}},{default:s(()=>[n("User "+h(i.cmdUser)+" is waiting for approval to execute: ",1)]),_:1}),t(d,{class:"pa-4",style:{color:"white"}},{default:s(()=>[n(h(i.cmdString),1)]),_:1}),t(d,{class:"text-subtitle-2"},{default:s(()=>[n("UUID: "+h(i.uuid),1)]),_:1}),l.canApprove?v("",!0):(w(),f(d,{key:0},{default:s(()=>[t(C,{modelValue:l.username,"onUpdate:modelValue":e[1]||(e[1]=c=>l.username=c),label:"Username","data-test":"username"},null,8,["modelValue"])]),_:1})),l.canApprove?v("",!0):(w(),f(d,{key:1},{default:s(()=>[t(C,{modelValue:l.password,"onUpdate:modelValue":e[2]||(e[2]=c=>l.password=c),type:"password",label:"Password","data-test":"password"},null,8,["modelValue"])]),_:1})),t(d,{class:"pt-2"},{default:s(()=>[t(y),t(_,{type:"submit",class:"mx-2",color:"secondary",variant:"outlined",disabled:p.disableButtons,"data-test":"reject",onClick:V(p.reject,["prevent"])},{default:s(()=>[...e[5]||(e[5]=[n(" Reject ",-1)])]),_:1},8,["disabled","onClick"]),t(_,{type:"submit",class:"mx-2",color:"primary",disabled:p.disableButtons,"data-test":"approve",onClick:V(p.approve,["prevent"])},{default:s(()=>[...e[6]||(e[6]=[n(" Approve ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","persistent"])}const B=b("N",g(a,[["render",A],["__scopeId","data-v-b778d72d"]]))}}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./Widget-VCl8Ts8s-42e238022b560bd33b86.js","./main-db7a4880a68f839e9da9.js","vue","vue-router","single-spa","vuex","vuetify"],function(d,V){"use strict";var l,a,n,s,r,u,o;return{setters:[e=>{l=e.o},e=>{a=e.d,n=e.R},e=>{s=e.resolveComponent,r=e.createBlock,u=e.openBlock,o=e.normalizeStyle},null,null,null,null],execute:function(){const e={mixins:[l,n],data(){return{label:"Date",dateValue:""}},created(){this.parameters[0]&&(this.label=this.parameters[0]),this.dateValue=this.formatDate(new Date,this.screenTimeZone)},methods:{text(){return this.dateValue},date(){return this.dateValue}}};function c(m,i,v,y,t,b){const h=s("v-text-field");return u(),r(h,{modelValue:t.dateValue,"onUpdate:modelValue":i[0]||(i[0]=p=>t.dateValue=p),label:t.label,style:o(m.computedStyle),type:"date","hide-details":""},null,8,["modelValue","label","style"])}const f=d("default",a(e,[["render",c]]))}}});
|