From 71151e2feea39b248e79f7be6f06c2baf8228e46 Mon Sep 17 00:00:00 2001 From: Sebastian Langer Date: Fri, 20 Jan 2023 14:54:12 +0100 Subject: [PATCH 01/20] Remove lodash dependency --- build/index.js | 45 +- index.ts | 45 +- package-lock.json | 1010 +-------------------------------------------- package.json | 5 +- 4 files changed, 74 insertions(+), 1031 deletions(-) diff --git a/build/index.js b/build/index.js index 9a01d9b..bb4dcd1 100644 --- a/build/index.js +++ b/build/index.js @@ -1,6 +1,5 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const lodash_1 = require("lodash"); const currencies_1 = require("./lib/currencies"); exports.Currencies = currencies_1.Currencies; let isInt = function (n) { @@ -21,7 +20,7 @@ let assertType = function (other) { throw new TypeError('Instance of Money required'); }; let assertOperand = function (operand) { - if (lodash_1.isNaN(parseFloat(operand)) && !isFinite(operand)) + if (Number.isNaN(parseFloat(operand)) && !isFinite(operand)) throw new TypeError('Operand must be a number'); }; let getCurrencyObject = function (currency) { @@ -36,8 +35,34 @@ let getCurrencyObject = function (currency) { } } }; +let isObjectLike = (value) => { + return value !== null && typeof value === 'object'; +}; +let isObject = (value) => { + const type = typeof value; + return value != null && (type === 'object' || type === 'function'); +}; +let getTag = (value) => { + if (value == null) { + return value === undefined ? '[object Undefined]' : '[object Null]'; + } + return toString.call(value); +}; +let isPlainObject = (value) => { + if (!isObjectLike(value) || getTag(value) != '[object Object]') { + return false; + } + if (Object.getPrototypeOf(value) === null) { + return true; + } + let proto = value; + while (Object.getPrototypeOf(proto) !== null) { + proto = Object.getPrototypeOf(proto); + } + return Object.getPrototypeOf(value) === proto; +}; function isAmountObject(amount) { - return lodash_1.isObject(amount); + return isObject(amount); } class Money { /** @@ -50,9 +75,9 @@ class Money { * @constructor */ constructor(amount, currency) { - if (lodash_1.isString(currency)) + if (typeof currency === 'string') currency = getCurrencyObject(currency); - if (!lodash_1.isPlainObject(currency)) + if (!isPlainObject(currency)) throw new TypeError('Invalid currency'); if (!isInt(amount)) throw new TypeError('Amount must be an integer'); @@ -79,9 +104,9 @@ class Money { currency = amount.currency; amount = amount.amount; } - if (lodash_1.isString(currency)) + if (typeof currency === 'string') currency = getCurrencyObject(currency); - if (!lodash_1.isPlainObject(currency)) + if (!isPlainObject(currency)) throw new TypeError('Invalid currency'); if (rounder === undefined) { let decimals = decimalPlaces(amount); @@ -93,7 +118,7 @@ class Money { else { if (['round', 'floor', 'ceil'].indexOf(rounder) === -1 && typeof rounder !== 'function') throw new TypeError('Invalid parameter rounder'); - if (lodash_1.isString(rounder)) + if (typeof rounder === 'string') rounder = Math[rounder]; } let precisionMultiplier = Math.pow(10, currency.decimal_digits); @@ -145,7 +170,7 @@ class Money { * @returns {Money} */ multiply(multiplier, fn) { - if (!lodash_1.isFunction(fn)) + if (typeof fn !== 'function') fn = Math.round; assertOperand(multiplier); let amount = fn(this.amount * multiplier); @@ -159,7 +184,7 @@ class Money { * @returns {Money} */ divide(divisor, fn) { - if (!lodash_1.isFunction(fn)) + if (typeof fn !== 'function') fn = Math.round; assertOperand(divisor); let amount = fn(this.amount / divisor); diff --git a/index.ts b/index.ts index 9f2c26b..50b7dc9 100644 --- a/index.ts +++ b/index.ts @@ -1,4 +1,3 @@ -import { isFunction, isNaN, isObject, isPlainObject, isString } from 'lodash' import { Currency } from './lib/currency' import { Currencies } from './lib/currencies' @@ -34,7 +33,7 @@ let assertType = function (other) { } let assertOperand = function (operand) { - if (isNaN(parseFloat(operand)) && !isFinite(operand)) + if (Number.isNaN(parseFloat(operand)) && !isFinite(operand)) throw new TypeError('Operand must be a number') } @@ -52,8 +51,38 @@ let getCurrencyObject = function (currency: string): Currency { } } +let isObjectLike = (value: any): boolean => { + return value !== null && typeof value === 'object' +} + +let isObject = (value: any): boolean => { + const type = typeof value + return value != null && (type === 'object' || type === 'function') +} + +let getTag = (value: any): string => { + if (value == null) { + return value === undefined ? '[object Undefined]' : '[object Null]' + } + return toString.call(value) +} + +let isPlainObject = (value: any): boolean => { + if (!isObjectLike(value) || getTag(value) != '[object Object]') { + return false + } + if (Object.getPrototypeOf(value) === null) { + return true + } + let proto = value + while (Object.getPrototypeOf(proto) !== null) { + proto = Object.getPrototypeOf(proto) + } + return Object.getPrototypeOf(value) === proto +} + function isAmountObject(amount: number | Amount): amount is Amount { - return isObject(amount); + return isObject(amount) } class Money { @@ -72,7 +101,7 @@ class Money { * @constructor */ constructor(amount: number, currency: Currency | string) { - if (isString(currency)) + if (typeof currency === 'string') currency = getCurrencyObject(currency) if (!isPlainObject(currency)) @@ -115,7 +144,7 @@ class Money { amount = amount.amount } - if (isString(currency)) + if (typeof currency === 'string') currency = getCurrencyObject(currency) if (!isPlainObject(currency)) @@ -133,7 +162,7 @@ class Money { if (['round', 'floor', 'ceil'].indexOf(rounder as string) === -1 && typeof rounder !== 'function') throw new TypeError('Invalid parameter rounder') - if (isString(rounder)) + if (typeof rounder === 'string') rounder = Math[rounder] } @@ -195,7 +224,7 @@ class Money { * @returns {Money} */ multiply(multiplier: number, fn?: Function): Money { - if (!isFunction(fn)) + if (typeof fn !== 'function') fn = Math.round assertOperand(multiplier) @@ -212,7 +241,7 @@ class Money { * @returns {Money} */ divide(divisor: number, fn?: Function): Money { - if (!isFunction(fn)) + if (typeof fn !== 'function') fn = Math.round assertOperand(divisor) diff --git a/package-lock.json b/package-lock.json index 65323db..ef51a35 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,1012 +1,9 @@ { "name": "ts-money", "version": "0.4.8", - "lockfileVersion": 2, + "lockfileVersion": 1, "requires": true, - "packages": { - "": { - "name": "ts-money", - "version": "0.4.8", - "license": "MIT", - "dependencies": { - "lodash": "^4.17.5" - }, - "devDependencies": { - "@types/lodash": "^4.14.64", - "@types/node": "^7.0.23", - "chai": "1.x.x", - "mocha": "^10.0.0", - "typescript": "^2.3.4" - } - }, - "node_modules/@types/lodash": { - "version": "4.14.70", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.70.tgz", - "integrity": "sha1-N72krPs7t5FDAJzJ0Aq9VZ99yjA=", - "dev": true - }, - "node_modules/@types/node": { - "version": "7.0.38", - "resolved": "https://registry.npmjs.org/@types/node/-/node-7.0.38.tgz", - "integrity": "sha1-FA7MYZMLMo5ykUI3xY3WLIgp6U0=", - "dev": true - }, - "node_modules/@ungap/promise-all-settled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", - "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", - "dev": true - }, - "node_modules/ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "dev": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "node_modules/assertion-error": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.0.0.tgz", - "integrity": "sha1-x/hUOP3UZrx8oWq5DIFRN5el0js=", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true - }, - "node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/chai": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/chai/-/chai-1.10.0.tgz", - "integrity": "sha1-5AMcyHZURhp1lD5aNatG6vOcHrk=", - "dev": true, - "dependencies": { - "assertion-error": "1.0.0", - "deep-eql": "0.1.3" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/chalk/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, - "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/debug/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "node_modules/decamelize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/deep-eql": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-0.1.3.tgz", - "integrity": "sha1-71WKyrjeJSBs1xOQbXTlaTDrafI=", - "dev": true, - "dependencies": { - "type-detect": "0.1.1" - }, - "engines": { - "node": "*" - } - }, - "node_modules/diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", - "dev": true, - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true, - "bin": { - "flat": "cli.js" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true - }, - "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/glob/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/glob/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true, - "bin": { - "he": "bin/he" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dev": true, - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lodash": { - "version": "4.17.11", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", - "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==" - }, - "node_modules/log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dev": true, - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/minimatch": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", - "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/mocha": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.0.0.tgz", - "integrity": "sha512-0Wl+elVUD43Y0BqPZBzZt8Tnkw9CMUdNYnUsTfOM1vuhJVZL+kiesFYsqwBkEEuEixaiPe5ZQdqDgX2jddhmoA==", - "dev": true, - "dependencies": { - "@ungap/promise-all-settled": "1.1.2", - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.4", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.2.0", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "5.0.1", - "ms": "2.1.3", - "nanoid": "3.3.3", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "workerpool": "6.2.1", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha.js" - }, - "engines": { - "node": ">= 14.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" - } - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "node_modules/nanoid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", - "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", - "dev": true, - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", - "dev": true, - "dependencies": { - "randombytes": "^2.1.0" - } - }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/type-detect": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-0.1.1.tgz", - "integrity": "sha1-C6XsKohWQORw6k6FBZcZANrFiCI=", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/typescript": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.4.2.tgz", - "integrity": "sha1-+DlfhdRZJ2BnyYiqQYN6j4KHCEQ=", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/workerpool": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", - "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", - "dev": true - }, - "node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true - }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-unparser": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", - "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", - "dev": true, - "dependencies": { - "camelcase": "^6.0.0", - "decamelize": "^4.0.0", - "flat": "^5.0.2", - "is-plain-obj": "^2.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - } - }, "dependencies": { - "@types/lodash": { - "version": "4.14.70", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.70.tgz", - "integrity": "sha1-N72krPs7t5FDAJzJ0Aq9VZ99yjA=", - "dev": true - }, "@types/node": { "version": "7.0.38", "resolved": "https://registry.npmjs.org/@types/node/-/node-7.0.38.tgz", @@ -1421,11 +418,6 @@ "p-locate": "^5.0.0" } }, - "lodash": { - "version": "4.17.11", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", - "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==" - }, "log-symbols": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", diff --git a/package.json b/package.json index 775f864..3e06940 100644 --- a/package.json +++ b/package.json @@ -22,11 +22,8 @@ "bugs": { "url": "https://github.com/macor161/ts-money/issues" }, - "dependencies": { - "lodash": "^4.17.5" - }, + "dependencies": {}, "devDependencies": { - "@types/lodash": "^4.14.64", "@types/node": "^7.0.23", "chai": "1.x.x", "mocha": "^10.0.0", From 0592d8d4277e849bb546f25689a49275baa05172 Mon Sep 17 00:00:00 2001 From: Sebastian Langer Date: Fri, 16 Aug 2024 16:47:31 +0200 Subject: [PATCH 02/20] Move ts-money to a modern build and test stack --- .github/workflows/main.yml | 29 - .gitignore | 1 + .nvmrc | 1 - LICENSE | 3 +- README.md | 31 +- build/index.d.ts | 159 - build/index.js | 344 -- build/lib/currencies.d.ts | 2 - build/lib/currencies.js | 1084 ----- build/lib/currency.d.ts | 9 - build/lib/currency.js | 2 - build/lib/index.d.ts | 1 - build/lib/index.js | 6 - build/lib/money.d.ts | 29 - build/lib/money.js | 197 - examples/money.js | 15 - examples/money.ts | 15 - package-lock.json | 5726 +++++++++++++++++++++-- package.json | 51 +- index.ts => src/index.ts | 20 +- {lib => src/lib}/currencies.ts | 2 +- {lib => src/lib}/currency.ts | 0 test/bootstrap/node.js | 3 - test/{module.test.js => module.test.ts} | 9 +- test/{money.test.js => money.test.ts} | 117 +- tsconfig.json | 38 +- 26 files changed, 5378 insertions(+), 2516 deletions(-) delete mode 100644 .github/workflows/main.yml delete mode 100644 .nvmrc delete mode 100644 build/index.d.ts delete mode 100644 build/index.js delete mode 100644 build/lib/currencies.d.ts delete mode 100644 build/lib/currencies.js delete mode 100644 build/lib/currency.d.ts delete mode 100644 build/lib/currency.js delete mode 100644 build/lib/index.d.ts delete mode 100644 build/lib/index.js delete mode 100644 build/lib/money.d.ts delete mode 100644 build/lib/money.js delete mode 100644 examples/money.js delete mode 100644 examples/money.ts rename index.ts => src/index.ts (95%) rename {lib => src/lib}/currencies.ts (99%) rename {lib => src/lib}/currency.ts (100%) delete mode 100644 test/bootstrap/node.js rename test/{module.test.js => module.test.ts} (70%) rename test/{money.test.js => money.test.ts} (74%) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index cfd3db4..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,29 +0,0 @@ -# This is a basic workflow to help you get started with Actions - -name: CI - -on: - # Triggers the workflow on push or pull request events but only for the "master" branch - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] - - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - - steps: - # Checks-out the repository under $GITHUB_WORKSPACE - - uses: actions/checkout@v3 - - - name: Install npm dependencies - run: npm install - - - name: Build library - run: npm run build - - - name: Run tests - run: npm test diff --git a/.gitignore b/.gitignore index 07bcb1d..ed8b4dd 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /node_modules/* /nbproject/ *.iml +dist diff --git a/.nvmrc b/.nvmrc deleted file mode 100644 index 95bcd38..0000000 --- a/.nvmrc +++ /dev/null @@ -1 +0,0 @@ -v4.2.2 \ No newline at end of file diff --git a/LICENSE b/LICENSE index 5cde39f..e20a5b5 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,6 @@ Copyright (c) 2014 David Kalosi Copyright (c) 2017 Mathew Cormier +Copyright (c) 2022 Sebastian Langer Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation @@ -20,4 +21,4 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file +OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index ec9859b..02d4553 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # TS Money -[![NPM version](https://img.shields.io/npm/v/ts-money.svg)](https://www.npmjs.com/package/ts-money) +[![NPM version](https://img.shields.io/npm/v/@screeny05/ts-money.svg)](https://www.npmjs.com/package/@screeny05/ts-money) [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT) -[![](https://img.shields.io/npm/dm/ts-money.svg?style=flat-square)](https://www.npmjs.com/package/ts-money) -[![](https://img.shields.io/npm/dt/ts-money.svg?style=flat-square)](https://www.npmjs.com/package/ts-money) +[![](https://img.shields.io/npm/dm/@screeny05/ts-money.svg?style=flat-square)](https://www.npmjs.com/package/@screeny05/ts-money) +[![](https://img.shields.io/npm/dt/@screeny05/ts-money.svg?style=flat-square)](https://www.npmjs.com/package/@screeny05/ts-money) TS Money is a Typescript port of the great [js-money](https://www.npmjs.com/package/js-money) package, which is an implementation of Martin Fowlers [Money pattern](http://martinfowler.com/eaaCatalog/money.html). @@ -20,13 +20,13 @@ npm install ts-money First we need to import the library. ```typescript -import { Money, Currencies } from 'ts-money' +import { Money, Currencies } from '@screeny05/ts-money' ``` or in javascript: ```javascript -const TsMoney = require('ts-money') +const TsMoney = require('@screeny05/ts-money') const Money = TsMoney.Money const Currencies = TsMoney.Currencies ``` @@ -72,7 +72,7 @@ interface Currency { Ex: ```typescript -import { Currency } from 'ts-money' +import { Currency } from '@screeny05/ts-money' const usd: Currency = { "symbol": "$", @@ -109,7 +109,7 @@ fiveEur.divide(2.3456, Math.ceil) // 2.14 EUR ### Allocating funds -Will divide the funds based on the ratio without loosing any pennies. +Will divide the funds based on the ratio without losing any pennies. ```typescript const tenEur = new Money(1000, Currencies.EUR) @@ -161,7 +161,7 @@ Some changes have been made compared with the javascript version: Currencies are now exported in a standalone object: ```typescript -import { Money, Currencies } from 'ts-money' +import { Money, Currencies } from '@screeny05/ts-money' Currencies.LTC = { symbol: "Ł", @@ -209,21 +209,6 @@ npm run build npm test ``` -## 🎁 Thank you for your donations - -> TS Money is an **open source** library and is completely **free** to use. -> -> If you find this project useful and would like to support its development, consider making a donation. - - -[![Donate with Bitcoin](https://en.cryptobadges.io/badge/big/1A71NTVtocr1WG6qFuQjhbVsEwXC7pKB5R)](https://en.cryptobadges.io/donate/1A71NTVtocr1WG6qFuQjhbVsEwXC7pKB5R) - -[![Donate with Ethereum](https://en.cryptobadges.io/badge/big/0x5cE72fB54733a15640AD23f8c8c296AadEeC53Cb)](https://en.cryptobadges.io/donate/0x5cE72fB54733a15640AD23f8c8c296AadEeC53Cb) - -[![Donate with Monero](https://en.cryptobadges.io/badge/big/4AzAgF56m5ihvDR5ctPVUE1RH78JEMsBHc63yYokHXbYGUCWsxphsmsgKzUkoQKmk7Tv6CSr3MosZ1wTR1wfHGt2187nHgj)](https://en.cryptobadges.io/donate/4AzAgF56m5ihvDR5ctPVUE1RH78JEMsBHc63yYokHXbYGUCWsxphsmsgKzUkoQKmk7Tv6CSr3MosZ1wTR1wfHGt2187nHgj) - - - ## License [The MIT License](http://opensource.org/licenses/MIT) diff --git a/build/index.d.ts b/build/index.d.ts deleted file mode 100644 index 01aae2a..0000000 --- a/build/index.d.ts +++ /dev/null @@ -1,159 +0,0 @@ -import { Currency } from './lib/currency'; -import { Currencies } from './lib/currencies'; -export declare type Rounder = 'round' | 'floor' | 'ceil' | Function; -export interface Amount { - amount: number; - currency: string | Currency; -} -declare class Money { - amount: number; - currency: string; - /** - * Creates a new Money instance. - * The created Money instances is a value object thus it is immutable. - * - * @param {Number} amount - * @param {Object/String} currency - * @returns {Money} - * @constructor - */ - constructor(amount: number, currency: Currency | string); - static fromInteger(amount: number | Amount, currency?: Currency | string): Money; - static fromDecimal(amount: Amount, rounder?: Rounder): Money; - static fromDecimal(amount: number, currency: string | Currency, rounder?: Rounder): Money; - /** - * Returns true if the two instances of Money are equal, false otherwise. - * - * @param {Money} other - * @returns {Boolean} - */ - equals(other: Money): boolean; - /** - * Adds the two objects together creating a new Money instance that holds the result of the operation. - * - * @param {Money} other - * @returns {Money} - */ - add(other: Money): Money; - /** - * Subtracts the two objects creating a new Money instance that holds the result of the operation. - * - * @param {Money} other - * @returns {Money} - */ - subtract(other: Money): Money; - /** - * Multiplies the object by the multiplier returning a new Money instance that holds the result of the operation. - * - * @param {Number} multiplier - * @param {Function} [fn=Math.round] - * @returns {Money} - */ - multiply(multiplier: number, fn?: Function): Money; - /** - * Divides the object by the multiplier returning a new Money instance that holds the result of the operation. - * - * @param {Number} divisor - * @param {Function} [fn=Math.round] - * @returns {Money} - */ - divide(divisor: number, fn?: Function): Money; - /** - * Allocates fund bases on the ratios provided returing an array of objects as a product of the allocation. - * - * @param {Array} other - * @returns {Array.Money} - */ - allocate(ratios: number[]): Money[]; - /** - * Compares two instances of Money. - * - * @param {Money} other - * @returns {Number} - */ - compare(other: Money): number; - /** - * Checks whether the value represented by this object is greater than the other. - * - * @param {Money} other - * @returns {boolean} - */ - greaterThan(other: Money): boolean; - /** - * Checks whether the value represented by this object is greater or equal to the other. - * - * @param {Money} other - * @returns {boolean} - */ - greaterThanOrEqual(other: Money): boolean; - /** - * Checks whether the value represented by this object is less than the other. - * - * @param {Money} other - * @returns {boolean} - */ - lessThan(other: Money): boolean; - /** - * Checks whether the value represented by this object is less than or equal to the other. - * - * @param {Money} other - * @returns {boolean} - */ - lessThanOrEqual(other: Money): boolean; - /** - * Returns true if the amount is zero. - * - * @returns {boolean} - */ - isZero(): boolean; - /** - * Returns true if the amount is positive. - * - * @returns {boolean} - */ - isPositive(): boolean; - /** - * Returns true if the amount is negative. - * - * @returns {boolean} - */ - isNegative(): boolean; - /** - * Returns the decimal value as a float. - * - * @returns {number} - */ - toDecimal(): number; - /** - * Returns the decimal value as a string. - * - * @returns {string} - */ - toString(): string; - /** - * Returns a serialised version of the instance. - * - * @returns {{amount: number, currency: string}} - */ - toJSON(): { - amount: number; - currency: string; - }; - /** - * Returns the amount represented by this object. - * - * @returns {number} - */ - getAmount(): number; - /** - * Returns the currency represented by this object. - * - * @returns {string} - */ - getCurrency(): string; - /** - * Returns the full currency object - */ - getCurrencyInfo(): Currency; -} -export { Money, Currencies, Currency }; diff --git a/build/index.js b/build/index.js deleted file mode 100644 index bb4dcd1..0000000 --- a/build/index.js +++ /dev/null @@ -1,344 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const currencies_1 = require("./lib/currencies"); -exports.Currencies = currencies_1.Currencies; -let isInt = function (n) { - return Number(n) === n && n % 1 === 0; -}; -let decimalPlaces = function (num) { - let match = ('' + num).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/); - if (!match) - return 0; - return Math.max(0, (match[1] ? match[1].length : 0) - (match[2] ? +match[2] : 0)); -}; -let assertSameCurrency = function (left, right) { - if (left.currency !== right.currency) - throw new Error('Different currencies'); -}; -let assertType = function (other) { - if (!(other instanceof Money)) - throw new TypeError('Instance of Money required'); -}; -let assertOperand = function (operand) { - if (Number.isNaN(parseFloat(operand)) && !isFinite(operand)) - throw new TypeError('Operand must be a number'); -}; -let getCurrencyObject = function (currency) { - let currencyObj = currencies_1.Currencies[currency]; - if (currencyObj) { - return currencyObj; - } - else { - for (let key in currencies_1.Currencies) { - if (key.toUpperCase() === currency.toUpperCase()) - return currencies_1.Currencies[key]; - } - } -}; -let isObjectLike = (value) => { - return value !== null && typeof value === 'object'; -}; -let isObject = (value) => { - const type = typeof value; - return value != null && (type === 'object' || type === 'function'); -}; -let getTag = (value) => { - if (value == null) { - return value === undefined ? '[object Undefined]' : '[object Null]'; - } - return toString.call(value); -}; -let isPlainObject = (value) => { - if (!isObjectLike(value) || getTag(value) != '[object Object]') { - return false; - } - if (Object.getPrototypeOf(value) === null) { - return true; - } - let proto = value; - while (Object.getPrototypeOf(proto) !== null) { - proto = Object.getPrototypeOf(proto); - } - return Object.getPrototypeOf(value) === proto; -}; -function isAmountObject(amount) { - return isObject(amount); -} -class Money { - /** - * Creates a new Money instance. - * The created Money instances is a value object thus it is immutable. - * - * @param {Number} amount - * @param {Object/String} currency - * @returns {Money} - * @constructor - */ - constructor(amount, currency) { - if (typeof currency === 'string') - currency = getCurrencyObject(currency); - if (!isPlainObject(currency)) - throw new TypeError('Invalid currency'); - if (!isInt(amount)) - throw new TypeError('Amount must be an integer'); - this.amount = amount; - this.currency = currency.code; - Object.freeze(this); - } - static fromInteger(amount, currency) { - if (isAmountObject(amount)) { - if (amount.amount === undefined || amount.currency === undefined) - throw new TypeError('Missing required parameters amount,currency'); - currency = amount.currency; - amount = amount.amount; - } - if (!isInt(amount)) - throw new TypeError('Amount must be an integer value'); - return new Money(amount, currency); - } - static fromDecimal(amount, currency, rounder) { - if (isAmountObject(amount)) { - if (amount.amount === undefined || amount.currency === undefined) - throw new TypeError('Missing required parameters amount,currency'); - rounder = currency; - currency = amount.currency; - amount = amount.amount; - } - if (typeof currency === 'string') - currency = getCurrencyObject(currency); - if (!isPlainObject(currency)) - throw new TypeError('Invalid currency'); - if (rounder === undefined) { - let decimals = decimalPlaces(amount); - if (decimals > currency.decimal_digits) - throw new Error(`The currency ${currency.code} supports only` + - ` ${currency.decimal_digits} decimal digits`); - rounder = Math.round; - } - else { - if (['round', 'floor', 'ceil'].indexOf(rounder) === -1 && typeof rounder !== 'function') - throw new TypeError('Invalid parameter rounder'); - if (typeof rounder === 'string') - rounder = Math[rounder]; - } - let precisionMultiplier = Math.pow(10, currency.decimal_digits); - let resultAmount = amount * precisionMultiplier; - resultAmount = rounder(resultAmount); - return new Money(resultAmount, currency); - } - /** - * Returns true if the two instances of Money are equal, false otherwise. - * - * @param {Money} other - * @returns {Boolean} - */ - equals(other) { - let self = this; - assertType(other); - return self.amount === other.amount && - self.currency === other.currency; - } - /** - * Adds the two objects together creating a new Money instance that holds the result of the operation. - * - * @param {Money} other - * @returns {Money} - */ - add(other) { - let self = this; - assertType(other); - assertSameCurrency(self, other); - return new Money(self.amount + other.amount, self.currency); - } - /** - * Subtracts the two objects creating a new Money instance that holds the result of the operation. - * - * @param {Money} other - * @returns {Money} - */ - subtract(other) { - let self = this; - assertType(other); - assertSameCurrency(self, other); - return new Money(self.amount - other.amount, self.currency); - } - /** - * Multiplies the object by the multiplier returning a new Money instance that holds the result of the operation. - * - * @param {Number} multiplier - * @param {Function} [fn=Math.round] - * @returns {Money} - */ - multiply(multiplier, fn) { - if (typeof fn !== 'function') - fn = Math.round; - assertOperand(multiplier); - let amount = fn(this.amount * multiplier); - return new Money(amount, this.currency); - } - /** - * Divides the object by the multiplier returning a new Money instance that holds the result of the operation. - * - * @param {Number} divisor - * @param {Function} [fn=Math.round] - * @returns {Money} - */ - divide(divisor, fn) { - if (typeof fn !== 'function') - fn = Math.round; - assertOperand(divisor); - let amount = fn(this.amount / divisor); - return new Money(amount, this.currency); - } - /** - * Allocates fund bases on the ratios provided returing an array of objects as a product of the allocation. - * - * @param {Array} other - * @returns {Array.Money} - */ - allocate(ratios) { - let self = this; - let remainder = self.amount; - let results = []; - let total = 0; - ratios.forEach(function (ratio) { - total += ratio; - }); - ratios.forEach(function (ratio) { - let share = Math.floor(self.amount * ratio / total); - results.push(new Money(share, self.currency)); - remainder -= share; - }); - for (let i = 0; remainder > 0; i++) { - results[i] = new Money(results[i].amount + 1, results[i].currency); - remainder--; - } - return results; - } - /** - * Compares two instances of Money. - * - * @param {Money} other - * @returns {Number} - */ - compare(other) { - let self = this; - assertType(other); - assertSameCurrency(self, other); - if (self.amount === other.amount) - return 0; - return self.amount > other.amount ? 1 : -1; - } - /** - * Checks whether the value represented by this object is greater than the other. - * - * @param {Money} other - * @returns {boolean} - */ - greaterThan(other) { - return 1 === this.compare(other); - } - /** - * Checks whether the value represented by this object is greater or equal to the other. - * - * @param {Money} other - * @returns {boolean} - */ - greaterThanOrEqual(other) { - return 0 <= this.compare(other); - } - /** - * Checks whether the value represented by this object is less than the other. - * - * @param {Money} other - * @returns {boolean} - */ - lessThan(other) { - return -1 === this.compare(other); - } - /** - * Checks whether the value represented by this object is less than or equal to the other. - * - * @param {Money} other - * @returns {boolean} - */ - lessThanOrEqual(other) { - return 0 >= this.compare(other); - } - /** - * Returns true if the amount is zero. - * - * @returns {boolean} - */ - isZero() { - return this.amount === 0; - } - /** - * Returns true if the amount is positive. - * - * @returns {boolean} - */ - isPositive() { - return this.amount > 0; - } - /** - * Returns true if the amount is negative. - * - * @returns {boolean} - */ - isNegative() { - return this.amount < 0; - } - /** - * Returns the decimal value as a float. - * - * @returns {number} - */ - toDecimal() { - return Number(this.toString()); - } - /** - * Returns the decimal value as a string. - * - * @returns {string} - */ - toString() { - let currency = getCurrencyObject(this.currency); - return (this.amount / Math.pow(10, currency.decimal_digits)).toFixed(currency.decimal_digits); - } - /** - * Returns a serialised version of the instance. - * - * @returns {{amount: number, currency: string}} - */ - toJSON() { - return { - amount: this.amount, - currency: this.currency - }; - } - /** - * Returns the amount represented by this object. - * - * @returns {number} - */ - getAmount() { - return this.amount; - } - /** - * Returns the currency represented by this object. - * - * @returns {string} - */ - getCurrency() { - return this.currency; - } - /** - * Returns the full currency object - */ - getCurrencyInfo() { - return getCurrencyObject(this.currency); - } -} -exports.Money = Money; -Object.assign(Money, currencies_1.Currencies); diff --git a/build/lib/currencies.d.ts b/build/lib/currencies.d.ts deleted file mode 100644 index 40e3d9b..0000000 --- a/build/lib/currencies.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { Currency } from './currency'; -export declare const Currencies: Record; diff --git a/build/lib/currencies.js b/build/lib/currencies.js deleted file mode 100644 index bce796a..0000000 --- a/build/lib/currencies.js +++ /dev/null @@ -1,1084 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Currencies = { - "USD": { - "symbol": "$", - "name": "US Dollar", - "symbol_native": "$", - "decimal_digits": 2, - "rounding": 0, - "code": "USD", - "name_plural": "US dollars" - }, - "CAD": { - "symbol": "CA$", - "name": "Canadian Dollar", - "symbol_native": "$", - "decimal_digits": 2, - "rounding": 0, - "code": "CAD", - "name_plural": "Canadian dollars" - }, - "EUR": { - "symbol": "€", - "name": "Euro", - "symbol_native": "€", - "decimal_digits": 2, - "rounding": 0, - "code": "EUR", - "name_plural": "euros" - }, - "BTC": { - "symbol": "BTC", - "name": "Bitcoin", - "symbol_native": "฿", - "decimal_digits": 8, - "rounding": 0, - "code": "BTC", - "name_plural": "Bitcoins" - }, - "AED": { - "symbol": "AED", - "name": "United Arab Emirates Dirham", - "symbol_native": "د.إ.‏", - "decimal_digits": 2, - "rounding": 0, - "code": "AED", - "name_plural": "UAE dirhams" - }, - "AFN": { - "symbol": "Af", - "name": "Afghan Afghani", - "symbol_native": "؋", - "decimal_digits": 2, - "rounding": 0, - "code": "AFN", - "name_plural": "Afghan Afghanis" - }, - "ALL": { - "symbol": "ALL", - "name": "Albanian Lek", - "symbol_native": "Lek", - "decimal_digits": 2, - "rounding": 0, - "code": "ALL", - "name_plural": "Albanian lekë" - }, - "AMD": { - "symbol": "AMD", - "name": "Armenian Dram", - "symbol_native": "դր.", - "decimal_digits": 2, - "rounding": 0, - "code": "AMD", - "name_plural": "Armenian drams" - }, - "ARS": { - "symbol": "AR$", - "name": "Argentine Peso", - "symbol_native": "$", - "decimal_digits": 2, - "rounding": 0, - "code": "ARS", - "name_plural": "Argentine pesos" - }, - "AUD": { - "symbol": "AU$", - "name": "Australian Dollar", - "symbol_native": "$", - "decimal_digits": 2, - "rounding": 0, - "code": "AUD", - "name_plural": "Australian dollars" - }, - "AZN": { - "symbol": "man.", - "name": "Azerbaijani Manat", - "symbol_native": "ман.", - "decimal_digits": 2, - "rounding": 0, - "code": "AZN", - "name_plural": "Azerbaijani manats" - }, - "BAM": { - "symbol": "KM", - "name": "Bosnia-Herzegovina Convertible Mark", - "symbol_native": "KM", - "decimal_digits": 2, - "rounding": 0, - "code": "BAM", - "name_plural": "Bosnia-Herzegovina convertible marks" - }, - "BDT": { - "symbol": "Tk", - "name": "Bangladeshi Taka", - "symbol_native": "৳", - "decimal_digits": 2, - "rounding": 0, - "code": "BDT", - "name_plural": "Bangladeshi takas" - }, - "BGN": { - "symbol": "BGN", - "name": "Bulgarian Lev", - "symbol_native": "лв.", - "decimal_digits": 2, - "rounding": 0, - "code": "BGN", - "name_plural": "Bulgarian leva" - }, - "BHD": { - "symbol": "BD", - "name": "Bahraini Dinar", - "symbol_native": "د.ب.‏", - "decimal_digits": 3, - "rounding": 0, - "code": "BHD", - "name_plural": "Bahraini dinars" - }, - "BIF": { - "symbol": "FBu", - "name": "Burundian Franc", - "symbol_native": "FBu", - "decimal_digits": 0, - "rounding": 0, - "code": "BIF", - "name_plural": "Burundian francs" - }, - "BND": { - "symbol": "BN$", - "name": "Brunei Dollar", - "symbol_native": "$", - "decimal_digits": 2, - "rounding": 0, - "code": "BND", - "name_plural": "Brunei dollars" - }, - "BOB": { - "symbol": "Bs", - "name": "Bolivian Boliviano", - "symbol_native": "Bs", - "decimal_digits": 2, - "rounding": 0, - "code": "BOB", - "name_plural": "Bolivian bolivianos" - }, - "BRL": { - "symbol": "R$", - "name": "Brazilian Real", - "symbol_native": "R$", - "decimal_digits": 2, - "rounding": 0, - "code": "BRL", - "name_plural": "Brazilian reals" - }, - "BWP": { - "symbol": "BWP", - "name": "Botswanan Pula", - "symbol_native": "P", - "decimal_digits": 2, - "rounding": 0, - "code": "BWP", - "name_plural": "Botswanan pulas" - }, - "BYR": { - "symbol": "BYR", - "name": "Belarusian Ruble", - "symbol_native": "BYR", - "decimal_digits": 0, - "rounding": 0, - "code": "BYR", - "name_plural": "Belarusian rubles" - }, - "BZD": { - "symbol": "BZ$", - "name": "Belize Dollar", - "symbol_native": "$", - "decimal_digits": 2, - "rounding": 0, - "code": "BZD", - "name_plural": "Belize dollars" - }, - "CDF": { - "symbol": "CDF", - "name": "Congolese Franc", - "symbol_native": "FrCD", - "decimal_digits": 2, - "rounding": 0, - "code": "CDF", - "name_plural": "Congolese francs" - }, - "CHF": { - "symbol": "CHF", - "name": "Swiss Franc", - "symbol_native": "CHF", - "decimal_digits": 2, - "rounding": 0.05, - "code": "CHF", - "name_plural": "Swiss francs" - }, - "CLP": { - "symbol": "CL$", - "name": "Chilean Peso", - "symbol_native": "$", - "decimal_digits": 0, - "rounding": 0, - "code": "CLP", - "name_plural": "Chilean pesos" - }, - "CNY": { - "symbol": "CN¥", - "name": "Chinese Yuan", - "symbol_native": "CN¥", - "decimal_digits": 2, - "rounding": 0, - "code": "CNY", - "name_plural": "Chinese yuan" - }, - "COP": { - "symbol": "CO$", - "name": "Colombian Peso", - "symbol_native": "$", - "decimal_digits": 2, - "rounding": 0, - "code": "COP", - "name_plural": "Colombian pesos" - }, - "CRC": { - "symbol": "₡", - "name": "Costa Rican Colón", - "symbol_native": "₡", - "decimal_digits": 2, - "rounding": 0, - "code": "CRC", - "name_plural": "Costa Rican colóns" - }, - "CVE": { - "symbol": "CV$", - "name": "Cape Verdean Escudo", - "symbol_native": "CV$", - "decimal_digits": 2, - "rounding": 0, - "code": "CVE", - "name_plural": "Cape Verdean escudos" - }, - "CZK": { - "symbol": "Kč", - "name": "Czech Republic Koruna", - "symbol_native": "Kč", - "decimal_digits": 2, - "rounding": 0, - "code": "CZK", - "name_plural": "Czech Republic korunas" - }, - "DJF": { - "symbol": "Fdj", - "name": "Djiboutian Franc", - "symbol_native": "Fdj", - "decimal_digits": 0, - "rounding": 0, - "code": "DJF", - "name_plural": "Djiboutian francs" - }, - "DKK": { - "symbol": "Dkr", - "name": "Danish Krone", - "symbol_native": "kr", - "decimal_digits": 2, - "rounding": 0, - "code": "DKK", - "name_plural": "Danish kroner" - }, - "DOP": { - "symbol": "RD$", - "name": "Dominican Peso", - "symbol_native": "RD$", - "decimal_digits": 2, - "rounding": 0, - "code": "DOP", - "name_plural": "Dominican pesos" - }, - "DZD": { - "symbol": "DA", - "name": "Algerian Dinar", - "symbol_native": "د.ج.‏", - "decimal_digits": 2, - "rounding": 0, - "code": "DZD", - "name_plural": "Algerian dinars" - }, - "EEK": { - "symbol": "Ekr", - "name": "Estonian Kroon", - "symbol_native": "kr", - "decimal_digits": 2, - "rounding": 0, - "code": "EEK", - "name_plural": "Estonian kroons" - }, - "EGP": { - "symbol": "EGP", - "name": "Egyptian Pound", - "symbol_native": "ج.م.‏", - "decimal_digits": 2, - "rounding": 0, - "code": "EGP", - "name_plural": "Egyptian pounds" - }, - "ERN": { - "symbol": "Nfk", - "name": "Eritrean Nakfa", - "symbol_native": "Nfk", - "decimal_digits": 2, - "rounding": 0, - "code": "ERN", - "name_plural": "Eritrean nakfas" - }, - "ETB": { - "symbol": "Br", - "name": "Ethiopian Birr", - "symbol_native": "Br", - "decimal_digits": 2, - "rounding": 0, - "code": "ETB", - "name_plural": "Ethiopian birrs" - }, - "GBP": { - "symbol": "£", - "name": "British Pound Sterling", - "symbol_native": "£", - "decimal_digits": 2, - "rounding": 0, - "code": "GBP", - "name_plural": "British pounds sterling" - }, - "GEL": { - "symbol": "GEL", - "name": "Georgian Lari", - "symbol_native": "GEL", - "decimal_digits": 2, - "rounding": 0, - "code": "GEL", - "name_plural": "Georgian laris" - }, - "GHS": { - "symbol": "GH₵", - "name": "Ghanaian Cedi", - "symbol_native": "GH₵", - "decimal_digits": 2, - "rounding": 0, - "code": "GHS", - "name_plural": "Ghanaian cedis" - }, - "GNF": { - "symbol": "FG", - "name": "Guinean Franc", - "symbol_native": "FG", - "decimal_digits": 0, - "rounding": 0, - "code": "GNF", - "name_plural": "Guinean francs" - }, - "GTQ": { - "symbol": "GTQ", - "name": "Guatemalan Quetzal", - "symbol_native": "Q", - "decimal_digits": 2, - "rounding": 0, - "code": "GTQ", - "name_plural": "Guatemalan quetzals" - }, - "HKD": { - "symbol": "HK$", - "name": "Hong Kong Dollar", - "symbol_native": "$", - "decimal_digits": 2, - "rounding": 0, - "code": "HKD", - "name_plural": "Hong Kong dollars" - }, - "HNL": { - "symbol": "HNL", - "name": "Honduran Lempira", - "symbol_native": "L", - "decimal_digits": 2, - "rounding": 0, - "code": "HNL", - "name_plural": "Honduran lempiras" - }, - "HRK": { - "symbol": "kn", - "name": "Croatian Kuna", - "symbol_native": "kn", - "decimal_digits": 2, - "rounding": 0, - "code": "HRK", - "name_plural": "Croatian kunas" - }, - "HUF": { - "symbol": "Ft", - "name": "Hungarian Forint", - "symbol_native": "Ft", - "decimal_digits": 2, - "rounding": 0, - "code": "HUF", - "name_plural": "Hungarian forints" - }, - "IDR": { - "symbol": "Rp", - "name": "Indonesian Rupiah", - "symbol_native": "Rp", - "decimal_digits": 2, - "rounding": 0, - "code": "IDR", - "name_plural": "Indonesian rupiahs" - }, - "ILS": { - "symbol": "₪", - "name": "Israeli New Sheqel", - "symbol_native": "₪", - "decimal_digits": 2, - "rounding": 0, - "code": "ILS", - "name_plural": "Israeli new sheqels" - }, - "INR": { - "symbol": "Rs", - "name": "Indian Rupee", - "symbol_native": "টকা", - "decimal_digits": 2, - "rounding": 0, - "code": "INR", - "name_plural": "Indian rupees" - }, - "IQD": { - "symbol": "IQD", - "name": "Iraqi Dinar", - "symbol_native": "د.ع.‏", - "decimal_digits": 3, - "rounding": 0, - "code": "IQD", - "name_plural": "Iraqi dinars" - }, - "IRR": { - "symbol": "IRR", - "name": "Iranian Rial", - "symbol_native": "﷼", - "decimal_digits": 2, - "rounding": 0, - "code": "IRR", - "name_plural": "Iranian rials" - }, - "ISK": { - "symbol": "Ikr", - "name": "Icelandic Króna", - "symbol_native": "kr", - "decimal_digits": 0, - "rounding": 0, - "code": "ISK", - "name_plural": "Icelandic krónur" - }, - "JMD": { - "symbol": "J$", - "name": "Jamaican Dollar", - "symbol_native": "$", - "decimal_digits": 2, - "rounding": 0, - "code": "JMD", - "name_plural": "Jamaican dollars" - }, - "JOD": { - "symbol": "JD", - "name": "Jordanian Dinar", - "symbol_native": "د.أ.‏", - "decimal_digits": 3, - "rounding": 0, - "code": "JOD", - "name_plural": "Jordanian dinars" - }, - "JPY": { - "symbol": "¥", - "name": "Japanese Yen", - "symbol_native": "¥", - "decimal_digits": 0, - "rounding": 0, - "code": "JPY", - "name_plural": "Japanese yen" - }, - "KES": { - "symbol": "Ksh", - "name": "Kenyan Shilling", - "symbol_native": "Ksh", - "decimal_digits": 2, - "rounding": 0, - "code": "KES", - "name_plural": "Kenyan shillings" - }, - "KHR": { - "symbol": "KHR", - "name": "Cambodian Riel", - "symbol_native": "៛", - "decimal_digits": 2, - "rounding": 0, - "code": "KHR", - "name_plural": "Cambodian riels" - }, - "KMF": { - "symbol": "CF", - "name": "Comorian Franc", - "symbol_native": "FC", - "decimal_digits": 0, - "rounding": 0, - "code": "KMF", - "name_plural": "Comorian francs" - }, - "KRW": { - "symbol": "₩", - "name": "South Korean Won", - "symbol_native": "₩", - "decimal_digits": 0, - "rounding": 0, - "code": "KRW", - "name_plural": "South Korean won" - }, - "KWD": { - "symbol": "KD", - "name": "Kuwaiti Dinar", - "symbol_native": "د.ك.‏", - "decimal_digits": 3, - "rounding": 0, - "code": "KWD", - "name_plural": "Kuwaiti dinars" - }, - "KZT": { - "symbol": "KZT", - "name": "Kazakhstani Tenge", - "symbol_native": "тңг.", - "decimal_digits": 2, - "rounding": 0, - "code": "KZT", - "name_plural": "Kazakhstani tenges" - }, - "LAK": { - "symbol": "₭", - "name": "Lao kip", - "symbol_native": "ກີບ", - "decimal_digits": 2, - "rounding": 0, - "code": "LAK", - "name_plural": "Lao kips" - }, - "LBP": { - "symbol": "LB£", - "name": "Lebanese Pound", - "symbol_native": "ل.ل.‏", - "decimal_digits": 2, - "rounding": 0, - "code": "LBP", - "name_plural": "Lebanese pounds" - }, - "LKR": { - "symbol": "SLRs", - "name": "Sri Lankan Rupee", - "symbol_native": "SL Re", - "decimal_digits": 2, - "rounding": 0, - "code": "LKR", - "name_plural": "Sri Lankan rupees" - }, - "LTL": { - "symbol": "Lt", - "name": "Lithuanian Litas", - "symbol_native": "Lt", - "decimal_digits": 2, - "rounding": 0, - "code": "LTL", - "name_plural": "Lithuanian litai" - }, - "LVL": { - "symbol": "Ls", - "name": "Latvian Lats", - "symbol_native": "Ls", - "decimal_digits": 2, - "rounding": 0, - "code": "LVL", - "name_plural": "Latvian lati" - }, - "LYD": { - "symbol": "LD", - "name": "Libyan Dinar", - "symbol_native": "د.ل.‏", - "decimal_digits": 3, - "rounding": 0, - "code": "LYD", - "name_plural": "Libyan dinars" - }, - "MAD": { - "symbol": "MAD", - "name": "Moroccan Dirham", - "symbol_native": "د.م.‏", - "decimal_digits": 2, - "rounding": 0, - "code": "MAD", - "name_plural": "Moroccan dirhams" - }, - "MDL": { - "symbol": "MDL", - "name": "Moldovan Leu", - "symbol_native": "MDL", - "decimal_digits": 2, - "rounding": 0, - "code": "MDL", - "name_plural": "Moldovan lei" - }, - "MGA": { - "symbol": "MGA", - "name": "Malagasy Ariary", - "symbol_native": "MGA", - "decimal_digits": 2, - "rounding": 0, - "code": "MGA", - "name_plural": "Malagasy Ariaries" - }, - "MKD": { - "symbol": "MKD", - "name": "Macedonian Denar", - "symbol_native": "MKD", - "decimal_digits": 2, - "rounding": 0, - "code": "MKD", - "name_plural": "Macedonian denari" - }, - "MMK": { - "symbol": "MMK", - "name": "Myanma Kyat", - "symbol_native": "K", - "decimal_digits": 2, - "rounding": 0, - "code": "MMK", - "name_plural": "Myanma kyats" - }, - "MOP": { - "symbol": "MOP$", - "name": "Macanese Pataca", - "symbol_native": "MOP$", - "decimal_digits": 2, - "rounding": 0, - "code": "MOP", - "name_plural": "Macanese patacas" - }, - "MUR": { - "symbol": "MURs", - "name": "Mauritian Rupee", - "symbol_native": "MURs", - "decimal_digits": 2, - "rounding": 0, - "code": "MUR", - "name_plural": "Mauritian rupees" - }, - "MXN": { - "symbol": "MX$", - "name": "Mexican Peso", - "symbol_native": "$", - "decimal_digits": 2, - "rounding": 0, - "code": "MXN", - "name_plural": "Mexican pesos" - }, - "MYR": { - "symbol": "RM", - "name": "Malaysian Ringgit", - "symbol_native": "RM", - "decimal_digits": 2, - "rounding": 0, - "code": "MYR", - "name_plural": "Malaysian ringgits" - }, - "MZN": { - "symbol": "MTn", - "name": "Mozambican Metical", - "symbol_native": "MTn", - "decimal_digits": 2, - "rounding": 0, - "code": "MZN", - "name_plural": "Mozambican meticals" - }, - "NAD": { - "symbol": "N$", - "name": "Namibian Dollar", - "symbol_native": "N$", - "decimal_digits": 2, - "rounding": 0, - "code": "NAD", - "name_plural": "Namibian dollars" - }, - "NGN": { - "symbol": "₦", - "name": "Nigerian Naira", - "symbol_native": "₦", - "decimal_digits": 2, - "rounding": 0, - "code": "NGN", - "name_plural": "Nigerian nairas" - }, - "NIO": { - "symbol": "C$", - "name": "Nicaraguan Córdoba", - "symbol_native": "C$", - "decimal_digits": 2, - "rounding": 0, - "code": "NIO", - "name_plural": "Nicaraguan córdobas" - }, - "NOK": { - "symbol": "Nkr", - "name": "Norwegian Krone", - "symbol_native": "kr", - "decimal_digits": 2, - "rounding": 0, - "code": "NOK", - "name_plural": "Norwegian kroner" - }, - "NPR": { - "symbol": "NPRs", - "name": "Nepalese Rupee", - "symbol_native": "नेरू", - "decimal_digits": 2, - "rounding": 0, - "code": "NPR", - "name_plural": "Nepalese rupees" - }, - "NZD": { - "symbol": "NZ$", - "name": "New Zealand Dollar", - "symbol_native": "$", - "decimal_digits": 2, - "rounding": 0, - "code": "NZD", - "name_plural": "New Zealand dollars" - }, - "OMR": { - "symbol": "OMR", - "name": "Omani Rial", - "symbol_native": "ر.ع.‏", - "decimal_digits": 3, - "rounding": 0, - "code": "OMR", - "name_plural": "Omani rials" - }, - "PAB": { - "symbol": "B/.", - "name": "Panamanian Balboa", - "symbol_native": "B/.", - "decimal_digits": 2, - "rounding": 0, - "code": "PAB", - "name_plural": "Panamanian balboas" - }, - "PEN": { - "symbol": "S/.", - "name": "Peruvian Nuevo Sol", - "symbol_native": "S/.", - "decimal_digits": 2, - "rounding": 0, - "code": "PEN", - "name_plural": "Peruvian nuevos soles" - }, - "PHP": { - "symbol": "₱", - "name": "Philippine Peso", - "symbol_native": "₱", - "decimal_digits": 2, - "rounding": 0, - "code": "PHP", - "name_plural": "Philippine pesos" - }, - "PKR": { - "symbol": "PKRs", - "name": "Pakistani Rupee", - "symbol_native": "₨", - "decimal_digits": 2, - "rounding": 0, - "code": "PKR", - "name_plural": "Pakistani rupees" - }, - "PLN": { - "symbol": "zł", - "name": "Polish Zloty", - "symbol_native": "zł", - "decimal_digits": 2, - "rounding": 0, - "code": "PLN", - "name_plural": "Polish zlotys" - }, - "PYG": { - "symbol": "₲", - "name": "Paraguayan Guarani", - "symbol_native": "₲", - "decimal_digits": 0, - "rounding": 0, - "code": "PYG", - "name_plural": "Paraguayan guaranis" - }, - "QAR": { - "symbol": "QR", - "name": "Qatari Rial", - "symbol_native": "ر.ق.‏", - "decimal_digits": 2, - "rounding": 0, - "code": "QAR", - "name_plural": "Qatari rials" - }, - "RON": { - "symbol": "RON", - "name": "Romanian Leu", - "symbol_native": "RON", - "decimal_digits": 2, - "rounding": 0, - "code": "RON", - "name_plural": "Romanian lei" - }, - "RSD": { - "symbol": "din.", - "name": "Serbian Dinar", - "symbol_native": "дин.", - "decimal_digits": 2, - "rounding": 0, - "code": "RSD", - "name_plural": "Serbian dinars" - }, - "RUB": { - "symbol": "RUB", - "name": "Russian Ruble", - "symbol_native": "₽", - "decimal_digits": 2, - "rounding": 0, - "code": "RUB", - "name_plural": "Russian rubles" - }, - "RWF": { - "symbol": "RWF", - "name": "Rwandan Franc", - "symbol_native": "FR", - "decimal_digits": 0, - "rounding": 0, - "code": "RWF", - "name_plural": "Rwandan francs" - }, - "SAR": { - "symbol": "SR", - "name": "Saudi Riyal", - "symbol_native": "ر.س.‏", - "decimal_digits": 2, - "rounding": 0, - "code": "SAR", - "name_plural": "Saudi riyals" - }, - "SDG": { - "symbol": "SDG", - "name": "Sudanese Pound", - "symbol_native": "SDG", - "decimal_digits": 2, - "rounding": 0, - "code": "SDG", - "name_plural": "Sudanese pounds" - }, - "SEK": { - "symbol": "Skr", - "name": "Swedish Krona", - "symbol_native": "kr", - "decimal_digits": 2, - "rounding": 0, - "code": "SEK", - "name_plural": "Swedish kronor" - }, - "SGD": { - "symbol": "S$", - "name": "Singapore Dollar", - "symbol_native": "$", - "decimal_digits": 2, - "rounding": 0, - "code": "SGD", - "name_plural": "Singapore dollars" - }, - "SOS": { - "symbol": "Ssh", - "name": "Somali Shilling", - "symbol_native": "Ssh", - "decimal_digits": 2, - "rounding": 0, - "code": "SOS", - "name_plural": "Somali shillings" - }, - "SYP": { - "symbol": "SY£", - "name": "Syrian Pound", - "symbol_native": "ل.س.‏", - "decimal_digits": 2, - "rounding": 0, - "code": "SYP", - "name_plural": "Syrian pounds" - }, - "THB": { - "symbol": "฿", - "name": "Thai Baht", - "symbol_native": "฿", - "decimal_digits": 2, - "rounding": 0, - "code": "THB", - "name_plural": "Thai baht" - }, - "TND": { - "symbol": "DT", - "name": "Tunisian Dinar", - "symbol_native": "د.ت.‏", - "decimal_digits": 3, - "rounding": 0, - "code": "TND", - "name_plural": "Tunisian dinars" - }, - "TOP": { - "symbol": "T$", - "name": "Tongan Paʻanga", - "symbol_native": "T$", - "decimal_digits": 2, - "rounding": 0, - "code": "TOP", - "name_plural": "Tongan paʻanga" - }, - "TRY": { - "symbol": "TL", - "name": "Turkish Lira", - "symbol_native": "TL", - "decimal_digits": 2, - "rounding": 0, - "code": "TRY", - "name_plural": "Turkish Lira" - }, - "TTD": { - "symbol": "TT$", - "name": "Trinidad and Tobago Dollar", - "symbol_native": "$", - "decimal_digits": 2, - "rounding": 0, - "code": "TTD", - "name_plural": "Trinidad and Tobago dollars" - }, - "TWD": { - "symbol": "NT$", - "name": "New Taiwan Dollar", - "symbol_native": "NT$", - "decimal_digits": 2, - "rounding": 0, - "code": "TWD", - "name_plural": "New Taiwan dollars" - }, - "TZS": { - "symbol": "TSh", - "name": "Tanzanian Shilling", - "symbol_native": "TSh", - "decimal_digits": 2, - "rounding": 0, - "code": "TZS", - "name_plural": "Tanzanian shillings" - }, - "UAH": { - "symbol": "₴", - "name": "Ukrainian Hryvnia", - "symbol_native": "₴", - "decimal_digits": 2, - "rounding": 0, - "code": "UAH", - "name_plural": "Ukrainian hryvnias" - }, - "UGX": { - "symbol": "USh", - "name": "Ugandan Shilling", - "symbol_native": "USh", - "decimal_digits": 0, - "rounding": 0, - "code": "UGX", - "name_plural": "Ugandan shillings" - }, - "UYU": { - "symbol": "$U", - "name": "Uruguayan Peso", - "symbol_native": "$", - "decimal_digits": 2, - "rounding": 0, - "code": "UYU", - "name_plural": "Uruguayan pesos" - }, - "UZS": { - "symbol": "UZS", - "name": "Uzbekistan Som", - "symbol_native": "UZS", - "decimal_digits": 2, - "rounding": 0, - "code": "UZS", - "name_plural": "Uzbekistan som" - }, - "VEF": { - "symbol": "Bs.F.", - "name": "Venezuelan Bolívar", - "symbol_native": "Bs.F.", - "decimal_digits": 2, - "rounding": 0, - "code": "VEF", - "name_plural": "Venezuelan bolívars" - }, - "VND": { - "symbol": "₫", - "name": "Vietnamese Dong", - "symbol_native": "₫", - "decimal_digits": 0, - "rounding": 0, - "code": "VND", - "name_plural": "Vietnamese dong" - }, - "XAF": { - "symbol": "FCFA", - "name": "CFA Franc BEAC", - "symbol_native": "FCFA", - "decimal_digits": 0, - "rounding": 0, - "code": "XAF", - "name_plural": "CFA francs BEAC" - }, - "XOF": { - "symbol": "CFA", - "name": "CFA Franc BCEAO", - "symbol_native": "CFA", - "decimal_digits": 0, - "rounding": 0, - "code": "XOF", - "name_plural": "CFA francs BCEAO" - }, - "YER": { - "symbol": "YR", - "name": "Yemeni Rial", - "symbol_native": "ر.ي.‏", - "decimal_digits": 2, - "rounding": 0, - "code": "YER", - "name_plural": "Yemeni rials" - }, - "ZAR": { - "symbol": "R", - "name": "South African Rand", - "symbol_native": "R", - "decimal_digits": 2, - "rounding": 0, - "code": "ZAR", - "name_plural": "South African rand" - }, - "ZMK": { - "symbol": "ZK", - "name": "Zambian Kwacha", - "symbol_native": "ZK", - "decimal_digits": 0, - "rounding": 0, - "code": "ZMK", - "name_plural": "Zambian kwachas" - } -}; diff --git a/build/lib/currency.d.ts b/build/lib/currency.d.ts deleted file mode 100644 index 3a0ba60..0000000 --- a/build/lib/currency.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export interface Currency { - symbol: string; - name: string; - symbol_native: string; - decimal_digits: number; - rounding: number; - code: string; - name_plural: string; -} diff --git a/build/lib/currency.js b/build/lib/currency.js deleted file mode 100644 index c8ad2e5..0000000 --- a/build/lib/currency.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/build/lib/index.d.ts b/build/lib/index.d.ts deleted file mode 100644 index 3f9de2f..0000000 --- a/build/lib/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './money'; diff --git a/build/lib/index.js b/build/lib/index.js deleted file mode 100644 index b4a94e2..0000000 --- a/build/lib/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -Object.defineProperty(exports, "__esModule", { value: true }); -__export(require("./money")); diff --git a/build/lib/money.d.ts b/build/lib/money.d.ts deleted file mode 100644 index e00ea5d..0000000 --- a/build/lib/money.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -export declare class Money { - amount: number; - currency: string; - constructor(amount: number, currency: any | string); - static fromInteger(amount: number | any, currency: string): Money; - static fromDecimal(amount: number | any, currency: string | any, rounder: string): Money; - equals(other: Money): boolean; - add(other: Money): Money; - subtract(other: Money): Money; - multiply(multiplier: number, fn: Function): Money; - divide(divisor: number, fn: Function): Money; - allocate(ratios: any[]): Money[]; - compare(other: Money): number; - greaterThan(other: Money): boolean; - greaterThanOrEqual(other: Money): boolean; - lessThan(other: Money): boolean; - lessThanOrEqual(other: Money): boolean; - isZero(): boolean; - isPositive(): boolean; - isNegative(): boolean; - toDecimal(): number; - toString(): string; - toJSON(): { - amount: number; - currency: string; - }; - getAmount(): number; - getCurrency(): string; -} diff --git a/build/lib/money.js b/build/lib/money.js deleted file mode 100644 index 2327caa..0000000 --- a/build/lib/money.js +++ /dev/null @@ -1,197 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const lodash_1 = require("lodash"); -const currency_1 = require("./currency"); -var isInt = function (n) { - return Number(n) === n && n % 1 === 0; -}; -var decimalPlaces = function (num) { - var match = ('' + num).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/); - if (!match) - return 0; - return Math.max(0, (match[1] ? match[1].length : 0) - (match[2] ? +match[2] : 0)); -}; -var assertSameCurrency = function (left, right) { - if (left.currency !== right.currency) - throw new Error('Different currencies'); -}; -var assertType = function (other) { - if (!(other instanceof Money)) - throw new TypeError('Instance of Money required'); -}; -var assertOperand = function (operand) { - if (lodash_1.isNaN(parseFloat(operand)) && !isFinite(operand)) - throw new TypeError('Operand must be a number'); -}; -class Money { - constructor(amount, currency) { - if (lodash_1.isString(currency)) - currency = currency_1.currencies[currency]; - if (!lodash_1.isPlainObject(currency)) - throw new TypeError('Invalid currency'); - if (!isInt(amount)) - throw new TypeError('Amount must be an integer'); - this.amount = amount; - this.currency = currency.code; - Object.freeze(this); - } - static fromInteger(amount, currency) { - if (lodash_1.isObject(amount)) { - if (amount.amount === undefined || amount.currency === undefined) - throw new TypeError('Missing required parameters amount,currency'); - currency = amount.currency; - amount = amount.amount; - } - if (!isInt(amount)) - throw new TypeError('Amount must be an integer value'); - return new Money(amount, currency); - } - static fromDecimal(amount, currency, rounder) { - if (lodash_1.isObject(amount)) { - if (amount.amount === undefined || amount.currency === undefined) - throw new TypeError('Missing required parameters amount,currency'); - rounder = currency; - currency = amount.currency; - amount = amount.amount; - } - if (lodash_1.isString(currency)) - currency = currency_1.currencies[currency]; - if (!lodash_1.isPlainObject(currency)) - throw new TypeError('Invalid currency'); - if (rounder === undefined) { - var decimals = decimalPlaces(amount); - if (decimals > currency.decimal_digits) - throw new Error("The currency " + currency.code + " supports only " - + currency.decimal_digits + " decimal digits"); - } - else { - if (['round', 'floor', 'ceil'].indexOf(rounder) === -1 && typeof rounder !== 'function') - throw new TypeError('Invalid parameter rounder'); - if (lodash_1.isString(rounder)) - rounder = Math[rounder]; - } - var precisionMultiplier = Math.pow(10, currency.decimal_digits); - var resultAmount = amount * precisionMultiplier; - if (lodash_1.isFunction(rounder)) - resultAmount = rounder(resultAmount); - return new Money(resultAmount, currency); - } - ; - equals(other) { - var self = this; - assertType(other); - return self.amount === other.amount && - self.currency === other.currency; - } - ; - add(other) { - var self = this; - assertType(other); - assertSameCurrency(self, other); - return new Money(self.amount + other.amount, self.currency); - } - ; - subtract(other) { - var self = this; - assertType(other); - assertSameCurrency(self, other); - return new Money(self.amount - other.amount, self.currency); - } - ; - multiply(multiplier, fn) { - if (!lodash_1.isFunction(fn)) - fn = Math.round; - assertOperand(multiplier); - var amount = fn(this.amount * multiplier); - return new Money(amount, this.currency); - } - ; - divide(divisor, fn) { - if (!lodash_1.isFunction(fn)) - fn = Math.round; - assertOperand(divisor); - var amount = fn(this.amount / divisor); - return new Money(amount, this.currency); - } - ; - allocate(ratios) { - var self = this; - var remainder = self.amount; - var results = []; - var total = 0; - ratios.forEach(function (ratio) { - total += ratio; - }); - ratios.forEach(function (ratio) { - var share = Math.floor(self.amount * ratio / total); - results.push(new Money(share, self.currency)); - remainder -= share; - }); - for (var i = 0; remainder > 0; i++) { - results[i] = new Money(results[i].amount + 1, results[i].currency); - remainder--; - } - return results; - } - ; - compare(other) { - var self = this; - assertType(other); - assertSameCurrency(self, other); - if (self.amount === other.amount) - return 0; - return self.amount > other.amount ? 1 : -1; - } - ; - greaterThan(other) { - return 1 === this.compare(other); - } - ; - greaterThanOrEqual(other) { - return 0 <= this.compare(other); - } - ; - lessThan(other) { - return -1 === this.compare(other); - } - ; - lessThanOrEqual(other) { - return 0 >= this.compare(other); - } - ; - isZero() { - return this.amount === 0; - } - ; - isPositive() { - return this.amount > 0; - } - ; - isNegative() { - return this.amount < 0; - } - ; - toDecimal() { - return Number(this.toString()); - } - ; - toString() { - var currency = currency_1.currencies[this.currency]; - return (this.amount / Math.pow(10, currency.decimal_digits)).toFixed(currency.decimal_digits); - } - ; - toJSON() { - return { - amount: this.amount, - currency: this.currency - }; - } - ; - getAmount() { - return this.amount; - } - getCurrency() { - return this.currency; - } -} -exports.Money = Money; diff --git a/examples/money.js b/examples/money.js deleted file mode 100644 index 1fa6c41..0000000 --- a/examples/money.js +++ /dev/null @@ -1,15 +0,0 @@ -var Money = require ('js-money').Money - -// creates a 10.00 EUR -var tenEur = new Money(1000, Money.EUR) - -// 5 EUR -var fiveEur = tenEur.divide(2) -// 20 EUR -var twentyEur = tenEur.multiply(2) - -// Returns an array of Money objects [3.34,3.33,3.33] -var shares = tenEur.allocate(1,1,1) - -// -var fromDecimal = new Money(15.62, Money.USD) diff --git a/examples/money.ts b/examples/money.ts deleted file mode 100644 index 1da6ec8..0000000 --- a/examples/money.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Money } from 'js-money' - -// creates a 10.00 EUR -let tenEur = new Money(1000, Money.EUR) - -// 5 EUR -let fiveEur = tenEur.divide(2) -// 20 EUR -let twentyEur = tenEur.multiply(2) - -// Returns an array of Money objects [3.34,3.33,3.33] -let shares = tenEur.allocate(1,1,1) - -// -let fromDecimal = new Money(15.62, Money.USD) diff --git a/package-lock.json b/package-lock.json index ef51a35..4efc4ee 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,665 +1,5406 @@ { - "name": "ts-money", - "version": "0.4.8", - "lockfileVersion": 1, + "name": "@screeny05/ts-money", + "version": "0.6.0", + "lockfileVersion": 3, "requires": true, - "dependencies": { - "@types/node": { - "version": "7.0.38", - "resolved": "https://registry.npmjs.org/@types/node/-/node-7.0.38.tgz", - "integrity": "sha1-FA7MYZMLMo5ykUI3xY3WLIgp6U0=", + "packages": { + "": { + "name": "@screeny05/ts-money", + "version": "0.6.0", + "license": "MIT", + "devDependencies": { + "@types/node": "^20.14.15", + "chai": "1.x.x", + "mocha": "^10.0.0", + "typescript": "^5.5.4", + "unbuild": "^2.0.0", + "vite": "^5.4.1", + "vitest": "^2.0.5" + } + }, + "node_modules/@ampproject/remapping": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", + "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.24.7", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.25.2", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.25.2.tgz", + "integrity": "sha512-bYcppcpKBvX4znYaPEeFau03bp89ShqNMLs+rmdptMw+heSZh9+z84d2YG+K7cYLbWwzdjtDoW/uqZmPjulClQ==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.25.2", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.25.2.tgz", + "integrity": "sha512-BBt3opiCOxUr9euZ5/ro/Xv8/V7yJ5bjYMqG/C1YAo8MIKAnumZalCN+msbci3Pigy4lIQfPUpfMM27HMGaYEA==", + "dev": true, + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.24.7", + "@babel/generator": "^7.25.0", + "@babel/helper-compilation-targets": "^7.25.2", + "@babel/helper-module-transforms": "^7.25.2", + "@babel/helpers": "^7.25.0", + "@babel/parser": "^7.25.0", + "@babel/template": "^7.25.0", + "@babel/traverse": "^7.25.2", + "@babel/types": "^7.25.2", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/core/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/generator": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.25.0.tgz", + "integrity": "sha512-3LEEcj3PVW8pW2R1SR1M89g/qrYk/m/mB/tLqn7dn4sbBUQyTqnlod+II2U4dqiGtUmkcnAmkMDralTFZttRiw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.25.0", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.25.2", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.2.tgz", + "integrity": "sha512-U2U5LsSaZ7TAt3cfaymQ8WHh0pxvdHoEk6HVpaexxixjyEquMh0L0YNJNM6CTGKMXV1iksi0iZkGw4AcFkPaaw==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.25.2", + "@babel/helper-validator-option": "^7.24.8", + "browserslist": "^4.23.1", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz", + "integrity": "sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==", + "dev": true, + "dependencies": { + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.25.2", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.25.2.tgz", + "integrity": "sha512-BjyRAbix6j/wv83ftcVJmBt72QtHI56C7JXZoG2xATiLpmoC7dpd8WnkikExHDVPpi/3qCmO6WY1EaXOluiecQ==", + "dev": true, + "dependencies": { + "@babel/helper-module-imports": "^7.24.7", + "@babel/helper-simple-access": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "@babel/traverse": "^7.25.2" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-simple-access": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.24.7.tgz", + "integrity": "sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==", + "dev": true, + "dependencies": { + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz", + "integrity": "sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", + "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.24.8.tgz", + "integrity": "sha512-xb8t9tD1MHLungh/AIoWYN+gVHaB9kwlu8gffXGSt3FFEIT7RjS+xWbc2vUD1UTZdIpKj/ab3rdqJ7ufngyi2Q==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.25.0.tgz", + "integrity": "sha512-MjgLZ42aCm0oGjJj8CtSM3DB8NOOf8h2l7DCTePJs29u+v7yO/RBX9nShlKMgFnRks/Q4tBAe7Hxnov9VkGwLw==", + "dev": true, + "dependencies": { + "@babel/template": "^7.25.0", + "@babel/types": "^7.25.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", + "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.24.7", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/highlight/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/@babel/highlight/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@babel/highlight/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/parser": { + "version": "7.25.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.3.tgz", + "integrity": "sha512-iLTJKDbJ4hMvFPgQwwsVoxtHyWpKKPBrxkANrSYewDPaPpT5py5yeVkgPIJ7XYXhndxJpaA3PyALSXQ7u8e/Dw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.25.2" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/standalone": { + "version": "7.25.3", + "resolved": "https://registry.npmjs.org/@babel/standalone/-/standalone-7.25.3.tgz", + "integrity": "sha512-uR+EoBqIIIvKGCG7fOj7HKupu3zVObiMfdEwoPZfVCPpcWJaZ1PkshaP5/6cl6BKAm1Zcv25O1rf+uoQ7V8nqA==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/template": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.0.tgz", + "integrity": "sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.24.7", + "@babel/parser": "^7.25.0", + "@babel/types": "^7.25.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.25.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.3.tgz", + "integrity": "sha512-HefgyP1x754oGCsKmV5reSmtV7IXj/kpaE1XYY+D9G5PvKKoFfSbiS4M77MdjuwlZKDIKFCffq9rPU+H/s3ZdQ==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.24.7", + "@babel/generator": "^7.25.0", + "@babel/parser": "^7.25.3", + "@babel/template": "^7.25.0", + "@babel/types": "^7.25.2", + "debug": "^4.3.1", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.25.2", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.2.tgz", + "integrity": "sha512-YTnYtra7W9e6/oAZEHj0bJehPRUlLH9/fbpT5LfB0NhQXyALCRkRs3zH9v07IYhkgpqX6Z78FnuccZr/l4Fs4Q==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.24.8", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.12.tgz", + "integrity": "sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.12.tgz", + "integrity": "sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.12.tgz", + "integrity": "sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.12.tgz", + "integrity": "sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.12.tgz", + "integrity": "sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.12.tgz", + "integrity": "sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.12.tgz", + "integrity": "sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.12.tgz", + "integrity": "sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.12.tgz", + "integrity": "sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.12.tgz", + "integrity": "sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.12.tgz", + "integrity": "sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.12.tgz", + "integrity": "sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.12.tgz", + "integrity": "sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.12.tgz", + "integrity": "sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.12.tgz", + "integrity": "sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.12.tgz", + "integrity": "sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.12.tgz", + "integrity": "sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.12.tgz", + "integrity": "sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.23.0.tgz", + "integrity": "sha512-suXjq53gERueVWu0OKxzWqk7NxiUWSUlrxoZK7usiF50C6ipColGR5qie2496iKGYNLhDZkPxBI3erbnYkU0rQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.12.tgz", + "integrity": "sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.12.tgz", + "integrity": "sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.12.tgz", + "integrity": "sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.12.tgz", + "integrity": "sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.12.tgz", + "integrity": "sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@rollup/plugin-alias": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-alias/-/plugin-alias-5.1.0.tgz", + "integrity": "sha512-lpA3RZ9PdIG7qqhEfv79tBffNaoDuukFDrmhLqg9ifv99u/ehn+lOg30x2zmhf8AQqQUZaMk/B9fZraQ6/acDQ==", + "dev": true, + "dependencies": { + "slash": "^4.0.0" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/plugin-commonjs": { + "version": "25.0.8", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-25.0.8.tgz", + "integrity": "sha512-ZEZWTK5n6Qde0to4vS9Mr5x/0UZoqCxPVR9KRUjU4kA2sO7GEUn1fop0DAwpO6z0Nw/kJON9bDmSxdWxO/TT1A==", + "dev": true, + "dependencies": { + "@rollup/pluginutils": "^5.0.1", + "commondir": "^1.0.1", + "estree-walker": "^2.0.2", + "glob": "^8.0.3", + "is-reference": "1.2.1", + "magic-string": "^0.30.3" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^2.68.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/plugin-commonjs/node_modules/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@rollup/plugin-json": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-json/-/plugin-json-6.1.0.tgz", + "integrity": "sha512-EGI2te5ENk1coGeADSIwZ7G2Q8CJS2sF120T7jLw4xFw9n7wIOXHo+kIYRAoVpJAN+kmqZSoO3Fp4JtoNF4ReA==", + "dev": true, + "dependencies": { + "@rollup/pluginutils": "^5.1.0" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/plugin-node-resolve": { + "version": "15.2.3", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.2.3.tgz", + "integrity": "sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ==", + "dev": true, + "dependencies": { + "@rollup/pluginutils": "^5.0.1", + "@types/resolve": "1.20.2", + "deepmerge": "^4.2.2", + "is-builtin-module": "^3.2.1", + "is-module": "^1.0.0", + "resolve": "^1.22.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^2.78.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/plugin-replace": { + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/@rollup/plugin-replace/-/plugin-replace-5.0.7.tgz", + "integrity": "sha512-PqxSfuorkHz/SPpyngLyg5GCEkOcee9M1bkxiVDr41Pd61mqP1PLOoDPbpl44SB2mQGKwV/In74gqQmGITOhEQ==", + "dev": true, + "dependencies": { + "@rollup/pluginutils": "^5.0.1", + "magic-string": "^0.30.3" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/pluginutils": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.0.tgz", + "integrity": "sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==", + "dev": true, + "dependencies": { + "@types/estree": "^1.0.0", + "estree-walker": "^2.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.20.0.tgz", + "integrity": "sha512-TSpWzflCc4VGAUJZlPpgAJE1+V60MePDQnBd7PPkpuEmOy8i87aL6tinFGKBFKuEDikYpig72QzdT3QPYIi+oA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.20.0.tgz", + "integrity": "sha512-u00Ro/nok7oGzVuh/FMYfNoGqxU5CPWz1mxV85S2w9LxHR8OoMQBuSk+3BKVIDYgkpeOET5yXkx90OYFc+ytpQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.20.0.tgz", + "integrity": "sha512-uFVfvzvsdGtlSLuL0ZlvPJvl6ZmrH4CBwLGEFPe7hUmf7htGAN+aXo43R/V6LATyxlKVC/m6UsLb7jbG+LG39Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.20.0.tgz", + "integrity": "sha512-xbrMDdlev53vNXexEa6l0LffojxhqDTBeL+VUxuuIXys4x6xyvbKq5XqTXBCEUA8ty8iEJblHvFaWRJTk/icAQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.20.0.tgz", + "integrity": "sha512-jMYvxZwGmoHFBTbr12Xc6wOdc2xA5tF5F2q6t7Rcfab68TT0n+r7dgawD4qhPEvasDsVpQi+MgDzj2faOLsZjA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.20.0.tgz", + "integrity": "sha512-1asSTl4HKuIHIB1GcdFHNNZhxAYEdqML/MW4QmPS4G0ivbEcBr1JKlFLKsIRqjSwOBkdItn3/ZDlyvZ/N6KPlw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.20.0.tgz", + "integrity": "sha512-COBb8Bkx56KldOYJfMf6wKeYJrtJ9vEgBRAOkfw6Ens0tnmzPqvlpjZiLgkhg6cA3DGzCmLmmd319pmHvKWWlQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.20.0.tgz", + "integrity": "sha512-+it+mBSyMslVQa8wSPvBx53fYuZK/oLTu5RJoXogjk6x7Q7sz1GNRsXWjn6SwyJm8E/oMjNVwPhmNdIjwP135Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.20.0.tgz", + "integrity": "sha512-yAMvqhPfGKsAxHN8I4+jE0CpLWD8cv4z7CK7BMmhjDuz606Q2tFKkWRY8bHR9JQXYcoLfopo5TTqzxgPUjUMfw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.20.0.tgz", + "integrity": "sha512-qmuxFpfmi/2SUkAw95TtNq/w/I7Gpjurx609OOOV7U4vhvUhBcftcmXwl3rqAek+ADBwSjIC4IVNLiszoj3dPA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.20.0.tgz", + "integrity": "sha512-I0BtGXddHSHjV1mqTNkgUZLnS3WtsqebAXv11D5BZE/gfw5KoyXSAXVqyJximQXNvNzUo4GKlCK/dIwXlz+jlg==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.20.0.tgz", + "integrity": "sha512-y+eoL2I3iphUg9tN9GB6ku1FA8kOfmF4oUEWhztDJ4KXJy1agk/9+pejOuZkNFhRwHAOxMsBPLbXPd6mJiCwew==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.20.0.tgz", + "integrity": "sha512-hM3nhW40kBNYUkZb/r9k2FKK+/MnKglX7UYd4ZUy5DJs8/sMsIbqWK2piZtVGE3kcXVNj3B2IrUYROJMMCikNg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.20.0.tgz", + "integrity": "sha512-psegMvP+Ik/Bg7QRJbv8w8PAytPA7Uo8fpFjXyCRHWm6Nt42L+JtoqH8eDQ5hRP7/XW2UiIriy1Z46jf0Oa1kA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.20.0.tgz", + "integrity": "sha512-GabekH3w4lgAJpVxkk7hUzUf2hICSQO0a/BLFA11/RMxQT92MabKAqyubzDZmMOC/hcJNlc+rrypzNzYl4Dx7A==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.20.0.tgz", + "integrity": "sha512-aJ1EJSuTdGnM6qbVC4B5DSmozPTqIag9fSzXRNNo+humQLG89XpPgdt16Ia56ORD7s+H8Pmyx44uczDQ0yDzpg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@trysound/sax": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@trysound/sax/-/sax-0.2.0.tgz", + "integrity": "sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==", + "dev": true, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "dev": true + }, + "node_modules/@types/node": { + "version": "20.14.15", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.15.tgz", + "integrity": "sha512-Fz1xDMCF/B00/tYSVMlmK7hVeLh7jE5f3B7X1/hmV0MJBwE27KlS7EvD/Yp+z1lm8mVhwV5w+n8jOZG8AfTlKw==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/@types/resolve": { + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz", + "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==", + "dev": true + }, + "node_modules/@ungap/promise-all-settled": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", + "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", + "dev": true + }, + "node_modules/@vitest/expect": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-2.0.5.tgz", + "integrity": "sha512-yHZtwuP7JZivj65Gxoi8upUN2OzHTi3zVfjwdpu2WrvCZPLwsJ2Ey5ILIPccoW23dd/zQBlJ4/dhi7DWNyXCpA==", + "dev": true, + "dependencies": { + "@vitest/spy": "2.0.5", + "@vitest/utils": "2.0.5", + "chai": "^5.1.1", + "tinyrainbow": "^1.2.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/expect/node_modules/assertion-error": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", + "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", + "dev": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/@vitest/expect/node_modules/chai": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/chai/-/chai-5.1.1.tgz", + "integrity": "sha512-pT1ZgP8rPNqUgieVaEY+ryQr6Q4HXNg8Ei9UnLUrjN4IA7dvQC5JB+/kxVcPNDHyBcc/26CXPkbNzq3qwrOEKA==", + "dev": true, + "dependencies": { + "assertion-error": "^2.0.1", + "check-error": "^2.1.1", + "deep-eql": "^5.0.1", + "loupe": "^3.1.0", + "pathval": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@vitest/expect/node_modules/deep-eql": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz", + "integrity": "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/@vitest/pretty-format": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-2.0.5.tgz", + "integrity": "sha512-h8k+1oWHfwTkyTkb9egzwNMfJAEx4veaPSnMeKbVSjp4euqGSbQlm5+6VHwTr7u4FJslVVsUG5nopCaAYdOmSQ==", + "dev": true, + "dependencies": { + "tinyrainbow": "^1.2.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/runner": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-2.0.5.tgz", + "integrity": "sha512-TfRfZa6Bkk9ky4tW0z20WKXFEwwvWhRY+84CnSEtq4+3ZvDlJyY32oNTJtM7AW9ihW90tX/1Q78cb6FjoAs+ig==", + "dev": true, + "dependencies": { + "@vitest/utils": "2.0.5", + "pathe": "^1.1.2" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/snapshot": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-2.0.5.tgz", + "integrity": "sha512-SgCPUeDFLaM0mIUHfaArq8fD2WbaXG/zVXjRupthYfYGzc8ztbFbu6dUNOblBG7XLMR1kEhS/DNnfCZ2IhdDew==", + "dev": true, + "dependencies": { + "@vitest/pretty-format": "2.0.5", + "magic-string": "^0.30.10", + "pathe": "^1.1.2" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/spy": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-2.0.5.tgz", + "integrity": "sha512-c/jdthAhvJdpfVuaexSrnawxZz6pywlTPe84LUB2m/4t3rl2fTo9NFGBG4oWgaD+FTgDDV8hJ/nibT7IfH3JfA==", + "dev": true, + "dependencies": { + "tinyspy": "^3.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/utils": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-2.0.5.tgz", + "integrity": "sha512-d8HKbqIcya+GR67mkZbrzhS5kKhtp8dQLcmRZLGTscGVg7yImT82cIrhtn2L8+VujWcy6KZweApgNmPsTAO/UQ==", + "dev": true, + "dependencies": { + "@vitest/pretty-format": "2.0.5", + "estree-walker": "^3.0.3", + "loupe": "^3.1.1", + "tinyrainbow": "^1.2.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/utils/node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "dev": true, + "dependencies": { + "@types/estree": "^1.0.0" + } + }, + "node_modules/acorn": { + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/assertion-error": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.0.0.tgz", + "integrity": "sha1-x/hUOP3UZrx8oWq5DIFRN5el0js=", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/autoprefixer": { + "version": "10.4.20", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.20.tgz", + "integrity": "sha512-XY25y5xSv/wEoqzDyXXME4AFfkZI0P23z6Fs3YgymDnKJkCGOnkL0iTxCa85UTqaSgfcqyf3UA6+c7wUvx/16g==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/autoprefixer" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "browserslist": "^4.23.3", + "caniuse-lite": "^1.0.30001646", + "fraction.js": "^4.3.7", + "normalize-range": "^0.1.2", + "picocolors": "^1.0.1", + "postcss-value-parser": "^4.2.0" + }, + "bin": { + "autoprefixer": "bin/autoprefixer" + }, + "engines": { + "node": "^10 || ^12 || >=14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", + "dev": true + }, + "node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, + "node_modules/browserslist": { + "version": "4.23.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.3.tgz", + "integrity": "sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "caniuse-lite": "^1.0.30001646", + "electron-to-chromium": "^1.5.4", + "node-releases": "^2.0.18", + "update-browserslist-db": "^1.1.0" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/builtin-modules": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", + "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==", + "dev": true, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cac": { + "version": "6.7.14", + "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/caniuse-api": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz", + "integrity": "sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==", + "dev": true, + "dependencies": { + "browserslist": "^4.0.0", + "caniuse-lite": "^1.0.0", + "lodash.memoize": "^4.1.2", + "lodash.uniq": "^4.5.0" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001651", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001651.tgz", + "integrity": "sha512-9Cf+Xv1jJNe1xPZLGuUXLNkE1BoDkqRqYyFJ9TDYSqhduqA4hu4oR9HluGoWYQC/aj8WHjsGVV+bwkh0+tegRg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ] + }, + "node_modules/chai": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-1.10.0.tgz", + "integrity": "sha1-5AMcyHZURhp1lD5aNatG6vOcHrk=", + "dev": true, + "dependencies": { + "assertion-error": "1.0.0", + "deep-eql": "0.1.3" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/check-error": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.1.tgz", + "integrity": "sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==", + "dev": true, + "engines": { + "node": ">= 16" + } + }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/citty": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/citty/-/citty-0.1.6.tgz", + "integrity": "sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ==", + "dev": true, + "dependencies": { + "consola": "^3.2.3" + } + }, + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/colord": { + "version": "2.9.3", + "resolved": "https://registry.npmjs.org/colord/-/colord-2.9.3.tgz", + "integrity": "sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw==", + "dev": true + }, + "node_modules/commander": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "dev": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/confbox": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.1.7.tgz", + "integrity": "sha512-uJcB/FKZtBMCJpK8MQji6bJHgu1tixKPxRLeGkNzBoOZzpnZUJm0jm2/sBDWcuBx1dYgxV4JU+g5hmNxCyAmdA==", + "dev": true + }, + "node_modules/consola": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/consola/-/consola-3.2.3.tgz", + "integrity": "sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ==", + "dev": true, + "engines": { + "node": "^14.18.0 || >=16.10.0" + } + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/css-declaration-sorter": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-7.2.0.tgz", + "integrity": "sha512-h70rUM+3PNFuaBDTLe8wF/cdWu+dOZmb7pJt8Z2sedYbAcQVQV/tEchueg3GWxwqS0cxtbxmaHEdkNACqcvsow==", + "dev": true, + "engines": { + "node": "^14 || ^16 || >=18" + }, + "peerDependencies": { + "postcss": "^8.0.9" + } + }, + "node_modules/css-select": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", + "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", + "dev": true, + "dependencies": { + "boolbase": "^1.0.0", + "css-what": "^6.1.0", + "domhandler": "^5.0.2", + "domutils": "^3.0.1", + "nth-check": "^2.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/css-tree": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz", + "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==", + "dev": true, + "dependencies": { + "mdn-data": "2.0.30", + "source-map-js": "^1.0.1" + }, + "engines": { + "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0" + } + }, + "node_modules/css-what": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", + "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", + "dev": true, + "engines": { + "node": ">= 6" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "dev": true, + "bin": { + "cssesc": "bin/cssesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/cssnano": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-7.0.5.tgz", + "integrity": "sha512-Aq0vqBLtpTT5Yxj+hLlLfNPFuRQCDIjx5JQAhhaedQKLNDvDGeVziF24PS+S1f0Z5KCxWvw0QVI3VNHNBITxVQ==", + "dev": true, + "dependencies": { + "cssnano-preset-default": "^7.0.5", + "lilconfig": "^3.1.2" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/cssnano" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/cssnano-preset-default": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-7.0.5.tgz", + "integrity": "sha512-Jbzja0xaKwc5JzxPQoc+fotKpYtWEu4wQLMQe29CM0FjjdRjA4omvbGHl2DTGgARKxSTpPssBsok+ixv8uTBqw==", + "dev": true, + "dependencies": { + "browserslist": "^4.23.3", + "css-declaration-sorter": "^7.2.0", + "cssnano-utils": "^5.0.0", + "postcss-calc": "^10.0.1", + "postcss-colormin": "^7.0.2", + "postcss-convert-values": "^7.0.3", + "postcss-discard-comments": "^7.0.2", + "postcss-discard-duplicates": "^7.0.1", + "postcss-discard-empty": "^7.0.0", + "postcss-discard-overridden": "^7.0.0", + "postcss-merge-longhand": "^7.0.3", + "postcss-merge-rules": "^7.0.3", + "postcss-minify-font-values": "^7.0.0", + "postcss-minify-gradients": "^7.0.0", + "postcss-minify-params": "^7.0.2", + "postcss-minify-selectors": "^7.0.3", + "postcss-normalize-charset": "^7.0.0", + "postcss-normalize-display-values": "^7.0.0", + "postcss-normalize-positions": "^7.0.0", + "postcss-normalize-repeat-style": "^7.0.0", + "postcss-normalize-string": "^7.0.0", + "postcss-normalize-timing-functions": "^7.0.0", + "postcss-normalize-unicode": "^7.0.2", + "postcss-normalize-url": "^7.0.0", + "postcss-normalize-whitespace": "^7.0.0", + "postcss-ordered-values": "^7.0.1", + "postcss-reduce-initial": "^7.0.2", + "postcss-reduce-transforms": "^7.0.0", + "postcss-svgo": "^7.0.1", + "postcss-unique-selectors": "^7.0.2" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/cssnano-utils": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cssnano-utils/-/cssnano-utils-5.0.0.tgz", + "integrity": "sha512-Uij0Xdxc24L6SirFr25MlwC2rCFX6scyUmuKpzI+JQ7cyqDEwD42fJ0xfB3yLfOnRDU5LKGgjQ9FA6LYh76GWQ==", + "dev": true, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/csso": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/csso/-/csso-5.0.5.tgz", + "integrity": "sha512-0LrrStPOdJj+SPCCrGhzryycLjwcgUSHBtxNA8aIDxf0GLsRh1cKYhB00Gd1lDOS4yGH69+SNn13+TWbVHETFQ==", + "dev": true, + "dependencies": { + "css-tree": "~2.2.0" + }, + "engines": { + "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0", + "npm": ">=7.0.0" + } + }, + "node_modules/csso/node_modules/css-tree": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.2.1.tgz", + "integrity": "sha512-OA0mILzGc1kCOCSJerOeqDxDQ4HOh+G8NbOJFOTgOCzpw7fCBubk0fEyxp8AgOL/jvLgYA/uV0cMbe43ElF1JA==", + "dev": true, + "dependencies": { + "mdn-data": "2.0.28", + "source-map-js": "^1.0.1" + }, + "engines": { + "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0", + "npm": ">=7.0.0" + } + }, + "node_modules/csso/node_modules/mdn-data": { + "version": "2.0.28", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.28.tgz", + "integrity": "sha512-aylIc7Z9y4yzHYAJNuESG3hfhC+0Ibp/MAMiaOZgNv4pmEdFyfZhhhny4MNiAfWdBQ1RQ2mfDWmM1x8SvGyp8g==", + "dev": true + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/debug/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/deep-eql": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-0.1.3.tgz", + "integrity": "sha1-71WKyrjeJSBs1xOQbXTlaTDrafI=", + "dev": true, + "dependencies": { + "type-detect": "0.1.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/defu": { + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/defu/-/defu-6.1.4.tgz", + "integrity": "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==", + "dev": true + }, + "node_modules/diff": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/dom-serializer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", + "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", + "dev": true, + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "entities": "^4.2.0" + }, + "funding": { + "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" + } + }, + "node_modules/domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ] + }, + "node_modules/domhandler": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", + "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", + "dev": true, + "dependencies": { + "domelementtype": "^2.3.0" + }, + "engines": { + "node": ">= 4" + }, + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" + } + }, + "node_modules/domutils": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz", + "integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==", + "dev": true, + "dependencies": { + "dom-serializer": "^2.0.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3" + }, + "funding": { + "url": "https://github.com/fb55/domutils?sponsor=1" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.5.9", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.9.tgz", + "integrity": "sha512-HfkT8ndXR0SEkU8gBQQM3rz035bpE/hxkZ1YIt4KJPEFES68HfIU6LzKukH0H794Lm83WJtkSAMfEToxCs15VA==", + "dev": true + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "dev": true, + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/esbuild": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.12.tgz", + "integrity": "sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.19.12", + "@esbuild/android-arm": "0.19.12", + "@esbuild/android-arm64": "0.19.12", + "@esbuild/android-x64": "0.19.12", + "@esbuild/darwin-arm64": "0.19.12", + "@esbuild/darwin-x64": "0.19.12", + "@esbuild/freebsd-arm64": "0.19.12", + "@esbuild/freebsd-x64": "0.19.12", + "@esbuild/linux-arm": "0.19.12", + "@esbuild/linux-arm64": "0.19.12", + "@esbuild/linux-ia32": "0.19.12", + "@esbuild/linux-loong64": "0.19.12", + "@esbuild/linux-mips64el": "0.19.12", + "@esbuild/linux-ppc64": "0.19.12", + "@esbuild/linux-riscv64": "0.19.12", + "@esbuild/linux-s390x": "0.19.12", + "@esbuild/linux-x64": "0.19.12", + "@esbuild/netbsd-x64": "0.19.12", + "@esbuild/openbsd-x64": "0.19.12", + "@esbuild/sunos-x64": "0.19.12", + "@esbuild/win32-arm64": "0.19.12", + "@esbuild/win32-ia32": "0.19.12", + "@esbuild/win32-x64": "0.19.12" + } + }, + "node_modules/escalade": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true + }, + "node_modules/execa": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", + "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^8.0.1", + "human-signals": "^5.0.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^4.1.0", + "strip-final-newline": "^3.0.0" + }, + "engines": { + "node": ">=16.17" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fastq": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true, + "bin": { + "flat": "cli.js" + } + }, + "node_modules/fraction.js": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz", + "integrity": "sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==", + "dev": true, + "engines": { + "node": "*" + }, + "funding": { + "type": "patreon", + "url": "https://github.com/sponsors/rawify" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-func-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", + "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/get-stream": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", + "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", + "dev": true, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/globby": { + "version": "13.2.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-13.2.2.tgz", + "integrity": "sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==", + "dev": true, + "dependencies": { + "dir-glob": "^3.0.1", + "fast-glob": "^3.3.0", + "ignore": "^5.2.4", + "merge2": "^1.4.1", + "slash": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true, + "bin": { + "he": "bin/he" + } + }, + "node_modules/hookable": { + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/hookable/-/hookable-5.5.3.tgz", + "integrity": "sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==", + "dev": true + }, + "node_modules/human-signals": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", + "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", + "dev": true, + "engines": { + "node": ">=16.17.0" + } + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-builtin-module": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.1.tgz", + "integrity": "sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==", + "dev": true, + "dependencies": { + "builtin-modules": "^3.3.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-core-module": { + "version": "2.15.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.0.tgz", + "integrity": "sha512-Dd+Lb2/zvk9SKy1TGCt1wFJFo/MWBPMX5x7KcvLajWTGuomczdQX61PvY5yK6SVACwpoexWo81IfFyoKY2QnTA==", + "dev": true, + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==", + "dev": true + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-reference": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", + "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==", + "dev": true, + "dependencies": { + "@types/estree": "*" + } + }, + "node_modules/is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/jiti": { + "version": "1.21.6", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.6.tgz", + "integrity": "sha512-2yTgeWTWzMWkHu6Jp9NKgePDaYHbntiwvYuuJLbbN9vl7DC9DvXKOB2BC3ZZ92D3cvV/aflH0osDfwpHepQ53w==", + "dev": true, + "bin": { + "jiti": "bin/jiti.js" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/lilconfig": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.2.tgz", + "integrity": "sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", + "dev": true + }, + "node_modules/lodash.uniq": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "integrity": "sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==", + "dev": true + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/loupe": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.1.tgz", + "integrity": "sha512-edNu/8D5MKVfGVFRhFf8aAxiTM6Wumfz5XsaatSxlD3w4R1d/WEKUTydCdPGbl9K7QG/Ca3GnDV2sIKIpXRQcw==", + "dev": true, + "dependencies": { + "get-func-name": "^2.0.1" + } + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/magic-string": { + "version": "0.30.11", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.11.tgz", + "integrity": "sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==", + "dev": true, + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0" + } + }, + "node_modules/mdn-data": { + "version": "2.0.30", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz", + "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==", + "dev": true + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", + "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", + "dev": true, + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/minimatch": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", + "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/mkdist": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/mkdist/-/mkdist-1.5.4.tgz", + "integrity": "sha512-GEmKYJG5K1YGFIq3t0K3iihZ8FTgXphLf/4UjbmpXIAtBFn4lEjXk3pXNTSfy7EtcEXhp2Nn1vzw5pIus6RY3g==", + "dev": true, + "dependencies": { + "autoprefixer": "^10.4.19", + "citty": "^0.1.6", + "cssnano": "^7.0.4", + "defu": "^6.1.4", + "esbuild": "^0.23.0", + "fast-glob": "^3.3.2", + "jiti": "^1.21.6", + "mlly": "^1.7.1", + "pathe": "^1.1.2", + "pkg-types": "^1.1.3", + "postcss": "^8.4.39", + "postcss-nested": "^6.0.1", + "semver": "^7.6.2" + }, + "bin": { + "mkdist": "dist/cli.cjs" + }, + "peerDependencies": { + "sass": "^1.77.8", + "typescript": ">=5.5.3", + "vue-tsc": "^1.8.27 || ^2.0.21" + }, + "peerDependenciesMeta": { + "sass": { + "optional": true + }, + "typescript": { + "optional": true + }, + "vue-tsc": { + "optional": true + } + } + }, + "node_modules/mkdist/node_modules/@esbuild/aix-ppc64": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.23.0.tgz", + "integrity": "sha512-3sG8Zwa5fMcA9bgqB8AfWPQ+HFke6uD3h1s3RIwUNK8EG7a4buxvuFTs3j1IMs2NXAk9F30C/FF4vxRgQCcmoQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/mkdist/node_modules/@esbuild/android-arm": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.23.0.tgz", + "integrity": "sha512-+KuOHTKKyIKgEEqKbGTK8W7mPp+hKinbMBeEnNzjJGyFcWsfrXjSTNluJHCY1RqhxFurdD8uNXQDei7qDlR6+g==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/mkdist/node_modules/@esbuild/android-arm64": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.23.0.tgz", + "integrity": "sha512-EuHFUYkAVfU4qBdyivULuu03FhJO4IJN9PGuABGrFy4vUuzk91P2d+npxHcFdpUnfYKy0PuV+n6bKIpHOB3prQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/mkdist/node_modules/@esbuild/android-x64": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.23.0.tgz", + "integrity": "sha512-WRrmKidLoKDl56LsbBMhzTTBxrsVwTKdNbKDalbEZr0tcsBgCLbEtoNthOW6PX942YiYq8HzEnb4yWQMLQuipQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/mkdist/node_modules/@esbuild/darwin-arm64": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.23.0.tgz", + "integrity": "sha512-YLntie/IdS31H54Ogdn+v50NuoWF5BDkEUFpiOChVa9UnKpftgwzZRrI4J132ETIi+D8n6xh9IviFV3eXdxfow==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/mkdist/node_modules/@esbuild/darwin-x64": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.23.0.tgz", + "integrity": "sha512-IMQ6eme4AfznElesHUPDZ+teuGwoRmVuuixu7sv92ZkdQcPbsNHzutd+rAfaBKo8YK3IrBEi9SLLKWJdEvJniQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/mkdist/node_modules/@esbuild/freebsd-arm64": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.23.0.tgz", + "integrity": "sha512-0muYWCng5vqaxobq6LB3YNtevDFSAZGlgtLoAc81PjUfiFz36n4KMpwhtAd4he8ToSI3TGyuhyx5xmiWNYZFyw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/mkdist/node_modules/@esbuild/freebsd-x64": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.23.0.tgz", + "integrity": "sha512-XKDVu8IsD0/q3foBzsXGt/KjD/yTKBCIwOHE1XwiXmrRwrX6Hbnd5Eqn/WvDekddK21tfszBSrE/WMaZh+1buQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/mkdist/node_modules/@esbuild/linux-arm": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.23.0.tgz", + "integrity": "sha512-SEELSTEtOFu5LPykzA395Mc+54RMg1EUgXP+iw2SJ72+ooMwVsgfuwXo5Fn0wXNgWZsTVHwY2cg4Vi/bOD88qw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/mkdist/node_modules/@esbuild/linux-arm64": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.23.0.tgz", + "integrity": "sha512-j1t5iG8jE7BhonbsEg5d9qOYcVZv/Rv6tghaXM/Ug9xahM0nX/H2gfu6X6z11QRTMT6+aywOMA8TDkhPo8aCGw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/mkdist/node_modules/@esbuild/linux-ia32": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.23.0.tgz", + "integrity": "sha512-P7O5Tkh2NbgIm2R6x1zGJJsnacDzTFcRWZyTTMgFdVit6E98LTxO+v8LCCLWRvPrjdzXHx9FEOA8oAZPyApWUA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/mkdist/node_modules/@esbuild/linux-loong64": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.23.0.tgz", + "integrity": "sha512-InQwepswq6urikQiIC/kkx412fqUZudBO4SYKu0N+tGhXRWUqAx+Q+341tFV6QdBifpjYgUndV1hhMq3WeJi7A==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/mkdist/node_modules/@esbuild/linux-mips64el": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.23.0.tgz", + "integrity": "sha512-J9rflLtqdYrxHv2FqXE2i1ELgNjT+JFURt/uDMoPQLcjWQA5wDKgQA4t/dTqGa88ZVECKaD0TctwsUfHbVoi4w==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/mkdist/node_modules/@esbuild/linux-ppc64": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.23.0.tgz", + "integrity": "sha512-cShCXtEOVc5GxU0fM+dsFD10qZ5UpcQ8AM22bYj0u/yaAykWnqXJDpd77ublcX6vdDsWLuweeuSNZk4yUxZwtw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/mkdist/node_modules/@esbuild/linux-riscv64": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.23.0.tgz", + "integrity": "sha512-HEtaN7Y5UB4tZPeQmgz/UhzoEyYftbMXrBCUjINGjh3uil+rB/QzzpMshz3cNUxqXN7Vr93zzVtpIDL99t9aRw==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/mkdist/node_modules/@esbuild/linux-s390x": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.23.0.tgz", + "integrity": "sha512-WDi3+NVAuyjg/Wxi+o5KPqRbZY0QhI9TjrEEm+8dmpY9Xir8+HE/HNx2JoLckhKbFopW0RdO2D72w8trZOV+Wg==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/mkdist/node_modules/@esbuild/linux-x64": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.23.0.tgz", + "integrity": "sha512-a3pMQhUEJkITgAw6e0bWA+F+vFtCciMjW/LPtoj99MhVt+Mfb6bbL9hu2wmTZgNd994qTAEw+U/r6k3qHWWaOQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/mkdist/node_modules/@esbuild/netbsd-x64": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.23.0.tgz", + "integrity": "sha512-cRK+YDem7lFTs2Q5nEv/HHc4LnrfBCbH5+JHu6wm2eP+d8OZNoSMYgPZJq78vqQ9g+9+nMuIsAO7skzphRXHyw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/mkdist/node_modules/@esbuild/openbsd-x64": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.23.0.tgz", + "integrity": "sha512-6p3nHpby0DM/v15IFKMjAaayFhqnXV52aEmv1whZHX56pdkK+MEaLoQWj+H42ssFarP1PcomVhbsR4pkz09qBg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/mkdist/node_modules/@esbuild/sunos-x64": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.23.0.tgz", + "integrity": "sha512-BFelBGfrBwk6LVrmFzCq1u1dZbG4zy/Kp93w2+y83Q5UGYF1d8sCzeLI9NXjKyujjBBniQa8R8PzLFAUrSM9OA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/mkdist/node_modules/@esbuild/win32-arm64": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.23.0.tgz", + "integrity": "sha512-lY6AC8p4Cnb7xYHuIxQ6iYPe6MfO2CC43XXKo9nBXDb35krYt7KGhQnOkRGar5psxYkircpCqfbNDB4uJbS2jQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/mkdist/node_modules/@esbuild/win32-ia32": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.23.0.tgz", + "integrity": "sha512-7L1bHlOTcO4ByvI7OXVI5pNN6HSu6pUQq9yodga8izeuB1KcT2UkHaH6118QJwopExPn0rMHIseCTx1CRo/uNA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/mkdist/node_modules/@esbuild/win32-x64": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.23.0.tgz", + "integrity": "sha512-Arm+WgUFLUATuoxCJcahGuk6Yj9Pzxd6l11Zb/2aAuv5kWWvvfhLFo2fni4uSK5vzlUdCGZ/BdV5tH8klj8p8g==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/mkdist/node_modules/esbuild": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.23.0.tgz", + "integrity": "sha512-1lvV17H2bMYda/WaFb2jLPeHU3zml2k4/yagNMG8Q/YtfMjCwEUZa2eXXMgZTVSL5q1n4H7sQ0X6CdJDqqeCFA==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.23.0", + "@esbuild/android-arm": "0.23.0", + "@esbuild/android-arm64": "0.23.0", + "@esbuild/android-x64": "0.23.0", + "@esbuild/darwin-arm64": "0.23.0", + "@esbuild/darwin-x64": "0.23.0", + "@esbuild/freebsd-arm64": "0.23.0", + "@esbuild/freebsd-x64": "0.23.0", + "@esbuild/linux-arm": "0.23.0", + "@esbuild/linux-arm64": "0.23.0", + "@esbuild/linux-ia32": "0.23.0", + "@esbuild/linux-loong64": "0.23.0", + "@esbuild/linux-mips64el": "0.23.0", + "@esbuild/linux-ppc64": "0.23.0", + "@esbuild/linux-riscv64": "0.23.0", + "@esbuild/linux-s390x": "0.23.0", + "@esbuild/linux-x64": "0.23.0", + "@esbuild/netbsd-x64": "0.23.0", + "@esbuild/openbsd-arm64": "0.23.0", + "@esbuild/openbsd-x64": "0.23.0", + "@esbuild/sunos-x64": "0.23.0", + "@esbuild/win32-arm64": "0.23.0", + "@esbuild/win32-ia32": "0.23.0", + "@esbuild/win32-x64": "0.23.0" + } + }, + "node_modules/mlly": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.7.1.tgz", + "integrity": "sha512-rrVRZRELyQzrIUAVMHxP97kv+G786pHmOKzuFII8zDYahFBS7qnHh2AlYSl1GAHhaMPCz6/oHjVMcfFYgFYHgA==", + "dev": true, + "dependencies": { + "acorn": "^8.11.3", + "pathe": "^1.1.2", + "pkg-types": "^1.1.1", + "ufo": "^1.5.3" + } + }, + "node_modules/mocha": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.0.0.tgz", + "integrity": "sha512-0Wl+elVUD43Y0BqPZBzZt8Tnkw9CMUdNYnUsTfOM1vuhJVZL+kiesFYsqwBkEEuEixaiPe5ZQdqDgX2jddhmoA==", + "dev": true, + "dependencies": { + "@ungap/promise-all-settled": "1.1.2", + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.5.3", + "debug": "4.3.4", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.2.0", + "he": "1.2.0", + "js-yaml": "4.1.0", + "log-symbols": "4.1.0", + "minimatch": "5.0.1", + "ms": "2.1.3", + "nanoid": "3.3.3", + "serialize-javascript": "6.0.0", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "workerpool": "6.2.1", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha.js" + }, + "engines": { + "node": ">= 14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mochajs" + } + }, + "node_modules/mri": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", + "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "node_modules/nanoid": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", + "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", + "dev": true, + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/node-releases": { + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", + "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", + "dev": true + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/normalize-range": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", + "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-path": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", + "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", + "dev": true, + "dependencies": { + "path-key": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm-run-path/node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/nth-check": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", + "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", + "dev": true, + "dependencies": { + "boolbase": "^1.0.0" + }, + "funding": { + "url": "https://github.com/fb55/nth-check?sponsor=1" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "dev": true, + "dependencies": { + "mimic-fn": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/pathe": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", + "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==", + "dev": true + }, + "node_modules/pathval": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-2.0.0.tgz", + "integrity": "sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==", + "dev": true, + "engines": { + "node": ">= 14.16" + } + }, + "node_modules/picocolors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", "dev": true }, - "@ungap/promise-all-settled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", - "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", - "dev": true + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pkg-types": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.1.3.tgz", + "integrity": "sha512-+JrgthZG6m3ckicaOB74TwQ+tBWsFl3qVQg7mN8ulwSOElJ7gBhKzj2VkCPnZ4NlF6kEquYU+RIYNVAvzd54UA==", + "dev": true, + "dependencies": { + "confbox": "^0.1.7", + "mlly": "^1.7.1", + "pathe": "^1.1.2" + } + }, + "node_modules/postcss": { + "version": "8.4.41", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.41.tgz", + "integrity": "sha512-TesUflQ0WKZqAvg52PWL6kHgLKP6xB6heTOdoYM0Wt2UHyxNa4K25EZZMgKns3BH1RLVbZCREPpLY0rhnNoHVQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "nanoid": "^3.3.7", + "picocolors": "^1.0.1", + "source-map-js": "^1.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/postcss-calc": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-10.0.1.tgz", + "integrity": "sha512-pp1Z3FxtxA+xHAoWXcOXgnBN1WPu4ZiJ5LWGjKyf9MMreagAsaTUtnqFK1y1sHhyJddAkYTPu6XSuLgb3oYCjw==", + "dev": true, + "dependencies": { + "postcss-selector-parser": "^6.1.1", + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^18.12 || ^20.9 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.38" + } + }, + "node_modules/postcss-colormin": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-7.0.2.tgz", + "integrity": "sha512-YntRXNngcvEvDbEjTdRWGU606eZvB5prmHG4BF0yLmVpamXbpsRJzevyy6MZVyuecgzI2AWAlvFi8DAeCqwpvA==", + "dev": true, + "dependencies": { + "browserslist": "^4.23.3", + "caniuse-api": "^3.0.0", + "colord": "^2.9.3", + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-convert-values": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-7.0.3.tgz", + "integrity": "sha512-yJhocjCs2SQer0uZ9lXTMOwDowbxvhwFVrZeS6NPEij/XXthl73ggUmfwVvJM+Vaj5gtCKJV1jiUu4IhAUkX/Q==", + "dev": true, + "dependencies": { + "browserslist": "^4.23.3", + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-discard-comments": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-7.0.2.tgz", + "integrity": "sha512-/Hje9Ls1IYcB9duELO/AyDUJI6aQVY3h5Rj1ziXgaLYCTi1iVBLnjg/TS0D6NszR/kDG6I86OwLmAYe+bvJjiQ==", + "dev": true, + "dependencies": { + "postcss-selector-parser": "^6.1.1" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-discard-duplicates": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-7.0.1.tgz", + "integrity": "sha512-oZA+v8Jkpu1ct/xbbrntHRsfLGuzoP+cpt0nJe5ED2FQF8n8bJtn7Bo28jSmBYwqgqnqkuSXJfSUEE7if4nClQ==", + "dev": true, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } }, - "ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "node_modules/postcss-discard-empty": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-7.0.0.tgz", + "integrity": "sha512-e+QzoReTZ8IAwhnSdp/++7gBZ/F+nBq9y6PomfwORfP7q9nBpK5AMP64kOt0bA+lShBFbBDcgpJ3X4etHg4lzA==", + "dev": true, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-discard-overridden": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-7.0.0.tgz", + "integrity": "sha512-GmNAzx88u3k2+sBTZrJSDauR0ccpE24omTQCVmaTTZFz1du6AasspjaUPMJ2ud4RslZpoFKyf+6MSPETLojc6w==", + "dev": true, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-merge-longhand": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-7.0.3.tgz", + "integrity": "sha512-8waYomFxshdv6M9Em3QRM9MettRLDRcH2JQi2l0Z1KlYD/vhal3gbkeSES0NuACXOlZBB0V/B0AseHZaklzWOA==", + "dev": true, + "dependencies": { + "postcss-value-parser": "^4.2.0", + "stylehacks": "^7.0.3" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-merge-rules": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-7.0.3.tgz", + "integrity": "sha512-2eSas2p3voPxNfdI5sQrvIkMaeUHpVc3EezgVs18hz/wRTQAC9U99tp9j3W5Jx9/L3qHkEDvizEx/LdnmumIvQ==", + "dev": true, + "dependencies": { + "browserslist": "^4.23.3", + "caniuse-api": "^3.0.0", + "cssnano-utils": "^5.0.0", + "postcss-selector-parser": "^6.1.1" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-minify-font-values": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-7.0.0.tgz", + "integrity": "sha512-2ckkZtgT0zG8SMc5aoNwtm5234eUx1GGFJKf2b1bSp8UflqaeFzR50lid4PfqVI9NtGqJ2J4Y7fwvnP/u1cQog==", + "dev": true, + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-minify-gradients": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-7.0.0.tgz", + "integrity": "sha512-pdUIIdj/C93ryCHew0UgBnL2DtUS3hfFa5XtERrs4x+hmpMYGhbzo6l/Ir5de41O0GaKVpK1ZbDNXSY6GkXvtg==", + "dev": true, + "dependencies": { + "colord": "^2.9.3", + "cssnano-utils": "^5.0.0", + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-minify-params": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-7.0.2.tgz", + "integrity": "sha512-nyqVLu4MFl9df32zTsdcLqCFfE/z2+f8GE1KHPxWOAmegSo6lpV2GNy5XQvrzwbLmiU7d+fYay4cwto1oNdAaQ==", + "dev": true, + "dependencies": { + "browserslist": "^4.23.3", + "cssnano-utils": "^5.0.0", + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-minify-selectors": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-7.0.3.tgz", + "integrity": "sha512-SxTgUQSgBk6wEqzQZKEv1xQYIp9UBju6no9q+npohzSdhuSICQdkqmD1UMKkZWItS3olJSJMDDEY9WOJ5oGJew==", + "dev": true, + "dependencies": { + "cssesc": "^3.0.0", + "postcss-selector-parser": "^6.1.1" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-nested": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.2.0.tgz", + "integrity": "sha512-HQbt28KulC5AJzG+cZtj9kvKB93CFCdLvog1WFLf1D+xmMvPGlBstkpTEZfK5+AN9hfJocyBFCNiqyS48bpgzQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "postcss-selector-parser": "^6.1.1" + }, + "engines": { + "node": ">=12.0" + }, + "peerDependencies": { + "postcss": "^8.2.14" + } + }, + "node_modules/postcss-normalize-charset": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-7.0.0.tgz", + "integrity": "sha512-ABisNUXMeZeDNzCQxPxBCkXexvBrUHV+p7/BXOY+ulxkcjUZO0cp8ekGBwvIh2LbCwnWbyMPNJVtBSdyhM2zYQ==", + "dev": true, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-normalize-display-values": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-display-values/-/postcss-normalize-display-values-7.0.0.tgz", + "integrity": "sha512-lnFZzNPeDf5uGMPYgGOw7v0BfB45+irSRz9gHQStdkkhiM0gTfvWkWB5BMxpn0OqgOQuZG/mRlZyJxp0EImr2Q==", + "dev": true, + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-normalize-positions": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-positions/-/postcss-normalize-positions-7.0.0.tgz", + "integrity": "sha512-I0yt8wX529UKIGs2y/9Ybs2CelSvItfmvg/DBIjTnoUSrPxSV7Z0yZ8ShSVtKNaV/wAY+m7bgtyVQLhB00A1NQ==", + "dev": true, + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-normalize-repeat-style": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-7.0.0.tgz", + "integrity": "sha512-o3uSGYH+2q30ieM3ppu9GTjSXIzOrRdCUn8UOMGNw7Af61bmurHTWI87hRybrP6xDHvOe5WlAj3XzN6vEO8jLw==", + "dev": true, + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-normalize-string": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-string/-/postcss-normalize-string-7.0.0.tgz", + "integrity": "sha512-w/qzL212DFVOpMy3UGyxrND+Kb0fvCiBBujiaONIihq7VvtC7bswjWgKQU/w4VcRyDD8gpfqUiBQ4DUOwEJ6Qg==", + "dev": true, + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-normalize-timing-functions": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-7.0.0.tgz", + "integrity": "sha512-tNgw3YV0LYoRwg43N3lTe3AEWZ66W7Dh7lVEpJbHoKOuHc1sLrzMLMFjP8SNULHaykzsonUEDbKedv8C+7ej6g==", + "dev": true, + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-normalize-unicode": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-unicode/-/postcss-normalize-unicode-7.0.2.tgz", + "integrity": "sha512-ztisabK5C/+ZWBdYC+Y9JCkp3M9qBv/XFvDtSw0d/XwfT3UaKeW/YTm/MD/QrPNxuecia46vkfEhewjwcYFjkg==", + "dev": true, + "dependencies": { + "browserslist": "^4.23.3", + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-normalize-url": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-7.0.0.tgz", + "integrity": "sha512-+d7+PpE+jyPX1hDQZYG+NaFD+Nd2ris6r8fPTBAjE8z/U41n/bib3vze8x7rKs5H1uEw5ppe9IojewouHk0klQ==", + "dev": true, + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-normalize-whitespace": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-whitespace/-/postcss-normalize-whitespace-7.0.0.tgz", + "integrity": "sha512-37/toN4wwZErqohedXYqWgvcHUGlT8O/m2jVkAfAe9Bd4MzRqlBmXrJRePH0e9Wgnz2X7KymTgTOaaFizQe3AQ==", + "dev": true, + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-ordered-values": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-7.0.1.tgz", + "integrity": "sha512-irWScWRL6nRzYmBOXReIKch75RRhNS86UPUAxXdmW/l0FcAsg0lvAXQCby/1lymxn/o0gVa6Rv/0f03eJOwHxw==", + "dev": true, + "dependencies": { + "cssnano-utils": "^5.0.0", + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-reduce-initial": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-7.0.2.tgz", + "integrity": "sha512-pOnu9zqQww7dEKf62Nuju6JgsW2V0KRNBHxeKohU+JkHd/GAH5uvoObqFLqkeB2n20mr6yrlWDvo5UBU5GnkfA==", + "dev": true, + "dependencies": { + "browserslist": "^4.23.3", + "caniuse-api": "^3.0.0" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-reduce-transforms": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-7.0.0.tgz", + "integrity": "sha512-pnt1HKKZ07/idH8cpATX/ujMbtOGhUfE+m8gbqwJE05aTaNw8gbo34a2e3if0xc0dlu75sUOiqvwCGY3fzOHew==", + "dev": true, + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-selector-parser": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz", + "integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==", + "dev": true, + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-svgo": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-7.0.1.tgz", + "integrity": "sha512-0WBUlSL4lhD9rA5k1e5D8EN5wCEyZD6HJk0jIvRxl+FDVOMlJ7DePHYWGGVc5QRqrJ3/06FTXM0bxjmJpmTPSA==", + "dev": true, + "dependencies": { + "postcss-value-parser": "^4.2.0", + "svgo": "^3.3.2" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >= 18" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-unique-selectors": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-7.0.2.tgz", + "integrity": "sha512-CjSam+7Vf8cflJQsHrMS0P2hmy9u0+n/P001kb5eAszLmhjMqrt/i5AqQuNFihhViwDvEAezqTmXqaYXL2ugMw==", + "dev": true, + "dependencies": { + "postcss-selector-parser": "^6.1.1" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", "dev": true }, - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "node_modules/postcss/node_modules/nanoid": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/pretty-bytes": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-6.1.1.tgz", + "integrity": "sha512-mQUvGU6aUFQ+rNvTIAcZuWGRT9a6f6Yrg9bHs4ImKF+HZCEK+plBvnAZYSIQztknZF2qnzNtr6F8s0+IuptdlQ==", + "dev": true, + "engines": { + "node": "^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dev": true, + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rollup": { + "version": "3.29.4", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.4.tgz", + "integrity": "sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==", + "dev": true, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=14.18.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/rollup-plugin-dts": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/rollup-plugin-dts/-/rollup-plugin-dts-6.1.1.tgz", + "integrity": "sha512-aSHRcJ6KG2IHIioYlvAOcEq6U99sVtqDDKVhnwt70rW6tsz3tv5OSjEiWcgzfsHdLyGXZ/3b/7b/+Za3Y6r1XA==", + "dev": true, + "dependencies": { + "magic-string": "^0.30.10" + }, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/Swatinem" + }, + "optionalDependencies": { + "@babel/code-frame": "^7.24.2" + }, + "peerDependencies": { + "rollup": "^3.29.4 || ^4", + "typescript": "^4.5 || ^5.0" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/scule": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/scule/-/scule-1.3.0.tgz", + "integrity": "sha512-6FtHJEvt+pVMIB9IBY+IcCJ6Z5f1iQnytgyfKMhDKgmzYG+TeH/wx1y3l27rshSbLiSanrR9ffZDrEsmjlQF2g==", "dev": true }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/serialize-javascript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", "dev": true, - "requires": { - "color-convert": "^2.0.1" + "dependencies": { + "randombytes": "^2.1.0" } }, - "anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" } }, - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "assertion-error": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.0.0.tgz", - "integrity": "sha1-x/hUOP3UZrx8oWq5DIFRN5el0js=", - "dev": true + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "node_modules/siginfo": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", + "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", "dev": true }, - "binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } }, - "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "node_modules/slash": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", + "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==", "dev": true, - "requires": { - "balanced-match": "^1.0.0" + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "node_modules/source-map-js": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", + "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", "dev": true, - "requires": { - "fill-range": "^7.0.1" + "engines": { + "node": ">=0.10.0" } }, - "browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "node_modules/stackback": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", + "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", "dev": true }, - "camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "node_modules/std-env": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.7.0.tgz", + "integrity": "sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==", "dev": true }, - "chai": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/chai/-/chai-1.10.0.tgz", - "integrity": "sha1-5AMcyHZURhp1lD5aNatG6vOcHrk=", + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, - "requires": { - "assertion-error": "1.0.0", - "deep-eql": "0.1.3" + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" } }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, "dependencies": { - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" } }, - "chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "node_modules/strip-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", "dev": true, - "requires": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "fsevents": "~2.3.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "node_modules/stylehacks": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-7.0.3.tgz", + "integrity": "sha512-4DqtecvI/Nd+2BCvW9YEF6lhBN5UM50IJ1R3rnEAhBwbCKf4VehRf+uqvnVArnBayjYD/WtT3g0G/HSRxWfTRg==", "dev": true, - "requires": { - "color-name": "~1.1.4" + "dependencies": { + "browserslist": "^4.23.3", + "postcss-selector-parser": "^6.1.1" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" } }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true + "node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", "dev": true, - "requires": { - "ms": "2.1.2" + "engines": { + "node": ">= 0.4" }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/svgo": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/svgo/-/svgo-3.3.2.tgz", + "integrity": "sha512-OoohrmuUlBs8B8o6MB2Aevn+pRIH9zDALSR+6hhqVfa6fRwG/Qw9VUMSMW9VNg2CFc/MTIfabtdOVl9ODIJjpw==", + "dev": true, "dependencies": { - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - } + "@trysound/sax": "0.2.0", + "commander": "^7.2.0", + "css-select": "^5.1.0", + "css-tree": "^2.3.1", + "css-what": "^6.1.0", + "csso": "^5.0.5", + "picocolors": "^1.0.0" + }, + "bin": { + "svgo": "bin/svgo" + }, + "engines": { + "node": ">=14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/svgo" } }, - "decamelize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "node_modules/tinybench": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", + "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", "dev": true }, - "deep-eql": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-0.1.3.tgz", - "integrity": "sha1-71WKyrjeJSBs1xOQbXTlaTDrafI=", + "node_modules/tinypool": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.0.0.tgz", + "integrity": "sha512-KIKExllK7jp3uvrNtvRBYBWBOAXSX8ZvoaD8T+7KB/QHIuoJW3Pmr60zucywjAlMb5TeXUkcs/MWeWLu0qvuAQ==", "dev": true, - "requires": { - "type-detect": "0.1.1" + "engines": { + "node": "^18.0.0 || >=20.0.0" } }, - "diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", - "dev": true + "node_modules/tinyrainbow": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-1.2.0.tgz", + "integrity": "sha512-weEDEq7Z5eTHPDh4xjX789+fHfF+P8boiFB+0vbWzpbnbsEr/GRaohi/uMKxg8RZMXnl1ItAi/IUHWMsjDV7kQ==", + "dev": true, + "engines": { + "node": ">=14.0.0" + } }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true + "node_modules/tinyspy": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-3.0.0.tgz", + "integrity": "sha512-q5nmENpTHgiPVd1cJDDc9cVoYN5x4vCvwT3FMilvKPKneCBZAxn2YWQjDF0UMcE9k0Cay1gBiDfTMU0g+mPMQA==", + "dev": true, + "engines": { + "node": ">=14.0.0" + } }, - "escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "dev": true, + "engines": { + "node": ">=4" + } }, - "escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "node_modules/type-detect": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-0.1.1.tgz", + "integrity": "sha1-C6XsKohWQORw6k6FBZcZANrFiCI=", "dev": true, - "requires": { - "to-regex-range": "^5.0.1" + "engines": { + "node": "*" } }, - "find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "node_modules/typescript": { + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", + "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", "dev": true, - "requires": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" } }, - "flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "node_modules/ufo": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.5.4.tgz", + "integrity": "sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==", "dev": true }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true + "node_modules/unbuild": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unbuild/-/unbuild-2.0.0.tgz", + "integrity": "sha512-JWCUYx3Oxdzvw2J9kTAp+DKE8df/BnH/JTSj6JyA4SH40ECdFu7FoJJcrm8G92B7TjofQ6GZGjJs50TRxoH6Wg==", + "dev": true, + "dependencies": { + "@rollup/plugin-alias": "^5.0.0", + "@rollup/plugin-commonjs": "^25.0.4", + "@rollup/plugin-json": "^6.0.0", + "@rollup/plugin-node-resolve": "^15.2.1", + "@rollup/plugin-replace": "^5.0.2", + "@rollup/pluginutils": "^5.0.3", + "chalk": "^5.3.0", + "citty": "^0.1.2", + "consola": "^3.2.3", + "defu": "^6.1.2", + "esbuild": "^0.19.2", + "globby": "^13.2.2", + "hookable": "^5.5.3", + "jiti": "^1.19.3", + "magic-string": "^0.30.3", + "mkdist": "^1.3.0", + "mlly": "^1.4.0", + "pathe": "^1.1.1", + "pkg-types": "^1.0.3", + "pretty-bytes": "^6.1.1", + "rollup": "^3.28.1", + "rollup-plugin-dts": "^6.0.0", + "scule": "^1.0.0", + "untyped": "^1.4.0" + }, + "bin": { + "unbuild": "dist/cli.mjs" + }, + "peerDependencies": { + "typescript": "^5.1.6" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } }, - "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "node_modules/unbuild/node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", "dev": true, - "optional": true + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", "dev": true }, - "glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "node_modules/untyped": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/untyped/-/untyped-1.4.2.tgz", + "integrity": "sha512-nC5q0DnPEPVURPhfPQLahhSTnemVtPzdx7ofiRxXpOB2SYnb3MfdU3DVGyJdS8Lx+tBWeAePO8BfU/3EgksM7Q==", "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "dependencies": { + "@babel/core": "^7.23.7", + "@babel/standalone": "^7.23.8", + "@babel/types": "^7.23.6", + "defu": "^6.1.4", + "jiti": "^1.21.0", + "mri": "^1.2.0", + "scule": "^1.2.0" + }, + "bin": { + "untyped": "dist/cli.mjs" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz", + "integrity": "sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "escalade": "^3.1.2", + "picocolors": "^1.0.1" }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "node_modules/vite": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.1.tgz", + "integrity": "sha512-1oE6yuNXssjrZdblI9AfBbHCC41nnyoVoEZxQnID6yvQZAFBzxxkqoFLtHUMkYunL8hwOLEjgTuxpkRxvba3kA==", + "dev": true, "dependencies": { - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } + "esbuild": "^0.21.3", + "postcss": "^8.4.41", + "rollup": "^4.13.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || >=20.0.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } + "sugarss": { + "optional": true + }, + "terser": { + "optional": true } } }, - "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "node_modules/vite-node": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-2.0.5.tgz", + "integrity": "sha512-LdsW4pxj0Ot69FAoXZ1yTnA9bjGohr2yNBU7QKRxpz8ITSkhuDl6h3zS/tvgz4qrNjeRnvrWeXQ8ZF7Um4W00Q==", "dev": true, - "requires": { - "is-glob": "^4.0.1" + "dependencies": { + "cac": "^6.7.14", + "debug": "^4.3.5", + "pathe": "^1.1.2", + "tinyrainbow": "^1.2.0", + "vite": "^5.0.0" + }, + "bin": { + "vite-node": "vite-node.mjs" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/vite-node/node_modules/debug": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", + "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "node_modules/vite-node/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "node_modules/vite/node_modules/@esbuild/aix-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", + "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", + "cpu": [ + "ppc64" + ], "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" } }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true + "node_modules/vite/node_modules/@esbuild/android-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", + "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } }, - "is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "node_modules/vite/node_modules/@esbuild/android-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", + "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", + "cpu": [ + "arm64" + ], "dev": true, - "requires": { - "binary-extensions": "^2.0.0" + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" } }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true + "node_modules/vite/node_modules/@esbuild/android-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", + "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true + "node_modules/vite/node_modules/@esbuild/darwin-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", + "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } }, - "is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "node_modules/vite/node_modules/@esbuild/darwin-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", + "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", + "cpu": [ + "x64" + ], "dev": true, - "requires": { - "is-extglob": "^2.1.1" + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" } }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true + "node_modules/vite/node_modules/@esbuild/freebsd-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", + "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } }, - "is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "dev": true + "node_modules/vite/node_modules/@esbuild/freebsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", + "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } }, - "is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true + "node_modules/vite/node_modules/@esbuild/linux-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", + "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "node_modules/vite/node_modules/@esbuild/linux-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", + "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", + "cpu": [ + "arm64" + ], "dev": true, - "requires": { - "argparse": "^2.0.1" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" } }, - "locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "node_modules/vite/node_modules/@esbuild/linux-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", + "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", + "cpu": [ + "ia32" + ], "dev": true, - "requires": { - "p-locate": "^5.0.0" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" } }, - "log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "node_modules/vite/node_modules/@esbuild/linux-loong64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", + "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", + "cpu": [ + "loong64" + ], "dev": true, - "requires": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" } }, - "minimatch": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", - "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", + "node_modules/vite/node_modules/@esbuild/linux-mips64el": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", + "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", + "cpu": [ + "mips64el" + ], "dev": true, - "requires": { - "brace-expansion": "^2.0.1" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" } }, - "mocha": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.0.0.tgz", - "integrity": "sha512-0Wl+elVUD43Y0BqPZBzZt8Tnkw9CMUdNYnUsTfOM1vuhJVZL+kiesFYsqwBkEEuEixaiPe5ZQdqDgX2jddhmoA==", + "node_modules/vite/node_modules/@esbuild/linux-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", + "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", + "cpu": [ + "ppc64" + ], "dev": true, - "requires": { - "@ungap/promise-all-settled": "1.1.2", - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.4", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.2.0", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "5.0.1", - "ms": "2.1.3", - "nanoid": "3.3.3", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "workerpool": "6.2.1", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" } }, - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true + "node_modules/vite/node_modules/@esbuild/linux-riscv64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", + "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } }, - "nanoid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", - "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", - "dev": true + "node_modules/vite/node_modules/@esbuild/linux-s390x": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", + "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true + "node_modules/vite/node_modules/@esbuild/linux-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", + "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "node_modules/vite/node_modules/@esbuild/netbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", + "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", + "cpu": [ + "x64" + ], "dev": true, - "requires": { - "wrappy": "1" + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" } }, - "p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "node_modules/vite/node_modules/@esbuild/openbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", + "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", + "cpu": [ + "x64" + ], "dev": true, - "requires": { - "yocto-queue": "^0.1.0" + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" } }, - "p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "node_modules/vite/node_modules/@esbuild/sunos-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", + "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", + "cpu": [ + "x64" + ], "dev": true, - "requires": { - "p-limit": "^3.0.2" + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" } }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true + "node_modules/vite/node_modules/@esbuild/win32-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", + "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true + "node_modules/vite/node_modules/@esbuild/win32-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", + "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } }, - "picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true + "node_modules/vite/node_modules/@esbuild/win32-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", + "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } }, - "randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "node_modules/vite/node_modules/esbuild": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", + "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", "dev": true, - "requires": { - "safe-buffer": "^5.1.0" + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.21.5", + "@esbuild/android-arm": "0.21.5", + "@esbuild/android-arm64": "0.21.5", + "@esbuild/android-x64": "0.21.5", + "@esbuild/darwin-arm64": "0.21.5", + "@esbuild/darwin-x64": "0.21.5", + "@esbuild/freebsd-arm64": "0.21.5", + "@esbuild/freebsd-x64": "0.21.5", + "@esbuild/linux-arm": "0.21.5", + "@esbuild/linux-arm64": "0.21.5", + "@esbuild/linux-ia32": "0.21.5", + "@esbuild/linux-loong64": "0.21.5", + "@esbuild/linux-mips64el": "0.21.5", + "@esbuild/linux-ppc64": "0.21.5", + "@esbuild/linux-riscv64": "0.21.5", + "@esbuild/linux-s390x": "0.21.5", + "@esbuild/linux-x64": "0.21.5", + "@esbuild/netbsd-x64": "0.21.5", + "@esbuild/openbsd-x64": "0.21.5", + "@esbuild/sunos-x64": "0.21.5", + "@esbuild/win32-arm64": "0.21.5", + "@esbuild/win32-ia32": "0.21.5", + "@esbuild/win32-x64": "0.21.5" } }, - "readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "node_modules/vite/node_modules/rollup": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.20.0.tgz", + "integrity": "sha512-6rbWBChcnSGzIlXeIdNIZTopKYad8ZG8ajhl78lGRLsI2rX8IkaotQhVas2Ma+GPxJav19wrSzvRvuiv0YKzWw==", "dev": true, - "requires": { - "picomatch": "^2.2.1" + "dependencies": { + "@types/estree": "1.0.5" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.20.0", + "@rollup/rollup-android-arm64": "4.20.0", + "@rollup/rollup-darwin-arm64": "4.20.0", + "@rollup/rollup-darwin-x64": "4.20.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.20.0", + "@rollup/rollup-linux-arm-musleabihf": "4.20.0", + "@rollup/rollup-linux-arm64-gnu": "4.20.0", + "@rollup/rollup-linux-arm64-musl": "4.20.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.20.0", + "@rollup/rollup-linux-riscv64-gnu": "4.20.0", + "@rollup/rollup-linux-s390x-gnu": "4.20.0", + "@rollup/rollup-linux-x64-gnu": "4.20.0", + "@rollup/rollup-linux-x64-musl": "4.20.0", + "@rollup/rollup-win32-arm64-msvc": "4.20.0", + "@rollup/rollup-win32-ia32-msvc": "4.20.0", + "@rollup/rollup-win32-x64-msvc": "4.20.0", + "fsevents": "~2.3.2" } }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "dev": true + "node_modules/vitest": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-2.0.5.tgz", + "integrity": "sha512-8GUxONfauuIdeSl5f9GTgVEpg5BTOlplET4WEDaeY2QBiN8wSm68vxN/tb5z405OwppfoCavnwXafiaYBC/xOA==", + "dev": true, + "dependencies": { + "@ampproject/remapping": "^2.3.0", + "@vitest/expect": "2.0.5", + "@vitest/pretty-format": "^2.0.5", + "@vitest/runner": "2.0.5", + "@vitest/snapshot": "2.0.5", + "@vitest/spy": "2.0.5", + "@vitest/utils": "2.0.5", + "chai": "^5.1.1", + "debug": "^4.3.5", + "execa": "^8.0.1", + "magic-string": "^0.30.10", + "pathe": "^1.1.2", + "std-env": "^3.7.0", + "tinybench": "^2.8.0", + "tinypool": "^1.0.0", + "tinyrainbow": "^1.2.0", + "vite": "^5.0.0", + "vite-node": "2.0.5", + "why-is-node-running": "^2.3.0" + }, + "bin": { + "vitest": "vitest.mjs" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@edge-runtime/vm": "*", + "@types/node": "^18.0.0 || >=20.0.0", + "@vitest/browser": "2.0.5", + "@vitest/ui": "2.0.5", + "happy-dom": "*", + "jsdom": "*" + }, + "peerDependenciesMeta": { + "@edge-runtime/vm": { + "optional": true + }, + "@types/node": { + "optional": true + }, + "@vitest/browser": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { + "optional": true + } + } }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true + "node_modules/vitest/node_modules/assertion-error": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", + "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", + "dev": true, + "engines": { + "node": ">=12" + } }, - "serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "node_modules/vitest/node_modules/chai": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/chai/-/chai-5.1.1.tgz", + "integrity": "sha512-pT1ZgP8rPNqUgieVaEY+ryQr6Q4HXNg8Ei9UnLUrjN4IA7dvQC5JB+/kxVcPNDHyBcc/26CXPkbNzq3qwrOEKA==", "dev": true, - "requires": { - "randombytes": "^2.1.0" + "dependencies": { + "assertion-error": "^2.0.1", + "check-error": "^2.1.1", + "deep-eql": "^5.0.1", + "loupe": "^3.1.0", + "pathval": "^2.0.0" + }, + "engines": { + "node": ">=12" } }, - "string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "node_modules/vitest/node_modules/debug": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", + "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "node_modules/vitest/node_modules/deep-eql": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz", + "integrity": "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==", "dev": true, - "requires": { - "ansi-regex": "^5.0.1" + "engines": { + "node": ">=6" } }, - "strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "node_modules/vitest/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, - "supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, - "requires": { - "has-flag": "^4.0.0" + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" } }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "node_modules/why-is-node-running": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", + "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", "dev": true, - "requires": { - "is-number": "^7.0.0" + "dependencies": { + "siginfo": "^2.0.0", + "stackback": "0.0.2" + }, + "bin": { + "why-is-node-running": "cli.js" + }, + "engines": { + "node": ">=8" } }, - "type-detect": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-0.1.1.tgz", - "integrity": "sha1-C6XsKohWQORw6k6FBZcZANrFiCI=", - "dev": true - }, - "typescript": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.4.2.tgz", - "integrity": "sha1-+DlfhdRZJ2BnyYiqQYN6j4KHCEQ=", - "dev": true - }, - "workerpool": { + "node_modules/workerpool": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", "dev": true }, - "wrap-ansi": { + "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, - "requires": { + "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "wrappy": { + "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true }, - "y18n": { + "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true }, - "yargs": { + "node_modules/yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", "dev": true, - "requires": { + "dependencies": { "cliui": "^7.0.2", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", @@ -667,31 +5408,46 @@ "string-width": "^4.2.0", "y18n": "^5.0.5", "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" } }, - "yargs-parser": { + "node_modules/yargs-parser": { "version": "20.2.4", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", - "dev": true + "dev": true, + "engines": { + "node": ">=10" + } }, - "yargs-unparser": { + "node_modules/yargs-unparser": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", "dev": true, - "requires": { + "dependencies": { "camelcase": "^6.0.0", "decamelize": "^4.0.0", "flat": "^5.0.2", "is-plain-obj": "^2.1.0" + }, + "engines": { + "node": ">=10" } }, - "yocto-queue": { + "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } } } } diff --git a/package.json b/package.json index 3e06940..d1131dc 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,31 @@ { - "name": "ts-money", + "name": "@screeny05/ts-money", + "type": "module", + "sideEffects": false, "description": "Typescript port of js-money. Implementation of the Money value object.", - "version": "0.4.8", - "main": "build/index.js", - "typings": "build/index.d.ts", - "author": { - "name": "Mathew Cormier", - "email": "mathew.corm@gmail.com" + "version": "0.6.0", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs", + "require": "./dist/index.cjs" + } }, + "main": "./dist/index.mjs", + "module": "./dist/index.mjs", + "types": "./dist/index.d.ts", + "typesVersions": { + "*": { + "*": [ + "./dist/*", + "./dist/index.d.ts" + ] + } + }, + "contributors": [ + "Mathew Cormier ", + "Sebastian Langer " + ], "keywords": [ "money", "javascript", @@ -17,20 +35,21 @@ "license": "MIT", "repository": { "type": "git", - "url": "git://github.com/macor161/ts-money.git" + "url": "git://github.com/screeny05/ts-money.git" }, "bugs": { - "url": "https://github.com/macor161/ts-money/issues" + "url": "https://github.com/screeny05/ts-money/issues" }, - "dependencies": {}, "devDependencies": { - "@types/node": "^7.0.23", - "chai": "1.x.x", - "mocha": "^10.0.0", - "typescript": "^2.3.4" + "@types/node": "^20.14.15", + "typescript": "^5.5.4", + "unbuild": "^2.0.0", + "vite": "^5.4.1", + "vitest": "^2.0.5" }, "scripts": { - "build": "./node_modules/.bin/tsc", - "test": "mocha --reporter spec --require test/bootstrap/node test/*.test.js" + "build": "unbuild", + "test": "vitest", + "typecheck": "tsc --noEmit" } } diff --git a/index.ts b/src/index.ts similarity index 95% rename from index.ts rename to src/index.ts index 50b7dc9..71a0211 100644 --- a/index.ts +++ b/src/index.ts @@ -1,4 +1,4 @@ -import { Currency } from './lib/currency' +import type { Currency } from './lib/currency' import { Currencies } from './lib/currencies' export type Rounder = 'round' | 'floor' | 'ceil' | Function; @@ -8,11 +8,11 @@ export interface Amount { currency: string | Currency } -let isInt = function (n) { +let isInt = function (n: any) { return Number(n) === n && n % 1 === 0 } -let decimalPlaces = function (num) { +let decimalPlaces = function (num: number) { let match = ('' + num).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/) if (!match) @@ -22,17 +22,17 @@ let decimalPlaces = function (num) { (match[1] ? match[1].length : 0) - (match[2] ? +match[2] : 0)) } -let assertSameCurrency = function (left, right) { +let assertSameCurrency = function (left: Money, right: Money) { if (left.currency !== right.currency) throw new Error('Different currencies') } -let assertType = function (other) { +let assertType = function (other: any) { if (!(other instanceof Money)) throw new TypeError('Instance of Money required') } -let assertOperand = function (operand) { +let assertOperand = function (operand: any) { if (Number.isNaN(parseFloat(operand)) && !isFinite(operand)) throw new TypeError('Operand must be a number') } @@ -49,6 +49,7 @@ let getCurrencyObject = function (currency: string): Currency { return Currencies[key] } } + throw new TypeError(`No currency found with code ${currency}`); } let isObjectLike = (value: any): boolean => { @@ -64,7 +65,7 @@ let getTag = (value: any): string => { if (value == null) { return value === undefined ? '[object Undefined]' : '[object Null]' } - return toString.call(value) + return Object.prototype.toString.call(value) } let isPlainObject = (value: any): boolean => { @@ -129,6 +130,9 @@ class Money { if (!isInt(amount)) throw new TypeError('Amount must be an integer value') + if (!currency) + throw new TypeError('Missing required parameter currency') + return new Money(amount, currency) } @@ -259,7 +263,7 @@ class Money { allocate(ratios: number[]): Money[] { let self = this let remainder = self.amount - let results = [] + let results: Money[] = [] let total = 0 ratios.forEach(function (ratio) { diff --git a/lib/currencies.ts b/src/lib/currencies.ts similarity index 99% rename from lib/currencies.ts rename to src/lib/currencies.ts index 1e3c37e..78ae6da 100644 --- a/lib/currencies.ts +++ b/src/lib/currencies.ts @@ -443,7 +443,7 @@ export const Currencies: Record = { "name_plural": "Israeli new sheqels" }, "INR": { - "symbol": "Rs", + "symbol": "₹", "name": "Indian Rupee", "symbol_native": "টকা", "decimal_digits": 2, diff --git a/lib/currency.ts b/src/lib/currency.ts similarity index 100% rename from lib/currency.ts rename to src/lib/currency.ts diff --git a/test/bootstrap/node.js b/test/bootstrap/node.js deleted file mode 100644 index c99b18e..0000000 --- a/test/bootstrap/node.js +++ /dev/null @@ -1,3 +0,0 @@ -var chai = require('chai'); - -global.expect = chai.expect; diff --git a/test/module.test.js b/test/module.test.ts similarity index 70% rename from test/module.test.js rename to test/module.test.ts index 2792e27..d069363 100644 --- a/test/module.test.js +++ b/test/module.test.ts @@ -1,14 +1,15 @@ -let { Money, Currencies } = require('../build/') +import { describe, expect, it } from 'vitest' +import { Money, Currencies } from '../src/index' -describe('js-money', () => { +describe('ts-money', () => { it('should export Money constructor', () => { expect(Money).to.be.a('function') }) it('should export currencies', () => { - expect(Money.EUR).to.be.a('object') + expect(Currencies.EUR).to.be.a('object') }) it('should export factory methods', () => { @@ -19,4 +20,4 @@ describe('js-money', () => { expect(Currencies).to.be.a('object') expect(Currencies.EUR).to.be.a('object') }) -}) \ No newline at end of file +}) diff --git a/test/money.test.js b/test/money.test.ts similarity index 74% rename from test/money.test.js rename to test/money.test.ts index ad22b62..61726eb 100644 --- a/test/money.test.js +++ b/test/money.test.ts @@ -1,8 +1,9 @@ -var { Money, Currencies } = require('../build/index') +import { describe, expect, it } from 'vitest' +import { Money, Currencies } from '../src/index.js' describe('Money', function () { it('should create a new instance from integer', function () { - var money = new Money(1000, Money.EUR); + var money = new Money(1000, Currencies.EUR); expect(money.amount).to.equal(1000); expect(money.currency).to.equal('EUR'); @@ -10,15 +11,15 @@ describe('Money', function () { it('should not create a new instance from decimal', function () { expect(function () { - new Money(10.42, Money.EUR); + new Money(10.42, Currencies.EUR); }).to.throw(TypeError); }); it('should create a new instance from decimal using `.fromDecimal()`', function () { - var money = Money.fromDecimal(10.01, Money.EUR); - var money1 = Money.fromDecimal(10.1, Money.EUR); - var money2 = Money.fromDecimal(10, Money.EUR); - var money3 = Money.fromDecimal(8.45, Money.EUR); + var money = Money.fromDecimal(10.01, Currencies.EUR); + var money1 = Money.fromDecimal(10.1, Currencies.EUR); + var money2 = Money.fromDecimal(10, Currencies.EUR); + var money3 = Money.fromDecimal(8.45, Currencies.EUR); expect(money.amount).to.equal(1001); expect(money.currency).to.equal('EUR'); @@ -28,8 +29,10 @@ describe('Money', function () { }); it('should create a new instance from decimal string using `.fromDecimal()`', function () { - var money = Money.fromDecimal('10.01', Money.EUR); - var money1 = Money.fromDecimal('10', Money.EUR); + // @ts-expect-error + var money = Money.fromDecimal('10.01', Currencies.EUR); + // @ts-expect-error + var money1 = Money.fromDecimal('10', Currencies.EUR); expect(money.amount).to.equal(1001); expect(money1.amount).to.equal(1000); @@ -37,18 +40,18 @@ describe('Money', function () { it('should not create a new instance from decimal using `.fromDecimal()` if too many decimal places', function () { expect(function () { - Money.fromDecimal(10.421, Money.EUR); + Money.fromDecimal(10.421, Currencies.EUR); }).to.throw(Error); }); it('should create a new instance from decimal using `.fromDecimal()` even if too many decimal places if rounder function provided', function () { - var money = Money.fromDecimal(10.01, Money.EUR, 'ceil'); + var money = Money.fromDecimal(10.01, Currencies.EUR, 'ceil'); var money1 = Money.fromDecimal({amount: 10.01, currency: 'EUR'}, Math.ceil); - var money2 = Money.fromDecimal(10.0101, Money.EUR, Math.ceil); - var money3 = Money.fromDecimal(10.0199, Money.EUR, Math.ceil); - var money4 = Money.fromDecimal(10.0199, Money.EUR, Math.floor); - var money5 = Money.fromDecimal(10.0199, Money.EUR, Math.round); - var money6 = Money.fromDecimal(10.0199, Money.EUR, function (amount) { + var money2 = Money.fromDecimal(10.0101, Currencies.EUR, Math.ceil); + var money3 = Money.fromDecimal(10.0199, Currencies.EUR, Math.ceil); + var money4 = Money.fromDecimal(10.0199, Currencies.EUR, Math.floor); + var money5 = Money.fromDecimal(10.0199, Currencies.EUR, Math.round); + var money6 = Money.fromDecimal(10.0199, Currencies.EUR, function (amount) { return Math.round(amount) }); @@ -77,14 +80,14 @@ describe('Money', function () { }); it('should create a new instance from integer', function () { - var money = Money.fromInteger(1151,Money.EUR); + var money = Money.fromInteger(1151,Currencies.EUR); expect(money.amount).to.equal(1151); expect(money.currency).to.equal('EUR'); }); it('should create a new instance from zero integer', function () { - var money = Money.fromInteger(0,Money.EUR); + var money = Money.fromInteger(0,Currencies.EUR); expect(money.amount).to.equal(0); expect(money.currency).to.equal('EUR'); @@ -98,7 +101,7 @@ describe('Money', function () { }); it('should create a new instance from object with currenct object', function () { - var money = Money.fromDecimal({amount: 11.51, currency: Money.EUR}); + var money = Money.fromDecimal({amount: 11.51, currency: Currencies.EUR}); expect(money.amount).to.equal(1151); expect(money.currency).to.equal('EUR'); @@ -120,21 +123,21 @@ describe('Money', function () { }) it('should serialize correctly', function() { - var money = new Money(1042, Money.EUR); + var money = new Money(1042, Currencies.EUR); - expect(money.amount).to.be.a.number; - expect(money.currency).to.be.a.string; + expect(money.amount).toBeTypeOf('number') + expect(money.currency).toBeTypeOf('string'); }); it('should check for decimal precision', function() { expect(function() { - new Money(10.423456, Money.EUR) + new Money(10.423456, Currencies.EUR) }).to.throw(Error); }); it('should add same currencies', function () { - var first = new Money(1000, Money.EUR); - var second = new Money(500, Money.EUR); + var first = new Money(1000, Currencies.EUR); + var second = new Money(500, Currencies.EUR); var result = first.add(second); @@ -146,23 +149,23 @@ describe('Money', function () { }); it('should not add different currencies', function () { - var first = new Money(1000, Money.EUR); - var second = new Money(500, Money.USD); + var first = new Money(1000, Currencies.EUR); + var second = new Money(500, Currencies.USD); expect(first.add.bind(first, second)).to.throw(Error); }); it('should check for same type', function () { - var first = new Money(1000, Money.EUR); + var first = new Money(1000, Currencies.EUR); expect(first.add.bind(first, {})).to.throw(TypeError); }); it('should check if equal', function () { - var first = new Money(1000, Money.EUR); - var second = new Money(1000, Money.EUR); - var third = new Money(1000, Money.USD); - var fourth = new Money(100, Money.EUR); + var first = new Money(1000, Currencies.EUR); + var second = new Money(1000, Currencies.EUR); + var third = new Money(1000, Currencies.USD); + var fourth = new Money(100, Currencies.EUR); expect(first.equals(second)).to.equal(true); expect(first.equals(third)).to.equal(false); @@ -170,43 +173,43 @@ describe('Money', function () { }); it('should compare correctly', function () { - var subject = new Money(1000, Money.EUR); + var subject = new Money(1000, Currencies.EUR); - expect(subject.compare(new Money(1500, Money.EUR))).to.equal(-1); - expect(subject.compare(new Money(500, Money.EUR))).to.equal(1); - expect(subject.compare(new Money(1000, Money.EUR))).to.equal(0); + expect(subject.compare(new Money(1500, Currencies.EUR))).to.equal(-1); + expect(subject.compare(new Money(500, Currencies.EUR))).to.equal(1); + expect(subject.compare(new Money(1000, Currencies.EUR))).to.equal(0); expect(function () { - subject.compare(new Money(1500, Money.USD)); + subject.compare(new Money(1500, Currencies.USD)); }).to.throw(Error, 'Different currencies'); - expect(subject.greaterThan(new Money(1500, Money.EUR))).to.equal(false); - expect(subject.greaterThan(new Money(500, Money.EUR))).to.equal(true); - expect(subject.greaterThan(new Money(1000, Money.EUR))).to.equal(false); + expect(subject.greaterThan(new Money(1500, Currencies.EUR))).to.equal(false); + expect(subject.greaterThan(new Money(500, Currencies.EUR))).to.equal(true); + expect(subject.greaterThan(new Money(1000, Currencies.EUR))).to.equal(false); - expect(subject.greaterThanOrEqual(new Money(1500, Money.EUR))).to.equal(false); - expect(subject.greaterThanOrEqual(new Money(500, Money.EUR))).to.equal(true); - expect(subject.greaterThanOrEqual(new Money(1000, Money.EUR))).to.equal(true); + expect(subject.greaterThanOrEqual(new Money(1500, Currencies.EUR))).to.equal(false); + expect(subject.greaterThanOrEqual(new Money(500, Currencies.EUR))).to.equal(true); + expect(subject.greaterThanOrEqual(new Money(1000, Currencies.EUR))).to.equal(true); - expect(subject.lessThan(new Money(1500, Money.EUR))).to.equal(true); - expect(subject.lessThan(new Money(500, Money.EUR))).to.equal(false); - expect(subject.lessThan(new Money(1000, Money.EUR))).to.equal(false); + expect(subject.lessThan(new Money(1500, Currencies.EUR))).to.equal(true); + expect(subject.lessThan(new Money(500, Currencies.EUR))).to.equal(false); + expect(subject.lessThan(new Money(1000, Currencies.EUR))).to.equal(false); - expect(subject.lessThanOrEqual(new Money(1500, Money.EUR))).to.equal(true); - expect(subject.lessThanOrEqual(new Money(500, Money.EUR))).to.equal(false); - expect(subject.lessThanOrEqual(new Money(1000, Money.EUR))).to.equal(true); + expect(subject.lessThanOrEqual(new Money(1500, Currencies.EUR))).to.equal(true); + expect(subject.lessThanOrEqual(new Money(500, Currencies.EUR))).to.equal(false); + expect(subject.lessThanOrEqual(new Money(1000, Currencies.EUR))).to.equal(true); }); it('should subtract same currencies correctly', function() { - var subject = new Money(1000, Money.EUR); - var result = subject.subtract(new Money(250, Money.EUR)); + var subject = new Money(1000, Currencies.EUR); + var result = subject.subtract(new Money(250, Currencies.EUR)); expect(result.amount).to.equal(750); expect(result.currency).to.equal('EUR'); }); it('should multiply correctly', function() { - var subject = new Money(1000, Money.EUR); + var subject = new Money(1000, Currencies.EUR); expect(subject.multiply(1.2234).amount).to.equal(1223); expect(subject.multiply(1.2234, Math.ceil).amount).to.equal(1224); @@ -214,7 +217,7 @@ describe('Money', function () { }); it('should divide correctly', function() { - var subject = new Money(1000, Money.EUR); + var subject = new Money(1000, Currencies.EUR); expect(subject.divide(2.234).amount).to.equal(448); expect(subject.divide(2.234, Math.ceil).amount).to.equal(448); @@ -222,7 +225,7 @@ describe('Money', function () { }); it('should allocate correctly', function() { - var subject = new Money(1000, Money.EUR); + var subject = new Money(1000, Currencies.EUR); var results = subject.allocate([1,1,1]); expect(results.length).to.equal(3); @@ -291,7 +294,7 @@ describe('Money', function () { var subject = new Money(1000, 'EUR') expect(subject.getCurrencyInfo()).to.equal(Currencies.EUR) - }) + }) it('should convert from decimal per currency', function () { var euro = Money.fromDecimal(123.45, 'EUR'); @@ -357,7 +360,7 @@ describe('Currencies', () => { decimal_digits: 8, rounding: 0, code: "LTC", - name_plural: "Litecoins" + name_plural: "Litecoins" } let m1 = new Money(1, 'LTC') @@ -367,5 +370,5 @@ describe('Currencies', () => { expect(m1.currency).to.equal('LTC') expect(m2.currency).to.equal('LTC') expect(m2.amount).to.equal(100000000) - }) + }) }) diff --git a/tsconfig.json b/tsconfig.json index 659d530..a2d3d1e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,27 +1,15 @@ { "compilerOptions": { - "target": "es6", - "rootDir": "./", - "outDir": "./build/", - "module": "commonjs", - "declaration": true, - "noImplicitAny": false, - "removeComments": false, - "moduleResolution": "node", - "sourceMap": false, - "inlineSources": false, - "baseUrl": ".", - "paths": { - "*": ["*"] - }, - "typeRoots": [ - ], - "types": ["node"] - }, - "include": [ - "index.ts" - ], - "exclude": [ - "node_modules" - ] -} + "target": "ESNext", + "lib": ["ESNext"], + "module": "ESNext", + "moduleResolution": "Bundler", + "resolveJsonModule": true, + "strict": true, + "strictNullChecks": true, + "noEmit": true, + "esModuleInterop": true, + "skipDefaultLibCheck": true, + "skipLibCheck": true + } + } From 479e90415f03593da6acb7ba17165ec6fac077ba Mon Sep 17 00:00:00 2001 From: Sebastian Langer Date: Fri, 16 Aug 2024 16:52:07 +0200 Subject: [PATCH 03/20] Fix npm build --- .npmignore | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.npmignore b/.npmignore index 7d782d7..d18d680 100644 --- a/.npmignore +++ b/.npmignore @@ -1,4 +1,4 @@ * -!build/**/* +!dist/**/* !package.json !*.md diff --git a/package.json b/package.json index d1131dc..0a11a6e 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "type": "module", "sideEffects": false, "description": "Typescript port of js-money. Implementation of the Money value object.", - "version": "0.6.0", + "version": "0.6.1", "exports": { ".": { "types": "./dist/index.d.ts", From ffad7d1039e9cf897f0198474b9bdbbb5369f4b9 Mon Sep 17 00:00:00 2001 From: Brad Ito Date: Tue, 28 Jan 2025 14:52:44 -0800 Subject: [PATCH 04/20] patch dependencies --- package-lock.json | 1011 +++++++-------------------------------------- 1 file changed, 150 insertions(+), 861 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4efc4ee..40c4397 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,17 +1,15 @@ { "name": "@screeny05/ts-money", - "version": "0.6.0", + "version": "0.6.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@screeny05/ts-money", - "version": "0.6.0", + "version": "0.6.1", "license": "MIT", "devDependencies": { "@types/node": "^20.14.15", - "chai": "1.x.x", - "mocha": "^10.0.0", "typescript": "^5.5.4", "unbuild": "^2.0.0", "vite": "^5.4.1", @@ -993,9 +991,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.20.0.tgz", - "integrity": "sha512-TSpWzflCc4VGAUJZlPpgAJE1+V60MePDQnBd7PPkpuEmOy8i87aL6tinFGKBFKuEDikYpig72QzdT3QPYIi+oA==", + "version": "4.32.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.32.1.tgz", + "integrity": "sha512-/pqA4DmqyCm8u5YIDzIdlLcEmuvxb0v8fZdFhVMszSpDTgbQKdw3/mB3eMUHIbubtJ6F9j+LtmyCnHTEqIHyzA==", "cpu": [ "arm" ], @@ -1006,9 +1004,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.20.0.tgz", - "integrity": "sha512-u00Ro/nok7oGzVuh/FMYfNoGqxU5CPWz1mxV85S2w9LxHR8OoMQBuSk+3BKVIDYgkpeOET5yXkx90OYFc+ytpQ==", + "version": "4.32.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.32.1.tgz", + "integrity": "sha512-If3PDskT77q7zgqVqYuj7WG3WC08G1kwXGVFi9Jr8nY6eHucREHkfpX79c0ACAjLj3QIWKPJR7w4i+f5EdLH5Q==", "cpu": [ "arm64" ], @@ -1019,9 +1017,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.20.0.tgz", - "integrity": "sha512-uFVfvzvsdGtlSLuL0ZlvPJvl6ZmrH4CBwLGEFPe7hUmf7htGAN+aXo43R/V6LATyxlKVC/m6UsLb7jbG+LG39Q==", + "version": "4.32.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.32.1.tgz", + "integrity": "sha512-zCpKHioQ9KgZToFp5Wvz6zaWbMzYQ2LJHQ+QixDKq52KKrF65ueu6Af4hLlLWHjX1Wf/0G5kSJM9PySW9IrvHA==", "cpu": [ "arm64" ], @@ -1032,9 +1030,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.20.0.tgz", - "integrity": "sha512-xbrMDdlev53vNXexEa6l0LffojxhqDTBeL+VUxuuIXys4x6xyvbKq5XqTXBCEUA8ty8iEJblHvFaWRJTk/icAQ==", + "version": "4.32.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.32.1.tgz", + "integrity": "sha512-sFvF+t2+TyUo/ZQqUcifrJIgznx58oFZbdHS9TvHq3xhPVL9nOp+yZ6LKrO9GWTP+6DbFtoyLDbjTpR62Mbr3Q==", "cpu": [ "x64" ], @@ -1044,10 +1042,36 @@ "darwin" ] }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.32.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.32.1.tgz", + "integrity": "sha512-NbOa+7InvMWRcY9RG+B6kKIMD/FsnQPH0MWUvDlQB1iXnF/UcKSudCXZtv4lW+C276g3w5AxPbfry5rSYvyeYA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.32.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.32.1.tgz", + "integrity": "sha512-JRBRmwvHPXR881j2xjry8HZ86wIPK2CcDw0EXchE1UgU0ubWp9nvlT7cZYKc6bkypBt745b4bglf3+xJ7hXWWw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ] + }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.20.0.tgz", - "integrity": "sha512-jMYvxZwGmoHFBTbr12Xc6wOdc2xA5tF5F2q6t7Rcfab68TT0n+r7dgawD4qhPEvasDsVpQi+MgDzj2faOLsZjA==", + "version": "4.32.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.32.1.tgz", + "integrity": "sha512-PKvszb+9o/vVdUzCCjL0sKHukEQV39tD3fepXxYrHE3sTKrRdCydI7uldRLbjLmDA3TFDmh418XH19NOsDRH8g==", "cpu": [ "arm" ], @@ -1058,9 +1082,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.20.0.tgz", - "integrity": "sha512-1asSTl4HKuIHIB1GcdFHNNZhxAYEdqML/MW4QmPS4G0ivbEcBr1JKlFLKsIRqjSwOBkdItn3/ZDlyvZ/N6KPlw==", + "version": "4.32.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.32.1.tgz", + "integrity": "sha512-9WHEMV6Y89eL606ReYowXuGF1Yb2vwfKWKdD1A5h+OYnPZSJvxbEjxTRKPgi7tkP2DSnW0YLab1ooy+i/FQp/Q==", "cpu": [ "arm" ], @@ -1071,9 +1095,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.20.0.tgz", - "integrity": "sha512-COBb8Bkx56KldOYJfMf6wKeYJrtJ9vEgBRAOkfw6Ens0tnmzPqvlpjZiLgkhg6cA3DGzCmLmmd319pmHvKWWlQ==", + "version": "4.32.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.32.1.tgz", + "integrity": "sha512-tZWc9iEt5fGJ1CL2LRPw8OttkCBDs+D8D3oEM8mH8S1ICZCtFJhD7DZ3XMGM8kpqHvhGUTvNUYVDnmkj4BDXnw==", "cpu": [ "arm64" ], @@ -1084,9 +1108,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.20.0.tgz", - "integrity": "sha512-+it+mBSyMslVQa8wSPvBx53fYuZK/oLTu5RJoXogjk6x7Q7sz1GNRsXWjn6SwyJm8E/oMjNVwPhmNdIjwP135Q==", + "version": "4.32.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.32.1.tgz", + "integrity": "sha512-FTYc2YoTWUsBz5GTTgGkRYYJ5NGJIi/rCY4oK/I8aKowx1ToXeoVVbIE4LGAjsauvlhjfl0MYacxClLld1VrOw==", "cpu": [ "arm64" ], @@ -1096,10 +1120,23 @@ "linux" ] }, + "node_modules/@rollup/rollup-linux-loongarch64-gnu": { + "version": "4.32.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.32.1.tgz", + "integrity": "sha512-F51qLdOtpS6P1zJVRzYM0v6MrBNypyPEN1GfMiz0gPu9jN8ScGaEFIZQwteSsGKg799oR5EaP7+B2jHgL+d+Kw==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.20.0.tgz", - "integrity": "sha512-yAMvqhPfGKsAxHN8I4+jE0CpLWD8cv4z7CK7BMmhjDuz606Q2tFKkWRY8bHR9JQXYcoLfopo5TTqzxgPUjUMfw==", + "version": "4.32.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.32.1.tgz", + "integrity": "sha512-wO0WkfSppfX4YFm5KhdCCpnpGbtgQNj/tgvYzrVYFKDpven8w2N6Gg5nB6w+wAMO3AIfSTWeTjfVe+uZ23zAlg==", "cpu": [ "ppc64" ], @@ -1110,9 +1147,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.20.0.tgz", - "integrity": "sha512-qmuxFpfmi/2SUkAw95TtNq/w/I7Gpjurx609OOOV7U4vhvUhBcftcmXwl3rqAek+ADBwSjIC4IVNLiszoj3dPA==", + "version": "4.32.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.32.1.tgz", + "integrity": "sha512-iWswS9cIXfJO1MFYtI/4jjlrGb/V58oMu4dYJIKnR5UIwbkzR0PJ09O0PDZT0oJ3LYWXBSWahNf/Mjo6i1E5/g==", "cpu": [ "riscv64" ], @@ -1123,9 +1160,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.20.0.tgz", - "integrity": "sha512-I0BtGXddHSHjV1mqTNkgUZLnS3WtsqebAXv11D5BZE/gfw5KoyXSAXVqyJximQXNvNzUo4GKlCK/dIwXlz+jlg==", + "version": "4.32.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.32.1.tgz", + "integrity": "sha512-RKt8NI9tebzmEthMnfVgG3i/XeECkMPS+ibVZjZ6mNekpbbUmkNWuIN2yHsb/mBPyZke4nlI4YqIdFPgKuoyQQ==", "cpu": [ "s390x" ], @@ -1136,9 +1173,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.20.0.tgz", - "integrity": "sha512-y+eoL2I3iphUg9tN9GB6ku1FA8kOfmF4oUEWhztDJ4KXJy1agk/9+pejOuZkNFhRwHAOxMsBPLbXPd6mJiCwew==", + "version": "4.32.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.32.1.tgz", + "integrity": "sha512-WQFLZ9c42ECqEjwg/GHHsouij3pzLXkFdz0UxHa/0OM12LzvX7DzedlY0SIEly2v18YZLRhCRoHZDxbBSWoGYg==", "cpu": [ "x64" ], @@ -1149,9 +1186,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.20.0.tgz", - "integrity": "sha512-hM3nhW40kBNYUkZb/r9k2FKK+/MnKglX7UYd4ZUy5DJs8/sMsIbqWK2piZtVGE3kcXVNj3B2IrUYROJMMCikNg==", + "version": "4.32.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.32.1.tgz", + "integrity": "sha512-BLoiyHDOWoS3uccNSADMza6V6vCNiphi94tQlVIL5de+r6r/CCQuNnerf+1g2mnk2b6edp5dk0nhdZ7aEjOBsA==", "cpu": [ "x64" ], @@ -1162,9 +1199,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.20.0.tgz", - "integrity": "sha512-psegMvP+Ik/Bg7QRJbv8w8PAytPA7Uo8fpFjXyCRHWm6Nt42L+JtoqH8eDQ5hRP7/XW2UiIriy1Z46jf0Oa1kA==", + "version": "4.32.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.32.1.tgz", + "integrity": "sha512-w2l3UnlgYTNNU+Z6wOR8YdaioqfEnwPjIsJ66KxKAf0p+AuL2FHeTX6qvM+p/Ue3XPBVNyVSfCrfZiQh7vZHLQ==", "cpu": [ "arm64" ], @@ -1175,9 +1212,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.20.0.tgz", - "integrity": "sha512-GabekH3w4lgAJpVxkk7hUzUf2hICSQO0a/BLFA11/RMxQT92MabKAqyubzDZmMOC/hcJNlc+rrypzNzYl4Dx7A==", + "version": "4.32.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.32.1.tgz", + "integrity": "sha512-Am9H+TGLomPGkBnaPWie4F3x+yQ2rr4Bk2jpwy+iV+Gel9jLAu/KqT8k3X4jxFPW6Zf8OMnehyutsd+eHoq1WQ==", "cpu": [ "ia32" ], @@ -1188,9 +1225,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.20.0.tgz", - "integrity": "sha512-aJ1EJSuTdGnM6qbVC4B5DSmozPTqIag9fSzXRNNo+humQLG89XpPgdt16Ia56ORD7s+H8Pmyx44uczDQ0yDzpg==", + "version": "4.32.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.32.1.tgz", + "integrity": "sha512-ar80GhdZb4DgmW3myIS9nRFYcpJRSME8iqWgzH2i44u+IdrzmiXVxeFnExQ5v4JYUSpg94bWjevMG8JHf1Da5Q==", "cpu": [ "x64" ], @@ -1210,9 +1247,9 @@ } }, "node_modules/@types/estree": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", - "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", "dev": true }, "node_modules/@types/node": { @@ -1230,12 +1267,6 @@ "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==", "dev": true }, - "node_modules/@ungap/promise-all-settled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", - "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", - "dev": true - }, "node_modules/@vitest/expect": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-2.0.5.tgz", @@ -1372,67 +1403,6 @@ "node": ">=0.4.0" } }, - "node_modules/ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "dev": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "node_modules/assertion-error": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.0.0.tgz", - "integrity": "sha1-x/hUOP3UZrx8oWq5DIFRN5el0js=", - "dev": true, - "engines": { - "node": "*" - } - }, "node_modules/autoprefixer": { "version": "10.4.20", "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.20.tgz", @@ -1476,15 +1446,6 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, - "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/boolbase": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", @@ -1512,12 +1473,6 @@ "node": ">=8" } }, - "node_modules/browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true - }, "node_modules/browserslist": { "version": "4.23.3", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.3.tgz", @@ -1571,18 +1526,6 @@ "node": ">=8" } }, - "node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/caniuse-api": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz", @@ -1615,47 +1558,6 @@ } ] }, - "node_modules/chai": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/chai/-/chai-1.10.0.tgz", - "integrity": "sha1-5AMcyHZURhp1lD5aNatG6vOcHrk=", - "dev": true, - "dependencies": { - "assertion-error": "1.0.0", - "deep-eql": "0.1.3" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/chalk/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/check-error": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.1.tgz", @@ -1665,33 +1567,6 @@ "node": ">= 16" } }, - "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, "node_modules/citty": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/citty/-/citty-0.1.6.tgz", @@ -1701,35 +1576,6 @@ "consola": "^3.2.3" } }, - "node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, "node_modules/colord": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/colord/-/colord-2.9.3.tgz", @@ -1751,12 +1597,6 @@ "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", "dev": true }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, "node_modules/confbox": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.1.7.tgz", @@ -1779,9 +1619,9 @@ "dev": true }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, "dependencies": { "path-key": "^3.1.0", @@ -1989,30 +1829,6 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, - "node_modules/decamelize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/deep-eql": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-0.1.3.tgz", - "integrity": "sha1-71WKyrjeJSBs1xOQbXTlaTDrafI=", - "dev": true, - "dependencies": { - "type-detect": "0.1.1" - }, - "engines": { - "node": "*" - } - }, "node_modules/deepmerge": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", @@ -2028,15 +1844,6 @@ "integrity": "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==", "dev": true }, - "node_modules/diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", - "dev": true, - "engines": { - "node": ">=0.3.1" - } - }, "node_modules/dir-glob": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", @@ -2110,12 +1917,6 @@ "integrity": "sha512-HfkT8ndXR0SEkU8gBQQM3rz035bpE/hxkZ1YIt4KJPEFES68HfIU6LzKukH0H794Lm83WJtkSAMfEToxCs15VA==", "dev": true }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, "node_modules/entities": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", @@ -2175,18 +1976,6 @@ "node": ">=6" } }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/estree-walker": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", @@ -2253,31 +2042,6 @@ "node": ">=8" } }, - "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true, - "bin": { - "flat": "cli.js" - } - }, "node_modules/fraction.js": { "version": "4.3.7", "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz", @@ -2329,15 +2093,6 @@ "node": ">=6.9.0" } }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, "node_modules/get-func-name": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", @@ -2359,27 +2114,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/glob-parent": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", @@ -2392,28 +2126,6 @@ "node": ">= 6" } }, - "node_modules/glob/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/glob/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", @@ -2442,15 +2154,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/hasown": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", @@ -2463,15 +2166,6 @@ "node": ">= 0.4" } }, - "node_modules/he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true, - "bin": { - "he": "bin/he" - } - }, "node_modules/hookable": { "version": "5.5.3", "resolved": "https://registry.npmjs.org/hookable/-/hookable-5.5.3.tgz", @@ -2513,18 +2207,6 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/is-builtin-module": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.1.tgz", @@ -2564,15 +2246,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -2600,15 +2273,6 @@ "node": ">=0.12.0" } }, - "node_modules/is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/is-reference": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", @@ -2630,18 +2294,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -2663,18 +2315,6 @@ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true }, - "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -2711,21 +2351,6 @@ "url": "https://github.com/sponsors/antonk52" } }, - "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", @@ -2738,22 +2363,6 @@ "integrity": "sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==", "dev": true }, - "node_modules/log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dev": true, - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/loupe": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.1.tgz", @@ -2803,9 +2412,9 @@ } }, "node_modules/micromatch": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", - "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, "dependencies": { "braces": "^3.0.3", @@ -3298,47 +2907,6 @@ "ufo": "^1.5.3" } }, - "node_modules/mocha": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.0.0.tgz", - "integrity": "sha512-0Wl+elVUD43Y0BqPZBzZt8Tnkw9CMUdNYnUsTfOM1vuhJVZL+kiesFYsqwBkEEuEixaiPe5ZQdqDgX2jddhmoA==", - "dev": true, - "dependencies": { - "@ungap/promise-all-settled": "1.1.2", - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.4", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.2.0", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "5.0.1", - "ms": "2.1.3", - "nanoid": "3.3.3", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "workerpool": "6.2.1", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha.js" - }, - "engines": { - "node": ">= 14.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" - } - }, "node_modules/mri": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", @@ -3348,17 +2916,17 @@ "node": ">=4" } }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, "node_modules/nanoid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", - "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", + "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], "bin": { "nanoid": "bin/nanoid.cjs" }, @@ -3372,15 +2940,6 @@ "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", "dev": true }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/normalize-range": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", @@ -3453,54 +3012,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -3541,9 +3052,9 @@ } }, "node_modules/picocolors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", - "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", "dev": true }, "node_modules/picomatch": { @@ -3570,9 +3081,9 @@ } }, "node_modules/postcss": { - "version": "8.4.41", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.41.tgz", - "integrity": "sha512-TesUflQ0WKZqAvg52PWL6kHgLKP6xB6heTOdoYM0Wt2UHyxNa4K25EZZMgKns3BH1RLVbZCREPpLY0rhnNoHVQ==", + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.1.tgz", + "integrity": "sha512-6oz2beyjc5VMn/KV1pPw8fliQkhBXrVn1Z3TVyqZxU8kZpzEKhBdmCFqI6ZbmGtamQvQGuU1sgPTk8ZrXDD7jQ==", "dev": true, "funding": [ { @@ -3589,9 +3100,9 @@ } ], "dependencies": { - "nanoid": "^3.3.7", - "picocolors": "^1.0.1", - "source-map-js": "^1.2.0" + "nanoid": "^3.3.8", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" }, "engines": { "node": "^10 || ^12 || >=14" @@ -4052,24 +3563,6 @@ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", "dev": true }, - "node_modules/postcss/node_modules/nanoid": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, "node_modules/pretty-bytes": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-6.1.1.tgz", @@ -4102,36 +3595,6 @@ } ] }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/resolve": { "version": "1.22.8", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", @@ -4160,9 +3623,9 @@ } }, "node_modules/rollup": { - "version": "3.29.4", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.4.tgz", - "integrity": "sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==", + "version": "3.29.5", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.5.tgz", + "integrity": "sha512-GVsDdsbJzzy4S/v3dqWPJ7EfvZJfCHiDqe80IyrF59LYuP+e6U1LJoUqeuqRbwAWoMNoXivMNeNAOf5E22VA1w==", "dev": true, "bin": { "rollup": "dist/bin/rollup" @@ -4220,26 +3683,6 @@ "queue-microtask": "^1.2.2" } }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, "node_modules/scule": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/scule/-/scule-1.3.0.tgz", @@ -4258,15 +3701,6 @@ "node": ">=10" } }, - "node_modules/serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", - "dev": true, - "dependencies": { - "randombytes": "^2.1.0" - } - }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -4319,9 +3753,9 @@ } }, "node_modules/source-map-js": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", - "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", "dev": true, "engines": { "node": ">=0.10.0" @@ -4339,32 +3773,6 @@ "integrity": "sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==", "dev": true }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/strip-final-newline": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", @@ -4377,18 +3785,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/stylehacks": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-7.0.3.tgz", @@ -4405,21 +3801,6 @@ "postcss": "^8.4.31" } }, - "node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", @@ -4511,15 +3892,6 @@ "node": ">=8.0" } }, - "node_modules/type-detect": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-0.1.1.tgz", - "integrity": "sha1-C6XsKohWQORw6k6FBZcZANrFiCI=", - "dev": true, - "engines": { - "node": "*" - } - }, "node_modules/typescript": { "version": "5.5.4", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", @@ -4655,14 +4027,14 @@ "dev": true }, "node_modules/vite": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.1.tgz", - "integrity": "sha512-1oE6yuNXssjrZdblI9AfBbHCC41nnyoVoEZxQnID6yvQZAFBzxxkqoFLtHUMkYunL8hwOLEjgTuxpkRxvba3kA==", + "version": "5.4.14", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.14.tgz", + "integrity": "sha512-EK5cY7Q1D8JNhSaPKVK4pwBFvaTmZxEnoKXLG/U9gmdDcihQGNzFlgIvaxezFR4glP1LsuiedwMBqCXH3wZccA==", "dev": true, "dependencies": { "esbuild": "^0.21.3", - "postcss": "^8.4.41", - "rollup": "^4.13.0" + "postcss": "^8.4.43", + "rollup": "^4.20.0" }, "bin": { "vite": "bin/vite.js" @@ -5165,12 +4537,12 @@ } }, "node_modules/vite/node_modules/rollup": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.20.0.tgz", - "integrity": "sha512-6rbWBChcnSGzIlXeIdNIZTopKYad8ZG8ajhl78lGRLsI2rX8IkaotQhVas2Ma+GPxJav19wrSzvRvuiv0YKzWw==", + "version": "4.32.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.32.1.tgz", + "integrity": "sha512-z+aeEsOeEa3mEbS1Tjl6sAZ8NE3+AalQz1RJGj81M+fizusbdDMoEJwdJNHfaB40Scr4qNu+welOfes7maKonA==", "dev": true, "dependencies": { - "@types/estree": "1.0.5" + "@types/estree": "1.0.6" }, "bin": { "rollup": "dist/bin/rollup" @@ -5180,22 +4552,25 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.20.0", - "@rollup/rollup-android-arm64": "4.20.0", - "@rollup/rollup-darwin-arm64": "4.20.0", - "@rollup/rollup-darwin-x64": "4.20.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.20.0", - "@rollup/rollup-linux-arm-musleabihf": "4.20.0", - "@rollup/rollup-linux-arm64-gnu": "4.20.0", - "@rollup/rollup-linux-arm64-musl": "4.20.0", - "@rollup/rollup-linux-powerpc64le-gnu": "4.20.0", - "@rollup/rollup-linux-riscv64-gnu": "4.20.0", - "@rollup/rollup-linux-s390x-gnu": "4.20.0", - "@rollup/rollup-linux-x64-gnu": "4.20.0", - "@rollup/rollup-linux-x64-musl": "4.20.0", - "@rollup/rollup-win32-arm64-msvc": "4.20.0", - "@rollup/rollup-win32-ia32-msvc": "4.20.0", - "@rollup/rollup-win32-x64-msvc": "4.20.0", + "@rollup/rollup-android-arm-eabi": "4.32.1", + "@rollup/rollup-android-arm64": "4.32.1", + "@rollup/rollup-darwin-arm64": "4.32.1", + "@rollup/rollup-darwin-x64": "4.32.1", + "@rollup/rollup-freebsd-arm64": "4.32.1", + "@rollup/rollup-freebsd-x64": "4.32.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.32.1", + "@rollup/rollup-linux-arm-musleabihf": "4.32.1", + "@rollup/rollup-linux-arm64-gnu": "4.32.1", + "@rollup/rollup-linux-arm64-musl": "4.32.1", + "@rollup/rollup-linux-loongarch64-gnu": "4.32.1", + "@rollup/rollup-linux-powerpc64le-gnu": "4.32.1", + "@rollup/rollup-linux-riscv64-gnu": "4.32.1", + "@rollup/rollup-linux-s390x-gnu": "4.32.1", + "@rollup/rollup-linux-x64-gnu": "4.32.1", + "@rollup/rollup-linux-x64-musl": "4.32.1", + "@rollup/rollup-win32-arm64-msvc": "4.32.1", + "@rollup/rollup-win32-ia32-msvc": "4.32.1", + "@rollup/rollup-win32-x64-msvc": "4.32.1", "fsevents": "~2.3.2" } }, @@ -5351,103 +4726,17 @@ "node": ">=8" } }, - "node_modules/workerpool": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", - "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", - "dev": true - }, - "node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, "node_modules/yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true - }, - "node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-unparser": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", - "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", - "dev": true, - "dependencies": { - "camelcase": "^6.0.0", - "decamelize": "^4.0.0", - "flat": "^5.0.2", - "is-plain-obj": "^2.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } } } } From 339aaea3a3b714d19b79ceade1278e3ad4b4e53c Mon Sep 17 00:00:00 2001 From: Brad Ito Date: Tue, 28 Jan 2025 14:56:28 -0800 Subject: [PATCH 05/20] apply prettier to currencies.ts with config --- .prettierrc.json | 10 + src/lib/currencies.ts | 2162 ++++++++++++++++++++--------------------- 2 files changed, 1091 insertions(+), 1081 deletions(-) create mode 100644 .prettierrc.json diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 0000000..23aa6e2 --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,10 @@ +{ + "arrowParens": "always", + "bracketSpacing": true, + "printWidth": 88, + "semi": false, + "singleQuote": true, + "tabWidth": 2, + "trailingComma": "all", + "useTabs": false +} diff --git a/src/lib/currencies.ts b/src/lib/currencies.ts index 78ae6da..9aee6a1 100644 --- a/src/lib/currencies.ts +++ b/src/lib/currencies.ts @@ -1,1084 +1,1084 @@ -import { Currency } from './currency'; +import { Currency } from './currency' export const Currencies: Record = { - "USD": { - "symbol": "$", - "name": "US Dollar", - "symbol_native": "$", - "decimal_digits": 2, - "rounding": 0, - "code": "USD", - "name_plural": "US dollars" - }, - "CAD": { - "symbol": "CA$", - "name": "Canadian Dollar", - "symbol_native": "$", - "decimal_digits": 2, - "rounding": 0, - "code": "CAD", - "name_plural": "Canadian dollars" - }, - "EUR": { - "symbol": "€", - "name": "Euro", - "symbol_native": "€", - "decimal_digits": 2, - "rounding": 0, - "code": "EUR", - "name_plural": "euros" - }, - "BTC": { - "symbol": "BTC", - "name": "Bitcoin", - "symbol_native": "฿", - "decimal_digits": 8, - "rounding": 0, - "code": "BTC", - "name_plural": "Bitcoins" - }, - "AED": { - "symbol": "AED", - "name": "United Arab Emirates Dirham", - "symbol_native": "د.إ.‏", - "decimal_digits": 2, - "rounding": 0, - "code": "AED", - "name_plural": "UAE dirhams" - }, - "AFN": { - "symbol": "Af", - "name": "Afghan Afghani", - "symbol_native": "؋", - "decimal_digits": 2, - "rounding": 0, - "code": "AFN", - "name_plural": "Afghan Afghanis" - }, - "ALL": { - "symbol": "ALL", - "name": "Albanian Lek", - "symbol_native": "Lek", - "decimal_digits": 2, - "rounding": 0, - "code": "ALL", - "name_plural": "Albanian lekë" - }, - "AMD": { - "symbol": "AMD", - "name": "Armenian Dram", - "symbol_native": "դր.", - "decimal_digits": 2, - "rounding": 0, - "code": "AMD", - "name_plural": "Armenian drams" - }, - "ARS": { - "symbol": "AR$", - "name": "Argentine Peso", - "symbol_native": "$", - "decimal_digits": 2, - "rounding": 0, - "code": "ARS", - "name_plural": "Argentine pesos" - }, - "AUD": { - "symbol": "AU$", - "name": "Australian Dollar", - "symbol_native": "$", - "decimal_digits": 2, - "rounding": 0, - "code": "AUD", - "name_plural": "Australian dollars" - }, - "AZN": { - "symbol": "man.", - "name": "Azerbaijani Manat", - "symbol_native": "ман.", - "decimal_digits": 2, - "rounding": 0, - "code": "AZN", - "name_plural": "Azerbaijani manats" - }, - "BAM": { - "symbol": "KM", - "name": "Bosnia-Herzegovina Convertible Mark", - "symbol_native": "KM", - "decimal_digits": 2, - "rounding": 0, - "code": "BAM", - "name_plural": "Bosnia-Herzegovina convertible marks" - }, - "BDT": { - "symbol": "Tk", - "name": "Bangladeshi Taka", - "symbol_native": "৳", - "decimal_digits": 2, - "rounding": 0, - "code": "BDT", - "name_plural": "Bangladeshi takas" - }, - "BGN": { - "symbol": "BGN", - "name": "Bulgarian Lev", - "symbol_native": "лв.", - "decimal_digits": 2, - "rounding": 0, - "code": "BGN", - "name_plural": "Bulgarian leva" - }, - "BHD": { - "symbol": "BD", - "name": "Bahraini Dinar", - "symbol_native": "د.ب.‏", - "decimal_digits": 3, - "rounding": 0, - "code": "BHD", - "name_plural": "Bahraini dinars" - }, - "BIF": { - "symbol": "FBu", - "name": "Burundian Franc", - "symbol_native": "FBu", - "decimal_digits": 0, - "rounding": 0, - "code": "BIF", - "name_plural": "Burundian francs" - }, - "BND": { - "symbol": "BN$", - "name": "Brunei Dollar", - "symbol_native": "$", - "decimal_digits": 2, - "rounding": 0, - "code": "BND", - "name_plural": "Brunei dollars" - }, - "BOB": { - "symbol": "Bs", - "name": "Bolivian Boliviano", - "symbol_native": "Bs", - "decimal_digits": 2, - "rounding": 0, - "code": "BOB", - "name_plural": "Bolivian bolivianos" - }, - "BRL": { - "symbol": "R$", - "name": "Brazilian Real", - "symbol_native": "R$", - "decimal_digits": 2, - "rounding": 0, - "code": "BRL", - "name_plural": "Brazilian reals" - }, - "BWP": { - "symbol": "BWP", - "name": "Botswanan Pula", - "symbol_native": "P", - "decimal_digits": 2, - "rounding": 0, - "code": "BWP", - "name_plural": "Botswanan pulas" - }, - "BYR": { - "symbol": "BYR", - "name": "Belarusian Ruble", - "symbol_native": "BYR", - "decimal_digits": 0, - "rounding": 0, - "code": "BYR", - "name_plural": "Belarusian rubles" - }, - "BZD": { - "symbol": "BZ$", - "name": "Belize Dollar", - "symbol_native": "$", - "decimal_digits": 2, - "rounding": 0, - "code": "BZD", - "name_plural": "Belize dollars" - }, - "CDF": { - "symbol": "CDF", - "name": "Congolese Franc", - "symbol_native": "FrCD", - "decimal_digits": 2, - "rounding": 0, - "code": "CDF", - "name_plural": "Congolese francs" - }, - "CHF": { - "symbol": "CHF", - "name": "Swiss Franc", - "symbol_native": "CHF", - "decimal_digits": 2, - "rounding": 0.05, - "code": "CHF", - "name_plural": "Swiss francs" - }, - "CLP": { - "symbol": "CL$", - "name": "Chilean Peso", - "symbol_native": "$", - "decimal_digits": 0, - "rounding": 0, - "code": "CLP", - "name_plural": "Chilean pesos" - }, - "CNY": { - "symbol": "CN¥", - "name": "Chinese Yuan", - "symbol_native": "CN¥", - "decimal_digits": 2, - "rounding": 0, - "code": "CNY", - "name_plural": "Chinese yuan" - }, - "COP": { - "symbol": "CO$", - "name": "Colombian Peso", - "symbol_native": "$", - "decimal_digits": 2, - "rounding": 0, - "code": "COP", - "name_plural": "Colombian pesos" - }, - "CRC": { - "symbol": "₡", - "name": "Costa Rican Colón", - "symbol_native": "₡", - "decimal_digits": 2, - "rounding": 0, - "code": "CRC", - "name_plural": "Costa Rican colóns" - }, - "CVE": { - "symbol": "CV$", - "name": "Cape Verdean Escudo", - "symbol_native": "CV$", - "decimal_digits": 2, - "rounding": 0, - "code": "CVE", - "name_plural": "Cape Verdean escudos" - }, - "CZK": { - "symbol": "Kč", - "name": "Czech Republic Koruna", - "symbol_native": "Kč", - "decimal_digits": 2, - "rounding": 0, - "code": "CZK", - "name_plural": "Czech Republic korunas" - }, - "DJF": { - "symbol": "Fdj", - "name": "Djiboutian Franc", - "symbol_native": "Fdj", - "decimal_digits": 0, - "rounding": 0, - "code": "DJF", - "name_plural": "Djiboutian francs" - }, - "DKK": { - "symbol": "Dkr", - "name": "Danish Krone", - "symbol_native": "kr", - "decimal_digits": 2, - "rounding": 0, - "code": "DKK", - "name_plural": "Danish kroner" - }, - "DOP": { - "symbol": "RD$", - "name": "Dominican Peso", - "symbol_native": "RD$", - "decimal_digits": 2, - "rounding": 0, - "code": "DOP", - "name_plural": "Dominican pesos" - }, - "DZD": { - "symbol": "DA", - "name": "Algerian Dinar", - "symbol_native": "د.ج.‏", - "decimal_digits": 2, - "rounding": 0, - "code": "DZD", - "name_plural": "Algerian dinars" - }, - "EEK": { - "symbol": "Ekr", - "name": "Estonian Kroon", - "symbol_native": "kr", - "decimal_digits": 2, - "rounding": 0, - "code": "EEK", - "name_plural": "Estonian kroons" - }, - "EGP": { - "symbol": "EGP", - "name": "Egyptian Pound", - "symbol_native": "ج.م.‏", - "decimal_digits": 2, - "rounding": 0, - "code": "EGP", - "name_plural": "Egyptian pounds" - }, - "ERN": { - "symbol": "Nfk", - "name": "Eritrean Nakfa", - "symbol_native": "Nfk", - "decimal_digits": 2, - "rounding": 0, - "code": "ERN", - "name_plural": "Eritrean nakfas" - }, - "ETB": { - "symbol": "Br", - "name": "Ethiopian Birr", - "symbol_native": "Br", - "decimal_digits": 2, - "rounding": 0, - "code": "ETB", - "name_plural": "Ethiopian birrs" - }, - "GBP": { - "symbol": "£", - "name": "British Pound Sterling", - "symbol_native": "£", - "decimal_digits": 2, - "rounding": 0, - "code": "GBP", - "name_plural": "British pounds sterling" - }, - "GEL": { - "symbol": "GEL", - "name": "Georgian Lari", - "symbol_native": "GEL", - "decimal_digits": 2, - "rounding": 0, - "code": "GEL", - "name_plural": "Georgian laris" - }, - "GHS": { - "symbol": "GH₵", - "name": "Ghanaian Cedi", - "symbol_native": "GH₵", - "decimal_digits": 2, - "rounding": 0, - "code": "GHS", - "name_plural": "Ghanaian cedis" - }, - "GNF": { - "symbol": "FG", - "name": "Guinean Franc", - "symbol_native": "FG", - "decimal_digits": 0, - "rounding": 0, - "code": "GNF", - "name_plural": "Guinean francs" - }, - "GTQ": { - "symbol": "GTQ", - "name": "Guatemalan Quetzal", - "symbol_native": "Q", - "decimal_digits": 2, - "rounding": 0, - "code": "GTQ", - "name_plural": "Guatemalan quetzals" - }, - "HKD": { - "symbol": "HK$", - "name": "Hong Kong Dollar", - "symbol_native": "$", - "decimal_digits": 2, - "rounding": 0, - "code": "HKD", - "name_plural": "Hong Kong dollars" - }, - "HNL": { - "symbol": "HNL", - "name": "Honduran Lempira", - "symbol_native": "L", - "decimal_digits": 2, - "rounding": 0, - "code": "HNL", - "name_plural": "Honduran lempiras" - }, - "HRK": { - "symbol": "kn", - "name": "Croatian Kuna", - "symbol_native": "kn", - "decimal_digits": 2, - "rounding": 0, - "code": "HRK", - "name_plural": "Croatian kunas" - }, - "HUF": { - "symbol": "Ft", - "name": "Hungarian Forint", - "symbol_native": "Ft", - "decimal_digits": 2, - "rounding": 0, - "code": "HUF", - "name_plural": "Hungarian forints" - }, - "IDR": { - "symbol": "Rp", - "name": "Indonesian Rupiah", - "symbol_native": "Rp", - "decimal_digits": 2, - "rounding": 0, - "code": "IDR", - "name_plural": "Indonesian rupiahs" - }, - "ILS": { - "symbol": "₪", - "name": "Israeli New Sheqel", - "symbol_native": "₪", - "decimal_digits": 2, - "rounding": 0, - "code": "ILS", - "name_plural": "Israeli new sheqels" - }, - "INR": { - "symbol": "₹", - "name": "Indian Rupee", - "symbol_native": "টকা", - "decimal_digits": 2, - "rounding": 0, - "code": "INR", - "name_plural": "Indian rupees" - }, - "IQD": { - "symbol": "IQD", - "name": "Iraqi Dinar", - "symbol_native": "د.ع.‏", - "decimal_digits": 3, - "rounding": 0, - "code": "IQD", - "name_plural": "Iraqi dinars" - }, - "IRR": { - "symbol": "IRR", - "name": "Iranian Rial", - "symbol_native": "﷼", - "decimal_digits": 2, - "rounding": 0, - "code": "IRR", - "name_plural": "Iranian rials" - }, - "ISK": { - "symbol": "Ikr", - "name": "Icelandic Króna", - "symbol_native": "kr", - "decimal_digits": 0, - "rounding": 0, - "code": "ISK", - "name_plural": "Icelandic krónur" - }, - "JMD": { - "symbol": "J$", - "name": "Jamaican Dollar", - "symbol_native": "$", - "decimal_digits": 2, - "rounding": 0, - "code": "JMD", - "name_plural": "Jamaican dollars" - }, - "JOD": { - "symbol": "JD", - "name": "Jordanian Dinar", - "symbol_native": "د.أ.‏", - "decimal_digits": 3, - "rounding": 0, - "code": "JOD", - "name_plural": "Jordanian dinars" - }, - "JPY": { - "symbol": "¥", - "name": "Japanese Yen", - "symbol_native": "¥", - "decimal_digits": 0, - "rounding": 0, - "code": "JPY", - "name_plural": "Japanese yen" - }, - "KES": { - "symbol": "Ksh", - "name": "Kenyan Shilling", - "symbol_native": "Ksh", - "decimal_digits": 2, - "rounding": 0, - "code": "KES", - "name_plural": "Kenyan shillings" - }, - "KHR": { - "symbol": "KHR", - "name": "Cambodian Riel", - "symbol_native": "៛", - "decimal_digits": 2, - "rounding": 0, - "code": "KHR", - "name_plural": "Cambodian riels" - }, - "KMF": { - "symbol": "CF", - "name": "Comorian Franc", - "symbol_native": "FC", - "decimal_digits": 0, - "rounding": 0, - "code": "KMF", - "name_plural": "Comorian francs" - }, - "KRW": { - "symbol": "₩", - "name": "South Korean Won", - "symbol_native": "₩", - "decimal_digits": 0, - "rounding": 0, - "code": "KRW", - "name_plural": "South Korean won" - }, - "KWD": { - "symbol": "KD", - "name": "Kuwaiti Dinar", - "symbol_native": "د.ك.‏", - "decimal_digits": 3, - "rounding": 0, - "code": "KWD", - "name_plural": "Kuwaiti dinars" - }, - "KZT": { - "symbol": "KZT", - "name": "Kazakhstani Tenge", - "symbol_native": "тңг.", - "decimal_digits": 2, - "rounding": 0, - "code": "KZT", - "name_plural": "Kazakhstani tenges" - }, - "LAK": { - "symbol": "₭", - "name": "Lao kip", - "symbol_native": "ກີບ", - "decimal_digits": 2, - "rounding": 0, - "code": "LAK", - "name_plural": "Lao kips" - }, - "LBP": { - "symbol": "LB£", - "name": "Lebanese Pound", - "symbol_native": "ل.ل.‏", - "decimal_digits": 2, - "rounding": 0, - "code": "LBP", - "name_plural": "Lebanese pounds" - }, - "LKR": { - "symbol": "SLRs", - "name": "Sri Lankan Rupee", - "symbol_native": "SL Re", - "decimal_digits": 2, - "rounding": 0, - "code": "LKR", - "name_plural": "Sri Lankan rupees" - }, - "LTL": { - "symbol": "Lt", - "name": "Lithuanian Litas", - "symbol_native": "Lt", - "decimal_digits": 2, - "rounding": 0, - "code": "LTL", - "name_plural": "Lithuanian litai" - }, - "LVL": { - "symbol": "Ls", - "name": "Latvian Lats", - "symbol_native": "Ls", - "decimal_digits": 2, - "rounding": 0, - "code": "LVL", - "name_plural": "Latvian lati" - }, - "LYD": { - "symbol": "LD", - "name": "Libyan Dinar", - "symbol_native": "د.ل.‏", - "decimal_digits": 3, - "rounding": 0, - "code": "LYD", - "name_plural": "Libyan dinars" - }, - "MAD": { - "symbol": "MAD", - "name": "Moroccan Dirham", - "symbol_native": "د.م.‏", - "decimal_digits": 2, - "rounding": 0, - "code": "MAD", - "name_plural": "Moroccan dirhams" - }, - "MDL": { - "symbol": "MDL", - "name": "Moldovan Leu", - "symbol_native": "MDL", - "decimal_digits": 2, - "rounding": 0, - "code": "MDL", - "name_plural": "Moldovan lei" - }, - "MGA": { - "symbol": "MGA", - "name": "Malagasy Ariary", - "symbol_native": "MGA", - "decimal_digits": 2, - "rounding": 0, - "code": "MGA", - "name_plural": "Malagasy Ariaries" - }, - "MKD": { - "symbol": "MKD", - "name": "Macedonian Denar", - "symbol_native": "MKD", - "decimal_digits": 2, - "rounding": 0, - "code": "MKD", - "name_plural": "Macedonian denari" - }, - "MMK": { - "symbol": "MMK", - "name": "Myanma Kyat", - "symbol_native": "K", - "decimal_digits": 2, - "rounding": 0, - "code": "MMK", - "name_plural": "Myanma kyats" - }, - "MOP": { - "symbol": "MOP$", - "name": "Macanese Pataca", - "symbol_native": "MOP$", - "decimal_digits": 2, - "rounding": 0, - "code": "MOP", - "name_plural": "Macanese patacas" - }, - "MUR": { - "symbol": "MURs", - "name": "Mauritian Rupee", - "symbol_native": "MURs", - "decimal_digits": 2, - "rounding": 0, - "code": "MUR", - "name_plural": "Mauritian rupees" - }, - "MXN": { - "symbol": "MX$", - "name": "Mexican Peso", - "symbol_native": "$", - "decimal_digits": 2, - "rounding": 0, - "code": "MXN", - "name_plural": "Mexican pesos" - }, - "MYR": { - "symbol": "RM", - "name": "Malaysian Ringgit", - "symbol_native": "RM", - "decimal_digits": 2, - "rounding": 0, - "code": "MYR", - "name_plural": "Malaysian ringgits" - }, - "MZN": { - "symbol": "MTn", - "name": "Mozambican Metical", - "symbol_native": "MTn", - "decimal_digits": 2, - "rounding": 0, - "code": "MZN", - "name_plural": "Mozambican meticals" - }, - "NAD": { - "symbol": "N$", - "name": "Namibian Dollar", - "symbol_native": "N$", - "decimal_digits": 2, - "rounding": 0, - "code": "NAD", - "name_plural": "Namibian dollars" - }, - "NGN": { - "symbol": "₦", - "name": "Nigerian Naira", - "symbol_native": "₦", - "decimal_digits": 2, - "rounding": 0, - "code": "NGN", - "name_plural": "Nigerian nairas" - }, - "NIO": { - "symbol": "C$", - "name": "Nicaraguan Córdoba", - "symbol_native": "C$", - "decimal_digits": 2, - "rounding": 0, - "code": "NIO", - "name_plural": "Nicaraguan córdobas" - }, - "NOK": { - "symbol": "Nkr", - "name": "Norwegian Krone", - "symbol_native": "kr", - "decimal_digits": 2, - "rounding": 0, - "code": "NOK", - "name_plural": "Norwegian kroner" - }, - "NPR": { - "symbol": "NPRs", - "name": "Nepalese Rupee", - "symbol_native": "नेरू", - "decimal_digits": 2, - "rounding": 0, - "code": "NPR", - "name_plural": "Nepalese rupees" - }, - "NZD": { - "symbol": "NZ$", - "name": "New Zealand Dollar", - "symbol_native": "$", - "decimal_digits": 2, - "rounding": 0, - "code": "NZD", - "name_plural": "New Zealand dollars" - }, - "OMR": { - "symbol": "OMR", - "name": "Omani Rial", - "symbol_native": "ر.ع.‏", - "decimal_digits": 3, - "rounding": 0, - "code": "OMR", - "name_plural": "Omani rials" - }, - "PAB": { - "symbol": "B/.", - "name": "Panamanian Balboa", - "symbol_native": "B/.", - "decimal_digits": 2, - "rounding": 0, - "code": "PAB", - "name_plural": "Panamanian balboas" - }, - "PEN": { - "symbol": "S/.", - "name": "Peruvian Nuevo Sol", - "symbol_native": "S/.", - "decimal_digits": 2, - "rounding": 0, - "code": "PEN", - "name_plural": "Peruvian nuevos soles" - }, - "PHP": { - "symbol": "₱", - "name": "Philippine Peso", - "symbol_native": "₱", - "decimal_digits": 2, - "rounding": 0, - "code": "PHP", - "name_plural": "Philippine pesos" - }, - "PKR": { - "symbol": "PKRs", - "name": "Pakistani Rupee", - "symbol_native": "₨", - "decimal_digits": 2, - "rounding": 0, - "code": "PKR", - "name_plural": "Pakistani rupees" - }, - "PLN": { - "symbol": "zł", - "name": "Polish Zloty", - "symbol_native": "zł", - "decimal_digits": 2, - "rounding": 0, - "code": "PLN", - "name_plural": "Polish zlotys" - }, - "PYG": { - "symbol": "₲", - "name": "Paraguayan Guarani", - "symbol_native": "₲", - "decimal_digits": 0, - "rounding": 0, - "code": "PYG", - "name_plural": "Paraguayan guaranis" - }, - "QAR": { - "symbol": "QR", - "name": "Qatari Rial", - "symbol_native": "ر.ق.‏", - "decimal_digits": 2, - "rounding": 0, - "code": "QAR", - "name_plural": "Qatari rials" - }, - "RON": { - "symbol": "RON", - "name": "Romanian Leu", - "symbol_native": "RON", - "decimal_digits": 2, - "rounding": 0, - "code": "RON", - "name_plural": "Romanian lei" - }, - "RSD": { - "symbol": "din.", - "name": "Serbian Dinar", - "symbol_native": "дин.", - "decimal_digits": 2, - "rounding": 0, - "code": "RSD", - "name_plural": "Serbian dinars" - }, - "RUB": { - "symbol": "RUB", - "name": "Russian Ruble", - "symbol_native": "₽", - "decimal_digits": 2, - "rounding": 0, - "code": "RUB", - "name_plural": "Russian rubles" - }, - "RWF": { - "symbol": "RWF", - "name": "Rwandan Franc", - "symbol_native": "FR", - "decimal_digits": 0, - "rounding": 0, - "code": "RWF", - "name_plural": "Rwandan francs" - }, - "SAR": { - "symbol": "SR", - "name": "Saudi Riyal", - "symbol_native": "ر.س.‏", - "decimal_digits": 2, - "rounding": 0, - "code": "SAR", - "name_plural": "Saudi riyals" - }, - "SDG": { - "symbol": "SDG", - "name": "Sudanese Pound", - "symbol_native": "SDG", - "decimal_digits": 2, - "rounding": 0, - "code": "SDG", - "name_plural": "Sudanese pounds" - }, - "SEK": { - "symbol": "Skr", - "name": "Swedish Krona", - "symbol_native": "kr", - "decimal_digits": 2, - "rounding": 0, - "code": "SEK", - "name_plural": "Swedish kronor" - }, - "SGD": { - "symbol": "S$", - "name": "Singapore Dollar", - "symbol_native": "$", - "decimal_digits": 2, - "rounding": 0, - "code": "SGD", - "name_plural": "Singapore dollars" - }, - "SOS": { - "symbol": "Ssh", - "name": "Somali Shilling", - "symbol_native": "Ssh", - "decimal_digits": 2, - "rounding": 0, - "code": "SOS", - "name_plural": "Somali shillings" - }, - "SYP": { - "symbol": "SY£", - "name": "Syrian Pound", - "symbol_native": "ل.س.‏", - "decimal_digits": 2, - "rounding": 0, - "code": "SYP", - "name_plural": "Syrian pounds" - }, - "THB": { - "symbol": "฿", - "name": "Thai Baht", - "symbol_native": "฿", - "decimal_digits": 2, - "rounding": 0, - "code": "THB", - "name_plural": "Thai baht" - }, - "TND": { - "symbol": "DT", - "name": "Tunisian Dinar", - "symbol_native": "د.ت.‏", - "decimal_digits": 3, - "rounding": 0, - "code": "TND", - "name_plural": "Tunisian dinars" - }, - "TOP": { - "symbol": "T$", - "name": "Tongan Paʻanga", - "symbol_native": "T$", - "decimal_digits": 2, - "rounding": 0, - "code": "TOP", - "name_plural": "Tongan paʻanga" - }, - "TRY": { - "symbol": "TL", - "name": "Turkish Lira", - "symbol_native": "TL", - "decimal_digits": 2, - "rounding": 0, - "code": "TRY", - "name_plural": "Turkish Lira" - }, - "TTD": { - "symbol": "TT$", - "name": "Trinidad and Tobago Dollar", - "symbol_native": "$", - "decimal_digits": 2, - "rounding": 0, - "code": "TTD", - "name_plural": "Trinidad and Tobago dollars" - }, - "TWD": { - "symbol": "NT$", - "name": "New Taiwan Dollar", - "symbol_native": "NT$", - "decimal_digits": 2, - "rounding": 0, - "code": "TWD", - "name_plural": "New Taiwan dollars" - }, - "TZS": { - "symbol": "TSh", - "name": "Tanzanian Shilling", - "symbol_native": "TSh", - "decimal_digits": 2, - "rounding": 0, - "code": "TZS", - "name_plural": "Tanzanian shillings" - }, - "UAH": { - "symbol": "₴", - "name": "Ukrainian Hryvnia", - "symbol_native": "₴", - "decimal_digits": 2, - "rounding": 0, - "code": "UAH", - "name_plural": "Ukrainian hryvnias" - }, - "UGX": { - "symbol": "USh", - "name": "Ugandan Shilling", - "symbol_native": "USh", - "decimal_digits": 0, - "rounding": 0, - "code": "UGX", - "name_plural": "Ugandan shillings" - }, - "UYU": { - "symbol": "$U", - "name": "Uruguayan Peso", - "symbol_native": "$", - "decimal_digits": 2, - "rounding": 0, - "code": "UYU", - "name_plural": "Uruguayan pesos" - }, - "UZS": { - "symbol": "UZS", - "name": "Uzbekistan Som", - "symbol_native": "UZS", - "decimal_digits": 2, - "rounding": 0, - "code": "UZS", - "name_plural": "Uzbekistan som" - }, - "VEF": { - "symbol": "Bs.F.", - "name": "Venezuelan Bolívar", - "symbol_native": "Bs.F.", - "decimal_digits": 2, - "rounding": 0, - "code": "VEF", - "name_plural": "Venezuelan bolívars" - }, - "VND": { - "symbol": "₫", - "name": "Vietnamese Dong", - "symbol_native": "₫", - "decimal_digits": 0, - "rounding": 0, - "code": "VND", - "name_plural": "Vietnamese dong" - }, - "XAF": { - "symbol": "FCFA", - "name": "CFA Franc BEAC", - "symbol_native": "FCFA", - "decimal_digits": 0, - "rounding": 0, - "code": "XAF", - "name_plural": "CFA francs BEAC" - }, - "XOF": { - "symbol": "CFA", - "name": "CFA Franc BCEAO", - "symbol_native": "CFA", - "decimal_digits": 0, - "rounding": 0, - "code": "XOF", - "name_plural": "CFA francs BCEAO" - }, - "YER": { - "symbol": "YR", - "name": "Yemeni Rial", - "symbol_native": "ر.ي.‏", - "decimal_digits": 2, - "rounding": 0, - "code": "YER", - "name_plural": "Yemeni rials" - }, - "ZAR": { - "symbol": "R", - "name": "South African Rand", - "symbol_native": "R", - "decimal_digits": 2, - "rounding": 0, - "code": "ZAR", - "name_plural": "South African rand" - }, - "ZMK": { - "symbol": "ZK", - "name": "Zambian Kwacha", - "symbol_native": "ZK", - "decimal_digits": 0, - "rounding": 0, - "code": "ZMK", - "name_plural": "Zambian kwachas" - } + USD: { + symbol: '$', + name: 'US Dollar', + symbol_native: '$', + decimal_digits: 2, + rounding: 0, + code: 'USD', + name_plural: 'US dollars', + }, + CAD: { + symbol: 'CA$', + name: 'Canadian Dollar', + symbol_native: '$', + decimal_digits: 2, + rounding: 0, + code: 'CAD', + name_plural: 'Canadian dollars', + }, + EUR: { + symbol: '€', + name: 'Euro', + symbol_native: '€', + decimal_digits: 2, + rounding: 0, + code: 'EUR', + name_plural: 'euros', + }, + BTC: { + symbol: 'BTC', + name: 'Bitcoin', + symbol_native: '฿', + decimal_digits: 8, + rounding: 0, + code: 'BTC', + name_plural: 'Bitcoins', + }, + AED: { + symbol: 'AED', + name: 'United Arab Emirates Dirham', + symbol_native: 'د.إ.‏', + decimal_digits: 2, + rounding: 0, + code: 'AED', + name_plural: 'UAE dirhams', + }, + AFN: { + symbol: 'Af', + name: 'Afghan Afghani', + symbol_native: '؋', + decimal_digits: 2, + rounding: 0, + code: 'AFN', + name_plural: 'Afghan Afghanis', + }, + ALL: { + symbol: 'ALL', + name: 'Albanian Lek', + symbol_native: 'Lek', + decimal_digits: 2, + rounding: 0, + code: 'ALL', + name_plural: 'Albanian lekë', + }, + AMD: { + symbol: 'AMD', + name: 'Armenian Dram', + symbol_native: 'դր.', + decimal_digits: 2, + rounding: 0, + code: 'AMD', + name_plural: 'Armenian drams', + }, + ARS: { + symbol: 'AR$', + name: 'Argentine Peso', + symbol_native: '$', + decimal_digits: 2, + rounding: 0, + code: 'ARS', + name_plural: 'Argentine pesos', + }, + AUD: { + symbol: 'AU$', + name: 'Australian Dollar', + symbol_native: '$', + decimal_digits: 2, + rounding: 0, + code: 'AUD', + name_plural: 'Australian dollars', + }, + AZN: { + symbol: 'man.', + name: 'Azerbaijani Manat', + symbol_native: 'ман.', + decimal_digits: 2, + rounding: 0, + code: 'AZN', + name_plural: 'Azerbaijani manats', + }, + BAM: { + symbol: 'KM', + name: 'Bosnia-Herzegovina Convertible Mark', + symbol_native: 'KM', + decimal_digits: 2, + rounding: 0, + code: 'BAM', + name_plural: 'Bosnia-Herzegovina convertible marks', + }, + BDT: { + symbol: 'Tk', + name: 'Bangladeshi Taka', + symbol_native: '৳', + decimal_digits: 2, + rounding: 0, + code: 'BDT', + name_plural: 'Bangladeshi takas', + }, + BGN: { + symbol: 'BGN', + name: 'Bulgarian Lev', + symbol_native: 'лв.', + decimal_digits: 2, + rounding: 0, + code: 'BGN', + name_plural: 'Bulgarian leva', + }, + BHD: { + symbol: 'BD', + name: 'Bahraini Dinar', + symbol_native: 'د.ب.‏', + decimal_digits: 3, + rounding: 0, + code: 'BHD', + name_plural: 'Bahraini dinars', + }, + BIF: { + symbol: 'FBu', + name: 'Burundian Franc', + symbol_native: 'FBu', + decimal_digits: 0, + rounding: 0, + code: 'BIF', + name_plural: 'Burundian francs', + }, + BND: { + symbol: 'BN$', + name: 'Brunei Dollar', + symbol_native: '$', + decimal_digits: 2, + rounding: 0, + code: 'BND', + name_plural: 'Brunei dollars', + }, + BOB: { + symbol: 'Bs', + name: 'Bolivian Boliviano', + symbol_native: 'Bs', + decimal_digits: 2, + rounding: 0, + code: 'BOB', + name_plural: 'Bolivian bolivianos', + }, + BRL: { + symbol: 'R$', + name: 'Brazilian Real', + symbol_native: 'R$', + decimal_digits: 2, + rounding: 0, + code: 'BRL', + name_plural: 'Brazilian reals', + }, + BWP: { + symbol: 'BWP', + name: 'Botswanan Pula', + symbol_native: 'P', + decimal_digits: 2, + rounding: 0, + code: 'BWP', + name_plural: 'Botswanan pulas', + }, + BYR: { + symbol: 'BYR', + name: 'Belarusian Ruble', + symbol_native: 'BYR', + decimal_digits: 0, + rounding: 0, + code: 'BYR', + name_plural: 'Belarusian rubles', + }, + BZD: { + symbol: 'BZ$', + name: 'Belize Dollar', + symbol_native: '$', + decimal_digits: 2, + rounding: 0, + code: 'BZD', + name_plural: 'Belize dollars', + }, + CDF: { + symbol: 'CDF', + name: 'Congolese Franc', + symbol_native: 'FrCD', + decimal_digits: 2, + rounding: 0, + code: 'CDF', + name_plural: 'Congolese francs', + }, + CHF: { + symbol: 'CHF', + name: 'Swiss Franc', + symbol_native: 'CHF', + decimal_digits: 2, + rounding: 0.05, + code: 'CHF', + name_plural: 'Swiss francs', + }, + CLP: { + symbol: 'CL$', + name: 'Chilean Peso', + symbol_native: '$', + decimal_digits: 0, + rounding: 0, + code: 'CLP', + name_plural: 'Chilean pesos', + }, + CNY: { + symbol: 'CN¥', + name: 'Chinese Yuan', + symbol_native: 'CN¥', + decimal_digits: 2, + rounding: 0, + code: 'CNY', + name_plural: 'Chinese yuan', + }, + COP: { + symbol: 'CO$', + name: 'Colombian Peso', + symbol_native: '$', + decimal_digits: 2, + rounding: 0, + code: 'COP', + name_plural: 'Colombian pesos', + }, + CRC: { + symbol: '₡', + name: 'Costa Rican Colón', + symbol_native: '₡', + decimal_digits: 2, + rounding: 0, + code: 'CRC', + name_plural: 'Costa Rican colóns', + }, + CVE: { + symbol: 'CV$', + name: 'Cape Verdean Escudo', + symbol_native: 'CV$', + decimal_digits: 2, + rounding: 0, + code: 'CVE', + name_plural: 'Cape Verdean escudos', + }, + CZK: { + symbol: 'Kč', + name: 'Czech Republic Koruna', + symbol_native: 'Kč', + decimal_digits: 2, + rounding: 0, + code: 'CZK', + name_plural: 'Czech Republic korunas', + }, + DJF: { + symbol: 'Fdj', + name: 'Djiboutian Franc', + symbol_native: 'Fdj', + decimal_digits: 0, + rounding: 0, + code: 'DJF', + name_plural: 'Djiboutian francs', + }, + DKK: { + symbol: 'Dkr', + name: 'Danish Krone', + symbol_native: 'kr', + decimal_digits: 2, + rounding: 0, + code: 'DKK', + name_plural: 'Danish kroner', + }, + DOP: { + symbol: 'RD$', + name: 'Dominican Peso', + symbol_native: 'RD$', + decimal_digits: 2, + rounding: 0, + code: 'DOP', + name_plural: 'Dominican pesos', + }, + DZD: { + symbol: 'DA', + name: 'Algerian Dinar', + symbol_native: 'د.ج.‏', + decimal_digits: 2, + rounding: 0, + code: 'DZD', + name_plural: 'Algerian dinars', + }, + EEK: { + symbol: 'Ekr', + name: 'Estonian Kroon', + symbol_native: 'kr', + decimal_digits: 2, + rounding: 0, + code: 'EEK', + name_plural: 'Estonian kroons', + }, + EGP: { + symbol: 'EGP', + name: 'Egyptian Pound', + symbol_native: 'ج.م.‏', + decimal_digits: 2, + rounding: 0, + code: 'EGP', + name_plural: 'Egyptian pounds', + }, + ERN: { + symbol: 'Nfk', + name: 'Eritrean Nakfa', + symbol_native: 'Nfk', + decimal_digits: 2, + rounding: 0, + code: 'ERN', + name_plural: 'Eritrean nakfas', + }, + ETB: { + symbol: 'Br', + name: 'Ethiopian Birr', + symbol_native: 'Br', + decimal_digits: 2, + rounding: 0, + code: 'ETB', + name_plural: 'Ethiopian birrs', + }, + GBP: { + symbol: '£', + name: 'British Pound Sterling', + symbol_native: '£', + decimal_digits: 2, + rounding: 0, + code: 'GBP', + name_plural: 'British pounds sterling', + }, + GEL: { + symbol: 'GEL', + name: 'Georgian Lari', + symbol_native: 'GEL', + decimal_digits: 2, + rounding: 0, + code: 'GEL', + name_plural: 'Georgian laris', + }, + GHS: { + symbol: 'GH₵', + name: 'Ghanaian Cedi', + symbol_native: 'GH₵', + decimal_digits: 2, + rounding: 0, + code: 'GHS', + name_plural: 'Ghanaian cedis', + }, + GNF: { + symbol: 'FG', + name: 'Guinean Franc', + symbol_native: 'FG', + decimal_digits: 0, + rounding: 0, + code: 'GNF', + name_plural: 'Guinean francs', + }, + GTQ: { + symbol: 'GTQ', + name: 'Guatemalan Quetzal', + symbol_native: 'Q', + decimal_digits: 2, + rounding: 0, + code: 'GTQ', + name_plural: 'Guatemalan quetzals', + }, + HKD: { + symbol: 'HK$', + name: 'Hong Kong Dollar', + symbol_native: '$', + decimal_digits: 2, + rounding: 0, + code: 'HKD', + name_plural: 'Hong Kong dollars', + }, + HNL: { + symbol: 'HNL', + name: 'Honduran Lempira', + symbol_native: 'L', + decimal_digits: 2, + rounding: 0, + code: 'HNL', + name_plural: 'Honduran lempiras', + }, + HRK: { + symbol: 'kn', + name: 'Croatian Kuna', + symbol_native: 'kn', + decimal_digits: 2, + rounding: 0, + code: 'HRK', + name_plural: 'Croatian kunas', + }, + HUF: { + symbol: 'Ft', + name: 'Hungarian Forint', + symbol_native: 'Ft', + decimal_digits: 2, + rounding: 0, + code: 'HUF', + name_plural: 'Hungarian forints', + }, + IDR: { + symbol: 'Rp', + name: 'Indonesian Rupiah', + symbol_native: 'Rp', + decimal_digits: 2, + rounding: 0, + code: 'IDR', + name_plural: 'Indonesian rupiahs', + }, + ILS: { + symbol: '₪', + name: 'Israeli New Sheqel', + symbol_native: '₪', + decimal_digits: 2, + rounding: 0, + code: 'ILS', + name_plural: 'Israeli new sheqels', + }, + INR: { + symbol: '₹', + name: 'Indian Rupee', + symbol_native: 'টকা', + decimal_digits: 2, + rounding: 0, + code: 'INR', + name_plural: 'Indian rupees', + }, + IQD: { + symbol: 'IQD', + name: 'Iraqi Dinar', + symbol_native: 'د.ع.‏', + decimal_digits: 3, + rounding: 0, + code: 'IQD', + name_plural: 'Iraqi dinars', + }, + IRR: { + symbol: 'IRR', + name: 'Iranian Rial', + symbol_native: '﷼', + decimal_digits: 2, + rounding: 0, + code: 'IRR', + name_plural: 'Iranian rials', + }, + ISK: { + symbol: 'Ikr', + name: 'Icelandic Króna', + symbol_native: 'kr', + decimal_digits: 0, + rounding: 0, + code: 'ISK', + name_plural: 'Icelandic krónur', + }, + JMD: { + symbol: 'J$', + name: 'Jamaican Dollar', + symbol_native: '$', + decimal_digits: 2, + rounding: 0, + code: 'JMD', + name_plural: 'Jamaican dollars', + }, + JOD: { + symbol: 'JD', + name: 'Jordanian Dinar', + symbol_native: 'د.أ.‏', + decimal_digits: 3, + rounding: 0, + code: 'JOD', + name_plural: 'Jordanian dinars', + }, + JPY: { + symbol: '¥', + name: 'Japanese Yen', + symbol_native: '¥', + decimal_digits: 0, + rounding: 0, + code: 'JPY', + name_plural: 'Japanese yen', + }, + KES: { + symbol: 'Ksh', + name: 'Kenyan Shilling', + symbol_native: 'Ksh', + decimal_digits: 2, + rounding: 0, + code: 'KES', + name_plural: 'Kenyan shillings', + }, + KHR: { + symbol: 'KHR', + name: 'Cambodian Riel', + symbol_native: '៛', + decimal_digits: 2, + rounding: 0, + code: 'KHR', + name_plural: 'Cambodian riels', + }, + KMF: { + symbol: 'CF', + name: 'Comorian Franc', + symbol_native: 'FC', + decimal_digits: 0, + rounding: 0, + code: 'KMF', + name_plural: 'Comorian francs', + }, + KRW: { + symbol: '₩', + name: 'South Korean Won', + symbol_native: '₩', + decimal_digits: 0, + rounding: 0, + code: 'KRW', + name_plural: 'South Korean won', + }, + KWD: { + symbol: 'KD', + name: 'Kuwaiti Dinar', + symbol_native: 'د.ك.‏', + decimal_digits: 3, + rounding: 0, + code: 'KWD', + name_plural: 'Kuwaiti dinars', + }, + KZT: { + symbol: 'KZT', + name: 'Kazakhstani Tenge', + symbol_native: 'тңг.', + decimal_digits: 2, + rounding: 0, + code: 'KZT', + name_plural: 'Kazakhstani tenges', + }, + LAK: { + symbol: '₭', + name: 'Lao kip', + symbol_native: 'ກີບ', + decimal_digits: 2, + rounding: 0, + code: 'LAK', + name_plural: 'Lao kips', + }, + LBP: { + symbol: 'LB£', + name: 'Lebanese Pound', + symbol_native: 'ل.ل.‏', + decimal_digits: 2, + rounding: 0, + code: 'LBP', + name_plural: 'Lebanese pounds', + }, + LKR: { + symbol: 'SLRs', + name: 'Sri Lankan Rupee', + symbol_native: 'SL Re', + decimal_digits: 2, + rounding: 0, + code: 'LKR', + name_plural: 'Sri Lankan rupees', + }, + LTL: { + symbol: 'Lt', + name: 'Lithuanian Litas', + symbol_native: 'Lt', + decimal_digits: 2, + rounding: 0, + code: 'LTL', + name_plural: 'Lithuanian litai', + }, + LVL: { + symbol: 'Ls', + name: 'Latvian Lats', + symbol_native: 'Ls', + decimal_digits: 2, + rounding: 0, + code: 'LVL', + name_plural: 'Latvian lati', + }, + LYD: { + symbol: 'LD', + name: 'Libyan Dinar', + symbol_native: 'د.ل.‏', + decimal_digits: 3, + rounding: 0, + code: 'LYD', + name_plural: 'Libyan dinars', + }, + MAD: { + symbol: 'MAD', + name: 'Moroccan Dirham', + symbol_native: 'د.م.‏', + decimal_digits: 2, + rounding: 0, + code: 'MAD', + name_plural: 'Moroccan dirhams', + }, + MDL: { + symbol: 'MDL', + name: 'Moldovan Leu', + symbol_native: 'MDL', + decimal_digits: 2, + rounding: 0, + code: 'MDL', + name_plural: 'Moldovan lei', + }, + MGA: { + symbol: 'MGA', + name: 'Malagasy Ariary', + symbol_native: 'MGA', + decimal_digits: 2, + rounding: 0, + code: 'MGA', + name_plural: 'Malagasy Ariaries', + }, + MKD: { + symbol: 'MKD', + name: 'Macedonian Denar', + symbol_native: 'MKD', + decimal_digits: 2, + rounding: 0, + code: 'MKD', + name_plural: 'Macedonian denari', + }, + MMK: { + symbol: 'MMK', + name: 'Myanma Kyat', + symbol_native: 'K', + decimal_digits: 2, + rounding: 0, + code: 'MMK', + name_plural: 'Myanma kyats', + }, + MOP: { + symbol: 'MOP$', + name: 'Macanese Pataca', + symbol_native: 'MOP$', + decimal_digits: 2, + rounding: 0, + code: 'MOP', + name_plural: 'Macanese patacas', + }, + MUR: { + symbol: 'MURs', + name: 'Mauritian Rupee', + symbol_native: 'MURs', + decimal_digits: 2, + rounding: 0, + code: 'MUR', + name_plural: 'Mauritian rupees', + }, + MXN: { + symbol: 'MX$', + name: 'Mexican Peso', + symbol_native: '$', + decimal_digits: 2, + rounding: 0, + code: 'MXN', + name_plural: 'Mexican pesos', + }, + MYR: { + symbol: 'RM', + name: 'Malaysian Ringgit', + symbol_native: 'RM', + decimal_digits: 2, + rounding: 0, + code: 'MYR', + name_plural: 'Malaysian ringgits', + }, + MZN: { + symbol: 'MTn', + name: 'Mozambican Metical', + symbol_native: 'MTn', + decimal_digits: 2, + rounding: 0, + code: 'MZN', + name_plural: 'Mozambican meticals', + }, + NAD: { + symbol: 'N$', + name: 'Namibian Dollar', + symbol_native: 'N$', + decimal_digits: 2, + rounding: 0, + code: 'NAD', + name_plural: 'Namibian dollars', + }, + NGN: { + symbol: '₦', + name: 'Nigerian Naira', + symbol_native: '₦', + decimal_digits: 2, + rounding: 0, + code: 'NGN', + name_plural: 'Nigerian nairas', + }, + NIO: { + symbol: 'C$', + name: 'Nicaraguan Córdoba', + symbol_native: 'C$', + decimal_digits: 2, + rounding: 0, + code: 'NIO', + name_plural: 'Nicaraguan córdobas', + }, + NOK: { + symbol: 'Nkr', + name: 'Norwegian Krone', + symbol_native: 'kr', + decimal_digits: 2, + rounding: 0, + code: 'NOK', + name_plural: 'Norwegian kroner', + }, + NPR: { + symbol: 'NPRs', + name: 'Nepalese Rupee', + symbol_native: 'नेरू', + decimal_digits: 2, + rounding: 0, + code: 'NPR', + name_plural: 'Nepalese rupees', + }, + NZD: { + symbol: 'NZ$', + name: 'New Zealand Dollar', + symbol_native: '$', + decimal_digits: 2, + rounding: 0, + code: 'NZD', + name_plural: 'New Zealand dollars', + }, + OMR: { + symbol: 'OMR', + name: 'Omani Rial', + symbol_native: 'ر.ع.‏', + decimal_digits: 3, + rounding: 0, + code: 'OMR', + name_plural: 'Omani rials', + }, + PAB: { + symbol: 'B/.', + name: 'Panamanian Balboa', + symbol_native: 'B/.', + decimal_digits: 2, + rounding: 0, + code: 'PAB', + name_plural: 'Panamanian balboas', + }, + PEN: { + symbol: 'S/.', + name: 'Peruvian Nuevo Sol', + symbol_native: 'S/.', + decimal_digits: 2, + rounding: 0, + code: 'PEN', + name_plural: 'Peruvian nuevos soles', + }, + PHP: { + symbol: '₱', + name: 'Philippine Peso', + symbol_native: '₱', + decimal_digits: 2, + rounding: 0, + code: 'PHP', + name_plural: 'Philippine pesos', + }, + PKR: { + symbol: 'PKRs', + name: 'Pakistani Rupee', + symbol_native: '₨', + decimal_digits: 2, + rounding: 0, + code: 'PKR', + name_plural: 'Pakistani rupees', + }, + PLN: { + symbol: 'zł', + name: 'Polish Zloty', + symbol_native: 'zł', + decimal_digits: 2, + rounding: 0, + code: 'PLN', + name_plural: 'Polish zlotys', + }, + PYG: { + symbol: '₲', + name: 'Paraguayan Guarani', + symbol_native: '₲', + decimal_digits: 0, + rounding: 0, + code: 'PYG', + name_plural: 'Paraguayan guaranis', + }, + QAR: { + symbol: 'QR', + name: 'Qatari Rial', + symbol_native: 'ر.ق.‏', + decimal_digits: 2, + rounding: 0, + code: 'QAR', + name_plural: 'Qatari rials', + }, + RON: { + symbol: 'RON', + name: 'Romanian Leu', + symbol_native: 'RON', + decimal_digits: 2, + rounding: 0, + code: 'RON', + name_plural: 'Romanian lei', + }, + RSD: { + symbol: 'din.', + name: 'Serbian Dinar', + symbol_native: 'дин.', + decimal_digits: 2, + rounding: 0, + code: 'RSD', + name_plural: 'Serbian dinars', + }, + RUB: { + symbol: 'RUB', + name: 'Russian Ruble', + symbol_native: '₽', + decimal_digits: 2, + rounding: 0, + code: 'RUB', + name_plural: 'Russian rubles', + }, + RWF: { + symbol: 'RWF', + name: 'Rwandan Franc', + symbol_native: 'FR', + decimal_digits: 0, + rounding: 0, + code: 'RWF', + name_plural: 'Rwandan francs', + }, + SAR: { + symbol: 'SR', + name: 'Saudi Riyal', + symbol_native: 'ر.س.‏', + decimal_digits: 2, + rounding: 0, + code: 'SAR', + name_plural: 'Saudi riyals', + }, + SDG: { + symbol: 'SDG', + name: 'Sudanese Pound', + symbol_native: 'SDG', + decimal_digits: 2, + rounding: 0, + code: 'SDG', + name_plural: 'Sudanese pounds', + }, + SEK: { + symbol: 'Skr', + name: 'Swedish Krona', + symbol_native: 'kr', + decimal_digits: 2, + rounding: 0, + code: 'SEK', + name_plural: 'Swedish kronor', + }, + SGD: { + symbol: 'S$', + name: 'Singapore Dollar', + symbol_native: '$', + decimal_digits: 2, + rounding: 0, + code: 'SGD', + name_plural: 'Singapore dollars', + }, + SOS: { + symbol: 'Ssh', + name: 'Somali Shilling', + symbol_native: 'Ssh', + decimal_digits: 2, + rounding: 0, + code: 'SOS', + name_plural: 'Somali shillings', + }, + SYP: { + symbol: 'SY£', + name: 'Syrian Pound', + symbol_native: 'ل.س.‏', + decimal_digits: 2, + rounding: 0, + code: 'SYP', + name_plural: 'Syrian pounds', + }, + THB: { + symbol: '฿', + name: 'Thai Baht', + symbol_native: '฿', + decimal_digits: 2, + rounding: 0, + code: 'THB', + name_plural: 'Thai baht', + }, + TND: { + symbol: 'DT', + name: 'Tunisian Dinar', + symbol_native: 'د.ت.‏', + decimal_digits: 3, + rounding: 0, + code: 'TND', + name_plural: 'Tunisian dinars', + }, + TOP: { + symbol: 'T$', + name: 'Tongan Paʻanga', + symbol_native: 'T$', + decimal_digits: 2, + rounding: 0, + code: 'TOP', + name_plural: 'Tongan paʻanga', + }, + TRY: { + symbol: 'TL', + name: 'Turkish Lira', + symbol_native: 'TL', + decimal_digits: 2, + rounding: 0, + code: 'TRY', + name_plural: 'Turkish Lira', + }, + TTD: { + symbol: 'TT$', + name: 'Trinidad and Tobago Dollar', + symbol_native: '$', + decimal_digits: 2, + rounding: 0, + code: 'TTD', + name_plural: 'Trinidad and Tobago dollars', + }, + TWD: { + symbol: 'NT$', + name: 'New Taiwan Dollar', + symbol_native: 'NT$', + decimal_digits: 2, + rounding: 0, + code: 'TWD', + name_plural: 'New Taiwan dollars', + }, + TZS: { + symbol: 'TSh', + name: 'Tanzanian Shilling', + symbol_native: 'TSh', + decimal_digits: 2, + rounding: 0, + code: 'TZS', + name_plural: 'Tanzanian shillings', + }, + UAH: { + symbol: '₴', + name: 'Ukrainian Hryvnia', + symbol_native: '₴', + decimal_digits: 2, + rounding: 0, + code: 'UAH', + name_plural: 'Ukrainian hryvnias', + }, + UGX: { + symbol: 'USh', + name: 'Ugandan Shilling', + symbol_native: 'USh', + decimal_digits: 0, + rounding: 0, + code: 'UGX', + name_plural: 'Ugandan shillings', + }, + UYU: { + symbol: '$U', + name: 'Uruguayan Peso', + symbol_native: '$', + decimal_digits: 2, + rounding: 0, + code: 'UYU', + name_plural: 'Uruguayan pesos', + }, + UZS: { + symbol: 'UZS', + name: 'Uzbekistan Som', + symbol_native: 'UZS', + decimal_digits: 2, + rounding: 0, + code: 'UZS', + name_plural: 'Uzbekistan som', + }, + VEF: { + symbol: 'Bs.F.', + name: 'Venezuelan Bolívar', + symbol_native: 'Bs.F.', + decimal_digits: 2, + rounding: 0, + code: 'VEF', + name_plural: 'Venezuelan bolívars', + }, + VND: { + symbol: '₫', + name: 'Vietnamese Dong', + symbol_native: '₫', + decimal_digits: 0, + rounding: 0, + code: 'VND', + name_plural: 'Vietnamese dong', + }, + XAF: { + symbol: 'FCFA', + name: 'CFA Franc BEAC', + symbol_native: 'FCFA', + decimal_digits: 0, + rounding: 0, + code: 'XAF', + name_plural: 'CFA francs BEAC', + }, + XOF: { + symbol: 'CFA', + name: 'CFA Franc BCEAO', + symbol_native: 'CFA', + decimal_digits: 0, + rounding: 0, + code: 'XOF', + name_plural: 'CFA francs BCEAO', + }, + YER: { + symbol: 'YR', + name: 'Yemeni Rial', + symbol_native: 'ر.ي.‏', + decimal_digits: 2, + rounding: 0, + code: 'YER', + name_plural: 'Yemeni rials', + }, + ZAR: { + symbol: 'R', + name: 'South African Rand', + symbol_native: 'R', + decimal_digits: 2, + rounding: 0, + code: 'ZAR', + name_plural: 'South African rand', + }, + ZMK: { + symbol: 'ZK', + name: 'Zambian Kwacha', + symbol_native: 'ZK', + decimal_digits: 0, + rounding: 0, + code: 'ZMK', + name_plural: 'Zambian kwachas', + }, } From 25ffa12937b0b87af63efe9339b9edb7a9fb823a Mon Sep 17 00:00:00 2001 From: Brad Ito Date: Tue, 28 Jan 2025 15:18:33 -0800 Subject: [PATCH 06/20] update list of currencies using CandisIO/ts-money --- src/lib/currencies.ts | 656 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 643 insertions(+), 13 deletions(-) diff --git a/src/lib/currencies.ts b/src/lib/currencies.ts index 9aee6a1..b6cb0b1 100644 --- a/src/lib/currencies.ts +++ b/src/lib/currencies.ts @@ -1,8 +1,8 @@ -import { Currency } from './currency' +import { Currency } from './currency'; export const Currencies: Record = { USD: { - symbol: '$', + symbol: 'US$', name: 'US Dollar', symbol_native: '$', decimal_digits: 2, @@ -73,6 +73,24 @@ export const Currencies: Record = { code: 'AMD', name_plural: 'Armenian drams', }, + ANG: { + symbol: 'ƒ', + name: 'Netherlands Antilles Guilder', + symbol_native: 'ƒ', + decimal_digits: 2, + rounding: 0, + code: 'ANG', + name_plural: 'Netherlands Antilles Guilder', + }, + AOA: { + symbol: 'Kz', + name: 'Angolan kwanza', + symbol_native: 'Kz', + decimal_digits: 2, + rounding: 0, + code: 'AOA', + name_plural: 'Angolan kwanza', + }, ARS: { symbol: 'AR$', name: 'Argentine Peso', @@ -91,6 +109,24 @@ export const Currencies: Record = { code: 'AUD', name_plural: 'Australian dollars', }, + AWG: { + symbol: 'ƒ', + name: 'Aruban Guilder', + symbol_native: 'ƒ', + decimal_digits: 2, + rounding: 0, + code: 'AWG', + name_plural: 'Aruban Guilders', + }, + AFL: { + symbol: 'Afl.', + name: 'Aruban Florin', + symbol_native: 'Afl.', + decimal_digits: 2, + rounding: 0, + code: 'AFL', + name_plural: 'Aruban Florins', + }, AZN: { symbol: 'man.', name: 'Azerbaijani Manat', @@ -118,6 +154,15 @@ export const Currencies: Record = { code: 'BDT', name_plural: 'Bangladeshi takas', }, + BBD: { + symbol: 'Bds$', + name: 'Barbados dollar', + symbol_native: '$', + decimal_digits: 2, + rounding: 0, + code: 'BBD', + name_plural: 'Barbados dollar', + }, BGN: { symbol: 'BGN', name: 'Bulgarian Lev', @@ -145,6 +190,24 @@ export const Currencies: Record = { code: 'BIF', name_plural: 'Burundian francs', }, + BSD: { + symbol: '$', + name: 'Bahamas Dollar', + symbol_native: '$', + decimal_digits: 2, + rounding: 0, + code: 'BSD', + name_plural: 'Bahamas Dollar', + }, + BMD: { + symbol: '$', + name: 'Bermuda Dollar', + symbol_native: '$', + decimal_digits: 2, + rounding: 0, + code: 'BMD', + name_plural: 'Bermuda Dollars', + }, BND: { symbol: 'BN$', name: 'Brunei Dollar', @@ -163,6 +226,15 @@ export const Currencies: Record = { code: 'BOB', name_plural: 'Bolivian bolivianos', }, + BOV: { + symbol: '-', + name: 'Bolivian Mvdol', + symbol_native: '-', + decimal_digits: 2, + rounding: 0, + code: 'BOV', + name_plural: 'Bolivian Mvdol', + }, BRL: { symbol: 'R$', name: 'Brazilian Real', @@ -172,6 +244,15 @@ export const Currencies: Record = { code: 'BRL', name_plural: 'Brazilian reals', }, + BTN: { + symbol: 'Nu.', + name: 'Bhutanese ngultrum', + symbol_native: 'Nu.', + decimal_digits: 2, + rounding: 0, + code: 'BTN', + name_plural: 'Bhutanese ngultrum', + }, BWP: { symbol: 'BWP', name: 'Botswanan Pula', @@ -181,13 +262,13 @@ export const Currencies: Record = { code: 'BWP', name_plural: 'Botswanan pulas', }, - BYR: { - symbol: 'BYR', + BYN: { + symbol: 'Br', name: 'Belarusian Ruble', - symbol_native: 'BYR', + symbol_native: 'Br', decimal_digits: 0, rounding: 0, - code: 'BYR', + code: 'BYN', name_plural: 'Belarusian rubles', }, BZD: { @@ -208,6 +289,15 @@ export const Currencies: Record = { code: 'CDF', name_plural: 'Congolese francs', }, + CHE: { + symbol: '-', + name: 'WIR Euro (complementary currency)', + symbol_native: '-', + decimal_digits: 2, + rounding: 0, + code: 'CHE', + name_plural: 'WIR Euros (complementary currency)', + }, CHF: { symbol: 'CHF', name: 'Swiss Franc', @@ -217,6 +307,24 @@ export const Currencies: Record = { code: 'CHF', name_plural: 'Swiss francs', }, + CHW: { + symbol: '-', + name: 'WIR Franc (complementary currency)', + symbol_native: '-', + decimal_digits: 2, + rounding: 0, + code: 'CHW', + name_plural: 'WIR Franc (complementary currency)', + }, + CLF: { + symbol: 'UF', + name: 'Unidad de Fomento (funds code)', + symbol_native: 'UF', + decimal_digits: 4, + rounding: 0, + code: 'CLF', + name_plural: 'Unidad de Fomento (funds code)', + }, CLP: { symbol: 'CL$', name: 'Chilean Peso', @@ -239,11 +347,20 @@ export const Currencies: Record = { symbol: 'CO$', name: 'Colombian Peso', symbol_native: '$', - decimal_digits: 2, + decimal_digits: 0, rounding: 0, code: 'COP', name_plural: 'Colombian pesos', }, + COU: { + symbol: '-', + name: 'Unidad de Valor Real (UVR) (funds code)', + symbol_native: '-', + decimal_digits: 2, + rounding: 0, + code: 'COU', + name_plural: 'Unidad de Valor Real (UVR) (funds code)', + }, CRC: { symbol: '₡', name: 'Costa Rican Colón', @@ -253,11 +370,29 @@ export const Currencies: Record = { code: 'CRC', name_plural: 'Costa Rican colóns', }, + CUC: { + symbol: 'CUC$', + name: 'Cuban convertible peso', + symbol_native: '$', + decimal_digits: 2, + rounding: 0, + code: 'CUC', + name_plural: 'Cuban convertible pesos', + }, + CUP: { + symbol: '₱', + name: 'Cuba Peso', + symbol_native: '₱', + decimal_digits: 0, + rounding: 0, + code: 'CUP', + name_plural: 'Cuba Pesos', + }, CVE: { symbol: 'CV$', name: 'Cape Verdean Escudo', symbol_native: 'CV$', - decimal_digits: 2, + decimal_digits: 0, rounding: 0, code: 'CVE', name_plural: 'Cape Verdean escudos', @@ -343,6 +478,24 @@ export const Currencies: Record = { code: 'ETB', name_plural: 'Ethiopian birrs', }, + FJD: { + symbol: '$', + name: 'Fiji Dollar', + symbol_native: '$', + decimal_digits: 2, + rounding: 0, + code: 'FJD', + name_plural: 'Fiji Dollars', + }, + FKP: { + symbol: '£', + name: 'Falkland Islands (Malvinas) Pound', + symbol_native: '£', + decimal_digits: 2, + rounding: 0, + code: 'FKP', + name_plural: 'Falkland Islands (Malvinas) Pound', + }, GBP: { symbol: '£', name: 'British Pound Sterling', @@ -361,6 +514,15 @@ export const Currencies: Record = { code: 'GEL', name_plural: 'Georgian laris', }, + GGP: { + symbol: '£', + name: 'Guernsey Pound', + symbol_native: '£', + decimal_digits: 2, + rounding: 0, + code: 'GGP', + name_plural: 'Guernsey Pounds', + }, GHS: { symbol: 'GH₵', name: 'Ghanaian Cedi', @@ -370,6 +532,24 @@ export const Currencies: Record = { code: 'GHS', name_plural: 'Ghanaian cedis', }, + GIP: { + symbol: '£', + name: 'Gibraltar Pound', + symbol_native: '£', + decimal_digits: 2, + rounding: 0, + code: 'GIP', + name_plural: 'Gibraltar Pounds', + }, + GMD: { + symbol: 'D', + name: 'Gambian dalasi', + symbol_native: 'D', + decimal_digits: 2, + rounding: 0, + code: 'GMD', + name_plural: 'Gambian dalasi', + }, GNF: { symbol: 'FG', name: 'Guinean Franc', @@ -388,6 +568,15 @@ export const Currencies: Record = { code: 'GTQ', name_plural: 'Guatemalan quetzals', }, + GYD: { + symbol: '$', + name: 'Guyana Dollar', + symbol_native: '$', + decimal_digits: 2, + rounding: 0, + code: 'GYD', + name_plural: 'Guyana Dollars', + }, HKD: { symbol: 'HK$', name: 'Hong Kong Dollar', @@ -415,6 +604,15 @@ export const Currencies: Record = { code: 'HRK', name_plural: 'Croatian kunas', }, + HTG: { + symbol: 'G', + name: 'Haitian gourde', + symbol_native: 'G', + decimal_digits: 2, + rounding: 0, + code: 'HTG', + name_plural: 'Haitian gourde', + }, HUF: { symbol: 'Ft', name: 'Hungarian Forint', @@ -442,6 +640,15 @@ export const Currencies: Record = { code: 'ILS', name_plural: 'Israeli new sheqels', }, + IMP: { + symbol: '£', + name: 'Isle of Man Pound', + symbol_native: '£', + decimal_digits: 2, + rounding: 0, + code: 'IMP', + name_plural: 'Isle of Man Pounds', + }, INR: { symbol: '₹', name: 'Indian Rupee', @@ -478,6 +685,15 @@ export const Currencies: Record = { code: 'ISK', name_plural: 'Icelandic krónur', }, + JEP: { + symbol: '£', + name: 'Jersey Pound', + symbol_native: '£', + decimal_digits: 2, + rounding: 0, + code: 'JEP', + name_plural: 'Jersey Pounds', + }, JMD: { symbol: 'J$', name: 'Jamaican Dollar', @@ -514,6 +730,15 @@ export const Currencies: Record = { code: 'KES', name_plural: 'Kenyan shillings', }, + KGS: { + symbol: 'лв', + name: 'Kyrgyzstan Som', + symbol_native: 'лв', + decimal_digits: 2, + rounding: 0, + code: 'KGS', + name_plural: 'Kyrgyzstan Som', + }, KHR: { symbol: 'KHR', name: 'Cambodian Riel', @@ -532,6 +757,15 @@ export const Currencies: Record = { code: 'KMF', name_plural: 'Comorian francs', }, + KPW: { + symbol: '₩', + name: 'North Korean Won', + symbol_native: '₩', + decimal_digits: 0, + rounding: 0, + code: 'KPW', + name_plural: 'North Korean Won', + }, KRW: { symbol: '₩', name: 'South Korean Won', @@ -550,6 +784,15 @@ export const Currencies: Record = { code: 'KWD', name_plural: 'Kuwaiti dinars', }, + KYD: { + symbol: '$', + name: 'Cayman Islands Dollar', + symbol_native: '$', + decimal_digits: 2, + rounding: 0, + code: 'KYD', + name_plural: 'Cayman Islands Dollars', + }, KZT: { symbol: 'KZT', name: 'Kazakhstani Tenge', @@ -561,12 +804,12 @@ export const Currencies: Record = { }, LAK: { symbol: '₭', - name: 'Lao kip', - symbol_native: 'ກີບ', + name: 'Laos Kip', + symbol_native: '₭', decimal_digits: 2, rounding: 0, code: 'LAK', - name_plural: 'Lao kips', + name_plural: 'Laos Kip', }, LBP: { symbol: 'LB£', @@ -586,6 +829,24 @@ export const Currencies: Record = { code: 'LKR', name_plural: 'Sri Lankan rupees', }, + LRD: { + symbol: '$', + name: 'Liberia Dollar', + symbol_native: '$', + decimal_digits: 2, + rounding: 0, + code: 'LRD', + name_plural: 'Liberia Dollars', + }, + LSL: { + symbol: 'L', + name: 'Lesotho loti', + symbol_native: 'L', + decimal_digits: 2, + rounding: 0, + code: 'LSL', + name_plural: 'Lesotho loti', + }, LTL: { symbol: 'Lt', name: 'Lithuanian Litas', @@ -635,7 +896,7 @@ export const Currencies: Record = { symbol: 'MGA', name: 'Malagasy Ariary', symbol_native: 'MGA', - decimal_digits: 2, + decimal_digits: 0, rounding: 0, code: 'MGA', name_plural: 'Malagasy Ariaries', @@ -658,6 +919,15 @@ export const Currencies: Record = { code: 'MMK', name_plural: 'Myanma kyats', }, + MNT: { + symbol: '₮', + name: 'Mongolia Tughrik', + symbol_native: '₮', + decimal_digits: 2, + rounding: 0, + code: 'MNT', + name_plural: 'Mongolia Tughrik', + }, MOP: { symbol: 'MOP$', name: 'Macanese Pataca', @@ -667,6 +937,15 @@ export const Currencies: Record = { code: 'MOP', name_plural: 'Macanese patacas', }, + MRO: { + symbol: 'UM', + name: 'Mauritanian ouguiya', + symbol_native: 'UM', + decimal_digits: 1, + rounding: 0, + code: 'MRO', + name_plural: 'Mauritanian ouguiya', + }, MUR: { symbol: 'MURs', name: 'Mauritian Rupee', @@ -676,6 +955,24 @@ export const Currencies: Record = { code: 'MUR', name_plural: 'Mauritian rupees', }, + MVR: { + symbol: 'MRf', + name: 'Maldivian rufiyaa', + symbol_native: 'Rf', + decimal_digits: 2, + rounding: 0, + code: 'MVR', + name_plural: 'Maldivian rufiyaa', + }, + MWK: { + symbol: 'MK', + name: 'Malawian kwacha', + symbol_native: 'MK', + decimal_digits: 2, + rounding: 0, + code: 'MWK', + name_plural: 'Malawian kwacha', + }, MXN: { symbol: 'MX$', name: 'Mexican Peso', @@ -685,6 +982,15 @@ export const Currencies: Record = { code: 'MXN', name_plural: 'Mexican pesos', }, + MXV: { + symbol: '-', + name: 'Mexican Unidad de Inversion (UDI) (funds code)', + symbol_native: '-', + decimal_digits: 2, + rounding: 0, + code: 'MXV', + name_plural: 'Mexican Unidad de Inversion (UDI) (funds code)', + }, MYR: { symbol: 'RM', name: 'Malaysian Ringgit', @@ -748,6 +1054,15 @@ export const Currencies: Record = { code: 'NPR', name_plural: 'Nepalese rupees', }, + PRB: { + symbol: 'руб', + name: 'Transnistrian ruble', + symbol_native: 'руб', + decimal_digits: 2, + rounding: 0, + code: 'PRB', + name_plural: 'Transnistrian rubles', + }, NZD: { symbol: 'NZ$', name: 'New Zealand Dollar', @@ -784,6 +1099,15 @@ export const Currencies: Record = { code: 'PEN', name_plural: 'Peruvian nuevos soles', }, + PGK: { + symbol: 'K', + name: 'Papua New Guinean kina', + symbol_native: 'K', + decimal_digits: 2, + rounding: 0, + code: 'PGK', + name_plural: 'Papua New Guinean kina', + }, PHP: { symbol: '₱', name: 'Philippine Peso', @@ -874,6 +1198,24 @@ export const Currencies: Record = { code: 'SAR', name_plural: 'Saudi riyals', }, + SBD: { + symbol: '$', + name: 'Solomon Islands Dollar', + symbol_native: '$', + decimal_digits: 2, + rounding: 0, + code: 'SBD', + name_plural: 'Solomon Islands Dollars', + }, + SCR: { + symbol: '₨', + name: 'Seychelles Rupee', + symbol_native: '₨', + decimal_digits: 2, + rounding: 0, + code: 'SCR', + name_plural: 'Seychelles Rupees', + }, SDG: { symbol: 'SDG', name: 'Sudanese Pound', @@ -901,6 +1243,24 @@ export const Currencies: Record = { code: 'SGD', name_plural: 'Singapore dollars', }, + SHP: { + symbol: '£', + name: 'Saint Helena Pound', + symbol_native: '£', + decimal_digits: 2, + rounding: 0, + code: 'SHP', + name_plural: 'Saint Helena Pounds', + }, + SLL: { + symbol: 'Le', + name: 'Sierra Leonean leone', + symbol_native: 'Le', + decimal_digits: 2, + rounding: 0, + code: 'SLL', + name_plural: 'Sierra Leonean leone', + }, SOS: { symbol: 'Ssh', name: 'Somali Shilling', @@ -910,6 +1270,42 @@ export const Currencies: Record = { code: 'SOS', name_plural: 'Somali shillings', }, + SRD: { + symbol: '$', + name: 'Suriname Dollar', + symbol_native: '$', + decimal_digits: 2, + rounding: 0, + code: 'SRD', + name_plural: 'Suriname Dollars', + }, + SSP: { + symbol: 'SSP', + name: 'South Sudanese pound', + symbol_native: 'SSP', + decimal_digits: 2, + rounding: 0, + code: 'SSP', + name_plural: 'South Sudanese pound', + }, + STD: { + symbol: 'Db', + name: 'São Tomé and Príncipe dobra', + symbol_native: 'Db', + decimal_digits: 2, + rounding: 0, + code: 'STD', + name_plural: 'São Tomé and Príncipe dobra', + }, + SVC: { + symbol: '$', + name: 'El Salvador Colon', + symbol_native: '$', + decimal_digits: 0, + rounding: 0, + code: 'SVC', + name_plural: 'El Salvador Colon', + }, SYP: { symbol: 'SY£', name: 'Syrian Pound', @@ -919,6 +1315,15 @@ export const Currencies: Record = { code: 'SYP', name_plural: 'Syrian pounds', }, + SZL: { + symbol: 'L', + name: 'Swazi lilangeni', + symbol_native: 'L', + decimal_digits: 2, + rounding: 0, + code: 'SZL', + name_plural: 'Swazi lilangeni', + }, THB: { symbol: '฿', name: 'Thai Baht', @@ -928,6 +1333,24 @@ export const Currencies: Record = { code: 'THB', name_plural: 'Thai baht', }, + TJS: { + symbol: '-', + name: 'Tajikistani somoni', + symbol_native: '-', + decimal_digits: 2, + rounding: 0, + code: 'TJS', + name_plural: 'Tajikistani somoni', + }, + TMT: { + symbol: 'T', + name: 'Turkmenistan manat', + symbol_native: 'T', + decimal_digits: 2, + rounding: 0, + code: 'TMT', + name_plural: 'Turkmenistan manat', + }, TND: { symbol: 'DT', name: 'Tunisian Dinar', @@ -964,6 +1387,15 @@ export const Currencies: Record = { code: 'TTD', name_plural: 'Trinidad and Tobago dollars', }, + TVD: { + symbol: '$', + name: 'Tuvalu Dollar', + symbol_native: '$', + decimal_digits: 2, + rounding: 0, + code: 'TVD', + name_plural: 'Tuvalu Dollars', + }, TWD: { symbol: 'NT$', name: 'New Taiwan Dollar', @@ -1000,6 +1432,24 @@ export const Currencies: Record = { code: 'UGX', name_plural: 'Ugandan shillings', }, + USN: { + symbol: '$', + name: 'United States dollar (next day) (funds code)', + symbol_native: '$', + decimal_digits: 2, + rounding: 0, + code: 'USN', + name_plural: 'United States dollars (next day) (funds code)', + }, + UYI: { + symbol: 'UYI', + name: 'Uruguay Peso en Unidades Indexadas (URUIURUI) (funds code)', + symbol_native: 'UYI', + decimal_digits: 0, + rounding: 0, + code: 'UYI', + name_plural: 'Uruguay Peso en Unidades Indexadas (URUIURUI) (funds code)', + }, UYU: { symbol: '$U', name: 'Uruguayan Peso', @@ -1036,6 +1486,24 @@ export const Currencies: Record = { code: 'VND', name_plural: 'Vietnamese dong', }, + VUV: { + symbol: 'VT', + name: 'Vanuatu vatu', + symbol_native: 'VT', + decimal_digits: 0, + rounding: 0, + code: 'VUV', + name_plural: 'Vanuatu vatu', + }, + WST: { + symbol: 'WS$', + name: 'Samoan tala', + symbol_native: '$', + decimal_digits: 2, + rounding: 0, + code: 'WST', + name_plural: 'Samoan tala', + }, XAF: { symbol: 'FCFA', name: 'CFA Franc BEAC', @@ -1045,6 +1513,78 @@ export const Currencies: Record = { code: 'XAF', name_plural: 'CFA francs BEAC', }, + XAG: { + symbol: 'XAG', + name: 'Silver (one troy ounce)', + symbol_native: 'XAG', + decimal_digits: 0, + rounding: 0, + code: 'XAG', + name_plural: 'Silver (one troy ounce)', + }, + XAU: { + symbol: 'XAU', + name: 'Gold (one troy ounce)', + symbol_native: 'XAU', + decimal_digits: 0, + rounding: 0, + code: 'XAU', + name_plural: 'Gold (one troy ounce)', + }, + XBA: { + symbol: 'XBA', + name: 'European Composite Unit (EURCO) (bond market unit)', + symbol_native: 'XBA', + decimal_digits: 0, + rounding: 0, + code: 'XBA', + name_plural: 'European Composite Unit (EURCO) (bond market unit)', + }, + XBB: { + symbol: 'XBB', + name: 'European Monetary Unit (E.M.U.-6) (bond market unit)', + symbol_native: 'XBB', + decimal_digits: 0, + rounding: 0, + code: 'XBB', + name_plural: 'European Monetary Unit (E.M.U.-6) (bond market unit)', + }, + XBC: { + symbol: 'XBC', + name: 'European Unit of Account 9 (E.U.A.-9) (bond market unit)', + symbol_native: 'XBC', + decimal_digits: 0, + rounding: 0, + code: 'XBC', + name_plural: 'European Unit of Account 9 (E.U.A.-9) (bond market unit)', + }, + XBD: { + symbol: 'XBD', + name: 'European Unit of Account 17 (E.U.A.-17) (bond market unit)', + symbol_native: 'XBD', + decimal_digits: 0, + rounding: 0, + code: 'XBD', + name_plural: 'European Unit of Account 17 (E.U.A.-17) (bond market unit)', + }, + XCD: { + symbol: '$', + name: 'East Caribbean Dollar', + symbol_native: '$', + decimal_digits: 0, + rounding: 0, + code: 'XCD', + name_plural: 'East Caribbean Dollars', + }, + XDR: { + symbol: 'XDR', + name: 'Special drawing rights', + symbol_native: 'XDR', + decimal_digits: 0, + rounding: 0, + code: 'XDR', + name_plural: 'Special drawing rights', + }, XOF: { symbol: 'CFA', name: 'CFA Franc BCEAO', @@ -1054,6 +1594,69 @@ export const Currencies: Record = { code: 'XOF', name_plural: 'CFA francs BCEAO', }, + XPD: { + symbol: 'XPD', + name: 'Palladium (one troy ounce)', + symbol_native: 'XPD', + decimal_digits: 0, + rounding: 0, + code: 'XPD', + name_plural: 'Palladium (one troy ounce)', + }, + XPF: { + symbol: 'CFP', + name: 'CFP franc (franc Pacifique)', + symbol_native: 'CFP', + decimal_digits: 0, + rounding: 0, + code: 'XPF', + name_plural: 'CFP franc (franc Pacifique)', + }, + XPT: { + symbol: 'XPT', + name: 'Platinum (one troy ounce)', + symbol_native: 'XPT', + decimal_digits: 0, + rounding: 0, + code: 'XPT', + name_plural: 'Platinum (one troy ounce)', + }, + XSU: { + symbol: 'Sucre', + name: 'SUCRE', + symbol_native: 'Sucre', + decimal_digits: 0, + rounding: 0, + code: 'XSU', + name_plural: 'SUCRE', + }, + XTS: { + symbol: 'XTS', + name: 'Code reserved for testing purposes', + symbol_native: 'XTS', + decimal_digits: 0, + rounding: 0, + code: 'XTS', + name_plural: 'Code reserved for testing purposes', + }, + XUA: { + symbol: 'XUA', + name: 'ADB Unit of Account', + symbol_native: 'XUA', + decimal_digits: 0, + rounding: 0, + code: 'XUA', + name_plural: 'ADB Unit of Account', + }, + XXX: { + symbol: 'XXX', + name: 'No currency', + symbol_native: 'XXX', + decimal_digits: 0, + rounding: 0, + code: 'XTS', + name_plural: 'No currency', + }, YER: { symbol: 'YR', name: 'Yemeni Rial', @@ -1081,4 +1684,31 @@ export const Currencies: Record = { code: 'ZMK', name_plural: 'Zambian kwachas', }, -} + ZMW: { + symbol: 'ZK', + name: 'Zambian kwacha', + symbol_native: 'ZK', + decimal_digits: 2, + rounding: 0, + code: 'ZMW', + name_plural: 'Zambian kwacha', + }, + ZWD: { + symbol: 'Z$', + name: 'Zimbabwe Dollar', + symbol_native: 'Z$', + decimal_digits: 2, + rounding: 0, + code: 'ZWD', + name_plural: 'Zimbabwe Dollars', + }, + ZWL: { + symbol: '$', + name: 'Zimbabwean dollar A/10', + symbol_native: '$', + decimal_digits: 2, + rounding: 0, + code: 'ZWL', + name_plural: 'Zimbabwean dollars A/10', + }, +}; From 61571d9185d59c02a4907a3d42b865f5baadb739 Mon Sep 17 00:00:00 2001 From: Brad Ito Date: Tue, 28 Jan 2025 15:36:22 -0800 Subject: [PATCH 07/20] switch tests to terminate after completion, add github workflow --- .github/workflows/continuous-integration.yml | 32 ++++++++++++++++++++ package.json | 2 +- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/continuous-integration.yml diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml new file mode 100644 index 0000000..f1b5732 --- /dev/null +++ b/.github/workflows/continuous-integration.yml @@ -0,0 +1,32 @@ +name: Continuous Integration + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [18, 20] + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + + - name: Install dependencies + run: npm install --include=dev + + - name: Run tests + run: npm run test \ No newline at end of file diff --git a/package.json b/package.json index 0a11a6e..e67505b 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ }, "scripts": { "build": "unbuild", - "test": "vitest", + "test": "vitest run", "typecheck": "tsc --noEmit" } } From 82d0c7d7cf3b0c667592689e270369202c6903aa Mon Sep 17 00:00:00 2001 From: Brad Ito Date: Tue, 28 Jan 2025 15:36:51 -0800 Subject: [PATCH 08/20] rename to use master branch --- .github/workflows/continuous-integration.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index f1b5732..2690542 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -3,10 +3,10 @@ name: Continuous Integration on: push: branches: - - main + - master pull_request: branches: - - main + - master jobs: build: From bc2b0dd87bfdecc6888f955f4664220ba34d9439 Mon Sep 17 00:00:00 2001 From: Brad Ito Date: Tue, 28 Jan 2025 15:40:24 -0800 Subject: [PATCH 09/20] fix types in unit test, add typecheck to ci --- .github/workflows/continuous-integration.yml | 3 +++ test/money.test.ts | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 2690542..9aac849 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -28,5 +28,8 @@ jobs: - name: Install dependencies run: npm install --include=dev + - name: Typescript checks + run: npm run typecheck + - name: Run tests run: npm run test \ No newline at end of file diff --git a/test/money.test.ts b/test/money.test.ts index 61726eb..da5593e 100644 --- a/test/money.test.ts +++ b/test/money.test.ts @@ -51,7 +51,7 @@ describe('Money', function () { var money3 = Money.fromDecimal(10.0199, Currencies.EUR, Math.ceil); var money4 = Money.fromDecimal(10.0199, Currencies.EUR, Math.floor); var money5 = Money.fromDecimal(10.0199, Currencies.EUR, Math.round); - var money6 = Money.fromDecimal(10.0199, Currencies.EUR, function (amount) { + var money6 = Money.fromDecimal(10.0199, Currencies.EUR, function (amount: number) { return Math.round(amount) }); @@ -158,7 +158,7 @@ describe('Money', function () { it('should check for same type', function () { var first = new Money(1000, Currencies.EUR); - expect(first.add.bind(first, {})).to.throw(TypeError); + expect(first.add.bind(first, {} as Money)).to.throw(TypeError); }); it('should check if equal', function () { From cc92eb35bbfaab5bdb68361b9825f238bf40e93f Mon Sep 17 00:00:00 2001 From: Brad Ito Date: Tue, 28 Jan 2025 15:41:18 -0800 Subject: [PATCH 10/20] fix formatting of ci file --- .github/workflows/continuous-integration.yml | 24 ++++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 9aac849..bdd6435 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -17,19 +17,19 @@ jobs: node-version: [18, 20] steps: - - name: Checkout repository - uses: actions/checkout@v4 + - name: Checkout repository + uses: actions/checkout@v4 - - name: Set up Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} + - name: Set up Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} - - name: Install dependencies - run: npm install --include=dev + - name: Install dependencies + run: npm install --include=dev - - name: Typescript checks - run: npm run typecheck + - name: Typescript checks + run: npm run typecheck - - name: Run tests - run: npm run test \ No newline at end of file + - name: Run tests + run: npm run test \ No newline at end of file From fc26a0f3ed6764e43af3a0cdb0e652c0a24f9661 Mon Sep 17 00:00:00 2001 From: Brad Ito Date: Tue, 28 Jan 2025 15:42:50 -0800 Subject: [PATCH 11/20] add node v22 to the ci tests --- .github/workflows/continuous-integration.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index bdd6435..5249550 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -14,7 +14,7 @@ jobs: strategy: matrix: - node-version: [18, 20] + node-version: [18, 20, 22] steps: - name: Checkout repository From 38cf1be10b583f3c99168bfbe896244fa1bc6f30 Mon Sep 17 00:00:00 2001 From: Sebastian Langer Date: Wed, 26 Feb 2025 11:09:18 +0100 Subject: [PATCH 12/20] remove unnecessary currency data --- src/lib/currencies.ts | 1209 +++++------------------------------------ src/lib/currency.ts | 7 +- 2 files changed, 128 insertions(+), 1088 deletions(-) diff --git a/src/lib/currencies.ts b/src/lib/currencies.ts index 78ae6da..cb66053 100644 --- a/src/lib/currencies.ts +++ b/src/lib/currencies.ts @@ -1,1084 +1,129 @@ import { Currency } from './currency'; -export const Currencies: Record = { - "USD": { - "symbol": "$", - "name": "US Dollar", - "symbol_native": "$", - "decimal_digits": 2, - "rounding": 0, - "code": "USD", - "name_plural": "US dollars" - }, - "CAD": { - "symbol": "CA$", - "name": "Canadian Dollar", - "symbol_native": "$", - "decimal_digits": 2, - "rounding": 0, - "code": "CAD", - "name_plural": "Canadian dollars" - }, - "EUR": { - "symbol": "€", - "name": "Euro", - "symbol_native": "€", - "decimal_digits": 2, - "rounding": 0, - "code": "EUR", - "name_plural": "euros" - }, - "BTC": { - "symbol": "BTC", - "name": "Bitcoin", - "symbol_native": "฿", - "decimal_digits": 8, - "rounding": 0, - "code": "BTC", - "name_plural": "Bitcoins" - }, - "AED": { - "symbol": "AED", - "name": "United Arab Emirates Dirham", - "symbol_native": "د.إ.‏", - "decimal_digits": 2, - "rounding": 0, - "code": "AED", - "name_plural": "UAE dirhams" - }, - "AFN": { - "symbol": "Af", - "name": "Afghan Afghani", - "symbol_native": "؋", - "decimal_digits": 2, - "rounding": 0, - "code": "AFN", - "name_plural": "Afghan Afghanis" - }, - "ALL": { - "symbol": "ALL", - "name": "Albanian Lek", - "symbol_native": "Lek", - "decimal_digits": 2, - "rounding": 0, - "code": "ALL", - "name_plural": "Albanian lekë" - }, - "AMD": { - "symbol": "AMD", - "name": "Armenian Dram", - "symbol_native": "դր.", - "decimal_digits": 2, - "rounding": 0, - "code": "AMD", - "name_plural": "Armenian drams" - }, - "ARS": { - "symbol": "AR$", - "name": "Argentine Peso", - "symbol_native": "$", - "decimal_digits": 2, - "rounding": 0, - "code": "ARS", - "name_plural": "Argentine pesos" - }, - "AUD": { - "symbol": "AU$", - "name": "Australian Dollar", - "symbol_native": "$", - "decimal_digits": 2, - "rounding": 0, - "code": "AUD", - "name_plural": "Australian dollars" - }, - "AZN": { - "symbol": "man.", - "name": "Azerbaijani Manat", - "symbol_native": "ман.", - "decimal_digits": 2, - "rounding": 0, - "code": "AZN", - "name_plural": "Azerbaijani manats" - }, - "BAM": { - "symbol": "KM", - "name": "Bosnia-Herzegovina Convertible Mark", - "symbol_native": "KM", - "decimal_digits": 2, - "rounding": 0, - "code": "BAM", - "name_plural": "Bosnia-Herzegovina convertible marks" - }, - "BDT": { - "symbol": "Tk", - "name": "Bangladeshi Taka", - "symbol_native": "৳", - "decimal_digits": 2, - "rounding": 0, - "code": "BDT", - "name_plural": "Bangladeshi takas" - }, - "BGN": { - "symbol": "BGN", - "name": "Bulgarian Lev", - "symbol_native": "лв.", - "decimal_digits": 2, - "rounding": 0, - "code": "BGN", - "name_plural": "Bulgarian leva" - }, - "BHD": { - "symbol": "BD", - "name": "Bahraini Dinar", - "symbol_native": "د.ب.‏", - "decimal_digits": 3, - "rounding": 0, - "code": "BHD", - "name_plural": "Bahraini dinars" - }, - "BIF": { - "symbol": "FBu", - "name": "Burundian Franc", - "symbol_native": "FBu", - "decimal_digits": 0, - "rounding": 0, - "code": "BIF", - "name_plural": "Burundian francs" - }, - "BND": { - "symbol": "BN$", - "name": "Brunei Dollar", - "symbol_native": "$", - "decimal_digits": 2, - "rounding": 0, - "code": "BND", - "name_plural": "Brunei dollars" - }, - "BOB": { - "symbol": "Bs", - "name": "Bolivian Boliviano", - "symbol_native": "Bs", - "decimal_digits": 2, - "rounding": 0, - "code": "BOB", - "name_plural": "Bolivian bolivianos" - }, - "BRL": { - "symbol": "R$", - "name": "Brazilian Real", - "symbol_native": "R$", - "decimal_digits": 2, - "rounding": 0, - "code": "BRL", - "name_plural": "Brazilian reals" - }, - "BWP": { - "symbol": "BWP", - "name": "Botswanan Pula", - "symbol_native": "P", - "decimal_digits": 2, - "rounding": 0, - "code": "BWP", - "name_plural": "Botswanan pulas" - }, - "BYR": { - "symbol": "BYR", - "name": "Belarusian Ruble", - "symbol_native": "BYR", - "decimal_digits": 0, - "rounding": 0, - "code": "BYR", - "name_plural": "Belarusian rubles" - }, - "BZD": { - "symbol": "BZ$", - "name": "Belize Dollar", - "symbol_native": "$", - "decimal_digits": 2, - "rounding": 0, - "code": "BZD", - "name_plural": "Belize dollars" - }, - "CDF": { - "symbol": "CDF", - "name": "Congolese Franc", - "symbol_native": "FrCD", - "decimal_digits": 2, - "rounding": 0, - "code": "CDF", - "name_plural": "Congolese francs" - }, - "CHF": { - "symbol": "CHF", - "name": "Swiss Franc", - "symbol_native": "CHF", - "decimal_digits": 2, - "rounding": 0.05, - "code": "CHF", - "name_plural": "Swiss francs" - }, - "CLP": { - "symbol": "CL$", - "name": "Chilean Peso", - "symbol_native": "$", - "decimal_digits": 0, - "rounding": 0, - "code": "CLP", - "name_plural": "Chilean pesos" - }, - "CNY": { - "symbol": "CN¥", - "name": "Chinese Yuan", - "symbol_native": "CN¥", - "decimal_digits": 2, - "rounding": 0, - "code": "CNY", - "name_plural": "Chinese yuan" - }, - "COP": { - "symbol": "CO$", - "name": "Colombian Peso", - "symbol_native": "$", - "decimal_digits": 2, - "rounding": 0, - "code": "COP", - "name_plural": "Colombian pesos" - }, - "CRC": { - "symbol": "₡", - "name": "Costa Rican Colón", - "symbol_native": "₡", - "decimal_digits": 2, - "rounding": 0, - "code": "CRC", - "name_plural": "Costa Rican colóns" - }, - "CVE": { - "symbol": "CV$", - "name": "Cape Verdean Escudo", - "symbol_native": "CV$", - "decimal_digits": 2, - "rounding": 0, - "code": "CVE", - "name_plural": "Cape Verdean escudos" - }, - "CZK": { - "symbol": "Kč", - "name": "Czech Republic Koruna", - "symbol_native": "Kč", - "decimal_digits": 2, - "rounding": 0, - "code": "CZK", - "name_plural": "Czech Republic korunas" - }, - "DJF": { - "symbol": "Fdj", - "name": "Djiboutian Franc", - "symbol_native": "Fdj", - "decimal_digits": 0, - "rounding": 0, - "code": "DJF", - "name_plural": "Djiboutian francs" - }, - "DKK": { - "symbol": "Dkr", - "name": "Danish Krone", - "symbol_native": "kr", - "decimal_digits": 2, - "rounding": 0, - "code": "DKK", - "name_plural": "Danish kroner" - }, - "DOP": { - "symbol": "RD$", - "name": "Dominican Peso", - "symbol_native": "RD$", - "decimal_digits": 2, - "rounding": 0, - "code": "DOP", - "name_plural": "Dominican pesos" - }, - "DZD": { - "symbol": "DA", - "name": "Algerian Dinar", - "symbol_native": "د.ج.‏", - "decimal_digits": 2, - "rounding": 0, - "code": "DZD", - "name_plural": "Algerian dinars" - }, - "EEK": { - "symbol": "Ekr", - "name": "Estonian Kroon", - "symbol_native": "kr", - "decimal_digits": 2, - "rounding": 0, - "code": "EEK", - "name_plural": "Estonian kroons" - }, - "EGP": { - "symbol": "EGP", - "name": "Egyptian Pound", - "symbol_native": "ج.م.‏", - "decimal_digits": 2, - "rounding": 0, - "code": "EGP", - "name_plural": "Egyptian pounds" - }, - "ERN": { - "symbol": "Nfk", - "name": "Eritrean Nakfa", - "symbol_native": "Nfk", - "decimal_digits": 2, - "rounding": 0, - "code": "ERN", - "name_plural": "Eritrean nakfas" - }, - "ETB": { - "symbol": "Br", - "name": "Ethiopian Birr", - "symbol_native": "Br", - "decimal_digits": 2, - "rounding": 0, - "code": "ETB", - "name_plural": "Ethiopian birrs" - }, - "GBP": { - "symbol": "£", - "name": "British Pound Sterling", - "symbol_native": "£", - "decimal_digits": 2, - "rounding": 0, - "code": "GBP", - "name_plural": "British pounds sterling" - }, - "GEL": { - "symbol": "GEL", - "name": "Georgian Lari", - "symbol_native": "GEL", - "decimal_digits": 2, - "rounding": 0, - "code": "GEL", - "name_plural": "Georgian laris" - }, - "GHS": { - "symbol": "GH₵", - "name": "Ghanaian Cedi", - "symbol_native": "GH₵", - "decimal_digits": 2, - "rounding": 0, - "code": "GHS", - "name_plural": "Ghanaian cedis" - }, - "GNF": { - "symbol": "FG", - "name": "Guinean Franc", - "symbol_native": "FG", - "decimal_digits": 0, - "rounding": 0, - "code": "GNF", - "name_plural": "Guinean francs" - }, - "GTQ": { - "symbol": "GTQ", - "name": "Guatemalan Quetzal", - "symbol_native": "Q", - "decimal_digits": 2, - "rounding": 0, - "code": "GTQ", - "name_plural": "Guatemalan quetzals" - }, - "HKD": { - "symbol": "HK$", - "name": "Hong Kong Dollar", - "symbol_native": "$", - "decimal_digits": 2, - "rounding": 0, - "code": "HKD", - "name_plural": "Hong Kong dollars" - }, - "HNL": { - "symbol": "HNL", - "name": "Honduran Lempira", - "symbol_native": "L", - "decimal_digits": 2, - "rounding": 0, - "code": "HNL", - "name_plural": "Honduran lempiras" - }, - "HRK": { - "symbol": "kn", - "name": "Croatian Kuna", - "symbol_native": "kn", - "decimal_digits": 2, - "rounding": 0, - "code": "HRK", - "name_plural": "Croatian kunas" - }, - "HUF": { - "symbol": "Ft", - "name": "Hungarian Forint", - "symbol_native": "Ft", - "decimal_digits": 2, - "rounding": 0, - "code": "HUF", - "name_plural": "Hungarian forints" - }, - "IDR": { - "symbol": "Rp", - "name": "Indonesian Rupiah", - "symbol_native": "Rp", - "decimal_digits": 2, - "rounding": 0, - "code": "IDR", - "name_plural": "Indonesian rupiahs" - }, - "ILS": { - "symbol": "₪", - "name": "Israeli New Sheqel", - "symbol_native": "₪", - "decimal_digits": 2, - "rounding": 0, - "code": "ILS", - "name_plural": "Israeli new sheqels" - }, - "INR": { - "symbol": "₹", - "name": "Indian Rupee", - "symbol_native": "টকা", - "decimal_digits": 2, - "rounding": 0, - "code": "INR", - "name_plural": "Indian rupees" - }, - "IQD": { - "symbol": "IQD", - "name": "Iraqi Dinar", - "symbol_native": "د.ع.‏", - "decimal_digits": 3, - "rounding": 0, - "code": "IQD", - "name_plural": "Iraqi dinars" - }, - "IRR": { - "symbol": "IRR", - "name": "Iranian Rial", - "symbol_native": "﷼", - "decimal_digits": 2, - "rounding": 0, - "code": "IRR", - "name_plural": "Iranian rials" - }, - "ISK": { - "symbol": "Ikr", - "name": "Icelandic Króna", - "symbol_native": "kr", - "decimal_digits": 0, - "rounding": 0, - "code": "ISK", - "name_plural": "Icelandic krónur" - }, - "JMD": { - "symbol": "J$", - "name": "Jamaican Dollar", - "symbol_native": "$", - "decimal_digits": 2, - "rounding": 0, - "code": "JMD", - "name_plural": "Jamaican dollars" - }, - "JOD": { - "symbol": "JD", - "name": "Jordanian Dinar", - "symbol_native": "د.أ.‏", - "decimal_digits": 3, - "rounding": 0, - "code": "JOD", - "name_plural": "Jordanian dinars" - }, - "JPY": { - "symbol": "¥", - "name": "Japanese Yen", - "symbol_native": "¥", - "decimal_digits": 0, - "rounding": 0, - "code": "JPY", - "name_plural": "Japanese yen" - }, - "KES": { - "symbol": "Ksh", - "name": "Kenyan Shilling", - "symbol_native": "Ksh", - "decimal_digits": 2, - "rounding": 0, - "code": "KES", - "name_plural": "Kenyan shillings" - }, - "KHR": { - "symbol": "KHR", - "name": "Cambodian Riel", - "symbol_native": "៛", - "decimal_digits": 2, - "rounding": 0, - "code": "KHR", - "name_plural": "Cambodian riels" - }, - "KMF": { - "symbol": "CF", - "name": "Comorian Franc", - "symbol_native": "FC", - "decimal_digits": 0, - "rounding": 0, - "code": "KMF", - "name_plural": "Comorian francs" - }, - "KRW": { - "symbol": "₩", - "name": "South Korean Won", - "symbol_native": "₩", - "decimal_digits": 0, - "rounding": 0, - "code": "KRW", - "name_plural": "South Korean won" - }, - "KWD": { - "symbol": "KD", - "name": "Kuwaiti Dinar", - "symbol_native": "د.ك.‏", - "decimal_digits": 3, - "rounding": 0, - "code": "KWD", - "name_plural": "Kuwaiti dinars" - }, - "KZT": { - "symbol": "KZT", - "name": "Kazakhstani Tenge", - "symbol_native": "тңг.", - "decimal_digits": 2, - "rounding": 0, - "code": "KZT", - "name_plural": "Kazakhstani tenges" - }, - "LAK": { - "symbol": "₭", - "name": "Lao kip", - "symbol_native": "ກີບ", - "decimal_digits": 2, - "rounding": 0, - "code": "LAK", - "name_plural": "Lao kips" - }, - "LBP": { - "symbol": "LB£", - "name": "Lebanese Pound", - "symbol_native": "ل.ل.‏", - "decimal_digits": 2, - "rounding": 0, - "code": "LBP", - "name_plural": "Lebanese pounds" - }, - "LKR": { - "symbol": "SLRs", - "name": "Sri Lankan Rupee", - "symbol_native": "SL Re", - "decimal_digits": 2, - "rounding": 0, - "code": "LKR", - "name_plural": "Sri Lankan rupees" - }, - "LTL": { - "symbol": "Lt", - "name": "Lithuanian Litas", - "symbol_native": "Lt", - "decimal_digits": 2, - "rounding": 0, - "code": "LTL", - "name_plural": "Lithuanian litai" - }, - "LVL": { - "symbol": "Ls", - "name": "Latvian Lats", - "symbol_native": "Ls", - "decimal_digits": 2, - "rounding": 0, - "code": "LVL", - "name_plural": "Latvian lati" - }, - "LYD": { - "symbol": "LD", - "name": "Libyan Dinar", - "symbol_native": "د.ل.‏", - "decimal_digits": 3, - "rounding": 0, - "code": "LYD", - "name_plural": "Libyan dinars" - }, - "MAD": { - "symbol": "MAD", - "name": "Moroccan Dirham", - "symbol_native": "د.م.‏", - "decimal_digits": 2, - "rounding": 0, - "code": "MAD", - "name_plural": "Moroccan dirhams" - }, - "MDL": { - "symbol": "MDL", - "name": "Moldovan Leu", - "symbol_native": "MDL", - "decimal_digits": 2, - "rounding": 0, - "code": "MDL", - "name_plural": "Moldovan lei" - }, - "MGA": { - "symbol": "MGA", - "name": "Malagasy Ariary", - "symbol_native": "MGA", - "decimal_digits": 2, - "rounding": 0, - "code": "MGA", - "name_plural": "Malagasy Ariaries" - }, - "MKD": { - "symbol": "MKD", - "name": "Macedonian Denar", - "symbol_native": "MKD", - "decimal_digits": 2, - "rounding": 0, - "code": "MKD", - "name_plural": "Macedonian denari" - }, - "MMK": { - "symbol": "MMK", - "name": "Myanma Kyat", - "symbol_native": "K", - "decimal_digits": 2, - "rounding": 0, - "code": "MMK", - "name_plural": "Myanma kyats" - }, - "MOP": { - "symbol": "MOP$", - "name": "Macanese Pataca", - "symbol_native": "MOP$", - "decimal_digits": 2, - "rounding": 0, - "code": "MOP", - "name_plural": "Macanese patacas" - }, - "MUR": { - "symbol": "MURs", - "name": "Mauritian Rupee", - "symbol_native": "MURs", - "decimal_digits": 2, - "rounding": 0, - "code": "MUR", - "name_plural": "Mauritian rupees" - }, - "MXN": { - "symbol": "MX$", - "name": "Mexican Peso", - "symbol_native": "$", - "decimal_digits": 2, - "rounding": 0, - "code": "MXN", - "name_plural": "Mexican pesos" - }, - "MYR": { - "symbol": "RM", - "name": "Malaysian Ringgit", - "symbol_native": "RM", - "decimal_digits": 2, - "rounding": 0, - "code": "MYR", - "name_plural": "Malaysian ringgits" - }, - "MZN": { - "symbol": "MTn", - "name": "Mozambican Metical", - "symbol_native": "MTn", - "decimal_digits": 2, - "rounding": 0, - "code": "MZN", - "name_plural": "Mozambican meticals" - }, - "NAD": { - "symbol": "N$", - "name": "Namibian Dollar", - "symbol_native": "N$", - "decimal_digits": 2, - "rounding": 0, - "code": "NAD", - "name_plural": "Namibian dollars" - }, - "NGN": { - "symbol": "₦", - "name": "Nigerian Naira", - "symbol_native": "₦", - "decimal_digits": 2, - "rounding": 0, - "code": "NGN", - "name_plural": "Nigerian nairas" - }, - "NIO": { - "symbol": "C$", - "name": "Nicaraguan Córdoba", - "symbol_native": "C$", - "decimal_digits": 2, - "rounding": 0, - "code": "NIO", - "name_plural": "Nicaraguan córdobas" - }, - "NOK": { - "symbol": "Nkr", - "name": "Norwegian Krone", - "symbol_native": "kr", - "decimal_digits": 2, - "rounding": 0, - "code": "NOK", - "name_plural": "Norwegian kroner" - }, - "NPR": { - "symbol": "NPRs", - "name": "Nepalese Rupee", - "symbol_native": "नेरू", - "decimal_digits": 2, - "rounding": 0, - "code": "NPR", - "name_plural": "Nepalese rupees" - }, - "NZD": { - "symbol": "NZ$", - "name": "New Zealand Dollar", - "symbol_native": "$", - "decimal_digits": 2, - "rounding": 0, - "code": "NZD", - "name_plural": "New Zealand dollars" - }, - "OMR": { - "symbol": "OMR", - "name": "Omani Rial", - "symbol_native": "ر.ع.‏", - "decimal_digits": 3, - "rounding": 0, - "code": "OMR", - "name_plural": "Omani rials" - }, - "PAB": { - "symbol": "B/.", - "name": "Panamanian Balboa", - "symbol_native": "B/.", - "decimal_digits": 2, - "rounding": 0, - "code": "PAB", - "name_plural": "Panamanian balboas" - }, - "PEN": { - "symbol": "S/.", - "name": "Peruvian Nuevo Sol", - "symbol_native": "S/.", - "decimal_digits": 2, - "rounding": 0, - "code": "PEN", - "name_plural": "Peruvian nuevos soles" - }, - "PHP": { - "symbol": "₱", - "name": "Philippine Peso", - "symbol_native": "₱", - "decimal_digits": 2, - "rounding": 0, - "code": "PHP", - "name_plural": "Philippine pesos" - }, - "PKR": { - "symbol": "PKRs", - "name": "Pakistani Rupee", - "symbol_native": "₨", - "decimal_digits": 2, - "rounding": 0, - "code": "PKR", - "name_plural": "Pakistani rupees" - }, - "PLN": { - "symbol": "zł", - "name": "Polish Zloty", - "symbol_native": "zł", - "decimal_digits": 2, - "rounding": 0, - "code": "PLN", - "name_plural": "Polish zlotys" - }, - "PYG": { - "symbol": "₲", - "name": "Paraguayan Guarani", - "symbol_native": "₲", - "decimal_digits": 0, - "rounding": 0, - "code": "PYG", - "name_plural": "Paraguayan guaranis" - }, - "QAR": { - "symbol": "QR", - "name": "Qatari Rial", - "symbol_native": "ر.ق.‏", - "decimal_digits": 2, - "rounding": 0, - "code": "QAR", - "name_plural": "Qatari rials" - }, - "RON": { - "symbol": "RON", - "name": "Romanian Leu", - "symbol_native": "RON", - "decimal_digits": 2, - "rounding": 0, - "code": "RON", - "name_plural": "Romanian lei" - }, - "RSD": { - "symbol": "din.", - "name": "Serbian Dinar", - "symbol_native": "дин.", - "decimal_digits": 2, - "rounding": 0, - "code": "RSD", - "name_plural": "Serbian dinars" - }, - "RUB": { - "symbol": "RUB", - "name": "Russian Ruble", - "symbol_native": "₽", - "decimal_digits": 2, - "rounding": 0, - "code": "RUB", - "name_plural": "Russian rubles" - }, - "RWF": { - "symbol": "RWF", - "name": "Rwandan Franc", - "symbol_native": "FR", - "decimal_digits": 0, - "rounding": 0, - "code": "RWF", - "name_plural": "Rwandan francs" - }, - "SAR": { - "symbol": "SR", - "name": "Saudi Riyal", - "symbol_native": "ر.س.‏", - "decimal_digits": 2, - "rounding": 0, - "code": "SAR", - "name_plural": "Saudi riyals" - }, - "SDG": { - "symbol": "SDG", - "name": "Sudanese Pound", - "symbol_native": "SDG", - "decimal_digits": 2, - "rounding": 0, - "code": "SDG", - "name_plural": "Sudanese pounds" - }, - "SEK": { - "symbol": "Skr", - "name": "Swedish Krona", - "symbol_native": "kr", - "decimal_digits": 2, - "rounding": 0, - "code": "SEK", - "name_plural": "Swedish kronor" - }, - "SGD": { - "symbol": "S$", - "name": "Singapore Dollar", - "symbol_native": "$", - "decimal_digits": 2, - "rounding": 0, - "code": "SGD", - "name_plural": "Singapore dollars" - }, - "SOS": { - "symbol": "Ssh", - "name": "Somali Shilling", - "symbol_native": "Ssh", - "decimal_digits": 2, - "rounding": 0, - "code": "SOS", - "name_plural": "Somali shillings" - }, - "SYP": { - "symbol": "SY£", - "name": "Syrian Pound", - "symbol_native": "ل.س.‏", - "decimal_digits": 2, - "rounding": 0, - "code": "SYP", - "name_plural": "Syrian pounds" - }, - "THB": { - "symbol": "฿", - "name": "Thai Baht", - "symbol_native": "฿", - "decimal_digits": 2, - "rounding": 0, - "code": "THB", - "name_plural": "Thai baht" - }, - "TND": { - "symbol": "DT", - "name": "Tunisian Dinar", - "symbol_native": "د.ت.‏", - "decimal_digits": 3, - "rounding": 0, - "code": "TND", - "name_plural": "Tunisian dinars" - }, - "TOP": { - "symbol": "T$", - "name": "Tongan Paʻanga", - "symbol_native": "T$", - "decimal_digits": 2, - "rounding": 0, - "code": "TOP", - "name_plural": "Tongan paʻanga" - }, - "TRY": { - "symbol": "TL", - "name": "Turkish Lira", - "symbol_native": "TL", - "decimal_digits": 2, - "rounding": 0, - "code": "TRY", - "name_plural": "Turkish Lira" - }, - "TTD": { - "symbol": "TT$", - "name": "Trinidad and Tobago Dollar", - "symbol_native": "$", - "decimal_digits": 2, - "rounding": 0, - "code": "TTD", - "name_plural": "Trinidad and Tobago dollars" - }, - "TWD": { - "symbol": "NT$", - "name": "New Taiwan Dollar", - "symbol_native": "NT$", - "decimal_digits": 2, - "rounding": 0, - "code": "TWD", - "name_plural": "New Taiwan dollars" - }, - "TZS": { - "symbol": "TSh", - "name": "Tanzanian Shilling", - "symbol_native": "TSh", - "decimal_digits": 2, - "rounding": 0, - "code": "TZS", - "name_plural": "Tanzanian shillings" - }, - "UAH": { - "symbol": "₴", - "name": "Ukrainian Hryvnia", - "symbol_native": "₴", - "decimal_digits": 2, - "rounding": 0, - "code": "UAH", - "name_plural": "Ukrainian hryvnias" - }, - "UGX": { - "symbol": "USh", - "name": "Ugandan Shilling", - "symbol_native": "USh", - "decimal_digits": 0, - "rounding": 0, - "code": "UGX", - "name_plural": "Ugandan shillings" - }, - "UYU": { - "symbol": "$U", - "name": "Uruguayan Peso", - "symbol_native": "$", - "decimal_digits": 2, - "rounding": 0, - "code": "UYU", - "name_plural": "Uruguayan pesos" - }, - "UZS": { - "symbol": "UZS", - "name": "Uzbekistan Som", - "symbol_native": "UZS", - "decimal_digits": 2, - "rounding": 0, - "code": "UZS", - "name_plural": "Uzbekistan som" - }, - "VEF": { - "symbol": "Bs.F.", - "name": "Venezuelan Bolívar", - "symbol_native": "Bs.F.", - "decimal_digits": 2, - "rounding": 0, - "code": "VEF", - "name_plural": "Venezuelan bolívars" - }, - "VND": { - "symbol": "₫", - "name": "Vietnamese Dong", - "symbol_native": "₫", - "decimal_digits": 0, - "rounding": 0, - "code": "VND", - "name_plural": "Vietnamese dong" - }, - "XAF": { - "symbol": "FCFA", - "name": "CFA Franc BEAC", - "symbol_native": "FCFA", - "decimal_digits": 0, - "rounding": 0, - "code": "XAF", - "name_plural": "CFA francs BEAC" - }, - "XOF": { - "symbol": "CFA", - "name": "CFA Franc BCEAO", - "symbol_native": "CFA", - "decimal_digits": 0, - "rounding": 0, - "code": "XOF", - "name_plural": "CFA francs BCEAO" - }, - "YER": { - "symbol": "YR", - "name": "Yemeni Rial", - "symbol_native": "ر.ي.‏", - "decimal_digits": 2, - "rounding": 0, - "code": "YER", - "name_plural": "Yemeni rials" - }, - "ZAR": { - "symbol": "R", - "name": "South African Rand", - "symbol_native": "R", - "decimal_digits": 2, - "rounding": 0, - "code": "ZAR", - "name_plural": "South African rand" - }, - "ZMK": { - "symbol": "ZK", - "name": "Zambian Kwacha", - "symbol_native": "ZK", - "decimal_digits": 0, - "rounding": 0, - "code": "ZMK", - "name_plural": "Zambian kwachas" - } -} +const rawData = [ + ["USD", 2], + ["CAD", 2], + ["EUR", 2], + ["BTC", 8], + ["AED", 2], + ["AFN", 2], + ["ALL", 2], + ["AMD", 2], + ["ARS", 2], + ["AUD", 2], + ["AZN", 2], + ["BAM", 2], + ["BDT", 2], + ["BGN", 2], + ["BHD", 3], + ["BIF", 0], + ["BND", 2], + ["BOB", 2], + ["BRL", 2], + ["BWP", 2], + ["BYR", 0], + ["BZD", 2], + ["CDF", 2], + ["CHF", 2], + ["CLP", 0], + ["CNY", 2], + ["COP", 2], + ["CRC", 2], + ["CVE", 2], + ["CZK", 2], + ["DJF", 0], + ["DKK", 2], + ["DOP", 2], + ["DZD", 2], + ["EEK", 2], + ["EGP", 2], + ["ERN", 2], + ["ETB", 2], + ["GBP", 2], + ["GEL", 2], + ["GHS", 2], + ["GNF", 0], + ["GTQ", 2], + ["HKD", 2], + ["HNL", 2], + ["HRK", 2], + ["HUF", 2], + ["IDR", 2], + ["ILS", 2], + ["INR", 2], + ["IQD", 3], + ["IRR", 2], + ["ISK", 0], + ["JMD", 2], + ["JOD", 3], + ["JPY", 0], + ["KES", 2], + ["KHR", 2], + ["KMF", 0], + ["KRW", 0], + ["KWD", 3], + ["KZT", 2], + ["LAK", 2], + ["LBP", 2], + ["LKR", 2], + ["LTL", 2], + ["LVL", 2], + ["LYD", 3], + ["MAD", 2], + ["MDL", 2], + ["MGA", 2], + ["MKD", 2], + ["MMK", 2], + ["MOP", 2], + ["MUR", 2], + ["MXN", 2], + ["MYR", 2], + ["MZN", 2], + ["NAD", 2], + ["NGN", 2], + ["NIO", 2], + ["NOK", 2], + ["NPR", 2], + ["NZD", 2], + ["OMR", 3], + ["PAB", 2], + ["PEN", 2], + ["PHP", 2], + ["PKR", 2], + ["PLN", 2], + ["PYG", 0], + ["QAR", 2], + ["RON", 2], + ["RSD", 2], + ["RUB", 2], + ["RWF", 0], + ["SAR", 2], + ["SDG", 2], + ["SEK", 2], + ["SGD", 2], + ["SOS", 2], + ["SYP", 2], + ["THB", 2], + ["TND", 3], + ["TOP", 2], + ["TRY", 2], + ["TTD", 2], + ["TWD", 2], + ["TZS", 2], + ["UAH", 2], + ["UGX", 0], + ["UYU", 2], + ["UZS", 2], + ["VEF", 2], + ["VND", 0], + ["XAF", 0], + ["XOF", 0], + ["YER", 2], + ["ZAR", 2], + ["ZMK", 0], +] as const satisfies [code: string, decimal_digits: number][]; + +type CurrencyCode = typeof rawData[number][0] | (string & {}); + +// Convert the raw data to a record of Currency objects +export const Currencies: Record = Object.fromEntries(rawData.map(([code, decimal_digits]) => [code as any, { decimal_digits, code }])); diff --git a/src/lib/currency.ts b/src/lib/currency.ts index 4adff24..f4f8c8a 100644 --- a/src/lib/currency.ts +++ b/src/lib/currency.ts @@ -1,9 +1,4 @@ export interface Currency { - symbol: string - name: string - symbol_native: string decimal_digits: number - rounding: number code: string - name_plural: string -} \ No newline at end of file +} From b9892ea742144730137b7d3b067b4edb0d0640e2 Mon Sep 17 00:00:00 2001 From: Sebastian Langer Date: Wed, 26 Feb 2025 11:10:11 +0100 Subject: [PATCH 13/20] fix allocation bug with macord161/ts-money#5 --- src/index.ts | 7 +++---- test/money.test.ts | 18 +++++++++++++----- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/index.ts b/src/index.ts index 71a0211..b7ebc1d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -277,6 +277,9 @@ class Money { }) for (let i = 0; remainder > 0; i++) { + while(results[i].amount === 0) { + i++ + } results[i] = new Money(results[i].amount + 1, results[i].currency) remainder-- } @@ -425,10 +428,6 @@ class Money { getCurrencyInfo(): Currency { return getCurrencyObject(this.currency) } - - } -Object.assign(Money, Currencies) - export { Money, Currencies, Currency } diff --git a/test/money.test.ts b/test/money.test.ts index 61726eb..0fca504 100644 --- a/test/money.test.ts +++ b/test/money.test.ts @@ -237,6 +237,19 @@ describe('Money', function () { expect(results[2].currency).to.equal('EUR'); }); + it('should allocate correctly with a zero rate', function() { + var subject = new Money(29900, Currencies.EUR); + var results = subject.allocate([265.09, 0, 33.91]); + + expect(results.length).to.equal(3); + expect(results[0].amount).to.equal(26509); + expect(results[0].currency).to.equal('EUR'); + expect(results[1].amount).to.equal(0); + expect(results[1].currency).to.equal('EUR'); + expect(results[2].amount).to.equal(3391); + expect(results[2].currency).to.equal('EUR'); + }); + it('zero check works correctly', function() { var subject = new Money(1000, 'EUR'); var subject1 = new Money(0, 'EUR'); @@ -354,13 +367,8 @@ describe('Money', function () { describe('Currencies', () => { it('should be extansible', function () { Currencies.LTC = { - symbol: "Ł", - name: "Litecoin", - symbol_native: "Ł", decimal_digits: 8, - rounding: 0, code: "LTC", - name_plural: "Litecoins" } let m1 = new Money(1, 'LTC') From 7cfdccfd07f6b763c46865b698b6324d9a45c6f9 Mon Sep 17 00:00:00 2001 From: Sebastian Langer Date: Wed, 26 Feb 2025 11:10:26 +0100 Subject: [PATCH 14/20] prepare 1.0.0 release --- README.md | 31 +- package-lock.json | 757 +--------------------------------------------- package.json | 4 +- 3 files changed, 18 insertions(+), 774 deletions(-) diff --git a/README.md b/README.md index 02d4553..402f7fc 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ -# TS Money +# @screeny05/ts-money -[![NPM version](https://img.shields.io/npm/v/@screeny05/ts-money.svg)](https://www.npmjs.com/package/@screeny05/ts-money) -[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT) +[![NPM version](https://img.shields.io/npm/v/@screeny05/ts-money.svg?style=flat-square)](https://www.npmjs.com/package/@screeny05/ts-money) +[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg?style=flat-square)](https://opensource.org/licenses/MIT) [![](https://img.shields.io/npm/dm/@screeny05/ts-money.svg?style=flat-square)](https://www.npmjs.com/package/@screeny05/ts-money) -[![](https://img.shields.io/npm/dt/@screeny05/ts-money.svg?style=flat-square)](https://www.npmjs.com/package/@screeny05/ts-money) +[![](https://deno.bundlejs.com/?q=@screeny05/ts-money&badge&badge-style=flat-square)](https://www.npmjs.com/package/@screeny05/ts-money) TS Money is a Typescript port of the great [js-money](https://www.npmjs.com/package/js-money) package, which is an implementation of Martin Fowlers [Money pattern](http://martinfowler.com/eaaCatalog/money.html). @@ -14,6 +14,13 @@ TS Money is a Typescript port of the great [js-money](https://www.npmjs.com/pack npm install ts-money ``` +## Differences from original [ts-money](https://github.com/macor161/ts-money) + +- Currencies are now exported in a standalone object. +- Fixed bug with allocate method when a single allocation is zero. (thanks to [@dotpack](https://github.com/dotpack), see [PR #5](https://github.com/macor161/ts-money/pull/5)) +- Drastically reduced bundle-size by getting rid of lodash and removing unnecessary currency-data. + - Instead of using currency-data like currency-name, symbols, etc. from this package you should rely on either your environments [Intl.DisplayNames](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) API or the [currency-codes](https://www.npmjs.com/package/currency-codes) package. +- Migrated package to vitest and unbuild. ## Usage @@ -59,13 +66,8 @@ The `Currency` interface hold the following properties: ```typescript interface Currency { - symbol: string - name: string - symbol_native: string decimal_digits: number - rounding: number code: string - name_plural: string } ``` @@ -75,13 +77,8 @@ Ex: import { Currency } from '@screeny05/ts-money' const usd: Currency = { - "symbol": "$", - "name": "US Dollar", - "symbol_native": "$", - "decimal_digits": 2, - "rounding": 0, - "code": "USD", - "name_plural": "US dollars" + decimal_digits: 2, + code: "USD", } ``` @@ -115,7 +112,7 @@ Will divide the funds based on the ratio without losing any pennies. const tenEur = new Money(1000, Currencies.EUR) // divide 10 EUR into 3 parts -const shares = tenEur.allocate([1,1,1]) +const shares = tenEur.allocate([1, 1, 1]) // returns an array of Money instances worth [334,333,333] // split 5 EUR 70/30 diff --git a/package-lock.json b/package-lock.json index 4efc4ee..00bf229 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,17 +1,15 @@ { "name": "@screeny05/ts-money", - "version": "0.6.0", + "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@screeny05/ts-money", - "version": "0.6.0", + "version": "1.0.0", "license": "MIT", "devDependencies": { "@types/node": "^20.14.15", - "chai": "1.x.x", - "mocha": "^10.0.0", "typescript": "^5.5.4", "unbuild": "^2.0.0", "vite": "^5.4.1", @@ -1230,12 +1228,6 @@ "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==", "dev": true }, - "node_modules/@ungap/promise-all-settled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", - "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", - "dev": true - }, "node_modules/@vitest/expect": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-2.0.5.tgz", @@ -1372,67 +1364,6 @@ "node": ">=0.4.0" } }, - "node_modules/ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "dev": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "node_modules/assertion-error": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.0.0.tgz", - "integrity": "sha1-x/hUOP3UZrx8oWq5DIFRN5el0js=", - "dev": true, - "engines": { - "node": "*" - } - }, "node_modules/autoprefixer": { "version": "10.4.20", "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.20.tgz", @@ -1476,15 +1407,6 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, - "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/boolbase": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", @@ -1512,12 +1434,6 @@ "node": ">=8" } }, - "node_modules/browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true - }, "node_modules/browserslist": { "version": "4.23.3", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.3.tgz", @@ -1571,18 +1487,6 @@ "node": ">=8" } }, - "node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/caniuse-api": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz", @@ -1615,47 +1519,6 @@ } ] }, - "node_modules/chai": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/chai/-/chai-1.10.0.tgz", - "integrity": "sha1-5AMcyHZURhp1lD5aNatG6vOcHrk=", - "dev": true, - "dependencies": { - "assertion-error": "1.0.0", - "deep-eql": "0.1.3" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/chalk/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/check-error": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.1.tgz", @@ -1665,33 +1528,6 @@ "node": ">= 16" } }, - "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, "node_modules/citty": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/citty/-/citty-0.1.6.tgz", @@ -1701,35 +1537,6 @@ "consola": "^3.2.3" } }, - "node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, "node_modules/colord": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/colord/-/colord-2.9.3.tgz", @@ -1751,12 +1558,6 @@ "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", "dev": true }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, "node_modules/confbox": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.1.7.tgz", @@ -1989,30 +1790,6 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, - "node_modules/decamelize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/deep-eql": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-0.1.3.tgz", - "integrity": "sha1-71WKyrjeJSBs1xOQbXTlaTDrafI=", - "dev": true, - "dependencies": { - "type-detect": "0.1.1" - }, - "engines": { - "node": "*" - } - }, "node_modules/deepmerge": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", @@ -2028,15 +1805,6 @@ "integrity": "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==", "dev": true }, - "node_modules/diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", - "dev": true, - "engines": { - "node": ">=0.3.1" - } - }, "node_modules/dir-glob": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", @@ -2110,12 +1878,6 @@ "integrity": "sha512-HfkT8ndXR0SEkU8gBQQM3rz035bpE/hxkZ1YIt4KJPEFES68HfIU6LzKukH0H794Lm83WJtkSAMfEToxCs15VA==", "dev": true }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, "node_modules/entities": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", @@ -2175,18 +1937,6 @@ "node": ">=6" } }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/estree-walker": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", @@ -2253,31 +2003,6 @@ "node": ">=8" } }, - "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true, - "bin": { - "flat": "cli.js" - } - }, "node_modules/fraction.js": { "version": "4.3.7", "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz", @@ -2329,15 +2054,6 @@ "node": ">=6.9.0" } }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, "node_modules/get-func-name": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", @@ -2359,27 +2075,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/glob-parent": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", @@ -2392,28 +2087,6 @@ "node": ">= 6" } }, - "node_modules/glob/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/glob/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", @@ -2442,15 +2115,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/hasown": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", @@ -2463,15 +2127,6 @@ "node": ">= 0.4" } }, - "node_modules/he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true, - "bin": { - "he": "bin/he" - } - }, "node_modules/hookable": { "version": "5.5.3", "resolved": "https://registry.npmjs.org/hookable/-/hookable-5.5.3.tgz", @@ -2513,18 +2168,6 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/is-builtin-module": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.1.tgz", @@ -2564,15 +2207,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -2600,15 +2234,6 @@ "node": ">=0.12.0" } }, - "node_modules/is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/is-reference": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", @@ -2630,18 +2255,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -2663,18 +2276,6 @@ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true }, - "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -2711,21 +2312,6 @@ "url": "https://github.com/sponsors/antonk52" } }, - "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", @@ -2738,22 +2324,6 @@ "integrity": "sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==", "dev": true }, - "node_modules/log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dev": true, - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/loupe": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.1.tgz", @@ -3298,47 +2868,6 @@ "ufo": "^1.5.3" } }, - "node_modules/mocha": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.0.0.tgz", - "integrity": "sha512-0Wl+elVUD43Y0BqPZBzZt8Tnkw9CMUdNYnUsTfOM1vuhJVZL+kiesFYsqwBkEEuEixaiPe5ZQdqDgX2jddhmoA==", - "dev": true, - "dependencies": { - "@ungap/promise-all-settled": "1.1.2", - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.4", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.2.0", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "5.0.1", - "ms": "2.1.3", - "nanoid": "3.3.3", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "workerpool": "6.2.1", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha.js" - }, - "engines": { - "node": ">= 14.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" - } - }, "node_modules/mri": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", @@ -3348,39 +2877,12 @@ "node": ">=4" } }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "node_modules/nanoid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", - "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", - "dev": true, - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, "node_modules/node-releases": { "version": "2.0.18", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", "dev": true }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/normalize-range": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", @@ -3453,54 +2955,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -4102,36 +3556,6 @@ } ] }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/resolve": { "version": "1.22.8", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", @@ -4220,26 +3644,6 @@ "queue-microtask": "^1.2.2" } }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, "node_modules/scule": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/scule/-/scule-1.3.0.tgz", @@ -4258,15 +3662,6 @@ "node": ">=10" } }, - "node_modules/serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", - "dev": true, - "dependencies": { - "randombytes": "^2.1.0" - } - }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -4339,32 +3734,6 @@ "integrity": "sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==", "dev": true }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/strip-final-newline": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", @@ -4377,18 +3746,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/stylehacks": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-7.0.3.tgz", @@ -4405,21 +3762,6 @@ "postcss": "^8.4.31" } }, - "node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", @@ -4511,15 +3853,6 @@ "node": ">=8.0" } }, - "node_modules/type-detect": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-0.1.1.tgz", - "integrity": "sha1-C6XsKohWQORw6k6FBZcZANrFiCI=", - "dev": true, - "engines": { - "node": "*" - } - }, "node_modules/typescript": { "version": "5.5.4", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", @@ -5351,103 +4684,17 @@ "node": ">=8" } }, - "node_modules/workerpool": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", - "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", - "dev": true - }, - "node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, "node_modules/yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true - }, - "node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-unparser": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", - "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", - "dev": true, - "dependencies": { - "camelcase": "^6.0.0", - "decamelize": "^4.0.0", - "flat": "^5.0.2", - "is-plain-obj": "^2.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } } } } diff --git a/package.json b/package.json index 0a11a6e..ee11ebc 100644 --- a/package.json +++ b/package.json @@ -2,8 +2,8 @@ "name": "@screeny05/ts-money", "type": "module", "sideEffects": false, - "description": "Typescript port of js-money. Implementation of the Money value object.", - "version": "0.6.1", + "description": "Maintained and improved version of ts-money.", + "version": "1.0.0", "exports": { ".": { "types": "./dist/index.d.ts", From 9b8ed36ff1d15527818371c2ebf59cd3895f41af Mon Sep 17 00:00:00 2001 From: Sebastian Langer Date: Wed, 26 Feb 2025 11:19:54 +0100 Subject: [PATCH 15/20] prepare release 0.7.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e67505b..afe6137 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "type": "module", "sideEffects": false, "description": "Typescript port of js-money. Implementation of the Money value object.", - "version": "0.6.1", + "version": "0.7.0", "exports": { ".": { "types": "./dist/index.d.ts", From 9a2bae129f9fa53827e4c09141fbfd6336b2c5ba Mon Sep 17 00:00:00 2001 From: Sebastian Langer Date: Wed, 26 Feb 2025 11:26:11 +0100 Subject: [PATCH 16/20] correct link to bundlejs in readme --- README.md | 47 ++++++++++++++++++++++------------------------- 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 402f7fc..cf1805d 100644 --- a/README.md +++ b/README.md @@ -3,10 +3,9 @@ [![NPM version](https://img.shields.io/npm/v/@screeny05/ts-money.svg?style=flat-square)](https://www.npmjs.com/package/@screeny05/ts-money) [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg?style=flat-square)](https://opensource.org/licenses/MIT) [![](https://img.shields.io/npm/dm/@screeny05/ts-money.svg?style=flat-square)](https://www.npmjs.com/package/@screeny05/ts-money) -[![](https://deno.bundlejs.com/?q=@screeny05/ts-money&badge&badge-style=flat-square)](https://www.npmjs.com/package/@screeny05/ts-money) +[![](https://deno.bundlejs.com/?q=@screeny05/ts-money&badge&badge-style=flat-square)](https://bundlejs.com/?q=%40screeny05%2Fts-money) - -TS Money is a Typescript port of the great [js-money](https://www.npmjs.com/package/js-money) package, which is an implementation of Martin Fowlers [Money pattern](http://martinfowler.com/eaaCatalog/money.html). +TS Money is a Typescript port of the great [js-money](https://www.npmjs.com/package/js-money) package, which is an implementation of Martin Fowlers [Money pattern](http://martinfowler.com/eaaCatalog/money.html). ## Install @@ -19,7 +18,7 @@ npm install ts-money - Currencies are now exported in a standalone object. - Fixed bug with allocate method when a single allocation is zero. (thanks to [@dotpack](https://github.com/dotpack), see [PR #5](https://github.com/macor161/ts-money/pull/5)) - Drastically reduced bundle-size by getting rid of lodash and removing unnecessary currency-data. - - Instead of using currency-data like currency-name, symbols, etc. from this package you should rely on either your environments [Intl.DisplayNames](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) API or the [currency-codes](https://www.npmjs.com/package/currency-codes) package. + - Instead of using currency-data like currency-name, symbols, etc. from this package you should rely on either your environments [Intl.DisplayNames](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) API or the [currency-codes](https://www.npmjs.com/package/currency-codes) package. - Migrated package to vitest and unbuild. ## Usage @@ -41,9 +40,10 @@ const Currencies = TsMoney.Currencies ### Creating a new instance There are multiple options of what to pass into the constructor to create a new Money instance: -* amount as number, currency as string -* amount as number, currency as object -* object with amount and currency fields (only with `fromInteger` and `fromDecimal` methods) + +- amount as number, currency as string +- amount as number, currency as object +- object with amount and currency fields (only with `fromInteger` and `fromDecimal` methods) Amounts can be supplied either as integers or decimal numbers. @@ -66,8 +66,8 @@ The `Currency` interface hold the following properties: ```typescript interface Currency { - decimal_digits: number - code: string + decimal_digits: number + code: string } ``` @@ -77,8 +77,8 @@ Ex: import { Currency } from '@screeny05/ts-money' const usd: Currency = { - decimal_digits: 2, - code: "USD", + decimal_digits: 2, + code: 'USD', } ``` @@ -92,21 +92,21 @@ const fiveEur = new Money(500, Currencies.EUR) // 5 EUR // add fiveEur.add(new Money(250, Currencies.EUR)) // 7.50 EUR -// subtract +// subtract fiveEur.subtract(new Money(470, Currencies.EUR)) // 0.30 EUR // multiply fiveEur.multiply(1.2345) // 6.17 EUR fiveEur.multiply(1.2345, Math.ceil) // 6.18 EUR -// divide +// divide fiveEur.divide(2.3456) // 2.13 EUR fiveEur.divide(2.3456, Math.ceil) // 2.14 EUR ``` ### Allocating funds -Will divide the funds based on the ratio without losing any pennies. +Will divide the funds based on the ratio without losing any pennies. ```typescript const tenEur = new Money(1000, Currencies.EUR) @@ -117,9 +117,8 @@ const shares = tenEur.allocate([1, 1, 1]) // split 5 EUR 70/30 const fiveEur = new Money(500, Currencies.EUR) -const shares = fiveEur.allocate([70,30]) +const shares = fiveEur.allocate([70, 30]) // returns an array of money [350,150] - ``` ### Comparison and equality @@ -148,7 +147,6 @@ fiveEur.lessThan(sevenEur) // return true fiveEur.lessThanOrEqual(fiveEur) // return true ``` - ## Modifications Some changes have been made compared with the javascript version: @@ -161,19 +159,18 @@ Currencies are now exported in a standalone object: import { Money, Currencies } from '@screeny05/ts-money' Currencies.LTC = { - symbol: "Ł", - name: "Litecoin", - symbol_native: "Ł", - decimal_digits: 8, - rounding: 0, - code: "LTC", - name_plural: "Litecoins" + symbol: 'Ł', + name: 'Litecoin', + symbol_native: 'Ł', + decimal_digits: 8, + rounding: 0, + code: 'LTC', + name_plural: 'Litecoins', } const m1 = new Money(12, 'LTC') const m2 = new Money(234, Currencies.USD) const m3 = new Money(543, Currencies.LTC) - ``` ### Case insensitive currencies From 09bec24b2c8b8eda2e2a668e9f564ba14c117ce3 Mon Sep 17 00:00:00 2001 From: Sebastian Langer Date: Wed, 26 Feb 2025 11:30:14 +0100 Subject: [PATCH 17/20] fix wrong currency-type in readme --- README.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/README.md b/README.md index cf1805d..0076b23 100644 --- a/README.md +++ b/README.md @@ -159,13 +159,8 @@ Currencies are now exported in a standalone object: import { Money, Currencies } from '@screeny05/ts-money' Currencies.LTC = { - symbol: 'Ł', - name: 'Litecoin', - symbol_native: 'Ł', decimal_digits: 8, - rounding: 0, code: 'LTC', - name_plural: 'Litecoins', } const m1 = new Money(12, 'LTC') From cf9827a491770953d39395037e7f2181f5d0a7da Mon Sep 17 00:00:00 2001 From: Sebastian Langer Date: Wed, 26 Feb 2025 11:36:39 +0100 Subject: [PATCH 18/20] use correct typescript declaration file for cjs entry-point --- package.json | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index b521b99..fd73847 100644 --- a/package.json +++ b/package.json @@ -3,12 +3,17 @@ "type": "module", "sideEffects": false, "description": "Maintained and improved version of ts-money.", - "version": "1.0.0", + "version": "1.0.1", "exports": { ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.mjs", - "require": "./dist/index.cjs" + "import": { + "default": "./dist/index.mjs", + "types": "./dist/index.d.mts" + }, + "require": { + "default": "./dist/index.cjs", + "types": "./dist/index.d.cts" + } } }, "main": "./dist/index.mjs", From 6e2211f84a7f5735b23fe476b63b548e732c5ca9 Mon Sep 17 00:00:00 2001 From: Sebastian Langer Date: Wed, 14 May 2025 00:38:45 +0200 Subject: [PATCH 19/20] add Money#fractionOf and Money#percentageOf --- .prettierrc.json | 16 +- README.md | 12 +- package.json | 2 +- src/index.ts | 700 ++++++++++++++++++++------------------ src/lib/currencies.ts | 390 ++++++++++----------- src/lib/currency.ts | 4 +- test/money.test.ts | 774 +++++++++++++++++++++++------------------- 7 files changed, 1006 insertions(+), 892 deletions(-) diff --git a/.prettierrc.json b/.prettierrc.json index 23aa6e2..01a895a 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -1,10 +1,10 @@ { - "arrowParens": "always", - "bracketSpacing": true, - "printWidth": 88, - "semi": false, - "singleQuote": true, - "tabWidth": 2, - "trailingComma": "all", - "useTabs": false + "arrowParens": "always", + "bracketSpacing": true, + "printWidth": 88, + "semi": false, + "singleQuote": true, + "tabWidth": 2, + "trailingComma": "all", + "useTabs": false } diff --git a/README.md b/README.md index 0076b23..73cb23d 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ TS Money is a Typescript port of the great [js-money](https://www.npmjs.com/pack ## Install ```sh -npm install ts-money +npm install @screeny05/ts-money ``` ## Differences from original [ts-money](https://github.com/macor161/ts-money) @@ -19,6 +19,8 @@ npm install ts-money - Fixed bug with allocate method when a single allocation is zero. (thanks to [@dotpack](https://github.com/dotpack), see [PR #5](https://github.com/macor161/ts-money/pull/5)) - Drastically reduced bundle-size by getting rid of lodash and removing unnecessary currency-data. - Instead of using currency-data like currency-name, symbols, etc. from this package you should rely on either your environments [Intl.DisplayNames](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) API or the [currency-codes](https://www.npmjs.com/package/currency-codes) package. +- Added `Money.from(amount: Amount)` as shortcut for `Money.fromInteger(amount: Amount)` +- Added `Money#fractionOf()` and `Money#percentageOf()` (see [below](#basic-arithmetics)) - Migrated package to vitest and unbuild. ## Usage @@ -102,6 +104,14 @@ fiveEur.multiply(1.2345, Math.ceil) // 6.18 EUR // divide fiveEur.divide(2.3456) // 2.13 EUR fiveEur.divide(2.3456, Math.ceil) // 2.14 EUR + +// fraction calculation +fiveEur.fractionOf(new Money(750, Currencies.EUR)) // 0.6667 + +// percentage calculation (same as fraction but with rounding and precision) +fiveEur.percentageOf(new Money(750, Currencies.EUR)) // 67 +fiveEur.percentageOf(new Money(750, Currencies.EUR), 2) // 66.67 +fiveEur.percentageOf(new Money(750, Currencies.EUR), 2, 'floor') // 66.66 ``` ### Allocating funds diff --git a/package.json b/package.json index fd73847..90a1e76 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "type": "module", "sideEffects": false, "description": "Maintained and improved version of ts-money.", - "version": "1.0.1", + "version": "1.1.0", "exports": { ".": { "import": { diff --git a/src/index.ts b/src/index.ts index b7ebc1d..6e2cbad 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,64 +1,58 @@ import type { Currency } from './lib/currency' import { Currencies } from './lib/currencies' -export type Rounder = 'round' | 'floor' | 'ceil' | Function; +export type Rounder = 'round' | 'floor' | 'ceil' | Function export interface Amount { - amount: number; - currency: string | Currency + amount: number + currency: string | Currency } let isInt = function (n: any) { - return Number(n) === n && n % 1 === 0 + return Number(n) === n && n % 1 === 0 } let decimalPlaces = function (num: number) { - let match = ('' + num).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/) + let match = ('' + num).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/) - if (!match) - return 0 + if (!match) return 0 - return Math.max(0, - (match[1] ? match[1].length : 0) - (match[2] ? +match[2] : 0)) + return Math.max(0, (match[1] ? match[1].length : 0) - (match[2] ? +match[2] : 0)) } let assertSameCurrency = function (left: Money, right: Money) { - if (left.currency !== right.currency) - throw new Error('Different currencies') + if (left.currency !== right.currency) throw new Error('Different currencies') } let assertType = function (other: any) { - if (!(other instanceof Money)) - throw new TypeError('Instance of Money required') + if (!(other instanceof Money)) throw new TypeError('Instance of Money required') } let assertOperand = function (operand: any) { - if (Number.isNaN(parseFloat(operand)) && !isFinite(operand)) - throw new TypeError('Operand must be a number') + if (Number.isNaN(parseFloat(operand)) && !isFinite(operand)) + throw new TypeError('Operand must be a number') } let getCurrencyObject = function (currency: string): Currency { - let currencyObj = Currencies[currency] + let currencyObj = Currencies[currency] - if (currencyObj) { - return currencyObj + if (currencyObj) { + return currencyObj + } else { + for (let key in Currencies) { + if (key.toUpperCase() === currency.toUpperCase()) return Currencies[key] } - else { - for (let key in Currencies) { - if (key.toUpperCase() === currency.toUpperCase()) - return Currencies[key] - } - } - throw new TypeError(`No currency found with code ${currency}`); + } + throw new TypeError(`No currency found with code ${currency}`) } let isObjectLike = (value: any): boolean => { - return value !== null && typeof value === 'object' + return value !== null && typeof value === 'object' } let isObject = (value: any): boolean => { - const type = typeof value - return value != null && (type === 'object' || type === 'function') + const type = typeof value + return value != null && (type === 'object' || type === 'function') } let getTag = (value: any): string => { @@ -69,365 +63,411 @@ let getTag = (value: any): string => { } let isPlainObject = (value: any): boolean => { - if (!isObjectLike(value) || getTag(value) != '[object Object]') { - return false - } - if (Object.getPrototypeOf(value) === null) { - return true - } - let proto = value - while (Object.getPrototypeOf(proto) !== null) { - proto = Object.getPrototypeOf(proto) - } - return Object.getPrototypeOf(value) === proto + if (!isObjectLike(value) || getTag(value) != '[object Object]') { + return false + } + if (Object.getPrototypeOf(value) === null) { + return true + } + let proto = value + while (Object.getPrototypeOf(proto) !== null) { + proto = Object.getPrototypeOf(proto) + } + return Object.getPrototypeOf(value) === proto } function isAmountObject(amount: number | Amount): amount is Amount { - return isObject(amount) + return isObject(amount) } class Money { + amount: number + currency: string + + /** + * Creates a new Money instance. + * The created Money instances is a value object thus it is immutable. + * + * @param {Number} amount + * @param {Object/String} currency + * @returns {Money} + * @constructor + */ + constructor(amount: number, currency: Currency | string) { + if (typeof currency === 'string') currency = getCurrencyObject(currency) + + if (!isPlainObject(currency)) throw new TypeError('Invalid currency') + + if (!isInt(amount)) throw new TypeError('Amount must be an integer') + + this.amount = amount + this.currency = currency.code + Object.freeze(this) + } - amount: number - currency: string + /** + * Creates a new Money instance from an amount object. + * + * Amount is assumed to be an integer-amount of the currencies smallest unit. + * + * @param {Number} amount + * @returns {Money} + */ + static from(amount: Amount): Money { + return Money.fromInteger(amount) + } + static fromInteger(amount: Amount): Money + static fromInteger(amount: number, currency: Currency | string): Money + static fromInteger(amount: number | Amount, currency?: Currency | string): Money { + if (isAmountObject(amount)) { + if (amount.amount === undefined || amount.currency === undefined) + throw new TypeError('Missing required parameters amount,currency') - /** - * Creates a new Money instance. - * The created Money instances is a value object thus it is immutable. - * - * @param {Number} amount - * @param {Object/String} currency - * @returns {Money} - * @constructor - */ - constructor(amount: number, currency: Currency | string) { - if (typeof currency === 'string') - currency = getCurrencyObject(currency) + currency = amount.currency + amount = amount.amount + } - if (!isPlainObject(currency)) - throw new TypeError('Invalid currency') + if (!isInt(amount)) throw new TypeError('Amount must be an integer value') - if (!isInt(amount)) - throw new TypeError('Amount must be an integer') + if (!currency) throw new TypeError('Missing required parameter currency') - this.amount = amount - this.currency = currency.code - Object.freeze(this) + return new Money(amount, currency) + } + + static fromDecimal(amount: Amount, rounder?: Rounder): Money + static fromDecimal( + amount: number, + currency: string | Currency, + rounder?: Rounder, + ): Money + static fromDecimal( + amount: number | Amount, + currency: string | Currency | any, + rounder?: Rounder, + ): Money { + if (isAmountObject(amount)) { + if (amount.amount === undefined || amount.currency === undefined) + throw new TypeError('Missing required parameters amount,currency') + + rounder = currency + currency = amount.currency + amount = amount.amount } - static fromInteger(amount: Amount): Money; - static fromInteger(amount: number, currency: Currency | string): Money - static fromInteger(amount: number | Amount, currency?: Currency | string): Money { - if (isAmountObject(amount)) { - if (amount.amount === undefined || amount.currency === undefined) - throw new TypeError('Missing required parameters amount,currency') + if (typeof currency === 'string') currency = getCurrencyObject(currency) + + if (!isPlainObject(currency)) throw new TypeError('Invalid currency') - currency = amount.currency - amount = amount.amount - } + if (rounder === undefined) { + let decimals = decimalPlaces(amount) - if (!isInt(amount)) - throw new TypeError('Amount must be an integer value') + if (decimals > currency.decimal_digits) + throw new Error( + `The currency ${currency.code} supports only` + + ` ${currency.decimal_digits} decimal digits`, + ) - if (!currency) - throw new TypeError('Missing required parameter currency') + rounder = Math.round + } else { + if ( + ['round', 'floor', 'ceil'].indexOf(rounder as string) === -1 && + typeof rounder !== 'function' + ) + throw new TypeError('Invalid parameter rounder') - return new Money(amount, currency) + if (typeof rounder === 'string') rounder = Math[rounder] } - static fromDecimal(amount: Amount, rounder?: Rounder): Money; - static fromDecimal(amount: number, currency: string | Currency, rounder?: Rounder): Money; - static fromDecimal(amount: number | Amount, currency: string | Currency | any, rounder?: Rounder): Money { - if (isAmountObject(amount)) { - if (amount.amount === undefined || amount.currency === undefined) - throw new TypeError('Missing required parameters amount,currency') + let precisionMultiplier = Math.pow(10, currency.decimal_digits) + let resultAmount = amount * precisionMultiplier - rounder = currency - currency = amount.currency - amount = amount.amount - } + resultAmount = (rounder as Function)(resultAmount) - if (typeof currency === 'string') - currency = getCurrencyObject(currency) + return new Money(resultAmount, currency) + } - if (!isPlainObject(currency)) - throw new TypeError('Invalid currency') + /** + * Returns true if the two instances of Money are equal, false otherwise. + * + * @param {Money} other + * @returns {Boolean} + */ + equals(other: Money): boolean { + let self = this + assertType(other) + + return self.amount === other.amount && self.currency === other.currency + } - if (rounder === undefined) { - let decimals = decimalPlaces(amount) + /** + * Adds the two objects together creating a new Money instance that holds the result of the operation. + * + * @param {Money} other + * @returns {Money} + */ + add(other: Money): Money { + let self = this + assertType(other) + assertSameCurrency(self, other) + + return new Money(self.amount + other.amount, self.currency) + } - if (decimals > currency.decimal_digits) - throw new Error(`The currency ${currency.code} supports only` + - ` ${currency.decimal_digits} decimal digits`) + /** + * Subtracts the two objects creating a new Money instance that holds the result of the operation. + * + * @param {Money} other + * @returns {Money} + */ + subtract(other: Money): Money { + let self = this + assertType(other) + assertSameCurrency(self, other) + + return new Money(self.amount - other.amount, self.currency) + } - rounder = Math.round - } else { - if (['round', 'floor', 'ceil'].indexOf(rounder as string) === -1 && typeof rounder !== 'function') - throw new TypeError('Invalid parameter rounder') + /** + * Multiplies the object by the multiplier returning a new Money instance that holds the result of the operation. + * + * @param {Number} multiplier + * @param {Function} [fn=Math.round] + * @returns {Money} + */ + multiply(multiplier: number, fn?: Function): Money { + if (typeof fn !== 'function') fn = Math.round - if (typeof rounder === 'string') - rounder = Math[rounder] - } + assertOperand(multiplier) + let amount = fn(this.amount * multiplier) - let precisionMultiplier = Math.pow(10, currency.decimal_digits) - let resultAmount = amount * precisionMultiplier + return new Money(amount, this.currency) + } - resultAmount = (rounder as Function)(resultAmount) + /** + * Divides the object by the multiplier returning a new Money instance that holds the result of the operation. + * + * @param {Number} divisor + * @param {Function} [fn=Math.round] + * @returns {Money} + */ + divide(divisor: number, fn?: Function): Money { + if (typeof fn !== 'function') fn = Math.round - return new Money(resultAmount, currency) - } + assertOperand(divisor) + let amount = fn(this.amount / divisor) - /** - * Returns true if the two instances of Money are equal, false otherwise. - * - * @param {Money} other - * @returns {Boolean} - */ - equals(other: Money): boolean { - let self = this - assertType(other) - - return self.amount === other.amount && - self.currency === other.currency - } + return new Money(amount, this.currency) + } - /** - * Adds the two objects together creating a new Money instance that holds the result of the operation. - * - * @param {Money} other - * @returns {Money} - */ - add(other: Money): Money { - let self = this - assertType(other) - assertSameCurrency(self, other) - - return new Money(self.amount + other.amount, self.currency) + /** + * Allocates fund bases on the ratios provided returing an array of objects as a product of the allocation. + * + * @param {Array} other + * @returns {Array.Money} + */ + allocate(ratios: number[]): Money[] { + let self = this + let remainder = self.amount + let results: Money[] = [] + let total = 0 + + ratios.forEach(function (ratio) { + total += ratio + }) + + ratios.forEach(function (ratio) { + let share = Math.floor((self.amount * ratio) / total) + results.push(new Money(share, self.currency)) + remainder -= share + }) + + for (let i = 0; remainder > 0; i++) { + while (results[i].amount === 0) { + i++ + } + results[i] = new Money(results[i].amount + 1, results[i].currency) + remainder-- } - /** - * Subtracts the two objects creating a new Money instance that holds the result of the operation. - * - * @param {Money} other - * @returns {Money} - */ - subtract(other: Money): Money { - let self = this - assertType(other) - assertSameCurrency(self, other) - - return new Money(self.amount - other.amount, self.currency) - } + return results + } - /** - * Multiplies the object by the multiplier returning a new Money instance that holds the result of the operation. - * - * @param {Number} multiplier - * @param {Function} [fn=Math.round] - * @returns {Money} - */ - multiply(multiplier: number, fn?: Function): Money { - if (typeof fn !== 'function') - fn = Math.round - - assertOperand(multiplier) - let amount = fn(this.amount * multiplier) - - return new Money(amount, this.currency) - } + /** + * Calculates which fraction of the other amount this amount is. + * E.g. 150 EUR is 75% of 200 EUR, so `new Money(1500, 'EUR').fractionOf(new Money(2000, 'EUR'))` returns 0.75. + * + * Division by zero will return 0. + * + * @param {Money} other + * @returns {number} + */ + fractionOf(other: Money): number { + let self = this + assertType(other) + assertSameCurrency(self, other) + + if (other.isZero()) return 0 + + return self.amount / other.amount + } - /** - * Divides the object by the multiplier returning a new Money instance that holds the result of the operation. - * - * @param {Number} divisor - * @param {Function} [fn=Math.round] - * @returns {Money} - */ - divide(divisor: number, fn?: Function): Money { - if (typeof fn !== 'function') - fn = Math.round - - assertOperand(divisor) - let amount = fn(this.amount / divisor) - - return new Money(amount, this.currency) - } + percentageOf( + other: Money, + precision: number = 0, + rounder: Rounder = 'round', + ): number { + const fraction = this.fractionOf(other) * 100 + const multiplier = Math.pow(10, precision) - /** - * Allocates fund bases on the ratios provided returing an array of objects as a product of the allocation. - * - * @param {Array} other - * @returns {Array.Money} - */ - allocate(ratios: number[]): Money[] { - let self = this - let remainder = self.amount - let results: Money[] = [] - let total = 0 - - ratios.forEach(function (ratio) { - total += ratio - }) - - ratios.forEach(function (ratio) { - let share = Math.floor(self.amount * ratio / total) - results.push(new Money(share, self.currency)) - remainder -= share - }) - - for (let i = 0; remainder > 0; i++) { - while(results[i].amount === 0) { - i++ - } - results[i] = new Money(results[i].amount + 1, results[i].currency) - remainder-- - } - - return results + if (typeof rounder === 'string') { + rounder = Math[rounder] } - /** - * Compares two instances of Money. - * - * @param {Money} other - * @returns {Number} - */ - compare(other: Money): number { - let self = this + return rounder(fraction * multiplier) / multiplier + } - assertType(other) - assertSameCurrency(self, other) + /** + * Compares two instances of Money. + * + * @param {Money} other + * @returns {Number} + */ + compare(other: Money): number { + let self = this - if (self.amount === other.amount) - return 0 + assertType(other) + assertSameCurrency(self, other) - return self.amount > other.amount ? 1 : -1 - } + if (self.amount === other.amount) return 0 - /** - * Checks whether the value represented by this object is greater than the other. - * - * @param {Money} other - * @returns {boolean} - */ - greaterThan(other: Money): boolean { - return 1 === this.compare(other) - } + return self.amount > other.amount ? 1 : -1 + } - /** - * Checks whether the value represented by this object is greater or equal to the other. - * - * @param {Money} other - * @returns {boolean} - */ - greaterThanOrEqual(other: Money): boolean { - return 0 <= this.compare(other) - } + /** + * Checks whether the value represented by this object is greater than the other. + * + * @param {Money} other + * @returns {boolean} + */ + greaterThan(other: Money): boolean { + return 1 === this.compare(other) + } - /** - * Checks whether the value represented by this object is less than the other. - * - * @param {Money} other - * @returns {boolean} - */ - lessThan(other: Money): boolean { - return -1 === this.compare(other) - } + /** + * Checks whether the value represented by this object is greater or equal to the other. + * + * @param {Money} other + * @returns {boolean} + */ + greaterThanOrEqual(other: Money): boolean { + return 0 <= this.compare(other) + } - /** - * Checks whether the value represented by this object is less than or equal to the other. - * - * @param {Money} other - * @returns {boolean} - */ - lessThanOrEqual(other: Money): boolean { - return 0 >= this.compare(other) - } + /** + * Checks whether the value represented by this object is less than the other. + * + * @param {Money} other + * @returns {boolean} + */ + lessThan(other: Money): boolean { + return -1 === this.compare(other) + } - /** - * Returns true if the amount is zero. - * - * @returns {boolean} - */ - isZero(): boolean { - return this.amount === 0 - } + /** + * Checks whether the value represented by this object is less than or equal to the other. + * + * @param {Money} other + * @returns {boolean} + */ + lessThanOrEqual(other: Money): boolean { + return 0 >= this.compare(other) + } - /** - * Returns true if the amount is positive. - * - * @returns {boolean} - */ - isPositive(): boolean { - return this.amount > 0 - } + /** + * Returns true if the amount is zero. + * + * @returns {boolean} + */ + isZero(): boolean { + return this.amount === 0 + } - /** - * Returns true if the amount is negative. - * - * @returns {boolean} - */ - isNegative(): boolean { - return this.amount < 0 - } + /** + * Returns true if the amount is positive. + * + * @returns {boolean} + */ + isPositive(): boolean { + return this.amount > 0 + } - /** - * Returns the decimal value as a float. - * - * @returns {number} - */ - toDecimal(): number { - return Number(this.toString()) - } + /** + * Returns true if the amount is negative. + * + * @returns {boolean} + */ + isNegative(): boolean { + return this.amount < 0 + } - /** - * Returns the decimal value as a string. - * - * @returns {string} - */ - toString(): string { - let currency = getCurrencyObject(this.currency) - return (this.amount / Math.pow(10, currency.decimal_digits)).toFixed(currency.decimal_digits) - } + /** + * Returns the decimal value as a float. + * + * @returns {number} + */ + toDecimal(): number { + return Number(this.toString()) + } - /** - * Returns a serialised version of the instance. - * - * @returns {{amount: number, currency: string}} - */ - toJSON(): {amount: number, currency: string} { - return { - amount: this.amount, - currency: this.currency - } - } + /** + * Returns the decimal value as a string. + * + * @returns {string} + */ + toString(): string { + let currency = getCurrencyObject(this.currency) + return (this.amount / Math.pow(10, currency.decimal_digits)).toFixed( + currency.decimal_digits, + ) + } - /** - * Returns the amount represented by this object. - * - * @returns {number} - */ - getAmount(): number { - return this.amount + /** + * Returns a serialised version of the instance. + * + * @returns {{amount: number, currency: string}} + */ + toJSON(): { amount: number; currency: string } { + return { + amount: this.amount, + currency: this.currency, } + } + /** + * Returns the amount represented by this object. + * + * @returns {number} + */ + getAmount(): number { + return this.amount + } - /** - * Returns the currency represented by this object. - * - * @returns {string} - */ - getCurrency(): string { - return this.currency - } + /** + * Returns the currency represented by this object. + * + * @returns {string} + */ + getCurrency(): string { + return this.currency + } - /** - * Returns the full currency object - */ - getCurrencyInfo(): Currency { - return getCurrencyObject(this.currency) - } + /** + * Returns the full currency object + */ + getCurrencyInfo(): Currency { + return getCurrencyObject(this.currency) + } } export { Money, Currencies, Currency } diff --git a/src/lib/currencies.ts b/src/lib/currencies.ts index a16e007..448de78 100644 --- a/src/lib/currencies.ts +++ b/src/lib/currencies.ts @@ -1,199 +1,201 @@ -import { Currency } from './currency'; +import { Currency } from './currency' const rawData = [ - ["USD", 2], - ["CAD", 2], - ["EUR", 2], - ["BTC", 8], - ["AED", 2], - ["AFN", 2], - ["ALL", 2], - ["AMD", 2], - ["ANG", 2], - ["AOA", 2], - ["ARS", 2], - ["AUD", 2], - ["AWG", 2], - ["AFL", 2], - ["AZN", 2], - ["BAM", 2], - ["BDT", 2], - ["BBD", 2], - ["BGN", 2], - ["BHD", 3], - ["BIF", 0], - ["BSD", 2], - ["BMD", 2], - ["BND", 2], - ["BOB", 2], - ["BOV", 2], - ["BRL", 2], - ["BTN", 2], - ["BWP", 2], - ["BYN", 0], - ["BZD", 2], - ["CDF", 2], - ["CHE", 2], - ["CHF", 2], - ["CHW", 2], - ["CLF", 4], - ["CLP", 0], - ["CNY", 2], - ["COP", 0], - ["COU", 2], - ["CRC", 2], - ["CUC", 2], - ["CUP", 0], - ["CVE", 0], - ["CZK", 2], - ["DJF", 0], - ["DKK", 2], - ["DOP", 2], - ["DZD", 2], - ["EEK", 2], - ["EGP", 2], - ["ERN", 2], - ["ETB", 2], - ["FJD", 2], - ["FKP", 2], - ["GBP", 2], - ["GEL", 2], - ["GGP", 2], - ["GHS", 2], - ["GIP", 2], - ["GMD", 2], - ["GNF", 0], - ["GTQ", 2], - ["GYD", 2], - ["HKD", 2], - ["HNL", 2], - ["HRK", 2], - ["HTG", 2], - ["HUF", 2], - ["IDR", 2], - ["ILS", 2], - ["IMP", 2], - ["INR", 2], - ["IQD", 3], - ["IRR", 2], - ["ISK", 0], - ["JEP", 2], - ["JMD", 2], - ["JOD", 3], - ["JPY", 0], - ["KES", 2], - ["KGS", 2], - ["KHR", 2], - ["KMF", 0], - ["KPW", 0], - ["KRW", 0], - ["KWD", 3], - ["KYD", 2], - ["KZT", 2], - ["LAK", 2], - ["LBP", 2], - ["LKR", 2], - ["LRD", 2], - ["LSL", 2], - ["LTL", 2], - ["LVL", 2], - ["LYD", 3], - ["MAD", 2], - ["MDL", 2], - ["MGA", 0], - ["MKD", 2], - ["MMK", 2], - ["MNT", 2], - ["MOP", 2], - ["MRO", 1], - ["MUR", 2], - ["MVR", 2], - ["MWK", 2], - ["MXN", 2], - ["MXV", 2], - ["MYR", 2], - ["MZN", 2], - ["NAD", 2], - ["NGN", 2], - ["NIO", 2], - ["NOK", 2], - ["NPR", 2], - ["PRB", 2], - ["NZD", 2], - ["OMR", 3], - ["PAB", 2], - ["PEN", 2], - ["PGK", 2], - ["PHP", 2], - ["PKR", 2], - ["PLN", 2], - ["PYG", 0], - ["QAR", 2], - ["RON", 2], - ["RSD", 2], - ["RUB", 2], - ["RWF", 0], - ["SAR", 2], - ["SBD", 2], - ["SCR", 2], - ["SDG", 2], - ["SEK", 2], - ["SGD", 2], - ["SHP", 2], - ["SLL", 2], - ["SOS", 2], - ["SRD", 2], - ["SSP", 2], - ["STD", 2], - ["SVC", 0], - ["SYP", 2], - ["SZL", 2], - ["THB", 2], - ["TJS", 2], - ["TMT", 2], - ["TND", 3], - ["TOP", 2], - ["TRY", 2], - ["TTD", 2], - ["TVD", 2], - ["TWD", 2], - ["TZS", 2], - ["UAH", 2], - ["UGX", 0], - ["USN", 2], - ["UYI", 0], - ["UYU", 2], - ["UZS", 2], - ["VEF", 2], - ["VND", 0], - ["VUV", 0], - ["WST", 2], - ["XAF", 0], - ["XAG", 0], - ["XAU", 0], - ["XBA", 0], - ["XBB", 0], - ["XBC", 0], - ["XBD", 0], - ["XCD", 0], - ["XDR", 0], - ["XOF", 0], - ["XPD", 0], - ["XPF", 0], - ["XPT", 0], - ["XSU", 0], - ["XTS", 0], - ["XUA", 0], - ["XXX", 0], - ["YER", 2], - ["ZAR", 2], - ["ZMK", 0], - ["ZMW", 2], - ["ZWD", 2], - ["ZWL", 2], -] as const satisfies [code: string, decimal_digits: number][]; + ['USD', 2], + ['CAD', 2], + ['EUR', 2], + ['BTC', 8], + ['AED', 2], + ['AFN', 2], + ['ALL', 2], + ['AMD', 2], + ['ANG', 2], + ['AOA', 2], + ['ARS', 2], + ['AUD', 2], + ['AWG', 2], + ['AFL', 2], + ['AZN', 2], + ['BAM', 2], + ['BDT', 2], + ['BBD', 2], + ['BGN', 2], + ['BHD', 3], + ['BIF', 0], + ['BSD', 2], + ['BMD', 2], + ['BND', 2], + ['BOB', 2], + ['BOV', 2], + ['BRL', 2], + ['BTN', 2], + ['BWP', 2], + ['BYN', 0], + ['BZD', 2], + ['CDF', 2], + ['CHE', 2], + ['CHF', 2], + ['CHW', 2], + ['CLF', 4], + ['CLP', 0], + ['CNY', 2], + ['COP', 0], + ['COU', 2], + ['CRC', 2], + ['CUC', 2], + ['CUP', 0], + ['CVE', 0], + ['CZK', 2], + ['DJF', 0], + ['DKK', 2], + ['DOP', 2], + ['DZD', 2], + ['EEK', 2], + ['EGP', 2], + ['ERN', 2], + ['ETB', 2], + ['FJD', 2], + ['FKP', 2], + ['GBP', 2], + ['GEL', 2], + ['GGP', 2], + ['GHS', 2], + ['GIP', 2], + ['GMD', 2], + ['GNF', 0], + ['GTQ', 2], + ['GYD', 2], + ['HKD', 2], + ['HNL', 2], + ['HRK', 2], + ['HTG', 2], + ['HUF', 2], + ['IDR', 2], + ['ILS', 2], + ['IMP', 2], + ['INR', 2], + ['IQD', 3], + ['IRR', 2], + ['ISK', 0], + ['JEP', 2], + ['JMD', 2], + ['JOD', 3], + ['JPY', 0], + ['KES', 2], + ['KGS', 2], + ['KHR', 2], + ['KMF', 0], + ['KPW', 0], + ['KRW', 0], + ['KWD', 3], + ['KYD', 2], + ['KZT', 2], + ['LAK', 2], + ['LBP', 2], + ['LKR', 2], + ['LRD', 2], + ['LSL', 2], + ['LTL', 2], + ['LVL', 2], + ['LYD', 3], + ['MAD', 2], + ['MDL', 2], + ['MGA', 0], + ['MKD', 2], + ['MMK', 2], + ['MNT', 2], + ['MOP', 2], + ['MRO', 1], + ['MUR', 2], + ['MVR', 2], + ['MWK', 2], + ['MXN', 2], + ['MXV', 2], + ['MYR', 2], + ['MZN', 2], + ['NAD', 2], + ['NGN', 2], + ['NIO', 2], + ['NOK', 2], + ['NPR', 2], + ['PRB', 2], + ['NZD', 2], + ['OMR', 3], + ['PAB', 2], + ['PEN', 2], + ['PGK', 2], + ['PHP', 2], + ['PKR', 2], + ['PLN', 2], + ['PYG', 0], + ['QAR', 2], + ['RON', 2], + ['RSD', 2], + ['RUB', 2], + ['RWF', 0], + ['SAR', 2], + ['SBD', 2], + ['SCR', 2], + ['SDG', 2], + ['SEK', 2], + ['SGD', 2], + ['SHP', 2], + ['SLL', 2], + ['SOS', 2], + ['SRD', 2], + ['SSP', 2], + ['STD', 2], + ['SVC', 0], + ['SYP', 2], + ['SZL', 2], + ['THB', 2], + ['TJS', 2], + ['TMT', 2], + ['TND', 3], + ['TOP', 2], + ['TRY', 2], + ['TTD', 2], + ['TVD', 2], + ['TWD', 2], + ['TZS', 2], + ['UAH', 2], + ['UGX', 0], + ['USN', 2], + ['UYI', 0], + ['UYU', 2], + ['UZS', 2], + ['VEF', 2], + ['VND', 0], + ['VUV', 0], + ['WST', 2], + ['XAF', 0], + ['XAG', 0], + ['XAU', 0], + ['XBA', 0], + ['XBB', 0], + ['XBC', 0], + ['XBD', 0], + ['XCD', 0], + ['XDR', 0], + ['XOF', 0], + ['XPD', 0], + ['XPF', 0], + ['XPT', 0], + ['XSU', 0], + ['XTS', 0], + ['XUA', 0], + ['XXX', 0], + ['YER', 2], + ['ZAR', 2], + ['ZMK', 0], + ['ZMW', 2], + ['ZWD', 2], + ['ZWL', 2], +] as const satisfies [code: string, decimal_digits: number][] -type CurrencyCode = typeof rawData[number][0] | (string & {}); +type CurrencyCode = (typeof rawData)[number][0] | (string & {}) // Convert the raw data to a record of Currency objects -export const Currencies: Record = Object.fromEntries(rawData.map(([code, decimal_digits]) => [code as any, { decimal_digits, code }])); +export const Currencies: Record = Object.fromEntries( + rawData.map(([code, decimal_digits]) => [code as any, { decimal_digits, code }]), +) diff --git a/src/lib/currency.ts b/src/lib/currency.ts index f4f8c8a..45e877c 100644 --- a/src/lib/currency.ts +++ b/src/lib/currency.ts @@ -1,4 +1,4 @@ export interface Currency { - decimal_digits: number - code: string + decimal_digits: number + code: string } diff --git a/test/money.test.ts b/test/money.test.ts index 691257b..fd3f562 100644 --- a/test/money.test.ts +++ b/test/money.test.ts @@ -2,381 +2,443 @@ import { describe, expect, it } from 'vitest' import { Money, Currencies } from '../src/index.js' describe('Money', function () { - it('should create a new instance from integer', function () { - var money = new Money(1000, Currencies.EUR); - - expect(money.amount).to.equal(1000); - expect(money.currency).to.equal('EUR'); - }); - - it('should not create a new instance from decimal', function () { - expect(function () { - new Money(10.42, Currencies.EUR); - }).to.throw(TypeError); - }); - - it('should create a new instance from decimal using `.fromDecimal()`', function () { - var money = Money.fromDecimal(10.01, Currencies.EUR); - var money1 = Money.fromDecimal(10.1, Currencies.EUR); - var money2 = Money.fromDecimal(10, Currencies.EUR); - var money3 = Money.fromDecimal(8.45, Currencies.EUR); - - expect(money.amount).to.equal(1001); - expect(money.currency).to.equal('EUR'); - expect(money1.amount).to.equal(1010); - expect(money2.amount).to.equal(1000); - expect(money3.amount).to.equal(845); - }); - - it('should create a new instance from decimal string using `.fromDecimal()`', function () { - // @ts-expect-error - var money = Money.fromDecimal('10.01', Currencies.EUR); - // @ts-expect-error - var money1 = Money.fromDecimal('10', Currencies.EUR); - - expect(money.amount).to.equal(1001); - expect(money1.amount).to.equal(1000); - }); - - it('should not create a new instance from decimal using `.fromDecimal()` if too many decimal places', function () { - expect(function () { - Money.fromDecimal(10.421, Currencies.EUR); - }).to.throw(Error); - }); - - it('should create a new instance from decimal using `.fromDecimal()` even if too many decimal places if rounder function provided', function () { - var money = Money.fromDecimal(10.01, Currencies.EUR, 'ceil'); - var money1 = Money.fromDecimal({amount: 10.01, currency: 'EUR'}, Math.ceil); - var money2 = Money.fromDecimal(10.0101, Currencies.EUR, Math.ceil); - var money3 = Money.fromDecimal(10.0199, Currencies.EUR, Math.ceil); - var money4 = Money.fromDecimal(10.0199, Currencies.EUR, Math.floor); - var money5 = Money.fromDecimal(10.0199, Currencies.EUR, Math.round); - var money6 = Money.fromDecimal(10.0199, Currencies.EUR, function (amount: number) { - return Math.round(amount) - }); - - expect(money.amount).to.equal(1001); - expect(money.currency).to.equal('EUR'); - expect(money1.amount).to.equal(1001); - expect(money2.amount).to.equal(1002); - expect(money3.amount).to.equal(1002); - expect(money4.amount).to.equal(1001); - expect(money5.amount).to.equal(1002); - expect(money6.amount).to.equal(1002); - }); - - it('should create a new instance from string currency', function () { - var money = new Money(1042, 'EUR'); - - expect(money.amount).to.equal(1042); - expect(money.currency).to.equal('EUR'); - }); - - it('should create a new instance from integer object', function () { - var money = Money.fromInteger({amount: 1151, currency: 'EUR'}); - - expect(money.amount).to.equal(1151); - expect(money.currency).to.equal('EUR'); - }); - - it('should create a new instance from integer', function () { - var money = Money.fromInteger(1151,Currencies.EUR); - - expect(money.amount).to.equal(1151); - expect(money.currency).to.equal('EUR'); - }); - - it('should create a new instance from zero integer', function () { - var money = Money.fromInteger(0,Currencies.EUR); - - expect(money.amount).to.equal(0); - expect(money.currency).to.equal('EUR'); - }); - - it('should create a new instance with correct decimals from object', function () { - var money = Money.fromDecimal({amount: 11.5, currency: 'EUR'}); - - expect(money.amount).to.equal(1150); - expect(money.currency).to.equal('EUR'); - }); - - it('should create a new instance from object with currenct object', function () { - var money = Money.fromDecimal({amount: 11.51, currency: Currencies.EUR}); - - expect(money.amount).to.equal(1151); - expect(money.currency).to.equal('EUR'); - }); - - it('should detect invalid currency', function () { - expect(function () { - new Money(10, 'XYZ') - }).to.throw(TypeError); - }); - - it('should accept currencies as case insensitive', () => { - let m1 = new Money(10, 'usd') - let m2 = new Money(10, 'uSd') - let m3 = new Money(10, 'USD') - - expect(m1.getCurrency()).to.equal('USD') - expect(m2.getCurrency()).to.equal('USD') + it('should create a new instance from integer', function () { + var money = new Money(1000, Currencies.EUR) + + expect(money.amount).to.equal(1000) + expect(money.currency).to.equal('EUR') + }) + + it('should not create a new instance from decimal', function () { + expect(function () { + new Money(10.42, Currencies.EUR) + }).to.throw(TypeError) + }) + + it('should create a new instance from decimal using `.fromDecimal()`', function () { + var money = Money.fromDecimal(10.01, Currencies.EUR) + var money1 = Money.fromDecimal(10.1, Currencies.EUR) + var money2 = Money.fromDecimal(10, Currencies.EUR) + var money3 = Money.fromDecimal(8.45, Currencies.EUR) + + expect(money.amount).to.equal(1001) + expect(money.currency).to.equal('EUR') + expect(money1.amount).to.equal(1010) + expect(money2.amount).to.equal(1000) + expect(money3.amount).to.equal(845) + }) + + it('should create a new instance from decimal string using `.fromDecimal()`', function () { + // @ts-expect-error + var money = Money.fromDecimal('10.01', Currencies.EUR) + // @ts-expect-error + var money1 = Money.fromDecimal('10', Currencies.EUR) + + expect(money.amount).to.equal(1001) + expect(money1.amount).to.equal(1000) + }) + + it('should not create a new instance from decimal using `.fromDecimal()` if too many decimal places', function () { + expect(function () { + Money.fromDecimal(10.421, Currencies.EUR) + }).to.throw(Error) + }) + + it('should create a new instance from decimal using `.fromDecimal()` even if too many decimal places if rounder function provided', function () { + var money = Money.fromDecimal(10.01, Currencies.EUR, 'ceil') + var money1 = Money.fromDecimal({ amount: 10.01, currency: 'EUR' }, Math.ceil) + var money2 = Money.fromDecimal(10.0101, Currencies.EUR, Math.ceil) + var money3 = Money.fromDecimal(10.0199, Currencies.EUR, Math.ceil) + var money4 = Money.fromDecimal(10.0199, Currencies.EUR, Math.floor) + var money5 = Money.fromDecimal(10.0199, Currencies.EUR, Math.round) + var money6 = Money.fromDecimal(10.0199, Currencies.EUR, function (amount: number) { + return Math.round(amount) }) - it('should serialize correctly', function() { - var money = new Money(1042, Currencies.EUR); + expect(money.amount).to.equal(1001) + expect(money.currency).to.equal('EUR') + expect(money1.amount).to.equal(1001) + expect(money2.amount).to.equal(1002) + expect(money3.amount).to.equal(1002) + expect(money4.amount).to.equal(1001) + expect(money5.amount).to.equal(1002) + expect(money6.amount).to.equal(1002) + }) - expect(money.amount).toBeTypeOf('number') - expect(money.currency).toBeTypeOf('string'); - }); + it('should create a new instance from string currency', function () { + var money = new Money(1042, 'EUR') - it('should check for decimal precision', function() { - expect(function() { - new Money(10.423456, Currencies.EUR) - }).to.throw(Error); - }); + expect(money.amount).to.equal(1042) + expect(money.currency).to.equal('EUR') + }) - it('should add same currencies', function () { - var first = new Money(1000, Currencies.EUR); - var second = new Money(500, Currencies.EUR); + it('should create a new instance from integer object', function () { + var money = Money.fromInteger({ amount: 1151, currency: 'EUR' }) - var result = first.add(second); + expect(money.amount).to.equal(1151) + expect(money.currency).to.equal('EUR') + }) - expect(result.amount).to.equal(1500); - expect(result.currency).to.equal('EUR'); + it('should create a new instance from amount object', function () { + var money = Money.from({ amount: 1151, currency: 'EUR' }) - expect(first.amount).to.equal(1000); - expect(second.amount).to.equal(500); - }); - - it('should not add different currencies', function () { - var first = new Money(1000, Currencies.EUR); - var second = new Money(500, Currencies.USD); - - expect(first.add.bind(first, second)).to.throw(Error); - }); - - it('should check for same type', function () { - var first = new Money(1000, Currencies.EUR); - - expect(first.add.bind(first, {} as Money)).to.throw(TypeError); - }); - - it('should check if equal', function () { - var first = new Money(1000, Currencies.EUR); - var second = new Money(1000, Currencies.EUR); - var third = new Money(1000, Currencies.USD); - var fourth = new Money(100, Currencies.EUR); - - expect(first.equals(second)).to.equal(true); - expect(first.equals(third)).to.equal(false); - expect(first.equals(fourth)).to.equal(false); - }); - - it('should compare correctly', function () { - var subject = new Money(1000, Currencies.EUR); - - expect(subject.compare(new Money(1500, Currencies.EUR))).to.equal(-1); - expect(subject.compare(new Money(500, Currencies.EUR))).to.equal(1); - expect(subject.compare(new Money(1000, Currencies.EUR))).to.equal(0); - - expect(function () { - subject.compare(new Money(1500, Currencies.USD)); - }).to.throw(Error, 'Different currencies'); - - expect(subject.greaterThan(new Money(1500, Currencies.EUR))).to.equal(false); - expect(subject.greaterThan(new Money(500, Currencies.EUR))).to.equal(true); - expect(subject.greaterThan(new Money(1000, Currencies.EUR))).to.equal(false); - - expect(subject.greaterThanOrEqual(new Money(1500, Currencies.EUR))).to.equal(false); - expect(subject.greaterThanOrEqual(new Money(500, Currencies.EUR))).to.equal(true); - expect(subject.greaterThanOrEqual(new Money(1000, Currencies.EUR))).to.equal(true); - - expect(subject.lessThan(new Money(1500, Currencies.EUR))).to.equal(true); - expect(subject.lessThan(new Money(500, Currencies.EUR))).to.equal(false); - expect(subject.lessThan(new Money(1000, Currencies.EUR))).to.equal(false); - - expect(subject.lessThanOrEqual(new Money(1500, Currencies.EUR))).to.equal(true); - expect(subject.lessThanOrEqual(new Money(500, Currencies.EUR))).to.equal(false); - expect(subject.lessThanOrEqual(new Money(1000, Currencies.EUR))).to.equal(true); - }); + expect(money.amount).to.equal(1151) + expect(money.currency).to.equal('EUR') + }) - it('should subtract same currencies correctly', function() { - var subject = new Money(1000, Currencies.EUR); - var result = subject.subtract(new Money(250, Currencies.EUR)); + it('should create a new instance from integer', function () { + var money = Money.fromInteger(1151, Currencies.EUR) - expect(result.amount).to.equal(750); - expect(result.currency).to.equal('EUR'); - }); + expect(money.amount).to.equal(1151) + expect(money.currency).to.equal('EUR') + }) - it('should multiply correctly', function() { - var subject = new Money(1000, Currencies.EUR); + it('should create a new instance from zero integer', function () { + var money = Money.fromInteger(0, Currencies.EUR) - expect(subject.multiply(1.2234).amount).to.equal(1223); - expect(subject.multiply(1.2234, Math.ceil).amount).to.equal(1224); - expect(subject.multiply(1.2234, Math.floor).amount).to.equal(1223); - }); + expect(money.amount).to.equal(0) + expect(money.currency).to.equal('EUR') + }) - it('should divide correctly', function() { - var subject = new Money(1000, Currencies.EUR); + it('should create a new instance with correct decimals from object', function () { + var money = Money.fromDecimal({ amount: 11.5, currency: 'EUR' }) - expect(subject.divide(2.234).amount).to.equal(448); - expect(subject.divide(2.234, Math.ceil).amount).to.equal(448); - expect(subject.divide(2.234, Math.floor).amount).to.equal(447); - }); - - it('should allocate correctly', function() { - var subject = new Money(1000, Currencies.EUR); - var results = subject.allocate([1,1,1]); - - expect(results.length).to.equal(3); - expect(results[0].amount).to.equal(334); - expect(results[0].currency).to.equal('EUR'); - expect(results[1].amount).to.equal(333); - expect(results[1].currency).to.equal('EUR'); - expect(results[2].amount).to.equal(333); - expect(results[2].currency).to.equal('EUR'); - }); + expect(money.amount).to.equal(1150) + expect(money.currency).to.equal('EUR') + }) - it('should allocate correctly with a zero rate', function() { - var subject = new Money(29900, Currencies.EUR); - var results = subject.allocate([265.09, 0, 33.91]); + it('should create a new instance from object with currenct object', function () { + var money = Money.fromDecimal({ amount: 11.51, currency: Currencies.EUR }) - expect(results.length).to.equal(3); - expect(results[0].amount).to.equal(26509); - expect(results[0].currency).to.equal('EUR'); - expect(results[1].amount).to.equal(0); - expect(results[1].currency).to.equal('EUR'); - expect(results[2].amount).to.equal(3391); - expect(results[2].currency).to.equal('EUR'); - }); - - it('zero check works correctly', function() { - var subject = new Money(1000, 'EUR'); - var subject1 = new Money(0, 'EUR'); - - expect(subject.isZero()).to.be.false; - expect(subject1.isZero()).to.be.true; - }); - - it('positive check works correctly', function() { - var subject = new Money(1000, 'EUR'); - var subject1 = new Money(-1000, 'EUR'); - - expect(subject.isPositive()).to.be.true; - expect(subject1.isPositive()).to.be.false; - }); - - it('negative check works correctly', function() { - var subject = new Money(1000, 'EUR'); - var subject1 = new Money(-1000, 'EUR'); - - expect(subject.isNegative()).to.be.false; - expect(subject1.isNegative()).to.be.true; - }); - - it('should allow to extract the amount as a decimal', function () { - var subject = new Money(1000, 'EUR'); - var subject1 = new Money(1010, 'EUR'); - var subject2 = Money.fromDecimal(10.01, 'EUR'); - - expect(subject.toDecimal()).to.equal(10); - expect(subject1.toDecimal()).to.equal(10.1); - expect(subject2.toDecimal()).to.equal(10.01); - }); - - it('should allow to be concatenated with a string', function () { - var subject = new Money(1000, 'EUR'); - - expect('' + subject).to.equal('10.00'); - }); - - it('should allow to be stringified as JSON', function () { - var subject = new Money(1000, 'EUR'); - - expect(JSON.stringify({ foo: subject })).to.equal('{"foo":{"amount":1000,"currency":"EUR"}}'); - }); - - it('should return the amount/currency represented by object', function () { - var subject = new Money(1000, 'EUR'); - - expect(subject.getAmount()).to.equal(1000); - expect(subject.getCurrency()).to.equal('EUR'); - }); - - it('should return the right currency info', () => { - var subject = new Money(1000, 'EUR') - - expect(subject.getCurrencyInfo()).to.equal(Currencies.EUR) - }) + expect(money.amount).to.equal(1151) + expect(money.currency).to.equal('EUR') + }) - it('should convert from decimal per currency', function () { - var euro = Money.fromDecimal(123.45, 'EUR'); - var forint = Money.fromDecimal(123.45, 'HUF'); - var yen = Money.fromDecimal(12345, 'JPY'); - var dinar = Money.fromDecimal(12.345, 'BHD'); - var bitcoin = Money.fromDecimal(0.00012345, 'BTC') - - expect(euro.amount).to.equal(12345); - expect(forint.amount).to.equal(12345); - expect(yen.amount).to.equal(12345); - expect(dinar.amount).to.equal(12345); - expect(bitcoin.amount).to.equal(12345); - }); - - it('should convert to decimal per currency', function () { - var euro = new Money(12345, 'EUR'); - var forint = new Money(12345, 'HUF'); - var yen = new Money(12345, 'JPY'); - var dinar = new Money(12345, 'BHD'); - var bitcoin = new Money(12345, 'BTC'); - - expect(euro.toDecimal()).to.equal(123.45); - expect(forint.toDecimal()).to.equal(123.45); - expect(yen.toDecimal()).to.equal(12345); - expect(dinar.toDecimal()).to.equal(12.345); - expect(bitcoin.toDecimal()).to.equal(0.00012345); - }); - - it('should convert from decimal when using less than maximum decimal digits', function () { - var euro = Money.fromDecimal(123, 'EUR'); - var forint = Money.fromDecimal(123.4, 'HUF'); - var dinar = Money.fromDecimal(12.3, 'BHD'); - var bitcoin = Money.fromDecimal(0.000125, 'BTC'); - - expect(euro.amount).to.equal(12300); - expect(forint.amount).to.equal(12340); - expect(dinar.amount).to.equal(12300); - expect(bitcoin.amount).to.equal(12500); - }); - - it('should convert maximum available value to decimal for currencies with many positions', function () { - var almostMaxBitcoin = new Money(2099999999999999, 'BTC'); - var maxBitcoin = new Money(2100000000000000, 'BTC'); - - expect(almostMaxBitcoin.toDecimal()).to.equal(20999999.99999999) - expect(maxBitcoin.toDecimal()).to.equal(21000000.0) - }); - - it('should convert minimum available value to decimal for currencies with many positions', function () { - var minBitcoin = new Money(1, 'BTC'); - - expect(minBitcoin.toDecimal()).to.equal(0.00000001) - }) -}) + it('should detect invalid currency', function () { + expect(function () { + new Money(10, 'XYZ') + }).to.throw(TypeError) + }) -describe('Currencies', () => { - it('should be extansible', function () { - Currencies.LTC = { - decimal_digits: 8, - code: "LTC", - } + it('should accept currencies as case insensitive', () => { + let m1 = new Money(10, 'usd') + let m2 = new Money(10, 'uSd') + let m3 = new Money(10, 'USD') - let m1 = new Money(1, 'LTC') - let m2 = Money.fromDecimal(1, Currencies.LTC) + expect(m1.getCurrency()).to.equal('USD') + expect(m2.getCurrency()).to.equal('USD') + }) + it('should serialize correctly', function () { + var money = new Money(1042, Currencies.EUR) - expect(m1.currency).to.equal('LTC') - expect(m2.currency).to.equal('LTC') - expect(m2.amount).to.equal(100000000) - }) + expect(money.amount).toBeTypeOf('number') + expect(money.currency).toBeTypeOf('string') + }) + + it('should check for decimal precision', function () { + expect(function () { + new Money(10.423456, Currencies.EUR) + }).to.throw(Error) + }) + + it('should add same currencies', function () { + var first = new Money(1000, Currencies.EUR) + var second = new Money(500, Currencies.EUR) + + var result = first.add(second) + + expect(result.amount).to.equal(1500) + expect(result.currency).to.equal('EUR') + + expect(first.amount).to.equal(1000) + expect(second.amount).to.equal(500) + }) + + it('should not add different currencies', function () { + var first = new Money(1000, Currencies.EUR) + var second = new Money(500, Currencies.USD) + + expect(first.add.bind(first, second)).to.throw(Error) + }) + + it('should check for same type', function () { + var first = new Money(1000, Currencies.EUR) + + expect(first.add.bind(first, {} as Money)).to.throw(TypeError) + }) + + it('should check if equal', function () { + var first = new Money(1000, Currencies.EUR) + var second = new Money(1000, Currencies.EUR) + var third = new Money(1000, Currencies.USD) + var fourth = new Money(100, Currencies.EUR) + + expect(first.equals(second)).to.equal(true) + expect(first.equals(third)).to.equal(false) + expect(first.equals(fourth)).to.equal(false) + }) + + it('should compare correctly', function () { + var subject = new Money(1000, Currencies.EUR) + + expect(subject.compare(new Money(1500, Currencies.EUR))).to.equal(-1) + expect(subject.compare(new Money(500, Currencies.EUR))).to.equal(1) + expect(subject.compare(new Money(1000, Currencies.EUR))).to.equal(0) + + expect(function () { + subject.compare(new Money(1500, Currencies.USD)) + }).to.throw(Error, 'Different currencies') + + expect(subject.greaterThan(new Money(1500, Currencies.EUR))).to.equal(false) + expect(subject.greaterThan(new Money(500, Currencies.EUR))).to.equal(true) + expect(subject.greaterThan(new Money(1000, Currencies.EUR))).to.equal(false) + + expect(subject.greaterThanOrEqual(new Money(1500, Currencies.EUR))).to.equal(false) + expect(subject.greaterThanOrEqual(new Money(500, Currencies.EUR))).to.equal(true) + expect(subject.greaterThanOrEqual(new Money(1000, Currencies.EUR))).to.equal(true) + + expect(subject.lessThan(new Money(1500, Currencies.EUR))).to.equal(true) + expect(subject.lessThan(new Money(500, Currencies.EUR))).to.equal(false) + expect(subject.lessThan(new Money(1000, Currencies.EUR))).to.equal(false) + + expect(subject.lessThanOrEqual(new Money(1500, Currencies.EUR))).to.equal(true) + expect(subject.lessThanOrEqual(new Money(500, Currencies.EUR))).to.equal(false) + expect(subject.lessThanOrEqual(new Money(1000, Currencies.EUR))).to.equal(true) + }) + + it('should subtract same currencies correctly', function () { + var subject = new Money(1000, Currencies.EUR) + var result = subject.subtract(new Money(250, Currencies.EUR)) + + expect(result.amount).to.equal(750) + expect(result.currency).to.equal('EUR') + }) + + it('should multiply correctly', function () { + var subject = new Money(1000, Currencies.EUR) + + expect(subject.multiply(1.2234).amount).to.equal(1223) + expect(subject.multiply(1.2234, Math.ceil).amount).to.equal(1224) + expect(subject.multiply(1.2234, Math.floor).amount).to.equal(1223) + }) + + it('should divide correctly', function () { + var subject = new Money(1000, Currencies.EUR) + + expect(subject.divide(2.234).amount).to.equal(448) + expect(subject.divide(2.234, Math.ceil).amount).to.equal(448) + expect(subject.divide(2.234, Math.floor).amount).to.equal(447) + }) + + it('should allocate correctly', function () { + var subject = new Money(1000, Currencies.EUR) + var results = subject.allocate([1, 1, 1]) + + expect(results.length).to.equal(3) + expect(results[0].amount).to.equal(334) + expect(results[0].currency).to.equal('EUR') + expect(results[1].amount).to.equal(333) + expect(results[1].currency).to.equal('EUR') + expect(results[2].amount).to.equal(333) + expect(results[2].currency).to.equal('EUR') + }) + + it('should allocate correctly with a zero rate', function () { + var subject = new Money(29900, Currencies.EUR) + var results = subject.allocate([265.09, 0, 33.91]) + + expect(results.length).to.equal(3) + expect(results[0].amount).to.equal(26509) + expect(results[0].currency).to.equal('EUR') + expect(results[1].amount).to.equal(0) + expect(results[1].currency).to.equal('EUR') + expect(results[2].amount).to.equal(3391) + expect(results[2].currency).to.equal('EUR') + }) + + it('should calculate fractions', function () { + expect(new Money(1500, 'EUR').fractionOf(new Money(2000, 'EUR'))).to.equal(0.75) + expect(new Money(1500, 'EUR').fractionOf(new Money(1500, 'EUR'))).to.equal(1) + expect(new Money(1500, 'EUR').fractionOf(new Money(1000, 'EUR'))).to.equal(1.5) + }) + + it('should calculate fractions with zero', function () { + var subject = new Money(1500, 'EUR') + var other = new Money(0, 'EUR') + + expect(subject.fractionOf(other)).to.equal(0) + }) + + it('should not calculate fractions with different currencies', function () { + var subject = new Money(1500, 'EUR') + var other = new Money(2000, 'USD') + + expect(() => subject.fractionOf(other)).to.throw(Error, 'Different currencies') + }) + + it('should calculate percentages', function () { + expect(new Money(1500, 'EUR').percentageOf(new Money(2000, 'EUR'))).to.equal(75) + expect(new Money(1500, 'EUR').percentageOf(new Money(1500, 'EUR'))).to.equal(100) + expect(new Money(1500, 'EUR').percentageOf(new Money(1000, 'EUR'))).to.equal(150) + expect(new Money(500, 'EUR').percentageOf(new Money(750, 'EUR'))).to.equal(67) + }) + + it('should calculate percentages with precision', function () { + expect(new Money(1400, 'EUR').percentageOf(new Money(2100, 'EUR'), 2)).to.equal( + 66.67, + ) + expect(new Money(1400, 'EUR').percentageOf(new Money(1700, 'EUR'), 2)).to.equal( + 82.35, + ) + expect(new Money(1400, 'EUR').percentageOf(new Money(900, 'EUR'), 2)).to.equal( + 155.56, + ) + }) + + it('should calculate percentages with precision and rounder', function () { + expect( + new Money(1400, 'EUR').percentageOf(new Money(900, 'EUR'), 2, 'floor'), + ).to.equal(155.55) + expect( + new Money(1400, 'EUR').percentageOf(new Money(900, 'EUR'), 2, 'ceil'), + ).to.equal(155.56) + expect( + new Money(1400, 'EUR').percentageOf(new Money(900, 'EUR'), 2, 'round'), + ).to.equal(155.56) + expect( + new Money(500, 'EUR').percentageOf(new Money(750, 'EUR'), 2, 'floor'), + ).to.equal(66.66) + }) + + it('zero check works correctly', function () { + var subject = new Money(1000, 'EUR') + var subject1 = new Money(0, 'EUR') + + expect(subject.isZero()).to.be.false + expect(subject1.isZero()).to.be.true + }) + + it('positive check works correctly', function () { + var subject = new Money(1000, 'EUR') + var subject1 = new Money(-1000, 'EUR') + + expect(subject.isPositive()).to.be.true + expect(subject1.isPositive()).to.be.false + }) + + it('negative check works correctly', function () { + var subject = new Money(1000, 'EUR') + var subject1 = new Money(-1000, 'EUR') + + expect(subject.isNegative()).to.be.false + expect(subject1.isNegative()).to.be.true + }) + + it('should allow to extract the amount as a decimal', function () { + var subject = new Money(1000, 'EUR') + var subject1 = new Money(1010, 'EUR') + var subject2 = Money.fromDecimal(10.01, 'EUR') + + expect(subject.toDecimal()).to.equal(10) + expect(subject1.toDecimal()).to.equal(10.1) + expect(subject2.toDecimal()).to.equal(10.01) + }) + + it('should allow to be concatenated with a string', function () { + var subject = new Money(1000, 'EUR') + + expect('' + subject).to.equal('10.00') + }) + + it('should allow to be stringified as JSON', function () { + var subject = new Money(1000, 'EUR') + + expect(JSON.stringify({ foo: subject })).to.equal( + '{"foo":{"amount":1000,"currency":"EUR"}}', + ) + }) + + it('should return the amount/currency represented by object', function () { + var subject = new Money(1000, 'EUR') + + expect(subject.getAmount()).to.equal(1000) + expect(subject.getCurrency()).to.equal('EUR') + }) + + it('should return the right currency info', () => { + var subject = new Money(1000, 'EUR') + + expect(subject.getCurrencyInfo()).to.equal(Currencies.EUR) + }) + + it('should convert from decimal per currency', function () { + var euro = Money.fromDecimal(123.45, 'EUR') + var forint = Money.fromDecimal(123.45, 'HUF') + var yen = Money.fromDecimal(12345, 'JPY') + var dinar = Money.fromDecimal(12.345, 'BHD') + var bitcoin = Money.fromDecimal(0.00012345, 'BTC') + + expect(euro.amount).to.equal(12345) + expect(forint.amount).to.equal(12345) + expect(yen.amount).to.equal(12345) + expect(dinar.amount).to.equal(12345) + expect(bitcoin.amount).to.equal(12345) + }) + + it('should convert to decimal per currency', function () { + var euro = new Money(12345, 'EUR') + var forint = new Money(12345, 'HUF') + var yen = new Money(12345, 'JPY') + var dinar = new Money(12345, 'BHD') + var bitcoin = new Money(12345, 'BTC') + + expect(euro.toDecimal()).to.equal(123.45) + expect(forint.toDecimal()).to.equal(123.45) + expect(yen.toDecimal()).to.equal(12345) + expect(dinar.toDecimal()).to.equal(12.345) + expect(bitcoin.toDecimal()).to.equal(0.00012345) + }) + + it('should convert from decimal when using less than maximum decimal digits', function () { + var euro = Money.fromDecimal(123, 'EUR') + var forint = Money.fromDecimal(123.4, 'HUF') + var dinar = Money.fromDecimal(12.3, 'BHD') + var bitcoin = Money.fromDecimal(0.000125, 'BTC') + + expect(euro.amount).to.equal(12300) + expect(forint.amount).to.equal(12340) + expect(dinar.amount).to.equal(12300) + expect(bitcoin.amount).to.equal(12500) + }) + + it('should convert maximum available value to decimal for currencies with many positions', function () { + var almostMaxBitcoin = new Money(2099999999999999, 'BTC') + var maxBitcoin = new Money(2100000000000000, 'BTC') + + expect(almostMaxBitcoin.toDecimal()).to.equal(20999999.99999999) + expect(maxBitcoin.toDecimal()).to.equal(21000000.0) + }) + + it('should convert minimum available value to decimal for currencies with many positions', function () { + var minBitcoin = new Money(1, 'BTC') + + expect(minBitcoin.toDecimal()).to.equal(0.00000001) + }) +}) + +describe('Currencies', () => { + it('should be extansible', function () { + Currencies.LTC = { + decimal_digits: 8, + code: 'LTC', + } + + let m1 = new Money(1, 'LTC') + let m2 = Money.fromDecimal(1, Currencies.LTC) + + expect(m1.currency).to.equal('LTC') + expect(m2.currency).to.equal('LTC') + expect(m2.amount).to.equal(100000000) + }) }) From a6e63ebd137b937b7853335d6a607abd7d9d40fc Mon Sep 17 00:00:00 2001 From: Sebastian Langer Date: Thu, 6 Nov 2025 16:15:00 +0100 Subject: [PATCH 20/20] throw more descriptivve error, when trying to divide by zero --- README.md | 1 + package.json | 2 +- src/index.ts | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 73cb23d..789c071 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ npm install @screeny05/ts-money - Added `Money.from(amount: Amount)` as shortcut for `Money.fromInteger(amount: Amount)` - Added `Money#fractionOf()` and `Money#percentageOf()` (see [below](#basic-arithmetics)) - Migrated package to vitest and unbuild. +- Throws a more descriptive error when dividing by zero. ## Usage diff --git a/package.json b/package.json index 90a1e76..4b848b1 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "type": "module", "sideEffects": false, "description": "Maintained and improved version of ts-money.", - "version": "1.1.0", + "version": "1.2.0", "exports": { ".": { "import": { diff --git a/src/index.ts b/src/index.ts index 6e2cbad..2cfb233 100644 --- a/src/index.ts +++ b/src/index.ts @@ -255,6 +255,7 @@ class Money { if (typeof fn !== 'function') fn = Math.round assertOperand(divisor) + if (divisor === 0) throw new Error('Operand must be a non-zero number') let amount = fn(this.amount / divisor) return new Money(amount, this.currency)