"use strict";(self.webpackChunk_surecart_blocks_next=self.webpackChunk_surecart_blocks_next||[]).push([[4357],{3530:function(i,t,n){n.d(t,{i:function(){return u},m:function(){return s},z:function(){return r}});const r=["bif","byr","clp","djf","gnf","isk","jpy","kmf","krw","pyg","rwf","ugx","vnd","vuv","xaf","xag","xau","xba","xbb","xbc","xbd","xdr","xof","xpd","xpf","xpt","xts"],s=(i,t)=>u(t)?i:i/100,u=i=>{var t;return r.includes(null===(t=null==i?void 0:i.toLowerCase)||void 0===t?void 0:t.call(i))}},4357:function(i,t,n){n.r(t),n.d(t,{sc_format_number:function(){return a}});var r=n(6892),s=n(3530);const u={kg:"kilogram",lb:"pound",g:"gram",oz:"ounce"},a=class{constructor(i){(0,r.r)(this,i),this.value=0,this.locale=void 0,this.type="decimal",this.noGrouping=!1,this.currency="USD",this.currencyDisplay="symbol",this.minimumIntegerDigits=void 0,this.minimumFractionDigits=null,this.maximumFractionDigits=void 0,this.minimumSignificantDigits=void 0,this.maximumSignificantDigits=void 0,this.noConvert=void 0,this.unit="lb"}render(){if(isNaN(this.value))return"";const i=navigator.language||(null===navigator||void 0===navigator?void 0:navigator.browserLanguage)||(navigator.languages||["en"])[0],t=this.noConvert||"currency"!==this.type?this.value:(0,s.m)(this.value,this.currency.toUpperCase()),n=t%1==0?0:2;return new Intl.NumberFormat(this.locale||i,{style:this.type,currency:this.currency.toUpperCase(),currencyDisplay:this.currencyDisplay,useGrouping:!this.noGrouping,minimumIntegerDigits:this.minimumIntegerDigits,minimumFractionDigits:null!==this.minimumFractionDigits?this.minimumFractionDigits:n,maximumFractionDigits:this.maximumFractionDigits,minimumSignificantDigits:this.minimumSignificantDigits,maximumSignificantDigits:this.maximumSignificantDigits,unit:u[this.unit]}).format(t)}}}}]);