function t(n){return n.length===0?null:u(n.reduce((e,l)=>e+l,0)/n.length)}function i(n,e,l){return{timestamp:e,latencyMs:n?.rtt??null,avgApiResponseMs:l,downlinkMbps:n?.downlink??null,uplinkMbps:null,connectionType:n?.type??null,effectiveType:n?.effectiveType??null,source:"navigator"}}function r(n,e){return{timestamp:e,latencyMs:null,avgApiResponseMs:t(n),downlinkMbps:null,uplinkMbps:null,connectionType:null,effectiveType:null,source:"derived"}}function u(n,e=2){const l=10**e;return Math.round(n*l)/l}export{r as d,i as f};
//# sourceMappingURL=chunk-D0IVzHvD.js.map
