/* Socket Lib - Built with esbuild */
var c=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var g=(t,r)=>{for(var e in r)c(t,e,{get:r[e],enumerable:!0})},f=(t,r,e,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of u(r))!h.call(t,o)&&o!==e&&c(t,o,{get:()=>r[o],enumerable:!(s=p(r,o))||s.enumerable});return t};var d=t=>f(c({},"__esModule",{value:!0}),t);var C={};g(C,{formatCoverage:()=>j,getCoverageEmoji:()=>m});module.exports=d(C);var a=require("../strings");const v=[{emoji:" \u{1F680}",threshold:99},{emoji:" \u{1F3AF}",threshold:95},{emoji:" \u2728",threshold:90},{emoji:" \u{1F49A}",threshold:85},{emoji:" \u2705",threshold:80},{emoji:" \u{1F7E2}",threshold:70},{emoji:" \u{1F7E1}",threshold:60},{emoji:" \u{1F528}",threshold:50},{emoji:" \u26A0\uFE0F",threshold:0}];function m(t){return v.find(({threshold:e})=>t>=e)?.emoji||""}function j(t){const r={__proto__:null,format:"default",...t},{code:e,format:s,type:o}=r;if(s==="json")return JSON.stringify({code:e,type:o},null,2);const i=F(e,o);if(s==="simple")return i;let n="";n+=`Code Coverage:
`,n+=(0,a.indentString)(`Statements: ${e.statements.percent}%
`,{count:2}),n+=(0,a.indentString)(`Branches: ${e.branches.percent}%
`,{count:2}),n+=(0,a.indentString)(`Functions: ${e.functions.percent}%
`,{count:2}),n+=(0,a.indentString)(`Lines: ${e.lines.percent}%
`,{count:2}),o&&(n+=`
Type Coverage:
`,n+=(0,a.indentString)(`${o.percent}% (${o.covered}/${o.total})
`,{count:2}));const l=m(Number.parseFloat(i));return n+=`
Overall: ${i}%${l}
`,n}function F(t,r){const e=[Number.parseFloat(t.statements.percent),Number.parseFloat(t.branches.percent),Number.parseFloat(t.functions.percent),Number.parseFloat(t.lines.percent)];return r&&e.push(Number.parseFloat(r.percent)),(e.reduce((o,i)=>o+i,0)/e.length).toFixed(2)}0&&(module.exports={formatCoverage,getCoverageEmoji});
//# sourceMappingURL=formatters.js.map
