import{d as l,a as p,b as s,o as a,Y as c,t as o}from"./index-DGnN4tUo.js";function f(n){if(n===null)return"null";const t=n.toString(),e=t.indexOf(".");if(e>=0)return`${f(t.substring(0,e))}.${t.substring(e+1)}`;if(t.length<=3)return t;const u=[];for(let r=0;r<Math.floor(t.length/3);r++){const i=t.length-(r+1)*3;u.push(t.substring(i,i+3))}return t.length%3!==0&&u.push(t.substring(0,t.length%3)),u.reverse().join(", ")}function h(n){return n===null||n.count===null||n.unit===null||n.unit.length===0?"":n.unit==="byte"?`${n.count}B`:`${n.count}${n.unit[0].toUpperCase()}i${n.unit.substring(1).toUpperCase()}`}const g={key:0},d=l({name:"BandwidthSizeCapacityView",__name:"bandwidth-size-capacity-view",props:{value:{}},setup(n){const t=n,e=p(()=>t.value!==null&&t.value.count>0&&typeof t.value.unit=="string"?{...t.value,unit:`${t.value.unit[0].toUpperCase()+t.value.unit.substring(1)}ps`}:t.value);return(u,r)=>(a(),s("span",null,[e.value!=null&&e.value.count>0?(a(),s("span",g,o(e.value.count)+o(e.value.unit),1)):c("",!0)]))}});export{d as _,h as c,f};
