zwave-js-ui 10.3.0 → 10.3.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.
Files changed (58) hide show
  1. package/dist/assets/{AssociationGroups-CCvA-_Mo.js → AssociationGroups-CevPy3GT.js} +2 -2
  2. package/dist/assets/{BgRssiChart-Dj8id5Eg.js → BgRssiChart-DcACK8-e.js} +1 -1
  3. package/dist/assets/{BlinkIcon-DMyQDKcE.js → BlinkIcon-DYASRShh.js} +1 -1
  4. package/dist/assets/{CCTreeView-BJqtM4zZ.js → CCTreeView-DQWo0OMG.js} +1 -1
  5. package/dist/assets/{ColumnFilter-C6KQBkzQ.js → ColumnFilter-BWagIJTJ.js} +2 -2
  6. package/dist/assets/{ColumnFilterBoolean-DEASc3BB.js → ColumnFilterBoolean-DgvBOR3r.js} +1 -1
  7. package/dist/assets/{ColumnFilterDate-tpypPPCL.js → ColumnFilterDate-B-HErpKk.js} +1 -1
  8. package/dist/assets/{ColumnFilterNumber-a6ruOXsP.js → ColumnFilterNumber-D9Th2QNr.js} +1 -1
  9. package/dist/assets/{ColumnFilterString-C8WTmLT5.js → ColumnFilterString-DAuJZhhT.js} +1 -1
  10. package/dist/assets/{ControlPanel-DlxgUfgR.js → ControlPanel-tKWwQUw9.js} +2 -2
  11. package/dist/assets/{ControllerChart-CMIGXekx.js → ControllerChart-B5SCNWTq.js} +2 -2
  12. package/dist/assets/{Debug-BNPzwABT.js → Debug-GA4g3IhC.js} +1 -1
  13. package/dist/assets/{DialogAdvanced-6wKsX1r4.js → DialogAdvanced-B0nGibp0.js} +1 -1
  14. package/dist/assets/{DialogAssociation-3V86R_vX.js → DialogAssociation-CtLP9LvE.js} +1 -1
  15. package/dist/assets/{DialogGatewayValue-BHtZ7rmv.js → DialogGatewayValue-DNgzVlnd.js} +2 -2
  16. package/dist/assets/{DialogHealthCheck-BkArYVMA.js → DialogHealthCheck-DaLNcdPq.js} +1 -1
  17. package/dist/assets/{DialogLinkReliability-B7ydXyc6.js → DialogLinkReliability-CwDu0PMR.js} +1 -1
  18. package/dist/assets/{DialogSceneValue-CW00w2YF.js → DialogSceneValue-8zOZ6zcx.js} +2 -2
  19. package/dist/assets/{ErrorPage-CX3ERvZ2.js → ErrorPage-DxNPBv2z.js} +1 -1
  20. package/dist/assets/{ExpandedNode-DlDr4STW.js → ExpandedNode-BzQsdL1K.js} +2 -2
  21. package/dist/assets/{FrameDetails-DCC7LGlt.js → FrameDetails-En3LEjU0.js} +2 -2
  22. package/dist/assets/{HomeAssistant-D9b4sOm-.js → HomeAssistant-D2nBx4aN.js} +1 -1
  23. package/dist/assets/{InvertedCheckbox--pO4HyWx.js → InvertedCheckbox-f_y2Ma5Z.js} +1 -1
  24. package/dist/assets/{ListInput-Db8RyMKc.js → ListInput-o_U9f3xz.js} +1 -1
  25. package/dist/assets/{Login-onYYpGtl.js → Login-DODqM0xt.js} +1 -1
  26. package/dist/assets/{Mesh-u_VcvSGJ.js → Mesh-DlcPEauf.js} +2 -2
  27. package/dist/assets/{MissingKeysAlert-LNFqfnIw.js → MissingKeysAlert-BIKsJHqU.js} +1 -1
  28. package/dist/assets/{Multipane-BYMz3PEZ.js → Multipane-DxNpSx4x.js} +1 -1
  29. package/dist/assets/{MultipaneResizer-Dcmq7AFc.js → MultipaneResizer-DeTE_X5E.js} +1 -1
  30. package/dist/assets/NodeDetails-cwHKm2w2.js +6 -0
  31. package/dist/assets/{NodePanel-BCLdGISV.js → NodePanel-D33OHXEZ.js} +2 -2
  32. package/dist/assets/{NodeScheduler-BZYJ2Oh3.js → NodeScheduler-7nKKj0a9.js} +1 -1
  33. package/dist/assets/{OTAUpdates-BL0do3YP.js → OTAUpdates-C1Jkb0Jo.js} +1 -1
  34. package/dist/assets/{QrReader-CkQ8D3UE.js → QrReader-Bs7A-bKo.js} +1 -1
  35. package/dist/assets/{ReinterviewBadge-DGT1zdUv.js → ReinterviewBadge-ClTwZQBT.js} +1 -1
  36. package/dist/assets/{RichValue-DAB25EoH.js → RichValue-Da4uoA_O.js} +1 -1
  37. package/dist/assets/{Scenes-BiWOyZTX.js → Scenes-Cfu4LveD.js} +2 -2
  38. package/dist/assets/{Settings-DggL8lJP.js → Settings-DCJGPf1t.js} +2 -2
  39. package/dist/assets/{SmartStart-BDxZ_eH8.js → SmartStart-D2mgUTSJ.js} +2 -2
  40. package/dist/assets/{SmartView-Bo3_sZcQ.js → SmartView-Bc4gl3Sq.js} +2 -2
  41. package/dist/assets/{StatisticsArrows-DjFzcGsZ.js → StatisticsArrows-DIY4hwmn.js} +2 -2
  42. package/dist/assets/{StatisticsCard-VyVTL2at.js → StatisticsCard-ku5MzfqP.js} +1 -1
  43. package/dist/assets/{Store-BmYaN5hK.js → Store-CPNDtboZ.js} +2 -2
  44. package/dist/assets/{UserCodeTable-DY5_dLUE.js → UserCodeTable-DtY5eXDJ.js} +2 -2
  45. package/dist/assets/{ValueId-Mu6fZZ_Y.js → ValueId-D0b3yqdZ.js} +1 -1
  46. package/dist/assets/{Zniffer-Dnkvlncg.js → Zniffer-CRVrlx4E.js} +2 -2
  47. package/dist/assets/{ZwaveGraph-CMXFo4d4.js → ZwaveGraph-Cbw0_cL8.js} +26 -26
  48. package/dist/assets/{file-input-Blblnit7.js → file-input-CxTPceVd.js} +1 -1
  49. package/dist/assets/{index-CuDlyUQD.js → index-B0RXYjGc.js} +2 -2
  50. package/dist/assets/index-DPngRuVO.js +370 -0
  51. package/dist/assets/{prismeditor.esm-CqAGCIo4.js → prismeditor.esm-0DRlnctU.js} +1 -1
  52. package/dist/assets/{vuedraggable.umd-D2SvVXn9.js → vuedraggable.umd-CkR5izts.js} +1 -1
  53. package/dist/index.html +1 -1
  54. package/dist/sw.js +1 -1
  55. package/package.json +2 -2
  56. package/vite.config.mjs +3 -0
  57. package/dist/assets/NodeDetails-XNYENCCc.js +0 -6
  58. package/dist/assets/index-BJ5IKRRT.js +0 -108
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DialogAssociation-3V86R_vX.js","./index-BJ5IKRRT.js","./index-gIFLWh50.css"])))=>i.map(i=>d[i]);
2
- import{_ as d,I as l,m as u,u as r,a as p,av as f,aw as c,ar as g,n as h}from"./index-BJ5IKRRT.js";const m={components:{DialogAssociation:()=>d(()=>import("./DialogAssociation-3V86R_vX.js"),__vite__mapDeps([0,1,2]),import.meta.url)},mixins:[l],props:{node:Object},data(){return{associations:[],dialogAssociation:!1,headers:[{text:"Endpoint",value:"endpoint"},{text:"Group",value:"groupId"},{text:"Node",value:"nodeId"},{text:"Target Endpoint",value:"targetEndpoint"},{text:"Actions",value:"actions",sortable:!1}]}},computed:{...u(r,["nodes","nodesMap"])},mounted(){this.getAssociations()},methods:{...p(r,["showSnackbar"]),getAssociationAddress:f,getNodeName(e){const t=this.nodes[this.nodesMap.get(e)];return t?t._name:"NodeID_"+e},getEndpointLabel(e,t){const o=this.nodes[this.nodesMap.get(e)];if(o&&t>=0){const s=o.endpoints.find(n=>n.index===t);if(s)return s.label}return t>=0?"Endpoint "+t:"No Endpoint"},async getAssociations(e=!1){let t=!1;e&&this.node.status!=="Dead"&&(t=await this.app.confirm("Info",`Do you want to force query associations?${this.node.status==="Alive"?"":" This node is Asleep, so you should wake it up first."}`,"info",{confirmText:"Yes",cancelText:"No"}));const o=await this.app.apiRequest("getAssociations",[this.node.id,t]);o.success&&(this.associations=o.result,this.showSnackbar("Associations updated","success"))},async addAssociation(e){const t=isNaN(e.target)?e.target.id:parseInt(e.target),o=e.group,s={nodeId:t};o.multiChannel&&e.targetEndpoint>=0&&(s.endpoint=e.targetEndpoint);const n=[this.getAssociationAddress({nodeId:this.node.id,endpoint:e.endpoint}),o.value,[s]],i=await this.app.apiRequest("addAssociations",n);if(i.success){const a=i.result[0];a===c.OK?(this.showSnackbar("Association added","success"),this.getAssociations()):this.showSnackbar(`Error while adding association: ${g(c,a)}`,"error")}this.dialogAssociation=!1},async removeAssociation(e){const t=[this.getAssociationAddress({nodeId:this.node.id,endpoint:e.endpoint}),e.groupId,[{nodeId:e.nodeId,endpoint:e.targetEndpoint}]];(await this.app.apiRequest("removeAssociations",t)).success&&(this.showSnackbar("Association removed","success"),this.getAssociations())},async removeAllAssociations(){const e=[this.node.id];if(!await this.app.confirm("Attention","Are you sure you want to remove all associations from this node? This will also remove lifeline association if it exists.","alert"))return;(await this.app.apiRequest("removeAllAssociations",e)).success&&(this.showSnackbar("Association removed","success"),this.getAssociations())}}};var A=function(){var t=this,o=t._self._c;return o("v-container",{attrs:{"grid-list-md":""}},[o("v-row",{staticClass:"pa-5",attrs:{justify:"center"}},[o("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.associations,"item-key":"id"},scopedSlots:t._u([{key:"top",fn:function(){return[o("v-btn",{staticClass:"mb-2",attrs:{text:"",color:"green"},on:{click:function(s){t.dialogAssociation=!0}}},[t._v("Add")]),o("v-btn",{staticClass:"mb-2",attrs:{text:"",color:"red"},on:{click:t.removeAllAssociations}},[t._v("Remove All")]),o("v-btn",{staticClass:"mb-2",attrs:{text:"",color:"primary"},on:{click:function(s){return t.getAssociations(!0)}}},[t._v("Refresh")])]},proxy:!0},{key:"item.groupId",fn:function({item:s}){return[t._v(" "+t._s(t.node.groups.find(n=>n.value===s.groupId&&n.endpoint===s.endpoint).text)+" ")]}},{key:"item.nodeId",fn:function({item:s}){return[t._v(" "+t._s(t.getNodeName(s.nodeId))+" ")]}},{key:"item.endpoint",fn:function({item:s}){return[t._v(" "+t._s(s.endpoint>=0?t.getEndpointLabel(t.node.id,s.endpoint):"None")+" ")]}},{key:"item.targetEndpoint",fn:function({item:s}){return[t._v(" "+t._s(s.targetEndpoint>=0?t.getEndpointLabel(s.nodeId,s.targetEndpoint):"None")+" ")]}},{key:"item.actions",fn:function({item:s}){return[o("v-icon",{attrs:{small:"",color:"red"},on:{click:function(n){return t.removeAssociation(s)}}},[t._v("delete")])]}}],null,!0)})],1),o("DialogAssociation",{attrs:{node:t.node,associations:t.associations},on:{add:t.addAssociation,close:function(s){t.dialogAssociation=!1}},model:{value:t.dialogAssociation,callback:function(s){t.dialogAssociation=s},expression:"dialogAssociation"}})],1)},v=[],_=h(m,A,v,!1,null,null);const k=_.exports;export{k as default};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DialogAssociation-CtLP9LvE.js","./index-DPngRuVO.js","./index-gIFLWh50.css"])))=>i.map(i=>d[i]);
2
+ import{_ as d,I as l,m as u,u as r,a as p,av as f,aw as c,ar as g,n as h}from"./index-DPngRuVO.js";const m={components:{DialogAssociation:()=>d(()=>import("./DialogAssociation-CtLP9LvE.js"),__vite__mapDeps([0,1,2]),import.meta.url)},mixins:[l],props:{node:Object},data(){return{associations:[],dialogAssociation:!1,headers:[{text:"Endpoint",value:"endpoint"},{text:"Group",value:"groupId"},{text:"Node",value:"nodeId"},{text:"Target Endpoint",value:"targetEndpoint"},{text:"Actions",value:"actions",sortable:!1}]}},computed:{...u(r,["nodes","nodesMap"])},mounted(){this.getAssociations()},methods:{...p(r,["showSnackbar"]),getAssociationAddress:f,getNodeName(e){const t=this.nodes[this.nodesMap.get(e)];return t?t._name:"NodeID_"+e},getEndpointLabel(e,t){const o=this.nodes[this.nodesMap.get(e)];if(o&&t>=0){const s=o.endpoints.find(n=>n.index===t);if(s)return s.label}return t>=0?"Endpoint "+t:"No Endpoint"},async getAssociations(e=!1){let t=!1;e&&this.node.status!=="Dead"&&(t=await this.app.confirm("Info",`Do you want to force query associations?${this.node.status==="Alive"?"":" This node is Asleep, so you should wake it up first."}`,"info",{confirmText:"Yes",cancelText:"No"}));const o=await this.app.apiRequest("getAssociations",[this.node.id,t]);o.success&&(this.associations=o.result,this.showSnackbar("Associations updated","success"))},async addAssociation(e){const t=isNaN(e.target)?e.target.id:parseInt(e.target),o=e.group,s={nodeId:t};o.multiChannel&&e.targetEndpoint>=0&&(s.endpoint=e.targetEndpoint);const n=[this.getAssociationAddress({nodeId:this.node.id,endpoint:e.endpoint}),o.value,[s]],i=await this.app.apiRequest("addAssociations",n);if(i.success){const a=i.result[0];a===c.OK?(this.showSnackbar("Association added","success"),this.getAssociations()):this.showSnackbar(`Error while adding association: ${g(c,a)}`,"error")}this.dialogAssociation=!1},async removeAssociation(e){const t=[this.getAssociationAddress({nodeId:this.node.id,endpoint:e.endpoint}),e.groupId,[{nodeId:e.nodeId,endpoint:e.targetEndpoint}]];(await this.app.apiRequest("removeAssociations",t)).success&&(this.showSnackbar("Association removed","success"),this.getAssociations())},async removeAllAssociations(){const e=[this.node.id];if(!await this.app.confirm("Attention","Are you sure you want to remove all associations from this node? This will also remove lifeline association if it exists.","alert"))return;(await this.app.apiRequest("removeAllAssociations",e)).success&&(this.showSnackbar("Association removed","success"),this.getAssociations())}}};var A=function(){var t=this,o=t._self._c;return o("v-container",{attrs:{"grid-list-md":""}},[o("v-row",{staticClass:"pa-5",attrs:{justify:"center"}},[o("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.associations,"item-key":"id"},scopedSlots:t._u([{key:"top",fn:function(){return[o("v-btn",{staticClass:"mb-2",attrs:{text:"",color:"green"},on:{click:function(s){t.dialogAssociation=!0}}},[t._v("Add")]),o("v-btn",{staticClass:"mb-2",attrs:{text:"",color:"red"},on:{click:t.removeAllAssociations}},[t._v("Remove All")]),o("v-btn",{staticClass:"mb-2",attrs:{text:"",color:"primary"},on:{click:function(s){return t.getAssociations(!0)}}},[t._v("Refresh")])]},proxy:!0},{key:"item.groupId",fn:function({item:s}){return[t._v(" "+t._s(t.node.groups.find(n=>n.value===s.groupId&&n.endpoint===s.endpoint).text)+" ")]}},{key:"item.nodeId",fn:function({item:s}){return[t._v(" "+t._s(t.getNodeName(s.nodeId))+" ")]}},{key:"item.endpoint",fn:function({item:s}){return[t._v(" "+t._s(s.endpoint>=0?t.getEndpointLabel(t.node.id,s.endpoint):"None")+" ")]}},{key:"item.targetEndpoint",fn:function({item:s}){return[t._v(" "+t._s(s.targetEndpoint>=0?t.getEndpointLabel(s.nodeId,s.targetEndpoint):"None")+" ")]}},{key:"item.actions",fn:function({item:s}){return[o("v-icon",{attrs:{small:"",color:"red"},on:{click:function(n){return t.removeAssociation(s)}}},[t._v("delete")])]}}],null,!0)})],1),o("DialogAssociation",{attrs:{node:t.node,associations:t.associations},on:{add:t.addAssociation,close:function(s){t.dialogAssociation=!1}},model:{value:t.dialogAssociation,callback:function(s){t.dialogAssociation=s},expression:"dialogAssociation"}})],1)},v=[],_=h(m,A,v,!1,null,null);const k=_.exports;export{k as default};
@@ -1,3 +1,3 @@
1
- import{n as Ko,aj as $o}from"./index-BJ5IKRRT.js";const jo=!0,De="u-",qo="uplot",Jo=De+"hz",Zo=De+"vt",Qo=De+"title",Xo=De+"wrap",er=De+"under",tr=De+"over",lr=De+"axis",Xt=De+"off",nr=De+"select",ir=De+"cursor-x",sr=De+"cursor-y",or=De+"cursor-pt",rr=De+"legend",fr=De+"live",ur=De+"inline",cr=De+"series",ar=De+"marker",Ki=De+"label",hr=De+"value",Bl="width",Yl="height",Gl="top",$i="bottom",xl="left",Gn="right",ni="#000",ji=ni+"0",qi="mousemove",Ji="mousedown",In="mouseup",Zi="mouseenter",Qi="mouseleave",Xi="dblclick",pr="resize",mr="scroll",es="change",cn="dppxchange",ii="--",Dl=typeof window<"u",$n=Dl?document:null,kl=Dl?window:null,dr=Dl?navigator:null;let oe,on;function jn(){let e=devicePixelRatio;oe!=e&&(oe=e,on&&Jn(es,on,jn),on=matchMedia(`(min-resolution: ${oe-.001}dppx) and (max-resolution: ${oe+.001}dppx)`),el(es,on,jn),kl.dispatchEvent(new CustomEvent(cn)))}function et(e,l){if(l!=null){let s=e.classList;!s.contains(l)&&s.add(l)}}function qn(e,l){let s=e.classList;s.contains(l)&&s.remove(l)}function ge(e,l,s){e.style[l]=s+"px"}function wt(e,l,s,n){let o=$n.createElement(e);return l!=null&&et(o,l),s!=null&&s.insertBefore(o,n),o}function ct(e,l){return wt("div",e,l)}const ts=new WeakMap;function bt(e,l,s,n,o){let c="translate("+l+"px,"+s+"px)",u=ts.get(e);c!=u&&(e.style.transform=c,ts.set(e,c),l<0||s<0||l>n||s>o?et(e,Xt):qn(e,Xt))}const ls=new WeakMap;function ns(e,l,s){let n=l+s,o=ls.get(e);n!=o&&(ls.set(e,n),e.style.background=l,e.style.borderColor=s)}const is=new WeakMap;function ss(e,l,s,n){let o=l+""+s,c=is.get(e);o!=c&&(is.set(e,o),e.style.height=s+"px",e.style.width=l+"px",e.style.marginLeft=n?-l/2+"px":0,e.style.marginTop=n?-s/2+"px":0)}const si={passive:!0},gr={...si,capture:!0};function el(e,l,s,n){l.addEventListener(e,s,n?gr:si)}function Jn(e,l,s,n){l.removeEventListener(e,s,si)}Dl&&jn();function St(e,l,s,n){let o;s=s||0,n=n||l.length-1;let c=n<=2147483647;for(;n-s>1;)o=c?s+n>>1:tt((s+n)/2),l[o]<e?s=o:n=o;return e-l[s]<=l[n]-e?s:n}function bl(e,l,s,n){for(let o=n==1?l:s;o>=l&&o<=s;o+=n)if(e[o]!=null)return o;return-1}function wr(e,l,s,n){let o=ee,c=-ee;if(n==1)o=e[l],c=e[s];else if(n==-1)o=e[s],c=e[l];else for(let u=l;u<=s;u++){let d=e[u];d!=null&&(d<o&&(o=d),d>c&&(c=d))}return[o,c]}function Sr(e,l,s){let n=ee,o=-ee;for(let c=l;c<=s;c++){let u=e[c];u!=null&&u>0&&(u<n&&(n=u),u>o&&(o=u))}return[n,o]}function pn(e,l,s,n){let o=fs(e),c=fs(l);e==l&&(o==-1?(e*=s,l/=s):(e/=s,l*=s));let u=s==10?At:Rs,d=o==1?tt:at,m=c==1?at:tt,g=d(u(Ae(e))),y=m(u(Ae(l))),_=Ml(s,g),h=Ml(s,y);return s==10&&(g<0&&(_=he(_,-g)),y<0&&(h=he(h,-y))),n||s==2?(e=_*o,l=h*c):(e=Fs(e,_),l=mn(l,h)),[e,l]}function oi(e,l,s,n){let o=pn(e,l,s,n);return e==0&&(o[0]=0),l==0&&(o[1]=0),o}const ri=.1,os={mode:3,pad:ri},Kl={pad:0,soft:null,mode:0},_r={min:Kl,max:Kl};function an(e,l,s,n){return dn(s)?rs(e,l,s):(Kl.pad=s,Kl.soft=n?0:null,Kl.mode=n?3:0,rs(e,l,_r))}function se(e,l){return e??l}function yr(e,l,s){for(l=se(l,0),s=se(s,e.length-1);l<=s;){if(e[l]!=null)return!0;l++}return!1}function rs(e,l,s){let n=s.min,o=s.max,c=se(n.pad,0),u=se(o.pad,0),d=se(n.hard,-ee),m=se(o.hard,ee),g=se(n.soft,ee),y=se(o.soft,-ee),_=se(n.mode,0),h=se(o.mode,0),T=l-e,z=At(T),D=Oe(Ae(e),Ae(l)),F=At(D),P=Ae(F-z);(T<1e-24||P>10)&&(T=0,(e==0||l==0)&&(T=1e-24,_==2&&g!=ee&&(c=0),h==2&&y!=-ee&&(u=0)));let H=T||D||1e3,k=At(H),C=Ml(10,tt(k)),E=H*(T==0?e==0?.1:1:c),W=he(Fs(e-E,C/10),24),L=e>=g&&(_==1||_==3&&W<=g||_==2&&W>=g)?g:ee,I=Oe(d,W<L&&e>=L?L:ht(L,W)),B=H*(T==0?l==0?.1:1:u),V=he(mn(l+B,C/10),24),v=l<=y&&(h==1||h==3&&V>=y||h==2&&V<=y)?y:-ee,N=ht(m,V>v&&l<=v?v:Oe(v,V));return I==N&&I==0&&(N=100),[I,N]}const xr=new Intl.NumberFormat(Dl?dr.language:"en-US"),fi=e=>xr.format(e),lt=Math,un=lt.PI,Ae=lt.abs,tt=lt.floor,Te=lt.round,at=lt.ceil,ht=lt.min,Oe=lt.max,Ml=lt.pow,fs=lt.sign,At=lt.log10,Rs=lt.log2,vr=(e,l=1)=>lt.sinh(e)*l,Bn=(e,l=1)=>lt.asinh(e/l),ee=1/0;function us(e){return(At((e^e>>31)-(e>>31))|0)+1}function Zn(e,l,s){return ht(Oe(e,l),s)}function X(e){return typeof e=="function"?e:()=>e}const kr=()=>{},zs=e=>e,Vs=(e,l)=>l,br=e=>null,cs=e=>!0,as=(e,l)=>e==l,Mr=/\.\d*?(?=9{6,}|0{6,})/gm,tl=e=>{if(Ns(e)||Bt.has(e))return e;const l=`${e}`,s=l.match(Mr);if(s==null)return e;let n=s[0].length-1;if(l.indexOf("e-")!=-1){let[o,c]=l.split("e");return+`${tl(o)}e${c}`}return he(e,n)};function Zt(e,l){return tl(he(tl(e/l))*l)}function mn(e,l){return tl(at(tl(e/l))*l)}function Fs(e,l){return tl(tt(tl(e/l))*l)}function he(e,l=0){if(Ns(e))return e;let s=10**l,n=e*s*(1+Number.EPSILON);return Te(n)/s}const Bt=new Map;function Hs(e){return((""+e).split(".")[1]||"").length}function jl(e,l,s,n){let o=[],c=n.map(Hs);for(let u=l;u<s;u++){let d=Ae(u),m=he(Ml(e,u),d);for(let g=0;g<n.length;g++){let y=e==10?+`${n[g]}e${u}`:n[g]*m,_=(u>=0?0:d)+(u>=c[g]?0:c[g]),h=e==10?y:he(y,_);o.push(h),Bt.set(h,_)}}return o}const $l={},ui=[],El=[null,null],It=Array.isArray,Ns=Number.isInteger,Er=e=>e===void 0;function hs(e){return typeof e=="string"}function dn(e){let l=!1;if(e!=null){let s=e.constructor;l=s==null||s==Object}return l}function Tr(e){return e!=null&&typeof e=="object"}const Ar=Object.getPrototypeOf(Uint8Array),Os="__proto__";function Tl(e,l=dn){let s;if(It(e)){let n=e.find(o=>o!=null);if(It(n)||l(n)){s=Array(e.length);for(let o=0;o<e.length;o++)s[o]=Tl(e[o],l)}else s=e.slice()}else if(e instanceof Ar)s=e.slice();else if(l(e)){s={};for(let n in e)n!=Os&&(s[n]=Tl(e[n],l))}else s=e;return s}function Me(e){let l=arguments;for(let s=1;s<l.length;s++){let n=l[s];for(let o in n)o!=Os&&(dn(e[o])?Me(e[o],Tl(n[o])):e[o]=Tl(n[o]))}return e}const Dr=0,Lr=1,Pr=2;function Cr(e,l,s){for(let n=0,o,c=-1;n<l.length;n++){let u=l[n];if(u>c){for(o=u-1;o>=0&&e[o]==null;)e[o--]=null;for(o=u+1;o<s&&e[o]==null;)e[c=o++]=null}}}function Rr(e,l){if(Fr(e)){let u=e[0].slice();for(let d=1;d<e.length;d++)u.push(...e[d].slice(1));return Hr(u[0])||(u=Vr(u)),u}let s=new Set;for(let u=0;u<e.length;u++){let m=e[u][0],g=m.length;for(let y=0;y<g;y++)s.add(m[y])}let n=[Array.from(s).sort((u,d)=>u-d)],o=n[0].length,c=new Map;for(let u=0;u<o;u++)c.set(n[0][u],u);for(let u=0;u<e.length;u++){let d=e[u],m=d[0];for(let g=1;g<d.length;g++){let y=d[g],_=Array(o).fill(void 0),h=l?l[u][g]:Lr,T=[];for(let z=0;z<y.length;z++){let D=y[z],F=c.get(m[z]);D===null?h!=Dr&&(_[F]=D,h==Pr&&T.push(F)):_[F]=D}Cr(_,T,o),n.push(_)}}return n}const zr=typeof queueMicrotask>"u"?e=>Promise.resolve().then(e):queueMicrotask;function Vr(e){let l=e[0],s=l.length,n=Array(s);for(let c=0;c<n.length;c++)n[c]=c;n.sort((c,u)=>l[c]-l[u]);let o=[];for(let c=0;c<e.length;c++){let u=e[c],d=Array(s);for(let m=0;m<s;m++)d[m]=u[n[m]];o.push(d)}return o}function Fr(e){let l=e[0][0],s=l.length;for(let n=1;n<e.length;n++){let o=e[n][0];if(o.length!=s)return!1;if(o!=l){for(let c=0;c<s;c++)if(o[c]!=l[c])return!1}}return!0}function Hr(e,l=100){const s=e.length;if(s<=1)return!0;let n=0,o=s-1;for(;n<=o&&e[n]==null;)n++;for(;o>=n&&e[o]==null;)o--;if(o<=n)return!0;const c=Oe(1,tt((o-n+1)/l));for(let u=e[n],d=n+c;d<=o;d+=c){const m=e[d];if(m!=null){if(m<=u)return!1;u=m}}return!0}const Ws=["January","February","March","April","May","June","July","August","September","October","November","December"],Gs=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Is(e){return e.slice(0,3)}const Nr=Gs.map(Is),Or=Ws.map(Is),Wr={MMMM:Ws,MMM:Or,WWWW:Gs,WWW:Nr};function Il(e){return(e<10?"0":"")+e}function Gr(e){return(e<10?"00":e<100?"0":"")+e}const Ir={YYYY:e=>e.getFullYear(),YY:e=>(e.getFullYear()+"").slice(2),MMMM:(e,l)=>l.MMMM[e.getMonth()],MMM:(e,l)=>l.MMM[e.getMonth()],MM:e=>Il(e.getMonth()+1),M:e=>e.getMonth()+1,DD:e=>Il(e.getDate()),D:e=>e.getDate(),WWWW:(e,l)=>l.WWWW[e.getDay()],WWW:(e,l)=>l.WWW[e.getDay()],HH:e=>Il(e.getHours()),H:e=>e.getHours(),h:e=>{let l=e.getHours();return l==0?12:l>12?l-12:l},AA:e=>e.getHours()>=12?"PM":"AM",aa:e=>e.getHours()>=12?"pm":"am",a:e=>e.getHours()>=12?"p":"a",mm:e=>Il(e.getMinutes()),m:e=>e.getMinutes(),ss:e=>Il(e.getSeconds()),s:e=>e.getSeconds(),fff:e=>Gr(e.getMilliseconds())};function ci(e,l){l=l||Wr;let s=[],n=/\{([a-z]+)\}|[^{]+/gi,o;for(;o=n.exec(e);)s.push(o[0][0]=="{"?Ir[o[1]]:o[0]);return c=>{let u="";for(let d=0;d<s.length;d++)u+=typeof s[d]=="string"?s[d]:s[d](c,l);return u}}const Br=new Intl.DateTimeFormat().resolvedOptions().timeZone;function Yr(e,l){let s;return l=="UTC"||l=="Etc/UTC"?s=new Date(+e+e.getTimezoneOffset()*6e4):l==Br?s=e:(s=new Date(e.toLocaleString("en-US",{timeZone:l})),s.setMilliseconds(e.getMilliseconds())),s}const Bs=e=>e%1==0,hn=[1,2,2.5,5],Ur=jl(10,-32,0,hn),Ys=jl(10,0,32,hn),Kr=Ys.filter(Bs),Qt=Ur.concat(Ys),ai=`
1
+ import{n as Ko,aj as $o}from"./index-DPngRuVO.js";const jo=!0,De="u-",qo="uplot",Jo=De+"hz",Zo=De+"vt",Qo=De+"title",Xo=De+"wrap",er=De+"under",tr=De+"over",lr=De+"axis",Xt=De+"off",nr=De+"select",ir=De+"cursor-x",sr=De+"cursor-y",or=De+"cursor-pt",rr=De+"legend",fr=De+"live",ur=De+"inline",cr=De+"series",ar=De+"marker",Ki=De+"label",hr=De+"value",Bl="width",Yl="height",Gl="top",$i="bottom",xl="left",Gn="right",ni="#000",ji=ni+"0",qi="mousemove",Ji="mousedown",In="mouseup",Zi="mouseenter",Qi="mouseleave",Xi="dblclick",pr="resize",mr="scroll",es="change",cn="dppxchange",ii="--",Dl=typeof window<"u",$n=Dl?document:null,kl=Dl?window:null,dr=Dl?navigator:null;let oe,on;function jn(){let e=devicePixelRatio;oe!=e&&(oe=e,on&&Jn(es,on,jn),on=matchMedia(`(min-resolution: ${oe-.001}dppx) and (max-resolution: ${oe+.001}dppx)`),el(es,on,jn),kl.dispatchEvent(new CustomEvent(cn)))}function et(e,l){if(l!=null){let s=e.classList;!s.contains(l)&&s.add(l)}}function qn(e,l){let s=e.classList;s.contains(l)&&s.remove(l)}function ge(e,l,s){e.style[l]=s+"px"}function wt(e,l,s,n){let o=$n.createElement(e);return l!=null&&et(o,l),s!=null&&s.insertBefore(o,n),o}function ct(e,l){return wt("div",e,l)}const ts=new WeakMap;function bt(e,l,s,n,o){let c="translate("+l+"px,"+s+"px)",u=ts.get(e);c!=u&&(e.style.transform=c,ts.set(e,c),l<0||s<0||l>n||s>o?et(e,Xt):qn(e,Xt))}const ls=new WeakMap;function ns(e,l,s){let n=l+s,o=ls.get(e);n!=o&&(ls.set(e,n),e.style.background=l,e.style.borderColor=s)}const is=new WeakMap;function ss(e,l,s,n){let o=l+""+s,c=is.get(e);o!=c&&(is.set(e,o),e.style.height=s+"px",e.style.width=l+"px",e.style.marginLeft=n?-l/2+"px":0,e.style.marginTop=n?-s/2+"px":0)}const si={passive:!0},gr={...si,capture:!0};function el(e,l,s,n){l.addEventListener(e,s,n?gr:si)}function Jn(e,l,s,n){l.removeEventListener(e,s,si)}Dl&&jn();function St(e,l,s,n){let o;s=s||0,n=n||l.length-1;let c=n<=2147483647;for(;n-s>1;)o=c?s+n>>1:tt((s+n)/2),l[o]<e?s=o:n=o;return e-l[s]<=l[n]-e?s:n}function bl(e,l,s,n){for(let o=n==1?l:s;o>=l&&o<=s;o+=n)if(e[o]!=null)return o;return-1}function wr(e,l,s,n){let o=ee,c=-ee;if(n==1)o=e[l],c=e[s];else if(n==-1)o=e[s],c=e[l];else for(let u=l;u<=s;u++){let d=e[u];d!=null&&(d<o&&(o=d),d>c&&(c=d))}return[o,c]}function Sr(e,l,s){let n=ee,o=-ee;for(let c=l;c<=s;c++){let u=e[c];u!=null&&u>0&&(u<n&&(n=u),u>o&&(o=u))}return[n,o]}function pn(e,l,s,n){let o=fs(e),c=fs(l);e==l&&(o==-1?(e*=s,l/=s):(e/=s,l*=s));let u=s==10?At:Rs,d=o==1?tt:at,m=c==1?at:tt,g=d(u(Ae(e))),y=m(u(Ae(l))),_=Ml(s,g),h=Ml(s,y);return s==10&&(g<0&&(_=he(_,-g)),y<0&&(h=he(h,-y))),n||s==2?(e=_*o,l=h*c):(e=Fs(e,_),l=mn(l,h)),[e,l]}function oi(e,l,s,n){let o=pn(e,l,s,n);return e==0&&(o[0]=0),l==0&&(o[1]=0),o}const ri=.1,os={mode:3,pad:ri},Kl={pad:0,soft:null,mode:0},_r={min:Kl,max:Kl};function an(e,l,s,n){return dn(s)?rs(e,l,s):(Kl.pad=s,Kl.soft=n?0:null,Kl.mode=n?3:0,rs(e,l,_r))}function se(e,l){return e??l}function yr(e,l,s){for(l=se(l,0),s=se(s,e.length-1);l<=s;){if(e[l]!=null)return!0;l++}return!1}function rs(e,l,s){let n=s.min,o=s.max,c=se(n.pad,0),u=se(o.pad,0),d=se(n.hard,-ee),m=se(o.hard,ee),g=se(n.soft,ee),y=se(o.soft,-ee),_=se(n.mode,0),h=se(o.mode,0),T=l-e,z=At(T),D=Oe(Ae(e),Ae(l)),F=At(D),P=Ae(F-z);(T<1e-24||P>10)&&(T=0,(e==0||l==0)&&(T=1e-24,_==2&&g!=ee&&(c=0),h==2&&y!=-ee&&(u=0)));let H=T||D||1e3,k=At(H),C=Ml(10,tt(k)),E=H*(T==0?e==0?.1:1:c),W=he(Fs(e-E,C/10),24),L=e>=g&&(_==1||_==3&&W<=g||_==2&&W>=g)?g:ee,I=Oe(d,W<L&&e>=L?L:ht(L,W)),B=H*(T==0?l==0?.1:1:u),V=he(mn(l+B,C/10),24),v=l<=y&&(h==1||h==3&&V>=y||h==2&&V<=y)?y:-ee,N=ht(m,V>v&&l<=v?v:Oe(v,V));return I==N&&I==0&&(N=100),[I,N]}const xr=new Intl.NumberFormat(Dl?dr.language:"en-US"),fi=e=>xr.format(e),lt=Math,un=lt.PI,Ae=lt.abs,tt=lt.floor,Te=lt.round,at=lt.ceil,ht=lt.min,Oe=lt.max,Ml=lt.pow,fs=lt.sign,At=lt.log10,Rs=lt.log2,vr=(e,l=1)=>lt.sinh(e)*l,Bn=(e,l=1)=>lt.asinh(e/l),ee=1/0;function us(e){return(At((e^e>>31)-(e>>31))|0)+1}function Zn(e,l,s){return ht(Oe(e,l),s)}function X(e){return typeof e=="function"?e:()=>e}const kr=()=>{},zs=e=>e,Vs=(e,l)=>l,br=e=>null,cs=e=>!0,as=(e,l)=>e==l,Mr=/\.\d*?(?=9{6,}|0{6,})/gm,tl=e=>{if(Ns(e)||Bt.has(e))return e;const l=`${e}`,s=l.match(Mr);if(s==null)return e;let n=s[0].length-1;if(l.indexOf("e-")!=-1){let[o,c]=l.split("e");return+`${tl(o)}e${c}`}return he(e,n)};function Zt(e,l){return tl(he(tl(e/l))*l)}function mn(e,l){return tl(at(tl(e/l))*l)}function Fs(e,l){return tl(tt(tl(e/l))*l)}function he(e,l=0){if(Ns(e))return e;let s=10**l,n=e*s*(1+Number.EPSILON);return Te(n)/s}const Bt=new Map;function Hs(e){return((""+e).split(".")[1]||"").length}function jl(e,l,s,n){let o=[],c=n.map(Hs);for(let u=l;u<s;u++){let d=Ae(u),m=he(Ml(e,u),d);for(let g=0;g<n.length;g++){let y=e==10?+`${n[g]}e${u}`:n[g]*m,_=(u>=0?0:d)+(u>=c[g]?0:c[g]),h=e==10?y:he(y,_);o.push(h),Bt.set(h,_)}}return o}const $l={},ui=[],El=[null,null],It=Array.isArray,Ns=Number.isInteger,Er=e=>e===void 0;function hs(e){return typeof e=="string"}function dn(e){let l=!1;if(e!=null){let s=e.constructor;l=s==null||s==Object}return l}function Tr(e){return e!=null&&typeof e=="object"}const Ar=Object.getPrototypeOf(Uint8Array),Os="__proto__";function Tl(e,l=dn){let s;if(It(e)){let n=e.find(o=>o!=null);if(It(n)||l(n)){s=Array(e.length);for(let o=0;o<e.length;o++)s[o]=Tl(e[o],l)}else s=e.slice()}else if(e instanceof Ar)s=e.slice();else if(l(e)){s={};for(let n in e)n!=Os&&(s[n]=Tl(e[n],l))}else s=e;return s}function Me(e){let l=arguments;for(let s=1;s<l.length;s++){let n=l[s];for(let o in n)o!=Os&&(dn(e[o])?Me(e[o],Tl(n[o])):e[o]=Tl(n[o]))}return e}const Dr=0,Lr=1,Pr=2;function Cr(e,l,s){for(let n=0,o,c=-1;n<l.length;n++){let u=l[n];if(u>c){for(o=u-1;o>=0&&e[o]==null;)e[o--]=null;for(o=u+1;o<s&&e[o]==null;)e[c=o++]=null}}}function Rr(e,l){if(Fr(e)){let u=e[0].slice();for(let d=1;d<e.length;d++)u.push(...e[d].slice(1));return Hr(u[0])||(u=Vr(u)),u}let s=new Set;for(let u=0;u<e.length;u++){let m=e[u][0],g=m.length;for(let y=0;y<g;y++)s.add(m[y])}let n=[Array.from(s).sort((u,d)=>u-d)],o=n[0].length,c=new Map;for(let u=0;u<o;u++)c.set(n[0][u],u);for(let u=0;u<e.length;u++){let d=e[u],m=d[0];for(let g=1;g<d.length;g++){let y=d[g],_=Array(o).fill(void 0),h=l?l[u][g]:Lr,T=[];for(let z=0;z<y.length;z++){let D=y[z],F=c.get(m[z]);D===null?h!=Dr&&(_[F]=D,h==Pr&&T.push(F)):_[F]=D}Cr(_,T,o),n.push(_)}}return n}const zr=typeof queueMicrotask>"u"?e=>Promise.resolve().then(e):queueMicrotask;function Vr(e){let l=e[0],s=l.length,n=Array(s);for(let c=0;c<n.length;c++)n[c]=c;n.sort((c,u)=>l[c]-l[u]);let o=[];for(let c=0;c<e.length;c++){let u=e[c],d=Array(s);for(let m=0;m<s;m++)d[m]=u[n[m]];o.push(d)}return o}function Fr(e){let l=e[0][0],s=l.length;for(let n=1;n<e.length;n++){let o=e[n][0];if(o.length!=s)return!1;if(o!=l){for(let c=0;c<s;c++)if(o[c]!=l[c])return!1}}return!0}function Hr(e,l=100){const s=e.length;if(s<=1)return!0;let n=0,o=s-1;for(;n<=o&&e[n]==null;)n++;for(;o>=n&&e[o]==null;)o--;if(o<=n)return!0;const c=Oe(1,tt((o-n+1)/l));for(let u=e[n],d=n+c;d<=o;d+=c){const m=e[d];if(m!=null){if(m<=u)return!1;u=m}}return!0}const Ws=["January","February","March","April","May","June","July","August","September","October","November","December"],Gs=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Is(e){return e.slice(0,3)}const Nr=Gs.map(Is),Or=Ws.map(Is),Wr={MMMM:Ws,MMM:Or,WWWW:Gs,WWW:Nr};function Il(e){return(e<10?"0":"")+e}function Gr(e){return(e<10?"00":e<100?"0":"")+e}const Ir={YYYY:e=>e.getFullYear(),YY:e=>(e.getFullYear()+"").slice(2),MMMM:(e,l)=>l.MMMM[e.getMonth()],MMM:(e,l)=>l.MMM[e.getMonth()],MM:e=>Il(e.getMonth()+1),M:e=>e.getMonth()+1,DD:e=>Il(e.getDate()),D:e=>e.getDate(),WWWW:(e,l)=>l.WWWW[e.getDay()],WWW:(e,l)=>l.WWW[e.getDay()],HH:e=>Il(e.getHours()),H:e=>e.getHours(),h:e=>{let l=e.getHours();return l==0?12:l>12?l-12:l},AA:e=>e.getHours()>=12?"PM":"AM",aa:e=>e.getHours()>=12?"pm":"am",a:e=>e.getHours()>=12?"p":"a",mm:e=>Il(e.getMinutes()),m:e=>e.getMinutes(),ss:e=>Il(e.getSeconds()),s:e=>e.getSeconds(),fff:e=>Gr(e.getMilliseconds())};function ci(e,l){l=l||Wr;let s=[],n=/\{([a-z]+)\}|[^{]+/gi,o;for(;o=n.exec(e);)s.push(o[0][0]=="{"?Ir[o[1]]:o[0]);return c=>{let u="";for(let d=0;d<s.length;d++)u+=typeof s[d]=="string"?s[d]:s[d](c,l);return u}}const Br=new Intl.DateTimeFormat().resolvedOptions().timeZone;function Yr(e,l){let s;return l=="UTC"||l=="Etc/UTC"?s=new Date(+e+e.getTimezoneOffset()*6e4):l==Br?s=e:(s=new Date(e.toLocaleString("en-US",{timeZone:l})),s.setMilliseconds(e.getMilliseconds())),s}const Bs=e=>e%1==0,hn=[1,2,2.5,5],Ur=jl(10,-32,0,hn),Ys=jl(10,0,32,hn),Kr=Ys.filter(Bs),Qt=Ur.concat(Ys),ai=`
2
2
  `,Us="{YYYY}",ps=ai+Us,Ks="{M}/{D}",Ul=ai+Ks,rn=Ul+"/{YY}",$s="{aa}",$r="{h}:{mm}",vl=$r+$s,ms=ai+vl,ds=":{ss}",re=null;function js(e){let l=e*1e3,s=l*60,n=s*60,o=n*24,c=o*30,u=o*365,m=(e==1?jl(10,0,3,hn).filter(Bs):jl(10,-3,0,hn)).concat([l,l*5,l*10,l*15,l*30,s,s*5,s*10,s*15,s*30,n,n*2,n*3,n*4,n*6,n*8,n*12,o,o*2,o*3,o*4,o*5,o*6,o*7,o*8,o*9,o*10,o*15,c,c*2,c*3,c*4,c*6,u,u*2,u*5,u*10,u*25,u*50,u*100]);const g=[[u,Us,re,re,re,re,re,re,1],[o*28,"{MMM}",ps,re,re,re,re,re,1],[o,Ks,ps,re,re,re,re,re,1],[n,"{h}"+$s,rn,re,Ul,re,re,re,1],[s,vl,rn,re,Ul,re,re,re,1],[l,ds,rn+" "+vl,re,Ul+" "+vl,re,ms,re,1],[e,ds+".{fff}",rn+" "+vl,re,Ul+" "+vl,re,ms,re,1]];function y(_){return(h,T,z,D,F,P)=>{let H=[],k=F>=u,C=F>=c&&F<u,E=_(z),W=he(E*e,3),L=Yn(E.getFullYear(),k?0:E.getMonth(),C||k?1:E.getDate()),I=he(L*e,3);if(C||k){let B=C?F/c:0,V=k?F/u:0,v=W==I?W:he(Yn(L.getFullYear()+V,L.getMonth()+B,1)*e,3),N=new Date(Te(v/e)),q=N.getFullYear(),le=N.getMonth();for(let U=0;v<=D;U++){let ue=Yn(q+V*U,le+B*U,1),Z=ue-_(he(ue*e,3));v=he((+ue+Z)*e,3),v<=D&&H.push(v)}}else{let B=F>=o?o:F,V=tt(z)-tt(W),v=I+V+mn(W-I,B);H.push(v);let N=_(v),q=N.getHours()+N.getMinutes()/s+N.getSeconds()/n,le=F/n,U=h.axes[T]._space,ue=P/U;for(;v=he(v+F,e==1?0:3),!(v>D);)if(le>1){let Z=tt(he(q+le,6))%24,ne=_(v).getHours()-Z;ne>1&&(ne=-1),v-=ne*n,q=(q+le)%24;let fe=H[H.length-1];he((v-fe)/F,3)*ue>=.7&&H.push(v)}else H.push(v)}return H}}return[m,g,y]}const[jr,qr,Jr]=js(1),[Zr,Qr,Xr]=js(.001);jl(2,-53,53,[1]);function gs(e,l){return e.map(s=>s.map((n,o)=>o==0||o==8||n==null?n:l(o==1||s[8]==0?n:s[1]+n)))}function ws(e,l){return(s,n,o,c,u)=>{let d=l.find(z=>u>=z[0])||l[l.length-1],m,g,y,_,h,T;return n.map(z=>{let D=e(z),F=D.getFullYear(),P=D.getMonth(),H=D.getDate(),k=D.getHours(),C=D.getMinutes(),E=D.getSeconds(),W=F!=m&&d[2]||P!=g&&d[3]||H!=y&&d[4]||k!=_&&d[5]||C!=h&&d[6]||E!=T&&d[7]||d[1];return m=F,g=P,y=H,_=k,h=C,T=E,W(D)})}}function ef(e,l){let s=ci(l);return(n,o,c,u,d)=>o.map(m=>s(e(m)))}function Yn(e,l,s){return new Date(e,l,s)}function Ss(e,l){return l(e)}const tf="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function _s(e,l){return(s,n,o,c)=>c==null?ii:l(e(n))}function lf(e,l){let s=e.series[l];return s.width?s.stroke(e,l):s.points.width?s.points.stroke(e,l):null}function nf(e,l){return e.series[l].fill(e,l)}const sf={show:!0,live:!0,isolate:!1,mount:kr,markers:{show:!0,width:2,stroke:lf,fill:nf,dash:"solid"},idx:null,idxs:null,values:[]};function of(e,l){let s=e.cursor.points,n=ct(),o=s.size(e,l);ge(n,Bl,o),ge(n,Yl,o);let c=o/-2;ge(n,"marginLeft",c),ge(n,"marginTop",c);let u=s.width(e,l,o);return u&&ge(n,"borderWidth",u),n}function rf(e,l){let s=e.series[l].points;return s._fill||s._stroke}function ff(e,l){let s=e.series[l].points;return s._stroke||s._fill}function uf(e,l){return e.series[l].points.size}const Un=[0,0];function cf(e,l,s){return Un[0]=l,Un[1]=s,Un}function fn(e,l,s,n=!0){return o=>{o.button==0&&(!n||o.target==l)&&s(o)}}function Kn(e,l,s,n=!0){return o=>{(!n||o.target==l)&&s(o)}}const af={show:!0,x:!0,y:!0,lock:!1,move:cf,points:{one:!1,show:of,size:uf,width:0,stroke:ff,fill:rf},bind:{mousedown:fn,mouseup:fn,click:fn,dblclick:fn,mousemove:Kn,mouseleave:Kn,mouseenter:Kn},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(e,l)=>{l.stopPropagation(),l.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(e,l,s,n,o)=>n-o,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},qs={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},hi=Me({},qs,{filter:Vs}),Js=Me({},hi,{size:10}),Zs=Me({},qs,{show:!1}),pi='12px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',Qs="bold "+pi,Xs=1.5,ys={show:!0,scale:"x",stroke:ni,space:50,gap:5,size:50,labelGap:0,labelSize:30,labelFont:Qs,side:2,grid:hi,ticks:Js,border:Zs,font:pi,lineGap:Xs,rotate:0},hf="Value",pf="Time",xs={show:!0,scale:"x",auto:!1,sorted:1,min:ee,max:-ee,idxs:[]};function mf(e,l,s,n,o){return l.map(c=>c==null?"":fi(c))}function df(e,l,s,n,o,c,u){let d=[],m=Bt.get(o)||0;s=u?s:he(mn(s,o),m);for(let g=s;g<=n;g=he(g+o,m))d.push(Object.is(g,-0)?0:g);return d}function Qn(e,l,s,n,o,c,u){const d=[],m=e.scales[e.axes[l].scale].log,g=m==10?At:Rs,y=tt(g(s));o=Ml(m,y),m==10&&(o=Qt[St(o,Qt)]);let _=s,h=o*m;m==10&&(h=Qt[St(h,Qt)]);do d.push(_),_=_+o,m==10&&!Bt.has(_)&&(_=he(_,Bt.get(o))),_>=h&&(o=_,h=o*m,m==10&&(h=Qt[St(h,Qt)]));while(_<=n);return d}function gf(e,l,s,n,o,c,u){let m=e.scales[e.axes[l].scale].asinh,g=n>m?Qn(e,l,Oe(m,s),n,o):[m],y=n>=0&&s<=0?[0]:[];return(s<-m?Qn(e,l,Oe(m,-n),-s,o):[m]).reverse().map(h=>-h).concat(y,g)}const eo=/./,wf=/[12357]/,Sf=/[125]/,vs=/1/,Xn=(e,l,s,n)=>e.map((o,c)=>l==4&&o==0||c%n==0&&s.test(o.toExponential()[o<0?1:0])?o:null);function _f(e,l,s,n,o){let c=e.axes[s],u=c.scale,d=e.scales[u],m=e.valToPos,g=c._space,y=m(10,u),_=m(9,u)-y>=g?eo:m(7,u)-y>=g?wf:m(5,u)-y>=g?Sf:vs;if(_==vs){let h=Ae(m(1,u)-y);if(h<g)return Xn(l.slice().reverse(),d.distr,_,at(g/h)).reverse()}return Xn(l,d.distr,_,1)}function yf(e,l,s,n,o){let c=e.axes[s],u=c.scale,d=c._space,m=e.valToPos,g=Ae(m(1,u)-m(2,u));return g<d?Xn(l.slice().reverse(),3,eo,at(d/g)).reverse():l}function xf(e,l,s,n){return n==null?ii:l==null?"":fi(l)}const ks={show:!0,scale:"y",stroke:ni,space:30,gap:5,size:50,labelGap:0,labelSize:30,labelFont:Qs,side:3,grid:hi,ticks:Js,border:Zs,font:pi,lineGap:Xs,rotate:0};function vf(e,l){let s=3+(e||1)*2;return he(s*l,3)}function kf(e,l){let{scale:s,idxs:n}=e.series[0],o=e._data[0],c=e.valToPos(o[n[0]],s,!0),u=e.valToPos(o[n[1]],s,!0),d=Ae(u-c),m=e.series[l],g=d/(m.points.space*oe);return n[1]-n[0]<=g}const bs={scale:null,auto:!0,sorted:0,min:ee,max:-ee},to=(e,l,s,n,o)=>o,Ms={show:!0,auto:!0,sorted:0,gaps:to,alpha:1,facets:[Me({},bs,{scale:"x"}),Me({},bs,{scale:"y"})]},Es={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:to,alpha:1,points:{show:kf,filter:null},values:null,min:ee,max:-ee,idxs:[],path:null,clip:null};function bf(e,l,s,n,o){return s/10}const lo={time:jo,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},Mf=Me({},lo,{time:!1,ori:1}),Ts={};function no(e,l){let s=Ts[e];return s||(s={key:e,plots:[],sub(n){s.plots.push(n)},unsub(n){s.plots=s.plots.filter(o=>o!=n)},pub(n,o,c,u,d,m,g){for(let y=0;y<s.plots.length;y++)s.plots[y]!=o&&s.plots[y].pub(n,o,c,u,d,m,g)}},e!=null&&(Ts[e]=s)),s}const Al=1,ei=2;function ll(e,l,s){const n=e.mode,o=e.series[l],c=n==2?e._data[l]:e._data,u=e.scales,d=e.bbox;let m=c[0],g=n==2?c[1]:c[l],y=n==2?u[o.facets[0].scale]:u[e.series[0].scale],_=n==2?u[o.facets[1].scale]:u[o.scale],h=d.left,T=d.top,z=d.width,D=d.height,F=e.valToPosH,P=e.valToPosV;return y.ori==0?s(o,m,g,y,_,F,P,h,T,z,D,wn,Ll,_n,so,ro):s(o,m,g,y,_,P,F,T,h,D,z,Sn,Pl,gi,oo,fo)}function mi(e,l){let s=0,n=0,o=se(e.bands,ui);for(let c=0;c<o.length;c++){let u=o[c];u.series[0]==l?s=u.dir:u.series[1]==l&&(u.dir==1?n|=1:n|=2)}return[s,n==1?-1:n==2?1:n==3?2:0]}function Ef(e,l,s,n,o){let c=e.mode,u=e.series[l],d=c==2?u.facets[1].scale:u.scale,m=e.scales[d];return o==-1?m.min:o==1?m.max:m.distr==3?m.dir==1?m.min:m.max:0}function Dt(e,l,s,n,o,c){return ll(e,l,(u,d,m,g,y,_,h,T,z,D,F)=>{let P=u.pxRound;const H=g.dir*(g.ori==0?1:-1),k=g.ori==0?Ll:Pl;let C,E;H==1?(C=s,E=n):(C=n,E=s);let W=P(_(d[C],g,D,T)),L=P(h(m[C],y,F,z)),I=P(_(d[E],g,D,T)),B=P(h(c==1?y.max:y.min,y,F,z)),V=new Path2D(o);return k(V,I,B),k(V,W,B),k(V,W,L),V})}function gn(e,l,s,n,o,c){let u=null;if(e.length>0){u=new Path2D;const d=l==0?_n:gi;let m=s;for(let _=0;_<e.length;_++){let h=e[_];if(h[1]>h[0]){let T=h[0]-m;T>0&&d(u,m,n,T,n+c),m=h[1]}}let g=s+o-m,y=10;g>0&&d(u,m,n-y/2,g,n+c+y)}return u}function Tf(e,l,s){let n=e[e.length-1];n&&n[0]==l?n[1]=s:e.push([l,s])}function di(e,l,s,n,o,c,u){let d=[],m=e.length;for(let g=o==1?s:n;g>=s&&g<=n;g+=o)if(l[g]===null){let _=g,h=g;if(o==1)for(;++g<=n&&l[g]===null;)h=g;else for(;--g>=s&&l[g]===null;)h=g;let T=c(e[_]),z=h==_?T:c(e[h]),D=_-o;T=u<=0&&D>=0&&D<m?c(e[D]):T;let P=h+o;z=u>=0&&P>=0&&P<m?c(e[P]):z,z>=T&&d.push([T,z])}return d}function As(e){return e==0?zs:e==1?Te:l=>Zt(l,e)}function io(e){let l=e==0?wn:Sn,s=e==0?(o,c,u,d,m,g)=>{o.arcTo(c,u,d,m,g)}:(o,c,u,d,m,g)=>{o.arcTo(u,c,m,d,g)},n=e==0?(o,c,u,d,m)=>{o.rect(c,u,d,m)}:(o,c,u,d,m)=>{o.rect(u,c,m,d)};return(o,c,u,d,m,g=0,y=0)=>{g==0&&y==0?n(o,c,u,d,m):(g=ht(g,d/2,m/2),y=ht(y,d/2,m/2),l(o,c+g,u),s(o,c+d,u,c+d,u+m,g),s(o,c+d,u+m,c,u+m,y),s(o,c,u+m,c,u,y),s(o,c,u,c+d,u,g),o.closePath())}}const wn=(e,l,s)=>{e.moveTo(l,s)},Sn=(e,l,s)=>{e.moveTo(s,l)},Ll=(e,l,s)=>{e.lineTo(l,s)},Pl=(e,l,s)=>{e.lineTo(s,l)},_n=io(0),gi=io(1),so=(e,l,s,n,o,c)=>{e.arc(l,s,n,o,c)},oo=(e,l,s,n,o,c)=>{e.arc(s,l,n,o,c)},ro=(e,l,s,n,o,c,u)=>{e.bezierCurveTo(l,s,n,o,c,u)},fo=(e,l,s,n,o,c,u)=>{e.bezierCurveTo(s,l,o,n,u,c)};function uo(e){return(l,s,n,o,c)=>ll(l,s,(u,d,m,g,y,_,h,T,z,D,F)=>{let{pxRound:P,points:H}=u,k,C;g.ori==0?(k=wn,C=so):(k=Sn,C=oo);const E=he(H.width*oe,3);let W=(H.size-H.width)/2*oe,L=he(W*2,3),I=new Path2D,B=new Path2D,{left:V,top:v,width:N,height:q}=l.bbox;_n(B,V-L,v-L,N+L*2,q+L*2);const le=U=>{if(m[U]!=null){let ue=P(_(d[U],g,D,T)),Z=P(h(m[U],y,F,z));k(I,ue+W,Z),C(I,ue,Z,W,0,un*2)}};if(c)c.forEach(le);else for(let U=n;U<=o;U++)le(U);return{stroke:E>0?I:null,fill:I,clip:B,flags:Al|ei}})}function co(e){return(l,s,n,o,c,u)=>{n!=o&&(c!=n&&u!=n&&e(l,s,n),c!=o&&u!=o&&e(l,s,o),e(l,s,u))}}const Af=co(Ll),Df=co(Pl);function ao(e){const l=se(e==null?void 0:e.alignGaps,0);return(s,n,o,c)=>ll(s,n,(u,d,m,g,y,_,h,T,z,D,F)=>{let P=u.pxRound,H=O=>P(_(O,g,D,T)),k=O=>P(h(O,y,F,z)),C,E;g.ori==0?(C=Ll,E=Af):(C=Pl,E=Df);const W=g.dir*(g.ori==0?1:-1),L={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:Al},I=L.stroke;let B=ee,V=-ee,v,N,q,le=H(d[W==1?o:c]),U=bl(m,o,c,1*W),ue=bl(m,o,c,-1*W),Z=H(d[U]),Ue=H(d[ue]),ve=!1;for(let O=W==1?o:c;O>=o&&O<=c;O+=W){let Se=H(d[O]),ie=m[O];Se==le?ie!=null?(N=k(ie),B==ee&&(C(I,Se,N),v=N),B=ht(N,B),V=Oe(N,V)):ie===null&&(ve=!0):(B!=ee&&(E(I,le,B,V,v,N),q=le),ie!=null?(N=k(ie),C(I,Se,N),B=V=v=N):(B=ee,V=-ee,ie===null&&(ve=!0)),le=Se)}B!=ee&&B!=V&&q!=le&&E(I,le,B,V,v,N);let[ne,fe]=mi(s,n);if(u.fill!=null||ne!=0){let O=L.fill=new Path2D(I),Se=u.fillTo(s,n,u.min,u.max,ne),ie=k(Se);C(O,Ue,ie),C(O,Z,ie)}if(!u.spanGaps){let O=[];ve&&O.push(...di(d,m,o,c,W,H,l)),L.gaps=O=u.gaps(s,n,o,c,O),L.clip=gn(O,g.ori,T,z,D,F)}return fe!=0&&(L.band=fe==2?[Dt(s,n,o,c,I,-1),Dt(s,n,o,c,I,1)]:Dt(s,n,o,c,I,fe)),L})}function Lf(e){const l=se(e.align,1),s=se(e.ascDesc,!1),n=se(e.alignGaps,0),o=se(e.extend,!1);return(c,u,d,m)=>ll(c,u,(g,y,_,h,T,z,D,F,P,H,k)=>{let C=g.pxRound,{left:E,width:W}=c.bbox,L=ne=>C(z(ne,h,H,F)),I=ne=>C(D(ne,T,k,P)),B=h.ori==0?Ll:Pl;const V={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:Al},v=V.stroke,N=h.dir*(h.ori==0?1:-1);d=bl(_,d,m,1),m=bl(_,d,m,-1);let q=I(_[N==1?d:m]),le=L(y[N==1?d:m]),U=le,ue=le;o&&l==-1&&(ue=E,B(v,ue,q)),B(v,le,q);for(let ne=N==1?d:m;ne>=d&&ne<=m;ne+=N){let fe=_[ne];if(fe==null)continue;let O=L(y[ne]),Se=I(fe);l==1?B(v,O,q):B(v,U,Se),B(v,O,Se),q=Se,U=O}let Z=U;o&&l==1&&(Z=E+W,B(v,Z,q));let[Ue,ve]=mi(c,u);if(g.fill!=null||Ue!=0){let ne=V.fill=new Path2D(v),fe=g.fillTo(c,u,g.min,g.max,Ue),O=I(fe);B(ne,Z,O),B(ne,ue,O)}if(!g.spanGaps){let ne=[];ne.push(...di(y,_,d,m,N,L,n));let fe=g.width*oe/2,O=s||l==1?fe:-fe,Se=s||l==-1?-fe:fe;ne.forEach(ie=>{ie[0]+=O,ie[1]+=Se}),V.gaps=ne=g.gaps(c,u,d,m,ne),V.clip=gn(ne,h.ori,F,P,H,k)}return ve!=0&&(V.band=ve==2?[Dt(c,u,d,m,v,-1),Dt(c,u,d,m,v,1)]:Dt(c,u,d,m,v,ve)),V})}function Ds(e,l,s,n,o,c,u=ee){if(e.length>1){let d=null;for(let m=0,g=1/0;m<e.length;m++)if(l[m]!==void 0){if(d!=null){let y=Ae(e[m]-e[d]);y<g&&(g=y,u=Ae(s(e[m],n,o,c)-s(e[d],n,o,c)))}d=m}}return u}function Pf(e){e=e||$l;const l=se(e.size,[.6,ee,1]),s=e.align||0,n=e.gap||0;let o=e.radius;o=o==null?[0,0]:typeof o=="number"?[o,0]:o;const c=X(o),u=1-l[0],d=se(l[1],ee),m=se(l[2],1),g=se(e.disp,$l),y=se(e.each,T=>{}),{fill:_,stroke:h}=g;return(T,z,D,F)=>ll(T,z,(P,H,k,C,E,W,L,I,B,V,v)=>{let N=P.pxRound,q=s,le=n*oe,U=d*oe,ue=m*oe,Z,Ue;C.ori==0?[Z,Ue]=c(T,z):[Ue,Z]=c(T,z);const ve=C.dir*(C.ori==0?1:-1);let ne=C.ori==0?_n:gi,fe=C.ori==0?y:($,Ge,Ct,Ut,Rt,qe,pt)=>{y($,Ge,Ct,Rt,Ut,pt,qe)},O=se(T.bands,ui).find($=>$.series[0]==z),Se=O!=null?O.dir:0,ie=P.fillTo(T,z,P.min,P.max,Se),Ke=N(L(ie,E,v,B)),Cl,Ee,$e,nt=V,ye=N(P.width*oe),je=!1,Lt=null,nl=null,Yt=null,il=null;_!=null&&(ye==0||h!=null)&&(je=!0,Lt=_.values(T,z,D,F),nl=new Map,new Set(Lt).forEach($=>{$!=null&&nl.set($,new Path2D)}),ye>0&&(Yt=h.values(T,z,D,F),il=new Map,new Set(Yt).forEach($=>{$!=null&&il.set($,new Path2D)})));let{x0:Rl,size:Mt}=g;if(Rl!=null&&Mt!=null){q=1,H=Rl.values(T,z,D,F),Rl.unit==2&&(H=H.map(Ct=>T.posToVal(I+Ct*V,C.key,!0)));let $=Mt.values(T,z,D,F);Mt.unit==2?Ee=$[0]*V:Ee=W($[0],C,V,I)-W(0,C,V,I),nt=Ds(H,k,W,C,V,I,nt),$e=nt-Ee+le}else nt=Ds(H,k,W,C,V,I,nt),$e=nt*u+le,Ee=nt-$e;$e<1&&($e=0),ye>=Ee/2&&(ye=0),$e<5&&(N=zs);let it=$e>0,ql=nt-$e-(it?ye:0);Ee=N(Zn(ql,ue,U)),Cl=(q==0?Ee/2:q==ve?0:Ee)-q*ve*((q==0?le/2:0)+(it?ye/2:0));const _t={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},Pt=je?null:new Path2D;let K=null;if(O!=null)K=T.data[O.series[1]];else{let{y0:$,y1:Ge}=g;$!=null&&Ge!=null&&(k=Ge.values(T,z,D,F),K=$.values(T,z,D,F))}let J=Z*Ee,He=Ue*Ee;for(let $=ve==1?D:F;$>=D&&$<=F;$+=ve){let Ge=k[$];if(Ge==null)continue;if(K!=null){let yt=K[$]??0;if(Ge-yt==0)continue;Ke=L(yt,E,v,B)}let Ct=C.distr!=2||g!=null?H[$]:$,Ut=W(Ct,C,V,I),Rt=L(se(Ge,ie),E,v,B),qe=N(Ut-Cl),pt=N(Oe(Rt,Ke)),Qe=N(ht(Rt,Ke)),st=pt-Qe;if(Ge!=null){let yt=Ge<0?He:J,zt=Ge<0?J:He;je?(ye>0&&Yt[$]!=null&&ne(il.get(Yt[$]),qe,Qe+tt(ye/2),Ee,Oe(0,st-ye),yt,zt),Lt[$]!=null&&ne(nl.get(Lt[$]),qe,Qe+tt(ye/2),Ee,Oe(0,st-ye),yt,zt)):ne(Pt,qe,Qe+tt(ye/2),Ee,Oe(0,st-ye),yt,zt),fe(T,z,$,qe-ye/2,Qe,Ee+ye,st)}}return ye>0?_t.stroke=je?il:Pt:je||(_t._fill=P.width==0?P._fill:P._stroke??P._fill,_t.width=0),_t.fill=je?nl:Pt,_t})}function Cf(e,l){const s=se(l==null?void 0:l.alignGaps,0);return(n,o,c,u)=>ll(n,o,(d,m,g,y,_,h,T,z,D,F,P)=>{let H=d.pxRound,k=Z=>H(h(Z,y,F,z)),C=Z=>H(T(Z,_,P,D)),E,W,L;y.ori==0?(E=wn,L=Ll,W=ro):(E=Sn,L=Pl,W=fo);const I=y.dir*(y.ori==0?1:-1);c=bl(g,c,u,1),u=bl(g,c,u,-1);let B=k(m[I==1?c:u]),V=B,v=[],N=[];for(let Z=I==1?c:u;Z>=c&&Z<=u;Z+=I)if(g[Z]!=null){let ve=m[Z],ne=k(ve);v.push(V=ne),N.push(C(g[Z]))}const q={stroke:e(v,N,E,L,W,H),fill:null,clip:null,band:null,gaps:null,flags:Al},le=q.stroke;let[U,ue]=mi(n,o);if(d.fill!=null||U!=0){let Z=q.fill=new Path2D(le),Ue=d.fillTo(n,o,d.min,d.max,U),ve=C(Ue);L(Z,V,ve),L(Z,B,ve)}if(!d.spanGaps){let Z=[];Z.push(...di(m,g,c,u,I,k,s)),q.gaps=Z=d.gaps(n,o,c,u,Z),q.clip=gn(Z,y.ori,z,D,F,P)}return ue!=0&&(q.band=ue==2?[Dt(n,o,c,u,le,-1),Dt(n,o,c,u,le,1)]:Dt(n,o,c,u,le,ue)),q})}function Rf(e){return Cf(zf,e)}function zf(e,l,s,n,o,c){const u=e.length;if(u<2)return null;const d=new Path2D;if(s(d,e[0],l[0]),u==2)n(d,e[1],l[1]);else{let m=Array(u),g=Array(u-1),y=Array(u-1),_=Array(u-1);for(let h=0;h<u-1;h++)y[h]=l[h+1]-l[h],_[h]=e[h+1]-e[h],g[h]=y[h]/_[h];m[0]=g[0];for(let h=1;h<u-1;h++)g[h]===0||g[h-1]===0||g[h-1]>0!=g[h]>0?m[h]=0:(m[h]=3*(_[h-1]+_[h])/((2*_[h]+_[h-1])/g[h-1]+(_[h]+2*_[h-1])/g[h]),isFinite(m[h])||(m[h]=0));m[u-1]=g[u-2];for(let h=0;h<u-1;h++)o(d,e[h]+_[h]/3,l[h]+m[h]*_[h]/3,e[h+1]-_[h]/3,l[h+1]-m[h+1]*_[h]/3,e[h+1],l[h+1])}return d}const ti=new Set;function Ls(){for(let e of ti)e.syncRect(!0)}Dl&&(el(pr,kl,Ls),el(mr,kl,Ls,!0),el(cn,kl,()=>{We.pxRatio=oe}));const Vf=ao(),Ff=uo();function Ps(e,l,s,n){return(n?[e[0],e[1]].concat(e.slice(2)):[e[0]].concat(e.slice(1))).map((c,u)=>li(c,u,l,s))}function Hf(e,l){return e.map((s,n)=>n==0?{}:Me({},l,s))}function li(e,l,s,n){return Me({},l==0?s:n,e)}function ho(e,l,s){return l==null?El:[l,s]}const Nf=ho;function Of(e,l,s){return l==null?El:an(l,s,ri,!0)}function po(e,l,s,n){return l==null?El:pn(l,s,e.scales[n].log,!1)}const Wf=po;function mo(e,l,s,n){return l==null?El:oi(l,s,e.scales[n].log,!1)}const Gf=mo;function If(e,l,s,n,o){let c=Oe(us(e),us(l)),u=l-e,d=St(o/n*u,s);do{let m=s[d],g=n*m/u;if(g>=o&&c+(m<5?Bt.get(m):0)<=17)return[m,g]}while(++d<s.length);return[0,0]}function Cs(e){let l,s;return e=e.replace(/(\d+)px/,(n,o)=>(l=Te((s=+o)*oe))+"px"),[e,l,s]}function Bf(e){e.show&&[e.font,e.labelFont].forEach(l=>{let s=he(l[2]*oe,1);l[0]=l[0].replace(/[0-9.]+px/,s+"px"),l[1]=s})}function We(e,l,s){const n={mode:se(e.mode,1)},o=n.mode;function c(t,i){return((i.distr==3?At(t>0?t:i.clamp(n,t,i.min,i.max,i.key)):i.distr==4?Bn(t,i.asinh):i.distr==100?i.fwd(t):t)-i._min)/(i._max-i._min)}function u(t,i,r,f){let a=c(t,i);return f+r*(i.dir==-1?1-a:a)}function d(t,i,r,f){let a=c(t,i);return f+r*(i.dir==-1?a:1-a)}function m(t,i,r,f){return i.ori==0?u(t,i,r,f):d(t,i,r,f)}n.valToPosH=u,n.valToPosV=d;let g=!1;n.status=0;const y=n.root=ct(qo);if(e.id!=null&&(y.id=e.id),et(y,e.class),e.title){let t=ct(Qo,y);t.textContent=e.title}const _=wt("canvas"),h=n.ctx=_.getContext("2d"),T=ct(Xo,y);el("click",T,t=>{t.target===D&&(pe!=dl||we!=gl)&&Fe.click(n,t)},!0);const z=n.under=ct(er,T);T.appendChild(_);const D=n.over=ct(tr,T);e=Tl(e);const F=+se(e.pxAlign,1),P=As(F);(e.plugins||[]).forEach(t=>{t.opts&&(e=t.opts(n,e)||e)});const H=e.ms||.001,k=n.series=o==1?Ps(e.series||[],xs,Es,!1):Hf(e.series||[null],Ms),C=n.axes=Ps(e.axes||[],ys,ks,!0),E=n.scales={},W=n.bands=e.bands||[];W.forEach(t=>{t.fill=X(t.fill||null),t.dir=se(t.dir,-1)});const L=o==2?k[1].facets[0].scale:k[0].scale,I={axes:Po,series:Eo},B=(e.drawOrder||["axes","series"]).map(t=>I[t]);function V(t){let i=E[t];if(i==null){let r=(e.scales||$l)[t]||$l;if(r.from!=null)V(r.from),E[t]=Me({},E[r.from],r,{key:t});else{i=E[t]=Me({},t==L?lo:Mf,r),i.key=t;let f=i.time,a=i.range,p=It(a);if((t!=L||o==2&&!f)&&(p&&(a[0]==null||a[1]==null)&&(a={min:a[0]==null?os:{mode:1,hard:a[0],soft:a[0]},max:a[1]==null?os:{mode:1,hard:a[1],soft:a[1]}},p=!1),!p&&dn(a))){let w=a;a=(S,x,b)=>x==null?El:an(x,b,w)}i.range=X(a||(f?Nf:t==L?i.distr==3?Wf:i.distr==4?Gf:ho:i.distr==3?po:i.distr==4?mo:Of)),i.auto=X(p?!1:i.auto),i.clamp=X(i.clamp||bf),i._min=i._max=null}}}V("x"),V("y"),o==1&&k.forEach(t=>{V(t.scale)}),C.forEach(t=>{V(t.scale)});for(let t in e.scales)V(t);const v=E[L],N=v.distr;let q,le;v.ori==0?(et(y,Jo),q=u,le=d):(et(y,Zo),q=d,le=u);const U={};for(let t in E){let i=E[t];(i.min!=null||i.max!=null)&&(U[t]={min:i.min,max:i.max},i.min=i.max=null)}const ue=e.tzDate||(t=>new Date(Te(t/H))),Z=e.fmtDate||ci,Ue=H==1?Jr(ue):Xr(ue),ve=ws(ue,gs(H==1?qr:Qr,Z)),ne=_s(ue,Ss(tf,Z)),fe=[],O=n.legend=Me({},sf,e.legend),Se=O.show,ie=O.markers;O.idxs=fe,ie.width=X(ie.width),ie.dash=X(ie.dash),ie.stroke=X(ie.stroke),ie.fill=X(ie.fill);let Ke,Cl,Ee,$e=[],nt=[],ye,je=!1,Lt={};if(O.live){const t=k[1]?k[1].values:null;je=t!=null,ye=je?t(n,1,0):{_:0};for(let i in ye)Lt[i]=ii}if(Se)if(Ke=wt("table",rr,y),Ee=wt("tbody",null,Ke),O.mount(n,Ke),je){Cl=wt("thead",null,Ke,Ee);let t=wt("tr",null,Cl);wt("th",null,t);for(var nl in ye)wt("th",Ki,t).textContent=nl}else et(Ke,ur),O.live&&et(Ke,fr);const Yt={show:!0},il={show:!1};function Rl(t,i){if(i==0&&(je||!O.live||o==2))return El;let r=[],f=wt("tr",cr,Ee,Ee.childNodes[i]);et(f,t.class),t.show||et(f,Xt);let a=wt("th",null,f);if(ie.show){let S=ct(ar,a);if(i>0){let x=ie.width(n,i);x&&(S.style.border=x+"px "+ie.dash(n,i)+" "+ie.stroke(n,i)),S.style.background=ie.fill(n,i)}}let p=ct(Ki,a);p.textContent=t.label,i>0&&(ie.show||(p.style.color=t.width>0?ie.stroke(n,i):ie.fill(n,i)),it("click",a,S=>{if(G._lock)return;$t(S);let x=k.indexOf(t);if((S.ctrlKey||S.metaKey)!=O.isolate){let b=k.some((M,A)=>A>0&&A!=x&&M.show);k.forEach((M,A)=>{A>0&&xt(A,b?A==x?Yt:il:Yt,!0,ke.setSeries)})}else xt(x,{show:!t.show},!0,ke.setSeries)},!1),ol&&it(Zi,a,S=>{G._lock||($t(S),xt(k.indexOf(t),Sl,!0,ke.setSeries))},!1));for(var w in ye){let S=wt("td",hr,f);S.textContent="--",r.push(S)}return[f,r]}const Mt=new Map;function it(t,i,r,f=!0){const a=Mt.get(i)||{},p=G.bind[t](n,i,r,f);p&&(el(t,i,a[t]=p),Mt.set(i,a))}function ql(t,i,r){const f=Mt.get(i)||{};for(let a in f)(t==null||a==t)&&(Jn(a,i,f[a]),delete f[a]);t==null&&Mt.delete(i)}let _t=0,Pt=0,K=0,J=0,He=0,$=0,Ge=He,Ct=$,Ut=K,Rt=J,qe=0,pt=0,Qe=0,st=0;n.bbox={};let yt=!1,zt=!1,sl=!1,Kt=!1,Jl=!1,ot=!1;function yn(t,i,r){(r||t!=n.width||i!=n.height)&&wi(t,i),al(!1),sl=!0,zt=!0,hl()}function wi(t,i){n.width=_t=K=t,n.height=Pt=J=i,He=$=0,_o(),yo();let r=n.bbox;qe=r.left=Zt(He*oe,.5),pt=r.top=Zt($*oe,.5),Qe=r.width=Zt(K*oe,.5),st=r.height=Zt(J*oe,.5)}const go=3;function wo(){let t=!1,i=0;for(;!t;){i++;let r=Do(i),f=Lo(i);t=i==go||r&&f,t||(wi(n.width,n.height),zt=!0)}}function So({width:t,height:i}){yn(t,i)}n.setSize=So;function _o(){let t=!1,i=!1,r=!1,f=!1;C.forEach((a,p)=>{if(a.show&&a._show){let{side:w,_size:S}=a,x=w%2,b=a.label!=null?a.labelSize:0,M=S+b;M>0&&(x?(K-=M,w==3?(He+=M,f=!0):r=!0):(J-=M,w==0?($+=M,t=!0):i=!0))}}),jt[0]=t,jt[1]=r,jt[2]=i,jt[3]=f,K-=Ft[1]+Ft[3],He+=Ft[3],J-=Ft[2]+Ft[0],$+=Ft[0]}function yo(){let t=He+K,i=$+J,r=He,f=$;function a(p,w){switch(p){case 1:return t+=w,t-w;case 2:return i+=w,i-w;case 3:return r-=w,r+w;case 0:return f-=w,f+w}}C.forEach((p,w)=>{if(p.show&&p._show){let S=p.side;p._pos=a(S,p._size),p.label!=null&&(p._lpos=a(S,p.labelSize))}})}const G=n.cursor=Me({},af,{drag:{y:o==2}},e.cursor);if(G.dataIdx==null){let t=G.hover,i=t.skip=new Set(t.skip??[]);i.add(void 0);let r=t.prox=X(t.prox),f=t.bias??(t.bias=0);G.dataIdx=(a,p,w,S)=>{if(p==0)return w;let x=w,b=r(a,p,w,S)??ee,M=b>=0&&b<ee,A=v.ori==0?K:J,Y=G.left,ae=l[0],te=l[p];if(i.has(te[w])){x=null;let Q=null,j=null,R;if(f==0||f==-1)for(R=w;Q==null&&R-- >0;)i.has(te[R])||(Q=R);if(f==0||f==1)for(R=w;j==null&&R++<te.length;)i.has(te[R])||(j=R);if(Q!=null||j!=null)if(M){let ce=Q==null?-1/0:q(ae[Q],v,A,0),xe=j==null?1/0:q(ae[j],v,A,0),_e=Y-ce,de=xe-Y;_e<=de?_e<=b&&(x=Q):de<=b&&(x=j)}else x=j==null?Q:Q==null?j:w-Q<=j-w?Q:j}else M&&Ae(Y-q(ae[w],v,A,0))>b&&(x=null);return x}}const $t=t=>{G.event=t};G.idxs=fe,G._lock=!1;let Ne=G.points;Ne.show=X(Ne.show),Ne.size=X(Ne.size),Ne.stroke=X(Ne.stroke),Ne.width=X(Ne.width),Ne.fill=X(Ne.fill);const Vt=n.focus=Me({},e.focus||{alpha:.3},G.focus),ol=Vt.prox>=0,rl=ol&&Ne.one;let rt=[],fl=[],ul=[];function Si(t,i){let r=Ne.show(n,i);if(r)return et(r,or),et(r,t.class),bt(r,-10,-10,K,J),D.insertBefore(r,rt[i]),r}function _i(t,i){if(o==1||i>0){let r=o==1&&E[t.scale].time,f=t.value;t.value=r?hs(f)?_s(ue,Ss(f,Z)):f||ne:f||xf,t.label=t.label||(r?pf:hf)}if(rl||i>0){t.width=t.width==null?1:t.width,t.paths=t.paths||Vf||br,t.fillTo=X(t.fillTo||Ef),t.pxAlign=+se(t.pxAlign,F),t.pxRound=As(t.pxAlign),t.stroke=X(t.stroke||null),t.fill=X(t.fill||null),t._stroke=t._fill=t._paths=t._focus=null;let r=vf(Oe(1,t.width),1),f=t.points=Me({},{size:r,width:Oe(1,r*.2),stroke:t.stroke,space:r*2,paths:Ff,_stroke:null,_fill:null},t.points);f.show=X(f.show),f.filter=X(f.filter),f.fill=X(f.fill),f.stroke=X(f.stroke),f.paths=X(f.paths),f.pxAlign=t.pxAlign}if(Se){let r=Rl(t,i);$e.splice(i,0,r[0]),nt.splice(i,0,r[1]),O.values.push(null)}if(G.show){fe.splice(i,0,null);let r=null;rl?i==0&&(r=Si(t,i)):i>0&&(r=Si(t,i)),rt.splice(i,0,r),fl.splice(i,0,0),ul.splice(i,0,0)}ze("addSeries",i)}function xo(t,i){i=i??k.length,t=o==1?li(t,i,xs,Es):li(t,i,{},Ms),k.splice(i,0,t),_i(k[i],i)}n.addSeries=xo;function vo(t){if(k.splice(t,1),Se){O.values.splice(t,1),nt.splice(t,1);let i=$e.splice(t,1)[0];ql(null,i.firstChild),i.remove()}G.show&&(fe.splice(t,1),rt.splice(t,1)[0].remove(),fl.splice(t,1),ul.splice(t,1)),ze("delSeries",t)}n.delSeries=vo;const jt=[!1,!1,!1,!1];function ko(t,i){if(t._show=t.show,t.show){let r=t.side%2,f=E[t.scale];f==null&&(t.scale=r?k[1].scale:L,f=E[t.scale]);let a=f.time;t.size=X(t.size),t.space=X(t.space),t.rotate=X(t.rotate),It(t.incrs)&&t.incrs.forEach(w=>{!Bt.has(w)&&Bt.set(w,Hs(w))}),t.incrs=X(t.incrs||(f.distr==2?Kr:a?H==1?jr:Zr:Qt)),t.splits=X(t.splits||(a&&f.distr==1?Ue:f.distr==3?Qn:f.distr==4?gf:df)),t.stroke=X(t.stroke),t.grid.stroke=X(t.grid.stroke),t.ticks.stroke=X(t.ticks.stroke),t.border.stroke=X(t.border.stroke);let p=t.values;t.values=It(p)&&!It(p[0])?X(p):a?It(p)?ws(ue,gs(p,Z)):hs(p)?ef(ue,p):p||ve:p||mf,t.filter=X(t.filter||(f.distr>=3&&f.log==10?_f:f.distr==3&&f.log==2?yf:Vs)),t.font=Cs(t.font),t.labelFont=Cs(t.labelFont),t._size=t.size(n,null,i,0),t._space=t._rotate=t._incrs=t._found=t._splits=t._values=null,t._size>0&&(jt[i]=!0,t._el=ct(lr,T))}}function zl(t,i,r,f){let[a,p,w,S]=r,x=i%2,b=0;return x==0&&(S||p)&&(b=i==0&&!a||i==2&&!w?Te(ys.size/3):0),x==1&&(a||w)&&(b=i==1&&!p||i==3&&!S?Te(ks.size/2):0),b}const yi=n.padding=(e.padding||[zl,zl,zl,zl]).map(t=>X(se(t,zl))),Ft=n._padding=yi.map((t,i)=>t(n,i,jt,0));let Ve,Le=null,Pe=null;const Zl=o==1?k[0].idxs:null;let mt=null,Vl=!1;function xi(t,i){if(l=t??[],n.data=n._data=l,o==2){Ve=0;for(let r=1;r<k.length;r++)Ve+=l[r][0].length}else{l.length==0&&(n.data=n._data=l=[[]]),mt=l[0],Ve=mt.length;let r=l;if(N==2){r=l.slice();let f=r[0]=Array(Ve);for(let a=0;a<Ve;a++)f[a]=a}n._data=l=r}if(al(!0),ze("setData"),N==2&&(sl=!0),i!==!1){let r=v;r.auto(n,Vl)?xn():Nt(L,r.min,r.max),Kt=Kt||G.left>=0,ot=!0,hl()}}n.setData=xi;function xn(){Vl=!0;let t,i;o==1&&(Ve>0?(Le=Zl[0]=0,Pe=Zl[1]=Ve-1,t=l[0][Le],i=l[0][Pe],N==2?(t=Le,i=Pe):t==i&&(N==3?[t,i]=pn(t,t,v.log,!1):N==4?[t,i]=oi(t,t,v.log,!1):v.time?i=t+Te(86400/H):[t,i]=an(t,i,ri,!0))):(Le=Zl[0]=t=null,Pe=Zl[1]=i=null)),Nt(L,t,i)}let Ql,cl,vn,kn,bn,Mn,En,Tn,An,Et;function vi(t,i,r,f,a,p){t??(t=ji),r??(r=ui),f??(f="butt"),a??(a=ji),p??(p="round"),t!=Ql&&(h.strokeStyle=Ql=t),a!=cl&&(h.fillStyle=cl=a),i!=vn&&(h.lineWidth=vn=i),p!=bn&&(h.lineJoin=bn=p),f!=Mn&&(h.lineCap=Mn=f),r!=kn&&h.setLineDash(kn=r)}function ki(t,i,r,f){i!=cl&&(h.fillStyle=cl=i),t!=En&&(h.font=En=t),r!=Tn&&(h.textAlign=Tn=r),f!=An&&(h.textBaseline=An=f)}function Dn(t,i,r,f,a=0){if(f.length>0&&t.auto(n,Vl)&&(i==null||i.min==null)){let p=se(Le,0),w=se(Pe,f.length-1),S=r.min==null?t.distr==3?Sr(f,p,w):wr(f,p,w,a):[r.min,r.max];t.min=ht(t.min,r.min=S[0]),t.max=Oe(t.max,r.max=S[1])}}const bi={min:null,max:null};function bo(){for(let f in E){let a=E[f];U[f]==null&&(a.min==null||U[L]!=null&&a.auto(n,Vl))&&(U[f]=bi)}for(let f in E){let a=E[f];U[f]==null&&a.from!=null&&U[a.from]!=null&&(U[f]=bi)}U[L]!=null&&al(!0);let t={};for(let f in U){let a=U[f];if(a!=null){let p=t[f]=Tl(E[f],Tr);if(a.min!=null)Me(p,a);else if(f!=L||o==2)if(Ve==0&&p.from==null){let w=p.range(n,null,null,f);p.min=w[0],p.max=w[1]}else p.min=ee,p.max=-ee}}if(Ve>0){k.forEach((f,a)=>{if(o==1){let p=f.scale,w=U[p];if(w==null)return;let S=t[p];if(a==0){let x=S.range(n,S.min,S.max,p);S.min=x[0],S.max=x[1],Le=St(S.min,l[0]),Pe=St(S.max,l[0]),Pe-Le>1&&(l[0][Le]<S.min&&Le++,l[0][Pe]>S.max&&Pe--),f.min=mt[Le],f.max=mt[Pe]}else f.show&&f.auto&&Dn(S,w,f,l[a],f.sorted);f.idxs[0]=Le,f.idxs[1]=Pe}else if(a>0&&f.show&&f.auto){let[p,w]=f.facets,S=p.scale,x=w.scale,[b,M]=l[a],A=t[S],Y=t[x];A!=null&&Dn(A,U[S],p,b,p.sorted),Y!=null&&Dn(Y,U[x],w,M,w.sorted),f.min=w.min,f.max=w.max}});for(let f in t){let a=t[f],p=U[f];if(a.from==null&&(p==null||p.min==null)){let w=a.range(n,a.min==ee?null:a.min,a.max==-ee?null:a.max,f);a.min=w[0],a.max=w[1]}}}for(let f in t){let a=t[f];if(a.from!=null){let p=t[a.from];if(p.min==null)a.min=a.max=null;else{let w=a.range(n,p.min,p.max,f);a.min=w[0],a.max=w[1]}}}let i={},r=!1;for(let f in t){let a=t[f],p=E[f];if(p.min!=a.min||p.max!=a.max){p.min=a.min,p.max=a.max;let w=p.distr;p._min=w==3?At(p.min):w==4?Bn(p.min,p.asinh):w==100?p.fwd(p.min):p.min,p._max=w==3?At(p.max):w==4?Bn(p.max,p.asinh):w==100?p.fwd(p.max):p.max,i[f]=r=!0}}if(r){k.forEach((f,a)=>{o==2?a>0&&i.y&&(f._paths=null):i[f.scale]&&(f._paths=null)});for(let f in i)sl=!0,ze("setScale",f);G.show&&G.left>=0&&(Kt=ot=!0)}for(let f in U)U[f]=null}function Mo(t){let i=Zn(Le-1,0,Ve-1),r=Zn(Pe+1,0,Ve-1);for(;t[i]==null&&i>0;)i--;for(;t[r]==null&&r<Ve-1;)r++;return[i,r]}function Eo(){Ve>0&&(k.forEach((t,i)=>{if(i>0&&t.show&&(Mi(i,!1),Mi(i,!0),t._paths==null)){Et!=t.alpha&&(h.globalAlpha=Et=t.alpha);let r=o==2?[0,l[i][0].length-1]:Mo(l[i]);t._paths=t.paths(n,i,r[0],r[1]),Et!=1&&(h.globalAlpha=Et=1)}}),k.forEach((t,i)=>{if(i>0&&t.show){Et!=t.alpha&&(h.globalAlpha=Et=t.alpha),t._paths!=null&&Ei(i,!1);{let r=t._paths!=null?t._paths.gaps:null,f=t.points.show(n,i,Le,Pe,r),a=t.points.filter(n,i,f,r);(f||a)&&(t.points._paths=t.points.paths(n,i,Le,Pe,a),Ei(i,!0))}Et!=1&&(h.globalAlpha=Et=1),ze("drawSeries",i)}}))}function Mi(t,i){let r=i?k[t].points:k[t];r._stroke=r.stroke(n,t),r._fill=r.fill(n,t)}function Ei(t,i){let r=i?k[t].points:k[t],{stroke:f,fill:a,clip:p,flags:w,_stroke:S=r._stroke,_fill:x=r._fill,_width:b=r.width}=r._paths;b=he(b*oe,3);let M=null,A=b%2/2;i&&x==null&&(x=b>0?"#fff":S);let Y=r.pxAlign==1&&A>0;if(Y&&h.translate(A,A),!i){let ae=qe-b/2,te=pt-b/2,Q=Qe+b,j=st+b;M=new Path2D,M.rect(ae,te,Q,j)}i?Ln(S,b,r.dash,r.cap,x,f,a,w,p):To(t,S,b,r.dash,r.cap,x,f,a,w,M,p),Y&&h.translate(-A,-A)}function To(t,i,r,f,a,p,w,S,x,b,M){let A=!1;x!=0&&W.forEach((Y,ae)=>{if(Y.series[0]==t){let te=k[Y.series[1]],Q=l[Y.series[1]],j=(te._paths||$l).band;It(j)&&(j=Y.dir==1?j[0]:j[1]);let R,ce=null;te.show&&j&&yr(Q,Le,Pe)?(ce=Y.fill(n,ae)||p,R=te._paths.clip):j=null,Ln(i,r,f,a,ce,w,S,x,b,M,R,j),A=!0}}),A||Ln(i,r,f,a,p,w,S,x,b,M)}const Ti=Al|ei;function Ln(t,i,r,f,a,p,w,S,x,b,M,A){vi(t,i,r,f,a),(x||b||A)&&(h.save(),x&&h.clip(x),b&&h.clip(b)),A?(S&Ti)==Ti?(h.clip(A),M&&h.clip(M),en(a,w),Xl(t,p,i)):S&ei?(en(a,w),h.clip(A),Xl(t,p,i)):S&Al&&(h.save(),h.clip(A),M&&h.clip(M),en(a,w),h.restore(),Xl(t,p,i)):(en(a,w),Xl(t,p,i)),(x||b||A)&&h.restore()}function Xl(t,i,r){r>0&&(i instanceof Map?i.forEach((f,a)=>{h.strokeStyle=Ql=a,h.stroke(f)}):i!=null&&t&&h.stroke(i))}function en(t,i){i instanceof Map?i.forEach((r,f)=>{h.fillStyle=cl=f,h.fill(r)}):i!=null&&t&&h.fill(i)}function Ao(t,i,r,f){let a=C[t],p;if(f<=0)p=[0,0];else{let w=a._space=a.space(n,t,i,r,f),S=a._incrs=a.incrs(n,t,i,r,f,w);p=If(i,r,S,f,w)}return a._found=p}function Pn(t,i,r,f,a,p,w,S,x,b){let M=w%2/2;F==1&&h.translate(M,M),vi(S,w,x,b,S),h.beginPath();let A,Y,ae,te,Q=a+(f==0||f==3?-p:p);r==0?(Y=a,te=Q):(A=a,ae=Q);for(let j=0;j<t.length;j++)i[j]!=null&&(r==0?A=ae=t[j]:Y=te=t[j],h.moveTo(A,Y),h.lineTo(ae,te));h.stroke(),F==1&&h.translate(-M,-M)}function Do(t){let i=!0;return C.forEach((r,f)=>{if(!r.show)return;let a=E[r.scale];if(a.min==null){r._show&&(i=!1,r._show=!1,al(!1));return}else r._show||(i=!1,r._show=!0,al(!1));let p=r.side,w=p%2,{min:S,max:x}=a,[b,M]=Ao(f,S,x,w==0?K:J);if(M==0)return;let A=a.distr==2,Y=r._splits=r.splits(n,f,S,x,b,M,A),ae=a.distr==2?Y.map(R=>mt[R]):Y,te=a.distr==2?mt[Y[1]]-mt[Y[0]]:b,Q=r._values=r.values(n,r.filter(n,ae,f,M,te),f,M,te);r._rotate=p==2?r.rotate(n,Q,f,M):0;let j=r._size;r._size=at(r.size(n,Q,f,t)),j!=null&&r._size!=j&&(i=!1)}),i}function Lo(t){let i=!0;return yi.forEach((r,f)=>{let a=r(n,f,jt,t);a!=Ft[f]&&(i=!1),Ft[f]=a}),i}function Po(){for(let t=0;t<C.length;t++){let i=C[t];if(!i.show||!i._show)continue;let r=i.side,f=r%2,a,p,w=i.stroke(n,t),S=r==0||r==3?-1:1;if(i.label){let Ye=i.labelGap*S,Xe=Te((i._lpos+Ye)*oe);ki(i.labelFont[0],w,"center",r==2?Gl:$i),h.save(),f==1?(a=p=0,h.translate(Xe,Te(pt+st/2)),h.rotate((r==3?-un:un)/2)):(a=Te(qe+Qe/2),p=Xe),h.fillText(i.label,a,p),h.restore()}let[x,b]=i._found;if(b==0)continue;let M=E[i.scale],A=f==0?Qe:st,Y=f==0?qe:pt,ae=Te(i.gap*oe),te=i._splits,Q=M.distr==2?te.map(Ye=>mt[Ye]):te,j=M.distr==2?mt[te[1]]-mt[te[0]]:x,R=i.ticks,ce=i.border,xe=R.show?Te(R.size*oe):0,_e=i._rotate*-un/180,de=P(i._pos*oe),be=(xe+ae)*S,Je=de+be;p=f==0?Je:0,a=f==1?Je:0;let Ze=i.font[0],ft=i.align==1?xl:i.align==2?Gn:_e>0?xl:_e<0?Gn:f==0?"center":r==3?Gn:xl,dt=_e||f==1?"middle":r==2?Gl:$i;ki(Ze,w,ft,dt);let gt=i.font[1]*i.lineGap,Ie=te.map(Ye=>P(m(Ye,M,A,Y))),kt=i._values;for(let Ye=0;Ye<kt.length;Ye++){let Xe=kt[Ye];if(Xe!=null){f==0?a=Ie[Ye]:p=Ie[Ye],Xe=""+Xe;let yl=Xe.indexOf(`
3
3
  `)==-1?[Xe]:Xe.split(/\n/gm);for(let Gt=0;Gt<yl.length;Gt++){let ut=yl[Gt];_e?(h.save(),h.translate(a,p+Gt*gt),h.rotate(_e),h.fillText(ut,0,0),h.restore()):h.fillText(ut,a,p+Gt*gt)}}}R.show&&Pn(Ie,R.filter(n,Q,t,b,j),f,r,de,xe,he(R.width*oe,3),R.stroke(n,t),R.dash,R.cap);let Be=i.grid;Be.show&&Pn(Ie,Be.filter(n,Q,t,b,j),f,f==0?2:1,f==0?pt:qe,f==0?st:Qe,he(Be.width*oe,3),Be.stroke(n,t),Be.dash,Be.cap),ce.show&&Pn([de],[1],f==0?1:0,f==0?1:2,f==1?pt:qe,f==1?st:Qe,he(ce.width*oe,3),ce.stroke(n,t),ce.dash,ce.cap)}ze("drawAxes")}function al(t){k.forEach((i,r)=>{r>0&&(i._paths=null,t&&(o==1?(i.min=null,i.max=null):i.facets.forEach(f=>{f.min=null,f.max=null})))})}let tn=!1,Cn=!1,Fl=[];function Co(){Cn=!1;for(let t=0;t<Fl.length;t++)ze(...Fl[t]);Fl.length=0}function hl(){tn||(zr(Ai),tn=!0)}function Ro(t,i=!1){tn=!0,Cn=i,t(n),Ai(),i&&Fl.length>0&&queueMicrotask(Co)}n.batch=Ro;function Ai(){if(yt&&(bo(),yt=!1),sl&&(wo(),sl=!1),zt){if(ge(z,xl,He),ge(z,Gl,$),ge(z,Bl,K),ge(z,Yl,J),ge(D,xl,He),ge(D,Gl,$),ge(D,Bl,K),ge(D,Yl,J),ge(T,Bl,_t),ge(T,Yl,Pt),_.width=Te(_t*oe),_.height=Te(Pt*oe),C.forEach(({_el:t,_show:i,_size:r,_pos:f,side:a})=>{if(t!=null)if(i){let p=a===3||a===0?r:0,w=a%2==1;ge(t,w?"left":"top",f-p),ge(t,w?"width":"height",r),ge(t,w?"top":"left",w?$:He),ge(t,w?"height":"width",w?J:K),qn(t,Xt)}else et(t,Xt)}),Ql=cl=vn=bn=Mn=En=Tn=An=kn=null,Et=1,Ol(!0),He!=Ge||$!=Ct||K!=Ut||J!=Rt){al(!1);let t=K/Ut,i=J/Rt;if(G.show&&!Kt&&G.left>=0){G.left*=t,G.top*=i,pl&&bt(pl,Te(G.left),0,K,J),ml&&bt(ml,0,Te(G.top),K,J);for(let r=0;r<rt.length;r++){let f=rt[r];f!=null&&(fl[r]*=t,ul[r]*=i,bt(f,at(fl[r]),at(ul[r]),K,J))}}if(me.show&&!Jl&&me.left>=0&&me.width>0){me.left*=t,me.width*=t,me.top*=i,me.height*=i;for(let r in Nn)ge(wl,r,me[r])}Ge=He,Ct=$,Ut=K,Rt=J}ze("setSize"),zt=!1}_t>0&&Pt>0&&(h.clearRect(0,0,_.width,_.height),ze("drawClear"),B.forEach(t=>t()),ze("draw")),me.show&&Jl&&(ln(me),Jl=!1),G.show&&Kt&&(Jt(null,!0,!1),Kt=!1),O.show&&O.live&&ot&&(Fn(),ot=!1),g||(g=!0,n.status=1,ze("ready")),Vl=!1,tn=!1}n.redraw=(t,i)=>{sl=i||!1,t!==!1?Nt(L,v.min,v.max):hl()};function Rn(t,i){let r=E[t];if(r.from==null){if(Ve==0){let f=r.range(n,i.min,i.max,t);i.min=f[0],i.max=f[1]}if(i.min>i.max){let f=i.min;i.min=i.max,i.max=f}if(Ve>1&&i.min!=null&&i.max!=null&&i.max-i.min<1e-16)return;t==L&&r.distr==2&&Ve>0&&(i.min=St(i.min,l[0]),i.max=St(i.max,l[0]),i.min==i.max&&i.max++),U[t]=i,yt=!0,hl()}}n.setScale=Rn;let zn,Vn,pl,ml,Di,Li,dl,gl,Pi,Ci,pe,we,Ht=!1;const Fe=G.drag;let Ce=Fe.x,Re=Fe.y;G.show&&(G.x&&(zn=ct(ir,D)),G.y&&(Vn=ct(sr,D)),v.ori==0?(pl=zn,ml=Vn):(pl=Vn,ml=zn),pe=G.left,we=G.top);const me=n.select=Me({show:!0,over:!0,left:0,width:0,top:0,height:0},e.select),wl=me.show?ct(nr,me.over?D:z):null;function ln(t,i){if(me.show){for(let r in t)me[r]=t[r],r in Nn&&ge(wl,r,t[r]);i!==!1&&ze("setSelect")}}n.setSelect=ln;function zo(t,i){let r=k[t],f=Se?$e[t]:null;if(r.show)f&&qn(f,Xt);else{f&&et(f,Xt);let a=rl?rt[0]:rt[t];bt(a,-10,-10,K,J)}}function Nt(t,i,r){Rn(t,{min:i,max:r})}function xt(t,i,r,f){i.focus!=null&&Oo(t),i.show!=null&&k.forEach((a,p)=>{p>0&&(t==p||t==null)&&(a.show=i.show,zo(p,i.show),o==2?(Nt(a.facets[0].scale,null,null),Nt(a.facets[1].scale,null,null)):Nt(a.scale,null,null),hl())}),r!==!1&&ze("setSeries",t,i),f&&Wl("setSeries",n,t,i)}n.setSeries=xt;function Vo(t,i){Me(W[t],i)}function Fo(t,i){t.fill=X(t.fill||null),t.dir=se(t.dir,-1),i=i??W.length,W.splice(i,0,t)}function Ho(t){t==null?W.length=0:W.splice(t,1)}n.addBand=Fo,n.setBand=Vo,n.delBand=Ho;function No(t,i){k[t].alpha=i,G.show&&rt[t]&&(rt[t].style.opacity=i),Se&&$e[t]&&($e[t].style.opacity=i)}let Tt,Ot,qt;const Sl={focus:!0};function Oo(t){if(t!=qt){let i=t==null,r=Vt.alpha!=1;k.forEach((f,a)=>{if(o==1||a>0){let p=i||a==0||a==t;f._focus=i?null:p,r&&No(a,p?1:Vt.alpha)}}),qt=t,r&&hl()}}Se&&ol&&it(Qi,Ke,t=>{G._lock||($t(t),qt!=null&&xt(null,Sl,!0,ke.setSeries))});function vt(t,i,r){let f=E[i];r&&(t=t/oe-(f.ori==1?$:He));let a=K;f.ori==1&&(a=J,t=a-t),f.dir==-1&&(t=a-t);let p=f._min,w=f._max,S=t/a,x=p+(w-p)*S,b=f.distr;return b==3?Ml(10,x):b==4?vr(x,f.asinh):b==100?f.bwd(x):x}function Wo(t,i){let r=vt(t,L,i);return St(r,l[0],Le,Pe)}n.valToIdx=t=>St(t,l[0]),n.posToIdx=Wo,n.posToVal=vt,n.valToPos=(t,i,r)=>E[i].ori==0?u(t,E[i],r?Qe:K,r?qe:0):d(t,E[i],r?st:J,r?pt:0),n.setCursor=(t,i,r)=>{pe=t.left,we=t.top,Jt(null,i,r)};function Ri(t,i){ge(wl,xl,me.left=t),ge(wl,Bl,me.width=i)}function zi(t,i){ge(wl,Gl,me.top=t),ge(wl,Yl,me.height=i)}let Hl=v.ori==0?Ri:zi,Nl=v.ori==1?Ri:zi;function Go(){if(Se&&O.live)for(let t=o==2?1:0;t<k.length;t++){if(t==0&&je)continue;let i=O.values[t],r=0;for(let f in i)nt[t][r++].firstChild.nodeValue=i[f]}}function Fn(t,i){if(t!=null&&(t.idxs?t.idxs.forEach((r,f)=>{fe[f]=r}):Er(t.idx)||fe.fill(t.idx),O.idx=fe[0]),Se&&O.live){for(let r=0;r<k.length;r++)(r>0||o==1&&!je)&&Io(r,fe[r]);Go()}ot=!1,i!==!1&&ze("setLegend")}n.setLegend=Fn;function Io(t,i){let r=k[t],f=t==0&&N==2?mt:l[t],a;je?a=r.values(n,t,i)??Lt:(a=r.value(n,i==null?null:f[i],t,i),a=a==null?Lt:{_:a}),O.values[t]=a}function Jt(t,i,r){Pi=pe,Ci=we,[pe,we]=G.move(n,pe,we),G.left=pe,G.top=we,G.show&&(pl&&bt(pl,Te(pe),0,K,J),ml&&bt(ml,0,Te(we),K,J));let f,a=Le>Pe;Tt=ee,Ot=null;let p=v.ori==0?K:J,w=v.ori==1?K:J;if(pe<0||Ve==0||a){f=G.idx=null;for(let S=0;S<k.length;S++){let x=rt[S];x!=null&&bt(x,-10,-10,K,J)}ol&&xt(null,Sl,!0,t==null&&ke.setSeries),O.live&&(fe.fill(f),ot=!0)}else{let S,x,b;o==1&&(S=v.ori==0?pe:we,x=vt(S,L),f=G.idx=St(x,l[0],Le,Pe),b=q(l[0][f],v,p,0));let M=-10,A=-10,Y=0,ae=0,te=!0,Q="",j="";for(let R=o==2?1:0;R<k.length;R++){let ce=k[R],xe=fe[R],_e=xe==null?null:o==1?l[R][xe]:l[R][1][xe],de=G.dataIdx(n,R,f,x),be=de==null?null:o==1?l[R][de]:l[R][1][de];ot=ot||be!=_e||de!=xe,fe[R]=de;let Je=de==f?b:q(o==1?l[0][de]:l[R][0][de],v,p,0);if(R>0&&ce.show){let Ze=be==null?-10:le(be,o==1?E[ce.scale]:E[ce.facets[1].scale],w,0);if(ol&&be!=null){let ft=v.ori==1?pe:we,dt=Ae(Vt.dist(n,R,de,Ze,ft));if(dt<Tt){let gt=Vt.bias;if(gt!=0){let Ie=vt(ft,ce.scale),kt=be>=0?1:-1,Be=Ie>=0?1:-1;Be==kt&&(Be==1?gt==1?be>=Ie:be<=Ie:gt==1?be<=Ie:be>=Ie)&&(Tt=dt,Ot=R)}else Tt=dt,Ot=R}}if(ot||rl){let ft,dt;v.ori==0?(ft=Je,dt=Ze):(ft=Ze,dt=Je);let gt,Ie,kt,Be,Ye,Xe,yl=!0,Gt=Ne.bbox;if(Gt!=null){yl=!1;let ut=Gt(n,R);kt=ut.left,Be=ut.top,gt=ut.width,Ie=ut.height}else kt=ft,Be=dt,gt=Ie=Ne.size(n,R);if(Xe=Ne.fill(n,R),Ye=Ne.stroke(n,R),rl)R==Ot&&Tt<=Vt.prox&&(M=kt,A=Be,Y=gt,ae=Ie,te=yl,Q=Xe,j=Ye);else{let ut=rt[R];ut!=null&&(fl[R]=kt,ul[R]=Be,ss(ut,gt,Ie,yl),ns(ut,Xe,Ye),bt(ut,at(kt),at(Be),K,J))}}}}if(rl){let R=Vt.prox,ce=qt==null?Tt<=R:Tt>R||Ot!=qt;if(ot||ce){let xe=rt[0];fl[0]=M,ul[0]=A,ss(xe,Y,ae,te),ns(xe,Q,j),bt(xe,at(M),at(A),K,J)}}}if(me.show&&Ht)if(t!=null){let[S,x]=ke.scales,[b,M]=ke.match,[A,Y]=t.cursor.sync.scales,ae=t.cursor.drag;if(Ce=ae._x,Re=ae._y,Ce||Re){let{left:te,top:Q,width:j,height:R}=t.select,ce=t.scales[A].ori,xe=t.posToVal,_e,de,be,Je,Ze,ft=S!=null&&b(S,A),dt=x!=null&&M(x,Y);ft&&Ce?(ce==0?(_e=te,de=j):(_e=Q,de=R),be=E[S],Je=q(xe(_e,A),be,p,0),Ze=q(xe(_e+de,A),be,p,0),Hl(ht(Je,Ze),Ae(Ze-Je))):Hl(0,p),dt&&Re?(ce==1?(_e=te,de=j):(_e=Q,de=R),be=E[x],Je=le(xe(_e,Y),be,w,0),Ze=le(xe(_e+de,Y),be,w,0),Nl(ht(Je,Ze),Ae(Ze-Je))):Nl(0,w)}else nn()}else{let S=Ae(Pi-Di),x=Ae(Ci-Li);if(v.ori==1){let Y=S;S=x,x=Y}Ce=Fe.x&&S>=Fe.dist,Re=Fe.y&&x>=Fe.dist;let b=Fe.uni;b!=null?Ce&&Re&&(Ce=S>=b,Re=x>=b,!Ce&&!Re&&(x>S?Re=!0:Ce=!0)):Fe.x&&Fe.y&&(Ce||Re)&&(Ce=Re=!0);let M,A;Ce&&(v.ori==0?(M=dl,A=pe):(M=gl,A=we),Hl(ht(M,A),Ae(A-M)),Re||Nl(0,w)),Re&&(v.ori==1?(M=dl,A=pe):(M=gl,A=we),Nl(ht(M,A),Ae(A-M)),Ce||Hl(0,p)),!Ce&&!Re&&(Hl(0,0),Nl(0,0))}if(Fe._x=Ce,Fe._y=Re,t==null){if(r){if(Ui!=null){let[S,x]=ke.scales;ke.values[0]=S!=null?vt(v.ori==0?pe:we,S):null,ke.values[1]=x!=null?vt(v.ori==1?pe:we,x):null}Wl(qi,n,pe,we,K,J,f)}if(ol){let S=r&&ke.setSeries,x=Vt.prox;qt==null?Tt<=x&&xt(Ot,Sl,!0,S):Tt>x?xt(null,Sl,!0,S):Ot!=qt&&xt(Ot,Sl,!0,S)}}ot&&(O.idx=f,Fn()),i!==!1&&ze("setCursor")}let Wt=null;Object.defineProperty(n,"rect",{get(){return Wt==null&&Ol(!1),Wt}});function Ol(t=!1){t?Wt=null:(Wt=D.getBoundingClientRect(),ze("syncRect",Wt))}function Vi(t,i,r,f,a,p,w){G._lock||Ht&&t!=null&&t.movementX==0&&t.movementY==0||(Hn(t,i,r,f,a,p,w,!1,t!=null),t!=null?Jt(null,!0,!0):Jt(i,!0,!1))}function Hn(t,i,r,f,a,p,w,S,x){if(Wt==null&&Ol(!1),$t(t),t!=null)r=t.clientX-Wt.left,f=t.clientY-Wt.top;else{if(r<0||f<0){pe=-10,we=-10;return}let[b,M]=ke.scales,A=i.cursor.sync,[Y,ae]=A.values,[te,Q]=A.scales,[j,R]=ke.match,ce=i.axes[0].side%2==1,xe=v.ori==0?K:J,_e=v.ori==1?K:J,de=ce?p:a,be=ce?a:p,Je=ce?f:r,Ze=ce?r:f;if(te!=null?r=j(b,te)?m(Y,E[b],xe,0):-10:r=xe*(Je/de),Q!=null?f=R(M,Q)?m(ae,E[M],_e,0):-10:f=_e*(Ze/be),v.ori==1){let ft=r;r=f,f=ft}}x&&((r<=1||r>=K-1)&&(r=Zt(r,K)),(f<=1||f>=J-1)&&(f=Zt(f,J))),S?(Di=r,Li=f,[dl,gl]=G.move(n,r,f)):(pe=r,we=f)}const Nn={width:0,height:0,left:0,top:0};function nn(){ln(Nn,!1)}let Fi,Hi,Ni,Oi;function Wi(t,i,r,f,a,p,w){Ht=!0,Ce=Re=Fe._x=Fe._y=!1,Hn(t,i,r,f,a,p,w,!0,!1),t!=null&&(it(In,$n,Gi,!1),Wl(Ji,n,dl,gl,K,J,null));let{left:S,top:x,width:b,height:M}=me;Fi=S,Hi=x,Ni=b,Oi=M,nn()}function Gi(t,i,r,f,a,p,w){Ht=Fe._x=Fe._y=!1,Hn(t,i,r,f,a,p,w,!1,!0);let{left:S,top:x,width:b,height:M}=me,A=b>0||M>0,Y=Fi!=S||Hi!=x||Ni!=b||Oi!=M;if(A&&Y&&ln(me),Fe.setScale&&A&&Y){let ae=S,te=b,Q=x,j=M;if(v.ori==1&&(ae=x,te=M,Q=S,j=b),Ce&&Nt(L,vt(ae,L),vt(ae+te,L)),Re)for(let R in E){let ce=E[R];R!=L&&ce.from==null&&ce.min!=ee&&Nt(R,vt(Q+j,R),vt(Q,R))}nn()}else G.lock&&(G._lock=!G._lock,Jt(null,!0,!1));t!=null&&(ql(In,$n),Wl(In,n,pe,we,K,J,null))}function Bo(t,i,r,f,a,p,w){if(G._lock)return;$t(t);let S=Ht;if(Ht){let x=!0,b=!0,M=10,A,Y;v.ori==0?(A=Ce,Y=Re):(A=Re,Y=Ce),A&&Y&&(x=pe<=M||pe>=K-M,b=we<=M||we>=J-M),A&&x&&(pe=pe<dl?0:K),Y&&b&&(we=we<gl?0:J),Jt(null,!0,!0),Ht=!1}pe=-10,we=-10,Jt(null,!0,!0),S&&(Ht=S)}function Ii(t,i,r,f,a,p,w){G._lock||($t(t),xn(),nn(),t!=null&&Wl(Xi,n,pe,we,K,J,null))}function Bi(){C.forEach(Bf),yn(n.width,n.height,!0)}el(cn,kl,Bi);const _l={};_l.mousedown=Wi,_l.mousemove=Vi,_l.mouseup=Gi,_l.dblclick=Ii,_l.setSeries=(t,i,r,f)=>{let a=ke.match[2];r=a(n,i,r),r!=-1&&xt(r,f,!0,!1)},G.show&&(it(Ji,D,Wi),it(qi,D,Vi),it(Zi,D,t=>{$t(t),Ol(!1)}),it(Qi,D,Bo),it(Xi,D,Ii),ti.add(n),n.syncRect=Ol);const sn=n.hooks=e.hooks||{};function ze(t,i,r){Cn?Fl.push([t,i,r]):t in sn&&sn[t].forEach(f=>{f.call(null,n,i,r)})}(e.plugins||[]).forEach(t=>{for(let i in t.hooks)sn[i]=(sn[i]||[]).concat(t.hooks[i])});const Yi=(t,i,r)=>r,ke=Me({key:null,setSeries:!1,filters:{pub:cs,sub:cs},scales:[L,k[1]?k[1].scale:null],match:[as,as,Yi],values:[null,null]},G.sync);ke.match.length==2&&ke.match.push(Yi),G.sync=ke;const Ui=ke.key,On=no(Ui);function Wl(t,i,r,f,a,p,w){ke.filters.pub(t,i,r,f,a,p,w)&&On.pub(t,i,r,f,a,p,w)}On.sub(n);function Yo(t,i,r,f,a,p,w){ke.filters.sub(t,i,r,f,a,p,w)&&_l[t](null,i,r,f,a,p,w)}n.pub=Yo;function Uo(){On.unsub(n),ti.delete(n),Mt.clear(),Jn(cn,kl,Bi),y.remove(),Ke==null||Ke.remove(),ze("destroy")}n.destroy=Uo;function Wn(){ze("init",e,l),xi(l||e.data,!1),U[L]?Rn(L,U[L]):xn(),Jl=me.show&&(me.width>0||me.height>0),Kt=ot=!0,yn(e.width,e.height)}return k.forEach(_i),C.forEach(ko),s?s instanceof HTMLElement?(s.appendChild(y),Wn()):s(n,Wn):Wn(),n}We.assign=Me;We.fmtNum=fi;We.rangeNum=an;We.rangeLog=pn;We.rangeAsinh=oi;We.orient=ll;We.pxRatio=oe;We.join=Rr;We.fmtDate=ci,We.tzDate=Yr;We.sync=no;{We.addGap=Tf,We.clipGaps=gn;let e=We.paths={points:uo};e.linear=ao,e.stepped=Lf,e.bars=Pf,e.spline=Rf}function Yf(e){function l(s,n,o){let c=s.over,u,d,m,g,y,_={x:0,y:0,dx:0,dy:0},h={x:0,y:0,dx:0,dy:0};function T(P,H){let k=H.touches,C=k[0],E=C.clientX-u.left,W=C.clientY-u.top;if(k.length==1)P.x=E,P.y=W,P.d=P.dx=P.dy=1;else{let L=H.touches[1],I=L.clientX-u.left,B=L.clientY-u.top,V=Math.min(E,I),v=Math.min(W,B),N=Math.max(E,I),q=Math.max(W,B);P.y=(v+q)/2,P.x=(V+N)/2,P.dx=N-V,P.dy=q-v,P.d=Math.sqrt(P.dx*P.dx+P.dy*P.dy)}}let z=!1;function D(){z=!1;let P=h.x,H=h.y,k=_.d/h.d,C=_.d/h.d,E=P/u.width,W=1-H/u.height,L=d*k,I=g-E*L,B=I+L,V=m*C,v=y-W*V,N=v+V;s.batch(()=>{s.setScale("x",{min:I,max:B}),s.setScale("y",{min:v,max:N})})}function F(P){T(h,P),z||(z=!0,requestAnimationFrame(D))}c.addEventListener("touchstart",function(P){u=c.getBoundingClientRect(),T(_,P),d=s.scales.x.max-s.scales.x.min,m=s.scales.y.max-s.scales.y.min;let H=_.x,k=_.y;g=s.posToVal(H,"x"),y=s.posToVal(k,"y"),document.addEventListener("touchmove",F,{passive:!0})}),c.addEventListener("touchend",function(){document.removeEventListener("touchmove",F,{passive:!0})})}return{hooks:{init:l}}}const Uf={props:{node:{type:Object,required:!0},fillSize:{type:Boolean,default:!1},container:{type:Element,default:null},zoom:{type:Boolean,default:!0}},data(){return{chart:null,ro:null,resizeTimeout:null,isLoading:!1}},computed:{data(){const e=[],l=[[],[]],s=[[],[]],n=[[],[]],o=[[],[]];return this.node.bgRSSIPoints&&this.node.bgRSSIPoints.length>0&&this.node.bgRSSIPoints.forEach(c=>{e.push(c.timestamp/1e3),l[0].push(this.checkRssiError(c.channel0.current)),l[1].push(c.channel0.average),s[0].push(this.checkRssiError(c.channel1.current)),s[1].push(c.channel1.average),c.channel2&&(n[0].push(this.checkRssiError(c.channel2.current)),n[1].push(c.channel2.average)),c.channel3&&(o[0].push(this.checkRssiError(c.channel3.current)),o[1].push(c.channel3.average))}),[e,...l,...s,...n,...o]}},watch:{data(e,l){this.chart?this.isChanged(e,l)&&this.chart.setData(e):this.create()}},mounted(){this.create()},beforeUnmount(){this.destroy()},beforeDestroy(){this.destroy()},methods:{checkRssiError(e){return $o(e)?null:e},isChanged(e,l){return e=e==null?void 0:e[0],l=l==null?void 0:l[0],!e||!l?!0:e[e.length-1]!==l[l.length-1]},destroy(){this.chart&&(this.chart.destroy(),this.chart=null),this.ro&&(this.ro.disconnect(),this.ro=null),this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=null)},createSerie(e,l=1){const s=[3,5,7],n={show:!0,spanGaps:!1,label:"",value:(c,u)=>u?u.toFixed(2)+" dBm":"---",stroke:"red",width:1,fill:"rgba(255, 0, 0, 0.3)",dash:[s[l-1],s[l-1]],...e},o={...n,label:n.label+" (avg)",width:4,fill:void 0};return[n,o]},setSize(){this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=null),this.isLoading=!0,this.resizeTimeout=setTimeout(()=>{const e=this.container||this.$parent.$el,l=window.innerHeight-200,s=e.offsetWidth-100;let n=e.offsetHeight-100;n>l&&(n=l),this.chart.setSize({width:s,height:n}),this.isLoading=!1},150)},create(){if(this.destroy(),this.fillSize){const s=this.container||this.$parent.$el;this.ro=new ResizeObserver(this.setSize.bind(this)),this.ro.observe(s)}const l={title:"Background RSSI",width:this.$parent.$el.offsetWidth,height:500,plugins:[Yf()],axes:[{stroke:this.$vuetify.theme.dark?"#fff":"#000"},{stroke:this.$vuetify.theme.dark?"#fff":"#000"}],series:[{},...this.createSerie({label:"Channel 0",stroke:"#7a5195",fill:"rgba(122, 81, 149, 0.35)"},3),...this.createSerie({label:"Channel 1",stroke:"#bc5090",fill:"rgba(188, 80, 144, 0.35)"},2),...this.createSerie({label:"Channel 2",stroke:"#ffa600",fill:"rgba(255, 166, 0, 0.35)"},1),...this.createSerie({label:"Channel 3",stroke:"#003f5c",fill:"rgba(0, 63, 92, 0.35)"},1)]};this.zoom||(l.cursor={drag:{setScale:!1}},l.select={show:!1}),this.chart=new We(l,this.data,this.$refs.chart)}}};var Kf=function(){var l=this,s=l._self._c;return s("div",{ref:"chart",style:{visibility:l.isLoading?"hidden":"visible"}})},$f=[],jf=Ko(Uf,Kf,$f,!1,null,null);const Jf=jf.exports;export{Jf as default};
@@ -1 +1 @@
1
- import{n as r}from"./index-BJ5IKRRT.js";const i={props:{active:{type:Boolean,default:!1},duration:{type:Number,default:1e3},size:{type:Number,default:20},icon:{type:String,default:"mdi-alert"},activeColor:{type:String,default:"success"},inactiveColor:{type:String,default:"grey"}},data:()=>({color:null,blinkInterval:null}),watch:{active(e){e?(this.color=this.activeColor,this.blinkInterval=setInterval(()=>{this.color=this.color===this.activeColor?this.inactiveColor:this.activeColor},this.duration)):(clearInterval(this.blinkInterval),this.color=this.inactiveColor)}},mounted(){this.color=this.inactiveColor},beforeDestroy(){clearInterval(this.blinkInterval)}};var l=function(){var t=this,o=t._self._c;return o("v-icon",{attrs:{size:t.size,color:t.color}},[t._v(t._s(t.icon))])},n=[],a=r(i,l,n,!1,null,null);const c=a.exports;export{c as default};
1
+ import{n as r}from"./index-DPngRuVO.js";const i={props:{active:{type:Boolean,default:!1},duration:{type:Number,default:1e3},size:{type:Number,default:20},icon:{type:String,default:"mdi-alert"},activeColor:{type:String,default:"success"},inactiveColor:{type:String,default:"grey"}},data:()=>({color:null,blinkInterval:null}),watch:{active(e){e?(this.color=this.activeColor,this.blinkInterval=setInterval(()=>{this.color=this.color===this.activeColor?this.inactiveColor:this.activeColor},this.duration)):(clearInterval(this.blinkInterval),this.color=this.inactiveColor)}},mounted(){this.color=this.inactiveColor},beforeDestroy(){clearInterval(this.blinkInterval)}};var l=function(){var t=this,o=t._self._c;return o("v-icon",{attrs:{size:t.size,color:t.color}},[t._v(t._s(t.icon))])},n=[],a=r(i,l,n,!1,null,null);const c=a.exports;export{c as default};
@@ -1 +1 @@
1
- import{n as l}from"./index-BJ5IKRRT.js";const c={name:"CCTreeView",props:{value:{type:[Object,Array],default:()=>({})},level:{type:Number,default:0}},data:()=>({items:[]}),watch:{value:{immediate:!0,handler(){Array.isArray(this.value)?this.items=this.value:(this.items=[],this.$nextTick(()=>{this.items=this.parseEntry(this.value)}))}}},methods:{parseEntry(a,e="root"){const n=[],s=[];this.openIds=[];for(const r in a)if(r==="tags")n.push({id:e,name:a.tags.join(" - "),children:s});else if(r==="message")for(const t in a.message){const i=a.message[t];s.push({id:`${e}.${t}`,name:`${t}`,value:typeof i=="string"?i.trimStart():i})}else if(r==="encapsulated")for(let t=0;t<a.encapsulated.length;t++){const i=a.encapsulated[t];s.push(...this.parseEntry(i,`${e}.encapsulated[${t}]`))}return n}}};var o=function(){var e=this,n=e._self._c;return e.items.length>0?n("v-treeview",{ref:"treeview",attrs:{"open-all":"",dense:"",items:e.items},scopedSlots:e._u([{key:"label",fn:function({item:s}){return[n("v-row",{staticClass:"ma-0 pa-0",attrs:{dense:""}},[n("strong",{staticClass:"tree-item-name",staticStyle:{"white-space":"pre-wrap"}},[e._v(e._s(s.name))]),s.value!==void 0?n("div",{staticClass:"tree-item-value",class:s.name==="payload"?"mono":"",staticStyle:{"white-space":"pre-wrap"}},[e._v(" "+e._s(s.value)+" ")]):e._e()])]}}],null,!1,184165539)}):e._e()},p=[],u=l(c,o,p,!1,null,"c9a56bc2");const d=u.exports;export{d as default};
1
+ import{n as l}from"./index-DPngRuVO.js";const c={name:"CCTreeView",props:{value:{type:[Object,Array],default:()=>({})},level:{type:Number,default:0}},data:()=>({items:[]}),watch:{value:{immediate:!0,handler(){Array.isArray(this.value)?this.items=this.value:(this.items=[],this.$nextTick(()=>{this.items=this.parseEntry(this.value)}))}}},methods:{parseEntry(a,e="root"){const n=[],s=[];this.openIds=[];for(const r in a)if(r==="tags")n.push({id:e,name:a.tags.join(" - "),children:s});else if(r==="message")for(const t in a.message){const i=a.message[t];s.push({id:`${e}.${t}`,name:`${t}`,value:typeof i=="string"?i.trimStart():i})}else if(r==="encapsulated")for(let t=0;t<a.encapsulated.length;t++){const i=a.encapsulated[t];s.push(...this.parseEntry(i,`${e}.encapsulated[${t}]`))}return n}}};var o=function(){var e=this,n=e._self._c;return e.items.length>0?n("v-treeview",{ref:"treeview",attrs:{"open-all":"",dense:"",items:e.items},scopedSlots:e._u([{key:"label",fn:function({item:s}){return[n("v-row",{staticClass:"ma-0 pa-0",attrs:{dense:""}},[n("strong",{staticClass:"tree-item-name",staticStyle:{"white-space":"pre-wrap"}},[e._v(e._s(s.name))]),s.value!==void 0?n("div",{staticClass:"tree-item-value",class:s.name==="payload"?"mono":"",staticStyle:{"white-space":"pre-wrap"}},[e._v(" "+e._s(s.value)+" ")]):e._e()])]}}],null,!1,184165539)}):e._e()},p=[],u=l(c,o,p,!1,null,"c9a56bc2");const d=u.exports;export{d as default};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ColumnFilterBoolean-DEASc3BB.js","./index-CuDlyUQD.js","./index-BJ5IKRRT.js","./index-gIFLWh50.css","./vuedraggable.umd-D2SvVXn9.js","./index-BV77wOsY.css","./ColumnFilterDate-tpypPPCL.js","./ColumnFilterNumber-a6ruOXsP.js","./ColumnFilterString-C8WTmLT5.js"])))=>i.map(i=>d[i]);
2
- import{n,_ as r}from"./index-BJ5IKRRT.js";import{C as i}from"./index-CuDlyUQD.js";import"./vuedraggable.umd-D2SvVXn9.js";const s={components:{ColumnFilterBoolean:()=>r(()=>import("./ColumnFilterBoolean-DEASc3BB.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),ColumnFilterDate:()=>r(()=>import("./ColumnFilterDate-tpypPPCL.js"),__vite__mapDeps([6,1,2,3,4,5]),import.meta.url),ColumnFilterNumber:()=>r(()=>import("./ColumnFilterNumber-a6ruOXsP.js"),__vite__mapDeps([7,1,2,3,4,5]),import.meta.url),ColumnFilterString:()=>r(()=>import("./ColumnFilterString-C8WTmLT5.js"),__vite__mapDeps([8,1,2,3,4,5]),import.meta.url)},props:{value:{type:Object,default:()=>{},required:!0},column:{type:Object,default:()=>{},required:!0},items:{type:Array,default:()=>[],required:!0},groupBy:{type:Boolean,default:()=>!1,required:!1}},data(){return{valid:!0,show:!1}},computed:{hasFilter(){return this.hasDeepValue(this.value)}},methods:{hasDeepValue(t){return t!=null&&Object.keys(t).some(e=>!!t[e]&&!!Object.keys(t[e]).length||typeof t[e]=="boolean")},showOptions(){this.show=!0},hideOptions(){this.show=!1},change(t,e){this.valid=e,e===!0&&this.$emit("change",i.filterSpec(this.column.type,t))},confirm(){this.hideOptions()},resetToDefaults(){const t=i.defaultFilter(this.column.type);Object.assign(this.value,t);for(const e in this.value)Object.hasOwnProperty.call(this.value,e)&&Object.keys(this.value).forEach(()=>{Object.keys(t).includes(e)||delete this.value.key})},clearFilter(){this.resetToDefaults(),this.change(this.value,!0)}}};var u=function(){var e=this,l=e._self._c;return l("v-menu",{attrs:{value:e.show,"close-on-content-click":!1,"offset-y":!0},scopedSlots:e._u([{key:"activator",fn:function({on:a,attrs:o}){return[l("v-icon",e._g(e._b({staticStyle:{"padding-right":"2px","padding-bottom":"3px"},attrs:{small:"",title:"Filter options..."},on:{click:e.showOptions}},"v-icon",o,!1),a),[e._v(" "+e._s(e.hasFilter?"filter_list_alt":"filter_list")+" ")])]}}])},[l("v-card",[l("v-icon",{attrs:{small:"",right:""},on:{click:e.hideOptions}},[e._v("close")]),e.column.type=="boolean"?l("column-filter-boolean",{attrs:{value:e.value},on:{change:e.change}}):e._e(),e.column.type=="date"?l("column-filter-date",{attrs:{value:e.value},on:{change:e.change}}):e._e(),e.column.type=="number"?l("column-filter-number",{attrs:{value:e.value,items:e.items},on:{change:e.change}}):e._e(),e.column.type=="string"?l("column-filter-string",{attrs:{value:e.value,items:e.items},on:{change:e.change}}):e._e(),e.column.groupable!=!1?l("v-checkbox",{staticClass:"ml-4",attrs:{label:"Group values",value:e.groupBy},on:{change:function(a){return e.$emit("update:group-by",a?[e.column.value]:[])}}}):e._e(),l("v-card-actions",[l("v-btn",{on:{click:e.clearFilter}},[e._v("Clear")]),l("v-btn",{attrs:{color:"primary",disabled:!e.valid},on:{click:e.confirm}},[e._v("Ok")])],1)],1)],1)},c=[],m=n(s,u,c,!1,null,null);const v=m.exports;export{v as default};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ColumnFilterBoolean-DgvBOR3r.js","./index-B0RXYjGc.js","./index-DPngRuVO.js","./index-gIFLWh50.css","./vuedraggable.umd-CkR5izts.js","./index-BV77wOsY.css","./ColumnFilterDate-B-HErpKk.js","./ColumnFilterNumber-D9Th2QNr.js","./ColumnFilterString-DAuJZhhT.js"])))=>i.map(i=>d[i]);
2
+ import{n,_ as r}from"./index-DPngRuVO.js";import{C as i}from"./index-B0RXYjGc.js";import"./vuedraggable.umd-CkR5izts.js";const s={components:{ColumnFilterBoolean:()=>r(()=>import("./ColumnFilterBoolean-DgvBOR3r.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),ColumnFilterDate:()=>r(()=>import("./ColumnFilterDate-B-HErpKk.js"),__vite__mapDeps([6,1,2,3,4,5]),import.meta.url),ColumnFilterNumber:()=>r(()=>import("./ColumnFilterNumber-D9Th2QNr.js"),__vite__mapDeps([7,1,2,3,4,5]),import.meta.url),ColumnFilterString:()=>r(()=>import("./ColumnFilterString-DAuJZhhT.js"),__vite__mapDeps([8,1,2,3,4,5]),import.meta.url)},props:{value:{type:Object,default:()=>{},required:!0},column:{type:Object,default:()=>{},required:!0},items:{type:Array,default:()=>[],required:!0},groupBy:{type:Boolean,default:()=>!1,required:!1}},data(){return{valid:!0,show:!1}},computed:{hasFilter(){return this.hasDeepValue(this.value)}},methods:{hasDeepValue(t){return t!=null&&Object.keys(t).some(e=>!!t[e]&&!!Object.keys(t[e]).length||typeof t[e]=="boolean")},showOptions(){this.show=!0},hideOptions(){this.show=!1},change(t,e){this.valid=e,e===!0&&this.$emit("change",i.filterSpec(this.column.type,t))},confirm(){this.hideOptions()},resetToDefaults(){const t=i.defaultFilter(this.column.type);Object.assign(this.value,t);for(const e in this.value)Object.hasOwnProperty.call(this.value,e)&&Object.keys(this.value).forEach(()=>{Object.keys(t).includes(e)||delete this.value.key})},clearFilter(){this.resetToDefaults(),this.change(this.value,!0)}}};var u=function(){var e=this,l=e._self._c;return l("v-menu",{attrs:{value:e.show,"close-on-content-click":!1,"offset-y":!0},scopedSlots:e._u([{key:"activator",fn:function({on:a,attrs:o}){return[l("v-icon",e._g(e._b({staticStyle:{"padding-right":"2px","padding-bottom":"3px"},attrs:{small:"",title:"Filter options..."},on:{click:e.showOptions}},"v-icon",o,!1),a),[e._v(" "+e._s(e.hasFilter?"filter_list_alt":"filter_list")+" ")])]}}])},[l("v-card",[l("v-icon",{attrs:{small:"",right:""},on:{click:e.hideOptions}},[e._v("close")]),e.column.type=="boolean"?l("column-filter-boolean",{attrs:{value:e.value},on:{change:e.change}}):e._e(),e.column.type=="date"?l("column-filter-date",{attrs:{value:e.value},on:{change:e.change}}):e._e(),e.column.type=="number"?l("column-filter-number",{attrs:{value:e.value,items:e.items},on:{change:e.change}}):e._e(),e.column.type=="string"?l("column-filter-string",{attrs:{value:e.value,items:e.items},on:{change:e.change}}):e._e(),e.column.groupable!=!1?l("v-checkbox",{staticClass:"ml-4",attrs:{label:"Group values",value:e.groupBy},on:{change:function(a){return e.$emit("update:group-by",a?[e.column.value]:[])}}}):e._e(),l("v-card-actions",[l("v-btn",{on:{click:e.clearFilter}},[e._v("Clear")]),l("v-btn",{attrs:{color:"primary",disabled:!e.valid},on:{click:e.confirm}},[e._v("Ok")])],1)],1)],1)},c=[],m=n(s,u,c,!1,null,null);const v=m.exports;export{v as default};
@@ -1 +1 @@
1
- import{C as a}from"./index-CuDlyUQD.js";import{n as t}from"./index-BJ5IKRRT.js";import"./vuedraggable.umd-D2SvVXn9.js";const r={props:{value:{type:Object,default:()=>a.defaultFilter("string"),required:!0}},methods:{change(){this.$emit("change",this.value,!0)}}};var n=function(){var e=this,l=e._self._c;return l("v-card-text",[l("v-form",[l("v-row",[l("v-col",[l("v-checkbox",{attrs:{indeterminate:e.value.boolValue==null,label:"Boolean value"},on:{change:e.change},model:{value:e.value.boolValue,callback:function(o){e.$set(e.value,"boolValue",o)},expression:"value.boolValue"}})],1)],1)],1)],1)},u=[],s=t(r,n,u,!1,null,null);const _=s.exports;export{_ as default};
1
+ import{C as a}from"./index-B0RXYjGc.js";import{n as t}from"./index-DPngRuVO.js";import"./vuedraggable.umd-CkR5izts.js";const r={props:{value:{type:Object,default:()=>a.defaultFilter("string"),required:!0}},methods:{change(){this.$emit("change",this.value,!0)}}};var n=function(){var e=this,l=e._self._c;return l("v-card-text",[l("v-form",[l("v-row",[l("v-col",[l("v-checkbox",{attrs:{indeterminate:e.value.boolValue==null,label:"Boolean value"},on:{change:e.change},model:{value:e.value.boolValue,callback:function(o){e.$set(e.value,"boolValue",o)},expression:"value.boolValue"}})],1)],1)],1)],1)},u=[],s=t(r,n,u,!1,null,null);const _=s.exports;export{_ as default};
@@ -1 +1 @@
1
- import{C as o}from"./index-CuDlyUQD.js";import{n as r}from"./index-BJ5IKRRT.js";import"./vuedraggable.umd-D2SvVXn9.js";const s={props:{value:{type:Object,default:()=>o.defaultFilter("string"),required:!0}},data(){return{valid:!1,rules:{from:[t=>!t||!this.value.to||t<=this.value.to||"From date should not be after to date"],to:[t=>!t||!this.value.from||t>=this.value.from||"To date should not be before from date"]}}},methods:{change(){this.$emit("change",this.value,this.valid)}}};var n=function(){var e=this,a=e._self._c;return a("v-card-text",[a("v-form",{model:{value:e.valid,callback:function(l){e.valid=l},expression:"valid"}},[a("v-row",[a("v-col",[a("v-text-field",{attrs:{type:"datetime-local",label:"From",rules:e.rules.from,clearable:""},on:{change:e.change},model:{value:e.value.from,callback:function(l){e.$set(e.value,"from",l)},expression:"value.from"}}),a("v-text-field",{attrs:{type:"datetime-local",label:"To",rules:e.rules.to,clearable:""},on:{change:e.change},model:{value:e.value.to,callback:function(l){e.$set(e.value,"to",l)},expression:"value.to"}})],1)],1)],1)],1)},u=[],i=r(s,n,u,!1,null,null);const d=i.exports;export{d as default};
1
+ import{C as o}from"./index-B0RXYjGc.js";import{n as r}from"./index-DPngRuVO.js";import"./vuedraggable.umd-CkR5izts.js";const s={props:{value:{type:Object,default:()=>o.defaultFilter("string"),required:!0}},data(){return{valid:!1,rules:{from:[t=>!t||!this.value.to||t<=this.value.to||"From date should not be after to date"],to:[t=>!t||!this.value.from||t>=this.value.from||"To date should not be before from date"]}}},methods:{change(){this.$emit("change",this.value,this.valid)}}};var n=function(){var e=this,a=e._self._c;return a("v-card-text",[a("v-form",{model:{value:e.valid,callback:function(l){e.valid=l},expression:"valid"}},[a("v-row",[a("v-col",[a("v-text-field",{attrs:{type:"datetime-local",label:"From",rules:e.rules.from,clearable:""},on:{change:e.change},model:{value:e.value.from,callback:function(l){e.$set(e.value,"from",l)},expression:"value.from"}}),a("v-text-field",{attrs:{type:"datetime-local",label:"To",rules:e.rules.to,clearable:""},on:{change:e.change},model:{value:e.value.to,callback:function(l){e.$set(e.value,"to",l)},expression:"value.to"}})],1)],1)],1)],1)},u=[],i=r(s,n,u,!1,null,null);const d=i.exports;export{d as default};
@@ -1 +1 @@
1
- import{C as n}from"./index-CuDlyUQD.js";import{n as i}from"./index-BJ5IKRRT.js";import"./vuedraggable.umd-D2SvVXn9.js";const s={props:{value:{type:Object,default:()=>n.defaultFilter("string"),required:!0},items:{type:Array,default:()=>[],required:!0}},computed:{values:{get(){var e;const a=this.items.find(l=>typeof l=="string");return a?((e=this.value.values)==null?void 0:e.map(l=>l===void 0?a:l))??[]:this.value.values??[]},set(a){this.value.values=a}}},data(){return{valid:!1,rules:{min:[a=>!a||a>=0||"Minimum should not be negative",a=>!a||!this.value.max||a<=this.value.max||"Minimum should not be above maximum"],max:[a=>!a||a>=0||"Maximum should not be negative",a=>!a||!this.value.min||a>=this.value.min||"Maximum should not be below minimum"]}}},methods:{change(){this.$emit("change",this.value,this.valid)}}};var u=function(){var e=this,l=e._self._c;return l("v-card-text",[l("v-form",{model:{value:e.valid,callback:function(t){e.valid=t},expression:"valid"}},[l("v-row",[l("v-col",[l("v-text-field",{attrs:{type:"number",label:"Min",rules:e.rules.min,clearable:""},on:{change:e.change},model:{value:e.value.min,callback:function(t){e.$set(e.value,"min",t)},expression:"value.min"}})],1),l("v-col",[l("v-text-field",{attrs:{type:"number",label:"Max",rules:e.rules.max,clearable:""},on:{change:e.change},model:{value:e.value.max,callback:function(t){e.$set(e.value,"max",t)},expression:"value.max"}})],1)],1),l("v-row",[l("v-col",[l("v-select",{attrs:{items:e.items,label:"Values",clearable:"",chips:"",deletableChips:"",dense:"",multiple:""},on:{change:e.change},model:{value:e.values,callback:function(t){e.values=t},expression:"values"}})],1)],1)],1)],1)},r=[],m=i(s,u,r,!1,null,null);const d=m.exports;export{d as default};
1
+ import{C as n}from"./index-B0RXYjGc.js";import{n as i}from"./index-DPngRuVO.js";import"./vuedraggable.umd-CkR5izts.js";const s={props:{value:{type:Object,default:()=>n.defaultFilter("string"),required:!0},items:{type:Array,default:()=>[],required:!0}},computed:{values:{get(){var e;const a=this.items.find(l=>typeof l=="string");return a?((e=this.value.values)==null?void 0:e.map(l=>l===void 0?a:l))??[]:this.value.values??[]},set(a){this.value.values=a}}},data(){return{valid:!1,rules:{min:[a=>!a||a>=0||"Minimum should not be negative",a=>!a||!this.value.max||a<=this.value.max||"Minimum should not be above maximum"],max:[a=>!a||a>=0||"Maximum should not be negative",a=>!a||!this.value.min||a>=this.value.min||"Maximum should not be below minimum"]}}},methods:{change(){this.$emit("change",this.value,this.valid)}}};var u=function(){var e=this,l=e._self._c;return l("v-card-text",[l("v-form",{model:{value:e.valid,callback:function(t){e.valid=t},expression:"valid"}},[l("v-row",[l("v-col",[l("v-text-field",{attrs:{type:"number",label:"Min",rules:e.rules.min,clearable:""},on:{change:e.change},model:{value:e.value.min,callback:function(t){e.$set(e.value,"min",t)},expression:"value.min"}})],1),l("v-col",[l("v-text-field",{attrs:{type:"number",label:"Max",rules:e.rules.max,clearable:""},on:{change:e.change},model:{value:e.value.max,callback:function(t){e.$set(e.value,"max",t)},expression:"value.max"}})],1)],1),l("v-row",[l("v-col",[l("v-select",{attrs:{items:e.items,label:"Values",clearable:"",chips:"",deletableChips:"",dense:"",multiple:""},on:{change:e.change},model:{value:e.values,callback:function(t){e.values=t},expression:"values"}})],1)],1)],1)],1)},r=[],m=i(s,u,r,!1,null,null);const d=m.exports;export{d as default};
@@ -1 +1 @@
1
- import{C as r}from"./index-CuDlyUQD.js";import{n as s}from"./index-BJ5IKRRT.js";import"./vuedraggable.umd-D2SvVXn9.js";const n={props:{value:{type:Object,default:()=>r.defaultFilter("string"),required:!0},items:{type:Array,default:()=>[],required:!0}},data(){return{valid:!1,rules:{match:[t=>this.validateRegex(t)]}}},methods:{change(){this.$emit("change",this.value,this.valid)},validateRegex(t){let e;try{e=!!new RegExp(t)}catch(a){e=a.message}return e}}};var i=function(){var e=this,a=e._self._c;return a("v-card-text",[a("v-form",{model:{value:e.valid,callback:function(l){e.valid=l},expression:"valid"}},[a("v-row",[a("v-col",[a("v-text-field",{attrs:{label:"Search",hint:"Supports regular expressions",rules:e.rules.match,clearable:""},on:{change:e.change},model:{value:e.value.match,callback:function(l){e.$set(e.value,"match",l)},expression:"value.match"}})],1)],1),a("v-row",[a("v-col",[a("v-select",{attrs:{items:e.items,label:"Values",clearable:"",chips:"",deletableChips:"",dense:"",multiple:""},on:{change:e.change},model:{value:e.value.values,callback:function(l){e.$set(e.value,"values",l)},expression:"value.values"}})],1)],1)],1)],1)},c=[],u=s(n,i,c,!1,null,null);const d=u.exports;export{d as default};
1
+ import{C as r}from"./index-B0RXYjGc.js";import{n as s}from"./index-DPngRuVO.js";import"./vuedraggable.umd-CkR5izts.js";const n={props:{value:{type:Object,default:()=>r.defaultFilter("string"),required:!0},items:{type:Array,default:()=>[],required:!0}},data(){return{valid:!1,rules:{match:[t=>this.validateRegex(t)]}}},methods:{change(){this.$emit("change",this.value,this.valid)},validateRegex(t){let e;try{e=!!new RegExp(t)}catch(a){e=a.message}return e}}};var i=function(){var e=this,a=e._self._c;return a("v-card-text",[a("v-form",{model:{value:e.valid,callback:function(l){e.valid=l},expression:"valid"}},[a("v-row",[a("v-col",[a("v-text-field",{attrs:{label:"Search",hint:"Supports regular expressions",rules:e.rules.match,clearable:""},on:{change:e.change},model:{value:e.value.match,callback:function(l){e.$set(e.value,"match",l)},expression:"value.match"}})],1)],1),a("v-row",[a("v-col",[a("v-select",{attrs:{items:e.items,label:"Values",clearable:"",chips:"",deletableChips:"",dense:"",multiple:""},on:{change:e.change},model:{value:e.value.values,callback:function(l){e.$set(e.value,"values",l)},expression:"value.values"}})],1)],1)],1)],1)},c=[],u=s(n,i,c,!1,null,null);const d=u.exports;export{d as default};
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-CuDlyUQD.js","./index-BJ5IKRRT.js","./index-gIFLWh50.css","./vuedraggable.umd-D2SvVXn9.js","./index-BV77wOsY.css","./DialogAdvanced-6wKsX1r4.js","./DialogAdvanced-D5KZ1_3L.css","./StatisticsCard-VyVTL2at.js","./SmartView-Bo3_sZcQ.js"])))=>i.map(i=>d[i]);
2
- import{L as d,I as u,_ as s,m as p,u as a,S as h,a as m,j as f,C as r,n as g}from"./index-BJ5IKRRT.js";const c=d.get("ControlPanel"),v={name:"ControlPanel",props:{socket:Object},mixins:[u],components:{NodesTable:()=>s(()=>import("./index-CuDlyUQD.js").then(o=>o.i),__vite__mapDeps([0,1,2,3,4]),import.meta.url),DialogAdvanced:()=>s(()=>import("./DialogAdvanced-6wKsX1r4.js"),__vite__mapDeps([5,1,2,6]),import.meta.url),StatisticsCard:()=>s(()=>import("./StatisticsCard-VyVTL2at.js"),__vite__mapDeps([7,1,2]),import.meta.url),SmartView:()=>s(()=>import("./SmartView-Bo3_sZcQ.js"),__vite__mapDeps([8,1,2]),import.meta.url)},computed:{...p(a,["nodes","zwave","controllerNode"]),timeoutMs(){return this.zwave.commandsTimeout*1e3+800},statisticsOpeningIndicator(){return this.showControllerStatistics?"arrow_drop_up":"arrow_drop_down"},compact(){return this.$vuetify.breakpoint.smAndDown||this.compactMode},compactMode:{get(){return a().ui.compactMode},set(o){a().setCompactMode(o)}},actions(){return this.selected.length===0?this.generalActions:this.selectedActions},advancedDialogTitle(){return this.selected.length===0?"General actions":`Actions for ${this.selected.length} selected node${this.selected.length>1?"s":""}`}},watch:{},data(){return{fab:!1,selected:[],settings:new h(localStorage),advancedShowDialog:!1,generalActions:[{text:"Backup",options:[{name:"Import",action:"import"},{name:"Export",action:"export"}],icon:"save",desc:"Save or load `nodes.json` file with names and locations"},{text:"Dump",options:[{name:"Export",action:"exportDump"}],icon:"bug_report",desc:"Export all nodes in a json file. Useful for debugging purposes"},{text:"Re-interview Nodes",options:[{name:"Start",action:"refreshInfo",args:{broadcast:!0}}],icon:"history",color:"warning",desc:"Clear all info about all nodes and make a new full interview. Use when nodes has wrong or missing capabilities"},{text:"Rebuild Routes",options:[{name:"Begin",action:"beginRebuildingRoutes"},{name:"Stop",action:"stopRebuildingRoutes"}],icon:"healing",color:"warning",desc:"Force nodes to establish new connections to the controller"},{text:"Hard Reset",options:[{name:"Factory Reset",action:"hardReset"}],icon:"warning",color:"red",desc:"Reset controller to factory defaults (all paired devices will be removed)"},{text:"Soft Reset",options:[{name:"Soft Reset",action:"softReset",args:{confirm:`<p>Are you sure you want to soft-reset your controller?</p>
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-B0RXYjGc.js","./index-DPngRuVO.js","./index-gIFLWh50.css","./vuedraggable.umd-CkR5izts.js","./index-BV77wOsY.css","./DialogAdvanced-B0nGibp0.js","./DialogAdvanced-D5KZ1_3L.css","./StatisticsCard-ku5MzfqP.js","./SmartView-Bc4gl3Sq.js"])))=>i.map(i=>d[i]);
2
+ import{L as d,I as u,_ as s,m as p,u as a,S as h,a as m,j as f,C as r,n as g}from"./index-DPngRuVO.js";const c=d.get("ControlPanel"),v={name:"ControlPanel",props:{socket:Object},mixins:[u],components:{NodesTable:()=>s(()=>import("./index-B0RXYjGc.js").then(o=>o.i),__vite__mapDeps([0,1,2,3,4]),import.meta.url),DialogAdvanced:()=>s(()=>import("./DialogAdvanced-B0nGibp0.js"),__vite__mapDeps([5,1,2,6]),import.meta.url),StatisticsCard:()=>s(()=>import("./StatisticsCard-ku5MzfqP.js"),__vite__mapDeps([7,1,2]),import.meta.url),SmartView:()=>s(()=>import("./SmartView-Bc4gl3Sq.js"),__vite__mapDeps([8,1,2]),import.meta.url)},computed:{...p(a,["nodes","zwave","controllerNode"]),timeoutMs(){return this.zwave.commandsTimeout*1e3+800},statisticsOpeningIndicator(){return this.showControllerStatistics?"arrow_drop_up":"arrow_drop_down"},compact(){return this.$vuetify.breakpoint.smAndDown||this.compactMode},compactMode:{get(){return a().ui.compactMode},set(o){a().setCompactMode(o)}},actions(){return this.selected.length===0?this.generalActions:this.selectedActions},advancedDialogTitle(){return this.selected.length===0?"General actions":`Actions for ${this.selected.length} selected node${this.selected.length>1?"s":""}`}},watch:{},data(){return{fab:!1,selected:[],settings:new h(localStorage),advancedShowDialog:!1,generalActions:[{text:"Backup",options:[{name:"Import",action:"import"},{name:"Export",action:"export"}],icon:"save",desc:"Save or load `nodes.json` file with names and locations"},{text:"Dump",options:[{name:"Export",action:"exportDump"}],icon:"bug_report",desc:"Export all nodes in a json file. Useful for debugging purposes"},{text:"Re-interview Nodes",options:[{name:"Start",action:"refreshInfo",args:{broadcast:!0}}],icon:"history",color:"warning",desc:"Clear all info about all nodes and make a new full interview. Use when nodes has wrong or missing capabilities"},{text:"Rebuild Routes",options:[{name:"Begin",action:"beginRebuildingRoutes"},{name:"Stop",action:"stopRebuildingRoutes"}],icon:"healing",color:"warning",desc:"Force nodes to establish new connections to the controller"},{text:"Hard Reset",options:[{name:"Factory Reset",action:"hardReset"}],icon:"warning",color:"red",desc:"Reset controller to factory defaults (all paired devices will be removed)"},{text:"Soft Reset",options:[{name:"Soft Reset",action:"softReset",args:{confirm:`<p>Are you sure you want to soft-reset your controller?</p>
3
3
  <p>USB modules will reconnect, meaning that they might get a new address. Make sure to configure your device address in a way that prevents it from changing, e.g. by using <code>/dev/serial/by-id/...</code> on Linux.</p>
4
4
  <p><strong>This method may cause problems in Docker containers with certain Z-Wave stick.</strong> If that happens, you may need to restart your host OS and docker container.</p>`}}],icon:"refresh",color:"warning",desc:"Instruct the controller to soft-reset (restart)"},{text:"Failed Nodes",options:[{name:"Remove all",action:"removeFailedNode",args:{broadcast:!0,confirm:"This action will remove all failed nodes. ATTENTION: this will skip sleeping nodes to prevent unwanted behaviours"}}],icon:"dangerous",color:"error",desc:"Manage nodes that are dead and/or marked as failed with the controller"},{text:"Driver function",options:[{name:"Write",action:"driverFunction"}],icon:"code",desc:"Write a custom JS function using the ZwaveJS Driver"},{text:"NVM Management",options:[{name:"Backup",action:"backupNVMRaw"},{name:"Restore",action:"restoreNVM"}],icon:"update",color:"warning",desc:"Backup/Restore controller's NVM (Non Volatile Memory)"},{text:"Firmware update OTW",options:[{name:"Update",action:"firmwareUpdateOTW"}],icon:"update",color:"red",desc:"Perform a firmware update OTW (Over The Wire)"},{text:"Shutdown Zwave API",options:[{name:"Shutdown",action:"shutdownZwaveAPI",args:{confirm:"Are you sure you want to shutdown the Zwave API? You will have to unplug and replug the Zwave stick manually to restart it.",confirmLevel:"warning"}}],icon:"power_off",color:"warning",desc:"Allows to shutdown the Zwave API to safely unplug the Zwave stick."}],rules:{required:o=>{let e=!1;return o instanceof Array?e=o.length>0:e=!isNaN(o)||!!o,e||"This field is required."}},selectedActions:[{text:"Re-interview Node",options:[{name:"Interview",action:"refreshInfo"}],icon:"history",desc:"Clear all info about this node and make a new full interview. Use when the node has wrong or missing capabilities"},{text:"Refresh Values",options:[{name:"Refresh",action:"refreshValues",args:{confirm:"Are you sure you want to refresh values of this node? This action increases network traffic"}}],icon:"cached",desc:"Update all CC values and metadata. Use only when many values seems stale"},{text:"Rebuild Node Routes",options:[{name:"Rebuild",action:"rebuildNodeRoutes",args:{confirm:"Rebuilding routes of a specific node. This action causes a lot of traffic, can take minutes up to hours and you can expect degraded performance while it is going on"}}],icon:"healing",color:"warning",desc:"Discover and assign new routes between a specific node to the controller and his neighbors"},{text:"Ping",options:[{name:"Ping",action:"pingNode"}],icon:"swap_horiz",desc:"Ping node to check if it is alive"}],showControllerStatistics:!1}},methods:{...m(a,["setRebuildRoutesProgress","showSnackbar"]),jsonToList:f,showNodesManager(){this.app.showNodesManager()},async onAction(o,e={}){o==="import"?this.importConfiguration():o==="export"?this.exportConfiguration():o==="exportDump"?this.exportDump():this.sendAction(o,{...e,nodes:this.selected})},async importConfiguration(){if(await this.app.confirm("Attention","This will override all existing nodes names and locations","alert"))try{const{data:o}=await this.app.importFile("json"),e=await r.importConfig({data:o});this.showSnackbar(e.message,e.success?"success":"error")}catch(o){c.error(o)}},async exportConfiguration(){try{const o=await r.exportConfig();this.showSnackbar(o.message,o.success?"success":"error"),o.success&&this.app.exportConfiguration(o.data,"nodes","json")}catch(o){c.error(o)}},exportDump(){this.app.exportConfiguration(this.nodes,"nodes_dump","json")},toggleControllerStatistics(){this.showControllerStatistics=!this.showControllerStatistics}},mounted(){this.bindEvent("rebuildRoutesProgress",this.setRebuildRoutesProgress.bind(this))},beforeDestroy(){this.socket&&this.unbindEvents()}};var w=function(){var e=this,t=e._self._c;return t("div",[t("v-container",{staticClass:"pa-4",attrs:{fluid:""}},[t("v-row",{staticClass:"py-4 align-center",attrs:{"no-gutters":""}},[t("v-col",{class:e.compact?"text-center":"text-end"},[t("v-item-group",{staticClass:"v-btn-toggle"},[t("v-btn",{attrs:{color:"primary",outlined:""},on:{click:e.toggleControllerStatistics}},[t("v-icon",{attrs:{left:""}},[e._v(" "+e._s(e.statisticsOpeningIndicator)+" ")]),e._v(" Controller statistics "),t("v-icon",{attrs:{color:"primary",right:""}},[e._v(" multiline_chart ")])],1),e.$vuetify.breakpoint.mdAndUp?t("v-btn",{attrs:{color:"primary",outlined:!e.compactMode},on:{click:function(n){n.stopPropagation(),e.compactMode=!e.compactMode}}},[e._v(" Compact ")]):e._e()],1)],1)],1),t("v-expand-transition",[t("v-row",{directives:[{name:"show",rawName:"v-show",value:e.showControllerStatistics,expression:"showControllerStatistics"}]},[t("v-col",{staticClass:"mb-8"},[t("v-sheet",{attrs:{outlined:"",rounded:""}},[e.controllerNode?t("StatisticsCard",{attrs:{title:"Controller Statistics",node:this.controllerNode}}):e._e()],1)],1)],1)],1),e.compact?t("smart-view",{attrs:{socket:e.socket},on:{selected:function(n){e.selected=n},action:e.sendAction}}):t("nodes-table",{staticClass:"pb-8",attrs:{socket:e.socket},on:{action:e.sendAction,selected:function(n){e.selected=n}}})],1),t("DialogAdvanced",{attrs:{actions:e.actions,title:e.advancedDialogTitle},on:{close:function(n){e.advancedShowDialog=!1},action:e.onAction},model:{value:e.advancedShowDialog,callback:function(n){e.advancedShowDialog=n},expression:"advancedShowDialog"}}),t("v-speed-dial",{attrs:{bottom:"",fab:"",right:"",fixed:""},scopedSlots:e._u([{key:"activator",fn:function(){return[t("v-btn",{attrs:{color:e.selected.length===0?"blue darken-2":"success",dark:"",fab:"",hover:""},model:{value:e.fab,callback:function(n){e.fab=n},expression:"fab"}},[e.fab?t("v-icon",[e._v("close")]):t("v-icon",[e._v("menu")])],1)]},proxy:!0}]),model:{value:e.fab,callback:function(n){e.fab=n},expression:"fab"}},[t("v-tooltip",{attrs:{left:""},scopedSlots:e._u([{key:"activator",fn:function({on:n,attrs:i}){return[e.selected.length===0?t("v-btn",e._g(e._b({attrs:{fab:"",dark:"",small:"",color:"green"},on:{click:function(l){return e.showNodesManager()}}},"v-btn",i,!1),n),[t("v-icon",[e._v("all_inclusive")])],1):e._e()]}}])},[t("span",[e._v("Manage nodes")])]),t("v-tooltip",{attrs:{left:""},scopedSlots:e._u([{key:"activator",fn:function({on:n,attrs:i}){return[t("v-btn",e._g(e._b({attrs:{fab:"",dark:"",small:"",color:"purple"},on:{click:function(l){e.advancedShowDialog=!0}}},"v-btn",i,!1),n),[t("v-icon",[e._v("auto_fix_high")])],1)]}}])},[t("span",[e._v("Advanced actions")])])],1)],1)},_=[],b=g(v,w,_,!1,null,null);const y=b.exports;export{y as default};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./BgRssiChart-Dj8id5Eg.js","./index-BJ5IKRRT.js","./index-gIFLWh50.css","./BgRssiChart-D1GxaB_c.css"])))=>i.map(i=>d[i]);
2
- import{_ as o,m as t,u as n,n as s}from"./index-BJ5IKRRT.js";const a={components:{BgRssiChart:()=>o(()=>import("./BgRssiChart-Dj8id5Eg.js"),__vite__mapDeps([0,1,2,3]),import.meta.url)},computed:{...t(n,["controllerNode"])}};var _=function(){var e=this,r=e._self._c;return r("v-container",[e.controllerNode?r("bg-rssi-chart",{attrs:{node:e.controllerNode,"fill-size":""}}):e._e()],1)},l=[],c=s(a,_,l,!1,null,null);const d=c.exports;export{d as default};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./BgRssiChart-DcACK8-e.js","./index-DPngRuVO.js","./index-gIFLWh50.css","./BgRssiChart-D1GxaB_c.css"])))=>i.map(i=>d[i]);
2
+ import{_ as o,m as t,u as n,n as s}from"./index-DPngRuVO.js";const a={components:{BgRssiChart:()=>o(()=>import("./BgRssiChart-DcACK8-e.js"),__vite__mapDeps([0,1,2,3]),import.meta.url)},computed:{...t(n,["controllerNode"])}};var _=function(){var e=this,r=e._self._c;return r("v-container",[e.controllerNode?r("bg-rssi-chart",{attrs:{node:e.controllerNode,"fill-size":""}}):e._e()],1)},l=[],c=s(a,_,l,!1,null,null);const d=c.exports;export{d as default};
@@ -1,4 +1,4 @@
1
- import{e as m,a as x,u as S,o as y,s as _,n as w}from"./index-BJ5IKRRT.js";var c=function(l,e){return Object.defineProperty?Object.defineProperty(l,"raw",{value:e}):l.raw=e,l},n;(function(l){l[l.EOS=0]="EOS",l[l.Text=1]="Text",l[l.Incomplete=2]="Incomplete",l[l.ESC=3]="ESC",l[l.Unknown=4]="Unknown",l[l.SGR=5]="SGR",l[l.OSCURL=6]="OSCURL"})(n||(n={}));class v{constructor(){this.VERSION="6.0.2",this.setup_palettes(),this._use_classes=!1,this.bold=!1,this.faint=!1,this.italic=!1,this.underline=!1,this.fg=this.bg=null,this._buffer="",this._url_allowlist={http:1,https:1},this._escape_html=!0,this.boldStyle="font-weight:bold",this.faintStyle="opacity:0.7",this.italicStyle="font-style:italic",this.underlineStyle="text-decoration:underline"}set use_classes(e){this._use_classes=e}get use_classes(){return this._use_classes}set url_allowlist(e){this._url_allowlist=e}get url_allowlist(){return this._url_allowlist}set escape_html(e){this._escape_html=e}get escape_html(){return this._escape_html}set boldStyle(e){this._boldStyle=e}get boldStyle(){return this._boldStyle}set faintStyle(e){this._faintStyle=e}get faintStyle(){return this._faintStyle}set italicStyle(e){this._italicStyle=e}get italicStyle(){return this._italicStyle}set underlineStyle(e){this._underlineStyle=e}get underlineStyle(){return this._underlineStyle}setup_palettes(){this.ansi_colors=[[{rgb:[0,0,0],class_name:"ansi-black"},{rgb:[187,0,0],class_name:"ansi-red"},{rgb:[0,187,0],class_name:"ansi-green"},{rgb:[187,187,0],class_name:"ansi-yellow"},{rgb:[0,0,187],class_name:"ansi-blue"},{rgb:[187,0,187],class_name:"ansi-magenta"},{rgb:[0,187,187],class_name:"ansi-cyan"},{rgb:[255,255,255],class_name:"ansi-white"}],[{rgb:[85,85,85],class_name:"ansi-bright-black"},{rgb:[255,85,85],class_name:"ansi-bright-red"},{rgb:[0,255,0],class_name:"ansi-bright-green"},{rgb:[255,255,85],class_name:"ansi-bright-yellow"},{rgb:[85,85,255],class_name:"ansi-bright-blue"},{rgb:[255,85,255],class_name:"ansi-bright-magenta"},{rgb:[85,255,255],class_name:"ansi-bright-cyan"},{rgb:[255,255,255],class_name:"ansi-bright-white"}]],this.palette_256=[],this.ansi_colors.forEach(i=>{i.forEach(s=>{this.palette_256.push(s)})});let e=[0,95,135,175,215,255];for(let i=0;i<6;++i)for(let s=0;s<6;++s)for(let a=0;a<6;++a){let r={rgb:[e[i],e[s],e[a]],class_name:"truecolor"};this.palette_256.push(r)}let t=8;for(let i=0;i<24;++i,t+=10){let s={rgb:[t,t,t],class_name:"truecolor"};this.palette_256.push(s)}}escape_txt_for_html(e){return this._escape_html?e.replace(/[&<>"']/gm,t=>{if(t==="&")return"&amp;";if(t==="<")return"&lt;";if(t===">")return"&gt;";if(t==='"')return"&quot;";if(t==="'")return"&#x27;"}):e}append_buffer(e){var t=this._buffer+e;this._buffer=t}get_next_packet(){var e={kind:n.EOS,text:"",url:""},t=this._buffer.length;if(t==0)return e;var i=this._buffer.indexOf("\x1B");if(i==-1)return e.kind=n.Text,e.text=this._buffer,this._buffer="",e;if(i>0)return e.kind=n.Text,e.text=this._buffer.slice(0,i),this._buffer=this._buffer.slice(i),e;if(i==0){if(t<3)return e.kind=n.Incomplete,e;var s=this._buffer.charAt(1);if(s!="["&&s!="]"&&s!="(")return e.kind=n.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e;if(s=="["){this._csi_regex||(this._csi_regex=g(b||(b=c([`
1
+ import{e as m,a as x,u as S,o as y,s as _,n as w}from"./index-DPngRuVO.js";var c=function(l,e){return Object.defineProperty?Object.defineProperty(l,"raw",{value:e}):l.raw=e,l},n;(function(l){l[l.EOS=0]="EOS",l[l.Text=1]="Text",l[l.Incomplete=2]="Incomplete",l[l.ESC=3]="ESC",l[l.Unknown=4]="Unknown",l[l.SGR=5]="SGR",l[l.OSCURL=6]="OSCURL"})(n||(n={}));class v{constructor(){this.VERSION="6.0.2",this.setup_palettes(),this._use_classes=!1,this.bold=!1,this.faint=!1,this.italic=!1,this.underline=!1,this.fg=this.bg=null,this._buffer="",this._url_allowlist={http:1,https:1},this._escape_html=!0,this.boldStyle="font-weight:bold",this.faintStyle="opacity:0.7",this.italicStyle="font-style:italic",this.underlineStyle="text-decoration:underline"}set use_classes(e){this._use_classes=e}get use_classes(){return this._use_classes}set url_allowlist(e){this._url_allowlist=e}get url_allowlist(){return this._url_allowlist}set escape_html(e){this._escape_html=e}get escape_html(){return this._escape_html}set boldStyle(e){this._boldStyle=e}get boldStyle(){return this._boldStyle}set faintStyle(e){this._faintStyle=e}get faintStyle(){return this._faintStyle}set italicStyle(e){this._italicStyle=e}get italicStyle(){return this._italicStyle}set underlineStyle(e){this._underlineStyle=e}get underlineStyle(){return this._underlineStyle}setup_palettes(){this.ansi_colors=[[{rgb:[0,0,0],class_name:"ansi-black"},{rgb:[187,0,0],class_name:"ansi-red"},{rgb:[0,187,0],class_name:"ansi-green"},{rgb:[187,187,0],class_name:"ansi-yellow"},{rgb:[0,0,187],class_name:"ansi-blue"},{rgb:[187,0,187],class_name:"ansi-magenta"},{rgb:[0,187,187],class_name:"ansi-cyan"},{rgb:[255,255,255],class_name:"ansi-white"}],[{rgb:[85,85,85],class_name:"ansi-bright-black"},{rgb:[255,85,85],class_name:"ansi-bright-red"},{rgb:[0,255,0],class_name:"ansi-bright-green"},{rgb:[255,255,85],class_name:"ansi-bright-yellow"},{rgb:[85,85,255],class_name:"ansi-bright-blue"},{rgb:[255,85,255],class_name:"ansi-bright-magenta"},{rgb:[85,255,255],class_name:"ansi-bright-cyan"},{rgb:[255,255,255],class_name:"ansi-bright-white"}]],this.palette_256=[],this.ansi_colors.forEach(i=>{i.forEach(s=>{this.palette_256.push(s)})});let e=[0,95,135,175,215,255];for(let i=0;i<6;++i)for(let s=0;s<6;++s)for(let a=0;a<6;++a){let r={rgb:[e[i],e[s],e[a]],class_name:"truecolor"};this.palette_256.push(r)}let t=8;for(let i=0;i<24;++i,t+=10){let s={rgb:[t,t,t],class_name:"truecolor"};this.palette_256.push(s)}}escape_txt_for_html(e){return this._escape_html?e.replace(/[&<>"']/gm,t=>{if(t==="&")return"&amp;";if(t==="<")return"&lt;";if(t===">")return"&gt;";if(t==='"')return"&quot;";if(t==="'")return"&#x27;"}):e}append_buffer(e){var t=this._buffer+e;this._buffer=t}get_next_packet(){var e={kind:n.EOS,text:"",url:""},t=this._buffer.length;if(t==0)return e;var i=this._buffer.indexOf("\x1B");if(i==-1)return e.kind=n.Text,e.text=this._buffer,this._buffer="",e;if(i>0)return e.kind=n.Text,e.text=this._buffer.slice(0,i),this._buffer=this._buffer.slice(i),e;if(i==0){if(t<3)return e.kind=n.Incomplete,e;var s=this._buffer.charAt(1);if(s!="["&&s!="]"&&s!="(")return e.kind=n.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e;if(s=="["){this._csi_regex||(this._csi_regex=g(b||(b=c([`
2
2
  ^ # beginning of line
3
3
  #
4
4
  # First attempt
@@ -1 +1 @@
1
- import{n as a}from"./index-BJ5IKRRT.js";const i={props:{value:Boolean,actions:Array,title:{type:String,default:"Advanced"}},data(){return{}},computed:{},methods:{}};var s=function(){var t=this,e=t._self._c;return e("v-dialog",{attrs:{persistent:"","max-width":"800"},on:{keydown:function(n){return!n.type.indexOf("key")&&t._k(n.keyCode,"esc",27,n.key,["Esc","Escape"])?null:t.$emit("close")}},model:{value:t.value,callback:function(n){t.value=n},expression:"value"}},[e("v-card",[e("v-card-title",[e("span",{staticClass:"headline"},[t._v(t._s(t.title))]),e("v-spacer"),e("v-btn",{attrs:{icon:""},on:{click:function(n){return t.$emit("close")}}},[e("v-icon",[t._v("close")])],1)],1),e("v-card-text",[e("div",{class:["action-grid",t.$vuetify.breakpoint.name]},t._l(t.actions,function(n,c){return e("div",{key:c},[e("v-icon",{attrs:{color:n.color||"primary","x-large":""}},[t._v(t._s(n.icon))]),e("div",{staticStyle:{"font-size":"1.1rem"}},[t._v(t._s(n.text))]),e("div",{staticClass:"action-desc"},[t._v(t._s(n.desc))]),t._l(n.options,function(r,o){return e("v-btn",{key:o,attrs:{text:"",color:n.color||"primary"},on:{click:function(_){return t.$emit("action",r.action,r.args)}}},[t._v(t._s(r.name))])})],2)}),0)])],1)],1)},l=[],v=a(i,s,l,!1,null,"8c9eb6de");const f=v.exports;export{f as default};
1
+ import{n as a}from"./index-DPngRuVO.js";const i={props:{value:Boolean,actions:Array,title:{type:String,default:"Advanced"}},data(){return{}},computed:{},methods:{}};var s=function(){var t=this,e=t._self._c;return e("v-dialog",{attrs:{persistent:"","max-width":"800"},on:{keydown:function(n){return!n.type.indexOf("key")&&t._k(n.keyCode,"esc",27,n.key,["Esc","Escape"])?null:t.$emit("close")}},model:{value:t.value,callback:function(n){t.value=n},expression:"value"}},[e("v-card",[e("v-card-title",[e("span",{staticClass:"headline"},[t._v(t._s(t.title))]),e("v-spacer"),e("v-btn",{attrs:{icon:""},on:{click:function(n){return t.$emit("close")}}},[e("v-icon",[t._v("close")])],1)],1),e("v-card-text",[e("div",{class:["action-grid",t.$vuetify.breakpoint.name]},t._l(t.actions,function(n,c){return e("div",{key:c},[e("v-icon",{attrs:{color:n.color||"primary","x-large":""}},[t._v(t._s(n.icon))]),e("div",{staticStyle:{"font-size":"1.1rem"}},[t._v(t._s(n.text))]),e("div",{staticClass:"action-desc"},[t._v(t._s(n.desc))]),t._l(n.options,function(r,o){return e("v-btn",{key:o,attrs:{text:"",color:n.color||"primary"},on:{click:function(_){return t.$emit("action",r.action,r.args)}}},[t._v(t._s(r.name))])})],2)}),0)])],1)],1)},l=[],v=a(i,s,l,!1,null,"8c9eb6de");const f=v.exports;export{f as default};
@@ -1 +1 @@
1
- import{I as u,m as c,u as p,P as d,av as g,aw as i,ar as v,n as h}from"./index-BJ5IKRRT.js";const f={mixins:[u],props:{value:Boolean,associations:Array,node:Object},watch:{value(){this.$refs.form&&this.$refs.form.resetValidation(),this.resetGroup(),this.associationError=""},group:{deep:!0,handler(){var o;(o=this.$refs.form)!=null&&o.validate()&&this.allowedAssociation()}}},computed:{...c(p,["controllerNode","nodes"]),filteredNodes(){return this.node.protocol===d.ZWaveLongRange?[this.controllerNode]:this.nodes.filter(o=>o.id!==this.node.id&&o.protocol!==d.ZWaveLongRange).sort((o,t)=>o._name.localeCompare(t._name))},endpoints(){return this.getEndpointItems(this.node)},targetEndpoints(){return this.getEndpointItems(this.group.target,!0)},maxNodes(){return this.group.group?this.group.group.maxNodes:-1},nodesInGroup(){return this.group.group?this.associations.filter(o=>o.groupId===this.group.group.value&&o.endpoint===this.group.endpoint).length:0},endpointGroups(){let o=[];try{o=this.node.groups;const t=this.group.endpoint;o=o.filter(e=>e.endpoint===t||t===null&&e.endpoint===0&&!e.multiChannel)}catch{}return o}},data(){return{valid:!0,group:{},associationError:"",defaultGroup:{endpoint:null},required:o=>!!o||"This field is required"}},methods:{getAssociationAddress:g,async allowedAssociation(){var l;const o=this.group,t=isNaN(o.target)?(l=o.target)==null?void 0:l.id:parseInt(o.target);if(isNaN(t)){this.associationError="";return}const e=o.group;if(!e){this.associationError="";return}const s={nodeId:t};e.multiChannel&&o.targetEndpoint>=0&&(s.endpoint=o.targetEndpoint);const a=[this.getAssociationAddress({nodeId:this.node.id,endpoint:o.endpoint}),e.value,s],r=await this.app.apiRequest("checkAssociation",a,{showInfo:!1});if(r.success){const n=r.result;n===i.OK?this.associationError="":n===i.Forbidden_SecurityClassMismatch?this.associationError=`Association not allowed: Node ${this.node.id} does not have the same security class as Node ${t}!`:n===i.Forbidden_DestinationSecurityClassNotGranted?this.associationError=`Association not allowed: Node ${this.node.id} was not granted the highest security class of Node ${t}!`:n===i.Forbidden_NoSupportedCCs?this.associationError=`Association not allowed: Node ${this.node.id} sends no commands in this group that Node ${t} supports!`:this.associationError=`Association not allowed: ${v(i,n)}`}},resetGroup(){this.group=Object.assign({},this.defaultGroup)},getEndpointLabel(o,t){if(o&&o.endpoints){const e=o.endpoints.find(s=>s.index===t);if(e)return e.label}return"Endpoint "+t},getEndpointItems(o,t=!1){const e=[];if(t&&e.unshift({text:"No Endpoint",value:null}),o&&o.endpoints)for(const s of o.endpoints)e.push({text:s.label,value:s.index});return e}}};var m=function(){var t=this,e=t._self._c;return e("v-dialog",{attrs:{"max-width":"500px",persistent:""},model:{value:t.value,callback:function(s){t.value=s},expression:"value"}},[e("v-card",[e("v-card-title",[e("span",{staticClass:"headline"},[t._v("New Association")])]),e("v-card-text",[e("v-container",{attrs:{"grid-list-md":""}},[e("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(s){t.valid=s},expression:"valid"}},[e("v-row",[e("v-col",{attrs:{cols:"12"}},[e("v-select",{attrs:{label:"Node Endpoint",hint:"Used to filter available groups","persistent-hint":"",items:t.endpoints},model:{value:t.group.endpoint,callback:function(s){t.$set(t.group,"endpoint",s)},expression:"group.endpoint"}})],1),e("v-col",{attrs:{cols:"12"}},[e("v-select",{attrs:{label:"Group",hint:"Node/Endpoint Group association to Add/Remove","persistent-hint":"",items:t.endpointGroups,rules:[t.required],"return-object":""},scopedSlots:t._u([{key:"selection",fn:function({item:s}){return[t._v(" "+t._s(s.text)+" ")]}},{key:"item",fn:function({item:s,attrs:a,on:r}){return[e("v-list-item",t._g(t._b({attrs:{"two-line":""}},"v-list-item",a,!1),r),[e("v-list-item-content",[e("v-list-item-title",[t._v(t._s(`[${s.value}] ${s.text}`))]),e("v-list-item-subtitle",[t._v(t._s(s.endpoint>=0?t.getEndpointLabel(t.node,s.endpoint):"No Endpoint"))])],1)],1)]}}]),model:{value:t.group.group,callback:function(s){t.$set(t.group,"group",s)},expression:"group.group"}})],1),t.group.group?e("v-col",{attrs:{cols:"12"}},[e("p",{staticClass:"text-subtitle-1 pa-0 ma-0"},[t._v(" Max associations: "),e("strong",[t._v(t._s(t.maxNodes))])]),e("p",{staticClass:"text-subtitle-1 pa-0 ma-0"},[t._v(" Actual associations: "),e("strong",[t._v(t._s(t.nodesInGroup))])])]):t._e(),t.nodesInGroup<t.maxNodes?e("v-col",{staticClass:"pa-0"},[e("v-col",{attrs:{cols:"12"}},[e("v-combobox",{attrs:{label:"Target Node",items:t.filteredNodes,"return-object":"",rules:[t.required],hint:"Node to add to the association group","persistent-hint":"","item-text":"_name"},model:{value:t.group.target,callback:function(s){t.$set(t.group,"target",s)},expression:"group.target"}})],1),t.group.group&&t.group.group.multiChannel?e("v-col",{attrs:{cols:"12"}},[e("v-select",{attrs:{"persistent-hint":"",label:"Target Endpoint",hint:"Target node endpoint",items:t.targetEndpoints},model:{value:t.group.targetEndpoint,callback:function(s){t.$set(t.group,"targetEndpoint",t._n(s))},expression:"group.targetEndpoint"}})],1):t._e(),t.associationError?e("v-col",{attrs:{cols:"12"}},[e("v-alert",{attrs:{text:"",dense:"",type:"error"}},[t._v(" "+t._s(t.associationError)+" ")])],1):t._e()],1):t._e()],1)],1)],1)],1),e("v-card-actions",[e("v-spacer"),e("v-btn",{attrs:{color:"blue darken-1",text:""},on:{click:function(s){return t.$emit("close")}}},[t._v("Cancel")]),e("v-btn",{attrs:{color:"blue darken-1",text:"",disabled:t.nodesInGroup>=t.maxNodes||!!t.associationError},on:{click:function(s){t.$refs.form.validate()&&t.$emit("add",t.group)}}},[t._v("ADD")])],1)],1)],1)},_=[],b=h(f,m,_,!1,null,null);const E=b.exports;export{E as default};
1
+ import{I as u,m as c,u as p,P as d,av as g,aw as i,ar as v,n as h}from"./index-DPngRuVO.js";const f={mixins:[u],props:{value:Boolean,associations:Array,node:Object},watch:{value(){this.$refs.form&&this.$refs.form.resetValidation(),this.resetGroup(),this.associationError=""},group:{deep:!0,handler(){var o;(o=this.$refs.form)!=null&&o.validate()&&this.allowedAssociation()}}},computed:{...c(p,["controllerNode","nodes"]),filteredNodes(){return this.node.protocol===d.ZWaveLongRange?[this.controllerNode]:this.nodes.filter(o=>o.id!==this.node.id&&o.protocol!==d.ZWaveLongRange).sort((o,t)=>o._name.localeCompare(t._name))},endpoints(){return this.getEndpointItems(this.node)},targetEndpoints(){return this.getEndpointItems(this.group.target,!0)},maxNodes(){return this.group.group?this.group.group.maxNodes:-1},nodesInGroup(){return this.group.group?this.associations.filter(o=>o.groupId===this.group.group.value&&o.endpoint===this.group.endpoint).length:0},endpointGroups(){let o=[];try{o=this.node.groups;const t=this.group.endpoint;o=o.filter(e=>e.endpoint===t||t===null&&e.endpoint===0&&!e.multiChannel)}catch{}return o}},data(){return{valid:!0,group:{},associationError:"",defaultGroup:{endpoint:null},required:o=>!!o||"This field is required"}},methods:{getAssociationAddress:g,async allowedAssociation(){var l;const o=this.group,t=isNaN(o.target)?(l=o.target)==null?void 0:l.id:parseInt(o.target);if(isNaN(t)){this.associationError="";return}const e=o.group;if(!e){this.associationError="";return}const s={nodeId:t};e.multiChannel&&o.targetEndpoint>=0&&(s.endpoint=o.targetEndpoint);const a=[this.getAssociationAddress({nodeId:this.node.id,endpoint:o.endpoint}),e.value,s],r=await this.app.apiRequest("checkAssociation",a,{showInfo:!1});if(r.success){const n=r.result;n===i.OK?this.associationError="":n===i.Forbidden_SecurityClassMismatch?this.associationError=`Association not allowed: Node ${this.node.id} does not have the same security class as Node ${t}!`:n===i.Forbidden_DestinationSecurityClassNotGranted?this.associationError=`Association not allowed: Node ${this.node.id} was not granted the highest security class of Node ${t}!`:n===i.Forbidden_NoSupportedCCs?this.associationError=`Association not allowed: Node ${this.node.id} sends no commands in this group that Node ${t} supports!`:this.associationError=`Association not allowed: ${v(i,n)}`}},resetGroup(){this.group=Object.assign({},this.defaultGroup)},getEndpointLabel(o,t){if(o&&o.endpoints){const e=o.endpoints.find(s=>s.index===t);if(e)return e.label}return"Endpoint "+t},getEndpointItems(o,t=!1){const e=[];if(t&&e.unshift({text:"No Endpoint",value:null}),o&&o.endpoints)for(const s of o.endpoints)e.push({text:s.label,value:s.index});return e}}};var m=function(){var t=this,e=t._self._c;return e("v-dialog",{attrs:{"max-width":"500px",persistent:""},model:{value:t.value,callback:function(s){t.value=s},expression:"value"}},[e("v-card",[e("v-card-title",[e("span",{staticClass:"headline"},[t._v("New Association")])]),e("v-card-text",[e("v-container",{attrs:{"grid-list-md":""}},[e("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(s){t.valid=s},expression:"valid"}},[e("v-row",[e("v-col",{attrs:{cols:"12"}},[e("v-select",{attrs:{label:"Node Endpoint",hint:"Used to filter available groups","persistent-hint":"",items:t.endpoints},model:{value:t.group.endpoint,callback:function(s){t.$set(t.group,"endpoint",s)},expression:"group.endpoint"}})],1),e("v-col",{attrs:{cols:"12"}},[e("v-select",{attrs:{label:"Group",hint:"Node/Endpoint Group association to Add/Remove","persistent-hint":"",items:t.endpointGroups,rules:[t.required],"return-object":""},scopedSlots:t._u([{key:"selection",fn:function({item:s}){return[t._v(" "+t._s(s.text)+" ")]}},{key:"item",fn:function({item:s,attrs:a,on:r}){return[e("v-list-item",t._g(t._b({attrs:{"two-line":""}},"v-list-item",a,!1),r),[e("v-list-item-content",[e("v-list-item-title",[t._v(t._s(`[${s.value}] ${s.text}`))]),e("v-list-item-subtitle",[t._v(t._s(s.endpoint>=0?t.getEndpointLabel(t.node,s.endpoint):"No Endpoint"))])],1)],1)]}}]),model:{value:t.group.group,callback:function(s){t.$set(t.group,"group",s)},expression:"group.group"}})],1),t.group.group?e("v-col",{attrs:{cols:"12"}},[e("p",{staticClass:"text-subtitle-1 pa-0 ma-0"},[t._v(" Max associations: "),e("strong",[t._v(t._s(t.maxNodes))])]),e("p",{staticClass:"text-subtitle-1 pa-0 ma-0"},[t._v(" Actual associations: "),e("strong",[t._v(t._s(t.nodesInGroup))])])]):t._e(),t.nodesInGroup<t.maxNodes?e("v-col",{staticClass:"pa-0"},[e("v-col",{attrs:{cols:"12"}},[e("v-combobox",{attrs:{label:"Target Node",items:t.filteredNodes,"return-object":"",rules:[t.required],hint:"Node to add to the association group","persistent-hint":"","item-text":"_name"},model:{value:t.group.target,callback:function(s){t.$set(t.group,"target",s)},expression:"group.target"}})],1),t.group.group&&t.group.group.multiChannel?e("v-col",{attrs:{cols:"12"}},[e("v-select",{attrs:{"persistent-hint":"",label:"Target Endpoint",hint:"Target node endpoint",items:t.targetEndpoints},model:{value:t.group.targetEndpoint,callback:function(s){t.$set(t.group,"targetEndpoint",t._n(s))},expression:"group.targetEndpoint"}})],1):t._e(),t.associationError?e("v-col",{attrs:{cols:"12"}},[e("v-alert",{attrs:{text:"",dense:"",type:"error"}},[t._v(" "+t._s(t.associationError)+" ")])],1):t._e()],1):t._e()],1)],1)],1)],1),e("v-card-actions",[e("v-spacer"),e("v-btn",{attrs:{color:"blue darken-1",text:""},on:{click:function(s){return t.$emit("close")}}},[t._v("Cancel")]),e("v-btn",{attrs:{color:"blue darken-1",text:"",disabled:t.nodesInGroup>=t.maxNodes||!!t.associationError},on:{click:function(s){t.$refs.form.validate()&&t.$emit("add",t.group)}}},[t._v("ADD")])],1)],1)],1)},_=[],b=h(f,m,_,!1,null,null);const E=b.exports;export{E as default};
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./prismeditor.esm-CqAGCIo4.js","./index-BJ5IKRRT.js","./index-gIFLWh50.css"])))=>i.map(i=>d[i]);
2
- import{_ as s,m as n,u as r,p as l,n as d}from"./index-BJ5IKRRT.js";const o={components:{PrismEditor:()=>s(()=>import("./prismeditor.esm-CqAGCIo4.js"),__vite__mapDeps([0,1,2]),import.meta.url).then(a=>a.PrismEditor)},props:{value:Boolean,gw_type:Number,title:String,editedValue:Object,devices:Array},watch:{value(a){this.$refs.form&&this.$refs.form.resetValidation(),a&&(this.isNew=!this.editedValue.device)}},computed:{...n(r,["gateway","mqtt"]),deviceValues(){const a=this.devices.find(e=>e.value==this.editedValue.device);return a?a.values:[]},deviceClasses(){const a=this.editedValue.value;return a?a.commandClass===48?["battery","cold","connectivity","door","garage_door","gas","heat","light","lock","moisture","motion","moving","occupancy","opening","plug","power","presence","problem","safety","smoke","sound","vibration","window"]:this.isSensor(a)?["battery","humidity","illuminance","signal_strength","temperature","power","power_factor","pressure","timestamp","current","energy","voltage"]:a.commandClass===38?["awning","blind","curtain","damper","door","garage","gate","shade","shutter","window"]:[]:[]},requiredIntensity(){return!this.editedValue.enablePoll||this.editedValue.enablePoll&&this.editedValue.pollInterval>=10||"Minimun interval is 10 seconds"},requiredTopic(){return this.gw_type!==2||!!this.editedValue.topic||"Topic required"}},data(){return{isNew:null,valid:!0,required:a=>!!a||"This field is required"}},methods:{highlighter(a){return l.highlight(a,l.languages.js)},isSensor(a){return a&&(a.commandClass===49||a.commandClass===50)}}};var c=function(){var e=this,t=e._self._c;return t("v-dialog",{attrs:{"max-width":"500px",persistent:""},model:{value:e.value,callback:function(i){e.value=i},expression:"value"}},[t("v-card",[t("v-card-title",[t("span",{staticClass:"headline"},[e._v(e._s(e.title))])]),t("v-card-text",[t("v-container",{attrs:{"grid-list-md":""}},[t("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:e.valid,callback:function(i){e.valid=i},expression:"valid"}},[t("v-row",[t("v-col",{attrs:{cols:"12"}},[t("v-select",{attrs:{label:"Device",required:"",rules:[e.required],"item-text":"name",items:e.devices},model:{value:e.editedValue.device,callback:function(i){e.$set(e.editedValue,"device",i)},expression:"editedValue.device"}})],1),t("v-col",{attrs:{cols:"12"}},[t("v-select",{attrs:{label:"Value",hint:e.editedValue.value?e.editedValue.value.description:"",required:"","return-object":"",rules:[e.required],"item-text":"label","item-value":"id",items:e.deviceValues},scopedSlots:e._u([{key:"selection",fn:function({item:i}){return[e._v(" "+e._s((i.label||i.id)+(i.endpoint>1?" - Endpoint "+i.endpoint:""))+" ")]}},{key:"item",fn:function({item:i}){return[t("v-list-item-content",[t("v-list-item-title",[e._v(e._s((i.label||i.id)+(i.endpoint>0?" - Endpoint "+i.endpoint:"")))]),t("v-list-item-subtitle",{staticClass:"text-truncate text-no-wrap",staticStyle:{"max-width":"500px"}},[e._v(e._s(i.description))])],1)]}}]),model:{value:e.editedValue.value,callback:function(i){e.$set(e.editedValue,"value",i)},expression:"editedValue.value"}})],1),!this.mqtt.disabled&&this.gateway.hassDiscovery?t("v-col",{attrs:{cols:"12"}},[t("v-select",{attrs:{label:"Device Class",hint:"Specify a device class for Home assistant","item-text":"name",items:e.deviceClasses},model:{value:e.editedValue.device_class,callback:function(i){e.$set(e.editedValue,"device_class",i)},expression:"editedValue.device_class"}})],1):e._e(),e.isSensor(e.editedValue.value)?t("v-col",{attrs:{cols:"12"}},[t("v-text-field",{attrs:{hint:"Specify a device icon for Home assistant, format is <prefix>:<icons-alias> (Eg: 'mdi:water'). Check http://materialdesignicons.com/",label:"Device Icon"},model:{value:e.editedValue.icon,callback:function(i){e.$set(e.editedValue,"icon",e._n(i))},expression:"editedValue.icon"}})],1):e._e(),this.mqtt.disabled?e._e():t("v-col",{attrs:{cols:"12"}},[t("v-text-field",{attrs:{label:"Topic",rules:[e.requiredTopic],required:""},model:{value:e.editedValue.topic,callback:function(i){e.$set(e.editedValue,"topic",typeof i=="string"?i.trim():i)},expression:"editedValue.topic"}})],1),this.mqtt.disabled?e._e():t("v-col",{attrs:{cols:"6"}},[t("v-select",{attrs:{label:"QoS",hint:"If specified, overrides the default QoS in MQTT settings",items:[{text:"",value:void 0},{text:"0: At most once",value:0},{text:"1: At least once",value:1},{text:"2: Exactly once",value:2}],"persistent-hint":"",required:"",type:"number"},model:{value:e.editedValue.qos,callback:function(i){e.$set(e.editedValue,"qos",i)},expression:"editedValue.qos"}})],1),this.mqtt.disabled?e._e():t("v-col",{attrs:{cols:"6"}},[t("v-select",{attrs:{label:"Retain","persistent-hint":"",hint:"If specified, overrides the default retain in MQTT settings",items:[{text:"",value:void 0},{text:"True",value:!0},{text:"False",value:!1}],required:"",type:"number"},model:{value:e.editedValue.retain,callback:function(i){e.$set(e.editedValue,"retain",i)},expression:"editedValue.retain"}})],1),t("v-col",{attrs:{cols:"12"}},[t("v-text-field",{attrs:{label:"Post operation",hint:"Example: '/10' '*100' '+20'",required:""},model:{value:e.editedValue.postOperation,callback:function(i){e.$set(e.editedValue,"postOperation",i)},expression:"editedValue.postOperation"}})],1),t("v-col",{attrs:{cols:"6"}},[t("v-checkbox",{attrs:{label:"Poll",hint:"Enable poll of this value. ATTENTION: This could create lot traffic in your network and kill the life of battery powered devices. Use at your own risk","persistent-hint":""},model:{value:e.editedValue.enablePoll,callback:function(i){e.$set(e.editedValue,"enablePoll",i)},expression:"editedValue.enablePoll"}})],1),e.editedValue.enablePoll?t("v-col",{attrs:{cols:"6"}},[t("v-text-field",{attrs:{label:"Poll interval",hint:"Seconds between to wait between poll requests. The timer starts when the request ends",rules:[e.requiredIntensity],suffix:"seconds",required:"",type:"number"},model:{value:e.editedValue.pollInterval,callback:function(i){e.$set(e.editedValue,"pollInterval",e._n(i))},expression:"editedValue.pollInterval"}})],1):e._e(),e.editedValue.value&&e.editedValue.value.commandClass===112?t("v-col",{attrs:{cols:"6"}},[t("v-checkbox",{attrs:{label:"Enable discovery",hint:"Configuration CC values are disabled by default in MQTT discovery. Set this to true to force enable them","persistent-hint":""},model:{value:e.editedValue.ccConfigEnableDiscovery,callback:function(i){e.$set(e.editedValue,"ccConfigEnableDiscovery",i)},expression:`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./prismeditor.esm-0DRlnctU.js","./index-DPngRuVO.js","./index-gIFLWh50.css"])))=>i.map(i=>d[i]);
2
+ import{_ as s,m as n,u as r,p as l,n as d}from"./index-DPngRuVO.js";const o={components:{PrismEditor:()=>s(()=>import("./prismeditor.esm-0DRlnctU.js"),__vite__mapDeps([0,1,2]),import.meta.url).then(a=>a.PrismEditor)},props:{value:Boolean,gw_type:Number,title:String,editedValue:Object,devices:Array},watch:{value(a){this.$refs.form&&this.$refs.form.resetValidation(),a&&(this.isNew=!this.editedValue.device)}},computed:{...n(r,["gateway","mqtt"]),deviceValues(){const a=this.devices.find(e=>e.value==this.editedValue.device);return a?a.values:[]},deviceClasses(){const a=this.editedValue.value;return a?a.commandClass===48?["battery","cold","connectivity","door","garage_door","gas","heat","light","lock","moisture","motion","moving","occupancy","opening","plug","power","presence","problem","safety","smoke","sound","vibration","window"]:this.isSensor(a)?["battery","humidity","illuminance","signal_strength","temperature","power","power_factor","pressure","timestamp","current","energy","voltage"]:a.commandClass===38?["awning","blind","curtain","damper","door","garage","gate","shade","shutter","window"]:[]:[]},requiredIntensity(){return!this.editedValue.enablePoll||this.editedValue.enablePoll&&this.editedValue.pollInterval>=10||"Minimun interval is 10 seconds"},requiredTopic(){return this.gw_type!==2||!!this.editedValue.topic||"Topic required"}},data(){return{isNew:null,valid:!0,required:a=>!!a||"This field is required"}},methods:{highlighter(a){return l.highlight(a,l.languages.js)},isSensor(a){return a&&(a.commandClass===49||a.commandClass===50)}}};var c=function(){var e=this,t=e._self._c;return t("v-dialog",{attrs:{"max-width":"500px",persistent:""},model:{value:e.value,callback:function(i){e.value=i},expression:"value"}},[t("v-card",[t("v-card-title",[t("span",{staticClass:"headline"},[e._v(e._s(e.title))])]),t("v-card-text",[t("v-container",{attrs:{"grid-list-md":""}},[t("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:e.valid,callback:function(i){e.valid=i},expression:"valid"}},[t("v-row",[t("v-col",{attrs:{cols:"12"}},[t("v-select",{attrs:{label:"Device",required:"",rules:[e.required],"item-text":"name",items:e.devices},model:{value:e.editedValue.device,callback:function(i){e.$set(e.editedValue,"device",i)},expression:"editedValue.device"}})],1),t("v-col",{attrs:{cols:"12"}},[t("v-select",{attrs:{label:"Value",hint:e.editedValue.value?e.editedValue.value.description:"",required:"","return-object":"",rules:[e.required],"item-text":"label","item-value":"id",items:e.deviceValues},scopedSlots:e._u([{key:"selection",fn:function({item:i}){return[e._v(" "+e._s((i.label||i.id)+(i.endpoint>1?" - Endpoint "+i.endpoint:""))+" ")]}},{key:"item",fn:function({item:i}){return[t("v-list-item-content",[t("v-list-item-title",[e._v(e._s((i.label||i.id)+(i.endpoint>0?" - Endpoint "+i.endpoint:"")))]),t("v-list-item-subtitle",{staticClass:"text-truncate text-no-wrap",staticStyle:{"max-width":"500px"}},[e._v(e._s(i.description))])],1)]}}]),model:{value:e.editedValue.value,callback:function(i){e.$set(e.editedValue,"value",i)},expression:"editedValue.value"}})],1),!this.mqtt.disabled&&this.gateway.hassDiscovery?t("v-col",{attrs:{cols:"12"}},[t("v-select",{attrs:{label:"Device Class",hint:"Specify a device class for Home assistant","item-text":"name",items:e.deviceClasses},model:{value:e.editedValue.device_class,callback:function(i){e.$set(e.editedValue,"device_class",i)},expression:"editedValue.device_class"}})],1):e._e(),e.isSensor(e.editedValue.value)?t("v-col",{attrs:{cols:"12"}},[t("v-text-field",{attrs:{hint:"Specify a device icon for Home assistant, format is <prefix>:<icons-alias> (Eg: 'mdi:water'). Check http://materialdesignicons.com/",label:"Device Icon"},model:{value:e.editedValue.icon,callback:function(i){e.$set(e.editedValue,"icon",e._n(i))},expression:"editedValue.icon"}})],1):e._e(),this.mqtt.disabled?e._e():t("v-col",{attrs:{cols:"12"}},[t("v-text-field",{attrs:{label:"Topic",rules:[e.requiredTopic],required:""},model:{value:e.editedValue.topic,callback:function(i){e.$set(e.editedValue,"topic",typeof i=="string"?i.trim():i)},expression:"editedValue.topic"}})],1),this.mqtt.disabled?e._e():t("v-col",{attrs:{cols:"6"}},[t("v-select",{attrs:{label:"QoS",hint:"If specified, overrides the default QoS in MQTT settings",items:[{text:"",value:void 0},{text:"0: At most once",value:0},{text:"1: At least once",value:1},{text:"2: Exactly once",value:2}],"persistent-hint":"",required:"",type:"number"},model:{value:e.editedValue.qos,callback:function(i){e.$set(e.editedValue,"qos",i)},expression:"editedValue.qos"}})],1),this.mqtt.disabled?e._e():t("v-col",{attrs:{cols:"6"}},[t("v-select",{attrs:{label:"Retain","persistent-hint":"",hint:"If specified, overrides the default retain in MQTT settings",items:[{text:"",value:void 0},{text:"True",value:!0},{text:"False",value:!1}],required:"",type:"number"},model:{value:e.editedValue.retain,callback:function(i){e.$set(e.editedValue,"retain",i)},expression:"editedValue.retain"}})],1),t("v-col",{attrs:{cols:"12"}},[t("v-text-field",{attrs:{label:"Post operation",hint:"Example: '/10' '*100' '+20'",required:""},model:{value:e.editedValue.postOperation,callback:function(i){e.$set(e.editedValue,"postOperation",i)},expression:"editedValue.postOperation"}})],1),t("v-col",{attrs:{cols:"6"}},[t("v-checkbox",{attrs:{label:"Poll",hint:"Enable poll of this value. ATTENTION: This could create lot traffic in your network and kill the life of battery powered devices. Use at your own risk","persistent-hint":""},model:{value:e.editedValue.enablePoll,callback:function(i){e.$set(e.editedValue,"enablePoll",i)},expression:"editedValue.enablePoll"}})],1),e.editedValue.enablePoll?t("v-col",{attrs:{cols:"6"}},[t("v-text-field",{attrs:{label:"Poll interval",hint:"Seconds between to wait between poll requests. The timer starts when the request ends",rules:[e.requiredIntensity],suffix:"seconds",required:"",type:"number"},model:{value:e.editedValue.pollInterval,callback:function(i){e.$set(e.editedValue,"pollInterval",e._n(i))},expression:"editedValue.pollInterval"}})],1):e._e(),e.editedValue.value&&e.editedValue.value.commandClass===112?t("v-col",{attrs:{cols:"6"}},[t("v-checkbox",{attrs:{label:"Enable discovery",hint:"Configuration CC values are disabled by default in MQTT discovery. Set this to true to force enable them","persistent-hint":""},model:{value:e.editedValue.ccConfigEnableDiscovery,callback:function(i){e.$set(e.editedValue,"ccConfigEnableDiscovery",i)},expression:`
3
3
  editedValue.ccConfigEnableDiscovery
4
4
  `}})],1):e._e(),t("v-col",{attrs:{cols:"6"}},[t("v-checkbox",{attrs:{label:"Parse send",hint:"Create a function that parse the value sent via MQTT","persistent-hint":""},model:{value:e.editedValue.parseSend,callback:function(i){e.$set(e.editedValue,"parseSend",i)},expression:"editedValue.parseSend"}})],1),e.editedValue.parseSend?t("v-container",[t("p",[e._v(" Write the function here. Args are: "),t("code",[e._v("value")]),e._v(", "),t("code",[e._v("valueId")]),e._v(", "),t("code",[e._v("node")]),e._v(", "),t("code",[e._v("logger")]),e._v(". The function is sync and must return the parsed "),t("code",[e._v("value")]),e._v(". ")]),t("prism-editor",{attrs:{lineNumbers:"",language:"js",highlight:e.highlighter},model:{value:e.editedValue.sendFunction,callback:function(i){e.$set(e.editedValue,"sendFunction",i)},expression:"editedValue.sendFunction"}})],1):e._e(),t("v-col",{attrs:{cols:"6"}},[t("v-checkbox",{attrs:{label:"Parse receive",hint:"Create a function that parse the received value from MQTT","persistent-hint":""},model:{value:e.editedValue.parseReceive,callback:function(i){e.$set(e.editedValue,"parseReceive",i)},expression:"editedValue.parseReceive"}})],1),e.editedValue.parseReceive?t("v-container",[t("p",[e._v(" Write the function here. Args are: "),t("code",[e._v("value")]),e._v(", "),t("code",[e._v("valueId")]),e._v(", "),t("code",[e._v("node")]),e._v(", "),t("code",[e._v("logger")]),e._v(". The function is sync and must return the parsed "),t("code",[e._v("value")]),e._v(". ")]),t("prism-editor",{attrs:{lineNumbers:"",language:"js",highlight:e.highlighter},model:{value:e.editedValue.receiveFunction,callback:function(i){e.$set(e.editedValue,"receiveFunction",i)},expression:"editedValue.receiveFunction"}})],1):e._e()],1)],1)],1)],1),t("v-card-actions",[t("v-spacer"),t("v-btn",{attrs:{color:"blue darken-1",text:""},on:{click:function(i){return e.$emit("close")}}},[e._v("Cancel")]),t("v-btn",{attrs:{color:"blue darken-1",text:""},on:{click:function(i){e.$refs.form.validate()&&e.$emit("save")}}},[e._v(e._s(e.isNew?"Add":"Update"))])],1)],1)],1)},u=[],v=d(o,c,u,!1,null,"15f2ac17");const m=v.exports;export{m as default};
@@ -1 +1 @@
1
- import{I as o,m as l,u as r,P as d,a as c,ar as u,as as g,c as v,n as h}from"./index-BJ5IKRRT.js";const f={components:{},props:{value:Boolean,node:Object,socket:Object},mixins:[o],watch:{value(i){this.init(i)}},computed:{...l(r,["nodes"]),isLR(){var i;return((i=this.activeNode)==null?void 0:i.protocol)===d.ZWaveLongRange},filteredNodes(){return this.isLR?this.nodes.filter(i=>i.isControllerNode):this.activeNode?this.nodes.filter(i=>i.id!==this.activeNode.id):this.nodes},headers(){return this.mode==="Lifeline"?[{text:"Max latency",value:"latency"},{text:"Failed pings",value:"failedPingsNode"},{text:"Route Changes",value:"routeChanges"},{text:"SNR margin",value:"snrMargin"},{text:"Min power level w/o errors",value:"minPowerlevel"},{text:"Rating",value:"rating"}]:[{text:"Failed pings",value:"failedPingsToSource"},{text:"Min Power Level w/o errors",value:"minPowerlevelSource"},{text:"Rating",value:"rating"}]}},data(){return{loading:!1,results:[],rounds:5,targetNode:null,activeNode:null,resultsTargetNode:null,averages:null,mode:"Lifeline",hintHeaders:[{text:"Rating",value:"rating",sortable:!1},{text:"Failed pings",value:"failedPings",sortable:!1},{text:"Max latency (*)",value:"latency",sortable:!1},{text:"No. of Neighbors",value:"neighbors",sortable:!1},{text:"SNR margin (*)",value:"snrMargin",sortable:!1},{text:"Min power level w/o errors",value:"minPowerlevel",sortable:!1}],hintValues:[{rating:10,failedPings:0,latency:"≤ 50 ms",neighbors:"> 2",snrMargin:"≥ 17dBm",minPowerlevel:"≤ -6dBm"},{rating:9,failedPings:0,latency:"≤ 100 ms",neighbors:"> 2",snrMargin:"≥ 17dBm",minPowerlevel:"≤ -6dBm"},{rating:8,failedPings:0,latency:"≤ 100 ms",neighbors:"≤ 2",snrMargin:"≥ 17dBm",minPowerlevel:"≤ -6dBm"},{rating:7,failedPings:0,latency:"≤ 100ms",neighbors:"> 2"},{rating:6,failedPings:0,latency:"≤ 100ms",neighbors:"≤ 2"},{rating:5,failedPings:0,latency:"≤ 250ms"},{rating:4,failedPings:0,latency:"≤ 500 ms"},{rating:3,failedPings:1,latency:"≤ 1000ms"},{rating:2,failedPings:"≤ 2",latency:"> 1000ms"},{rating:1,failedPings:"≤ 9"},{rating:0,failedPings:10}]}},methods:{...c(r,["showSnackbar"]),exportResults(){this.app.exportConfiguration(this.results,`healthCheck_${this.activeNode.id}-${this.resultsTargetNode}`,"json")},getNeighborsColor(i){return i>2?"success--text":i===0?"error--text":"warning--text"},getLatencyColor(i){return i<=100?"success--text":i<=500?"warning--text":"error--text"},getSnrMarginColor(i){return i>=17?"success--text":"error--text"},getFailedPingsColor(i){return i===0?"success--text":i===1?"warning--text":"error--text"},getRatingColor(i){return i===void 0?"primary":i>=6?"success":i>=4?"warning":"error"},getPowerLevel(i){return u(g,i)},getPowerLevelColor(i){return i===void 0?"":i>=6?"success--text":i>=3?"warning--text":"error--text"},init(i){i?(this.rounds=5,this.activeNode=v(this.node),this.targetNode=this.filteredNodes.find(e=>e.isControllerNode),this.selectedNode=this.filteredNodes[0]?this.filteredNodes[0].id:null,this.bindEvent("healthCheckProgress",this.onHealthCheckProgress.bind(this))):i===!1&&(this.unbindEvents(),this.results=[],this.loading=!1,this.targetNode=null,this.averages=null)},onHealthCheckProgress(i){const{request:e,round:t,totalRounds:s,lastResult:n}=i;if(e.nodeId===this.activeNode.id){const a=this.results[this.results.length-1];n&&Object.assign(a,n),t<s&&this.results.push({round:t,rating:void 0})}},async stopHealth(){(await this.app.apiRequest("abortHealthCheck",[this.activeNode.id])).success&&this.showSnackbar("Health check aborted","success")},async checkHealth(){this.loading=!0,this.results=[];const i=[this.activeNode.id],e=typeof this.targetNode=="object"?this.targetNode:this.nodes.find(s=>s.id==this.targetNode);if(!e)return;e.isControllerNode?this.mode="Lifeline":(this.mode="Route",i.push(e.id)),i.push(this.rounds||1),this.results.push({round:1,rating:void 0});const t=await this.app.apiRequest(`check${this.mode}Health`,i,{infoSnack:!0,errorSnack:!1});if(this.loading=!1,t.success){const s=t.result;this.results=s.results,delete s.results,this.averages=s,this.averages.numNeighbors=Math.max(...this.results.map(n=>n.numNeighbors)),this.resultsTargetNode=s.targetNodeId}else this.results.pop(),this.showSnackbar(t.message||"Health check failed","error")}},beforeDestroy(){this.init(!1)}};var m=function(){var e=this,t=e._self._c;return t("v-dialog",{attrs:{"max-width":"800px",persistent:""},model:{value:e.value,callback:function(s){e.value=s},expression:"value"}},[t("v-card",{attrs:{loading:e.loading}},[t("v-card-title",[t("span",{staticClass:"headline"},[e._v("Node "+e._s(e.activeNode?e.activeNode.id:"")+" - Health check")])]),t("v-card-text",[t("v-container",[t("v-row",{staticClass:"ma-3",attrs:{justify:"start"}},[t("v-col",[t("v-combobox",{staticStyle:{"max-width":"300px"},attrs:{label:"Target Node",items:e.filteredNodes,"return-object":"",hint:"Target node to run the route health check on","persistent-hint":"","item-text":"_name","item-value":"id"},model:{value:e.targetNode,callback:function(s){e.targetNode=s},expression:"targetNode"}})],1),t("v-col",[t("v-text-field",{attrs:{hint:"Number of rounds to run the health check",label:"Rounds",min:"1",max:"10",type:"number","persistent-hint":""},model:{value:e.rounds,callback:function(s){e.rounds=e._n(s)},expression:"rounds"}})],1)],1),t("v-row",{staticClass:"mb-2",attrs:{justify:"space-around"}},[t("v-btn",{attrs:{color:e.loading?"error":"success",disabled:!e.targetNode},on:{click:function(s){e.loading?e.stopHealth():e.checkHealth()}}},[e._v(e._s(e.loading?"Stop":"Check"))]),t("v-menu",{attrs:{"close-on-content-click":!1,"offset-y":"",bottom:"","open-on-click":"","content-class":"help-menu"},scopedSlots:e._u([{key:"activator",fn:function({on:s,attrs:n}){return[t("v-btn",e._g(e._b({attrs:{color:"primary"}},"v-btn",n,!1),s),[t("v-icon",[e._v("help")])],1)]}}])},[t("v-list",{attrs:{dense:""}},[t("v-list-item",[t("v-list-item-content",{staticClass:"ma-0"},[t("v-list-item-title",[e._v("Route changes")]),t("v-list-item-subtitle",[e._v("How many times at least one new route was needed. Lower = better, ideally 0. Only available if the controller supports TX reports")])],1)],1),t("v-list-item",[t("v-list-item-content",[t("v-list-item-title",[e._v("Latency")]),t("v-list-item-subtitle",[e._v("The maximum time it took to send a ping to the node. Lower = better, ideally 10 ms. Will use the time in TX reports if available, otherwise fall back to measuring the round trip time.")])],1)],1),t("v-list-item",[t("v-list-item-content",[t("v-list-item-title",[e._v("No. Neighbors")]),t("v-list-item-subtitle",[e._v("How many routing neighbors this node has. Higher = better, ideally > 2")])],1)],1),t("v-list-item",[t("v-list-item-content",[t("v-list-item-title",[e._v("Failed Pings node")]),t("v-list-item-subtitle",[e._v("How many pings were not ACKed by the node. Lower = better, ideally 0.")])],1)],1),t("v-list-item",[t("v-list-item-content",[t("v-list-item-title",[e._v("Min Power Level")]),t("v-list-item-subtitle",[e._v("The minimum powerlevel where all pings from the (source) node were ACKed by the target node / controller. Lower = better, ideally -6dBm or less. Only available if the (source) node supports Powerlevel CC")])],1)],1),t("v-list-item",[t("v-list-item-content",[t("v-list-item-title",[e._v("Failed pings Controller")]),t("v-list-item-subtitle",[e._v("If no powerlevel was found where the controller ACKed all pings from the node, this contains the number of pings that weren't ACKed. Lower = better, ideally 0.")])],1)],1),t("v-list-item",[t("v-list-item-content",[t("v-list-item-title",[e._v("SNR Margin")]),t("v-list-item-subtitle",[e._v("An estimation of the Signal-to-Noise Ratio Margin in dBm. Only available if the controller supports TX reports.")])],1)],1),t("v-list-item",[t("v-list-item-content",[t("v-list-item-title",[e._v("Rating")])],1)],1)],1),t("v-data-table",{staticClass:"elevation-1",attrs:{headers:e.hintHeaders,items:e.hintValues,"mobile-breakpoint":0,"hide-default-footer":"","disable-pagination":""},scopedSlots:e._u([{key:"footer",fn:function(){return[t("p",{staticClass:"mb-0 text-caption"},[t("code",[e._v("*")]),e._v(" Due to missing insight into re-routing attempts between two nodes, some of the values for the for the route check rating don't exist here and are only present in lifeline checks (when target node is the controller). Furthermore, it is not guaranteed that a route between two nodes and lifeline with the same health rating have the same quality. ")])]},proxy:!0}])})],1)],1),e.averages&&!e.loading?t("v-row",{staticClass:"mb-2",attrs:{justify:"space-around"}},[e.averages.numNeighbors&&!e.isLR?t("v-col",{staticClass:"text-center"},[t("p",{staticClass:"mb-1 subtitle-1 font-weight-bold"},[e._v(" No. Neighbors ")]),t("span",{staticClass:"text-h3",class:e.getNeighborsColor(e.averages.numNeighbors)},[e._v(e._s(e.averages.numNeighbors))])]):e._e(),e.averages.rating?t("v-col",{staticClass:"text-center"},[t("p",{staticClass:"mb-1 subtitle-1 font-weight-bold"},[e._v(" Rating ")]),t("span",{staticClass:"text-h3",class:e.getRatingColor(e.averages.rating)+"--text"},[e._v(e._s(e.averages.rating)+"/10")])]):e._e()],1):e._e(),e.results.length>0?t("v-data-table",{staticClass:"elevation-1",attrs:{headers:e.headers,items:e.results,"item-key":"id","hide-default-footer":"","items-per-page":-1},scopedSlots:e._u([{key:"top",fn:function(){return[!e.loading&&e.resultsTargetNode>=0?t("v-btn",{staticClass:"mb-2",attrs:{text:"",color:"primary"},on:{click:e.exportResults}},[e._v("Export")]):e._e()]},proxy:!0},{key:"item.rating",fn:function({item:s}){return[t("v-progress-linear",{staticStyle:{"min-width":"80px"},attrs:{rounded:"",height:"25",value:s.rating*10,color:e.getRatingColor(s.rating),indeterminate:s.rating===void 0}},[s.rating!==void 0?t("strong",[e._v(e._s(s.rating)+"/10")]):e._e()])]}},{key:"item.latency",fn:function({item:s}){return[s.latency!==void 0?t("strong",{class:e.getLatencyColor(s.latency)},[e._v(e._s(s.latency)+" ms")]):e._e()]}},{key:"item.snrMargin",fn:function({item:s}){return[s.snrMargin!==void 0?t("strong",{class:e.getSnrMarginColor(s.snrMargin)},[e._v(e._s(s.snrMargin)+" dBm")]):e._e()]}},{key:"item.routeChanges",fn:function({item:s}){return[s.routeChanges!==void 0?t("strong",[e._v(e._s(s.routeChanges))]):e._e()]}},{key:"item.minPowerlevel",fn:function({item:s}){return[s.minPowerlevel!==void 0?t("strong",{class:e.getPowerLevelColor(s.minPowerlevel)},[e._v(e._s(e.getPowerLevel(s.minPowerlevel)))]):e._e()]}},{key:"item.failedPingsNode",fn:function({item:s}){return[s.failedPingsNode!==void 0?t("p",{staticClass:"mb-0"},[e._v(" "+e._s(e.resultsTargetNode)+" → "+e._s(e.activeNode.id)+": "),t("strong",{class:e.getFailedPingsColor(s.failedPingsNode)},[e._v(e._s(s.failedPingsNode)+"/10")])]):e._e(),s.failedPingsController!==void 0?t("p",{staticClass:"mb-0"},[e._v(" "+e._s(e.resultsTargetNode)+" ← "+e._s(e.activeNode.id)+": "),t("strong",{class:e.getFailedPingsColor(s.failedPingsController)},[e._v(e._s(s.failedPingsController)+"/10")])]):e._e()]}},{key:"item.failedPingsToSource",fn:function({item:s}){return[s.failedPingsToSource!==void 0?t("p",{staticClass:"mb-0"},[e._v(" "+e._s(e.resultsTargetNode)+" → "+e._s(e.activeNode.id)+": "),t("strong",{class:e.getFailedPingsColor(s.failedPingsToSource)},[e._v(e._s(s.failedPingsToSource)+"/10")])]):e._e(),s.failedPingsToTarget!==void 0?t("p",{staticClass:"mb-0"},[e._v(" "+e._s(e.resultsTargetNode)+" ← "+e._s(e.activeNode.id)+": "),t("strong",{class:e.getFailedPingsColor(s.failedPingsToTarget)},[e._v(e._s(s.failedPingsToTarget)+"/10")])]):e._e()]}},{key:"item.minPowerlevelSource",fn:function({item:s}){return[s.minPowerlevelSource!==void 0?t("p",{staticClass:"mb-0"},[e._v(" Node "+e._s(e.activeNode.id)+": "),t("strong",{class:e.getPowerLevelColor(s.minPowerlevelSource)},[e._v(e._s(e.getPowerLevel(s.minPowerlevelSource)))])]):e._e(),s.minPowerlevelTarget!==void 0?t("p",{staticClass:"mb-0"},[e._v(" Node "+e._s(e.resultsTargetNode)+": "),t("strong",{class:e.getPowerLevelColor(s.minPowerlevelTarget)},[e._v(e._s(e.getPowerLevel(s.minPowerlevelTarget)))])]):e._e()]}}],null,!0)}):e._e()],1)],1),t("v-card-actions",[t("v-spacer"),t("v-btn",{attrs:{color:"blue darken-1",text:""},on:{click:function(s){return e.$emit("close")}}},[e._v("Close")])],1)],1)],1)},p=[],_=h(f,m,p,!1,null,null);const w=_.exports;export{w as default};
1
+ import{I as o,m as l,u as r,P as d,a as c,ar as u,as as g,c as v,n as h}from"./index-DPngRuVO.js";const f={components:{},props:{value:Boolean,node:Object,socket:Object},mixins:[o],watch:{value(i){this.init(i)}},computed:{...l(r,["nodes"]),isLR(){var i;return((i=this.activeNode)==null?void 0:i.protocol)===d.ZWaveLongRange},filteredNodes(){return this.isLR?this.nodes.filter(i=>i.isControllerNode):this.activeNode?this.nodes.filter(i=>i.id!==this.activeNode.id):this.nodes},headers(){return this.mode==="Lifeline"?[{text:"Max latency",value:"latency"},{text:"Failed pings",value:"failedPingsNode"},{text:"Route Changes",value:"routeChanges"},{text:"SNR margin",value:"snrMargin"},{text:"Min power level w/o errors",value:"minPowerlevel"},{text:"Rating",value:"rating"}]:[{text:"Failed pings",value:"failedPingsToSource"},{text:"Min Power Level w/o errors",value:"minPowerlevelSource"},{text:"Rating",value:"rating"}]}},data(){return{loading:!1,results:[],rounds:5,targetNode:null,activeNode:null,resultsTargetNode:null,averages:null,mode:"Lifeline",hintHeaders:[{text:"Rating",value:"rating",sortable:!1},{text:"Failed pings",value:"failedPings",sortable:!1},{text:"Max latency (*)",value:"latency",sortable:!1},{text:"No. of Neighbors",value:"neighbors",sortable:!1},{text:"SNR margin (*)",value:"snrMargin",sortable:!1},{text:"Min power level w/o errors",value:"minPowerlevel",sortable:!1}],hintValues:[{rating:10,failedPings:0,latency:"≤ 50 ms",neighbors:"> 2",snrMargin:"≥ 17dBm",minPowerlevel:"≤ -6dBm"},{rating:9,failedPings:0,latency:"≤ 100 ms",neighbors:"> 2",snrMargin:"≥ 17dBm",minPowerlevel:"≤ -6dBm"},{rating:8,failedPings:0,latency:"≤ 100 ms",neighbors:"≤ 2",snrMargin:"≥ 17dBm",minPowerlevel:"≤ -6dBm"},{rating:7,failedPings:0,latency:"≤ 100ms",neighbors:"> 2"},{rating:6,failedPings:0,latency:"≤ 100ms",neighbors:"≤ 2"},{rating:5,failedPings:0,latency:"≤ 250ms"},{rating:4,failedPings:0,latency:"≤ 500 ms"},{rating:3,failedPings:1,latency:"≤ 1000ms"},{rating:2,failedPings:"≤ 2",latency:"> 1000ms"},{rating:1,failedPings:"≤ 9"},{rating:0,failedPings:10}]}},methods:{...c(r,["showSnackbar"]),exportResults(){this.app.exportConfiguration(this.results,`healthCheck_${this.activeNode.id}-${this.resultsTargetNode}`,"json")},getNeighborsColor(i){return i>2?"success--text":i===0?"error--text":"warning--text"},getLatencyColor(i){return i<=100?"success--text":i<=500?"warning--text":"error--text"},getSnrMarginColor(i){return i>=17?"success--text":"error--text"},getFailedPingsColor(i){return i===0?"success--text":i===1?"warning--text":"error--text"},getRatingColor(i){return i===void 0?"primary":i>=6?"success":i>=4?"warning":"error"},getPowerLevel(i){return u(g,i)},getPowerLevelColor(i){return i===void 0?"":i>=6?"success--text":i>=3?"warning--text":"error--text"},init(i){i?(this.rounds=5,this.activeNode=v(this.node),this.targetNode=this.filteredNodes.find(e=>e.isControllerNode),this.selectedNode=this.filteredNodes[0]?this.filteredNodes[0].id:null,this.bindEvent("healthCheckProgress",this.onHealthCheckProgress.bind(this))):i===!1&&(this.unbindEvents(),this.results=[],this.loading=!1,this.targetNode=null,this.averages=null)},onHealthCheckProgress(i){const{request:e,round:t,totalRounds:s,lastResult:n}=i;if(e.nodeId===this.activeNode.id){const a=this.results[this.results.length-1];n&&Object.assign(a,n),t<s&&this.results.push({round:t,rating:void 0})}},async stopHealth(){(await this.app.apiRequest("abortHealthCheck",[this.activeNode.id])).success&&this.showSnackbar("Health check aborted","success")},async checkHealth(){this.loading=!0,this.results=[];const i=[this.activeNode.id],e=typeof this.targetNode=="object"?this.targetNode:this.nodes.find(s=>s.id==this.targetNode);if(!e)return;e.isControllerNode?this.mode="Lifeline":(this.mode="Route",i.push(e.id)),i.push(this.rounds||1),this.results.push({round:1,rating:void 0});const t=await this.app.apiRequest(`check${this.mode}Health`,i,{infoSnack:!0,errorSnack:!1});if(this.loading=!1,t.success){const s=t.result;this.results=s.results,delete s.results,this.averages=s,this.averages.numNeighbors=Math.max(...this.results.map(n=>n.numNeighbors)),this.resultsTargetNode=s.targetNodeId}else this.results.pop(),this.showSnackbar(t.message||"Health check failed","error")}},beforeDestroy(){this.init(!1)}};var m=function(){var e=this,t=e._self._c;return t("v-dialog",{attrs:{"max-width":"800px",persistent:""},model:{value:e.value,callback:function(s){e.value=s},expression:"value"}},[t("v-card",{attrs:{loading:e.loading}},[t("v-card-title",[t("span",{staticClass:"headline"},[e._v("Node "+e._s(e.activeNode?e.activeNode.id:"")+" - Health check")])]),t("v-card-text",[t("v-container",[t("v-row",{staticClass:"ma-3",attrs:{justify:"start"}},[t("v-col",[t("v-combobox",{staticStyle:{"max-width":"300px"},attrs:{label:"Target Node",items:e.filteredNodes,"return-object":"",hint:"Target node to run the route health check on","persistent-hint":"","item-text":"_name","item-value":"id"},model:{value:e.targetNode,callback:function(s){e.targetNode=s},expression:"targetNode"}})],1),t("v-col",[t("v-text-field",{attrs:{hint:"Number of rounds to run the health check",label:"Rounds",min:"1",max:"10",type:"number","persistent-hint":""},model:{value:e.rounds,callback:function(s){e.rounds=e._n(s)},expression:"rounds"}})],1)],1),t("v-row",{staticClass:"mb-2",attrs:{justify:"space-around"}},[t("v-btn",{attrs:{color:e.loading?"error":"success",disabled:!e.targetNode},on:{click:function(s){e.loading?e.stopHealth():e.checkHealth()}}},[e._v(e._s(e.loading?"Stop":"Check"))]),t("v-menu",{attrs:{"close-on-content-click":!1,"offset-y":"",bottom:"","open-on-click":"","content-class":"help-menu"},scopedSlots:e._u([{key:"activator",fn:function({on:s,attrs:n}){return[t("v-btn",e._g(e._b({attrs:{color:"primary"}},"v-btn",n,!1),s),[t("v-icon",[e._v("help")])],1)]}}])},[t("v-list",{attrs:{dense:""}},[t("v-list-item",[t("v-list-item-content",{staticClass:"ma-0"},[t("v-list-item-title",[e._v("Route changes")]),t("v-list-item-subtitle",[e._v("How many times at least one new route was needed. Lower = better, ideally 0. Only available if the controller supports TX reports")])],1)],1),t("v-list-item",[t("v-list-item-content",[t("v-list-item-title",[e._v("Latency")]),t("v-list-item-subtitle",[e._v("The maximum time it took to send a ping to the node. Lower = better, ideally 10 ms. Will use the time in TX reports if available, otherwise fall back to measuring the round trip time.")])],1)],1),t("v-list-item",[t("v-list-item-content",[t("v-list-item-title",[e._v("No. Neighbors")]),t("v-list-item-subtitle",[e._v("How many routing neighbors this node has. Higher = better, ideally > 2")])],1)],1),t("v-list-item",[t("v-list-item-content",[t("v-list-item-title",[e._v("Failed Pings node")]),t("v-list-item-subtitle",[e._v("How many pings were not ACKed by the node. Lower = better, ideally 0.")])],1)],1),t("v-list-item",[t("v-list-item-content",[t("v-list-item-title",[e._v("Min Power Level")]),t("v-list-item-subtitle",[e._v("The minimum powerlevel where all pings from the (source) node were ACKed by the target node / controller. Lower = better, ideally -6dBm or less. Only available if the (source) node supports Powerlevel CC")])],1)],1),t("v-list-item",[t("v-list-item-content",[t("v-list-item-title",[e._v("Failed pings Controller")]),t("v-list-item-subtitle",[e._v("If no powerlevel was found where the controller ACKed all pings from the node, this contains the number of pings that weren't ACKed. Lower = better, ideally 0.")])],1)],1),t("v-list-item",[t("v-list-item-content",[t("v-list-item-title",[e._v("SNR Margin")]),t("v-list-item-subtitle",[e._v("An estimation of the Signal-to-Noise Ratio Margin in dBm. Only available if the controller supports TX reports.")])],1)],1),t("v-list-item",[t("v-list-item-content",[t("v-list-item-title",[e._v("Rating")])],1)],1)],1),t("v-data-table",{staticClass:"elevation-1",attrs:{headers:e.hintHeaders,items:e.hintValues,"mobile-breakpoint":0,"hide-default-footer":"","disable-pagination":""},scopedSlots:e._u([{key:"footer",fn:function(){return[t("p",{staticClass:"mb-0 text-caption"},[t("code",[e._v("*")]),e._v(" Due to missing insight into re-routing attempts between two nodes, some of the values for the for the route check rating don't exist here and are only present in lifeline checks (when target node is the controller). Furthermore, it is not guaranteed that a route between two nodes and lifeline with the same health rating have the same quality. ")])]},proxy:!0}])})],1)],1),e.averages&&!e.loading?t("v-row",{staticClass:"mb-2",attrs:{justify:"space-around"}},[e.averages.numNeighbors&&!e.isLR?t("v-col",{staticClass:"text-center"},[t("p",{staticClass:"mb-1 subtitle-1 font-weight-bold"},[e._v(" No. Neighbors ")]),t("span",{staticClass:"text-h3",class:e.getNeighborsColor(e.averages.numNeighbors)},[e._v(e._s(e.averages.numNeighbors))])]):e._e(),e.averages.rating?t("v-col",{staticClass:"text-center"},[t("p",{staticClass:"mb-1 subtitle-1 font-weight-bold"},[e._v(" Rating ")]),t("span",{staticClass:"text-h3",class:e.getRatingColor(e.averages.rating)+"--text"},[e._v(e._s(e.averages.rating)+"/10")])]):e._e()],1):e._e(),e.results.length>0?t("v-data-table",{staticClass:"elevation-1",attrs:{headers:e.headers,items:e.results,"item-key":"id","hide-default-footer":"","items-per-page":-1},scopedSlots:e._u([{key:"top",fn:function(){return[!e.loading&&e.resultsTargetNode>=0?t("v-btn",{staticClass:"mb-2",attrs:{text:"",color:"primary"},on:{click:e.exportResults}},[e._v("Export")]):e._e()]},proxy:!0},{key:"item.rating",fn:function({item:s}){return[t("v-progress-linear",{staticStyle:{"min-width":"80px"},attrs:{rounded:"",height:"25",value:s.rating*10,color:e.getRatingColor(s.rating),indeterminate:s.rating===void 0}},[s.rating!==void 0?t("strong",[e._v(e._s(s.rating)+"/10")]):e._e()])]}},{key:"item.latency",fn:function({item:s}){return[s.latency!==void 0?t("strong",{class:e.getLatencyColor(s.latency)},[e._v(e._s(s.latency)+" ms")]):e._e()]}},{key:"item.snrMargin",fn:function({item:s}){return[s.snrMargin!==void 0?t("strong",{class:e.getSnrMarginColor(s.snrMargin)},[e._v(e._s(s.snrMargin)+" dBm")]):e._e()]}},{key:"item.routeChanges",fn:function({item:s}){return[s.routeChanges!==void 0?t("strong",[e._v(e._s(s.routeChanges))]):e._e()]}},{key:"item.minPowerlevel",fn:function({item:s}){return[s.minPowerlevel!==void 0?t("strong",{class:e.getPowerLevelColor(s.minPowerlevel)},[e._v(e._s(e.getPowerLevel(s.minPowerlevel)))]):e._e()]}},{key:"item.failedPingsNode",fn:function({item:s}){return[s.failedPingsNode!==void 0?t("p",{staticClass:"mb-0"},[e._v(" "+e._s(e.resultsTargetNode)+" → "+e._s(e.activeNode.id)+": "),t("strong",{class:e.getFailedPingsColor(s.failedPingsNode)},[e._v(e._s(s.failedPingsNode)+"/10")])]):e._e(),s.failedPingsController!==void 0?t("p",{staticClass:"mb-0"},[e._v(" "+e._s(e.resultsTargetNode)+" ← "+e._s(e.activeNode.id)+": "),t("strong",{class:e.getFailedPingsColor(s.failedPingsController)},[e._v(e._s(s.failedPingsController)+"/10")])]):e._e()]}},{key:"item.failedPingsToSource",fn:function({item:s}){return[s.failedPingsToSource!==void 0?t("p",{staticClass:"mb-0"},[e._v(" "+e._s(e.resultsTargetNode)+" → "+e._s(e.activeNode.id)+": "),t("strong",{class:e.getFailedPingsColor(s.failedPingsToSource)},[e._v(e._s(s.failedPingsToSource)+"/10")])]):e._e(),s.failedPingsToTarget!==void 0?t("p",{staticClass:"mb-0"},[e._v(" "+e._s(e.resultsTargetNode)+" ← "+e._s(e.activeNode.id)+": "),t("strong",{class:e.getFailedPingsColor(s.failedPingsToTarget)},[e._v(e._s(s.failedPingsToTarget)+"/10")])]):e._e()]}},{key:"item.minPowerlevelSource",fn:function({item:s}){return[s.minPowerlevelSource!==void 0?t("p",{staticClass:"mb-0"},[e._v(" Node "+e._s(e.activeNode.id)+": "),t("strong",{class:e.getPowerLevelColor(s.minPowerlevelSource)},[e._v(e._s(e.getPowerLevel(s.minPowerlevelSource)))])]):e._e(),s.minPowerlevelTarget!==void 0?t("p",{staticClass:"mb-0"},[e._v(" Node "+e._s(e.resultsTargetNode)+": "),t("strong",{class:e.getPowerLevelColor(s.minPowerlevelTarget)},[e._v(e._s(e.getPowerLevel(s.minPowerlevelTarget)))])]):e._e()]}}],null,!0)}):e._e()],1)],1),t("v-card-actions",[t("v-spacer"),t("v-btn",{attrs:{color:"blue darken-1",text:""},on:{click:function(s){return e.$emit("close")}}},[e._v("Close")])],1)],1)],1)},p=[],_=h(f,m,p,!1,null,null);const w=_.exports;export{w as default};
@@ -1 +1 @@
1
- import{I as n,a as r,u as l,c as o,n as c}from"./index-BJ5IKRRT.js";const d={components:{},props:{value:Boolean,node:Object,socket:Object},mixins:[n],watch:{value(i){this.init(i)}},computed:{},data(){return{running:!1,activeNode:null,isRunning:!1,mode:"Lifeline",modes:[{text:"Basic Set On/Off",value:0}],infinite:!1,interval:250,iterations:100,statistics:null,progress:0}},methods:{...r(l,["showSnackbar"]),exportResults(){this.app.exportConfiguration(this.results,`linkReliability_${this.activeNode.id}-${this.statistics}`,"json")},init(i){const t=this.running;this.mode=0,this.statistics=null,this.infinite=!1,this.running=!1,this.interval=250,this.iterations=25,this.progress=0,i?(this.activeNode=o(this.node),this.bindEvent("linkReliability",this.onProgress.bind(this))):i===!1&&(this.unbindEvents(),t&&this.abortLinkReliabilityCheck())},onProgress(i){this.statistics=i.args[0],this.progress=Math.round(this.statistics.rounds/this.iterations*100)},async abortLinkReliabilityCheck(){const i=await this.app.apiRequest("abortLinkReliabilityCheck",[this.activeNode.id]);this.running=!1,i.success&&this.showSnackbar("Link statistics aborted","success")},async checkLinkReliability(){this.running=!0;const i=await this.app.apiRequest("checkLinkReliability",[this.activeNode.id,{mode:this.mode,interval:this.interval,rounds:this.infinite?void 0:this.iterations}],{infoSnack:!0,errorSnack:!1});this.running=!1,this.progress=0,i.success?this.statistics=i.result:this.showSnackbar(i.message||"Health check failed","error")}},beforeDestroy(){this.init(!1)}};var v=function(){var a;var t=this,s=t._self._c;return s("v-dialog",{attrs:{"max-width":"800px",persistent:""},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}},[s("v-card",[s("v-card-title",[s("span",{staticClass:"headline"},[t._v("Node "+t._s(t.activeNode?t.activeNode.id:"")+" - Link Statistics")])]),s("v-card-text",[s("v-container",[s("v-row",{staticClass:"ma-3",attrs:{justify:"start"}},[s("v-col",{attrs:{cols:"12"}},[s("v-select",{staticStyle:{"max-width":"325px"},attrs:{label:"Mode",items:t.modes,"persistent-hint":""},model:{value:t.mode,callback:function(e){t.mode=e},expression:"mode"}})],1),s("v-col",{attrs:{cols:"6"}},[s("v-radio-group",{staticClass:"justify-center",model:{value:t.infinite,callback:function(e){t.infinite=e},expression:"infinite"}},[s("v-radio",{attrs:{label:"Infinite",value:!0}}),s("v-radio",{attrs:{label:"XX",value:!1},scopedSlots:t._u([{key:"label",fn:function(){return[s("v-text-field",{attrs:{disabled:t.infinite,label:"Iterations",type:"number",min:1,max:1e4,"persistent-hint":""},model:{value:t.iterations,callback:function(e){t.iterations=t._n(e)},expression:"iterations"}})]},proxy:!0}])})],1)],1),s("v-col",{staticClass:"justify-center",attrs:{cols:"6"}},[s("v-text-field",{attrs:{label:"Interval",suffix:"ms",type:"number",min:1,max:1e4,"persistent-hint":""},model:{value:t.interval,callback:function(e){t.interval=t._n(e)},expression:"interval"}})],1)],1),s("v-row",{staticClass:"mb-4",attrs:{justify:"space-around"}},[s("v-btn",{attrs:{color:"success",disabled:t.running,loading:t.running},on:{click:t.checkLinkReliability}},[t._v("Run")]),s("v-btn",{attrs:{color:"error",disabled:!t.running},on:{click:t.abortLinkReliabilityCheck}},[t._v("Stop")])],1),s("v-divider"),t.statistics?s("v-row",{staticClass:"ma-3",attrs:{justify:"center"}},[t.running?s("v-progress-linear",{attrs:{indeterminate:this.infinite,value:this.infinite?null:this.progress,color:"green darken-1"}}):t._e(),s("v-list",{attrs:{dense:""}},[s("v-list-item",[s("v-list-item-content",[s("v-list-item-title",{staticClass:"info--text"},[t._v("Commands Sent")]),s("v-list-item-subtitle",[t._v(t._s(t.statistics.commandsSent))])],1)],1),s("v-list-item",[s("v-list-item-content",[s("v-list-item-title",{staticClass:"error--text"},[t._v("Failed Commands")]),s("v-list-item-subtitle",[t._v(t._s(t.statistics.commandErrors)+" ("+t._s((t.statistics.commandErrors/t.statistics.rounds*100).toFixed(1))+" %)")])],1)],1),((a=t.statistics)==null?void 0:a.missingResponses)!=null?s("v-list-item",[s("v-list-item-content",[s("v-list-item-title",{staticClass:"error--text"},[t._v("Missing Responses")]),s("v-list-item-subtitle",[t._v(t._s(t.statistics.missingResponses)+" ("+t._s((t.statistics.missingResponses/t.statistics.commandsSent*100).toFixed(1))+" %)")])],1)],1):t._e()],1),s("v-simple-table",{scopedSlots:t._u([{key:"default",fn:function(){var e;return[s("thead",[s("tr",[s("th",{staticClass:"text-left"}),s("th",{staticClass:"text-left"},[t._v("Min")]),s("th",{staticClass:"text-left"},[t._v("Max")]),s("th",{staticClass:"text-left"},[t._v("Avg")])])]),t.statistics.latency?s("tbody",[s("tr",[s("td",[t._v("Latency [ms]")]),s("td",[t._v(t._s(t.statistics.latency.min))]),s("td",[t._v(t._s(t.statistics.latency.max))]),s("td",[t._v(" "+t._s(Math.round(t.statistics.latency.average))+" ")])]),s("tr",[s("td",[t._v("Round-Trip Time [ms]")]),s("td",[t._v(t._s(t.statistics.rtt.min))]),s("td",[t._v(t._s(t.statistics.rtt.max))]),s("td",[t._v(" "+t._s(Math.round(t.statistics.rtt.average))+" ")])]),s("tr",[s("td",[t._v("ACK RSSI [dBm]")]),s("td",[t._v(t._s(t.statistics.ackRSSI.min))]),s("td",[t._v(t._s(t.statistics.ackRSSI.max))]),s("td",[t._v(" "+t._s(Math.round(t.statistics.ackRSSI.average))+" ")])]),Number.isFinite((e=t.statistics.responseRSSI)==null?void 0:e.average)?s("tr",[s("td",[t._v("Response RSSI [dBm]")]),s("td",[t._v(" "+t._s(t.statistics.responseRSSI.min)+" ")]),s("td",[t._v(" "+t._s(t.statistics.responseRSSI.max)+" ")]),s("td",[t._v(" "+t._s(Math.round(t.statistics.responseRSSI.average))+" ")])]):t._e()]):t._e()]},proxy:!0}],null,!1,3268320747)})],1):t._e()],1)],1),s("v-card-actions",[s("v-spacer"),s("v-btn",{attrs:{color:"blue darken-1",text:""},on:{click:function(e){return t.$emit("close")}}},[t._v("Close")])],1)],1)],1)},u=[],m=c(d,v,u,!1,null,null);const _=m.exports;export{_ as default};
1
+ import{I as n,a as r,u as l,c as o,n as c}from"./index-DPngRuVO.js";const d={components:{},props:{value:Boolean,node:Object,socket:Object},mixins:[n],watch:{value(i){this.init(i)}},computed:{},data(){return{running:!1,activeNode:null,isRunning:!1,mode:"Lifeline",modes:[{text:"Basic Set On/Off",value:0}],infinite:!1,interval:250,iterations:100,statistics:null,progress:0}},methods:{...r(l,["showSnackbar"]),exportResults(){this.app.exportConfiguration(this.results,`linkReliability_${this.activeNode.id}-${this.statistics}`,"json")},init(i){const t=this.running;this.mode=0,this.statistics=null,this.infinite=!1,this.running=!1,this.interval=250,this.iterations=25,this.progress=0,i?(this.activeNode=o(this.node),this.bindEvent("linkReliability",this.onProgress.bind(this))):i===!1&&(this.unbindEvents(),t&&this.abortLinkReliabilityCheck())},onProgress(i){this.statistics=i.args[0],this.progress=Math.round(this.statistics.rounds/this.iterations*100)},async abortLinkReliabilityCheck(){const i=await this.app.apiRequest("abortLinkReliabilityCheck",[this.activeNode.id]);this.running=!1,i.success&&this.showSnackbar("Link statistics aborted","success")},async checkLinkReliability(){this.running=!0;const i=await this.app.apiRequest("checkLinkReliability",[this.activeNode.id,{mode:this.mode,interval:this.interval,rounds:this.infinite?void 0:this.iterations}],{infoSnack:!0,errorSnack:!1});this.running=!1,this.progress=0,i.success?this.statistics=i.result:this.showSnackbar(i.message||"Health check failed","error")}},beforeDestroy(){this.init(!1)}};var v=function(){var a;var t=this,s=t._self._c;return s("v-dialog",{attrs:{"max-width":"800px",persistent:""},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}},[s("v-card",[s("v-card-title",[s("span",{staticClass:"headline"},[t._v("Node "+t._s(t.activeNode?t.activeNode.id:"")+" - Link Statistics")])]),s("v-card-text",[s("v-container",[s("v-row",{staticClass:"ma-3",attrs:{justify:"start"}},[s("v-col",{attrs:{cols:"12"}},[s("v-select",{staticStyle:{"max-width":"325px"},attrs:{label:"Mode",items:t.modes,"persistent-hint":""},model:{value:t.mode,callback:function(e){t.mode=e},expression:"mode"}})],1),s("v-col",{attrs:{cols:"6"}},[s("v-radio-group",{staticClass:"justify-center",model:{value:t.infinite,callback:function(e){t.infinite=e},expression:"infinite"}},[s("v-radio",{attrs:{label:"Infinite",value:!0}}),s("v-radio",{attrs:{label:"XX",value:!1},scopedSlots:t._u([{key:"label",fn:function(){return[s("v-text-field",{attrs:{disabled:t.infinite,label:"Iterations",type:"number",min:1,max:1e4,"persistent-hint":""},model:{value:t.iterations,callback:function(e){t.iterations=t._n(e)},expression:"iterations"}})]},proxy:!0}])})],1)],1),s("v-col",{staticClass:"justify-center",attrs:{cols:"6"}},[s("v-text-field",{attrs:{label:"Interval",suffix:"ms",type:"number",min:1,max:1e4,"persistent-hint":""},model:{value:t.interval,callback:function(e){t.interval=t._n(e)},expression:"interval"}})],1)],1),s("v-row",{staticClass:"mb-4",attrs:{justify:"space-around"}},[s("v-btn",{attrs:{color:"success",disabled:t.running,loading:t.running},on:{click:t.checkLinkReliability}},[t._v("Run")]),s("v-btn",{attrs:{color:"error",disabled:!t.running},on:{click:t.abortLinkReliabilityCheck}},[t._v("Stop")])],1),s("v-divider"),t.statistics?s("v-row",{staticClass:"ma-3",attrs:{justify:"center"}},[t.running?s("v-progress-linear",{attrs:{indeterminate:this.infinite,value:this.infinite?null:this.progress,color:"green darken-1"}}):t._e(),s("v-list",{attrs:{dense:""}},[s("v-list-item",[s("v-list-item-content",[s("v-list-item-title",{staticClass:"info--text"},[t._v("Commands Sent")]),s("v-list-item-subtitle",[t._v(t._s(t.statistics.commandsSent))])],1)],1),s("v-list-item",[s("v-list-item-content",[s("v-list-item-title",{staticClass:"error--text"},[t._v("Failed Commands")]),s("v-list-item-subtitle",[t._v(t._s(t.statistics.commandErrors)+" ("+t._s((t.statistics.commandErrors/t.statistics.rounds*100).toFixed(1))+" %)")])],1)],1),((a=t.statistics)==null?void 0:a.missingResponses)!=null?s("v-list-item",[s("v-list-item-content",[s("v-list-item-title",{staticClass:"error--text"},[t._v("Missing Responses")]),s("v-list-item-subtitle",[t._v(t._s(t.statistics.missingResponses)+" ("+t._s((t.statistics.missingResponses/t.statistics.commandsSent*100).toFixed(1))+" %)")])],1)],1):t._e()],1),s("v-simple-table",{scopedSlots:t._u([{key:"default",fn:function(){var e;return[s("thead",[s("tr",[s("th",{staticClass:"text-left"}),s("th",{staticClass:"text-left"},[t._v("Min")]),s("th",{staticClass:"text-left"},[t._v("Max")]),s("th",{staticClass:"text-left"},[t._v("Avg")])])]),t.statistics.latency?s("tbody",[s("tr",[s("td",[t._v("Latency [ms]")]),s("td",[t._v(t._s(t.statistics.latency.min))]),s("td",[t._v(t._s(t.statistics.latency.max))]),s("td",[t._v(" "+t._s(Math.round(t.statistics.latency.average))+" ")])]),s("tr",[s("td",[t._v("Round-Trip Time [ms]")]),s("td",[t._v(t._s(t.statistics.rtt.min))]),s("td",[t._v(t._s(t.statistics.rtt.max))]),s("td",[t._v(" "+t._s(Math.round(t.statistics.rtt.average))+" ")])]),s("tr",[s("td",[t._v("ACK RSSI [dBm]")]),s("td",[t._v(t._s(t.statistics.ackRSSI.min))]),s("td",[t._v(t._s(t.statistics.ackRSSI.max))]),s("td",[t._v(" "+t._s(Math.round(t.statistics.ackRSSI.average))+" ")])]),Number.isFinite((e=t.statistics.responseRSSI)==null?void 0:e.average)?s("tr",[s("td",[t._v("Response RSSI [dBm]")]),s("td",[t._v(" "+t._s(t.statistics.responseRSSI.min)+" ")]),s("td",[t._v(" "+t._s(t.statistics.responseRSSI.max)+" ")]),s("td",[t._v(" "+t._s(Math.round(t.statistics.responseRSSI.average))+" ")])]):t._e()]):t._e()]},proxy:!0}],null,!1,3268320747)})],1):t._e()],1)],1),s("v-card-actions",[s("v-spacer"),s("v-btn",{attrs:{color:"blue darken-1",text:""},on:{click:function(e){return t.$emit("close")}}},[t._v("Close")])],1)],1)],1)},u=[],m=c(d,v,u,!1,null,null);const _=m.exports;export{_ as default};