function i(i,t,n={}){const{minimumFractionDigits:m,maximumFractionDigits:r}=n;return new Intl.NumberFormat(i,{minimumFractionDigits:m,maximumFractionDigits:r}).format(t)}function t(i,t,n={}){const{currency:m="EUR"}=n,{minimumFractionDigits:r=2,maximumFractionDigits:o=2}=n;return new Intl.NumberFormat(i,{style:"currency",currency:m,minimumFractionDigits:r,maximumFractionDigits:o}).format(t).replace("$US","$")}function n(i,t,n={}){const{minimumFractionDigits:m=1,maximumFractionDigits:r=1}=n;return new Intl.NumberFormat(i,{style:"percent",minimumFractionDigits:m,maximumFractionDigits:r}).format(t)}const m=["","k","M","G","T","P"];function r(i,t="",n=""){const r=new Intl.NumberFormat(i,{minimumFractionDigits:0,maximumFractionDigits:1});return i=>{const o=i>1?Math.floor(Math.log10(i)/3):0,a=i/1e3**o;return r.format(a)+n+m[o]+t}}const o=["","Ki","Mi","Gi","Ti","Pi"];function a(i,t,n){const m=new Intl.NumberFormat(i);return(r,a=0,c=o.length-1)=>{if(r<1024)return m.format(r)+n+t;const u=new Intl.NumberFormat(i,{minimumFractionDigits:a,maximumFractionDigits:a}),e=o.slice(0,c+1).findIndex(((i,t)=>r<1024**(t+1)||t===c)),s=r/1024**e,F=Math.trunc(s*10**a)/10**a,g=u.format(F),D=o[e];return g+n+D+t}}export{t as formatCurrency,i as formatNumber,n as formatPercent,a as prepareNumberBytesFormatter,r as prepareNumberUnitFormatter};
//# sourceMappingURL=i18n-number.js.map
