{"version":3,"file":"money.fe556b31.js","sources":["../../../../utils/money.ts"],"sourcesContent":["import currency from 'currency.js';\n\nexport function getCurrency(amount: number, options: currency.Options = {}) {\n return currency(amount, options || { fromCents: true });\n}\n\nexport function getFormattedDollars(amount: number, def: string | null = '0') {\n const num = getCurrency(amount, { fromCents: true }).dollars();\n\n return num || def;\n}\n\nexport function getFormattedCents(amount: number, def: string | null = '00') {\n const num = getCurrency(amount, { fromCents: true }).cents();\n\n return '.' + num || def;\n}\n\nexport function getFormattedMoney(amount: number, suffix = '') {\n return getCurrency(amount, { fromCents: true }).format() + suffix;\n}\n"],"names":["getCurrency","amount","options","currency","getFormattedDollars","def","getFormattedCents","getFormattedMoney","suffix"],"mappings":"8CAEO,SAASA,EAAYC,EAAgBC,EAA4B,GAAI,CAC1E,OAAOC,EAASF,EAAQC,GAAW,CAAE,UAAW,GAAM,CACxD,CAEgB,SAAAE,EAAoBH,EAAgBI,EAAqB,IAAK,CAG5E,OAFYL,EAAYC,EAAQ,CAAE,UAAW,EAAM,CAAA,EAAE,WAEvCI,CAChB,CAEgB,SAAAC,EAAkBL,EAAgBI,EAAqB,KAAM,CAG3E,MAAO,IAFKL,EAAYC,EAAQ,CAAE,UAAW,EAAM,CAAA,EAAE,SAEjCI,CACtB,CAEgB,SAAAE,EAAkBN,EAAgBO,EAAS,GAAI,CACtD,OAAAR,EAAYC,EAAQ,CAAE,UAAW,GAAM,EAAE,OAAW,EAAAO,CAC7D"}