@amboras-dev/money 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +401 -2
- package/dist/ai.cjs +185 -0
- package/dist/ai.d.cts +97 -0
- package/dist/ai.d.ts +97 -0
- package/dist/ai.js +175 -0
- package/dist/allocate-CZRg4TOP.cjs +222 -0
- package/dist/allocate-X7_jAtOj.js +199 -0
- package/dist/amount-BV0O-aN8.cjs +241 -0
- package/dist/amount-BoYBMgK9.js +200 -0
- package/dist/arithmetic-BhNwisjb.js +132 -0
- package/dist/arithmetic-DjT4Kzgt.cjs +233 -0
- package/dist/billing.cjs +184 -0
- package/dist/billing.d.cts +81 -0
- package/dist/billing.d.ts +81 -0
- package/dist/billing.js +175 -0
- package/dist/commerce.cjs +536 -0
- package/dist/commerce.d.cts +293 -0
- package/dist/commerce.d.ts +293 -0
- package/dist/commerce.js +516 -0
- package/dist/format-BdPnijvn.js +99 -0
- package/dist/format-DLhno7eX.cjs +128 -0
- package/dist/fx.cjs +407 -0
- package/dist/fx.d.cts +157 -0
- package/dist/fx.d.ts +157 -0
- package/dist/fx.js +374 -0
- package/dist/index.cjs +352 -0
- package/dist/index.d.cts +300 -0
- package/dist/index.d.ts +300 -0
- package/dist/index.js +276 -0
- package/dist/input.cjs +163 -0
- package/dist/input.d.cts +203 -0
- package/dist/input.d.ts +203 -0
- package/dist/input.js +153 -0
- package/dist/iso-minor-CqkWDxHS.js +48 -0
- package/dist/iso-minor-wSwJN57T.cjs +65 -0
- package/dist/medusa-4K8N1pUc.d.cts +87 -0
- package/dist/medusa-DBXJXXvF.d.ts +87 -0
- package/dist/medusa-DqJY1qpj.js +116 -0
- package/dist/medusa-lRY9xlsf.cjs +175 -0
- package/dist/money-B-3aFjNJ.d.cts +248 -0
- package/dist/money-B-3aFjNJ.d.ts +248 -0
- package/dist/money-B3wH_Z4S.cjs +3990 -0
- package/dist/money-WhnGiI00.js +3583 -0
- package/dist/number-text-BWu67jUq.cjs +145 -0
- package/dist/number-text-DE-q4jO5.js +134 -0
- package/dist/own-D7544D3k.js +4 -0
- package/dist/own-oP9DXFWv.cjs +9 -0
- package/dist/percent-C0InC2t2.cjs +43 -0
- package/dist/percent-D1VB9xXG.js +20 -0
- package/dist/rate-CVeMii4a.cjs +217 -0
- package/dist/rate-DBPiYgT1.d.ts +63 -0
- package/dist/rate-DicStBue.js +152 -0
- package/dist/rate-tqK8ijG0.d.cts +63 -0
- package/dist/reporting-CG-ai2sM.d.cts +31 -0
- package/dist/reporting-tpGJbqYp.d.ts +31 -0
- package/dist/retail-1mu888J1.js +69 -0
- package/dist/retail-C_BPLvMj.d.cts +31 -0
- package/dist/retail-Cml8YSKg.cjs +86 -0
- package/dist/retail-DRUTTQoJ.d.ts +31 -0
- package/dist/rounding-DHBtNCHG.cjs +79 -0
- package/dist/rounding-g9rvye0k.js +50 -0
- package/dist/sql.cjs +290 -0
- package/dist/sql.d.cts +147 -0
- package/dist/sql.d.ts +147 -0
- package/dist/sql.js +271 -0
- package/dist/testing.cjs +61995 -0
- package/dist/testing.d.cts +125 -0
- package/dist/testing.d.ts +125 -0
- package/dist/testing.js +61986 -0
- package/dist/wire-Bhuut8cW.cjs +2097 -0
- package/dist/wire-CaUN9Vf_.d.ts +309 -0
- package/dist/wire-sW0yzqth.js +1888 -0
- package/dist/wire-xjYXv4go.d.cts +309 -0
- package/dist/wire.cjs +37 -0
- package/dist/wire.d.cts +2 -0
- package/dist/wire.d.ts +2 -0
- package/dist/wire.js +2 -0
- package/package.json +158 -3
|
@@ -0,0 +1,3583 @@
|
|
|
1
|
+
/** `10^n` as a bigint. The only power of ten in the package. */
|
|
2
|
+
const pow10 = (n) => 10n ** BigInt(n);
|
|
3
|
+
const GRAMMARS = {
|
|
4
|
+
scientific: /^([+-]?)(\d+)(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/,
|
|
5
|
+
plain: /^(-?)(\d+)(?:\.(\d+))?$/,
|
|
6
|
+
integer: /^(-?)(\d+)$/
|
|
7
|
+
};
|
|
8
|
+
/** Strict decimal text (see `DecimalGrammar`) as an exact Decimal. Anything else (spaces, commas, `.5`, `1.`, over `MAX_DIGITS` characters) is null. */
|
|
9
|
+
function parseDecimal(text, grammar = "scientific") {
|
|
10
|
+
if (typeof text !== "string" || text.length > 400) return null;
|
|
11
|
+
const match = GRAMMARS[grammar].exec(text);
|
|
12
|
+
if (!match) return null;
|
|
13
|
+
const [, sign, whole, fraction = "", exponentText = "0"] = match;
|
|
14
|
+
const exponent = Number(exponentText);
|
|
15
|
+
if (Math.abs(exponent) > 400) return null;
|
|
16
|
+
const units = BigInt(`${sign}${whole}${fraction}`);
|
|
17
|
+
const scale = fraction.length - exponent;
|
|
18
|
+
return scale < 0 ? {
|
|
19
|
+
units: units * pow10(-scale),
|
|
20
|
+
scale: 0
|
|
21
|
+
} : {
|
|
22
|
+
units,
|
|
23
|
+
scale
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* A number as an exact Decimal when all its digits are there: finite, and a safe integer when
|
|
28
|
+
* whole (past 2^53 the digits are already gone). Else null. The one "quotable number" rule.
|
|
29
|
+
*/
|
|
30
|
+
function strictNumberDecimal(n) {
|
|
31
|
+
return Number.isFinite(n) && (Number.isSafeInteger(n) || !Number.isInteger(n)) ? decimalFromNumber(n) : null;
|
|
32
|
+
}
|
|
33
|
+
/** Whether `d` is above zero. */
|
|
34
|
+
const isPositiveDecimal = (d) => d.units > 0n;
|
|
35
|
+
/** The exact decimal of a finite number's shortest text form (what JSON carries): 0.1 + 0.2 is 0.30000000000000004. */
|
|
36
|
+
function decimalFromNumber(n) {
|
|
37
|
+
return parseDecimal(String(n));
|
|
38
|
+
}
|
|
39
|
+
/** Fraction digits the value needs: 12.50 needs 1, 12.00 needs 0. */
|
|
40
|
+
function fractionDigitsOf(d) {
|
|
41
|
+
let { units, scale } = d;
|
|
42
|
+
while (scale > 0 && units % 10n === 0n) {
|
|
43
|
+
units /= 10n;
|
|
44
|
+
scale -= 1;
|
|
45
|
+
}
|
|
46
|
+
return scale;
|
|
47
|
+
}
|
|
48
|
+
/** `n / d` as an integer, rounded by `mode`. `d` must be positive. */
|
|
49
|
+
function divRound(n, d, mode) {
|
|
50
|
+
if (mode === "floor-after-tenth") return divRound(divRound(n * 10n, d, "half-up"), 10n, "floor");
|
|
51
|
+
const quotient = n / d;
|
|
52
|
+
const remainder = n % d;
|
|
53
|
+
if (remainder === 0n) return quotient;
|
|
54
|
+
const negative = n < 0n;
|
|
55
|
+
const awayFromZero = negative ? quotient - 1n : quotient + 1n;
|
|
56
|
+
switch (mode) {
|
|
57
|
+
case "down": return quotient;
|
|
58
|
+
case "up": return awayFromZero;
|
|
59
|
+
case "floor": return negative ? awayFromZero : quotient;
|
|
60
|
+
case "ceil": return negative ? quotient : awayFromZero;
|
|
61
|
+
case "half-up":
|
|
62
|
+
case "half-even": {
|
|
63
|
+
const twice = (negative ? -remainder : remainder) * 2n;
|
|
64
|
+
if (twice !== d) return twice > d ? awayFromZero : quotient;
|
|
65
|
+
return mode === "half-up" || quotient % 2n !== 0n ? awayFromZero : quotient;
|
|
66
|
+
}
|
|
67
|
+
default: throw new TypeError(`Unknown rounding mode: ${String(mode)}`);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
/** `d` with exactly `scale` fraction digits: exact when widening, rounded by `mode` when narrowing. */
|
|
71
|
+
function roundToScale(d, scale, mode) {
|
|
72
|
+
if (scale >= d.scale) return {
|
|
73
|
+
units: d.units * pow10(scale - d.scale),
|
|
74
|
+
scale
|
|
75
|
+
};
|
|
76
|
+
return {
|
|
77
|
+
units: divRound(d.units, pow10(d.scale - scale), mode),
|
|
78
|
+
scale
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
/** Canonical text with exactly `d.scale` fraction digits: `-12.50`, `0.00`, `7`. Never `-0`. */
|
|
82
|
+
function formatDecimal(d) {
|
|
83
|
+
const negative = d.units < 0n;
|
|
84
|
+
const digits = (negative ? -d.units : d.units).toString().padStart(d.scale + 1, "0");
|
|
85
|
+
const cut = digits.length - d.scale;
|
|
86
|
+
const fraction = d.scale > 0 ? `.${digits.slice(cut)}` : "";
|
|
87
|
+
return `${negative ? "-" : ""}${digits.slice(0, cut)}${fraction}`;
|
|
88
|
+
}
|
|
89
|
+
/** `d` with no trailing fraction zeros (12.50 becomes 12.5 at scale 1). */
|
|
90
|
+
function normalizeDecimal(d) {
|
|
91
|
+
return roundToScale(d, fractionDigitsOf(d), "down");
|
|
92
|
+
}
|
|
93
|
+
/** The canonical DecimalText of `d`: `'-12.5'`, `'0'`, `'1200'`. */
|
|
94
|
+
function toDecimalText(d) {
|
|
95
|
+
return formatDecimal(normalizeDecimal(d));
|
|
96
|
+
}
|
|
97
|
+
/** `a` and `b` widened to their common scale (exact). */
|
|
98
|
+
function aligned(a, b) {
|
|
99
|
+
const scale = Math.max(a.scale, b.scale);
|
|
100
|
+
return [
|
|
101
|
+
roundToScale(a, scale, "down").units,
|
|
102
|
+
roundToScale(b, scale, "down").units,
|
|
103
|
+
scale
|
|
104
|
+
];
|
|
105
|
+
}
|
|
106
|
+
/** `a + b`, exactly, at their common scale. */
|
|
107
|
+
function addDecimal(a, b) {
|
|
108
|
+
const [x, y, scale] = aligned(a, b);
|
|
109
|
+
return {
|
|
110
|
+
units: x + y,
|
|
111
|
+
scale
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
/** `a x b`, exactly. */
|
|
115
|
+
function multiplyDecimal(a, b) {
|
|
116
|
+
return {
|
|
117
|
+
units: a.units * b.units,
|
|
118
|
+
scale: a.scale + b.scale
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
/** `-1`, `0` or `1` as `a` is below, equal to or above `b`, exactly. */
|
|
122
|
+
function compareDecimal(a, b) {
|
|
123
|
+
const [x, y] = aligned(a, b);
|
|
124
|
+
return x < y ? -1 : x > y ? 1 : 0;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* capability-kit's float-noise bound, kept exactly: a number whose decimal text has
|
|
128
|
+
* too many digits is still accepted when it is within float noise of an allowed
|
|
129
|
+
* amount (0.1 + 0.2). The bound is absolute, so a real extra digit is never rounded
|
|
130
|
+
* away however large the amount.
|
|
131
|
+
*/
|
|
132
|
+
function withinFloatNoise(major, digits) {
|
|
133
|
+
const inDigits = major * 10 ** digits;
|
|
134
|
+
return Math.abs(inDigits - Math.round(inDigits)) <= Math.min(8 * Number.EPSILON * Math.max(1, Math.abs(inDigits)), 1e-6);
|
|
135
|
+
}
|
|
136
|
+
/** Whether `|d.units|` is at most `limit`. */
|
|
137
|
+
function unitsWithin(d, limit) {
|
|
138
|
+
return (d.units < 0n ? -d.units : d.units) <= limit;
|
|
139
|
+
}
|
|
140
|
+
//#endregion
|
|
141
|
+
//#region src/errors.ts
|
|
142
|
+
/** The one error this package throws for bad money input. Check `code`, not the message. */
|
|
143
|
+
var MoneyError = class extends Error {
|
|
144
|
+
constructor(code, message, options = {}) {
|
|
145
|
+
super(options.field ? `${options.field}: ${message}` : message);
|
|
146
|
+
this.name = "MoneyError";
|
|
147
|
+
this.code = code;
|
|
148
|
+
if (options.field) this.field = options.field;
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
/** A value as it appears in an error message. Never throws, whatever it is given. */
|
|
152
|
+
function describeValue(value) {
|
|
153
|
+
if (typeof value === "string") return JSON.stringify(value);
|
|
154
|
+
try {
|
|
155
|
+
return String(value);
|
|
156
|
+
} catch {
|
|
157
|
+
return Object.prototype.toString.call(value);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
//#endregion
|
|
161
|
+
//#region src/internal/rational.ts
|
|
162
|
+
/** `a x b / c` rounded by `mode`. `c` must not be zero; its sign is folded into the numerator. */
|
|
163
|
+
function mulDiv(a, b, c, mode) {
|
|
164
|
+
if (c === 0n) throw new RangeError("mulDiv: division by zero");
|
|
165
|
+
return c < 0n ? divRound(-(a * b), -c, mode) : divRound(a * b, c, mode);
|
|
166
|
+
}
|
|
167
|
+
/** `n / d` with `digits` fraction digits, rounded once by `mode` (default half-up). */
|
|
168
|
+
function ratioToDecimal(n, d, digits, mode = "half-up") {
|
|
169
|
+
return {
|
|
170
|
+
units: mulDiv(n, pow10(digits), d, mode),
|
|
171
|
+
scale: digits
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
/** `-1`, `0` or `1` as `an / ad` is below, equal to or above `bn / bd`. Denominators must not be zero. */
|
|
175
|
+
function compareRatio(an, ad, bn, bd) {
|
|
176
|
+
if (ad === 0n || bd === 0n) throw new RangeError("compareRatio: zero denominator");
|
|
177
|
+
const left = (ad < 0n ? -an : an) * (bd < 0n ? -bd : bd);
|
|
178
|
+
const right = (bd < 0n ? -bn : bn) * (ad < 0n ? -ad : ad);
|
|
179
|
+
return left < right ? -1 : left > right ? 1 : 0;
|
|
180
|
+
}
|
|
181
|
+
/** Greatest common divisor of `|a|` and `|b|` (`gcd(0, 0)` is 0). */
|
|
182
|
+
function gcd(a, b) {
|
|
183
|
+
let x = a < 0n ? -a : a;
|
|
184
|
+
let y = b < 0n ? -b : b;
|
|
185
|
+
while (y !== 0n) [x, y] = [y, x % y];
|
|
186
|
+
return x;
|
|
187
|
+
}
|
|
188
|
+
//#endregion
|
|
189
|
+
//#region src/decimal-text.ts
|
|
190
|
+
/**
|
|
191
|
+
* Internal: `input` as an exact Decimal. Text must be plain decimal (`'-12.50'`, `'7'`):
|
|
192
|
+
* no blank, whitespace, exponent, hex, `'.5'` or `'1.'` (`parse`). Numbers are taken by
|
|
193
|
+
* their shortest text and must be finite; bigints are exact; anything else is
|
|
194
|
+
* `amount_invalid`, as is a negative value when `signed` is false.
|
|
195
|
+
*/
|
|
196
|
+
function decimalOf(input, signed = true, field) {
|
|
197
|
+
let value;
|
|
198
|
+
if (typeof input === "string") {
|
|
199
|
+
const parsed = parseDecimal(input, "plain");
|
|
200
|
+
if (!parsed) throw new MoneyError("parse", `Not a decimal: ${describeValue(input)}`, { field });
|
|
201
|
+
value = parsed;
|
|
202
|
+
} else if (typeof input === "number" && Number.isFinite(input)) value = decimalFromNumber(input);
|
|
203
|
+
else if (typeof input === "bigint") value = {
|
|
204
|
+
units: input,
|
|
205
|
+
scale: 0
|
|
206
|
+
};
|
|
207
|
+
else throw new MoneyError("amount_invalid", `Not a finite decimal: ${describeValue(input)}`, { field });
|
|
208
|
+
if (!signed && value.units < 0n) throw new MoneyError("amount_invalid", `Must not be negative: ${describeValue(input)}`, { field });
|
|
209
|
+
return value;
|
|
210
|
+
}
|
|
211
|
+
/** Canonical DecimalText of `input` (`'4300.00'` gives `'4300'`, `0.1 + 0.2` gives `'0.30000000000000004'`). See `decimalOf` for what is refused. */
|
|
212
|
+
function parseDecimalText(input, options = {}) {
|
|
213
|
+
return toDecimalText(decimalOf(input, options.signed ?? true));
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* THE storage-literal grammar: `parseDecimal`'s `'plain'` text (decimal, optional fraction,
|
|
217
|
+
* no exponent, at most `MAX_DIGITS` characters). `signed` (default false) allows a leading
|
|
218
|
+
* `-`; `leadingZeros: false` refuses `'04300'`.
|
|
219
|
+
* `{ leadingZeros: false }` is AMOUNT_COLUMN_LITERAL, `{}` STORAGE_AMOUNT_LITERAL,
|
|
220
|
+
* `{ signed: true }` the oracle / iyzico / Authorize.Net grammar.
|
|
221
|
+
*/
|
|
222
|
+
function isDecimalLiteral(text, options = {}) {
|
|
223
|
+
if (typeof text !== "string" || parseDecimal(text, "plain") === null) return false;
|
|
224
|
+
const negative = text.startsWith("-");
|
|
225
|
+
if (negative && !options.signed) return false;
|
|
226
|
+
const digits = negative ? text.slice(1) : text;
|
|
227
|
+
return options.leadingZeros !== false || digits[0] !== "0" || digits.length === 1 || digits[1] === ".";
|
|
228
|
+
}
|
|
229
|
+
/** Throws `amount_invalid` unless `value` is an unsigned decimal literal without leading zeros (the seam ledger rule). */
|
|
230
|
+
function assertDecimalLiteral(value, label) {
|
|
231
|
+
if (!isDecimalLiteral(value, { leadingZeros: false })) throw new MoneyError("amount_invalid", `${label} must be a non-negative decimal storage literal, got ${typeof value === "string" ? `'${value}'` : typeof value}`);
|
|
232
|
+
}
|
|
233
|
+
/** Drops trailing fraction zeros and a trailing `.` (`'12.500'` gives `'12.5'`, `'12.00'` gives `'12'`). Text without a `.` is unchanged. */
|
|
234
|
+
function trimDecimalZeros(text) {
|
|
235
|
+
return text.includes(".") ? text.replace(/0+$/, "").replace(/\.$/, "") : text;
|
|
236
|
+
}
|
|
237
|
+
/** The exact sum (`[]` gives `'0'`). */
|
|
238
|
+
function decimalSum(values) {
|
|
239
|
+
let total = {
|
|
240
|
+
units: 0n,
|
|
241
|
+
scale: 0
|
|
242
|
+
};
|
|
243
|
+
for (const value of values) total = addDecimal(total, decimalOf(value));
|
|
244
|
+
return toDecimalText(total);
|
|
245
|
+
}
|
|
246
|
+
/** `a - b`, exactly. */
|
|
247
|
+
function decimalSubtract(a, b) {
|
|
248
|
+
const [x, y, scale] = aligned(decimalOf(a), decimalOf(b));
|
|
249
|
+
return toDecimalText({
|
|
250
|
+
units: x - y,
|
|
251
|
+
scale
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
/** `a x b`, exactly. */
|
|
255
|
+
function decimalMultiply(a, b) {
|
|
256
|
+
return toDecimalText(multiplyDecimal(decimalOf(a), decimalOf(b)));
|
|
257
|
+
}
|
|
258
|
+
function checkScale(scale) {
|
|
259
|
+
if (!Number.isSafeInteger(scale) || scale < 0 || scale > 100) throw new MoneyError("amount_invalid", `scale must be an integer from 0 to 100, got ${describeValue(scale)}`);
|
|
260
|
+
return scale;
|
|
261
|
+
}
|
|
262
|
+
/** `a / b` rounded once to `scale` fraction digits (`rounding` default half-up). `b` = 0 throws `amount_invalid`. */
|
|
263
|
+
function decimalDivide(a, b, options) {
|
|
264
|
+
const scale = checkScale(options.scale);
|
|
265
|
+
const x = decimalOf(a);
|
|
266
|
+
const y = decimalOf(b);
|
|
267
|
+
if (y.units === 0n) throw new MoneyError("amount_invalid", "Division by zero");
|
|
268
|
+
const rounding = options.rounding ?? "half-up";
|
|
269
|
+
return toDecimalText(ratioToDecimal(x.units * pow10(y.scale), y.units * pow10(x.scale), scale, rounding));
|
|
270
|
+
}
|
|
271
|
+
/** `a` rounded to `scale` fraction digits (`rounding` default half-up). */
|
|
272
|
+
function decimalRound(a, options) {
|
|
273
|
+
return toDecimalText(roundToScale(decimalOf(a), checkScale(options.scale), options.rounding ?? "half-up"));
|
|
274
|
+
}
|
|
275
|
+
/** `-1`, `0` or `1` as `a` is below, equal to or above `b`. */
|
|
276
|
+
function decimalCompare(a, b) {
|
|
277
|
+
return compareDecimal(decimalOf(a), decimalOf(b));
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* Whether `a` and `b` are the same decimal, exactly (`'43.0'` equals `'43.00'` and `43`). Takes what
|
|
281
|
+
* `decimalCompare` takes, but never throws: anything that is not plain decimal text, a finite number
|
|
282
|
+
* or a bigint is never equal, not even to itself.
|
|
283
|
+
*/
|
|
284
|
+
function decimalEquals(a, b) {
|
|
285
|
+
try {
|
|
286
|
+
return compareDecimal(decimalOf(a), decimalOf(b)) === 0;
|
|
287
|
+
} catch {
|
|
288
|
+
return false;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
/** `a` limited to `[min, max]` (either bound optional). `min` above `max` throws `amount_invalid`. */
|
|
292
|
+
function decimalClamp(a, bounds) {
|
|
293
|
+
const value = decimalOf(a);
|
|
294
|
+
const min = bounds.min === void 0 ? void 0 : decimalOf(bounds.min);
|
|
295
|
+
const max = bounds.max === void 0 ? void 0 : decimalOf(bounds.max);
|
|
296
|
+
if (min && max && compareDecimal(min, max) > 0) throw new MoneyError("amount_invalid", `Clamp bounds are reversed: ${bounds.min} > ${bounds.max}`);
|
|
297
|
+
if (min && compareDecimal(value, min) < 0) return toDecimalText(min);
|
|
298
|
+
if (max && compareDecimal(value, max) > 0) return toDecimalText(max);
|
|
299
|
+
return toDecimalText(value);
|
|
300
|
+
}
|
|
301
|
+
/** `|a - b| <= tolerance` (`<` with `inclusive: false`). A negative tolerance throws `amount_invalid`. */
|
|
302
|
+
function decimalWithin(a, b, tolerance, options = {}) {
|
|
303
|
+
const limit = decimalOf(tolerance, false);
|
|
304
|
+
const [x, y, scale] = aligned(decimalOf(a), decimalOf(b));
|
|
305
|
+
const gap = compareDecimal({
|
|
306
|
+
units: x > y ? x - y : y - x,
|
|
307
|
+
scale
|
|
308
|
+
}, limit);
|
|
309
|
+
return options.inclusive === false ? gap < 0 : gap <= 0;
|
|
310
|
+
}
|
|
311
|
+
//#endregion
|
|
312
|
+
//#region src/data/currencies.ts
|
|
313
|
+
const CURRENCY_ROWS = [
|
|
314
|
+
{
|
|
315
|
+
code: "AED",
|
|
316
|
+
name: "United Arab Emirates Dirham",
|
|
317
|
+
symbol: "AED",
|
|
318
|
+
narrowSymbol: "AED",
|
|
319
|
+
symbolIsAmbiguous: false,
|
|
320
|
+
numericCode: "784",
|
|
321
|
+
status: "active",
|
|
322
|
+
replacedBy: null,
|
|
323
|
+
storageScale: 100,
|
|
324
|
+
storageDigits: 2,
|
|
325
|
+
displayDigits: 2,
|
|
326
|
+
medusaDigits: 2,
|
|
327
|
+
symbolAliases: [
|
|
328
|
+
"AED",
|
|
329
|
+
"د.إ",
|
|
330
|
+
"Dhs"
|
|
331
|
+
],
|
|
332
|
+
localeHint: null,
|
|
333
|
+
commaDecimal: false
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
code: "AFN",
|
|
337
|
+
name: "Afghan Afghani",
|
|
338
|
+
symbol: "AFN",
|
|
339
|
+
narrowSymbol: "؋",
|
|
340
|
+
symbolIsAmbiguous: false,
|
|
341
|
+
numericCode: "971",
|
|
342
|
+
status: "active",
|
|
343
|
+
replacedBy: null,
|
|
344
|
+
storageScale: 100,
|
|
345
|
+
storageDigits: 2,
|
|
346
|
+
displayDigits: 0,
|
|
347
|
+
medusaDigits: 0,
|
|
348
|
+
symbolAliases: [],
|
|
349
|
+
localeHint: null,
|
|
350
|
+
commaDecimal: false
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
code: "ALL",
|
|
354
|
+
name: "Albanian Lek",
|
|
355
|
+
symbol: "ALL",
|
|
356
|
+
narrowSymbol: "ALL",
|
|
357
|
+
symbolIsAmbiguous: false,
|
|
358
|
+
numericCode: "008",
|
|
359
|
+
status: "active",
|
|
360
|
+
replacedBy: null,
|
|
361
|
+
storageScale: 100,
|
|
362
|
+
storageDigits: 2,
|
|
363
|
+
displayDigits: 0,
|
|
364
|
+
medusaDigits: 0,
|
|
365
|
+
symbolAliases: [],
|
|
366
|
+
localeHint: null,
|
|
367
|
+
commaDecimal: false
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
code: "AMD",
|
|
371
|
+
name: "Armenian Dram",
|
|
372
|
+
symbol: "AMD",
|
|
373
|
+
narrowSymbol: "֏",
|
|
374
|
+
symbolIsAmbiguous: false,
|
|
375
|
+
numericCode: "051",
|
|
376
|
+
status: "active",
|
|
377
|
+
replacedBy: null,
|
|
378
|
+
storageScale: 100,
|
|
379
|
+
storageDigits: 2,
|
|
380
|
+
displayDigits: 2,
|
|
381
|
+
medusaDigits: 0,
|
|
382
|
+
symbolAliases: [],
|
|
383
|
+
localeHint: null,
|
|
384
|
+
commaDecimal: false
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
code: "ANG",
|
|
388
|
+
name: "Netherlands Antillean Guilder",
|
|
389
|
+
symbol: "ANG",
|
|
390
|
+
narrowSymbol: "ANG",
|
|
391
|
+
symbolIsAmbiguous: false,
|
|
392
|
+
numericCode: "532",
|
|
393
|
+
status: "historic",
|
|
394
|
+
replacedBy: "XCG",
|
|
395
|
+
storageScale: 100,
|
|
396
|
+
storageDigits: 2,
|
|
397
|
+
displayDigits: 2,
|
|
398
|
+
medusaDigits: 2,
|
|
399
|
+
symbolAliases: [],
|
|
400
|
+
localeHint: null,
|
|
401
|
+
commaDecimal: false
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
code: "AOA",
|
|
405
|
+
name: "Angolan Kwanza",
|
|
406
|
+
symbol: "AOA",
|
|
407
|
+
narrowSymbol: "Kz",
|
|
408
|
+
symbolIsAmbiguous: false,
|
|
409
|
+
numericCode: "973",
|
|
410
|
+
status: "active",
|
|
411
|
+
replacedBy: null,
|
|
412
|
+
storageScale: 100,
|
|
413
|
+
storageDigits: 2,
|
|
414
|
+
displayDigits: 2,
|
|
415
|
+
medusaDigits: 2,
|
|
416
|
+
symbolAliases: [],
|
|
417
|
+
localeHint: null,
|
|
418
|
+
commaDecimal: false
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
code: "ARS",
|
|
422
|
+
name: "Argentine Peso",
|
|
423
|
+
symbol: "ARS",
|
|
424
|
+
narrowSymbol: "$",
|
|
425
|
+
symbolIsAmbiguous: true,
|
|
426
|
+
numericCode: "032",
|
|
427
|
+
status: "active",
|
|
428
|
+
replacedBy: null,
|
|
429
|
+
storageScale: 100,
|
|
430
|
+
storageDigits: 2,
|
|
431
|
+
displayDigits: 2,
|
|
432
|
+
medusaDigits: 2,
|
|
433
|
+
symbolAliases: ["$", "AR$"],
|
|
434
|
+
localeHint: null,
|
|
435
|
+
commaDecimal: false
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
code: "AUD",
|
|
439
|
+
name: "Australian Dollar",
|
|
440
|
+
symbol: "A$",
|
|
441
|
+
narrowSymbol: "$",
|
|
442
|
+
symbolIsAmbiguous: true,
|
|
443
|
+
numericCode: "036",
|
|
444
|
+
status: "active",
|
|
445
|
+
replacedBy: null,
|
|
446
|
+
storageScale: 100,
|
|
447
|
+
storageDigits: 2,
|
|
448
|
+
displayDigits: 2,
|
|
449
|
+
medusaDigits: 2,
|
|
450
|
+
symbolAliases: [
|
|
451
|
+
"$",
|
|
452
|
+
"A$",
|
|
453
|
+
"AU$"
|
|
454
|
+
],
|
|
455
|
+
localeHint: null,
|
|
456
|
+
commaDecimal: false
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
code: "AWG",
|
|
460
|
+
name: "Aruban Florin",
|
|
461
|
+
symbol: "AWG",
|
|
462
|
+
narrowSymbol: "AWG",
|
|
463
|
+
symbolIsAmbiguous: false,
|
|
464
|
+
numericCode: "533",
|
|
465
|
+
status: "active",
|
|
466
|
+
replacedBy: null,
|
|
467
|
+
storageScale: 100,
|
|
468
|
+
storageDigits: 2,
|
|
469
|
+
displayDigits: 2,
|
|
470
|
+
medusaDigits: 2,
|
|
471
|
+
symbolAliases: [],
|
|
472
|
+
localeHint: null,
|
|
473
|
+
commaDecimal: false
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
code: "AZN",
|
|
477
|
+
name: "Azerbaijani Manat",
|
|
478
|
+
symbol: "AZN",
|
|
479
|
+
narrowSymbol: "₼",
|
|
480
|
+
symbolIsAmbiguous: false,
|
|
481
|
+
numericCode: "944",
|
|
482
|
+
status: "active",
|
|
483
|
+
replacedBy: null,
|
|
484
|
+
storageScale: 100,
|
|
485
|
+
storageDigits: 2,
|
|
486
|
+
displayDigits: 2,
|
|
487
|
+
medusaDigits: 2,
|
|
488
|
+
symbolAliases: [],
|
|
489
|
+
localeHint: null,
|
|
490
|
+
commaDecimal: false
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
code: "BAM",
|
|
494
|
+
name: "Bosnia-Herzegovina Convertible Mark",
|
|
495
|
+
symbol: "BAM",
|
|
496
|
+
narrowSymbol: "KM",
|
|
497
|
+
symbolIsAmbiguous: false,
|
|
498
|
+
numericCode: "977",
|
|
499
|
+
status: "active",
|
|
500
|
+
replacedBy: null,
|
|
501
|
+
storageScale: 100,
|
|
502
|
+
storageDigits: 2,
|
|
503
|
+
displayDigits: 2,
|
|
504
|
+
medusaDigits: 2,
|
|
505
|
+
symbolAliases: [],
|
|
506
|
+
localeHint: null,
|
|
507
|
+
commaDecimal: false
|
|
508
|
+
},
|
|
509
|
+
{
|
|
510
|
+
code: "BBD",
|
|
511
|
+
name: "Barbadian Dollar",
|
|
512
|
+
symbol: "BBD",
|
|
513
|
+
narrowSymbol: "$",
|
|
514
|
+
symbolIsAmbiguous: true,
|
|
515
|
+
numericCode: "052",
|
|
516
|
+
status: "active",
|
|
517
|
+
replacedBy: null,
|
|
518
|
+
storageScale: 100,
|
|
519
|
+
storageDigits: 2,
|
|
520
|
+
displayDigits: 2,
|
|
521
|
+
medusaDigits: 2,
|
|
522
|
+
symbolAliases: [],
|
|
523
|
+
localeHint: null,
|
|
524
|
+
commaDecimal: false
|
|
525
|
+
},
|
|
526
|
+
{
|
|
527
|
+
code: "BDT",
|
|
528
|
+
name: "Bangladeshi Taka",
|
|
529
|
+
symbol: "BDT",
|
|
530
|
+
narrowSymbol: "৳",
|
|
531
|
+
symbolIsAmbiguous: false,
|
|
532
|
+
numericCode: "050",
|
|
533
|
+
status: "active",
|
|
534
|
+
replacedBy: null,
|
|
535
|
+
storageScale: 100,
|
|
536
|
+
storageDigits: 2,
|
|
537
|
+
displayDigits: 2,
|
|
538
|
+
medusaDigits: 2,
|
|
539
|
+
symbolAliases: ["৳", "Tk"],
|
|
540
|
+
localeHint: null,
|
|
541
|
+
commaDecimal: false
|
|
542
|
+
},
|
|
543
|
+
{
|
|
544
|
+
code: "BGN",
|
|
545
|
+
name: "Bulgarian Lev",
|
|
546
|
+
symbol: "BGN",
|
|
547
|
+
narrowSymbol: "BGN",
|
|
548
|
+
symbolIsAmbiguous: false,
|
|
549
|
+
numericCode: "975",
|
|
550
|
+
status: "historic",
|
|
551
|
+
replacedBy: "EUR",
|
|
552
|
+
storageScale: 100,
|
|
553
|
+
storageDigits: 2,
|
|
554
|
+
displayDigits: 2,
|
|
555
|
+
medusaDigits: 2,
|
|
556
|
+
symbolAliases: ["лв", "lv"],
|
|
557
|
+
localeHint: "bg-BG",
|
|
558
|
+
commaDecimal: false
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
code: "BHD",
|
|
562
|
+
name: "Bahraini Dinar",
|
|
563
|
+
symbol: "BHD",
|
|
564
|
+
narrowSymbol: "BHD",
|
|
565
|
+
symbolIsAmbiguous: false,
|
|
566
|
+
numericCode: "048",
|
|
567
|
+
status: "active",
|
|
568
|
+
replacedBy: null,
|
|
569
|
+
storageScale: 1e3,
|
|
570
|
+
storageDigits: 3,
|
|
571
|
+
displayDigits: 3,
|
|
572
|
+
medusaDigits: 3,
|
|
573
|
+
symbolAliases: [],
|
|
574
|
+
localeHint: null,
|
|
575
|
+
commaDecimal: false
|
|
576
|
+
},
|
|
577
|
+
{
|
|
578
|
+
code: "BIF",
|
|
579
|
+
name: "Burundian Franc",
|
|
580
|
+
symbol: "BIF",
|
|
581
|
+
narrowSymbol: "BIF",
|
|
582
|
+
symbolIsAmbiguous: false,
|
|
583
|
+
numericCode: "108",
|
|
584
|
+
status: "active",
|
|
585
|
+
replacedBy: null,
|
|
586
|
+
storageScale: 100,
|
|
587
|
+
storageDigits: 0,
|
|
588
|
+
displayDigits: 0,
|
|
589
|
+
medusaDigits: 0,
|
|
590
|
+
symbolAliases: [],
|
|
591
|
+
localeHint: null,
|
|
592
|
+
commaDecimal: false
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
code: "BMD",
|
|
596
|
+
name: "Bermudan Dollar",
|
|
597
|
+
symbol: "BMD",
|
|
598
|
+
narrowSymbol: "$",
|
|
599
|
+
symbolIsAmbiguous: true,
|
|
600
|
+
numericCode: "060",
|
|
601
|
+
status: "active",
|
|
602
|
+
replacedBy: null,
|
|
603
|
+
storageScale: 100,
|
|
604
|
+
storageDigits: 2,
|
|
605
|
+
displayDigits: 2,
|
|
606
|
+
medusaDigits: 2,
|
|
607
|
+
symbolAliases: [],
|
|
608
|
+
localeHint: null,
|
|
609
|
+
commaDecimal: false
|
|
610
|
+
},
|
|
611
|
+
{
|
|
612
|
+
code: "BND",
|
|
613
|
+
name: "Brunei Dollar",
|
|
614
|
+
symbol: "BND",
|
|
615
|
+
narrowSymbol: "$",
|
|
616
|
+
symbolIsAmbiguous: true,
|
|
617
|
+
numericCode: "096",
|
|
618
|
+
status: "active",
|
|
619
|
+
replacedBy: null,
|
|
620
|
+
storageScale: 100,
|
|
621
|
+
storageDigits: 2,
|
|
622
|
+
displayDigits: 2,
|
|
623
|
+
medusaDigits: 2,
|
|
624
|
+
symbolAliases: [],
|
|
625
|
+
localeHint: null,
|
|
626
|
+
commaDecimal: false
|
|
627
|
+
},
|
|
628
|
+
{
|
|
629
|
+
code: "BOB",
|
|
630
|
+
name: "Bolivian Boliviano",
|
|
631
|
+
symbol: "BOB",
|
|
632
|
+
narrowSymbol: "Bs",
|
|
633
|
+
symbolIsAmbiguous: false,
|
|
634
|
+
numericCode: "068",
|
|
635
|
+
status: "active",
|
|
636
|
+
replacedBy: null,
|
|
637
|
+
storageScale: 100,
|
|
638
|
+
storageDigits: 2,
|
|
639
|
+
displayDigits: 2,
|
|
640
|
+
medusaDigits: 2,
|
|
641
|
+
symbolAliases: [],
|
|
642
|
+
localeHint: null,
|
|
643
|
+
commaDecimal: false
|
|
644
|
+
},
|
|
645
|
+
{
|
|
646
|
+
code: "BRL",
|
|
647
|
+
name: "Brazilian Real",
|
|
648
|
+
symbol: "R$",
|
|
649
|
+
narrowSymbol: "R$",
|
|
650
|
+
symbolIsAmbiguous: false,
|
|
651
|
+
numericCode: "986",
|
|
652
|
+
status: "active",
|
|
653
|
+
replacedBy: null,
|
|
654
|
+
storageScale: 100,
|
|
655
|
+
storageDigits: 2,
|
|
656
|
+
displayDigits: 2,
|
|
657
|
+
medusaDigits: 2,
|
|
658
|
+
symbolAliases: ["R$"],
|
|
659
|
+
localeHint: "pt-BR",
|
|
660
|
+
commaDecimal: false
|
|
661
|
+
},
|
|
662
|
+
{
|
|
663
|
+
code: "BSD",
|
|
664
|
+
name: "Bahamian Dollar",
|
|
665
|
+
symbol: "BSD",
|
|
666
|
+
narrowSymbol: "$",
|
|
667
|
+
symbolIsAmbiguous: true,
|
|
668
|
+
numericCode: "044",
|
|
669
|
+
status: "active",
|
|
670
|
+
replacedBy: null,
|
|
671
|
+
storageScale: 100,
|
|
672
|
+
storageDigits: 2,
|
|
673
|
+
displayDigits: 2,
|
|
674
|
+
medusaDigits: 2,
|
|
675
|
+
symbolAliases: [],
|
|
676
|
+
localeHint: null,
|
|
677
|
+
commaDecimal: false
|
|
678
|
+
},
|
|
679
|
+
{
|
|
680
|
+
code: "BTN",
|
|
681
|
+
name: "Bhutanese Ngultrum",
|
|
682
|
+
symbol: "BTN",
|
|
683
|
+
narrowSymbol: "BTN",
|
|
684
|
+
symbolIsAmbiguous: false,
|
|
685
|
+
numericCode: "064",
|
|
686
|
+
status: "active",
|
|
687
|
+
replacedBy: null,
|
|
688
|
+
storageScale: 100,
|
|
689
|
+
storageDigits: 2,
|
|
690
|
+
displayDigits: 2,
|
|
691
|
+
medusaDigits: 2,
|
|
692
|
+
symbolAliases: [],
|
|
693
|
+
localeHint: null,
|
|
694
|
+
commaDecimal: false
|
|
695
|
+
},
|
|
696
|
+
{
|
|
697
|
+
code: "BWP",
|
|
698
|
+
name: "Botswanan Pula",
|
|
699
|
+
symbol: "BWP",
|
|
700
|
+
narrowSymbol: "P",
|
|
701
|
+
symbolIsAmbiguous: false,
|
|
702
|
+
numericCode: "072",
|
|
703
|
+
status: "active",
|
|
704
|
+
replacedBy: null,
|
|
705
|
+
storageScale: 100,
|
|
706
|
+
storageDigits: 2,
|
|
707
|
+
displayDigits: 2,
|
|
708
|
+
medusaDigits: 2,
|
|
709
|
+
symbolAliases: [],
|
|
710
|
+
localeHint: null,
|
|
711
|
+
commaDecimal: false
|
|
712
|
+
},
|
|
713
|
+
{
|
|
714
|
+
code: "BYN",
|
|
715
|
+
name: "Belarusian Ruble",
|
|
716
|
+
symbol: "BYN",
|
|
717
|
+
narrowSymbol: "BYN",
|
|
718
|
+
symbolIsAmbiguous: false,
|
|
719
|
+
numericCode: null,
|
|
720
|
+
status: "active",
|
|
721
|
+
replacedBy: null,
|
|
722
|
+
storageScale: 100,
|
|
723
|
+
storageDigits: 2,
|
|
724
|
+
displayDigits: 2,
|
|
725
|
+
medusaDigits: 2,
|
|
726
|
+
symbolAliases: [],
|
|
727
|
+
localeHint: null,
|
|
728
|
+
commaDecimal: false
|
|
729
|
+
},
|
|
730
|
+
{
|
|
731
|
+
code: "BYR",
|
|
732
|
+
name: "Belarusian Ruble (2000–2016)",
|
|
733
|
+
symbol: "BYR",
|
|
734
|
+
narrowSymbol: "BYR",
|
|
735
|
+
symbolIsAmbiguous: false,
|
|
736
|
+
numericCode: "974",
|
|
737
|
+
status: "historic",
|
|
738
|
+
replacedBy: "BYN",
|
|
739
|
+
storageScale: 100,
|
|
740
|
+
storageDigits: 2,
|
|
741
|
+
displayDigits: 2,
|
|
742
|
+
medusaDigits: 2,
|
|
743
|
+
symbolAliases: [],
|
|
744
|
+
localeHint: null,
|
|
745
|
+
commaDecimal: false
|
|
746
|
+
},
|
|
747
|
+
{
|
|
748
|
+
code: "BZD",
|
|
749
|
+
name: "Belize Dollar",
|
|
750
|
+
symbol: "BZD",
|
|
751
|
+
narrowSymbol: "$",
|
|
752
|
+
symbolIsAmbiguous: true,
|
|
753
|
+
numericCode: "084",
|
|
754
|
+
status: "active",
|
|
755
|
+
replacedBy: null,
|
|
756
|
+
storageScale: 100,
|
|
757
|
+
storageDigits: 2,
|
|
758
|
+
displayDigits: 2,
|
|
759
|
+
medusaDigits: 2,
|
|
760
|
+
symbolAliases: [],
|
|
761
|
+
localeHint: null,
|
|
762
|
+
commaDecimal: false
|
|
763
|
+
},
|
|
764
|
+
{
|
|
765
|
+
code: "CAD",
|
|
766
|
+
name: "Canadian Dollar",
|
|
767
|
+
symbol: "CA$",
|
|
768
|
+
narrowSymbol: "$",
|
|
769
|
+
symbolIsAmbiguous: true,
|
|
770
|
+
numericCode: "124",
|
|
771
|
+
status: "active",
|
|
772
|
+
replacedBy: null,
|
|
773
|
+
storageScale: 100,
|
|
774
|
+
storageDigits: 2,
|
|
775
|
+
displayDigits: 2,
|
|
776
|
+
medusaDigits: 2,
|
|
777
|
+
symbolAliases: [
|
|
778
|
+
"$",
|
|
779
|
+
"CA$",
|
|
780
|
+
"C$"
|
|
781
|
+
],
|
|
782
|
+
localeHint: null,
|
|
783
|
+
commaDecimal: false
|
|
784
|
+
},
|
|
785
|
+
{
|
|
786
|
+
code: "CDF",
|
|
787
|
+
name: "Congolese Franc",
|
|
788
|
+
symbol: "CDF",
|
|
789
|
+
narrowSymbol: "CDF",
|
|
790
|
+
symbolIsAmbiguous: false,
|
|
791
|
+
numericCode: "976",
|
|
792
|
+
status: "active",
|
|
793
|
+
replacedBy: null,
|
|
794
|
+
storageScale: 100,
|
|
795
|
+
storageDigits: 2,
|
|
796
|
+
displayDigits: 2,
|
|
797
|
+
medusaDigits: 2,
|
|
798
|
+
symbolAliases: [],
|
|
799
|
+
localeHint: null,
|
|
800
|
+
commaDecimal: false
|
|
801
|
+
},
|
|
802
|
+
{
|
|
803
|
+
code: "CHF",
|
|
804
|
+
name: "Swiss Franc",
|
|
805
|
+
symbol: "CHF",
|
|
806
|
+
narrowSymbol: "CHF",
|
|
807
|
+
symbolIsAmbiguous: false,
|
|
808
|
+
numericCode: "756",
|
|
809
|
+
status: "active",
|
|
810
|
+
replacedBy: null,
|
|
811
|
+
storageScale: 100,
|
|
812
|
+
storageDigits: 2,
|
|
813
|
+
displayDigits: 2,
|
|
814
|
+
medusaDigits: 2,
|
|
815
|
+
symbolAliases: [
|
|
816
|
+
"CHF",
|
|
817
|
+
"SFr.",
|
|
818
|
+
"Fr.",
|
|
819
|
+
"Fr"
|
|
820
|
+
],
|
|
821
|
+
localeHint: "de-CH",
|
|
822
|
+
commaDecimal: false
|
|
823
|
+
},
|
|
824
|
+
{
|
|
825
|
+
code: "CLP",
|
|
826
|
+
name: "Chilean Peso",
|
|
827
|
+
symbol: "CLP",
|
|
828
|
+
narrowSymbol: "$",
|
|
829
|
+
symbolIsAmbiguous: true,
|
|
830
|
+
numericCode: "152",
|
|
831
|
+
status: "active",
|
|
832
|
+
replacedBy: null,
|
|
833
|
+
storageScale: 100,
|
|
834
|
+
storageDigits: 0,
|
|
835
|
+
displayDigits: 0,
|
|
836
|
+
medusaDigits: 0,
|
|
837
|
+
symbolAliases: ["$", "CLP$"],
|
|
838
|
+
localeHint: null,
|
|
839
|
+
commaDecimal: false
|
|
840
|
+
},
|
|
841
|
+
{
|
|
842
|
+
code: "CNY",
|
|
843
|
+
name: "Chinese Yuan",
|
|
844
|
+
symbol: "CN¥",
|
|
845
|
+
narrowSymbol: "¥",
|
|
846
|
+
symbolIsAmbiguous: true,
|
|
847
|
+
numericCode: "156",
|
|
848
|
+
status: "active",
|
|
849
|
+
replacedBy: null,
|
|
850
|
+
storageScale: 100,
|
|
851
|
+
storageDigits: 2,
|
|
852
|
+
displayDigits: 2,
|
|
853
|
+
medusaDigits: 2,
|
|
854
|
+
symbolAliases: [
|
|
855
|
+
"¥",
|
|
856
|
+
"CN¥",
|
|
857
|
+
"RMB",
|
|
858
|
+
"元"
|
|
859
|
+
],
|
|
860
|
+
localeHint: null,
|
|
861
|
+
commaDecimal: false
|
|
862
|
+
},
|
|
863
|
+
{
|
|
864
|
+
code: "COP",
|
|
865
|
+
name: "Colombian Peso",
|
|
866
|
+
symbol: "COP",
|
|
867
|
+
narrowSymbol: "$",
|
|
868
|
+
symbolIsAmbiguous: true,
|
|
869
|
+
numericCode: "170",
|
|
870
|
+
status: "active",
|
|
871
|
+
replacedBy: null,
|
|
872
|
+
storageScale: 100,
|
|
873
|
+
storageDigits: 2,
|
|
874
|
+
displayDigits: 0,
|
|
875
|
+
medusaDigits: 0,
|
|
876
|
+
symbolAliases: ["$", "COL$"],
|
|
877
|
+
localeHint: null,
|
|
878
|
+
commaDecimal: false
|
|
879
|
+
},
|
|
880
|
+
{
|
|
881
|
+
code: "CRC",
|
|
882
|
+
name: "Costa Rican Colón",
|
|
883
|
+
symbol: "CRC",
|
|
884
|
+
narrowSymbol: "₡",
|
|
885
|
+
symbolIsAmbiguous: false,
|
|
886
|
+
numericCode: "188",
|
|
887
|
+
status: "active",
|
|
888
|
+
replacedBy: null,
|
|
889
|
+
storageScale: 100,
|
|
890
|
+
storageDigits: 2,
|
|
891
|
+
displayDigits: 2,
|
|
892
|
+
medusaDigits: 0,
|
|
893
|
+
symbolAliases: [],
|
|
894
|
+
localeHint: null,
|
|
895
|
+
commaDecimal: false
|
|
896
|
+
},
|
|
897
|
+
{
|
|
898
|
+
code: "CUC",
|
|
899
|
+
name: "Cuban Convertible Peso",
|
|
900
|
+
symbol: "CUC",
|
|
901
|
+
narrowSymbol: "$",
|
|
902
|
+
symbolIsAmbiguous: true,
|
|
903
|
+
numericCode: "931",
|
|
904
|
+
status: "historic",
|
|
905
|
+
replacedBy: "CUP",
|
|
906
|
+
storageScale: 100,
|
|
907
|
+
storageDigits: 2,
|
|
908
|
+
displayDigits: 2,
|
|
909
|
+
medusaDigits: 2,
|
|
910
|
+
symbolAliases: [],
|
|
911
|
+
localeHint: null,
|
|
912
|
+
commaDecimal: false
|
|
913
|
+
},
|
|
914
|
+
{
|
|
915
|
+
code: "CUP",
|
|
916
|
+
name: "Cuban Peso",
|
|
917
|
+
symbol: "CUP",
|
|
918
|
+
narrowSymbol: "$",
|
|
919
|
+
symbolIsAmbiguous: true,
|
|
920
|
+
numericCode: "192",
|
|
921
|
+
status: "active",
|
|
922
|
+
replacedBy: null,
|
|
923
|
+
storageScale: 100,
|
|
924
|
+
storageDigits: 2,
|
|
925
|
+
displayDigits: 2,
|
|
926
|
+
medusaDigits: 2,
|
|
927
|
+
symbolAliases: [],
|
|
928
|
+
localeHint: null,
|
|
929
|
+
commaDecimal: false
|
|
930
|
+
},
|
|
931
|
+
{
|
|
932
|
+
code: "CVE",
|
|
933
|
+
name: "Cape Verdean Escudo",
|
|
934
|
+
symbol: "CVE",
|
|
935
|
+
narrowSymbol: "CVE",
|
|
936
|
+
symbolIsAmbiguous: false,
|
|
937
|
+
numericCode: "132",
|
|
938
|
+
status: "active",
|
|
939
|
+
replacedBy: null,
|
|
940
|
+
storageScale: 100,
|
|
941
|
+
storageDigits: 2,
|
|
942
|
+
displayDigits: 2,
|
|
943
|
+
medusaDigits: 2,
|
|
944
|
+
symbolAliases: [],
|
|
945
|
+
localeHint: null,
|
|
946
|
+
commaDecimal: false
|
|
947
|
+
},
|
|
948
|
+
{
|
|
949
|
+
code: "CZK",
|
|
950
|
+
name: "Czech Koruna",
|
|
951
|
+
symbol: "CZK",
|
|
952
|
+
narrowSymbol: "Kč",
|
|
953
|
+
symbolIsAmbiguous: false,
|
|
954
|
+
numericCode: "203",
|
|
955
|
+
status: "active",
|
|
956
|
+
replacedBy: null,
|
|
957
|
+
storageScale: 100,
|
|
958
|
+
storageDigits: 2,
|
|
959
|
+
displayDigits: 2,
|
|
960
|
+
medusaDigits: 2,
|
|
961
|
+
symbolAliases: ["Kč"],
|
|
962
|
+
localeHint: "cs-CZ",
|
|
963
|
+
commaDecimal: false
|
|
964
|
+
},
|
|
965
|
+
{
|
|
966
|
+
code: "DJF",
|
|
967
|
+
name: "Djiboutian Franc",
|
|
968
|
+
symbol: "DJF",
|
|
969
|
+
narrowSymbol: "DJF",
|
|
970
|
+
symbolIsAmbiguous: false,
|
|
971
|
+
numericCode: "262",
|
|
972
|
+
status: "active",
|
|
973
|
+
replacedBy: null,
|
|
974
|
+
storageScale: 100,
|
|
975
|
+
storageDigits: 0,
|
|
976
|
+
displayDigits: 0,
|
|
977
|
+
medusaDigits: 0,
|
|
978
|
+
symbolAliases: [],
|
|
979
|
+
localeHint: null,
|
|
980
|
+
commaDecimal: false
|
|
981
|
+
},
|
|
982
|
+
{
|
|
983
|
+
code: "DKK",
|
|
984
|
+
name: "Danish Krone",
|
|
985
|
+
symbol: "DKK",
|
|
986
|
+
narrowSymbol: "kr",
|
|
987
|
+
symbolIsAmbiguous: true,
|
|
988
|
+
numericCode: "208",
|
|
989
|
+
status: "active",
|
|
990
|
+
replacedBy: null,
|
|
991
|
+
storageScale: 100,
|
|
992
|
+
storageDigits: 2,
|
|
993
|
+
displayDigits: 2,
|
|
994
|
+
medusaDigits: 2,
|
|
995
|
+
symbolAliases: ["kr", "kr."],
|
|
996
|
+
localeHint: "da-DK",
|
|
997
|
+
commaDecimal: false
|
|
998
|
+
},
|
|
999
|
+
{
|
|
1000
|
+
code: "DOP",
|
|
1001
|
+
name: "Dominican Peso",
|
|
1002
|
+
symbol: "DOP",
|
|
1003
|
+
narrowSymbol: "$",
|
|
1004
|
+
symbolIsAmbiguous: true,
|
|
1005
|
+
numericCode: "214",
|
|
1006
|
+
status: "active",
|
|
1007
|
+
replacedBy: null,
|
|
1008
|
+
storageScale: 100,
|
|
1009
|
+
storageDigits: 2,
|
|
1010
|
+
displayDigits: 2,
|
|
1011
|
+
medusaDigits: 2,
|
|
1012
|
+
symbolAliases: [],
|
|
1013
|
+
localeHint: null,
|
|
1014
|
+
commaDecimal: false
|
|
1015
|
+
},
|
|
1016
|
+
{
|
|
1017
|
+
code: "DZD",
|
|
1018
|
+
name: "Algerian Dinar",
|
|
1019
|
+
symbol: "DZD",
|
|
1020
|
+
narrowSymbol: "DZD",
|
|
1021
|
+
symbolIsAmbiguous: false,
|
|
1022
|
+
numericCode: "012",
|
|
1023
|
+
status: "active",
|
|
1024
|
+
replacedBy: null,
|
|
1025
|
+
storageScale: 100,
|
|
1026
|
+
storageDigits: 2,
|
|
1027
|
+
displayDigits: 2,
|
|
1028
|
+
medusaDigits: 2,
|
|
1029
|
+
symbolAliases: [],
|
|
1030
|
+
localeHint: null,
|
|
1031
|
+
commaDecimal: false
|
|
1032
|
+
},
|
|
1033
|
+
{
|
|
1034
|
+
code: "EEK",
|
|
1035
|
+
name: "Estonian Kroon",
|
|
1036
|
+
symbol: "EEK",
|
|
1037
|
+
narrowSymbol: "EEK",
|
|
1038
|
+
symbolIsAmbiguous: false,
|
|
1039
|
+
numericCode: null,
|
|
1040
|
+
status: "historic",
|
|
1041
|
+
replacedBy: "EUR",
|
|
1042
|
+
storageScale: 100,
|
|
1043
|
+
storageDigits: 2,
|
|
1044
|
+
displayDigits: 2,
|
|
1045
|
+
medusaDigits: 2,
|
|
1046
|
+
symbolAliases: [],
|
|
1047
|
+
localeHint: null,
|
|
1048
|
+
commaDecimal: false
|
|
1049
|
+
},
|
|
1050
|
+
{
|
|
1051
|
+
code: "EGP",
|
|
1052
|
+
name: "Egyptian Pound",
|
|
1053
|
+
symbol: "EGP",
|
|
1054
|
+
narrowSymbol: "E£",
|
|
1055
|
+
symbolIsAmbiguous: false,
|
|
1056
|
+
numericCode: "818",
|
|
1057
|
+
status: "active",
|
|
1058
|
+
replacedBy: null,
|
|
1059
|
+
storageScale: 100,
|
|
1060
|
+
storageDigits: 2,
|
|
1061
|
+
displayDigits: 2,
|
|
1062
|
+
medusaDigits: 2,
|
|
1063
|
+
symbolAliases: [
|
|
1064
|
+
"E£",
|
|
1065
|
+
"LE",
|
|
1066
|
+
"ج.م"
|
|
1067
|
+
],
|
|
1068
|
+
localeHint: null,
|
|
1069
|
+
commaDecimal: false
|
|
1070
|
+
},
|
|
1071
|
+
{
|
|
1072
|
+
code: "ERN",
|
|
1073
|
+
name: "Eritrean Nakfa",
|
|
1074
|
+
symbol: "ERN",
|
|
1075
|
+
narrowSymbol: "ERN",
|
|
1076
|
+
symbolIsAmbiguous: false,
|
|
1077
|
+
numericCode: "232",
|
|
1078
|
+
status: "active",
|
|
1079
|
+
replacedBy: null,
|
|
1080
|
+
storageScale: 100,
|
|
1081
|
+
storageDigits: 2,
|
|
1082
|
+
displayDigits: 2,
|
|
1083
|
+
medusaDigits: 2,
|
|
1084
|
+
symbolAliases: [],
|
|
1085
|
+
localeHint: null,
|
|
1086
|
+
commaDecimal: false
|
|
1087
|
+
},
|
|
1088
|
+
{
|
|
1089
|
+
code: "ETB",
|
|
1090
|
+
name: "Ethiopian Birr",
|
|
1091
|
+
symbol: "ETB",
|
|
1092
|
+
narrowSymbol: "ETB",
|
|
1093
|
+
symbolIsAmbiguous: false,
|
|
1094
|
+
numericCode: "230",
|
|
1095
|
+
status: "active",
|
|
1096
|
+
replacedBy: null,
|
|
1097
|
+
storageScale: 100,
|
|
1098
|
+
storageDigits: 2,
|
|
1099
|
+
displayDigits: 2,
|
|
1100
|
+
medusaDigits: 2,
|
|
1101
|
+
symbolAliases: [],
|
|
1102
|
+
localeHint: null,
|
|
1103
|
+
commaDecimal: false
|
|
1104
|
+
},
|
|
1105
|
+
{
|
|
1106
|
+
code: "EUR",
|
|
1107
|
+
name: "Euro",
|
|
1108
|
+
symbol: "€",
|
|
1109
|
+
narrowSymbol: "€",
|
|
1110
|
+
symbolIsAmbiguous: false,
|
|
1111
|
+
numericCode: "978",
|
|
1112
|
+
status: "active",
|
|
1113
|
+
replacedBy: null,
|
|
1114
|
+
storageScale: 100,
|
|
1115
|
+
storageDigits: 2,
|
|
1116
|
+
displayDigits: 2,
|
|
1117
|
+
medusaDigits: 2,
|
|
1118
|
+
symbolAliases: ["€"],
|
|
1119
|
+
localeHint: "de-DE",
|
|
1120
|
+
commaDecimal: false
|
|
1121
|
+
},
|
|
1122
|
+
{
|
|
1123
|
+
code: "FJD",
|
|
1124
|
+
name: "Fijian Dollar",
|
|
1125
|
+
symbol: "FJD",
|
|
1126
|
+
narrowSymbol: "$",
|
|
1127
|
+
symbolIsAmbiguous: true,
|
|
1128
|
+
numericCode: "242",
|
|
1129
|
+
status: "active",
|
|
1130
|
+
replacedBy: null,
|
|
1131
|
+
storageScale: 100,
|
|
1132
|
+
storageDigits: 2,
|
|
1133
|
+
displayDigits: 2,
|
|
1134
|
+
medusaDigits: 2,
|
|
1135
|
+
symbolAliases: [],
|
|
1136
|
+
localeHint: null,
|
|
1137
|
+
commaDecimal: false
|
|
1138
|
+
},
|
|
1139
|
+
{
|
|
1140
|
+
code: "FKP",
|
|
1141
|
+
name: "Falkland Islands Pound",
|
|
1142
|
+
symbol: "FKP",
|
|
1143
|
+
narrowSymbol: "£",
|
|
1144
|
+
symbolIsAmbiguous: true,
|
|
1145
|
+
numericCode: "238",
|
|
1146
|
+
status: "active",
|
|
1147
|
+
replacedBy: null,
|
|
1148
|
+
storageScale: 100,
|
|
1149
|
+
storageDigits: 2,
|
|
1150
|
+
displayDigits: 2,
|
|
1151
|
+
medusaDigits: 2,
|
|
1152
|
+
symbolAliases: [],
|
|
1153
|
+
localeHint: null,
|
|
1154
|
+
commaDecimal: false
|
|
1155
|
+
},
|
|
1156
|
+
{
|
|
1157
|
+
code: "GBP",
|
|
1158
|
+
name: "British Pound",
|
|
1159
|
+
symbol: "£",
|
|
1160
|
+
narrowSymbol: "£",
|
|
1161
|
+
symbolIsAmbiguous: true,
|
|
1162
|
+
numericCode: "826",
|
|
1163
|
+
status: "active",
|
|
1164
|
+
replacedBy: null,
|
|
1165
|
+
storageScale: 100,
|
|
1166
|
+
storageDigits: 2,
|
|
1167
|
+
displayDigits: 2,
|
|
1168
|
+
medusaDigits: 2,
|
|
1169
|
+
symbolAliases: ["£"],
|
|
1170
|
+
localeHint: null,
|
|
1171
|
+
commaDecimal: false
|
|
1172
|
+
},
|
|
1173
|
+
{
|
|
1174
|
+
code: "GEL",
|
|
1175
|
+
name: "Georgian Lari",
|
|
1176
|
+
symbol: "GEL",
|
|
1177
|
+
narrowSymbol: "₾",
|
|
1178
|
+
symbolIsAmbiguous: false,
|
|
1179
|
+
numericCode: "981",
|
|
1180
|
+
status: "active",
|
|
1181
|
+
replacedBy: null,
|
|
1182
|
+
storageScale: 100,
|
|
1183
|
+
storageDigits: 2,
|
|
1184
|
+
displayDigits: 2,
|
|
1185
|
+
medusaDigits: 2,
|
|
1186
|
+
symbolAliases: [],
|
|
1187
|
+
localeHint: null,
|
|
1188
|
+
commaDecimal: false
|
|
1189
|
+
},
|
|
1190
|
+
{
|
|
1191
|
+
code: "GHS",
|
|
1192
|
+
name: "Ghanaian Cedi",
|
|
1193
|
+
symbol: "GHS",
|
|
1194
|
+
narrowSymbol: "GH₵",
|
|
1195
|
+
symbolIsAmbiguous: false,
|
|
1196
|
+
numericCode: "936",
|
|
1197
|
+
status: "active",
|
|
1198
|
+
replacedBy: null,
|
|
1199
|
+
storageScale: 100,
|
|
1200
|
+
storageDigits: 2,
|
|
1201
|
+
displayDigits: 2,
|
|
1202
|
+
medusaDigits: 2,
|
|
1203
|
+
symbolAliases: ["GH₵", "₵"],
|
|
1204
|
+
localeHint: null,
|
|
1205
|
+
commaDecimal: false
|
|
1206
|
+
},
|
|
1207
|
+
{
|
|
1208
|
+
code: "GIP",
|
|
1209
|
+
name: "Gibraltar Pound",
|
|
1210
|
+
symbol: "GIP",
|
|
1211
|
+
narrowSymbol: "£",
|
|
1212
|
+
symbolIsAmbiguous: true,
|
|
1213
|
+
numericCode: "292",
|
|
1214
|
+
status: "active",
|
|
1215
|
+
replacedBy: null,
|
|
1216
|
+
storageScale: 100,
|
|
1217
|
+
storageDigits: 2,
|
|
1218
|
+
displayDigits: 2,
|
|
1219
|
+
medusaDigits: 2,
|
|
1220
|
+
symbolAliases: [],
|
|
1221
|
+
localeHint: null,
|
|
1222
|
+
commaDecimal: false
|
|
1223
|
+
},
|
|
1224
|
+
{
|
|
1225
|
+
code: "GMD",
|
|
1226
|
+
name: "Gambian Dalasi",
|
|
1227
|
+
symbol: "GMD",
|
|
1228
|
+
narrowSymbol: "GMD",
|
|
1229
|
+
symbolIsAmbiguous: false,
|
|
1230
|
+
numericCode: "270",
|
|
1231
|
+
status: "active",
|
|
1232
|
+
replacedBy: null,
|
|
1233
|
+
storageScale: 100,
|
|
1234
|
+
storageDigits: 2,
|
|
1235
|
+
displayDigits: 2,
|
|
1236
|
+
medusaDigits: 2,
|
|
1237
|
+
symbolAliases: [],
|
|
1238
|
+
localeHint: null,
|
|
1239
|
+
commaDecimal: false
|
|
1240
|
+
},
|
|
1241
|
+
{
|
|
1242
|
+
code: "GNF",
|
|
1243
|
+
name: "Guinean Franc",
|
|
1244
|
+
symbol: "GNF",
|
|
1245
|
+
narrowSymbol: "FG",
|
|
1246
|
+
symbolIsAmbiguous: false,
|
|
1247
|
+
numericCode: "324",
|
|
1248
|
+
status: "active",
|
|
1249
|
+
replacedBy: null,
|
|
1250
|
+
storageScale: 100,
|
|
1251
|
+
storageDigits: 0,
|
|
1252
|
+
displayDigits: 0,
|
|
1253
|
+
medusaDigits: 0,
|
|
1254
|
+
symbolAliases: [],
|
|
1255
|
+
localeHint: null,
|
|
1256
|
+
commaDecimal: false
|
|
1257
|
+
},
|
|
1258
|
+
{
|
|
1259
|
+
code: "GTQ",
|
|
1260
|
+
name: "Guatemalan Quetzal",
|
|
1261
|
+
symbol: "GTQ",
|
|
1262
|
+
narrowSymbol: "Q",
|
|
1263
|
+
symbolIsAmbiguous: false,
|
|
1264
|
+
numericCode: "320",
|
|
1265
|
+
status: "active",
|
|
1266
|
+
replacedBy: null,
|
|
1267
|
+
storageScale: 100,
|
|
1268
|
+
storageDigits: 2,
|
|
1269
|
+
displayDigits: 2,
|
|
1270
|
+
medusaDigits: 2,
|
|
1271
|
+
symbolAliases: [],
|
|
1272
|
+
localeHint: null,
|
|
1273
|
+
commaDecimal: false
|
|
1274
|
+
},
|
|
1275
|
+
{
|
|
1276
|
+
code: "GYD",
|
|
1277
|
+
name: "Guyanaese Dollar",
|
|
1278
|
+
symbol: "GYD",
|
|
1279
|
+
narrowSymbol: "$",
|
|
1280
|
+
symbolIsAmbiguous: true,
|
|
1281
|
+
numericCode: "328",
|
|
1282
|
+
status: "active",
|
|
1283
|
+
replacedBy: null,
|
|
1284
|
+
storageScale: 100,
|
|
1285
|
+
storageDigits: 2,
|
|
1286
|
+
displayDigits: 2,
|
|
1287
|
+
medusaDigits: 2,
|
|
1288
|
+
symbolAliases: [],
|
|
1289
|
+
localeHint: null,
|
|
1290
|
+
commaDecimal: false
|
|
1291
|
+
},
|
|
1292
|
+
{
|
|
1293
|
+
code: "HKD",
|
|
1294
|
+
name: "Hong Kong Dollar",
|
|
1295
|
+
symbol: "HK$",
|
|
1296
|
+
narrowSymbol: "$",
|
|
1297
|
+
symbolIsAmbiguous: true,
|
|
1298
|
+
numericCode: "344",
|
|
1299
|
+
status: "active",
|
|
1300
|
+
replacedBy: null,
|
|
1301
|
+
storageScale: 100,
|
|
1302
|
+
storageDigits: 2,
|
|
1303
|
+
displayDigits: 2,
|
|
1304
|
+
medusaDigits: 2,
|
|
1305
|
+
symbolAliases: ["$", "HK$"],
|
|
1306
|
+
localeHint: null,
|
|
1307
|
+
commaDecimal: false
|
|
1308
|
+
},
|
|
1309
|
+
{
|
|
1310
|
+
code: "HNL",
|
|
1311
|
+
name: "Honduran Lempira",
|
|
1312
|
+
symbol: "HNL",
|
|
1313
|
+
narrowSymbol: "L",
|
|
1314
|
+
symbolIsAmbiguous: false,
|
|
1315
|
+
numericCode: "340",
|
|
1316
|
+
status: "active",
|
|
1317
|
+
replacedBy: null,
|
|
1318
|
+
storageScale: 100,
|
|
1319
|
+
storageDigits: 2,
|
|
1320
|
+
displayDigits: 2,
|
|
1321
|
+
medusaDigits: 2,
|
|
1322
|
+
symbolAliases: [],
|
|
1323
|
+
localeHint: null,
|
|
1324
|
+
commaDecimal: false
|
|
1325
|
+
},
|
|
1326
|
+
{
|
|
1327
|
+
code: "HRK",
|
|
1328
|
+
name: "Croatian Kuna",
|
|
1329
|
+
symbol: "HRK",
|
|
1330
|
+
narrowSymbol: "kn",
|
|
1331
|
+
symbolIsAmbiguous: false,
|
|
1332
|
+
numericCode: "191",
|
|
1333
|
+
status: "historic",
|
|
1334
|
+
replacedBy: "EUR",
|
|
1335
|
+
storageScale: 100,
|
|
1336
|
+
storageDigits: 2,
|
|
1337
|
+
displayDigits: 2,
|
|
1338
|
+
medusaDigits: 2,
|
|
1339
|
+
symbolAliases: [],
|
|
1340
|
+
localeHint: null,
|
|
1341
|
+
commaDecimal: false
|
|
1342
|
+
},
|
|
1343
|
+
{
|
|
1344
|
+
code: "HTG",
|
|
1345
|
+
name: "Haitian Gourde",
|
|
1346
|
+
symbol: "HTG",
|
|
1347
|
+
narrowSymbol: "HTG",
|
|
1348
|
+
symbolIsAmbiguous: false,
|
|
1349
|
+
numericCode: "332",
|
|
1350
|
+
status: "active",
|
|
1351
|
+
replacedBy: null,
|
|
1352
|
+
storageScale: 100,
|
|
1353
|
+
storageDigits: 2,
|
|
1354
|
+
displayDigits: 2,
|
|
1355
|
+
medusaDigits: 2,
|
|
1356
|
+
symbolAliases: [],
|
|
1357
|
+
localeHint: null,
|
|
1358
|
+
commaDecimal: false
|
|
1359
|
+
},
|
|
1360
|
+
{
|
|
1361
|
+
code: "HUF",
|
|
1362
|
+
name: "Hungarian Forint",
|
|
1363
|
+
symbol: "HUF",
|
|
1364
|
+
narrowSymbol: "Ft",
|
|
1365
|
+
symbolIsAmbiguous: false,
|
|
1366
|
+
numericCode: "348",
|
|
1367
|
+
status: "active",
|
|
1368
|
+
replacedBy: null,
|
|
1369
|
+
storageScale: 100,
|
|
1370
|
+
storageDigits: 2,
|
|
1371
|
+
displayDigits: 0,
|
|
1372
|
+
medusaDigits: 0,
|
|
1373
|
+
symbolAliases: ["Ft"],
|
|
1374
|
+
localeHint: "hu-HU",
|
|
1375
|
+
commaDecimal: false
|
|
1376
|
+
},
|
|
1377
|
+
{
|
|
1378
|
+
code: "IDR",
|
|
1379
|
+
name: "Indonesian Rupiah",
|
|
1380
|
+
symbol: "IDR",
|
|
1381
|
+
narrowSymbol: "Rp",
|
|
1382
|
+
symbolIsAmbiguous: false,
|
|
1383
|
+
numericCode: "360",
|
|
1384
|
+
status: "active",
|
|
1385
|
+
replacedBy: null,
|
|
1386
|
+
storageScale: 100,
|
|
1387
|
+
storageDigits: 2,
|
|
1388
|
+
displayDigits: 0,
|
|
1389
|
+
medusaDigits: 0,
|
|
1390
|
+
symbolAliases: ["Rp"],
|
|
1391
|
+
localeHint: null,
|
|
1392
|
+
commaDecimal: false
|
|
1393
|
+
},
|
|
1394
|
+
{
|
|
1395
|
+
code: "ILS",
|
|
1396
|
+
name: "Israeli New Shekel",
|
|
1397
|
+
symbol: "₪",
|
|
1398
|
+
narrowSymbol: "₪",
|
|
1399
|
+
symbolIsAmbiguous: false,
|
|
1400
|
+
numericCode: "376",
|
|
1401
|
+
status: "active",
|
|
1402
|
+
replacedBy: null,
|
|
1403
|
+
storageScale: 100,
|
|
1404
|
+
storageDigits: 2,
|
|
1405
|
+
displayDigits: 2,
|
|
1406
|
+
medusaDigits: 2,
|
|
1407
|
+
symbolAliases: ["₪"],
|
|
1408
|
+
localeHint: null,
|
|
1409
|
+
commaDecimal: false
|
|
1410
|
+
},
|
|
1411
|
+
{
|
|
1412
|
+
code: "INR",
|
|
1413
|
+
name: "Indian Rupee",
|
|
1414
|
+
symbol: "₹",
|
|
1415
|
+
narrowSymbol: "₹",
|
|
1416
|
+
symbolIsAmbiguous: false,
|
|
1417
|
+
numericCode: "356",
|
|
1418
|
+
status: "active",
|
|
1419
|
+
replacedBy: null,
|
|
1420
|
+
storageScale: 100,
|
|
1421
|
+
storageDigits: 2,
|
|
1422
|
+
displayDigits: 2,
|
|
1423
|
+
medusaDigits: 2,
|
|
1424
|
+
symbolAliases: [
|
|
1425
|
+
"₹",
|
|
1426
|
+
"Rs.",
|
|
1427
|
+
"Rs"
|
|
1428
|
+
],
|
|
1429
|
+
localeHint: null,
|
|
1430
|
+
commaDecimal: false
|
|
1431
|
+
},
|
|
1432
|
+
{
|
|
1433
|
+
code: "IQD",
|
|
1434
|
+
name: "Iraqi Dinar",
|
|
1435
|
+
symbol: "IQD",
|
|
1436
|
+
narrowSymbol: "IQD",
|
|
1437
|
+
symbolIsAmbiguous: false,
|
|
1438
|
+
numericCode: "368",
|
|
1439
|
+
status: "active",
|
|
1440
|
+
replacedBy: null,
|
|
1441
|
+
storageScale: 1e3,
|
|
1442
|
+
storageDigits: 3,
|
|
1443
|
+
displayDigits: 0,
|
|
1444
|
+
medusaDigits: 0,
|
|
1445
|
+
symbolAliases: [],
|
|
1446
|
+
localeHint: null,
|
|
1447
|
+
commaDecimal: false
|
|
1448
|
+
},
|
|
1449
|
+
{
|
|
1450
|
+
code: "IRR",
|
|
1451
|
+
name: "Iranian Rial",
|
|
1452
|
+
symbol: "IRR",
|
|
1453
|
+
narrowSymbol: "IRR",
|
|
1454
|
+
symbolIsAmbiguous: false,
|
|
1455
|
+
numericCode: "364",
|
|
1456
|
+
status: "active",
|
|
1457
|
+
replacedBy: null,
|
|
1458
|
+
storageScale: 100,
|
|
1459
|
+
storageDigits: 2,
|
|
1460
|
+
displayDigits: 0,
|
|
1461
|
+
medusaDigits: 0,
|
|
1462
|
+
symbolAliases: [],
|
|
1463
|
+
localeHint: null,
|
|
1464
|
+
commaDecimal: false
|
|
1465
|
+
},
|
|
1466
|
+
{
|
|
1467
|
+
code: "ISK",
|
|
1468
|
+
name: "Icelandic Króna",
|
|
1469
|
+
symbol: "ISK",
|
|
1470
|
+
narrowSymbol: "kr",
|
|
1471
|
+
symbolIsAmbiguous: true,
|
|
1472
|
+
numericCode: "352",
|
|
1473
|
+
status: "active",
|
|
1474
|
+
replacedBy: null,
|
|
1475
|
+
storageScale: 100,
|
|
1476
|
+
storageDigits: 0,
|
|
1477
|
+
displayDigits: 0,
|
|
1478
|
+
medusaDigits: 0,
|
|
1479
|
+
symbolAliases: ["kr"],
|
|
1480
|
+
localeHint: null,
|
|
1481
|
+
commaDecimal: false
|
|
1482
|
+
},
|
|
1483
|
+
{
|
|
1484
|
+
code: "JMD",
|
|
1485
|
+
name: "Jamaican Dollar",
|
|
1486
|
+
symbol: "JMD",
|
|
1487
|
+
narrowSymbol: "$",
|
|
1488
|
+
symbolIsAmbiguous: true,
|
|
1489
|
+
numericCode: "388",
|
|
1490
|
+
status: "active",
|
|
1491
|
+
replacedBy: null,
|
|
1492
|
+
storageScale: 100,
|
|
1493
|
+
storageDigits: 2,
|
|
1494
|
+
displayDigits: 2,
|
|
1495
|
+
medusaDigits: 2,
|
|
1496
|
+
symbolAliases: [],
|
|
1497
|
+
localeHint: null,
|
|
1498
|
+
commaDecimal: false
|
|
1499
|
+
},
|
|
1500
|
+
{
|
|
1501
|
+
code: "JOD",
|
|
1502
|
+
name: "Jordanian Dinar",
|
|
1503
|
+
symbol: "JOD",
|
|
1504
|
+
narrowSymbol: "JOD",
|
|
1505
|
+
symbolIsAmbiguous: false,
|
|
1506
|
+
numericCode: "400",
|
|
1507
|
+
status: "active",
|
|
1508
|
+
replacedBy: null,
|
|
1509
|
+
storageScale: 1e3,
|
|
1510
|
+
storageDigits: 3,
|
|
1511
|
+
displayDigits: 3,
|
|
1512
|
+
medusaDigits: 3,
|
|
1513
|
+
symbolAliases: [],
|
|
1514
|
+
localeHint: null,
|
|
1515
|
+
commaDecimal: false
|
|
1516
|
+
},
|
|
1517
|
+
{
|
|
1518
|
+
code: "JPY",
|
|
1519
|
+
name: "Japanese Yen",
|
|
1520
|
+
symbol: "¥",
|
|
1521
|
+
narrowSymbol: "¥",
|
|
1522
|
+
symbolIsAmbiguous: true,
|
|
1523
|
+
numericCode: "392",
|
|
1524
|
+
status: "active",
|
|
1525
|
+
replacedBy: null,
|
|
1526
|
+
storageScale: 100,
|
|
1527
|
+
storageDigits: 0,
|
|
1528
|
+
displayDigits: 0,
|
|
1529
|
+
medusaDigits: 0,
|
|
1530
|
+
symbolAliases: ["¥", "円"],
|
|
1531
|
+
localeHint: null,
|
|
1532
|
+
commaDecimal: false
|
|
1533
|
+
},
|
|
1534
|
+
{
|
|
1535
|
+
code: "KES",
|
|
1536
|
+
name: "Kenyan Shilling",
|
|
1537
|
+
symbol: "KES",
|
|
1538
|
+
narrowSymbol: "KES",
|
|
1539
|
+
symbolIsAmbiguous: false,
|
|
1540
|
+
numericCode: "404",
|
|
1541
|
+
status: "active",
|
|
1542
|
+
replacedBy: null,
|
|
1543
|
+
storageScale: 100,
|
|
1544
|
+
storageDigits: 2,
|
|
1545
|
+
displayDigits: 2,
|
|
1546
|
+
medusaDigits: 2,
|
|
1547
|
+
symbolAliases: ["KSh", "Ksh"],
|
|
1548
|
+
localeHint: null,
|
|
1549
|
+
commaDecimal: false
|
|
1550
|
+
},
|
|
1551
|
+
{
|
|
1552
|
+
code: "KGS",
|
|
1553
|
+
name: "Kyrgyz Som",
|
|
1554
|
+
symbol: "KGS",
|
|
1555
|
+
narrowSymbol: "⃀",
|
|
1556
|
+
symbolIsAmbiguous: false,
|
|
1557
|
+
numericCode: "417",
|
|
1558
|
+
status: "active",
|
|
1559
|
+
replacedBy: null,
|
|
1560
|
+
storageScale: 100,
|
|
1561
|
+
storageDigits: 2,
|
|
1562
|
+
displayDigits: 2,
|
|
1563
|
+
medusaDigits: 2,
|
|
1564
|
+
symbolAliases: [],
|
|
1565
|
+
localeHint: null,
|
|
1566
|
+
commaDecimal: false
|
|
1567
|
+
},
|
|
1568
|
+
{
|
|
1569
|
+
code: "KHR",
|
|
1570
|
+
name: "Cambodian Riel",
|
|
1571
|
+
symbol: "KHR",
|
|
1572
|
+
narrowSymbol: "៛",
|
|
1573
|
+
symbolIsAmbiguous: false,
|
|
1574
|
+
numericCode: "116",
|
|
1575
|
+
status: "active",
|
|
1576
|
+
replacedBy: null,
|
|
1577
|
+
storageScale: 100,
|
|
1578
|
+
storageDigits: 2,
|
|
1579
|
+
displayDigits: 2,
|
|
1580
|
+
medusaDigits: 2,
|
|
1581
|
+
symbolAliases: [],
|
|
1582
|
+
localeHint: null,
|
|
1583
|
+
commaDecimal: false
|
|
1584
|
+
},
|
|
1585
|
+
{
|
|
1586
|
+
code: "KMF",
|
|
1587
|
+
name: "Comorian Franc",
|
|
1588
|
+
symbol: "KMF",
|
|
1589
|
+
narrowSymbol: "CF",
|
|
1590
|
+
symbolIsAmbiguous: false,
|
|
1591
|
+
numericCode: "174",
|
|
1592
|
+
status: "active",
|
|
1593
|
+
replacedBy: null,
|
|
1594
|
+
storageScale: 100,
|
|
1595
|
+
storageDigits: 0,
|
|
1596
|
+
displayDigits: 0,
|
|
1597
|
+
medusaDigits: 0,
|
|
1598
|
+
symbolAliases: [],
|
|
1599
|
+
localeHint: null,
|
|
1600
|
+
commaDecimal: false
|
|
1601
|
+
},
|
|
1602
|
+
{
|
|
1603
|
+
code: "KPW",
|
|
1604
|
+
name: "North Korean Won",
|
|
1605
|
+
symbol: "KPW",
|
|
1606
|
+
narrowSymbol: "₩",
|
|
1607
|
+
symbolIsAmbiguous: true,
|
|
1608
|
+
numericCode: "408",
|
|
1609
|
+
status: "active",
|
|
1610
|
+
replacedBy: null,
|
|
1611
|
+
storageScale: 100,
|
|
1612
|
+
storageDigits: 2,
|
|
1613
|
+
displayDigits: 0,
|
|
1614
|
+
medusaDigits: 2,
|
|
1615
|
+
symbolAliases: [],
|
|
1616
|
+
localeHint: null,
|
|
1617
|
+
commaDecimal: false
|
|
1618
|
+
},
|
|
1619
|
+
{
|
|
1620
|
+
code: "KRW",
|
|
1621
|
+
name: "South Korean Won",
|
|
1622
|
+
symbol: "₩",
|
|
1623
|
+
narrowSymbol: "₩",
|
|
1624
|
+
symbolIsAmbiguous: true,
|
|
1625
|
+
numericCode: "410",
|
|
1626
|
+
status: "active",
|
|
1627
|
+
replacedBy: null,
|
|
1628
|
+
storageScale: 100,
|
|
1629
|
+
storageDigits: 0,
|
|
1630
|
+
displayDigits: 0,
|
|
1631
|
+
medusaDigits: 0,
|
|
1632
|
+
symbolAliases: ["₩"],
|
|
1633
|
+
localeHint: null,
|
|
1634
|
+
commaDecimal: false
|
|
1635
|
+
},
|
|
1636
|
+
{
|
|
1637
|
+
code: "KWD",
|
|
1638
|
+
name: "Kuwaiti Dinar",
|
|
1639
|
+
symbol: "KWD",
|
|
1640
|
+
narrowSymbol: "KWD",
|
|
1641
|
+
symbolIsAmbiguous: false,
|
|
1642
|
+
numericCode: "414",
|
|
1643
|
+
status: "active",
|
|
1644
|
+
replacedBy: null,
|
|
1645
|
+
storageScale: 1e3,
|
|
1646
|
+
storageDigits: 3,
|
|
1647
|
+
displayDigits: 3,
|
|
1648
|
+
medusaDigits: 3,
|
|
1649
|
+
symbolAliases: [],
|
|
1650
|
+
localeHint: null,
|
|
1651
|
+
commaDecimal: false
|
|
1652
|
+
},
|
|
1653
|
+
{
|
|
1654
|
+
code: "KYD",
|
|
1655
|
+
name: "Cayman Islands Dollar",
|
|
1656
|
+
symbol: "KYD",
|
|
1657
|
+
narrowSymbol: "$",
|
|
1658
|
+
symbolIsAmbiguous: true,
|
|
1659
|
+
numericCode: "136",
|
|
1660
|
+
status: "active",
|
|
1661
|
+
replacedBy: null,
|
|
1662
|
+
storageScale: 100,
|
|
1663
|
+
storageDigits: 2,
|
|
1664
|
+
displayDigits: 2,
|
|
1665
|
+
medusaDigits: 2,
|
|
1666
|
+
symbolAliases: [],
|
|
1667
|
+
localeHint: null,
|
|
1668
|
+
commaDecimal: false
|
|
1669
|
+
},
|
|
1670
|
+
{
|
|
1671
|
+
code: "KZT",
|
|
1672
|
+
name: "Kazakhstani Tenge",
|
|
1673
|
+
symbol: "KZT",
|
|
1674
|
+
narrowSymbol: "₸",
|
|
1675
|
+
symbolIsAmbiguous: false,
|
|
1676
|
+
numericCode: "398",
|
|
1677
|
+
status: "active",
|
|
1678
|
+
replacedBy: null,
|
|
1679
|
+
storageScale: 100,
|
|
1680
|
+
storageDigits: 2,
|
|
1681
|
+
displayDigits: 2,
|
|
1682
|
+
medusaDigits: 2,
|
|
1683
|
+
symbolAliases: [],
|
|
1684
|
+
localeHint: null,
|
|
1685
|
+
commaDecimal: false
|
|
1686
|
+
},
|
|
1687
|
+
{
|
|
1688
|
+
code: "LAK",
|
|
1689
|
+
name: "Laotian Kip",
|
|
1690
|
+
symbol: "LAK",
|
|
1691
|
+
narrowSymbol: "₭",
|
|
1692
|
+
symbolIsAmbiguous: false,
|
|
1693
|
+
numericCode: "418",
|
|
1694
|
+
status: "active",
|
|
1695
|
+
replacedBy: null,
|
|
1696
|
+
storageScale: 100,
|
|
1697
|
+
storageDigits: 2,
|
|
1698
|
+
displayDigits: 0,
|
|
1699
|
+
medusaDigits: 2,
|
|
1700
|
+
symbolAliases: [],
|
|
1701
|
+
localeHint: null,
|
|
1702
|
+
commaDecimal: false
|
|
1703
|
+
},
|
|
1704
|
+
{
|
|
1705
|
+
code: "LBP",
|
|
1706
|
+
name: "Lebanese Pound",
|
|
1707
|
+
symbol: "LBP",
|
|
1708
|
+
narrowSymbol: "L£",
|
|
1709
|
+
symbolIsAmbiguous: false,
|
|
1710
|
+
numericCode: "422",
|
|
1711
|
+
status: "active",
|
|
1712
|
+
replacedBy: null,
|
|
1713
|
+
storageScale: 100,
|
|
1714
|
+
storageDigits: 2,
|
|
1715
|
+
displayDigits: 0,
|
|
1716
|
+
medusaDigits: 0,
|
|
1717
|
+
symbolAliases: [],
|
|
1718
|
+
localeHint: null,
|
|
1719
|
+
commaDecimal: false
|
|
1720
|
+
},
|
|
1721
|
+
{
|
|
1722
|
+
code: "LKR",
|
|
1723
|
+
name: "Sri Lankan Rupee",
|
|
1724
|
+
symbol: "LKR",
|
|
1725
|
+
narrowSymbol: "Rs",
|
|
1726
|
+
symbolIsAmbiguous: true,
|
|
1727
|
+
numericCode: "144",
|
|
1728
|
+
status: "active",
|
|
1729
|
+
replacedBy: null,
|
|
1730
|
+
storageScale: 100,
|
|
1731
|
+
storageDigits: 2,
|
|
1732
|
+
displayDigits: 2,
|
|
1733
|
+
medusaDigits: 2,
|
|
1734
|
+
symbolAliases: ["Rs.", "Rs"],
|
|
1735
|
+
localeHint: null,
|
|
1736
|
+
commaDecimal: false
|
|
1737
|
+
},
|
|
1738
|
+
{
|
|
1739
|
+
code: "LRD",
|
|
1740
|
+
name: "Liberian Dollar",
|
|
1741
|
+
symbol: "LRD",
|
|
1742
|
+
narrowSymbol: "$",
|
|
1743
|
+
symbolIsAmbiguous: true,
|
|
1744
|
+
numericCode: "430",
|
|
1745
|
+
status: "active",
|
|
1746
|
+
replacedBy: null,
|
|
1747
|
+
storageScale: 100,
|
|
1748
|
+
storageDigits: 2,
|
|
1749
|
+
displayDigits: 2,
|
|
1750
|
+
medusaDigits: 2,
|
|
1751
|
+
symbolAliases: [],
|
|
1752
|
+
localeHint: null,
|
|
1753
|
+
commaDecimal: false
|
|
1754
|
+
},
|
|
1755
|
+
{
|
|
1756
|
+
code: "LSL",
|
|
1757
|
+
name: "Lesotho Loti",
|
|
1758
|
+
symbol: "LSL",
|
|
1759
|
+
narrowSymbol: "LSL",
|
|
1760
|
+
symbolIsAmbiguous: false,
|
|
1761
|
+
numericCode: "426",
|
|
1762
|
+
status: "active",
|
|
1763
|
+
replacedBy: null,
|
|
1764
|
+
storageScale: 100,
|
|
1765
|
+
storageDigits: 2,
|
|
1766
|
+
displayDigits: 2,
|
|
1767
|
+
medusaDigits: 2,
|
|
1768
|
+
symbolAliases: [],
|
|
1769
|
+
localeHint: null,
|
|
1770
|
+
commaDecimal: false
|
|
1771
|
+
},
|
|
1772
|
+
{
|
|
1773
|
+
code: "LTL",
|
|
1774
|
+
name: "Lithuanian Litas",
|
|
1775
|
+
symbol: "LTL",
|
|
1776
|
+
narrowSymbol: "Lt",
|
|
1777
|
+
symbolIsAmbiguous: false,
|
|
1778
|
+
numericCode: "440",
|
|
1779
|
+
status: "historic",
|
|
1780
|
+
replacedBy: "EUR",
|
|
1781
|
+
storageScale: 100,
|
|
1782
|
+
storageDigits: 2,
|
|
1783
|
+
displayDigits: 2,
|
|
1784
|
+
medusaDigits: 2,
|
|
1785
|
+
symbolAliases: [],
|
|
1786
|
+
localeHint: null,
|
|
1787
|
+
commaDecimal: false
|
|
1788
|
+
},
|
|
1789
|
+
{
|
|
1790
|
+
code: "LVL",
|
|
1791
|
+
name: "Latvian Lats",
|
|
1792
|
+
symbol: "LVL",
|
|
1793
|
+
narrowSymbol: "Ls",
|
|
1794
|
+
symbolIsAmbiguous: false,
|
|
1795
|
+
numericCode: null,
|
|
1796
|
+
status: "historic",
|
|
1797
|
+
replacedBy: "EUR",
|
|
1798
|
+
storageScale: 100,
|
|
1799
|
+
storageDigits: 2,
|
|
1800
|
+
displayDigits: 2,
|
|
1801
|
+
medusaDigits: 2,
|
|
1802
|
+
symbolAliases: [],
|
|
1803
|
+
localeHint: null,
|
|
1804
|
+
commaDecimal: false
|
|
1805
|
+
},
|
|
1806
|
+
{
|
|
1807
|
+
code: "LYD",
|
|
1808
|
+
name: "Libyan Dinar",
|
|
1809
|
+
symbol: "LYD",
|
|
1810
|
+
narrowSymbol: "LYD",
|
|
1811
|
+
symbolIsAmbiguous: false,
|
|
1812
|
+
numericCode: "434",
|
|
1813
|
+
status: "active",
|
|
1814
|
+
replacedBy: null,
|
|
1815
|
+
storageScale: 1e3,
|
|
1816
|
+
storageDigits: 3,
|
|
1817
|
+
displayDigits: 3,
|
|
1818
|
+
medusaDigits: 3,
|
|
1819
|
+
symbolAliases: [],
|
|
1820
|
+
localeHint: null,
|
|
1821
|
+
commaDecimal: false
|
|
1822
|
+
},
|
|
1823
|
+
{
|
|
1824
|
+
code: "MAD",
|
|
1825
|
+
name: "Moroccan Dirham",
|
|
1826
|
+
symbol: "MAD",
|
|
1827
|
+
narrowSymbol: "MAD",
|
|
1828
|
+
symbolIsAmbiguous: false,
|
|
1829
|
+
numericCode: "504",
|
|
1830
|
+
status: "active",
|
|
1831
|
+
replacedBy: null,
|
|
1832
|
+
storageScale: 100,
|
|
1833
|
+
storageDigits: 2,
|
|
1834
|
+
displayDigits: 2,
|
|
1835
|
+
medusaDigits: 2,
|
|
1836
|
+
symbolAliases: [],
|
|
1837
|
+
localeHint: null,
|
|
1838
|
+
commaDecimal: false
|
|
1839
|
+
},
|
|
1840
|
+
{
|
|
1841
|
+
code: "MDL",
|
|
1842
|
+
name: "Moldovan Leu",
|
|
1843
|
+
symbol: "MDL",
|
|
1844
|
+
narrowSymbol: "MDL",
|
|
1845
|
+
symbolIsAmbiguous: false,
|
|
1846
|
+
numericCode: "498",
|
|
1847
|
+
status: "active",
|
|
1848
|
+
replacedBy: null,
|
|
1849
|
+
storageScale: 100,
|
|
1850
|
+
storageDigits: 2,
|
|
1851
|
+
displayDigits: 2,
|
|
1852
|
+
medusaDigits: 2,
|
|
1853
|
+
symbolAliases: [],
|
|
1854
|
+
localeHint: null,
|
|
1855
|
+
commaDecimal: false
|
|
1856
|
+
},
|
|
1857
|
+
{
|
|
1858
|
+
code: "MGA",
|
|
1859
|
+
name: "Malagasy Ariary",
|
|
1860
|
+
symbol: "MGA",
|
|
1861
|
+
narrowSymbol: "Ar",
|
|
1862
|
+
symbolIsAmbiguous: false,
|
|
1863
|
+
numericCode: "969",
|
|
1864
|
+
status: "active",
|
|
1865
|
+
replacedBy: null,
|
|
1866
|
+
storageScale: 100,
|
|
1867
|
+
storageDigits: 0,
|
|
1868
|
+
displayDigits: 0,
|
|
1869
|
+
medusaDigits: 0,
|
|
1870
|
+
symbolAliases: [],
|
|
1871
|
+
localeHint: null,
|
|
1872
|
+
commaDecimal: false
|
|
1873
|
+
},
|
|
1874
|
+
{
|
|
1875
|
+
code: "MKD",
|
|
1876
|
+
name: "Macedonian Denar",
|
|
1877
|
+
symbol: "MKD",
|
|
1878
|
+
narrowSymbol: "MKD",
|
|
1879
|
+
symbolIsAmbiguous: false,
|
|
1880
|
+
numericCode: "807",
|
|
1881
|
+
status: "active",
|
|
1882
|
+
replacedBy: null,
|
|
1883
|
+
storageScale: 100,
|
|
1884
|
+
storageDigits: 2,
|
|
1885
|
+
displayDigits: 2,
|
|
1886
|
+
medusaDigits: 2,
|
|
1887
|
+
symbolAliases: [],
|
|
1888
|
+
localeHint: null,
|
|
1889
|
+
commaDecimal: false
|
|
1890
|
+
},
|
|
1891
|
+
{
|
|
1892
|
+
code: "MMK",
|
|
1893
|
+
name: "Myanmar Kyat",
|
|
1894
|
+
symbol: "MMK",
|
|
1895
|
+
narrowSymbol: "K",
|
|
1896
|
+
symbolIsAmbiguous: false,
|
|
1897
|
+
numericCode: "104",
|
|
1898
|
+
status: "active",
|
|
1899
|
+
replacedBy: null,
|
|
1900
|
+
storageScale: 100,
|
|
1901
|
+
storageDigits: 2,
|
|
1902
|
+
displayDigits: 0,
|
|
1903
|
+
medusaDigits: 0,
|
|
1904
|
+
symbolAliases: [],
|
|
1905
|
+
localeHint: null,
|
|
1906
|
+
commaDecimal: false
|
|
1907
|
+
},
|
|
1908
|
+
{
|
|
1909
|
+
code: "MNT",
|
|
1910
|
+
name: "Mongolian Tugrik",
|
|
1911
|
+
symbol: "MNT",
|
|
1912
|
+
narrowSymbol: "₮",
|
|
1913
|
+
symbolIsAmbiguous: false,
|
|
1914
|
+
numericCode: "496",
|
|
1915
|
+
status: "active",
|
|
1916
|
+
replacedBy: null,
|
|
1917
|
+
storageScale: 100,
|
|
1918
|
+
storageDigits: 2,
|
|
1919
|
+
displayDigits: 2,
|
|
1920
|
+
medusaDigits: 0,
|
|
1921
|
+
symbolAliases: [],
|
|
1922
|
+
localeHint: null,
|
|
1923
|
+
commaDecimal: false
|
|
1924
|
+
},
|
|
1925
|
+
{
|
|
1926
|
+
code: "MOP",
|
|
1927
|
+
name: "Macanese Pataca",
|
|
1928
|
+
symbol: "MOP",
|
|
1929
|
+
narrowSymbol: "MOP",
|
|
1930
|
+
symbolIsAmbiguous: false,
|
|
1931
|
+
numericCode: "446",
|
|
1932
|
+
status: "active",
|
|
1933
|
+
replacedBy: null,
|
|
1934
|
+
storageScale: 100,
|
|
1935
|
+
storageDigits: 2,
|
|
1936
|
+
displayDigits: 2,
|
|
1937
|
+
medusaDigits: 2,
|
|
1938
|
+
symbolAliases: [],
|
|
1939
|
+
localeHint: null,
|
|
1940
|
+
commaDecimal: false
|
|
1941
|
+
},
|
|
1942
|
+
{
|
|
1943
|
+
code: "MRO",
|
|
1944
|
+
name: "Mauritanian Ouguiya (1973–2017)",
|
|
1945
|
+
symbol: "MRO",
|
|
1946
|
+
narrowSymbol: "MRO",
|
|
1947
|
+
symbolIsAmbiguous: false,
|
|
1948
|
+
numericCode: "478",
|
|
1949
|
+
status: "historic",
|
|
1950
|
+
replacedBy: "MRU",
|
|
1951
|
+
storageScale: 100,
|
|
1952
|
+
storageDigits: 2,
|
|
1953
|
+
displayDigits: 2,
|
|
1954
|
+
medusaDigits: 2,
|
|
1955
|
+
symbolAliases: [],
|
|
1956
|
+
localeHint: null,
|
|
1957
|
+
commaDecimal: false
|
|
1958
|
+
},
|
|
1959
|
+
{
|
|
1960
|
+
code: "MRU",
|
|
1961
|
+
name: "Mauritanian Ouguiya",
|
|
1962
|
+
symbol: "MRU",
|
|
1963
|
+
narrowSymbol: "MRU",
|
|
1964
|
+
symbolIsAmbiguous: false,
|
|
1965
|
+
numericCode: "929",
|
|
1966
|
+
status: "active",
|
|
1967
|
+
replacedBy: null,
|
|
1968
|
+
storageScale: 100,
|
|
1969
|
+
storageDigits: 2,
|
|
1970
|
+
displayDigits: 2,
|
|
1971
|
+
medusaDigits: 2,
|
|
1972
|
+
symbolAliases: [],
|
|
1973
|
+
localeHint: null,
|
|
1974
|
+
commaDecimal: false
|
|
1975
|
+
},
|
|
1976
|
+
{
|
|
1977
|
+
code: "MUR",
|
|
1978
|
+
name: "Mauritian Rupee",
|
|
1979
|
+
symbol: "MUR",
|
|
1980
|
+
narrowSymbol: "Rs",
|
|
1981
|
+
symbolIsAmbiguous: true,
|
|
1982
|
+
numericCode: "480",
|
|
1983
|
+
status: "active",
|
|
1984
|
+
replacedBy: null,
|
|
1985
|
+
storageScale: 100,
|
|
1986
|
+
storageDigits: 2,
|
|
1987
|
+
displayDigits: 2,
|
|
1988
|
+
medusaDigits: 0,
|
|
1989
|
+
symbolAliases: [],
|
|
1990
|
+
localeHint: null,
|
|
1991
|
+
commaDecimal: false
|
|
1992
|
+
},
|
|
1993
|
+
{
|
|
1994
|
+
code: "MVR",
|
|
1995
|
+
name: "Maldivian Rufiyaa",
|
|
1996
|
+
symbol: "MVR",
|
|
1997
|
+
narrowSymbol: "MVR",
|
|
1998
|
+
symbolIsAmbiguous: false,
|
|
1999
|
+
numericCode: "462",
|
|
2000
|
+
status: "active",
|
|
2001
|
+
replacedBy: null,
|
|
2002
|
+
storageScale: 100,
|
|
2003
|
+
storageDigits: 2,
|
|
2004
|
+
displayDigits: 2,
|
|
2005
|
+
medusaDigits: 2,
|
|
2006
|
+
symbolAliases: [],
|
|
2007
|
+
localeHint: null,
|
|
2008
|
+
commaDecimal: false
|
|
2009
|
+
},
|
|
2010
|
+
{
|
|
2011
|
+
code: "MWK",
|
|
2012
|
+
name: "Malawian Kwacha",
|
|
2013
|
+
symbol: "MWK",
|
|
2014
|
+
narrowSymbol: "MWK",
|
|
2015
|
+
symbolIsAmbiguous: false,
|
|
2016
|
+
numericCode: "454",
|
|
2017
|
+
status: "active",
|
|
2018
|
+
replacedBy: null,
|
|
2019
|
+
storageScale: 100,
|
|
2020
|
+
storageDigits: 2,
|
|
2021
|
+
displayDigits: 2,
|
|
2022
|
+
medusaDigits: 2,
|
|
2023
|
+
symbolAliases: [],
|
|
2024
|
+
localeHint: null,
|
|
2025
|
+
commaDecimal: false
|
|
2026
|
+
},
|
|
2027
|
+
{
|
|
2028
|
+
code: "MXN",
|
|
2029
|
+
name: "Mexican Peso",
|
|
2030
|
+
symbol: "MX$",
|
|
2031
|
+
narrowSymbol: "$",
|
|
2032
|
+
symbolIsAmbiguous: true,
|
|
2033
|
+
numericCode: "484",
|
|
2034
|
+
status: "active",
|
|
2035
|
+
replacedBy: null,
|
|
2036
|
+
storageScale: 100,
|
|
2037
|
+
storageDigits: 2,
|
|
2038
|
+
displayDigits: 2,
|
|
2039
|
+
medusaDigits: 2,
|
|
2040
|
+
symbolAliases: [
|
|
2041
|
+
"$",
|
|
2042
|
+
"MX$",
|
|
2043
|
+
"Mex$"
|
|
2044
|
+
],
|
|
2045
|
+
localeHint: null,
|
|
2046
|
+
commaDecimal: false
|
|
2047
|
+
},
|
|
2048
|
+
{
|
|
2049
|
+
code: "MYR",
|
|
2050
|
+
name: "Malaysian Ringgit",
|
|
2051
|
+
symbol: "MYR",
|
|
2052
|
+
narrowSymbol: "RM",
|
|
2053
|
+
symbolIsAmbiguous: false,
|
|
2054
|
+
numericCode: "458",
|
|
2055
|
+
status: "active",
|
|
2056
|
+
replacedBy: null,
|
|
2057
|
+
storageScale: 100,
|
|
2058
|
+
storageDigits: 2,
|
|
2059
|
+
displayDigits: 2,
|
|
2060
|
+
medusaDigits: 2,
|
|
2061
|
+
symbolAliases: ["RM"],
|
|
2062
|
+
localeHint: null,
|
|
2063
|
+
commaDecimal: false
|
|
2064
|
+
},
|
|
2065
|
+
{
|
|
2066
|
+
code: "MZN",
|
|
2067
|
+
name: "Mozambican Metical",
|
|
2068
|
+
symbol: "MZN",
|
|
2069
|
+
narrowSymbol: "MZN",
|
|
2070
|
+
symbolIsAmbiguous: false,
|
|
2071
|
+
numericCode: "943",
|
|
2072
|
+
status: "active",
|
|
2073
|
+
replacedBy: null,
|
|
2074
|
+
storageScale: 100,
|
|
2075
|
+
storageDigits: 2,
|
|
2076
|
+
displayDigits: 2,
|
|
2077
|
+
medusaDigits: 2,
|
|
2078
|
+
symbolAliases: [],
|
|
2079
|
+
localeHint: null,
|
|
2080
|
+
commaDecimal: false
|
|
2081
|
+
},
|
|
2082
|
+
{
|
|
2083
|
+
code: "NAD",
|
|
2084
|
+
name: "Namibian Dollar",
|
|
2085
|
+
symbol: "NAD",
|
|
2086
|
+
narrowSymbol: "$",
|
|
2087
|
+
symbolIsAmbiguous: true,
|
|
2088
|
+
numericCode: "516",
|
|
2089
|
+
status: "active",
|
|
2090
|
+
replacedBy: null,
|
|
2091
|
+
storageScale: 100,
|
|
2092
|
+
storageDigits: 2,
|
|
2093
|
+
displayDigits: 2,
|
|
2094
|
+
medusaDigits: 2,
|
|
2095
|
+
symbolAliases: [],
|
|
2096
|
+
localeHint: null,
|
|
2097
|
+
commaDecimal: false
|
|
2098
|
+
},
|
|
2099
|
+
{
|
|
2100
|
+
code: "NGN",
|
|
2101
|
+
name: "Nigerian Naira",
|
|
2102
|
+
symbol: "NGN",
|
|
2103
|
+
narrowSymbol: "₦",
|
|
2104
|
+
symbolIsAmbiguous: false,
|
|
2105
|
+
numericCode: "566",
|
|
2106
|
+
status: "active",
|
|
2107
|
+
replacedBy: null,
|
|
2108
|
+
storageScale: 100,
|
|
2109
|
+
storageDigits: 2,
|
|
2110
|
+
displayDigits: 2,
|
|
2111
|
+
medusaDigits: 2,
|
|
2112
|
+
symbolAliases: ["₦"],
|
|
2113
|
+
localeHint: null,
|
|
2114
|
+
commaDecimal: false
|
|
2115
|
+
},
|
|
2116
|
+
{
|
|
2117
|
+
code: "NIO",
|
|
2118
|
+
name: "Nicaraguan Córdoba",
|
|
2119
|
+
symbol: "NIO",
|
|
2120
|
+
narrowSymbol: "C$",
|
|
2121
|
+
symbolIsAmbiguous: false,
|
|
2122
|
+
numericCode: "558",
|
|
2123
|
+
status: "active",
|
|
2124
|
+
replacedBy: null,
|
|
2125
|
+
storageScale: 100,
|
|
2126
|
+
storageDigits: 2,
|
|
2127
|
+
displayDigits: 2,
|
|
2128
|
+
medusaDigits: 2,
|
|
2129
|
+
symbolAliases: [],
|
|
2130
|
+
localeHint: null,
|
|
2131
|
+
commaDecimal: false
|
|
2132
|
+
},
|
|
2133
|
+
{
|
|
2134
|
+
code: "NOK",
|
|
2135
|
+
name: "Norwegian Krone",
|
|
2136
|
+
symbol: "NOK",
|
|
2137
|
+
narrowSymbol: "kr",
|
|
2138
|
+
symbolIsAmbiguous: true,
|
|
2139
|
+
numericCode: "578",
|
|
2140
|
+
status: "active",
|
|
2141
|
+
replacedBy: null,
|
|
2142
|
+
storageScale: 100,
|
|
2143
|
+
storageDigits: 2,
|
|
2144
|
+
displayDigits: 2,
|
|
2145
|
+
medusaDigits: 2,
|
|
2146
|
+
symbolAliases: ["kr"],
|
|
2147
|
+
localeHint: "nb-NO",
|
|
2148
|
+
commaDecimal: false
|
|
2149
|
+
},
|
|
2150
|
+
{
|
|
2151
|
+
code: "NPR",
|
|
2152
|
+
name: "Nepalese Rupee",
|
|
2153
|
+
symbol: "NPR",
|
|
2154
|
+
narrowSymbol: "Rs",
|
|
2155
|
+
symbolIsAmbiguous: true,
|
|
2156
|
+
numericCode: "524",
|
|
2157
|
+
status: "active",
|
|
2158
|
+
replacedBy: null,
|
|
2159
|
+
storageScale: 100,
|
|
2160
|
+
storageDigits: 2,
|
|
2161
|
+
displayDigits: 2,
|
|
2162
|
+
medusaDigits: 2,
|
|
2163
|
+
symbolAliases: [],
|
|
2164
|
+
localeHint: null,
|
|
2165
|
+
commaDecimal: false
|
|
2166
|
+
},
|
|
2167
|
+
{
|
|
2168
|
+
code: "NZD",
|
|
2169
|
+
name: "New Zealand Dollar",
|
|
2170
|
+
symbol: "NZ$",
|
|
2171
|
+
narrowSymbol: "$",
|
|
2172
|
+
symbolIsAmbiguous: true,
|
|
2173
|
+
numericCode: "554",
|
|
2174
|
+
status: "active",
|
|
2175
|
+
replacedBy: null,
|
|
2176
|
+
storageScale: 100,
|
|
2177
|
+
storageDigits: 2,
|
|
2178
|
+
displayDigits: 2,
|
|
2179
|
+
medusaDigits: 2,
|
|
2180
|
+
symbolAliases: ["$", "NZ$"],
|
|
2181
|
+
localeHint: null,
|
|
2182
|
+
commaDecimal: false
|
|
2183
|
+
},
|
|
2184
|
+
{
|
|
2185
|
+
code: "OMR",
|
|
2186
|
+
name: "Omani Rial",
|
|
2187
|
+
symbol: "OMR",
|
|
2188
|
+
narrowSymbol: "OMR",
|
|
2189
|
+
symbolIsAmbiguous: false,
|
|
2190
|
+
numericCode: "512",
|
|
2191
|
+
status: "active",
|
|
2192
|
+
replacedBy: null,
|
|
2193
|
+
storageScale: 1e3,
|
|
2194
|
+
storageDigits: 3,
|
|
2195
|
+
displayDigits: 3,
|
|
2196
|
+
medusaDigits: 3,
|
|
2197
|
+
symbolAliases: [],
|
|
2198
|
+
localeHint: null,
|
|
2199
|
+
commaDecimal: false
|
|
2200
|
+
},
|
|
2201
|
+
{
|
|
2202
|
+
code: "PAB",
|
|
2203
|
+
name: "Panamanian Balboa",
|
|
2204
|
+
symbol: "PAB",
|
|
2205
|
+
narrowSymbol: "PAB",
|
|
2206
|
+
symbolIsAmbiguous: false,
|
|
2207
|
+
numericCode: "590",
|
|
2208
|
+
status: "active",
|
|
2209
|
+
replacedBy: null,
|
|
2210
|
+
storageScale: 100,
|
|
2211
|
+
storageDigits: 2,
|
|
2212
|
+
displayDigits: 2,
|
|
2213
|
+
medusaDigits: 2,
|
|
2214
|
+
symbolAliases: [],
|
|
2215
|
+
localeHint: null,
|
|
2216
|
+
commaDecimal: false
|
|
2217
|
+
},
|
|
2218
|
+
{
|
|
2219
|
+
code: "PEN",
|
|
2220
|
+
name: "Peruvian Sol",
|
|
2221
|
+
symbol: "PEN",
|
|
2222
|
+
narrowSymbol: "PEN",
|
|
2223
|
+
symbolIsAmbiguous: false,
|
|
2224
|
+
numericCode: "604",
|
|
2225
|
+
status: "active",
|
|
2226
|
+
replacedBy: null,
|
|
2227
|
+
storageScale: 100,
|
|
2228
|
+
storageDigits: 2,
|
|
2229
|
+
displayDigits: 2,
|
|
2230
|
+
medusaDigits: 2,
|
|
2231
|
+
symbolAliases: ["S/", "S/."],
|
|
2232
|
+
localeHint: null,
|
|
2233
|
+
commaDecimal: false
|
|
2234
|
+
},
|
|
2235
|
+
{
|
|
2236
|
+
code: "PGK",
|
|
2237
|
+
name: "Papua New Guinean Kina",
|
|
2238
|
+
symbol: "PGK",
|
|
2239
|
+
narrowSymbol: "PGK",
|
|
2240
|
+
symbolIsAmbiguous: false,
|
|
2241
|
+
numericCode: "598",
|
|
2242
|
+
status: "active",
|
|
2243
|
+
replacedBy: null,
|
|
2244
|
+
storageScale: 100,
|
|
2245
|
+
storageDigits: 2,
|
|
2246
|
+
displayDigits: 2,
|
|
2247
|
+
medusaDigits: 2,
|
|
2248
|
+
symbolAliases: [],
|
|
2249
|
+
localeHint: null,
|
|
2250
|
+
commaDecimal: false
|
|
2251
|
+
},
|
|
2252
|
+
{
|
|
2253
|
+
code: "PHP",
|
|
2254
|
+
name: "Philippine Peso",
|
|
2255
|
+
symbol: "₱",
|
|
2256
|
+
narrowSymbol: "₱",
|
|
2257
|
+
symbolIsAmbiguous: false,
|
|
2258
|
+
numericCode: "608",
|
|
2259
|
+
status: "active",
|
|
2260
|
+
replacedBy: null,
|
|
2261
|
+
storageScale: 100,
|
|
2262
|
+
storageDigits: 2,
|
|
2263
|
+
displayDigits: 2,
|
|
2264
|
+
medusaDigits: 2,
|
|
2265
|
+
symbolAliases: ["₱"],
|
|
2266
|
+
localeHint: null,
|
|
2267
|
+
commaDecimal: false
|
|
2268
|
+
},
|
|
2269
|
+
{
|
|
2270
|
+
code: "PKR",
|
|
2271
|
+
name: "Pakistani Rupee",
|
|
2272
|
+
symbol: "PKR",
|
|
2273
|
+
narrowSymbol: "Rs",
|
|
2274
|
+
symbolIsAmbiguous: true,
|
|
2275
|
+
numericCode: "586",
|
|
2276
|
+
status: "active",
|
|
2277
|
+
replacedBy: null,
|
|
2278
|
+
storageScale: 100,
|
|
2279
|
+
storageDigits: 2,
|
|
2280
|
+
displayDigits: 0,
|
|
2281
|
+
medusaDigits: 0,
|
|
2282
|
+
symbolAliases: ["Rs.", "Rs"],
|
|
2283
|
+
localeHint: null,
|
|
2284
|
+
commaDecimal: false
|
|
2285
|
+
},
|
|
2286
|
+
{
|
|
2287
|
+
code: "PLN",
|
|
2288
|
+
name: "Polish Zloty",
|
|
2289
|
+
symbol: "PLN",
|
|
2290
|
+
narrowSymbol: "zł",
|
|
2291
|
+
symbolIsAmbiguous: false,
|
|
2292
|
+
numericCode: "985",
|
|
2293
|
+
status: "active",
|
|
2294
|
+
replacedBy: null,
|
|
2295
|
+
storageScale: 100,
|
|
2296
|
+
storageDigits: 2,
|
|
2297
|
+
displayDigits: 2,
|
|
2298
|
+
medusaDigits: 2,
|
|
2299
|
+
symbolAliases: ["zł"],
|
|
2300
|
+
localeHint: "pl-PL",
|
|
2301
|
+
commaDecimal: false
|
|
2302
|
+
},
|
|
2303
|
+
{
|
|
2304
|
+
code: "PYG",
|
|
2305
|
+
name: "Paraguayan Guarani",
|
|
2306
|
+
symbol: "PYG",
|
|
2307
|
+
narrowSymbol: "₲",
|
|
2308
|
+
symbolIsAmbiguous: false,
|
|
2309
|
+
numericCode: "600",
|
|
2310
|
+
status: "active",
|
|
2311
|
+
replacedBy: null,
|
|
2312
|
+
storageScale: 100,
|
|
2313
|
+
storageDigits: 0,
|
|
2314
|
+
displayDigits: 0,
|
|
2315
|
+
medusaDigits: 0,
|
|
2316
|
+
symbolAliases: [],
|
|
2317
|
+
localeHint: null,
|
|
2318
|
+
commaDecimal: false
|
|
2319
|
+
},
|
|
2320
|
+
{
|
|
2321
|
+
code: "QAR",
|
|
2322
|
+
name: "Qatari Riyal",
|
|
2323
|
+
symbol: "QAR",
|
|
2324
|
+
narrowSymbol: "QAR",
|
|
2325
|
+
symbolIsAmbiguous: false,
|
|
2326
|
+
numericCode: "634",
|
|
2327
|
+
status: "active",
|
|
2328
|
+
replacedBy: null,
|
|
2329
|
+
storageScale: 100,
|
|
2330
|
+
storageDigits: 2,
|
|
2331
|
+
displayDigits: 2,
|
|
2332
|
+
medusaDigits: 2,
|
|
2333
|
+
symbolAliases: [],
|
|
2334
|
+
localeHint: null,
|
|
2335
|
+
commaDecimal: false
|
|
2336
|
+
},
|
|
2337
|
+
{
|
|
2338
|
+
code: "RON",
|
|
2339
|
+
name: "Romanian Leu",
|
|
2340
|
+
symbol: "RON",
|
|
2341
|
+
narrowSymbol: "lei",
|
|
2342
|
+
symbolIsAmbiguous: false,
|
|
2343
|
+
numericCode: "946",
|
|
2344
|
+
status: "active",
|
|
2345
|
+
replacedBy: null,
|
|
2346
|
+
storageScale: 100,
|
|
2347
|
+
storageDigits: 2,
|
|
2348
|
+
displayDigits: 2,
|
|
2349
|
+
medusaDigits: 2,
|
|
2350
|
+
symbolAliases: ["lei", "Lei"],
|
|
2351
|
+
localeHint: "ro-RO",
|
|
2352
|
+
commaDecimal: false
|
|
2353
|
+
},
|
|
2354
|
+
{
|
|
2355
|
+
code: "RSD",
|
|
2356
|
+
name: "Serbian Dinar",
|
|
2357
|
+
symbol: "RSD",
|
|
2358
|
+
narrowSymbol: "RSD",
|
|
2359
|
+
symbolIsAmbiguous: false,
|
|
2360
|
+
numericCode: "941",
|
|
2361
|
+
status: "active",
|
|
2362
|
+
replacedBy: null,
|
|
2363
|
+
storageScale: 100,
|
|
2364
|
+
storageDigits: 2,
|
|
2365
|
+
displayDigits: 2,
|
|
2366
|
+
medusaDigits: 0,
|
|
2367
|
+
symbolAliases: [],
|
|
2368
|
+
localeHint: null,
|
|
2369
|
+
commaDecimal: false
|
|
2370
|
+
},
|
|
2371
|
+
{
|
|
2372
|
+
code: "RUB",
|
|
2373
|
+
name: "Russian Ruble",
|
|
2374
|
+
symbol: "RUB",
|
|
2375
|
+
narrowSymbol: "₽",
|
|
2376
|
+
symbolIsAmbiguous: false,
|
|
2377
|
+
numericCode: "643",
|
|
2378
|
+
status: "active",
|
|
2379
|
+
replacedBy: null,
|
|
2380
|
+
storageScale: 100,
|
|
2381
|
+
storageDigits: 2,
|
|
2382
|
+
displayDigits: 2,
|
|
2383
|
+
medusaDigits: 2,
|
|
2384
|
+
symbolAliases: [
|
|
2385
|
+
"₽",
|
|
2386
|
+
"руб.",
|
|
2387
|
+
"руб"
|
|
2388
|
+
],
|
|
2389
|
+
localeHint: "ru-RU",
|
|
2390
|
+
commaDecimal: false
|
|
2391
|
+
},
|
|
2392
|
+
{
|
|
2393
|
+
code: "RWF",
|
|
2394
|
+
name: "Rwandan Franc",
|
|
2395
|
+
symbol: "RWF",
|
|
2396
|
+
narrowSymbol: "RF",
|
|
2397
|
+
symbolIsAmbiguous: false,
|
|
2398
|
+
numericCode: "646",
|
|
2399
|
+
status: "active",
|
|
2400
|
+
replacedBy: null,
|
|
2401
|
+
storageScale: 100,
|
|
2402
|
+
storageDigits: 0,
|
|
2403
|
+
displayDigits: 0,
|
|
2404
|
+
medusaDigits: 0,
|
|
2405
|
+
symbolAliases: [],
|
|
2406
|
+
localeHint: null,
|
|
2407
|
+
commaDecimal: false
|
|
2408
|
+
},
|
|
2409
|
+
{
|
|
2410
|
+
code: "SAR",
|
|
2411
|
+
name: "Saudi Riyal",
|
|
2412
|
+
symbol: "SAR",
|
|
2413
|
+
narrowSymbol: "SAR",
|
|
2414
|
+
symbolIsAmbiguous: false,
|
|
2415
|
+
numericCode: "682",
|
|
2416
|
+
status: "active",
|
|
2417
|
+
replacedBy: null,
|
|
2418
|
+
storageScale: 100,
|
|
2419
|
+
storageDigits: 2,
|
|
2420
|
+
displayDigits: 2,
|
|
2421
|
+
medusaDigits: 2,
|
|
2422
|
+
symbolAliases: [
|
|
2423
|
+
"SAR",
|
|
2424
|
+
"﷼",
|
|
2425
|
+
"SR"
|
|
2426
|
+
],
|
|
2427
|
+
localeHint: null,
|
|
2428
|
+
commaDecimal: false
|
|
2429
|
+
},
|
|
2430
|
+
{
|
|
2431
|
+
code: "SBD",
|
|
2432
|
+
name: "Solomon Islands Dollar",
|
|
2433
|
+
symbol: "SBD",
|
|
2434
|
+
narrowSymbol: "$",
|
|
2435
|
+
symbolIsAmbiguous: true,
|
|
2436
|
+
numericCode: "090",
|
|
2437
|
+
status: "active",
|
|
2438
|
+
replacedBy: null,
|
|
2439
|
+
storageScale: 100,
|
|
2440
|
+
storageDigits: 2,
|
|
2441
|
+
displayDigits: 2,
|
|
2442
|
+
medusaDigits: 2,
|
|
2443
|
+
symbolAliases: [],
|
|
2444
|
+
localeHint: null,
|
|
2445
|
+
commaDecimal: false
|
|
2446
|
+
},
|
|
2447
|
+
{
|
|
2448
|
+
code: "SCR",
|
|
2449
|
+
name: "Seychellois Rupee",
|
|
2450
|
+
symbol: "SCR",
|
|
2451
|
+
narrowSymbol: "SCR",
|
|
2452
|
+
symbolIsAmbiguous: false,
|
|
2453
|
+
numericCode: "690",
|
|
2454
|
+
status: "active",
|
|
2455
|
+
replacedBy: null,
|
|
2456
|
+
storageScale: 100,
|
|
2457
|
+
storageDigits: 2,
|
|
2458
|
+
displayDigits: 2,
|
|
2459
|
+
medusaDigits: 2,
|
|
2460
|
+
symbolAliases: [],
|
|
2461
|
+
localeHint: null,
|
|
2462
|
+
commaDecimal: false
|
|
2463
|
+
},
|
|
2464
|
+
{
|
|
2465
|
+
code: "SDG",
|
|
2466
|
+
name: "Sudanese Pound",
|
|
2467
|
+
symbol: "SDG",
|
|
2468
|
+
narrowSymbol: "SDG",
|
|
2469
|
+
symbolIsAmbiguous: false,
|
|
2470
|
+
numericCode: "938",
|
|
2471
|
+
status: "active",
|
|
2472
|
+
replacedBy: null,
|
|
2473
|
+
storageScale: 100,
|
|
2474
|
+
storageDigits: 2,
|
|
2475
|
+
displayDigits: 2,
|
|
2476
|
+
medusaDigits: 2,
|
|
2477
|
+
symbolAliases: [],
|
|
2478
|
+
localeHint: null,
|
|
2479
|
+
commaDecimal: false
|
|
2480
|
+
},
|
|
2481
|
+
{
|
|
2482
|
+
code: "SEK",
|
|
2483
|
+
name: "Swedish Krona",
|
|
2484
|
+
symbol: "SEK",
|
|
2485
|
+
narrowSymbol: "kr",
|
|
2486
|
+
symbolIsAmbiguous: true,
|
|
2487
|
+
numericCode: "752",
|
|
2488
|
+
status: "active",
|
|
2489
|
+
replacedBy: null,
|
|
2490
|
+
storageScale: 100,
|
|
2491
|
+
storageDigits: 2,
|
|
2492
|
+
displayDigits: 2,
|
|
2493
|
+
medusaDigits: 2,
|
|
2494
|
+
symbolAliases: ["kr"],
|
|
2495
|
+
localeHint: "sv-SE",
|
|
2496
|
+
commaDecimal: false
|
|
2497
|
+
},
|
|
2498
|
+
{
|
|
2499
|
+
code: "SGD",
|
|
2500
|
+
name: "Singapore Dollar",
|
|
2501
|
+
symbol: "SGD",
|
|
2502
|
+
narrowSymbol: "$",
|
|
2503
|
+
symbolIsAmbiguous: true,
|
|
2504
|
+
numericCode: "702",
|
|
2505
|
+
status: "active",
|
|
2506
|
+
replacedBy: null,
|
|
2507
|
+
storageScale: 100,
|
|
2508
|
+
storageDigits: 2,
|
|
2509
|
+
displayDigits: 2,
|
|
2510
|
+
medusaDigits: 2,
|
|
2511
|
+
symbolAliases: ["$", "S$"],
|
|
2512
|
+
localeHint: null,
|
|
2513
|
+
commaDecimal: false
|
|
2514
|
+
},
|
|
2515
|
+
{
|
|
2516
|
+
code: "SHP",
|
|
2517
|
+
name: "St. Helena Pound",
|
|
2518
|
+
symbol: "SHP",
|
|
2519
|
+
narrowSymbol: "£",
|
|
2520
|
+
symbolIsAmbiguous: true,
|
|
2521
|
+
numericCode: "654",
|
|
2522
|
+
status: "active",
|
|
2523
|
+
replacedBy: null,
|
|
2524
|
+
storageScale: 100,
|
|
2525
|
+
storageDigits: 2,
|
|
2526
|
+
displayDigits: 2,
|
|
2527
|
+
medusaDigits: 2,
|
|
2528
|
+
symbolAliases: [],
|
|
2529
|
+
localeHint: null,
|
|
2530
|
+
commaDecimal: false
|
|
2531
|
+
},
|
|
2532
|
+
{
|
|
2533
|
+
code: "SLE",
|
|
2534
|
+
name: "Sierra Leonean Leone",
|
|
2535
|
+
symbol: "SLE",
|
|
2536
|
+
narrowSymbol: "SLE",
|
|
2537
|
+
symbolIsAmbiguous: false,
|
|
2538
|
+
numericCode: null,
|
|
2539
|
+
status: "active",
|
|
2540
|
+
replacedBy: null,
|
|
2541
|
+
storageScale: 100,
|
|
2542
|
+
storageDigits: 2,
|
|
2543
|
+
displayDigits: 2,
|
|
2544
|
+
medusaDigits: 2,
|
|
2545
|
+
symbolAliases: [],
|
|
2546
|
+
localeHint: null,
|
|
2547
|
+
commaDecimal: false
|
|
2548
|
+
},
|
|
2549
|
+
{
|
|
2550
|
+
code: "SLL",
|
|
2551
|
+
name: "Sierra Leonean Leone (1964–2022)",
|
|
2552
|
+
symbol: "SLL",
|
|
2553
|
+
narrowSymbol: "SLL",
|
|
2554
|
+
symbolIsAmbiguous: false,
|
|
2555
|
+
numericCode: "694",
|
|
2556
|
+
status: "historic",
|
|
2557
|
+
replacedBy: "SLE",
|
|
2558
|
+
storageScale: 100,
|
|
2559
|
+
storageDigits: 2,
|
|
2560
|
+
displayDigits: 2,
|
|
2561
|
+
medusaDigits: 2,
|
|
2562
|
+
symbolAliases: [],
|
|
2563
|
+
localeHint: null,
|
|
2564
|
+
commaDecimal: false
|
|
2565
|
+
},
|
|
2566
|
+
{
|
|
2567
|
+
code: "SOS",
|
|
2568
|
+
name: "Somali Shilling",
|
|
2569
|
+
symbol: "SOS",
|
|
2570
|
+
narrowSymbol: "SOS",
|
|
2571
|
+
symbolIsAmbiguous: false,
|
|
2572
|
+
numericCode: "706",
|
|
2573
|
+
status: "active",
|
|
2574
|
+
replacedBy: null,
|
|
2575
|
+
storageScale: 100,
|
|
2576
|
+
storageDigits: 2,
|
|
2577
|
+
displayDigits: 0,
|
|
2578
|
+
medusaDigits: 0,
|
|
2579
|
+
symbolAliases: [],
|
|
2580
|
+
localeHint: null,
|
|
2581
|
+
commaDecimal: false
|
|
2582
|
+
},
|
|
2583
|
+
{
|
|
2584
|
+
code: "SRD",
|
|
2585
|
+
name: "Surinamese Dollar",
|
|
2586
|
+
symbol: "SRD",
|
|
2587
|
+
narrowSymbol: "$",
|
|
2588
|
+
symbolIsAmbiguous: true,
|
|
2589
|
+
numericCode: "968",
|
|
2590
|
+
status: "active",
|
|
2591
|
+
replacedBy: null,
|
|
2592
|
+
storageScale: 100,
|
|
2593
|
+
storageDigits: 2,
|
|
2594
|
+
displayDigits: 2,
|
|
2595
|
+
medusaDigits: 2,
|
|
2596
|
+
symbolAliases: [],
|
|
2597
|
+
localeHint: null,
|
|
2598
|
+
commaDecimal: false
|
|
2599
|
+
},
|
|
2600
|
+
{
|
|
2601
|
+
code: "SSP",
|
|
2602
|
+
name: "South Sudanese Pound",
|
|
2603
|
+
symbol: "SSP",
|
|
2604
|
+
narrowSymbol: "£",
|
|
2605
|
+
symbolIsAmbiguous: true,
|
|
2606
|
+
numericCode: "728",
|
|
2607
|
+
status: "active",
|
|
2608
|
+
replacedBy: null,
|
|
2609
|
+
storageScale: 100,
|
|
2610
|
+
storageDigits: 2,
|
|
2611
|
+
displayDigits: 2,
|
|
2612
|
+
medusaDigits: 2,
|
|
2613
|
+
symbolAliases: [],
|
|
2614
|
+
localeHint: null,
|
|
2615
|
+
commaDecimal: false
|
|
2616
|
+
},
|
|
2617
|
+
{
|
|
2618
|
+
code: "STD",
|
|
2619
|
+
name: "São Tomé & Príncipe Dobra (1977–2017)",
|
|
2620
|
+
symbol: "STD",
|
|
2621
|
+
narrowSymbol: "STD",
|
|
2622
|
+
symbolIsAmbiguous: false,
|
|
2623
|
+
numericCode: "678",
|
|
2624
|
+
status: "historic",
|
|
2625
|
+
replacedBy: "STN",
|
|
2626
|
+
storageScale: 100,
|
|
2627
|
+
storageDigits: 2,
|
|
2628
|
+
displayDigits: 2,
|
|
2629
|
+
medusaDigits: 2,
|
|
2630
|
+
symbolAliases: [],
|
|
2631
|
+
localeHint: null,
|
|
2632
|
+
commaDecimal: false
|
|
2633
|
+
},
|
|
2634
|
+
{
|
|
2635
|
+
code: "STN",
|
|
2636
|
+
name: "São Tomé & Príncipe Dobra",
|
|
2637
|
+
symbol: "STN",
|
|
2638
|
+
narrowSymbol: "Db",
|
|
2639
|
+
symbolIsAmbiguous: false,
|
|
2640
|
+
numericCode: "930",
|
|
2641
|
+
status: "active",
|
|
2642
|
+
replacedBy: null,
|
|
2643
|
+
storageScale: 100,
|
|
2644
|
+
storageDigits: 2,
|
|
2645
|
+
displayDigits: 2,
|
|
2646
|
+
medusaDigits: 2,
|
|
2647
|
+
symbolAliases: [],
|
|
2648
|
+
localeHint: null,
|
|
2649
|
+
commaDecimal: false
|
|
2650
|
+
},
|
|
2651
|
+
{
|
|
2652
|
+
code: "SVC",
|
|
2653
|
+
name: "Salvadoran Colón",
|
|
2654
|
+
symbol: "SVC",
|
|
2655
|
+
narrowSymbol: "SVC",
|
|
2656
|
+
symbolIsAmbiguous: false,
|
|
2657
|
+
numericCode: null,
|
|
2658
|
+
status: "active",
|
|
2659
|
+
replacedBy: null,
|
|
2660
|
+
storageScale: 100,
|
|
2661
|
+
storageDigits: 2,
|
|
2662
|
+
displayDigits: 2,
|
|
2663
|
+
medusaDigits: 2,
|
|
2664
|
+
symbolAliases: [],
|
|
2665
|
+
localeHint: null,
|
|
2666
|
+
commaDecimal: false
|
|
2667
|
+
},
|
|
2668
|
+
{
|
|
2669
|
+
code: "SYP",
|
|
2670
|
+
name: "Syrian Pound",
|
|
2671
|
+
symbol: "SYP",
|
|
2672
|
+
narrowSymbol: "£",
|
|
2673
|
+
symbolIsAmbiguous: true,
|
|
2674
|
+
numericCode: "760",
|
|
2675
|
+
status: "active",
|
|
2676
|
+
replacedBy: null,
|
|
2677
|
+
storageScale: 100,
|
|
2678
|
+
storageDigits: 2,
|
|
2679
|
+
displayDigits: 0,
|
|
2680
|
+
medusaDigits: 0,
|
|
2681
|
+
symbolAliases: [],
|
|
2682
|
+
localeHint: null,
|
|
2683
|
+
commaDecimal: false
|
|
2684
|
+
},
|
|
2685
|
+
{
|
|
2686
|
+
code: "SZL",
|
|
2687
|
+
name: "Swazi Lilangeni",
|
|
2688
|
+
symbol: "SZL",
|
|
2689
|
+
narrowSymbol: "SZL",
|
|
2690
|
+
symbolIsAmbiguous: false,
|
|
2691
|
+
numericCode: "748",
|
|
2692
|
+
status: "active",
|
|
2693
|
+
replacedBy: null,
|
|
2694
|
+
storageScale: 100,
|
|
2695
|
+
storageDigits: 2,
|
|
2696
|
+
displayDigits: 2,
|
|
2697
|
+
medusaDigits: 2,
|
|
2698
|
+
symbolAliases: [],
|
|
2699
|
+
localeHint: null,
|
|
2700
|
+
commaDecimal: false
|
|
2701
|
+
},
|
|
2702
|
+
{
|
|
2703
|
+
code: "THB",
|
|
2704
|
+
name: "Thai Baht",
|
|
2705
|
+
symbol: "THB",
|
|
2706
|
+
narrowSymbol: "฿",
|
|
2707
|
+
symbolIsAmbiguous: false,
|
|
2708
|
+
numericCode: "764",
|
|
2709
|
+
status: "active",
|
|
2710
|
+
replacedBy: null,
|
|
2711
|
+
storageScale: 100,
|
|
2712
|
+
storageDigits: 2,
|
|
2713
|
+
displayDigits: 2,
|
|
2714
|
+
medusaDigits: 2,
|
|
2715
|
+
symbolAliases: ["฿"],
|
|
2716
|
+
localeHint: null,
|
|
2717
|
+
commaDecimal: false
|
|
2718
|
+
},
|
|
2719
|
+
{
|
|
2720
|
+
code: "TJS",
|
|
2721
|
+
name: "Tajikistani Somoni",
|
|
2722
|
+
symbol: "TJS",
|
|
2723
|
+
narrowSymbol: "TJS",
|
|
2724
|
+
symbolIsAmbiguous: false,
|
|
2725
|
+
numericCode: "972",
|
|
2726
|
+
status: "active",
|
|
2727
|
+
replacedBy: null,
|
|
2728
|
+
storageScale: 100,
|
|
2729
|
+
storageDigits: 2,
|
|
2730
|
+
displayDigits: 2,
|
|
2731
|
+
medusaDigits: 2,
|
|
2732
|
+
symbolAliases: [],
|
|
2733
|
+
localeHint: null,
|
|
2734
|
+
commaDecimal: false
|
|
2735
|
+
},
|
|
2736
|
+
{
|
|
2737
|
+
code: "TMT",
|
|
2738
|
+
name: "Turkmenistani Manat",
|
|
2739
|
+
symbol: "TMT",
|
|
2740
|
+
narrowSymbol: "TMT",
|
|
2741
|
+
symbolIsAmbiguous: false,
|
|
2742
|
+
numericCode: "934",
|
|
2743
|
+
status: "active",
|
|
2744
|
+
replacedBy: null,
|
|
2745
|
+
storageScale: 100,
|
|
2746
|
+
storageDigits: 2,
|
|
2747
|
+
displayDigits: 2,
|
|
2748
|
+
medusaDigits: 2,
|
|
2749
|
+
symbolAliases: [],
|
|
2750
|
+
localeHint: null,
|
|
2751
|
+
commaDecimal: false
|
|
2752
|
+
},
|
|
2753
|
+
{
|
|
2754
|
+
code: "TND",
|
|
2755
|
+
name: "Tunisian Dinar",
|
|
2756
|
+
symbol: "TND",
|
|
2757
|
+
narrowSymbol: "TND",
|
|
2758
|
+
symbolIsAmbiguous: false,
|
|
2759
|
+
numericCode: "788",
|
|
2760
|
+
status: "active",
|
|
2761
|
+
replacedBy: null,
|
|
2762
|
+
storageScale: 1e3,
|
|
2763
|
+
storageDigits: 3,
|
|
2764
|
+
displayDigits: 3,
|
|
2765
|
+
medusaDigits: 3,
|
|
2766
|
+
symbolAliases: [],
|
|
2767
|
+
localeHint: null,
|
|
2768
|
+
commaDecimal: true
|
|
2769
|
+
},
|
|
2770
|
+
{
|
|
2771
|
+
code: "TOP",
|
|
2772
|
+
name: "Tongan Paʻanga",
|
|
2773
|
+
symbol: "TOP",
|
|
2774
|
+
narrowSymbol: "T$",
|
|
2775
|
+
symbolIsAmbiguous: false,
|
|
2776
|
+
numericCode: "776",
|
|
2777
|
+
status: "active",
|
|
2778
|
+
replacedBy: null,
|
|
2779
|
+
storageScale: 100,
|
|
2780
|
+
storageDigits: 2,
|
|
2781
|
+
displayDigits: 2,
|
|
2782
|
+
medusaDigits: 2,
|
|
2783
|
+
symbolAliases: [],
|
|
2784
|
+
localeHint: null,
|
|
2785
|
+
commaDecimal: false
|
|
2786
|
+
},
|
|
2787
|
+
{
|
|
2788
|
+
code: "TRY",
|
|
2789
|
+
name: "Turkish Lira",
|
|
2790
|
+
symbol: "TRY",
|
|
2791
|
+
narrowSymbol: "₺",
|
|
2792
|
+
symbolIsAmbiguous: false,
|
|
2793
|
+
numericCode: "949",
|
|
2794
|
+
status: "active",
|
|
2795
|
+
replacedBy: null,
|
|
2796
|
+
storageScale: 100,
|
|
2797
|
+
storageDigits: 2,
|
|
2798
|
+
displayDigits: 2,
|
|
2799
|
+
medusaDigits: 2,
|
|
2800
|
+
symbolAliases: ["₺", "TL"],
|
|
2801
|
+
localeHint: "tr-TR",
|
|
2802
|
+
commaDecimal: false
|
|
2803
|
+
},
|
|
2804
|
+
{
|
|
2805
|
+
code: "TTD",
|
|
2806
|
+
name: "Trinidad & Tobago Dollar",
|
|
2807
|
+
symbol: "TTD",
|
|
2808
|
+
narrowSymbol: "$",
|
|
2809
|
+
symbolIsAmbiguous: true,
|
|
2810
|
+
numericCode: "780",
|
|
2811
|
+
status: "active",
|
|
2812
|
+
replacedBy: null,
|
|
2813
|
+
storageScale: 100,
|
|
2814
|
+
storageDigits: 2,
|
|
2815
|
+
displayDigits: 2,
|
|
2816
|
+
medusaDigits: 2,
|
|
2817
|
+
symbolAliases: [],
|
|
2818
|
+
localeHint: null,
|
|
2819
|
+
commaDecimal: false
|
|
2820
|
+
},
|
|
2821
|
+
{
|
|
2822
|
+
code: "TWD",
|
|
2823
|
+
name: "New Taiwan Dollar",
|
|
2824
|
+
symbol: "NT$",
|
|
2825
|
+
narrowSymbol: "$",
|
|
2826
|
+
symbolIsAmbiguous: true,
|
|
2827
|
+
numericCode: "901",
|
|
2828
|
+
status: "active",
|
|
2829
|
+
replacedBy: null,
|
|
2830
|
+
storageScale: 100,
|
|
2831
|
+
storageDigits: 2,
|
|
2832
|
+
displayDigits: 2,
|
|
2833
|
+
medusaDigits: 2,
|
|
2834
|
+
symbolAliases: ["NT$", "$"],
|
|
2835
|
+
localeHint: null,
|
|
2836
|
+
commaDecimal: false
|
|
2837
|
+
},
|
|
2838
|
+
{
|
|
2839
|
+
code: "TZS",
|
|
2840
|
+
name: "Tanzanian Shilling",
|
|
2841
|
+
symbol: "TZS",
|
|
2842
|
+
narrowSymbol: "TZS",
|
|
2843
|
+
symbolIsAmbiguous: false,
|
|
2844
|
+
numericCode: "834",
|
|
2845
|
+
status: "active",
|
|
2846
|
+
replacedBy: null,
|
|
2847
|
+
storageScale: 100,
|
|
2848
|
+
storageDigits: 2,
|
|
2849
|
+
displayDigits: 2,
|
|
2850
|
+
medusaDigits: 0,
|
|
2851
|
+
symbolAliases: [],
|
|
2852
|
+
localeHint: null,
|
|
2853
|
+
commaDecimal: false
|
|
2854
|
+
},
|
|
2855
|
+
{
|
|
2856
|
+
code: "UAH",
|
|
2857
|
+
name: "Ukrainian Hryvnia",
|
|
2858
|
+
symbol: "UAH",
|
|
2859
|
+
narrowSymbol: "₴",
|
|
2860
|
+
symbolIsAmbiguous: false,
|
|
2861
|
+
numericCode: "980",
|
|
2862
|
+
status: "active",
|
|
2863
|
+
replacedBy: null,
|
|
2864
|
+
storageScale: 100,
|
|
2865
|
+
storageDigits: 2,
|
|
2866
|
+
displayDigits: 2,
|
|
2867
|
+
medusaDigits: 2,
|
|
2868
|
+
symbolAliases: ["₴", "грн"],
|
|
2869
|
+
localeHint: null,
|
|
2870
|
+
commaDecimal: false
|
|
2871
|
+
},
|
|
2872
|
+
{
|
|
2873
|
+
code: "UGX",
|
|
2874
|
+
name: "Ugandan Shilling",
|
|
2875
|
+
symbol: "UGX",
|
|
2876
|
+
narrowSymbol: "UGX",
|
|
2877
|
+
symbolIsAmbiguous: false,
|
|
2878
|
+
numericCode: "800",
|
|
2879
|
+
status: "active",
|
|
2880
|
+
replacedBy: null,
|
|
2881
|
+
storageScale: 100,
|
|
2882
|
+
storageDigits: 0,
|
|
2883
|
+
displayDigits: 0,
|
|
2884
|
+
medusaDigits: 0,
|
|
2885
|
+
symbolAliases: [],
|
|
2886
|
+
localeHint: null,
|
|
2887
|
+
commaDecimal: false
|
|
2888
|
+
},
|
|
2889
|
+
{
|
|
2890
|
+
code: "USD",
|
|
2891
|
+
name: "US Dollar",
|
|
2892
|
+
symbol: "$",
|
|
2893
|
+
narrowSymbol: "$",
|
|
2894
|
+
symbolIsAmbiguous: true,
|
|
2895
|
+
numericCode: "840",
|
|
2896
|
+
status: "active",
|
|
2897
|
+
replacedBy: null,
|
|
2898
|
+
storageScale: 100,
|
|
2899
|
+
storageDigits: 2,
|
|
2900
|
+
displayDigits: 2,
|
|
2901
|
+
medusaDigits: 2,
|
|
2902
|
+
symbolAliases: ["$", "US$"],
|
|
2903
|
+
localeHint: null,
|
|
2904
|
+
commaDecimal: false
|
|
2905
|
+
},
|
|
2906
|
+
{
|
|
2907
|
+
code: "UYU",
|
|
2908
|
+
name: "Uruguayan Peso",
|
|
2909
|
+
symbol: "UYU",
|
|
2910
|
+
narrowSymbol: "$",
|
|
2911
|
+
symbolIsAmbiguous: true,
|
|
2912
|
+
numericCode: "858",
|
|
2913
|
+
status: "active",
|
|
2914
|
+
replacedBy: null,
|
|
2915
|
+
storageScale: 100,
|
|
2916
|
+
storageDigits: 2,
|
|
2917
|
+
displayDigits: 2,
|
|
2918
|
+
medusaDigits: 2,
|
|
2919
|
+
symbolAliases: [],
|
|
2920
|
+
localeHint: null,
|
|
2921
|
+
commaDecimal: false
|
|
2922
|
+
},
|
|
2923
|
+
{
|
|
2924
|
+
code: "UZS",
|
|
2925
|
+
name: "Uzbekistani Som",
|
|
2926
|
+
symbol: "UZS",
|
|
2927
|
+
narrowSymbol: "UZS",
|
|
2928
|
+
symbolIsAmbiguous: false,
|
|
2929
|
+
numericCode: "860",
|
|
2930
|
+
status: "active",
|
|
2931
|
+
replacedBy: null,
|
|
2932
|
+
storageScale: 100,
|
|
2933
|
+
storageDigits: 2,
|
|
2934
|
+
displayDigits: 2,
|
|
2935
|
+
medusaDigits: 0,
|
|
2936
|
+
symbolAliases: [],
|
|
2937
|
+
localeHint: null,
|
|
2938
|
+
commaDecimal: false
|
|
2939
|
+
},
|
|
2940
|
+
{
|
|
2941
|
+
code: "VED",
|
|
2942
|
+
name: "Bolívar Soberano",
|
|
2943
|
+
symbol: "VED",
|
|
2944
|
+
narrowSymbol: "VED",
|
|
2945
|
+
symbolIsAmbiguous: false,
|
|
2946
|
+
numericCode: "926",
|
|
2947
|
+
status: "active",
|
|
2948
|
+
replacedBy: null,
|
|
2949
|
+
storageScale: 100,
|
|
2950
|
+
storageDigits: 2,
|
|
2951
|
+
displayDigits: 2,
|
|
2952
|
+
medusaDigits: 2,
|
|
2953
|
+
symbolAliases: [],
|
|
2954
|
+
localeHint: null,
|
|
2955
|
+
commaDecimal: false
|
|
2956
|
+
},
|
|
2957
|
+
{
|
|
2958
|
+
code: "VEF",
|
|
2959
|
+
name: "Venezuelan Bolívar (2008–2018)",
|
|
2960
|
+
symbol: "VEF",
|
|
2961
|
+
narrowSymbol: "Bs",
|
|
2962
|
+
symbolIsAmbiguous: true,
|
|
2963
|
+
numericCode: "937",
|
|
2964
|
+
status: "historic",
|
|
2965
|
+
replacedBy: "VES",
|
|
2966
|
+
storageScale: 100,
|
|
2967
|
+
storageDigits: 2,
|
|
2968
|
+
displayDigits: 2,
|
|
2969
|
+
medusaDigits: 2,
|
|
2970
|
+
symbolAliases: [],
|
|
2971
|
+
localeHint: null,
|
|
2972
|
+
commaDecimal: false
|
|
2973
|
+
},
|
|
2974
|
+
{
|
|
2975
|
+
code: "VES",
|
|
2976
|
+
name: "Venezuelan Bolívar",
|
|
2977
|
+
symbol: "VES",
|
|
2978
|
+
narrowSymbol: "VES",
|
|
2979
|
+
symbolIsAmbiguous: false,
|
|
2980
|
+
numericCode: "928",
|
|
2981
|
+
status: "active",
|
|
2982
|
+
replacedBy: null,
|
|
2983
|
+
storageScale: 100,
|
|
2984
|
+
storageDigits: 2,
|
|
2985
|
+
displayDigits: 2,
|
|
2986
|
+
medusaDigits: 2,
|
|
2987
|
+
symbolAliases: [],
|
|
2988
|
+
localeHint: null,
|
|
2989
|
+
commaDecimal: false
|
|
2990
|
+
},
|
|
2991
|
+
{
|
|
2992
|
+
code: "VND",
|
|
2993
|
+
name: "Vietnamese Dong",
|
|
2994
|
+
symbol: "₫",
|
|
2995
|
+
narrowSymbol: "₫",
|
|
2996
|
+
symbolIsAmbiguous: false,
|
|
2997
|
+
numericCode: "704",
|
|
2998
|
+
status: "active",
|
|
2999
|
+
replacedBy: null,
|
|
3000
|
+
storageScale: 100,
|
|
3001
|
+
storageDigits: 0,
|
|
3002
|
+
displayDigits: 0,
|
|
3003
|
+
medusaDigits: 0,
|
|
3004
|
+
symbolAliases: ["₫", "đ"],
|
|
3005
|
+
localeHint: null,
|
|
3006
|
+
commaDecimal: false
|
|
3007
|
+
},
|
|
3008
|
+
{
|
|
3009
|
+
code: "VUV",
|
|
3010
|
+
name: "Vanuatu Vatu",
|
|
3011
|
+
symbol: "VUV",
|
|
3012
|
+
narrowSymbol: "VUV",
|
|
3013
|
+
symbolIsAmbiguous: false,
|
|
3014
|
+
numericCode: "548",
|
|
3015
|
+
status: "active",
|
|
3016
|
+
replacedBy: null,
|
|
3017
|
+
storageScale: 100,
|
|
3018
|
+
storageDigits: 0,
|
|
3019
|
+
displayDigits: 0,
|
|
3020
|
+
medusaDigits: 2,
|
|
3021
|
+
symbolAliases: [],
|
|
3022
|
+
localeHint: null,
|
|
3023
|
+
commaDecimal: false
|
|
3024
|
+
},
|
|
3025
|
+
{
|
|
3026
|
+
code: "WST",
|
|
3027
|
+
name: "Samoan Tala",
|
|
3028
|
+
symbol: "WST",
|
|
3029
|
+
narrowSymbol: "WST",
|
|
3030
|
+
symbolIsAmbiguous: false,
|
|
3031
|
+
numericCode: "882",
|
|
3032
|
+
status: "active",
|
|
3033
|
+
replacedBy: null,
|
|
3034
|
+
storageScale: 100,
|
|
3035
|
+
storageDigits: 2,
|
|
3036
|
+
displayDigits: 2,
|
|
3037
|
+
medusaDigits: 2,
|
|
3038
|
+
symbolAliases: [],
|
|
3039
|
+
localeHint: null,
|
|
3040
|
+
commaDecimal: false
|
|
3041
|
+
},
|
|
3042
|
+
{
|
|
3043
|
+
code: "XAF",
|
|
3044
|
+
name: "Central African CFA Franc",
|
|
3045
|
+
symbol: "FCFA",
|
|
3046
|
+
narrowSymbol: "FCFA",
|
|
3047
|
+
symbolIsAmbiguous: false,
|
|
3048
|
+
numericCode: "950",
|
|
3049
|
+
status: "active",
|
|
3050
|
+
replacedBy: null,
|
|
3051
|
+
storageScale: 100,
|
|
3052
|
+
storageDigits: 0,
|
|
3053
|
+
displayDigits: 0,
|
|
3054
|
+
medusaDigits: 0,
|
|
3055
|
+
symbolAliases: [],
|
|
3056
|
+
localeHint: null,
|
|
3057
|
+
commaDecimal: false
|
|
3058
|
+
},
|
|
3059
|
+
{
|
|
3060
|
+
code: "XCD",
|
|
3061
|
+
name: "East Caribbean Dollar",
|
|
3062
|
+
symbol: "EC$",
|
|
3063
|
+
narrowSymbol: "$",
|
|
3064
|
+
symbolIsAmbiguous: true,
|
|
3065
|
+
numericCode: "951",
|
|
3066
|
+
status: "active",
|
|
3067
|
+
replacedBy: null,
|
|
3068
|
+
storageScale: 100,
|
|
3069
|
+
storageDigits: 2,
|
|
3070
|
+
displayDigits: 2,
|
|
3071
|
+
medusaDigits: 2,
|
|
3072
|
+
symbolAliases: [],
|
|
3073
|
+
localeHint: null,
|
|
3074
|
+
commaDecimal: false
|
|
3075
|
+
},
|
|
3076
|
+
{
|
|
3077
|
+
code: "XCG",
|
|
3078
|
+
name: "Caribbean guilder",
|
|
3079
|
+
symbol: "Cg.",
|
|
3080
|
+
narrowSymbol: "Cg.",
|
|
3081
|
+
symbolIsAmbiguous: false,
|
|
3082
|
+
numericCode: null,
|
|
3083
|
+
status: "active",
|
|
3084
|
+
replacedBy: null,
|
|
3085
|
+
storageScale: 100,
|
|
3086
|
+
storageDigits: 2,
|
|
3087
|
+
displayDigits: 2,
|
|
3088
|
+
medusaDigits: 2,
|
|
3089
|
+
symbolAliases: [],
|
|
3090
|
+
localeHint: null,
|
|
3091
|
+
commaDecimal: false
|
|
3092
|
+
},
|
|
3093
|
+
{
|
|
3094
|
+
code: "XOF",
|
|
3095
|
+
name: "West African CFA Franc",
|
|
3096
|
+
symbol: "F CFA",
|
|
3097
|
+
narrowSymbol: "F CFA",
|
|
3098
|
+
symbolIsAmbiguous: false,
|
|
3099
|
+
numericCode: "952",
|
|
3100
|
+
status: "active",
|
|
3101
|
+
replacedBy: null,
|
|
3102
|
+
storageScale: 100,
|
|
3103
|
+
storageDigits: 0,
|
|
3104
|
+
displayDigits: 0,
|
|
3105
|
+
medusaDigits: 0,
|
|
3106
|
+
symbolAliases: [],
|
|
3107
|
+
localeHint: null,
|
|
3108
|
+
commaDecimal: false
|
|
3109
|
+
},
|
|
3110
|
+
{
|
|
3111
|
+
code: "XPF",
|
|
3112
|
+
name: "CFP Franc",
|
|
3113
|
+
symbol: "CFPF",
|
|
3114
|
+
narrowSymbol: "CFPF",
|
|
3115
|
+
symbolIsAmbiguous: false,
|
|
3116
|
+
numericCode: "953",
|
|
3117
|
+
status: "active",
|
|
3118
|
+
replacedBy: null,
|
|
3119
|
+
storageScale: 100,
|
|
3120
|
+
storageDigits: 0,
|
|
3121
|
+
displayDigits: 0,
|
|
3122
|
+
medusaDigits: 0,
|
|
3123
|
+
symbolAliases: [],
|
|
3124
|
+
localeHint: null,
|
|
3125
|
+
commaDecimal: false
|
|
3126
|
+
},
|
|
3127
|
+
{
|
|
3128
|
+
code: "YER",
|
|
3129
|
+
name: "Yemeni Rial",
|
|
3130
|
+
symbol: "YER",
|
|
3131
|
+
narrowSymbol: "YER",
|
|
3132
|
+
symbolIsAmbiguous: false,
|
|
3133
|
+
numericCode: "886",
|
|
3134
|
+
status: "active",
|
|
3135
|
+
replacedBy: null,
|
|
3136
|
+
storageScale: 100,
|
|
3137
|
+
storageDigits: 2,
|
|
3138
|
+
displayDigits: 0,
|
|
3139
|
+
medusaDigits: 0,
|
|
3140
|
+
symbolAliases: [],
|
|
3141
|
+
localeHint: null,
|
|
3142
|
+
commaDecimal: false
|
|
3143
|
+
},
|
|
3144
|
+
{
|
|
3145
|
+
code: "ZAR",
|
|
3146
|
+
name: "South African Rand",
|
|
3147
|
+
symbol: "ZAR",
|
|
3148
|
+
narrowSymbol: "R",
|
|
3149
|
+
symbolIsAmbiguous: false,
|
|
3150
|
+
numericCode: "710",
|
|
3151
|
+
status: "active",
|
|
3152
|
+
replacedBy: null,
|
|
3153
|
+
storageScale: 100,
|
|
3154
|
+
storageDigits: 2,
|
|
3155
|
+
displayDigits: 2,
|
|
3156
|
+
medusaDigits: 2,
|
|
3157
|
+
symbolAliases: ["R"],
|
|
3158
|
+
localeHint: null,
|
|
3159
|
+
commaDecimal: false
|
|
3160
|
+
},
|
|
3161
|
+
{
|
|
3162
|
+
code: "ZMK",
|
|
3163
|
+
name: "Zambian Kwacha (1968–2012)",
|
|
3164
|
+
symbol: "ZMK",
|
|
3165
|
+
narrowSymbol: "ZMK",
|
|
3166
|
+
symbolIsAmbiguous: false,
|
|
3167
|
+
numericCode: null,
|
|
3168
|
+
status: "historic",
|
|
3169
|
+
replacedBy: "ZMW",
|
|
3170
|
+
storageScale: 100,
|
|
3171
|
+
storageDigits: 2,
|
|
3172
|
+
displayDigits: 2,
|
|
3173
|
+
medusaDigits: 0,
|
|
3174
|
+
symbolAliases: [],
|
|
3175
|
+
localeHint: null,
|
|
3176
|
+
commaDecimal: false
|
|
3177
|
+
},
|
|
3178
|
+
{
|
|
3179
|
+
code: "ZMW",
|
|
3180
|
+
name: "Zambian Kwacha",
|
|
3181
|
+
symbol: "ZMW",
|
|
3182
|
+
narrowSymbol: "ZK",
|
|
3183
|
+
symbolIsAmbiguous: false,
|
|
3184
|
+
numericCode: "967",
|
|
3185
|
+
status: "active",
|
|
3186
|
+
replacedBy: null,
|
|
3187
|
+
storageScale: 100,
|
|
3188
|
+
storageDigits: 2,
|
|
3189
|
+
displayDigits: 2,
|
|
3190
|
+
medusaDigits: 2,
|
|
3191
|
+
symbolAliases: [],
|
|
3192
|
+
localeHint: null,
|
|
3193
|
+
commaDecimal: false
|
|
3194
|
+
},
|
|
3195
|
+
{
|
|
3196
|
+
code: "ZWG",
|
|
3197
|
+
name: "Zimbabwean Gold",
|
|
3198
|
+
symbol: "ZWG",
|
|
3199
|
+
narrowSymbol: "ZWG",
|
|
3200
|
+
symbolIsAmbiguous: false,
|
|
3201
|
+
numericCode: null,
|
|
3202
|
+
status: "active",
|
|
3203
|
+
replacedBy: null,
|
|
3204
|
+
storageScale: 100,
|
|
3205
|
+
storageDigits: 2,
|
|
3206
|
+
displayDigits: 2,
|
|
3207
|
+
medusaDigits: 2,
|
|
3208
|
+
symbolAliases: [],
|
|
3209
|
+
localeHint: null,
|
|
3210
|
+
commaDecimal: false
|
|
3211
|
+
},
|
|
3212
|
+
{
|
|
3213
|
+
code: "ZWL",
|
|
3214
|
+
name: "Zimbabwean Dollar (2009–2024)",
|
|
3215
|
+
symbol: "ZWL",
|
|
3216
|
+
narrowSymbol: "ZWL",
|
|
3217
|
+
symbolIsAmbiguous: false,
|
|
3218
|
+
numericCode: null,
|
|
3219
|
+
status: "historic",
|
|
3220
|
+
replacedBy: "ZWG",
|
|
3221
|
+
storageScale: 100,
|
|
3222
|
+
storageDigits: 2,
|
|
3223
|
+
displayDigits: 2,
|
|
3224
|
+
medusaDigits: 0,
|
|
3225
|
+
symbolAliases: [],
|
|
3226
|
+
localeHint: null,
|
|
3227
|
+
commaDecimal: false
|
|
3228
|
+
}
|
|
3229
|
+
];
|
|
3230
|
+
//#endregion
|
|
3231
|
+
//#region src/internal/intl.ts
|
|
3232
|
+
const DEFAULT_LOCALE = "en-US";
|
|
3233
|
+
/**
|
|
3234
|
+
* `locale` when the runtime supports it, else `'en-US'`. Blank, malformed or unsupported
|
|
3235
|
+
* tags never throw (Medusa `supportedLocale`, canonicalised: `'en-us'` gives `'en-US'`).
|
|
3236
|
+
*/
|
|
3237
|
+
function resolveLocale(locale) {
|
|
3238
|
+
const tag = typeof locale === "string" ? locale.trim() : "";
|
|
3239
|
+
if (!tag) return DEFAULT_LOCALE;
|
|
3240
|
+
try {
|
|
3241
|
+
return Intl.NumberFormat.supportedLocalesOf([tag])[0] ?? "en-US";
|
|
3242
|
+
} catch {
|
|
3243
|
+
return DEFAULT_LOCALE;
|
|
3244
|
+
}
|
|
3245
|
+
}
|
|
3246
|
+
const MAX_CACHED = 256;
|
|
3247
|
+
const formatters = /* @__PURE__ */ new Map();
|
|
3248
|
+
/** A cached `Intl.NumberFormat` for an already resolved locale. Throws what the constructor throws. */
|
|
3249
|
+
function numberFormat(locale, options) {
|
|
3250
|
+
const key = `${locale}|${JSON.stringify(options)}`;
|
|
3251
|
+
let formatter = formatters.get(key);
|
|
3252
|
+
if (!formatter) {
|
|
3253
|
+
formatter = new Intl.NumberFormat(locale, options);
|
|
3254
|
+
if (formatters.size >= MAX_CACHED) formatters.clear();
|
|
3255
|
+
formatters.set(key, formatter);
|
|
3256
|
+
}
|
|
3257
|
+
return formatter;
|
|
3258
|
+
}
|
|
3259
|
+
/** The decimal and group separators `locale` prints (`'.'`/`','` for en-US, `','`/`'.'` for de-DE). */
|
|
3260
|
+
function separatorsOf(locale) {
|
|
3261
|
+
const parts = numberFormat(resolveLocale(locale), { useGrouping: true }).formatToParts(1234567.5);
|
|
3262
|
+
const decimal = parts.find((p) => p.type === "decimal")?.value ?? ".";
|
|
3263
|
+
return {
|
|
3264
|
+
decimal,
|
|
3265
|
+
group: parts.find((p) => p.type === "group")?.value ?? (decimal === "." ? "," : ".")
|
|
3266
|
+
};
|
|
3267
|
+
}
|
|
3268
|
+
//#endregion
|
|
3269
|
+
//#region src/registry.ts
|
|
3270
|
+
/** Every currency this package knows, active and historic, sorted by code. */
|
|
3271
|
+
const CURRENCIES = Object.freeze(CURRENCY_ROWS.map((row) => Object.freeze({
|
|
3272
|
+
...row,
|
|
3273
|
+
symbolAliases: Object.freeze([...row.symbolAliases])
|
|
3274
|
+
})));
|
|
3275
|
+
const BY_CODE = new Map(CURRENCIES.map((info) => [info.code, info]));
|
|
3276
|
+
const CODE_TEXT = /^[A-Za-z]{3}$/;
|
|
3277
|
+
function find(input) {
|
|
3278
|
+
return typeof input === "string" && CODE_TEXT.test(input) ? BY_CODE.get(input.toUpperCase()) : void 0;
|
|
3279
|
+
}
|
|
3280
|
+
const isBlank = (value) => value === null || value === void 0 || typeof value === "string" && value.trim() === "";
|
|
3281
|
+
/**
|
|
3282
|
+
* The registry entry for `input` (any case). Throws `currency_invalid` for an unknown
|
|
3283
|
+
* code, and for a historic one with `allowHistoric: false`. Every lookup in the package
|
|
3284
|
+
* goes through here.
|
|
3285
|
+
*/
|
|
3286
|
+
function resolveCurrency(input, options = {}) {
|
|
3287
|
+
const info = find(input);
|
|
3288
|
+
if (!info) throw new MoneyError("currency_invalid", `Unknown currency code: ${describeValue(input)}`, options);
|
|
3289
|
+
if (info.status === "historic" && options.allowHistoric === false) throw new MoneyError("currency_invalid", `${info.code} is no longer in use (replaced by ${info.replacedBy})`, options);
|
|
3290
|
+
return info;
|
|
3291
|
+
}
|
|
3292
|
+
/** `input` as a CurrencyCode (`'usd'` gives `'USD'`, `'bgn'` gives `'BGN'`). Throws `currency_invalid`, and for a historic code with `allowHistoric: false`. */
|
|
3293
|
+
function currencyCode(input, options) {
|
|
3294
|
+
return resolveCurrency(input, options).code;
|
|
3295
|
+
}
|
|
3296
|
+
const admits = (info, options) => info.status === "active" || options.allowHistoric !== false;
|
|
3297
|
+
/** Whether `value` already is a CurrencyCode: an upper-case known code (historic ones too, unless `allowHistoric: false`). */
|
|
3298
|
+
function isCurrencyCode(value, options = {}) {
|
|
3299
|
+
const info = typeof value === "string" ? BY_CODE.get(value) : void 0;
|
|
3300
|
+
return info !== void 0 && admits(info, options);
|
|
3301
|
+
}
|
|
3302
|
+
/** Everything known about a currency, historic ones included. Throws `currency_invalid` for an unknown code. */
|
|
3303
|
+
function currencyInfo(code) {
|
|
3304
|
+
return resolveCurrency(code, { allowHistoric: true });
|
|
3305
|
+
}
|
|
3306
|
+
/** Internal: every mark a store prints for a currency (symbol, narrow symbol, aliases, code), each once. */
|
|
3307
|
+
function currencyMarks(info) {
|
|
3308
|
+
return [.../* @__PURE__ */ new Set([
|
|
3309
|
+
info.symbol,
|
|
3310
|
+
info.narrowSymbol,
|
|
3311
|
+
...info.symbolAliases,
|
|
3312
|
+
info.code
|
|
3313
|
+
])];
|
|
3314
|
+
}
|
|
3315
|
+
/** 100, or 1000 for KWD, BHD, OMR, TND, JOD, IQD, LYD. Stored amount = major amount x storageScale. */
|
|
3316
|
+
function storageScale(code) {
|
|
3317
|
+
return currencyInfo(code).storageScale;
|
|
3318
|
+
}
|
|
3319
|
+
/** Fraction digits a stored amount is rounded to: 0 for JPY, KRW, VND...; 3 for the x1000 seven; else 2. */
|
|
3320
|
+
function storageDigits(code) {
|
|
3321
|
+
return currencyInfo(code).storageDigits;
|
|
3322
|
+
}
|
|
3323
|
+
/** Fraction digits to show: 0 for JPY, HUF, IDR, IQD...; 3 for KWD, BHD, OMR, TND, JOD, LYD; else 2. */
|
|
3324
|
+
function displayDigits(code) {
|
|
3325
|
+
return currencyInfo(code).displayDigits;
|
|
3326
|
+
}
|
|
3327
|
+
/** Digits of the storage scale (2 for x100, 3 for x1000): a stored integer has this many implied decimals. */
|
|
3328
|
+
function storageExponent(info) {
|
|
3329
|
+
return info.storageScale === 1e3 ? 3 : 2;
|
|
3330
|
+
}
|
|
3331
|
+
/**
|
|
3332
|
+
* The registry entry for `input` (trimmed, any case), or null: for null, undefined, blank,
|
|
3333
|
+
* non-strings, unknown codes and, with `allowHistoric: false`, retired ones. Never throws.
|
|
3334
|
+
*/
|
|
3335
|
+
function findCurrency(input, options = {}) {
|
|
3336
|
+
const info = typeof input === "string" ? find(input.trim()) : void 0;
|
|
3337
|
+
return info !== void 0 && admits(info, options) ? info : null;
|
|
3338
|
+
}
|
|
3339
|
+
/** `input` as a CurrencyCode, or null (see `findCurrency`). For optional input: "null while unknown". */
|
|
3340
|
+
function parseCurrencyCode(input, options) {
|
|
3341
|
+
return findCurrency(input, options)?.code ?? null;
|
|
3342
|
+
}
|
|
3343
|
+
/**
|
|
3344
|
+
* The first candidate that is a known currency (historic codes included). Empty candidates
|
|
3345
|
+
* (null, undefined, blank) are skipped; a non-empty one that is not a known code throws
|
|
3346
|
+
* `currency_invalid` (a corrupt code is never replaced by a fallback); all empty throws
|
|
3347
|
+
* `currency_missing`. No implicit default: pass `'USD'` last to make one visible.
|
|
3348
|
+
*/
|
|
3349
|
+
function firstCurrency(...candidates) {
|
|
3350
|
+
for (const candidate of candidates) {
|
|
3351
|
+
if (isBlank(candidate)) continue;
|
|
3352
|
+
const info = findCurrency(candidate, { allowHistoric: true });
|
|
3353
|
+
if (!info) throw new MoneyError("currency_invalid", `Unknown currency code: ${describeValue(candidate)}`);
|
|
3354
|
+
return info.code;
|
|
3355
|
+
}
|
|
3356
|
+
throw new MoneyError("currency_missing", `No currency code among ${candidates.length} candidates`);
|
|
3357
|
+
}
|
|
3358
|
+
/** Whether both parse (historic allowed) to the same code. Empty or unknown never matches. */
|
|
3359
|
+
function sameCurrency(a, b) {
|
|
3360
|
+
const left = findCurrency(a, { allowHistoric: true });
|
|
3361
|
+
return left !== null && left === findCurrency(b, { allowHistoric: true });
|
|
3362
|
+
}
|
|
3363
|
+
/** The lower-case code for Medusa columns, Medusa API payloads and SQL on lower-case columns. Historic codes allowed. */
|
|
3364
|
+
function medusaCurrencyCode(code) {
|
|
3365
|
+
return currencyCode(code, { allowHistoric: true }).toLowerCase();
|
|
3366
|
+
}
|
|
3367
|
+
/** CLDR English symbol (`'CA$'`, `'A$'`), or the narrow one (`'$'`) with `display: 'narrow'`. From the registry, never ICU. */
|
|
3368
|
+
function currencySymbol(code, options = {}) {
|
|
3369
|
+
const info = currencyInfo(code);
|
|
3370
|
+
return options.display === "narrow" ? info.narrowSymbol : info.symbol;
|
|
3371
|
+
}
|
|
3372
|
+
/**
|
|
3373
|
+
* The currency's name: English (`locale` absent or `'en'`) from the registry; other locales
|
|
3374
|
+
* from `Intl.DisplayNames`, falling back to the English name when Intl throws or knows none.
|
|
3375
|
+
*/
|
|
3376
|
+
function currencyName(code, locale) {
|
|
3377
|
+
const info = currencyInfo(code);
|
|
3378
|
+
if (locale === void 0 || locale.toLowerCase() === "en") return info.name;
|
|
3379
|
+
try {
|
|
3380
|
+
const name = new Intl.DisplayNames([locale], {
|
|
3381
|
+
type: "currency",
|
|
3382
|
+
fallback: "code"
|
|
3383
|
+
}).of(info.code);
|
|
3384
|
+
return name && name !== info.code ? name : info.name;
|
|
3385
|
+
} catch {
|
|
3386
|
+
return info.name;
|
|
3387
|
+
}
|
|
3388
|
+
}
|
|
3389
|
+
/** `'Canadian Dollar (CAD $)'`, `'Euro (EUR €)'`, `'UAE Dirham (AED)'`: name, code, and the narrow symbol when it is not the code. */
|
|
3390
|
+
function currencyLabel(code, options = {}) {
|
|
3391
|
+
const info = currencyInfo(code);
|
|
3392
|
+
const narrow = info.narrowSymbol !== info.code ? ` ${info.narrowSymbol}` : "";
|
|
3393
|
+
return `${currencyName(info.code, options.locale)} (${info.code}${narrow})`;
|
|
3394
|
+
}
|
|
3395
|
+
/**
|
|
3396
|
+
* Currencies for a picker that chooses a currency for something new: active ones only
|
|
3397
|
+
* (`includeHistoric: true` adds the retired ones), `preferred` first in the given order
|
|
3398
|
+
* (unknown codes, and retired ones unless included, ignored), the rest by code.
|
|
3399
|
+
*/
|
|
3400
|
+
function currencyOptions(options = {}) {
|
|
3401
|
+
const allowHistoric = options.includeHistoric === true;
|
|
3402
|
+
const first = [];
|
|
3403
|
+
for (const candidate of options.preferred ?? []) {
|
|
3404
|
+
const code = parseCurrencyCode(candidate, { allowHistoric });
|
|
3405
|
+
if (code !== null && !first.includes(code)) first.push(code);
|
|
3406
|
+
}
|
|
3407
|
+
const rest = CURRENCIES.filter((c) => admits(c, { allowHistoric }) && !first.includes(c.code)).map((c) => c.code);
|
|
3408
|
+
return [...first, ...rest].map((code) => ({
|
|
3409
|
+
code,
|
|
3410
|
+
label: currencyLabel(code, { locale: options.locale })
|
|
3411
|
+
}));
|
|
3412
|
+
}
|
|
3413
|
+
/** The locale storefronts format `code` in (`'de-DE'` for EUR), else `'en-US'`. Opt-in: formatMoney never calls it. */
|
|
3414
|
+
function localeForCurrency(code) {
|
|
3415
|
+
return currencyInfo(code).localeHint ?? "en-US";
|
|
3416
|
+
}
|
|
3417
|
+
/**
|
|
3418
|
+
* Medusa core's payment-status epsilon for `code`, as text: `'1'` (JPY, HUF, IQD...),
|
|
3419
|
+
* `'0.001'` (KWD, BHD, JOD, LYD, OMR, TND), else `'0.01'`. Compared against storage-scale
|
|
3420
|
+
* numbers, as Medusa does, so these sites agree with Medusa's own `payment_status`.
|
|
3421
|
+
*/
|
|
3422
|
+
function medusaEpsilon(code) {
|
|
3423
|
+
return toDecimalText({
|
|
3424
|
+
units: 1n,
|
|
3425
|
+
scale: currencyInfo(code).medusaDigits
|
|
3426
|
+
});
|
|
3427
|
+
}
|
|
3428
|
+
//#endregion
|
|
3429
|
+
//#region src/money.ts
|
|
3430
|
+
const MAX_UNITS = 2n ** 46n;
|
|
3431
|
+
const anyKnownCurrency = (currency, field) => resolveCurrency(currency, {
|
|
3432
|
+
allowHistoric: true,
|
|
3433
|
+
field
|
|
3434
|
+
});
|
|
3435
|
+
function storedFrom(amount, info) {
|
|
3436
|
+
return {
|
|
3437
|
+
amount: amount === 0 ? 0 : amount,
|
|
3438
|
+
currency: info.code
|
|
3439
|
+
};
|
|
3440
|
+
}
|
|
3441
|
+
/** Whether `value` is a stored amount: a safe integer number within the given sign and range rules. */
|
|
3442
|
+
function isStoredAmount(value, options = {}) {
|
|
3443
|
+
if (typeof value !== "number" || !Number.isSafeInteger(value)) return false;
|
|
3444
|
+
if (value < 0 && !options.allowNegative) return false;
|
|
3445
|
+
if (value === 0 && options.allowZero === false) return false;
|
|
3446
|
+
if (options.min !== void 0 && value < options.min) return false;
|
|
3447
|
+
return options.max === void 0 || value <= options.max;
|
|
3448
|
+
}
|
|
3449
|
+
function checkStored(stored, currency) {
|
|
3450
|
+
const info = anyKnownCurrency(currency, void 0);
|
|
3451
|
+
if (!isStoredAmount(stored, { allowNegative: true })) throw new MoneyError("amount_invalid", `Stored amount must be a safe integer, got ${describeValue(stored)}`);
|
|
3452
|
+
return info;
|
|
3453
|
+
}
|
|
3454
|
+
/** Internal: a Money's registry entry and its exact major value (`amount / 10^storageExponent`). Validates both. */
|
|
3455
|
+
function storedDecimal(m) {
|
|
3456
|
+
const info = checkStored(m.amount, m.currency);
|
|
3457
|
+
return {
|
|
3458
|
+
info,
|
|
3459
|
+
value: {
|
|
3460
|
+
units: BigInt(m.amount),
|
|
3461
|
+
scale: storageExponent(info)
|
|
3462
|
+
}
|
|
3463
|
+
};
|
|
3464
|
+
}
|
|
3465
|
+
/**
|
|
3466
|
+
* Internal: a computed stored amount as Money. Every result in the package is bounded the
|
|
3467
|
+
* way `fromMajor` is (2^46 units of the currency's storage digits) and throws `overflow` beyond.
|
|
3468
|
+
*/
|
|
3469
|
+
function boundedMoney(amount, info) {
|
|
3470
|
+
const value = {
|
|
3471
|
+
units: amount,
|
|
3472
|
+
scale: storageExponent(info)
|
|
3473
|
+
};
|
|
3474
|
+
if (!unitsWithin(roundToScale(value, info.storageDigits, "up"), MAX_UNITS)) throw new MoneyError("overflow", `${formatDecimal(value)} ${info.code} is too large to store`);
|
|
3475
|
+
return storedFrom(Number(amount), info);
|
|
3476
|
+
}
|
|
3477
|
+
/** A stored amount (already x100 / x1000) as Money. Throws `amount_invalid` unless it is a safe integer. */
|
|
3478
|
+
function money(stored, currency) {
|
|
3479
|
+
return storedFrom(stored, checkStored(stored, currency));
|
|
3480
|
+
}
|
|
3481
|
+
/** Internal: a major amount (finite number, or decimal text with fromMajor's grammar) as an exact Decimal. */
|
|
3482
|
+
function majorDecimal(major, field) {
|
|
3483
|
+
if (typeof major === "number" && Number.isFinite(major)) return decimalFromNumber(major);
|
|
3484
|
+
if (typeof major !== "string") throw new MoneyError("amount_invalid", `Amount must be a finite number, got ${describeValue(major)}`, { field });
|
|
3485
|
+
const parsed = parseDecimal(major);
|
|
3486
|
+
if (!parsed) throw new MoneyError("parse", `Not a decimal amount: ${describeValue(major)}`, { field });
|
|
3487
|
+
return parsed;
|
|
3488
|
+
}
|
|
3489
|
+
/**
|
|
3490
|
+
* A major-unit amount (19.99 or '19.99') as Money: x100, or x1000 for the seven
|
|
3491
|
+
* three-decimal currencies. JPY 1500 is stored as 150000.
|
|
3492
|
+
*
|
|
3493
|
+
* `precision: 'reject'` (default) is capability-kit `toStorageAmount` exactly: more
|
|
3494
|
+
* fraction digits than the `unit` keeps (default the currency's storage digits) throws
|
|
3495
|
+
* `precision` (19.999 USD, 5.5 JPY) unless a number is only float noise away from an
|
|
3496
|
+
* allowed amount. Strings are exact, so they get no noise allowance. `precision: 'round'`
|
|
3497
|
+
* rounds to the unit instead (JPY 1500.4 gives 150000; with `unit: 'storage'` 150040).
|
|
3498
|
+
* Beyond 2^46 units of the storage digits throws `overflow`.
|
|
3499
|
+
*/
|
|
3500
|
+
function fromMajor(major, currency, options = {}) {
|
|
3501
|
+
const { field } = options;
|
|
3502
|
+
const info = anyKnownCurrency(currency, field);
|
|
3503
|
+
const value = majorDecimal(major, field);
|
|
3504
|
+
const exponent = storageExponent(info);
|
|
3505
|
+
const digits = options.unit === "storage" ? exponent : info.storageDigits;
|
|
3506
|
+
const round = options.precision === "round";
|
|
3507
|
+
if (!round && fractionDigitsOf(value) > digits && (typeof major === "string" || !withinFloatNoise(major, digits))) throw new MoneyError("precision", `${major} has more than ${digits} decimal places, the most ${info.code} allows`, { field });
|
|
3508
|
+
const units = roundToScale(value, digits, round ? options.rounding ?? "half-up" : "half-even");
|
|
3509
|
+
if (!unitsWithin(roundToScale(units, info.storageDigits, "up"), MAX_UNITS)) throw new MoneyError("overflow", `${major} ${info.code} is too large to store`, { field });
|
|
3510
|
+
return storedFrom(Number(roundToScale(units, exponent, "down").units), info);
|
|
3511
|
+
}
|
|
3512
|
+
/** Major units as exact decimal text (USD 1999 gives '19.99', JPY 120000 gives '1200', KWD 1005 gives '1.005'). */
|
|
3513
|
+
function toMajorDecimal(m, options = {}) {
|
|
3514
|
+
const { info, value } = storedDecimal(m);
|
|
3515
|
+
if (options.digits === "display") return formatDecimal(roundToScale(value, info.displayDigits, options.rounding ?? "half-up"));
|
|
3516
|
+
return formatDecimal(roundToScale(value, fractionDigitsOf(value) <= info.storageDigits ? info.storageDigits : value.scale, "down"));
|
|
3517
|
+
}
|
|
3518
|
+
/**
|
|
3519
|
+
* Major units as a number: the double nearest the exact amount (`digits: 'exact'`, default),
|
|
3520
|
+
* or rounded to the display digits first (`digits: 'display'`, the pixel value). For
|
|
3521
|
+
* arithmetic, stay in Money.
|
|
3522
|
+
*/
|
|
3523
|
+
function toMajorNumber(m, options = {}) {
|
|
3524
|
+
return Number(toMajorDecimal(m, options));
|
|
3525
|
+
}
|
|
3526
|
+
const isObject = (value) => typeof value === "object" && value !== null;
|
|
3527
|
+
/** What `Number(obj)` would read: `Symbol.toPrimitive('number')`, else `valueOf()`. A throwing hook reads as nothing. */
|
|
3528
|
+
function primitiveOf(obj) {
|
|
3529
|
+
try {
|
|
3530
|
+
const hook = obj[Symbol.toPrimitive];
|
|
3531
|
+
if (typeof hook === "function") return hook.call(obj, "number");
|
|
3532
|
+
return typeof obj.valueOf === "function" ? obj.valueOf() : obj;
|
|
3533
|
+
} catch {
|
|
3534
|
+
return;
|
|
3535
|
+
}
|
|
3536
|
+
}
|
|
3537
|
+
/**
|
|
3538
|
+
* The primitive inside one of Medusa's amount shapes, payment-module precedence:
|
|
3539
|
+
* `value` (`.value ?? .raw.value ?? .raw_.value`, a live BigNumber's exact text), then
|
|
3540
|
+
* `numeric` (`.numeric ?? .numeric_`, a lossy view), then the object itself read as
|
|
3541
|
+
* `Number()` would. A primitive is returned as is.
|
|
3542
|
+
*/
|
|
3543
|
+
function unwrapMedusaAmount(raw) {
|
|
3544
|
+
if (!isObject(raw)) return raw;
|
|
3545
|
+
const inner = (key) => {
|
|
3546
|
+
const nested = raw[key];
|
|
3547
|
+
return isObject(nested) ? nested.value : void 0;
|
|
3548
|
+
};
|
|
3549
|
+
const picked = raw.value ?? inner("raw") ?? inner("raw_") ?? raw.numeric ?? raw.numeric_ ?? raw;
|
|
3550
|
+
return isObject(picked) ? primitiveOf(picked) : picked;
|
|
3551
|
+
}
|
|
3552
|
+
/**
|
|
3553
|
+
* Internal: the exact decimal one of Medusa's amount shapes holds, or null. Numbers must be
|
|
3554
|
+
* finite and, when whole, safe (past 2^53 the digits are already gone); bigints are exact;
|
|
3555
|
+
* strings are decimal text (Medusa's `toPrecision(20)` can spell `'4300.0000000000000000'`
|
|
3556
|
+
* or an exponent). Anything else is null, never 0.
|
|
3557
|
+
*/
|
|
3558
|
+
function medusaAmountDecimal(raw) {
|
|
3559
|
+
const primitive = unwrapMedusaAmount(raw);
|
|
3560
|
+
if (typeof primitive === "number") return strictNumberDecimal(primitive);
|
|
3561
|
+
if (typeof primitive === "bigint") return {
|
|
3562
|
+
units: primitive,
|
|
3563
|
+
scale: 0
|
|
3564
|
+
};
|
|
3565
|
+
return typeof primitive === "string" ? parseDecimal(primitive) : null;
|
|
3566
|
+
}
|
|
3567
|
+
const SAFE_LIMIT = BigInt(Number.MAX_SAFE_INTEGER);
|
|
3568
|
+
/** A stored integer from Medusa's shapes (a fraction rounded half-up with `round`), or null when it is fractional, unsafe or unreadable. */
|
|
3569
|
+
function unwrapStored(raw, round) {
|
|
3570
|
+
const parsed = medusaAmountDecimal(raw);
|
|
3571
|
+
if (!parsed || !round && fractionDigitsOf(parsed) !== 0) return null;
|
|
3572
|
+
const whole = roundToScale(parsed, 0, "half-up");
|
|
3573
|
+
return unitsWithin(whole, SAFE_LIMIT) ? Number(whole.units) : null;
|
|
3574
|
+
}
|
|
3575
|
+
function readStored(raw, currency, options = {}) {
|
|
3576
|
+
const info = anyKnownCurrency(currency, options.field);
|
|
3577
|
+
const amount = unwrapStored(raw, options.precision === "round");
|
|
3578
|
+
if (amount !== null) return storedFrom(amount, info);
|
|
3579
|
+
if (options.mode === "lenient") return null;
|
|
3580
|
+
throw new MoneyError("amount_invalid", `Invalid stored amount: ${describeValue(raw)}`, { field: options.field });
|
|
3581
|
+
}
|
|
3582
|
+
//#endregion
|
|
3583
|
+
export { describeValue as $, storageScale as A, decimalOf as B, medusaCurrencyCode as C, sameCurrency as D, resolveCurrency as E, decimalClamp as F, isDecimalLiteral as G, decimalSubtract as H, decimalCompare as I, compareRatio as J, parseDecimalText as K, decimalDivide as L, resolveLocale as M, separatorsOf as N, storageDigits as O, assertDecimalLiteral as P, MoneyError as Q, decimalEquals as R, localeForCurrency as S, parseCurrencyCode as T, decimalSum as U, decimalRound as V, decimalWithin as W, mulDiv as X, gcd as Y, ratioToDecimal as Z, currencySymbol as _, money as a, fractionDigitsOf as at, firstCurrency as b, toMajorDecimal as c, normalizeDecimal as ct, currencyCode as d, roundToScale as dt, addDecimal as et, currencyInfo as f, strictNumberDecimal as ft, currencyOptions as g, currencyName as h, medusaAmountDecimal as i, formatDecimal as it, numberFormat as j, storageExponent as k, toMajorNumber as l, parseDecimal as lt, currencyMarks as m, unitsWithin as mt, fromMajor as n, decimalFromNumber as nt, readStored as o, isPositiveDecimal as ot, currencyLabel as p, toDecimalText as pt, trimDecimalZeros as q, isStoredAmount as r, divRound as rt, storedDecimal as s, multiplyDecimal as st, boundedMoney as t, compareDecimal as tt, CURRENCIES as u, pow10 as ut, displayDigits as v, medusaEpsilon as w, isCurrencyCode as x, findCurrency as y, decimalMultiply as z };
|