diff --git a/.github/workflows/node-windows.yml b/.github/workflows/node-windows.yml index 717c1df7d0d..786a4b3f323 100644 --- a/.github/workflows/node-windows.yml +++ b/.github/workflows/node-windows.yml @@ -1,6 +1,10 @@ name: Node -on: [push, pull_request] +on: + push: + branches: + - master + pull_request: jobs: build: @@ -8,7 +12,7 @@ jobs: strategy: matrix: - node: ['14', '12', '10'] + node: [ '14', '12', '10' ] name: ${{ matrix.node }} (Windows) steps: @@ -20,7 +24,7 @@ jobs: uses: actions/setup-node@v1 with: node-version: ${{ matrix.node }} - - name: Install dependencies + - name: Install dependencies run: npm ci --ignore-scripts - name: Run tests run: npm test diff --git a/cli/run/build.ts b/cli/run/build.ts index 954dba4c6e2..54d9daaaed3 100644 --- a/cli/run/build.ts +++ b/cli/run/build.ts @@ -53,7 +53,7 @@ export default async function build( } } if (outputs.length > 1) process.stdout.write(`\n${cyan(bold(`//→ ${file.fileName}:`))}\n`); - process.stdout.write(source); + process.stdout.write(source as Buffer); } if (!silent) { warnings.flush(); diff --git a/cli/run/loadConfigFile.ts b/cli/run/loadConfigFile.ts index d0f511bd4ee..4aa7ac17c54 100644 --- a/cli/run/loadConfigFile.ts +++ b/cli/run/loadConfigFile.ts @@ -85,7 +85,7 @@ async function getDefaultFromTranspiledConfigFile( async function loadConfigFromBundledFile(fileName: string, bundledCode: string) { const resolvedFileName = fs.realpathSync(fileName); const extension = path.extname(resolvedFileName); - const defaultLoader = require.extensions[extension]!; + const defaultLoader = require.extensions[extension]; require.extensions[extension] = (module: NodeModule, requiredFileName: string) => { if (requiredFileName === resolvedFileName) { (module as NodeModuleWithCompile)._compile(bundledCode, requiredFileName); diff --git a/cli/run/resetScreen.ts b/cli/run/resetScreen.ts index c057a84e9e6..1429210affb 100644 --- a/cli/run/resetScreen.ts +++ b/cli/run/resetScreen.ts @@ -3,7 +3,10 @@ import { stderr } from '../logging'; const CLEAR_SCREEN = '\u001Bc'; -export function getResetScreen(configs: MergedRollupOptions[], allowClearScreen: boolean) { +export function getResetScreen( + configs: MergedRollupOptions[], + allowClearScreen: boolean | undefined +) { let clearScreen = allowClearScreen; for (const config of configs) { if (config.watch && config.watch.clearScreen === false) { diff --git a/package-lock.json b/package-lock.json index b64035e6740..1c9a37efb27 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,19 +14,19 @@ } }, "@babel/core": { - "version": "7.11.6", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.11.6.tgz", - "integrity": "sha512-Wpcv03AGnmkgm6uS6k8iwhIwTrcP0m17TL1n1sy7qD0qelDu4XNeW0dN0mHfa+Gei211yDaLoEe/VlbXQzM4Bg==", + "version": "7.12.9", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.9.tgz", + "integrity": "sha512-gTXYh3M5wb7FRXQy+FErKFAv90BnlOuNn1QkCK2lREoPAjrQCO49+HVSrFoe5uakFAF5eenS75KbO2vQiLrTMQ==", "dev": true, "requires": { "@babel/code-frame": "^7.10.4", - "@babel/generator": "^7.11.6", - "@babel/helper-module-transforms": "^7.11.0", - "@babel/helpers": "^7.10.4", - "@babel/parser": "^7.11.5", - "@babel/template": "^7.10.4", - "@babel/traverse": "^7.11.5", - "@babel/types": "^7.11.5", + "@babel/generator": "^7.12.5", + "@babel/helper-module-transforms": "^7.12.1", + "@babel/helpers": "^7.12.5", + "@babel/parser": "^7.12.7", + "@babel/template": "^7.12.7", + "@babel/traverse": "^7.12.9", + "@babel/types": "^7.12.7", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.1", @@ -61,12 +61,12 @@ } }, "@babel/generator": { - "version": "7.11.6", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.11.6.tgz", - "integrity": "sha512-DWtQ1PV3r+cLbySoHrwn9RWEgKMBLLma4OBQloPRyDYvc5msJM9kvTLo1YnlJd1P/ZuKbdli3ijr5q3FvAF3uA==", + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.5.tgz", + "integrity": "sha512-m16TQQJ8hPt7E+OS/XVQg/7U184MLXtvuGbCdA7na61vha+ImkyyNM/9DDA0unYCVZn3ZOhng+qz48/KBOT96A==", "dev": true, "requires": { - "@babel/types": "^7.11.5", + "@babel/types": "^7.12.5", "jsesc": "^2.5.1", "source-map": "^0.5.0" }, @@ -106,67 +106,68 @@ } }, "@babel/helper-member-expression-to-functions": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.11.0.tgz", - "integrity": "sha512-JbFlKHFntRV5qKw3YC0CvQnDZ4XMwgzzBbld7Ly4Mj4cbFy3KywcR8NtNctRToMWJOVvLINJv525Gd6wwVEx/Q==", + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.7.tgz", + "integrity": "sha512-DCsuPyeWxeHgh1Dus7APn7iza42i/qXqiFPWyBDdOFtvS581JQePsc1F/nD+fHrcswhLlRc2UpYS1NwERxZhHw==", "dev": true, "requires": { - "@babel/types": "^7.11.0" + "@babel/types": "^7.12.7" } }, "@babel/helper-module-imports": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.10.4.tgz", - "integrity": "sha512-nEQJHqYavI217oD9+s5MUBzk6x1IlvoS9WTPfgG43CbMEeStE0v+r+TucWdx8KFGowPGvyOkDT9+7DHedIDnVw==", + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.12.5.tgz", + "integrity": "sha512-SR713Ogqg6++uexFRORf/+nPXMmWIn80TALu0uaFb+iQIUoR7bOC7zBWyzBs5b3tBBJXuyD0cRu1F15GyzjOWA==", "dev": true, "requires": { - "@babel/types": "^7.10.4" + "@babel/types": "^7.12.5" } }, "@babel/helper-module-transforms": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.11.0.tgz", - "integrity": "sha512-02EVu8COMuTRO1TAzdMtpBPbe6aQ1w/8fePD2YgQmxZU4gpNWaL9gK3Jp7dxlkUlUCJOTaSeA+Hrm1BRQwqIhg==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.12.1.tgz", + "integrity": "sha512-QQzehgFAZ2bbISiCpmVGfiGux8YVFXQ0abBic2Envhej22DVXV9nCFaS5hIQbkyo1AdGb+gNME2TSh3hYJVV/w==", "dev": true, "requires": { - "@babel/helper-module-imports": "^7.10.4", - "@babel/helper-replace-supers": "^7.10.4", - "@babel/helper-simple-access": "^7.10.4", + "@babel/helper-module-imports": "^7.12.1", + "@babel/helper-replace-supers": "^7.12.1", + "@babel/helper-simple-access": "^7.12.1", "@babel/helper-split-export-declaration": "^7.11.0", + "@babel/helper-validator-identifier": "^7.10.4", "@babel/template": "^7.10.4", - "@babel/types": "^7.11.0", + "@babel/traverse": "^7.12.1", + "@babel/types": "^7.12.1", "lodash": "^4.17.19" } }, "@babel/helper-optimise-call-expression": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.4.tgz", - "integrity": "sha512-n3UGKY4VXwXThEiKrgRAoVPBMqeoPgHVqiHZOanAJCG9nQUL2pLRQirUzl0ioKclHGpGqRgIOkgcIJaIWLpygg==", + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.7.tgz", + "integrity": "sha512-I5xc9oSJ2h59OwyUqjv95HRyzxj53DAubUERgQMrpcCEYQyToeHA+NEcUEsVWB4j53RDeskeBJ0SgRAYHDBckw==", "dev": true, "requires": { - "@babel/types": "^7.10.4" + "@babel/types": "^7.12.7" } }, "@babel/helper-replace-supers": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.10.4.tgz", - "integrity": "sha512-sPxZfFXocEymYTdVK1UNmFPBN+Hv5mJkLPsYWwGBxZAxaWfFu+xqp7b6qWD0yjNuNL2VKc6L5M18tOXUP7NU0A==", + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.12.5.tgz", + "integrity": "sha512-5YILoed0ZyIpF4gKcpZitEnXEJ9UoDRki1Ey6xz46rxOzfNMAhVIJMoune1hmPVxh40LRv1+oafz7UsWX+vyWA==", "dev": true, "requires": { - "@babel/helper-member-expression-to-functions": "^7.10.4", + "@babel/helper-member-expression-to-functions": "^7.12.1", "@babel/helper-optimise-call-expression": "^7.10.4", - "@babel/traverse": "^7.10.4", - "@babel/types": "^7.10.4" + "@babel/traverse": "^7.12.5", + "@babel/types": "^7.12.5" } }, "@babel/helper-simple-access": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.10.4.tgz", - "integrity": "sha512-0fMy72ej/VEvF8ULmX6yb5MtHG4uH4Dbd6I/aHDb/JVg0bbivwt9Wg+h3uMvX+QSFtwr5MeItvazbrc4jtRAXw==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.12.1.tgz", + "integrity": "sha512-OxBp7pMrjVewSSC8fXDFrHrBcJATOOFssZwv16F3/6Xtc138GHybBfPbm9kfiqQHKhYQrlamWILwlDCeyMFEaA==", "dev": true, "requires": { - "@babel/template": "^7.10.4", - "@babel/types": "^7.10.4" + "@babel/types": "^7.12.1" } }, "@babel/helper-split-export-declaration": { @@ -185,14 +186,14 @@ "dev": true }, "@babel/helpers": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.10.4.tgz", - "integrity": "sha512-L2gX/XeUONeEbI78dXSrJzGdz4GQ+ZTA/aazfUsFaWjSe95kiCuOZ5HsXvkiw3iwF+mFHSRUfJU8t6YavocdXA==", + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.12.5.tgz", + "integrity": "sha512-lgKGMQlKqA8meJqKsW6rUnc4MdUk35Ln0ATDqdM1a/UpARODdI4j5Y5lVfUScnSNkJcdCRAaWkspykNoFg9sJA==", "dev": true, "requires": { "@babel/template": "^7.10.4", - "@babel/traverse": "^7.10.4", - "@babel/types": "^7.10.4" + "@babel/traverse": "^7.12.5", + "@babel/types": "^7.12.5" } }, "@babel/highlight": { @@ -207,34 +208,34 @@ } }, "@babel/parser": { - "version": "7.11.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.11.5.tgz", - "integrity": "sha512-X9rD8qqm695vgmeaQ4fvz/o3+Wk4ZzQvSHkDBgpYKxpD4qTAUm88ZKtHkVqIOsYFFbIQ6wQYhC6q7pjqVK0E0Q==", + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.7.tgz", + "integrity": "sha512-oWR02Ubp4xTLCAqPRiNIuMVgNO5Aif/xpXtabhzW2HWUD47XJsAB4Zd/Rg30+XeQA3juXigV7hlquOTmwqLiwg==", "dev": true }, "@babel/template": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz", - "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==", + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.7.tgz", + "integrity": "sha512-GkDzmHS6GV7ZeXfJZ0tLRBhZcMcY0/Lnb+eEbXDBfCAcZCjrZKe6p3J4we/D24O9Y8enxWAg1cWwof59yLh2ow==", "dev": true, "requires": { "@babel/code-frame": "^7.10.4", - "@babel/parser": "^7.10.4", - "@babel/types": "^7.10.4" + "@babel/parser": "^7.12.7", + "@babel/types": "^7.12.7" } }, "@babel/traverse": { - "version": "7.11.5", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.11.5.tgz", - "integrity": "sha512-EjiPXt+r7LiCZXEfRpSJd+jUMnBd4/9OUv7Nx3+0u9+eimMwJmG0Q98lw4/289JCoxSE8OolDMNZaaF/JZ69WQ==", + "version": "7.12.9", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.9.tgz", + "integrity": "sha512-iX9ajqnLdoU1s1nHt36JDI9KG4k+vmI8WgjK5d+aDTwQbL2fUnzedNedssA645Ede3PM2ma1n8Q4h2ohwXgMXw==", "dev": true, "requires": { "@babel/code-frame": "^7.10.4", - "@babel/generator": "^7.11.5", + "@babel/generator": "^7.12.5", "@babel/helper-function-name": "^7.10.4", "@babel/helper-split-export-declaration": "^7.11.0", - "@babel/parser": "^7.11.5", - "@babel/types": "^7.11.5", + "@babel/parser": "^7.12.7", + "@babel/types": "^7.12.7", "debug": "^4.1.0", "globals": "^11.1.0", "lodash": "^4.17.19" @@ -249,9 +250,9 @@ } }, "@babel/types": { - "version": "7.11.5", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz", - "integrity": "sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==", + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.7.tgz", + "integrity": "sha512-MNyI92qZq6jrQkXvtIiykvl4WtoRrVV9MPn+ZfsoEENjiWcBQ3ZSHrkxnJWgWtLX3XXqX5hrSQ+X69wkmesXuQ==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", @@ -260,9 +261,9 @@ } }, "@eslint/eslintrc": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.1.3.tgz", - "integrity": "sha512-4YVwPkANLeNtRjMekzux1ci8hIaH5eGKktGqR0d3LWsKNn5B2X/1Z6Trxy7jQXl9EBGE6Yj02O+t09FMeRllaA==", + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.2.1.tgz", + "integrity": "sha512-XRUeBZ5zBWLYgSANMpThFddrZZkEbGHgUdt5UJjZfnlN9BGCiUBrf+nvbRupSjMvqzwnQN0qwCmOxITt1cfywA==", "dev": true, "requires": { "ajv": "^6.12.4", @@ -374,9 +375,9 @@ } }, "@rollup/plugin-commonjs": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-15.1.0.tgz", - "integrity": "sha512-xCQqz4z/o0h2syQ7d9LskIMvBSH4PX5PjYdpSSvgS+pQik3WahkQVNWg3D8XJeYjZoVWnIUQYDghuEMRGrmQYQ==", + "version": "17.0.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-17.0.0.tgz", + "integrity": "sha512-/omBIJG1nHQc+bgkYDuLpb/V08QyutP9amOrJRUSlYJZP+b/68gM//D8sxJe3Yry2QnYIr3QjR3x4AlxJEN3GA==", "dev": true, "requires": { "@rollup/pluginutils": "^3.1.0", @@ -406,9 +407,9 @@ } }, "@rollup/plugin-node-resolve": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-9.0.0.tgz", - "integrity": "sha512-gPz+utFHLRrd41WMP13Jq5mqqzHL3OXrfj3/MkSyB6UBIcuNt9j60GCbarzMzdf1VHFpOxfQh/ez7wyadLMqkg==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-10.0.0.tgz", + "integrity": "sha512-sNijGta8fqzwA1VwUEtTvWCx2E7qC70NMsDh4ZG13byAXYigBNZMxALhKUSycBks5gupJdq0lFrKumFrRZ8H3A==", "dev": true, "requires": { "@rollup/pluginutils": "^3.1.0", @@ -420,13 +421,13 @@ } }, "@rollup/plugin-replace": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/@rollup/plugin-replace/-/plugin-replace-2.3.3.tgz", - "integrity": "sha512-XPmVXZ7IlaoWaJLkSCDaa0Y6uVo5XQYHhiMFzOd5qSv5rE+t/UJToPIOE56flKIxBFQI27ONsxb7dqHnwSsjKQ==", + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/@rollup/plugin-replace/-/plugin-replace-2.3.4.tgz", + "integrity": "sha512-waBhMzyAtjCL1GwZes2jaE9MjuQ/DQF2BatH3fRivUF3z0JBFrU0U6iBNC/4WR+2rLKhaAhPWDNPYp4mI6RqdQ==", "dev": true, "requires": { - "@rollup/pluginutils": "^3.0.8", - "magic-string": "^0.25.5" + "@rollup/pluginutils": "^3.1.0", + "magic-string": "^0.25.7" } }, "@rollup/pluginutils": { @@ -461,12 +462,6 @@ "magic-string": "^0.25.0" } }, - "@types/color-name": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", - "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", - "dev": true - }, "@types/estree": { "version": "0.0.39", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", @@ -514,9 +509,9 @@ "dev": true }, "@types/node": { - "version": "14.10.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.10.2.tgz", - "integrity": "sha512-IzMhbDYCpv26pC2wboJ4MMOa9GKtjplXfcAqrMeNJpUUwpM/2ATt2w1JPUXwS6spu856TvKZL2AOmeU2rAxskw==", + "version": "10.17.48", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.48.tgz", + "integrity": "sha512-Agl6xbYP6FOMDeAsr3QVZ+g7Yzg0uhPHWx0j5g4LFdUBHVtqtU+gH660k/lCEe506jJLOGbEzsnqPDTZGJQLag==", "dev": true }, "@types/parse-json": { @@ -562,10 +557,16 @@ "integrity": "sha512-FA/BWv8t8ZWJ+gEOnLLd8ygxH/2UFbAvgEonyfN6yWGLKc7zVjbpl2Y4CTjid9h2RfgPP6SEt6uHwEOply00yw==", "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 + }, "acorn": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.0.3.tgz", - "integrity": "sha512-uRMbCU3bM1L697KISxvkd9TA2zASoGFDODzFFdQR4qNpPffj6ZMdp5J4ffXUXR9G0PVPsN0enEkCrvssCkoPsw==", + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.0.4.tgz", + "integrity": "sha512-XNP0PqF1XD19ZlLKvB7cMmnZswW4C/03pRHgirB30uSJTaS3A3V1/P4sS3HPvFmjoriPCJQs+JDSbm4bL1TxGQ==", "dev": true }, "acorn-class-fields": { @@ -617,9 +618,9 @@ "dev": true }, "agent-base": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.1.tgz", - "integrity": "sha512-01q25QQDwLSsyfhrKbn8yuur+JNw0H+0Y4JiGIKd3z9aYk/w/2kxD/Upc+t2ZBBSUNff50VjPsSW2YxM8QYKVg==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", "dev": true, "requires": { "debug": "4" @@ -636,9 +637,9 @@ } }, "ajv": { - "version": "6.12.5", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.5.tgz", - "integrity": "sha512-lRF8RORchjpKG50/WFf8xmg7sgCLFiYNNnqdKflk63whMQcWR5ngGjiSXkL9bjxy6B2npOK2HSMN49jEBMSkag==", + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, "requires": { "fast-deep-equal": "^3.1.1", @@ -732,36 +733,27 @@ "dev": true }, "array-includes": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.1.tgz", - "integrity": "sha512-c2VXaCHl7zPsvpkFsw4nxvFie4fh1ur9bpcgsVkIjqn0H/Xwdg+7fv3n2r/isyS8EBj5b06M9kHyZuIr4El6WQ==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.2.tgz", + "integrity": "sha512-w2GspexNQpx+PutG3QpT437/BenZBj0M/MZGn5mzv/MofYqo0xmRHzn4lFsoDlWJ+THYsGJmFlW68WlDFx7VRw==", "dev": true, "requires": { + "call-bind": "^1.0.0", "define-properties": "^1.1.3", - "es-abstract": "^1.17.0", + "es-abstract": "^1.18.0-next.1", + "get-intrinsic": "^1.0.1", "is-string": "^1.0.5" } }, "array.prototype.flat": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.3.tgz", - "integrity": "sha512-gBlRZV0VSmfPIeWfuuy56XZMvbVfbEUnOXUvt3F/eUUUSyzlgLxhEX4YAEpxNAogRGehPSnfXyPtYyKAhkzQhQ==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1" - } - }, - "array.prototype.map": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array.prototype.map/-/array.prototype.map-1.0.2.tgz", - "integrity": "sha512-Az3OYxgsa1g7xDYp86l0nnN4bcmuEITGe1rbdEBVkrqkzMgDcbdQ2R7r41pNzti+4NMces3H8gMmuioZUilLgw==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.4.tgz", + "integrity": "sha512-4470Xi3GAPAjZqFcljX2xzckv1qeKPizoNkiS0+O4IoPR2ZNpcjE0pkhdihlDouK+x6QOast26B4Q/O9DJnwSg==", "dev": true, "requires": { + "call-bind": "^1.0.0", "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1", - "es-array-method-boxes-properly": "^1.0.0", - "is-string": "^1.0.4" + "es-abstract": "^1.18.0-next.1" } }, "astral-regex": { @@ -823,9 +815,9 @@ }, "dependencies": { "acorn": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz", - "integrity": "sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz", + "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==", "dev": true } } @@ -854,6 +846,16 @@ "write-file-atomic": "^3.0.0" } }, + "call-bind": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.0.tgz", + "integrity": "sha512-AEXsYIyyDY3MCzbwdhzG3Jx1R0J2wetQyUynn6dYHAO+bg8l1k7jwZtRv4ryryFs7EP+NDlikJlVe59jr0cM2w==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.0" + } + }, "callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -878,9 +880,9 @@ } }, "chokidar": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.2.tgz", - "integrity": "sha512-IZHaDeBeI+sZJRX7lGcXsdzgvZqKv6sECqsbErJA4mHWfpRrD8B97kSFN4cQz6nGBGiuFia1MKR4d6c1o8Cv7A==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.3.tgz", + "integrity": "sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ==", "dev": true, "requires": { "anymatch": "~3.1.1", @@ -890,7 +892,7 @@ "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", - "readdirp": "~3.4.0" + "readdirp": "~3.5.0" } }, "ci-info": { @@ -925,12 +927,11 @@ }, "dependencies": { "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "@types/color-name": "^1.1.1", "color-convert": "^2.0.1" } }, @@ -1031,14 +1032,14 @@ } }, "codecov": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/codecov/-/codecov-3.7.2.tgz", - "integrity": "sha512-fmCjAkTese29DUX3GMIi4EaKGflHa4K51EoMc29g8fBHawdk/+KEq5CWOeXLdd9+AT7o1wO4DIpp/Z1KCqCz1g==", + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/codecov/-/codecov-3.8.1.tgz", + "integrity": "sha512-Qm7ltx1pzLPsliZY81jyaQ80dcNR4/JpcX0IHCIWrHBXgseySqbdbYfkdiXd7o/xmzQpGRVCKGYeTrHUpn6Dcw==", "dev": true, "requires": { "argv": "0.0.2", "ignore-walk": "3.0.3", - "js-yaml": "3.13.1", + "js-yaml": "3.14.0", "teeny-request": "6.0.1", "urlgrey": "0.4.4" } @@ -1065,9 +1066,9 @@ "dev": true }, "commander": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-6.1.0.tgz", - "integrity": "sha512-wl7PNrYWd2y5mp1OK/LhTlv8Ff4kQJQRXXAvF+uU/TPNiVJUxZLRYGj/B0y/lPGAVcSbJqH2Za/cvHmrPMC8mA==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.0.tgz", + "integrity": "sha512-zP4jEKbe8SHzKJYQmq8Y9gYjtO/POJLgIdKgV7B9qNmABVFVc+ctqSX6iXh4mCpJfRBOabiZ2YKPg8ciDw6C+Q==", "dev": true }, "commenting": { @@ -1118,9 +1119,9 @@ } }, "core-js": { - "version": "3.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.5.tgz", - "integrity": "sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA==", + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.8.0.tgz", + "integrity": "sha512-W2VYNB0nwQQE7tKS7HzXd7r2y/y2SVJl4ga6oH/dnaLFzM0o2lB2P3zCkWj5Wc/zyMYjtgd5Hmhk0ObkQFZOIA==", "dev": true }, "cosmiconfig": { @@ -1177,12 +1178,12 @@ } }, "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, "decamelize": { @@ -1198,9 +1199,9 @@ "dev": true }, "deep-extend": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.5.1.tgz", - "integrity": "sha512-N8vBdOa+DF7zkRrDCsaOXoCs/E2fJfx9B9MrKnnSiHNh4ws7eSys6YQE4KvT1cecKmOASYQBhbKjeuDD9lT81w==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", "dev": true }, "deep-is": { @@ -1302,53 +1303,25 @@ } }, "es-abstract": { - "version": "1.17.6", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz", - "integrity": "sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==", + "version": "1.18.0-next.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", + "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", "dev": true, "requires": { "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", "has": "^1.0.3", "has-symbols": "^1.0.1", - "is-callable": "^1.2.0", - "is-regex": "^1.1.0", - "object-inspect": "^1.7.0", + "is-callable": "^1.2.2", + "is-negative-zero": "^2.0.0", + "is-regex": "^1.1.1", + "object-inspect": "^1.8.0", "object-keys": "^1.1.1", - "object.assign": "^4.1.0", + "object.assign": "^4.1.1", "string.prototype.trimend": "^1.0.1", "string.prototype.trimstart": "^1.0.1" } }, - "es-array-method-boxes-properly": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz", - "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==", - "dev": true - }, - "es-get-iterator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.0.tgz", - "integrity": "sha512-UfrmHuWQlNMTs35e1ypnvikg6jCz3SK8v8ImvmDsh36fCVUR1MqoFDiyn0/k52C8NqO3YsO8Oe0azeesNuqSsQ==", - "dev": true, - "requires": { - "es-abstract": "^1.17.4", - "has-symbols": "^1.0.1", - "is-arguments": "^1.0.4", - "is-map": "^2.0.1", - "is-set": "^2.0.1", - "is-string": "^1.0.5", - "isarray": "^2.0.5" - }, - "dependencies": { - "isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true - } - } - }, "es-to-primitive": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", @@ -1372,16 +1345,10 @@ "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", "dev": true }, - "es6-object-assign": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/es6-object-assign/-/es6-object-assign-1.1.0.tgz", - "integrity": "sha1-wsNYJlYkfDnqEHyx5mUrb58kUjw=", - "dev": true - }, "es6-shim": { - "version": "0.35.5", - "resolved": "https://registry.npmjs.org/es6-shim/-/es6-shim-0.35.5.tgz", - "integrity": "sha512-E9kK/bjtCQRpN1K28Xh4BlmP8egvZBGJJ+9GtnzOwt7mdqtrjHFuVGr7QJfdjBIKqrlU5duPf3pCBoDrkjVYFg==", + "version": "0.35.6", + "resolved": "https://registry.npmjs.org/es6-shim/-/es6-shim-0.35.6.tgz", + "integrity": "sha512-EmTr31wppcaIAgblChZiuN/l9Y7DPyw8Xtbg7fIVngn6zMW+IEBJDJngeKC3x6wr0V/vcA2wqeFnaw1bFJbDdA==", "dev": true }, "escape-string-regexp": { @@ -1391,13 +1358,13 @@ "dev": true }, "eslint": { - "version": "7.10.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.10.0.tgz", - "integrity": "sha512-BDVffmqWl7JJXqCjAK6lWtcQThZB/aP1HXSH1JKwGwv0LQEdvpR7qzNrUT487RM39B5goWuboFad5ovMBmD8yA==", + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.14.0.tgz", + "integrity": "sha512-5YubdnPXrlrYAFCKybPuHIAH++PINe1pmKNc5wQRB9HSbqIK1ywAnntE3Wwua4giKu0bjligf1gLF6qxMGOYRA==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", - "@eslint/eslintrc": "^0.1.3", + "@eslint/eslintrc": "^0.2.1", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", @@ -1406,7 +1373,7 @@ "enquirer": "^2.3.5", "eslint-scope": "^5.1.1", "eslint-utils": "^2.1.0", - "eslint-visitor-keys": "^1.3.0", + "eslint-visitor-keys": "^2.0.0", "espree": "^7.3.0", "esquery": "^1.2.0", "esutils": "^2.0.2", @@ -1436,12 +1403,11 @@ }, "dependencies": { "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "@types/color-name": "^1.1.1", "color-convert": "^2.0.1" } }, @@ -1606,12 +1572,20 @@ "dev": true, "requires": { "eslint-visitor-keys": "^1.1.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + } } }, "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", + "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", "dev": true }, "espree": { @@ -1626,9 +1600,15 @@ }, "dependencies": { "acorn": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.0.tgz", - "integrity": "sha512-+G7P8jJmCHr+S+cLfQxygbWhXy+8YTVGzAkpEbcLo2mLoL7tij/VG41QSHACSf5QgYRhMZYHuNc6drJaO0Da+w==", + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "dev": true + }, + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", "dev": true } } @@ -1692,9 +1672,9 @@ "dev": true }, "execa": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/execa/-/execa-4.0.3.tgz", - "integrity": "sha512-WFDXGHckXPWZX19t1kCsXzOpqX9LWYNqn4C+HqZlk/V0imTkzJZqf87ZBhvpHaftERYknpk0fjSylnXVlVgI0A==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", + "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", "dev": true, "requires": { "cross-spawn": "^7.0.0", @@ -1857,13 +1837,10 @@ } }, "flat": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz", - "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==", - "dev": true, - "requires": { - "is-buffer": "~2.0.3" - } + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true }, "flat-cache": { "version": "2.0.1", @@ -1893,9 +1870,9 @@ } }, "fromentries": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.2.1.tgz", - "integrity": "sha512-Xu2Qh8yqYuDhQGOhD5iJGninErSfI9A3FrriD3tjUgV5VbJFeH8vfgZ9HnC6jWN80QDVNQK5vmxRAmEAp7Mevw==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz", + "integrity": "sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg==", "dev": true }, "fs-extra": { @@ -1934,9 +1911,9 @@ "dev": true }, "gensync": { - "version": "1.0.0-beta.1", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz", - "integrity": "sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==", + "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 }, "get-caller-file": { @@ -1945,6 +1922,17 @@ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, + "get-intrinsic": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.0.1.tgz", + "integrity": "sha512-ZnWP+AmS1VUaLgTRy47+zKtjTxz+0xMpx3I52i+aalBK1QP19ggLF3Db89KJX7kjfOfP2eoa01qc++GwPgufPg==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + }, "get-own-enumerable-property-symbols": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz", @@ -1958,9 +1946,9 @@ "dev": true }, "get-stdin": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-5.0.1.tgz", - "integrity": "sha1-Ei4WFZHiH/TFJTAwVpPyDmOTo5g=", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz", + "integrity": "sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==", "dev": true }, "get-stream": { @@ -2025,12 +2013,6 @@ "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", "dev": true }, - "graceful-readlink": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", - "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=", - "dev": true - }, "growl": { "version": "1.10.5", "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", @@ -2069,9 +2051,9 @@ } }, "hasha": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.0.tgz", - "integrity": "sha512-2W+jKdQbAdSIrggA8Q35Br8qKadTrqCTC8+XZvBWepKDK6m9XkX6Iz1a2yh2KP01kzAR/dpuMeUnocoLYDcskw==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.2.tgz", + "integrity": "sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ==", "dev": true, "requires": { "is-stream": "^2.0.0", @@ -2150,12 +2132,11 @@ }, "dependencies": { "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "@types/color-name": "^1.1.1", "color-convert": "^2.0.1" } }, @@ -2275,9 +2256,9 @@ } }, "import-fresh": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", - "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.2.tgz", + "integrity": "sha512-cTPNrlvJT6twpYy+YmKUKrTSjWFs3bjYjAhCwm+z4EOCubZxAuO+hHpRN64TqjEaYSHs7tJAE0w1CKMGmsG/lw==", "dev": true, "requires": { "parent-module": "^1.0.0", @@ -2324,12 +2305,6 @@ "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", "dev": true }, - "is-arguments": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz", - "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==", - "dev": true - }, "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -2345,18 +2320,21 @@ "binary-extensions": "^2.0.0" } }, - "is-buffer": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", - "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==", - "dev": true - }, "is-callable": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.1.tgz", - "integrity": "sha512-wliAfSzx6V+6WfMOmus1xy0XvSgf/dlStkvTfq7F0g4bOIW0PSUbnyse3NhDwdyYS1ozfUtAAySqTws3z9Eqgg==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.2.tgz", + "integrity": "sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA==", "dev": true }, + "is-core-module": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz", + "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, "is-date-object": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", @@ -2384,12 +2362,6 @@ "is-extglob": "^2.1.1" } }, - "is-map": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.1.tgz", - "integrity": "sha512-T/S49scO8plUiAOA2DBTBG3JHpn1yiw0kRp6dgiZ0v2/6twi5eiB0rHtHFH9ZIrvlWc6+4O+m4zg5+Z833aXgw==", - "dev": true - }, "is-module": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", @@ -2415,9 +2387,9 @@ "dev": true }, "is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "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 }, "is-reference": { @@ -2444,12 +2416,6 @@ "integrity": "sha1-/S2INUXEa6xaYz57mgnof6LLUGk=", "dev": true }, - "is-set": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.1.tgz", - "integrity": "sha512-eJEzOtVyenDs1TMzSQ3kU3K+E0GUS9sno+F0OBT97xsgcJsF9nXMBtkT9/kut5JEpM7oL7X/0qxR17K3mcwIAA==", - "dev": true - }, "is-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", @@ -2622,26 +2588,10 @@ "istanbul-lib-report": "^3.0.0" } }, - "iterate-iterator": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/iterate-iterator/-/iterate-iterator-1.0.1.tgz", - "integrity": "sha512-3Q6tudGN05kbkDQDI4CqjaBf4qf85w6W6GnuZDtUVYwKgtC1q8yxYX7CZed7N+tLzQqS6roujWvszf13T+n9aw==", - "dev": true - }, - "iterate-value": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/iterate-value/-/iterate-value-1.0.2.tgz", - "integrity": "sha512-A6fMAio4D2ot2r/TYzr4yUWrmwNdsN5xL7+HUiyACE4DXm+q8HtPcnFTp+NnW3k4N05tZ7FVYFFb2CR13NxyHQ==", - "dev": true, - "requires": { - "es-get-iterator": "^1.0.2", - "iterate-iterator": "^1.0.1" - } - }, "jest-worker": { - "version": "26.3.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.3.0.tgz", - "integrity": "sha512-Vmpn2F6IASefL+DVBhPzI2J9/GJUsqzomdeN+P+dK8/jKxbh8R3BtFnx3FIta7wYlPU62cpJMJQo4kuOowcMnw==", + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz", + "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==", "dev": true, "requires": { "@types/node": "*", @@ -2673,9 +2623,9 @@ "dev": true }, "js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz", + "integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==", "dev": true, "requires": { "argparse": "^1.0.7", @@ -2716,9 +2666,9 @@ } }, "jsonc-parser": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-2.2.1.tgz", - "integrity": "sha512-o6/yDBYccGvTz1+QFevz6l6OBZ2+fMVu2JZ9CIhzsYRX4mjaK5IyX9eldUdCmga16zlgQxyrj5pt9kzuj2C02w==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-2.3.1.tgz", + "integrity": "sha512-H8jvkz1O50L3dMZCsLqiuB2tA7muqbSg1AtGEkN0leAqGjsUzDJir3Zwr02BhqdcITPg3ei3mZ+HjMocAknhhg==", "dev": true }, "jsonfile": { @@ -2756,20 +2706,20 @@ } }, "lint-staged": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-10.4.0.tgz", - "integrity": "sha512-uaiX4U5yERUSiIEQc329vhCTDDwUcSvKdRLsNomkYLRzijk3v8V9GWm2Nz0RMVB87VcuzLvtgy6OsjoH++QHIg==", + "version": "10.5.2", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-10.5.2.tgz", + "integrity": "sha512-e8AYR1TDlzwB8VVd38Xu2lXDZf6BcshVqKVuBQThDJRaJLobqKnpbm4dkwJ2puypQNbLr9KF/9mfA649mAGvjA==", "dev": true, "requires": { "chalk": "^4.1.0", "cli-truncate": "^2.1.0", - "commander": "^6.0.0", + "commander": "^6.2.0", "cosmiconfig": "^7.0.0", - "debug": "^4.1.1", + "debug": "^4.2.0", "dedent": "^0.7.0", "enquirer": "^2.3.6", - "execa": "^4.0.3", - "listr2": "^2.6.0", + "execa": "^4.1.0", + "listr2": "^3.2.2", "log-symbols": "^4.0.0", "micromatch": "^4.0.2", "normalize-path": "^3.0.0", @@ -2779,12 +2729,11 @@ }, "dependencies": { "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "@types/color-name": "^1.1.1", "color-convert": "^2.0.1" } }, @@ -2831,9 +2780,9 @@ } }, "listr2": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/listr2/-/listr2-2.6.2.tgz", - "integrity": "sha512-6x6pKEMs8DSIpA/tixiYY2m/GcbgMplMVmhQAaLFxEtNSKLeWTGjtmU57xvv6QCm2XcqzyNXL/cTSVf4IChCRA==", + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-3.2.3.tgz", + "integrity": "sha512-vUb80S2dSUi8YxXahO8/I/s29GqnOL8ozgHVLjfWQXa03BNEeS1TpBLjh2ruaqq5ufx46BRGvfymdBSuoXET5w==", "dev": true, "requires": { "chalk": "^4.1.0", @@ -2842,17 +2791,16 @@ "indent-string": "^4.0.0", "log-update": "^4.0.0", "p-map": "^4.0.0", - "rxjs": "^6.6.2", + "rxjs": "^6.6.3", "through": "^2.3.8" }, "dependencies": { "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "@types/color-name": "^1.1.1", "color-convert": "^2.0.1" } }, @@ -2960,12 +2908,11 @@ }, "dependencies": { "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "@types/color-name": "^1.1.1", "color-convert": "^2.0.1" } }, @@ -3024,12 +2971,11 @@ }, "dependencies": { "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "@types/color-name": "^1.1.1", "color-convert": "^2.0.1" } }, @@ -3113,45 +3059,36 @@ } }, "markdownlint": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/markdownlint/-/markdownlint-0.21.0.tgz", - "integrity": "sha512-rTxr0fbCFmS65oxXBD0HNy3/+PSukLS+b7Z6rGDWbjdRJp/e2dKj538r3KTn8oXrusx+ZtuYOozV2Knpnn0pkQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/markdownlint/-/markdownlint-0.21.1.tgz", + "integrity": "sha512-8kc88w5dyEzlmOWIElp8J17qBgzouOQfJ0LhCcpBFrwgyYK6JTKvILsk4FCEkiNqHkTxwxopT2RS2DYb/10qqg==", "dev": true, "requires": { "markdown-it": "11.0.0" } }, "markdownlint-cli": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/markdownlint-cli/-/markdownlint-cli-0.24.0.tgz", - "integrity": "sha512-AusUxaX4sFayUBFTCKeHc8+fq73KFqIUW+ZZZYyQ/BvY0MoGAnE2C/3xiawSE7WXmpmguaWzhrXRuY6IrOLX7A==", - "dev": true, - "requires": { - "commander": "~2.9.0", - "deep-extend": "~0.5.1", - "get-stdin": "~5.0.1", - "glob": "~7.1.2", - "ignore": "~5.1.4", - "js-yaml": "~3.13.1", - "jsonc-parser": "~2.2.0", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/markdownlint-cli/-/markdownlint-cli-0.25.0.tgz", + "integrity": "sha512-pmiXJgPQtAx6YOMXPCCO3AudMWv8Gnhfrprn0raqevofOhO95nJZ6bTEXkUVbzEwvYhvGxE0Yl888aZwuRGMGw==", + "dev": true, + "requires": { + "commander": "~6.2.0", + "deep-extend": "~0.6.0", + "get-stdin": "~8.0.0", + "glob": "~7.1.6", + "ignore": "~5.1.8", + "js-yaml": "~3.14.0", + "jsonc-parser": "~2.3.1", "lodash.differencewith": "~4.5.0", "lodash.flatten": "~4.4.0", - "markdownlint": "~0.21.0", + "markdownlint": "~0.21.1", "markdownlint-rule-helpers": "~0.12.0", "minimatch": "~3.0.4", "minimist": "~1.2.5", - "rc": "~1.2.7" + "rc": "~1.2.8" }, "dependencies": { - "commander": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz", - "integrity": "sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q=", - "dev": true, - "requires": { - "graceful-readlink": ">= 1.0.0" - } - }, "ignore": { "version": "5.1.8", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", @@ -3235,15 +3172,16 @@ } }, "mocha": { - "version": "8.1.3", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.1.3.tgz", - "integrity": "sha512-ZbaYib4hT4PpF4bdSO2DohooKXIn4lDeiYqB+vTmCdr6l2woW0b6H3pf5x4sM5nwQMru9RvjjHYWVGltR50ZBw==", + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.2.1.tgz", + "integrity": "sha512-cuLBVfyFfFqbNR0uUKbDGXKGk+UDFe6aR4os78XIrMQpZl/nv7JYHcvP5MFIAb374b2zFXsdgEGwmzMtP0Xg8w==", "dev": true, "requires": { + "@ungap/promise-all-settled": "1.1.2", "ansi-colors": "4.1.1", "browser-stdout": "1.3.1", - "chokidar": "3.4.2", - "debug": "4.1.1", + "chokidar": "3.4.3", + "debug": "4.2.0", "diff": "4.0.2", "escape-string-regexp": "4.0.0", "find-up": "5.0.0", @@ -3254,19 +3192,27 @@ "log-symbols": "4.0.0", "minimatch": "3.0.4", "ms": "2.1.2", - "object.assign": "4.1.0", - "promise.allsettled": "1.0.2", - "serialize-javascript": "4.0.0", - "strip-json-comments": "3.0.1", - "supports-color": "7.1.0", + "nanoid": "3.1.12", + "serialize-javascript": "5.0.1", + "strip-json-comments": "3.1.1", + "supports-color": "7.2.0", "which": "2.0.2", "wide-align": "1.1.3", - "workerpool": "6.0.0", + "workerpool": "6.0.2", "yargs": "13.3.2", "yargs-parser": "13.1.2", - "yargs-unparser": "1.6.1" + "yargs-unparser": "2.0.0" }, "dependencies": { + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, "escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", @@ -3289,16 +3235,6 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "js-yaml": { - "version": "3.14.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz", - "integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, "locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -3308,25 +3244,13 @@ "p-locate": "^5.0.0" } }, - "object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" - } - }, "p-limit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.0.2.tgz", - "integrity": "sha512-iwqZSOoWIW+Ew4kAGUlN16J4M7OB3ysMLSZtnhmqx7njIHFPlxWBX8xo3lVTyFVq6mI/lL9qt2IsN1sHwaxJkg==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "requires": { - "p-try": "^2.0.0" + "yocto-queue": "^0.1.0" } }, "p-locate": { @@ -3338,28 +3262,16 @@ "p-limit": "^3.0.2" } }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, "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 }, - "strip-json-comments": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz", - "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==", - "dev": true - }, "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "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" @@ -3389,6 +3301,12 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, + "nanoid": { + "version": "3.1.12", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.12.tgz", + "integrity": "sha512-1qstj9z5+x491jfiC4Nelk+f8XBad7LN20PmyWINJEMRSf3wcAjAWysw1qaA8z6NSKe2sjq1hRSDpBH5paCb6A==", + "dev": true + }, "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -3631,9 +3549,9 @@ } }, "object-inspect": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz", - "integrity": "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz", + "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==", "dev": true }, "object-keys": { @@ -3643,48 +3561,26 @@ "dev": true }, "object.assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.1.tgz", - "integrity": "sha512-VT/cxmx5yaoHSOTSyrCygIDFco+RsibY2NM0a4RdEeY/4KgqezwFtK1yr3U67xYhqJSlASm2pKhLVzPj2lr4bA==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", "dev": true, "requires": { + "call-bind": "^1.0.0", "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.0", "has-symbols": "^1.0.1", "object-keys": "^1.1.1" - }, - "dependencies": { - "es-abstract": { - "version": "1.18.0-next.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.0.tgz", - "integrity": "sha512-elZXTZXKn51hUBdJjSZGYRujuzilgXo8vSPQzjGYXLvSlGiCo8VO8ZGV3kjo9a0WNJJ57hENagwbtlRuHuzkcQ==", - "dev": true, - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.0", - "is-negative-zero": "^2.0.0", - "is-regex": "^1.1.1", - "object-inspect": "^1.8.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.0", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - } - } } }, "object.values": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.1.tgz", - "integrity": "sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.2.tgz", + "integrity": "sha512-MYC0jvJopr8EK6dPBiO8Nb9mvjdypOachO5REGk6MXzujbBrAisKo3HmdEI6kZDL6fC31Mwee/5YbtMebixeag==", "dev": true, "requires": { + "call-bind": "^1.0.0", "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1", - "function-bind": "^1.1.1", + "es-abstract": "^1.18.0-next.1", "has": "^1.0.3" } }, @@ -3871,9 +3767,9 @@ "dev": true }, "prettier": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.1.2.tgz", - "integrity": "sha512-16c7K+x4qVlJg9rEbXl7HEGmQyZlG4R9AgP+oHKRMsMsuk8s+ATStlf1NpDqyBI1HpVyfjLOeMhH2LvuNvV5Vg==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.1.tgz", + "integrity": "sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==", "dev": true }, "pretty-bytes": { @@ -3906,19 +3802,6 @@ "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "dev": true }, - "promise.allsettled": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/promise.allsettled/-/promise.allsettled-1.0.2.tgz", - "integrity": "sha512-UpcYW5S1RaNKT6pd+s9jp9K9rlQge1UXKskec0j6Mmuq7UJCvlS2J2/s/yuPN8ehftf9HXMxWlKiPbGGUzpoRg==", - "dev": true, - "requires": { - "array.prototype.map": "^1.0.1", - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1", - "function-bind": "^1.1.1", - "iterate-value": "^1.0.0" - } - }, "pump": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", @@ -3962,12 +3845,6 @@ "strip-json-comments": "~2.0.1" }, "dependencies": { - "deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "dev": true - }, "strip-json-comments": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", @@ -3998,9 +3875,9 @@ } }, "readdirp": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.4.0.tgz", - "integrity": "sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ==", + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", + "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", "dev": true, "requires": { "picomatch": "^2.2.1" @@ -4016,9 +3893,9 @@ } }, "regenerate": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.1.tgz", - "integrity": "sha512-j2+C8+NtXQgEKWk49MMP5P/u2GhnahTtVkRIHr5R5lVRlbKvmQ+oS+A5aLKWp2ma5VkT8sh6v+v4hbH0YHR66A==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", + "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", "dev": true }, "regenerate-unicode-properties": { @@ -4105,11 +3982,12 @@ "dev": true }, "resolve": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", - "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", + "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", "dev": true, "requires": { + "is-core-module": "^2.1.0", "path-parse": "^1.0.6" } }, @@ -4139,9 +4017,9 @@ } }, "rollup": { - "version": "2.28.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.28.2.tgz", - "integrity": "sha512-8txbsFBFLmm9Xdt4ByTOGa9Muonmc8MfNjnGAR8U8scJlF1ZW7AgNZa7aqBXaKtlvnYP/ab++fQIq9dB9NWUbg==", + "version": "2.34.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.34.0.tgz", + "integrity": "sha512-dW5iLvttZzdVehjEuNJ1bWvuMEJjOWGmnuFS82WeKHTGXDkRHQeq/ExdifkSyJv9dLcR86ysKRmrIDyR6O0X8g==", "dev": true, "requires": { "fsevents": "~2.1.2" @@ -4197,6 +4075,17 @@ "jest-worker": "^26.2.1", "serialize-javascript": "^4.0.0", "terser": "^5.0.0" + }, + "dependencies": { + "serialize-javascript": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", + "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", + "dev": true, + "requires": { + "randombytes": "^2.1.0" + } + } } }, "rollup-plugin-thatworks": { @@ -4242,9 +4131,9 @@ }, "dependencies": { "tslib": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz", - "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true } } @@ -4285,9 +4174,9 @@ "dev": true }, "serialize-javascript": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", - "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-5.0.1.tgz", + "integrity": "sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==", "dev": true, "requires": { "randombytes": "^2.1.0" @@ -4336,14 +4225,13 @@ } }, "shx": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/shx/-/shx-0.3.2.tgz", - "integrity": "sha512-aS0mWtW3T2sHAenrSrip2XGv39O9dXIFUqxAEWHEOS1ePtGIBavdPJY1kE2IHl14V/4iCbUiNDPGdyYTtmhSoA==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/shx/-/shx-0.3.3.tgz", + "integrity": "sha512-nZJ3HFWVoTSyyB+evEKjJ1STiixGztlqwKLTUNV5KqMWtGey9fTd4KU1gdZ1X9BV6215pswQ/Jew9NsuS/fNDA==", "dev": true, "requires": { - "es6-object-assign": "^1.0.3", - "minimist": "^1.2.0", - "shelljs": "^0.8.1" + "minimist": "^1.2.3", + "shelljs": "^0.8.4" } }, "signal-exit": { @@ -4471,9 +4359,9 @@ } }, "spdx-license-ids": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", - "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz", + "integrity": "sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ==", "dev": true }, "spdx-ranges": { @@ -4543,23 +4431,23 @@ } }, "string.prototype.trimend": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", - "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.3.tgz", + "integrity": "sha512-ayH0pB+uf0U28CtjlLvL7NaohvR1amUvVZk+y3DYb0Ey2PUV5zPkkKy9+U1ndVEIXO8hNg18eIv9Jntbii+dKw==", "dev": true, "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5" + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" } }, "string.prototype.trimstart": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz", - "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.3.tgz", + "integrity": "sha512-oBIBUy5lea5tt0ovtOFiEQaBkoBBkyJhZXzJYrSmDo5IUUqbOPvVezuRs/agBIdZ2p2Eo1FD6bD9USyBLfl3xg==", "dev": true, "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5" + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" } }, "stringify-object": { @@ -4616,9 +4504,9 @@ } }, "systemjs": { - "version": "6.6.1", - "resolved": "https://registry.npmjs.org/systemjs/-/systemjs-6.6.1.tgz", - "integrity": "sha512-Niw/DZwTPmdLGC0CCe+n/MdRu927XyN/jzxKZyU6tUfeNqGQlxO5oVXuVMsJHxPO2cnXyHh0/zIGdXaocOMLVQ==", + "version": "6.8.1", + "resolved": "https://registry.npmjs.org/systemjs/-/systemjs-6.8.1.tgz", + "integrity": "sha512-HjxELHbx2LpfHfrsrYFMvkK1Hfh3IpUxPUNUzClxThW0POUlv53qb8N0FZ48+hlfIC4OANFwzxwRp4fTXSfYKw==", "dev": true }, "table": { @@ -4647,9 +4535,9 @@ } }, "terser": { - "version": "5.3.4", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.3.4.tgz", - "integrity": "sha512-dxuB8KQo8Gt6OVOeLg/rxfcxdNZI/V1G6ze1czFUzPeCFWZRtvZMgSzlZZ5OYBZ4HoG607F6pFPNLekJyV+yVw==", + "version": "5.5.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.5.1.tgz", + "integrity": "sha512-6VGWZNVP2KTUcltUQJ25TtNjx/XgdDsBDKGt8nN0MpydU36LmbPPcMBd2kmtZNNGVVDLg44k7GKeHHj+4zPIBQ==", "dev": true, "requires": { "commander": "^2.20.0", @@ -4722,9 +4610,9 @@ } }, "tslib": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz", - "integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==", "dev": true }, "tslint": { @@ -4767,9 +4655,9 @@ "dev": true }, "tslib": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz", - "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true } } @@ -4784,9 +4672,9 @@ }, "dependencies": { "tslib": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz", - "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true } } @@ -4816,9 +4704,9 @@ } }, "typescript": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.0.3.tgz", - "integrity": "sha512-tEu6DGxGgRJPb/mVPIZ48e69xCn2yRmCgYmDugAVwmJ6o+0u1RI18eO7E7WBTLYLaEVVOhwQmcdhQHweux/WPg==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.2.tgz", + "integrity": "sha512-thGloWsGH3SOxv1SoY7QojKi0tc+8FnOmiarEGMbd/lar7QOEd3hvlx3Fp5y6FlDUGl9L+pd4n2e+oToGMmhRQ==", "dev": true }, "uc.micro": { @@ -4893,9 +4781,9 @@ "dev": true }, "v8-compile-cache": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz", - "integrity": "sha512-8OQ9CL+VWyt3JStj7HX7/ciTL2V3Rl1Wf5OL+SNTm0yK1KvtReVulksyeRnCANHHuUxHlQig+JJDlUhBt1NQDQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.2.0.tgz", + "integrity": "sha512-gTpR5XQNKFwOd4clxfnhaqvfqMpqEwr4tOtCyz4MtYZX2JYhfr1JvBFKdS+7K/9rfpZR3VLX+YWBbKoxCgS43Q==", "dev": true }, "validate-npm-package-license": { @@ -4995,9 +4883,9 @@ "dev": true }, "workerpool": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.0.0.tgz", - "integrity": "sha512-fU2OcNA/GVAJLLyKUoHkAgIhKb0JoCpSjLC/G2vYKxUjVmQwGbRVeoPJ1a8U4pnVofz4AQV5Y/NEw8oKqxEBtA==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.0.2.tgz", + "integrity": "sha512-DSNyvOpFKrNusaaUwk+ej6cBj1bmhLcBfj80elGk+ZIo5JSkq+unB1dLKEOcNfJDZgjGICfhQ0Q5TbP0PvF4+Q==", "dev": true }, "wrap-ansi": { @@ -5012,12 +4900,11 @@ }, "dependencies": { "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "@types/color-name": "^1.1.1", "color-convert": "^2.0.1" } }, @@ -5089,9 +4976,9 @@ } }, "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", + "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==", "dev": true }, "yaml": { @@ -5174,97 +5061,42 @@ } }, "yargs-parser": { - "version": "20.2.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.1.tgz", - "integrity": "sha512-yYsjuSkjbLMBp16eaOt7/siKTjNVjMm3SoJnIg3sEh/JsvqVVDyjRKmaJV4cl+lNIgq6QEco2i3gDebJl7/vLA==", + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", "dev": true }, "yargs-unparser": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.1.tgz", - "integrity": "sha512-qZV14lK9MWsGCmcr7u5oXGH0dbGqZAIxTDrWXZDo5zUr6b6iUmelNKO6x6R1dQT24AH3LgRxJpr8meWy2unolA==", + "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": { - "camelcase": "^5.3.1", - "decamelize": "^1.2.0", - "flat": "^4.1.0", - "is-plain-obj": "^1.1.0", - "yargs": "^14.2.3" + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" }, "dependencies": { - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "camelcase": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", + "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", "dev": true }, - "yargs": { - "version": "14.2.3", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-14.2.3.tgz", - "integrity": "sha512-ZbotRWhF+lkjijC/VhmOT9wSgyBQ7+zr13+YLkhfsSiTriYsMzkTUFP18pFhWwBeMa5gUc1MzbhrO6/VB7c9Xg==", - "dev": true, - "requires": { - "cliui": "^5.0.0", - "decamelize": "^1.2.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^15.0.1" - } - }, - "yargs-parser": { - "version": "15.0.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-15.0.1.tgz", - "integrity": "sha512-0OAMV2mAZQrs3FkNpDQcBk1x5HXb8X4twADss4S0Iuk+2dGnLOE/fRHrsYm542GduMveyA77OF4wrNJuanRCWw==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } + "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 } } + }, + "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 } } } diff --git a/package.json b/package.json index e8216980f7e..b0815660c98 100644 --- a/package.json +++ b/package.json @@ -60,50 +60,50 @@ "devDependencies": { "@rollup/plugin-alias": "^3.1.1", "@rollup/plugin-buble": "^0.21.3", - "@rollup/plugin-commonjs": "^15.1.0", + "@rollup/plugin-commonjs": "^17.0.0", "@rollup/plugin-json": "^4.1.0", - "@rollup/plugin-node-resolve": "^9.0.0", - "@rollup/plugin-replace": "^2.3.3", + "@rollup/plugin-node-resolve": "^10.0.0", + "@rollup/plugin-replace": "^2.3.4", "@types/micromatch": "^4.0.1", - "@types/node": "^14.10.2", + "@types/node": "^10.17.48", "@types/require-relative": "^0.8.0", "@types/signal-exit": "^3.0.0", "@types/yargs-parser": "^15.0.0", - "acorn": "^8.0.3", + "acorn": "^8.0.4", "acorn-class-fields": "^0.3.7", "acorn-jsx": "^5.3.1", "acorn-numeric-separator": "^0.3.6", "acorn-static-class-features": "^0.2.4", "acorn-walk": "^8.0.0", "buble": "^0.20.0", - "chokidar": "^3.4.2", - "codecov": "^3.7.2", + "chokidar": "^3.4.3", + "codecov": "^3.8.1", "colorette": "^1.2.1", - "core-js": "^3.6.5", + "core-js": "^3.8.0", "date-time": "^3.1.0", "es5-shim": "^4.5.14", - "es6-shim": "^0.35.5", - "eslint": "^7.10.0", + "es6-shim": "^0.35.6", + "eslint": "^7.14.0", "eslint-plugin-import": "^2.22.1", - "execa": "^4.0.3", + "execa": "^4.1.0", "fixturify": "^2.1.0", "hash.js": "^1.1.7", "husky": "^4.3.0", "is-reference": "^1.2.1", - "lint-staged": "^10.4.0", + "lint-staged": "^10.5.2", "locate-character": "^2.0.5", "magic-string": "^0.25.7", - "markdownlint-cli": "^0.24.0", + "markdownlint-cli": "^0.25.0", "micromatch": "^4.0.2", - "mocha": "^8.1.3", + "mocha": "^8.2.1", "node-fetch": "^2.6.1", "nyc": "^15.1.0", - "prettier": "^2.1.2", + "prettier": "^2.2.1", "pretty-bytes": "^5.4.1", "pretty-ms": "^7.0.1", "require-relative": "^0.8.7", "requirejs": "^2.3.6", - "rollup": "^2.28.2", + "rollup": "^2.34.0", "rollup-plugin-license": "^2.2.0", "rollup-plugin-string": "^3.0.0", "rollup-plugin-terser": "^7.0.2", @@ -111,19 +111,19 @@ "rollup-plugin-typescript": "^1.0.1", "rollup-pluginutils": "^2.8.2", "sander": "^0.6.0", - "shx": "^0.3.2", + "shx": "^0.3.3", "signal-exit": "^3.0.3", "source-map": "^0.7.3", "source-map-support": "^0.5.19", "sourcemap-codec": "^1.4.8", - "systemjs": "^6.6.1", - "terser": "^5.3.4", - "tslib": "^2.0.1", + "systemjs": "^6.8.1", + "terser": "^5.5.1", + "tslib": "^2.0.3", "tslint": "^6.1.3", - "typescript": "^4.0.3", + "typescript": "^4.1.2", "url-parse": "^1.4.7", "weak-napi": "^2.0.2", - "yargs-parser": "^20.2.1" + "yargs-parser": "^20.2.4" }, "files": [ "dist/**/*.js", diff --git a/src/utils/FileEmitter.ts b/src/utils/FileEmitter.ts index 25a47c5e2b4..2c63cbd79f5 100644 --- a/src/utils/FileEmitter.ts +++ b/src/utils/FileEmitter.ts @@ -103,10 +103,10 @@ export const FILE_PLACEHOLDER: FilePlaceholder = { function hasValidType( emittedFile: unknown ): emittedFile is { type: 'asset' | 'chunk'; [key: string]: unknown } { - return ( + return Boolean( emittedFile && - ((emittedFile as { [key: string]: unknown }).type === 'asset' || - (emittedFile as { [key: string]: unknown }).type === 'chunk') + ((emittedFile as { [key: string]: unknown }).type === 'asset' || + (emittedFile as { [key: string]: unknown }).type === 'chunk') ); } diff --git a/src/watch/watch.ts b/src/watch/watch.ts index b10bbdaa5a1..142c9e78e35 100644 --- a/src/watch/watch.ts +++ b/src/watch/watch.ts @@ -17,20 +17,20 @@ import { FileWatcher } from './fileWatcher'; const eventsRewrites: Record> = { create: { create: 'buggy', - delete: null, //delete file from map - update: 'create', + delete: null, //delete file from map + update: 'create' }, delete: { create: 'update', delete: 'buggy', - update: 'buggy', + update: 'buggy' }, update: { create: 'buggy', delete: 'delete', - update: 'update', + update: 'update' } -} +}; export class Watcher { emitter: RollupWatcher; @@ -66,12 +66,10 @@ export class Watcher { this.emitter.removeAllListeners(); } - invalidate(file?: {event: ChangeEvent, id: string}) { + invalidate(file?: { event: ChangeEvent; id: string }) { if (file) { const prevEvent = this.invalidatedIds.get(file.id); - const event = prevEvent - ? eventsRewrites[prevEvent][file.event] - : file.event; + const event = prevEvent ? eventsRewrites[prevEvent][file.event] : file.event; if (event === 'buggy') { //TODO: throws or warn? Currently just ignore, uses new event @@ -92,7 +90,7 @@ export class Watcher { this.buildTimeout = setTimeout(() => { this.buildTimeout = null; for (const [id, event] of this.invalidatedIds.entries()) { - this.emitter.emit('change', id, {event}); + this.emitter.emit('change', id, { event }); } this.invalidatedIds.clear(); this.emitter.emit('restart'); @@ -150,7 +148,7 @@ export class Task { this.closed = false; this.watched = new Set(); - this.skipWrite = config.watch && !!(config.watch as GenericConfigObject).skipWrite; + this.skipWrite = Boolean(config.watch && (config.watch as GenericConfigObject).skipWrite); this.options = mergeOptions(config); this.outputs = this.options.output; this.outputFiles = this.outputs.map(output => { @@ -172,7 +170,7 @@ export class Task { this.fileWatcher.close(); } - invalidate(id: string, details: {event: ChangeEvent, isTransformDependency?: boolean}) { + invalidate(id: string, details: { event: ChangeEvent; isTransformDependency?: boolean }) { this.invalidated = true; if (details.isTransformDependency) { for (const module of this.cache.modules) { @@ -181,7 +179,7 @@ export class Task { module.originalCode = null as any; } } - this.watcher.invalidate({id, event: details.event}); + this.watcher.invalidate({ id, event: details.event }); } async run() { diff --git a/test/chunking-form/samples/preserve-modules-root/_config.js b/test/chunking-form/samples/preserve-modules-root/_config.js index 85a19e67dfd..4a2c217a216 100644 --- a/test/chunking-form/samples/preserve-modules-root/_config.js +++ b/test/chunking-form/samples/preserve-modules-root/_config.js @@ -3,6 +3,7 @@ const resolve = require('@rollup/plugin-node-resolve').default; module.exports = { description: 'confirm preserveModulesRoot restructures src appropriately', + expectedWarnings: ['MIXED_EXPORTS'], options: { input: ['src/under-build.js', 'src/below/module.js'], plugins: [ diff --git a/test/chunking-form/samples/preserve-modules-root/_expected/amd/_virtual/_commonjsHelpers.js b/test/chunking-form/samples/preserve-modules-root/_expected/amd/_virtual/_commonjsHelpers.js deleted file mode 100644 index ddeebd3fe95..00000000000 --- a/test/chunking-form/samples/preserve-modules-root/_expected/amd/_virtual/_commonjsHelpers.js +++ /dev/null @@ -1,22 +0,0 @@ -define(['exports'], function (exports) { 'use strict'; - - function createCommonjsModule(fn, basedir, module) { - return module = { - path: basedir, - exports: {}, - require: function (path, base) { - return commonjsRequire(path, (base === undefined || base === null) ? module.path : base); - } - }, fn(module, module.exports), module.exports; - } - - function commonjsRequire () { - throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs'); - } - - exports.commonjsRequire = commonjsRequire; - exports.createCommonjsModule = createCommonjsModule; - - Object.defineProperty(exports, '__esModule', { value: true }); - -}); diff --git a/test/chunking-form/samples/preserve-modules-root/_expected/amd/_virtual/index.js_commonjs-proxy b/test/chunking-form/samples/preserve-modules-root/_expected/amd/_virtual/index.js_commonjs-proxy index c0ae15db897..ab3c381353d 100644 --- a/test/chunking-form/samples/preserve-modules-root/_expected/amd/_virtual/index.js_commonjs-proxy +++ b/test/chunking-form/samples/preserve-modules-root/_expected/amd/_virtual/index.js_commonjs-proxy @@ -2,6 +2,6 @@ define(['../custom_modules/@my-scope/my-base-pkg/index'], function (index) { 'us - return index.myBasePkg; + return index['default']; }); diff --git a/test/chunking-form/samples/preserve-modules-root/_expected/amd/below/module.js b/test/chunking-form/samples/preserve-modules-root/_expected/amd/below/module.js index 1e667ae03f7..76349f83439 100644 --- a/test/chunking-form/samples/preserve-modules-root/_expected/amd/below/module.js +++ b/test/chunking-form/samples/preserve-modules-root/_expected/amd/below/module.js @@ -1,7 +1,7 @@ define(['../custom_modules/@my-scope/my-base-pkg/index'], function (index) { 'use strict'; var module = { - base2: index.myBasePkg, + base2: index['default'], }; return module; diff --git a/test/chunking-form/samples/preserve-modules-root/_expected/amd/custom_modules/@my-scope/my-base-pkg/index.js b/test/chunking-form/samples/preserve-modules-root/_expected/amd/custom_modules/@my-scope/my-base-pkg/index.js index fb2660a7ee1..ef4813e1c42 100644 --- a/test/chunking-form/samples/preserve-modules-root/_expected/amd/custom_modules/@my-scope/my-base-pkg/index.js +++ b/test/chunking-form/samples/preserve-modules-root/_expected/amd/custom_modules/@my-scope/my-base-pkg/index.js @@ -1,15 +1,15 @@ -define(['exports', '../../../_virtual/_commonjsHelpers'], function (exports, _commonjsHelpers) { 'use strict'; - - var myBasePkg = _commonjsHelpers.createCommonjsModule(function (module, exports) { - - Object.defineProperty(exports, '__esModule', { value: true }); +define(['exports'], function (exports) { 'use strict'; var hello = 'world'; - exports.hello = hello; - }); + var hello_1 = hello; + + var myBasePkg = /*#__PURE__*/Object.defineProperty({ + hello: hello_1 + }, '__esModule', {value: true}); - exports.myBasePkg = myBasePkg; + exports.default = myBasePkg; + exports.hello = hello_1; Object.defineProperty(exports, '__esModule', { value: true }); diff --git a/test/chunking-form/samples/preserve-modules-root/_expected/amd/under-build.js b/test/chunking-form/samples/preserve-modules-root/_expected/amd/under-build.js index dedbcba3e08..6c06ac3c08a 100644 --- a/test/chunking-form/samples/preserve-modules-root/_expected/amd/under-build.js +++ b/test/chunking-form/samples/preserve-modules-root/_expected/amd/under-build.js @@ -1,7 +1,7 @@ define(['./custom_modules/@my-scope/my-base-pkg/index'], function (index) { 'use strict'; var underBuild = { - base: index.myBasePkg + base: index['default'] }; return underBuild; diff --git a/test/chunking-form/samples/preserve-modules-root/_expected/cjs/_virtual/_commonjsHelpers.js b/test/chunking-form/samples/preserve-modules-root/_expected/cjs/_virtual/_commonjsHelpers.js deleted file mode 100644 index 7fd5b22c30f..00000000000 --- a/test/chunking-form/samples/preserve-modules-root/_expected/cjs/_virtual/_commonjsHelpers.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -function createCommonjsModule(fn, basedir, module) { - return module = { - path: basedir, - exports: {}, - require: function (path, base) { - return commonjsRequire(path, (base === undefined || base === null) ? module.path : base); - } - }, fn(module, module.exports), module.exports; -} - -function commonjsRequire () { - throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs'); -} - -exports.commonjsRequire = commonjsRequire; -exports.createCommonjsModule = createCommonjsModule; diff --git a/test/chunking-form/samples/preserve-modules-root/_expected/cjs/_virtual/index.js_commonjs-proxy b/test/chunking-form/samples/preserve-modules-root/_expected/cjs/_virtual/index.js_commonjs-proxy index 7afb9b78806..7d2381c515a 100644 --- a/test/chunking-form/samples/preserve-modules-root/_expected/cjs/_virtual/index.js_commonjs-proxy +++ b/test/chunking-form/samples/preserve-modules-root/_expected/cjs/_virtual/index.js_commonjs-proxy @@ -4,4 +4,4 @@ var index = require('../custom_modules/@my-scope/my-base-pkg/index.js'); -module.exports = index.myBasePkg; +module.exports = index['default']; diff --git a/test/chunking-form/samples/preserve-modules-root/_expected/cjs/below/module.js b/test/chunking-form/samples/preserve-modules-root/_expected/cjs/below/module.js index e8430ef8b6d..6af5f4cec31 100644 --- a/test/chunking-form/samples/preserve-modules-root/_expected/cjs/below/module.js +++ b/test/chunking-form/samples/preserve-modules-root/_expected/cjs/below/module.js @@ -3,7 +3,7 @@ var index = require('../custom_modules/@my-scope/my-base-pkg/index.js'); var module$1 = { - base2: index.myBasePkg, + base2: index['default'], }; module.exports = module$1; diff --git a/test/chunking-form/samples/preserve-modules-root/_expected/cjs/custom_modules/@my-scope/my-base-pkg/index.js b/test/chunking-form/samples/preserve-modules-root/_expected/cjs/custom_modules/@my-scope/my-base-pkg/index.js index 6af68b8ed1c..8b431ebde99 100644 --- a/test/chunking-form/samples/preserve-modules-root/_expected/cjs/custom_modules/@my-scope/my-base-pkg/index.js +++ b/test/chunking-form/samples/preserve-modules-root/_expected/cjs/custom_modules/@my-scope/my-base-pkg/index.js @@ -2,15 +2,13 @@ Object.defineProperty(exports, '__esModule', { value: true }); -var _commonjsHelpers = require('../../../_virtual/_commonjsHelpers.js'); - -var myBasePkg = _commonjsHelpers.createCommonjsModule(function (module, exports) { - -Object.defineProperty(exports, '__esModule', { value: true }); - var hello = 'world'; -exports.hello = hello; -}); +var hello_1 = hello; + +var myBasePkg = /*#__PURE__*/Object.defineProperty({ + hello: hello_1 +}, '__esModule', {value: true}); -exports.myBasePkg = myBasePkg; +exports.default = myBasePkg; +exports.hello = hello_1; diff --git a/test/chunking-form/samples/preserve-modules-root/_expected/cjs/under-build.js b/test/chunking-form/samples/preserve-modules-root/_expected/cjs/under-build.js index 321474036e1..6b20342820f 100644 --- a/test/chunking-form/samples/preserve-modules-root/_expected/cjs/under-build.js +++ b/test/chunking-form/samples/preserve-modules-root/_expected/cjs/under-build.js @@ -3,7 +3,7 @@ var index = require('./custom_modules/@my-scope/my-base-pkg/index.js'); var underBuild = { - base: index.myBasePkg + base: index['default'] }; module.exports = underBuild; diff --git a/test/chunking-form/samples/preserve-modules-root/_expected/es/_virtual/_commonjsHelpers.js b/test/chunking-form/samples/preserve-modules-root/_expected/es/_virtual/_commonjsHelpers.js deleted file mode 100644 index f52fc123133..00000000000 --- a/test/chunking-form/samples/preserve-modules-root/_expected/es/_virtual/_commonjsHelpers.js +++ /dev/null @@ -1,15 +0,0 @@ -function createCommonjsModule(fn, basedir, module) { - return module = { - path: basedir, - exports: {}, - require: function (path, base) { - return commonjsRequire(path, (base === undefined || base === null) ? module.path : base); - } - }, fn(module, module.exports), module.exports; -} - -function commonjsRequire () { - throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs'); -} - -export { commonjsRequire, createCommonjsModule }; diff --git a/test/chunking-form/samples/preserve-modules-root/_expected/es/_virtual/index.js_commonjs-proxy b/test/chunking-form/samples/preserve-modules-root/_expected/es/_virtual/index.js_commonjs-proxy index f2f4d5354b2..6faf6faed96 100644 --- a/test/chunking-form/samples/preserve-modules-root/_expected/es/_virtual/index.js_commonjs-proxy +++ b/test/chunking-form/samples/preserve-modules-root/_expected/es/_virtual/index.js_commonjs-proxy @@ -1,2 +1,2 @@ -import { m as myBasePkg } from '../custom_modules/@my-scope/my-base-pkg/index.js'; -export { m as default } from '../custom_modules/@my-scope/my-base-pkg/index.js'; +import myBasePkg from '../custom_modules/@my-scope/my-base-pkg/index.js'; +export { default } from '../custom_modules/@my-scope/my-base-pkg/index.js'; diff --git a/test/chunking-form/samples/preserve-modules-root/_expected/es/below/module.js b/test/chunking-form/samples/preserve-modules-root/_expected/es/below/module.js index 1231dcf4b8e..3612c1b3210 100644 --- a/test/chunking-form/samples/preserve-modules-root/_expected/es/below/module.js +++ b/test/chunking-form/samples/preserve-modules-root/_expected/es/below/module.js @@ -1,4 +1,4 @@ -import { m as myBasePkg } from '../custom_modules/@my-scope/my-base-pkg/index.js'; +import myBasePkg from '../custom_modules/@my-scope/my-base-pkg/index.js'; var module = { base2: myBasePkg, diff --git a/test/chunking-form/samples/preserve-modules-root/_expected/es/custom_modules/@my-scope/my-base-pkg/index.js b/test/chunking-form/samples/preserve-modules-root/_expected/es/custom_modules/@my-scope/my-base-pkg/index.js index 0367167d121..7e4a07633fd 100644 --- a/test/chunking-form/samples/preserve-modules-root/_expected/es/custom_modules/@my-scope/my-base-pkg/index.js +++ b/test/chunking-form/samples/preserve-modules-root/_expected/es/custom_modules/@my-scope/my-base-pkg/index.js @@ -1,12 +1,10 @@ -import { createCommonjsModule } from '../../../_virtual/_commonjsHelpers.js'; - -var myBasePkg = createCommonjsModule(function (module, exports) { - -Object.defineProperty(exports, '__esModule', { value: true }); - var hello = 'world'; -exports.hello = hello; -}); +var hello_1 = hello; + +var myBasePkg = /*#__PURE__*/Object.defineProperty({ + hello: hello_1 +}, '__esModule', {value: true}); -export { myBasePkg as m }; +export default myBasePkg; +export { hello_1 as hello }; diff --git a/test/chunking-form/samples/preserve-modules-root/_expected/es/under-build.js b/test/chunking-form/samples/preserve-modules-root/_expected/es/under-build.js index c26b9473a7e..9ac585cd0e0 100644 --- a/test/chunking-form/samples/preserve-modules-root/_expected/es/under-build.js +++ b/test/chunking-form/samples/preserve-modules-root/_expected/es/under-build.js @@ -1,4 +1,4 @@ -import { m as myBasePkg } from './custom_modules/@my-scope/my-base-pkg/index.js'; +import myBasePkg from './custom_modules/@my-scope/my-base-pkg/index.js'; var underBuild = { base: myBasePkg diff --git a/test/chunking-form/samples/preserve-modules-root/_expected/system/_virtual/_commonjsHelpers.js b/test/chunking-form/samples/preserve-modules-root/_expected/system/_virtual/_commonjsHelpers.js deleted file mode 100644 index d8e070af7fb..00000000000 --- a/test/chunking-form/samples/preserve-modules-root/_expected/system/_virtual/_commonjsHelpers.js +++ /dev/null @@ -1,27 +0,0 @@ -System.register([], function (exports) { - 'use strict'; - return { - execute: function () { - - exports({ - commonjsRequire: commonjsRequire, - createCommonjsModule: createCommonjsModule - }); - - function createCommonjsModule(fn, basedir, module) { - return module = { - path: basedir, - exports: {}, - require: function (path, base) { - return commonjsRequire(path, (base === undefined || base === null) ? module.path : base); - } - }, fn(module, module.exports), module.exports; - } - - function commonjsRequire () { - throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs'); - } - - } - }; -}); diff --git a/test/chunking-form/samples/preserve-modules-root/_expected/system/_virtual/index.js_commonjs-proxy b/test/chunking-form/samples/preserve-modules-root/_expected/system/_virtual/index.js_commonjs-proxy index 1ce0fcaadfd..3d601837d51 100644 --- a/test/chunking-form/samples/preserve-modules-root/_expected/system/_virtual/index.js_commonjs-proxy +++ b/test/chunking-form/samples/preserve-modules-root/_expected/system/_virtual/index.js_commonjs-proxy @@ -3,8 +3,8 @@ System.register(['../custom_modules/@my-scope/my-base-pkg/index.js'], function ( var myBasePkg; return { setters: [function (module) { - myBasePkg = module.m; - exports('default', module.m); + myBasePkg = module.default; + exports('default', module.default); }], execute: function () { diff --git a/test/chunking-form/samples/preserve-modules-root/_expected/system/below/module.js b/test/chunking-form/samples/preserve-modules-root/_expected/system/below/module.js index d2e566cb37d..fe2512bae21 100644 --- a/test/chunking-form/samples/preserve-modules-root/_expected/system/below/module.js +++ b/test/chunking-form/samples/preserve-modules-root/_expected/system/below/module.js @@ -3,7 +3,7 @@ System.register(['../custom_modules/@my-scope/my-base-pkg/index.js'], function ( var myBasePkg; return { setters: [function (module) { - myBasePkg = module.m; + myBasePkg = module.default; }], execute: function () { diff --git a/test/chunking-form/samples/preserve-modules-root/_expected/system/custom_modules/@my-scope/my-base-pkg/index.js b/test/chunking-form/samples/preserve-modules-root/_expected/system/custom_modules/@my-scope/my-base-pkg/index.js index 5ad74391e02..01241c1cd24 100644 --- a/test/chunking-form/samples/preserve-modules-root/_expected/system/custom_modules/@my-scope/my-base-pkg/index.js +++ b/test/chunking-form/samples/preserve-modules-root/_expected/system/custom_modules/@my-scope/my-base-pkg/index.js @@ -1,20 +1,15 @@ -System.register(['../../../_virtual/_commonjsHelpers.js'], function (exports) { +System.register([], function (exports) { 'use strict'; - var createCommonjsModule; return { - setters: [function (module) { - createCommonjsModule = module.createCommonjsModule; - }], execute: function () { - var myBasePkg = exports('m', createCommonjsModule(function (module, exports) { - - Object.defineProperty(exports, '__esModule', { value: true }); - var hello = 'world'; - exports.hello = hello; - })); + var hello_1 = exports('hello', hello); + + var myBasePkg = exports('default', /*#__PURE__*/Object.defineProperty({ + hello: hello_1 + }, '__esModule', {value: true})); } }; diff --git a/test/chunking-form/samples/preserve-modules-root/_expected/system/under-build.js b/test/chunking-form/samples/preserve-modules-root/_expected/system/under-build.js index 7c3dbbfc09e..b8da4c391f5 100644 --- a/test/chunking-form/samples/preserve-modules-root/_expected/system/under-build.js +++ b/test/chunking-form/samples/preserve-modules-root/_expected/system/under-build.js @@ -3,7 +3,7 @@ System.register(['./custom_modules/@my-scope/my-base-pkg/index.js'], function (e var myBasePkg; return { setters: [function (module) { - myBasePkg = module.m; + myBasePkg = module.default; }], execute: function () { diff --git a/test/form/samples/supports-core-js/_expected.js b/test/form/samples/supports-core-js/_expected.js index 51a13d78fe7..9637dd2193f 100644 --- a/test/form/samples/supports-core-js/_expected.js +++ b/test/form/samples/supports-core-js/_expected.js @@ -1,17 +1,8 @@ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; -function createCommonjsModule(fn, basedir, module) { - return module = { - path: basedir, - exports: {}, - require: function (path, base) { - return commonjsRequire(path, (base === undefined || base === null) ? module.path : base); - } - }, fn(module, module.exports), module.exports; -} - -function commonjsRequire () { - throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs'); +function createCommonjsModule(fn) { + var module = { exports: {} }; + return fn(module, module.exports), module.exports; } var check = function (it) { @@ -19,14 +10,14 @@ var check = function (it) { }; // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 -var global_1 = +var global$1 = // eslint-disable-next-line no-undef check(typeof globalThis == 'object' && globalThis) || check(typeof window == 'object' && window) || check(typeof self == 'object' && self) || check(typeof commonjsGlobal == 'object' && commonjsGlobal) || // eslint-disable-next-line no-new-func - Function('return this')(); + (function () { return this; })() || Function('return this')(); var fails = function (exec) { try { @@ -122,7 +113,7 @@ var has = function (it, key) { return hasOwnProperty.call(it, key); }; -var document$1 = global_1.document; +var document$1 = global$1.document; // typeof document.createElement is 'object' in old IE var EXISTS = isObject(document$1) && isObject(document$1.createElement); @@ -189,14 +180,14 @@ var createNonEnumerableProperty = descriptors ? function (object, key, value) { var setGlobal = function (key, value) { try { - createNonEnumerableProperty(global_1, key, value); + createNonEnumerableProperty(global$1, key, value); } catch (error) { - global_1[key] = value; + global$1[key] = value; } return value; }; var SHARED = '__core-js_shared__'; -var store = global_1[SHARED] || setGlobal(SHARED, {}); +var store = global$1[SHARED] || setGlobal(SHARED, {}); var sharedStore = store; @@ -211,7 +202,7 @@ if (typeof sharedStore.inspectSource != 'function') { var inspectSource = sharedStore.inspectSource; -var WeakMap = global_1.WeakMap; +var WeakMap = global$1.WeakMap; var nativeWeakMap = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap)); @@ -221,7 +212,7 @@ var shared = createCommonjsModule(function (module) { (module.exports = function (key, value) { return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {}); })('versions', []).push({ - version: '3.6.5', + version: '3.8.0', mode: 'global', copyright: '© 2020 Denis Pushkarev (zloirock.ru)' }); @@ -242,7 +233,7 @@ var sharedKey = function (key) { var hiddenKeys = {}; -var WeakMap$1 = global_1.WeakMap; +var WeakMap$1 = global$1.WeakMap; var set, get, has$1; var enforce = function (it) { @@ -259,11 +250,12 @@ var getterFor = function (TYPE) { }; if (nativeWeakMap) { - var store$1 = new WeakMap$1(); + var store$1 = sharedStore.state || (sharedStore.state = new WeakMap$1()); var wmget = store$1.get; var wmhas = store$1.has; var wmset = store$1.set; set = function (it, metadata) { + metadata.facade = it; wmset.call(store$1, it, metadata); return metadata; }; @@ -277,6 +269,7 @@ if (nativeWeakMap) { var STATE = sharedKey('state'); hiddenKeys[STATE] = true; set = function (it, metadata) { + metadata.facade = it; createNonEnumerableProperty(it, STATE, metadata); return metadata; }; @@ -305,11 +298,17 @@ var TEMPLATE = String(String).split('String'); var unsafe = options ? !!options.unsafe : false; var simple = options ? !!options.enumerable : false; var noTargetGet = options ? !!options.noTargetGet : false; + var state; if (typeof value == 'function') { - if (typeof key == 'string' && !has(value, 'name')) createNonEnumerableProperty(value, 'name', key); - enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : ''); + if (typeof key == 'string' && !has(value, 'name')) { + createNonEnumerableProperty(value, 'name', key); + } + state = enforceInternalState(value); + if (!state.source) { + state.source = TEMPLATE.join(typeof key == 'string' ? key : ''); + } } - if (O === global_1) { + if (O === global$1) { if (simple) O[key] = value; else setGlobal(key, value); return; @@ -326,15 +325,15 @@ var TEMPLATE = String(String).split('String'); }); }); -var path = global_1; +var path = global$1; var aFunction = function (variable) { return typeof variable == 'function' ? variable : undefined; }; var getBuiltIn = function (namespace, method) { - return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global_1[namespace]) - : path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method]; + return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global$1[namespace]) + : path[namespace] && path[namespace][method] || global$1[namespace] && global$1[namespace][method]; }; var ceil = Math.ceil; @@ -503,11 +502,11 @@ var _export = function (options, source) { var STATIC = options.stat; var FORCED, target, key, targetProperty, sourceProperty, descriptor; if (GLOBAL) { - target = global_1; + target = global$1; } else if (STATIC) { - target = global_1[TARGET] || setGlobal(TARGET, {}); + target = global$1[TARGET] || setGlobal(TARGET, {}); } else { - target = (global_1[TARGET] || {}).prototype; + target = (global$1[TARGET] || {}).prototype; } if (target) for (key in source) { sourceProperty = source[key]; @@ -672,7 +671,7 @@ var objectGetOwnPropertyNamesExternal = { }; var WellKnownSymbolsStore = shared('wks'); -var Symbol$1 = global_1.Symbol; +var Symbol$1 = global$1.Symbol; var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid; var wellKnownSymbol = function (name) { @@ -757,13 +756,14 @@ var arraySpeciesCreate = function (originalArray, length) { var push = [].push; -// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation +// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterOut }` methods implementation var createMethod$1 = function (TYPE) { var IS_MAP = TYPE == 1; var IS_FILTER = TYPE == 2; var IS_SOME = TYPE == 3; var IS_EVERY = TYPE == 4; var IS_FIND_INDEX = TYPE == 6; + var IS_FILTER_OUT = TYPE == 7; var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; return function ($this, callbackfn, that, specificCreate) { var O = toObject($this); @@ -772,7 +772,7 @@ var createMethod$1 = function (TYPE) { var length = toLength(self.length); var index = 0; var create = specificCreate || arraySpeciesCreate; - var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined; + var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? create($this, 0) : undefined; var value, result; for (;length > index; index++) if (NO_HOLES || index in self) { value = self[index]; @@ -784,7 +784,10 @@ var createMethod$1 = function (TYPE) { case 5: return value; // find case 6: return index; // findIndex case 2: push.call(target, value); // filter - } else if (IS_EVERY) return false; // every + } else switch (TYPE) { + case 4: return false; // every + case 7: push.call(target, value); // filterOut + } } } return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target; @@ -812,7 +815,10 @@ var arrayIteration = { find: createMethod$1(5), // `Array.prototype.findIndex` method // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex - findIndex: createMethod$1(6) + findIndex: createMethod$1(6), + // `Array.prototype.filterOut` method + // https://github.com/tc39/proposal-array-filtering + filterOut: createMethod$1(7) }; var $forEach = arrayIteration.forEach; @@ -824,7 +830,7 @@ var TO_PRIMITIVE = wellKnownSymbol('toPrimitive'); var setInternalState = internalState.set; var getInternalState = internalState.getterFor(SYMBOL); var ObjectPrototype = Object[PROTOTYPE$1]; -var $Symbol = global_1.Symbol; +var $Symbol = global$1.Symbol; var $stringify = getBuiltIn('JSON', 'stringify'); var nativeGetOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f; var nativeDefineProperty$1 = objectDefineProperty.f; @@ -835,7 +841,7 @@ var ObjectPrototypeSymbols = shared('op-symbols'); var StringToSymbolRegistry = shared('string-to-symbol-registry'); var SymbolToStringRegistry = shared('symbol-to-string-registry'); var WellKnownSymbolsStore$1 = shared('wks'); -var QObject = global_1.QObject; +var QObject = global$1.QObject; // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 var USE_SETTER = !QObject || !QObject[PROTOTYPE$1] || !QObject[PROTOTYPE$1].findChild; @@ -1098,7 +1104,7 @@ defineWellKnownSymbol('asyncIterator'); var defineProperty$2 = objectDefineProperty.f; -var NativeSymbol = global_1.Symbol; +var NativeSymbol = global$1.Symbol; if (descriptors && typeof NativeSymbol == 'function' && (!('description' in NativeSymbol.prototype) || // Safari 12 bug @@ -1185,191 +1191,52 @@ defineWellKnownSymbol('toStringTag'); // https://tc39.github.io/ecma262/#sec-symbol.unscopables defineWellKnownSymbol('unscopables'); -var nativeAssign = Object.assign; -var defineProperty$3 = Object.defineProperty; - -// `Object.assign` method -// https://tc39.github.io/ecma262/#sec-object.assign -var objectAssign = !nativeAssign || fails(function () { - // should have correct order of operations (Edge bug) - if (descriptors && nativeAssign({ b: 1 }, nativeAssign(defineProperty$3({}, 'a', { - enumerable: true, - get: function () { - defineProperty$3(this, 'b', { - value: 3, - enumerable: false - }); - } - }), { b: 2 })).b !== 1) return true; - // should work with symbols and should have deterministic property order (V8 bug) - var A = {}; - var B = {}; - // eslint-disable-next-line no-undef - var symbol = Symbol(); - var alphabet = 'abcdefghijklmnopqrst'; - A[symbol] = 7; - alphabet.split('').forEach(function (chr) { B[chr] = chr; }); - return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet; -}) ? function assign(target, source) { // eslint-disable-line no-unused-vars - var T = toObject(target); - var argumentsLength = arguments.length; - var index = 1; - var getOwnPropertySymbols = objectGetOwnPropertySymbols.f; - var propertyIsEnumerable = objectPropertyIsEnumerable.f; - while (argumentsLength > index) { - var S = indexedObject(arguments[index++]); - var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S); - var length = keys.length; - var j = 0; - var key; - while (length > j) { - key = keys[j++]; - if (!descriptors || propertyIsEnumerable.call(S, key)) T[key] = S[key]; - } - } return T; -} : nativeAssign; - -// `Object.assign` method -// https://tc39.github.io/ecma262/#sec-object.assign -_export({ target: 'Object', stat: true, forced: Object.assign !== objectAssign }, { - assign: objectAssign -}); - -// `Object.create` method -// https://tc39.github.io/ecma262/#sec-object.create -_export({ target: 'Object', stat: true, sham: !descriptors }, { - create: objectCreate -}); - -// `Object.defineProperty` method -// https://tc39.github.io/ecma262/#sec-object.defineproperty -_export({ target: 'Object', stat: true, forced: !descriptors, sham: !descriptors }, { - defineProperty: objectDefineProperty.f -}); - -// `Object.defineProperties` method -// https://tc39.github.io/ecma262/#sec-object.defineproperties -_export({ target: 'Object', stat: true, forced: !descriptors, sham: !descriptors }, { - defineProperties: objectDefineProperties -}); - -var propertyIsEnumerable = objectPropertyIsEnumerable.f; - -// `Object.{ entries, values }` methods implementation -var createMethod$2 = function (TO_ENTRIES) { - return function (it) { - var O = toIndexedObject(it); - var keys = objectKeys(O); - var length = keys.length; - var i = 0; - var result = []; - var key; - while (length > i) { - key = keys[i++]; - if (!descriptors || propertyIsEnumerable.call(O, key)) { - result.push(TO_ENTRIES ? [key, O[key]] : O[key]); - } - } - return result; - }; -}; - -var objectToArray = { - // `Object.entries` method - // https://tc39.github.io/ecma262/#sec-object.entries - entries: createMethod$2(true), - // `Object.values` method - // https://tc39.github.io/ecma262/#sec-object.values - values: createMethod$2(false) -}; - -var $entries = objectToArray.entries; - -// `Object.entries` method -// https://tc39.github.io/ecma262/#sec-object.entries -_export({ target: 'Object', stat: true }, { - entries: function entries(O) { - return $entries(O); - } -}); - -var freezing = !fails(function () { - return Object.isExtensible(Object.preventExtensions({})); +var correctPrototypeGetter = !fails(function () { + function F() { /* empty */ } + F.prototype.constructor = null; + return Object.getPrototypeOf(new F()) !== F.prototype; }); -var internalMetadata = createCommonjsModule(function (module) { -var defineProperty = objectDefineProperty.f; - - - -var METADATA = uid('meta'); -var id = 0; - -var isExtensible = Object.isExtensible || function () { - return true; -}; - -var setMetadata = function (it) { - defineProperty(it, METADATA, { value: { - objectID: 'O' + ++id, // object ID - weakData: {} // weak collections IDs - } }); -}; - -var fastKey = function (it, create) { - // return a primitive with prefix - if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; - if (!has(it, METADATA)) { - // can't set metadata to uncaught frozen object - if (!isExtensible(it)) return 'F'; - // not necessary to add metadata - if (!create) return 'E'; - // add missing metadata - setMetadata(it); - // return object ID - } return it[METADATA].objectID; -}; - -var getWeakData = function (it, create) { - if (!has(it, METADATA)) { - // can't set metadata to uncaught frozen object - if (!isExtensible(it)) return true; - // not necessary to add metadata - if (!create) return false; - // add missing metadata - setMetadata(it); - // return the store of weak collections IDs - } return it[METADATA].weakData; -}; +var IE_PROTO$1 = sharedKey('IE_PROTO'); +var ObjectPrototype$1 = Object.prototype; -// add metadata on freeze-family methods calling -var onFreeze = function (it) { - if (freezing && meta.REQUIRED && isExtensible(it) && !has(it, METADATA)) setMetadata(it); - return it; +// `Object.getPrototypeOf` method +// https://tc39.github.io/ecma262/#sec-object.getprototypeof +var objectGetPrototypeOf = correctPrototypeGetter ? Object.getPrototypeOf : function (O) { + O = toObject(O); + if (has(O, IE_PROTO$1)) return O[IE_PROTO$1]; + if (typeof O.constructor == 'function' && O instanceof O.constructor) { + return O.constructor.prototype; + } return O instanceof Object ? ObjectPrototype$1 : null; }; -var meta = module.exports = { - REQUIRED: false, - fastKey: fastKey, - getWeakData: getWeakData, - onFreeze: onFreeze +var aPossiblePrototype = function (it) { + if (!isObject(it) && it !== null) { + throw TypeError("Can't set " + String(it) + ' as a prototype'); + } return it; }; -hiddenKeys[METADATA] = true; -}); - -var onFreeze = internalMetadata.onFreeze; - -var nativeFreeze = Object.freeze; -var FAILS_ON_PRIMITIVES = fails(function () { nativeFreeze(1); }); - -// `Object.freeze` method -// https://tc39.github.io/ecma262/#sec-object.freeze -_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !freezing }, { - freeze: function freeze(it) { - return nativeFreeze && isObject(it) ? nativeFreeze(onFreeze(it)) : it; - } -}); +// `Object.setPrototypeOf` method +// https://tc39.github.io/ecma262/#sec-object.setprototypeof +// Works with __proto__ only. Old v8 can't work with null proto objects. +/* eslint-disable no-proto */ +var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () { + var CORRECT_SETTER = false; + var test = {}; + var setter; + try { + setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set; + setter.call(test, []); + CORRECT_SETTER = test instanceof Array; + } catch (error) { /* empty */ } + return function setPrototypeOf(O, proto) { + anObject(O); + aPossiblePrototype(proto); + if (CORRECT_SETTER) setter.call(O, proto); + else O.__proto__ = proto; + return O; + }; +}() : undefined); var iterators = {}; @@ -1419,28 +1286,38 @@ var getIteratorMethod = function (it) { || iterators[classof(it)]; }; -// call something on iterator step with safe closing on error -var callWithSafeIterationClosing = function (iterator, fn, value, ENTRIES) { - try { - return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value); - // 7.4.6 IteratorClose(iterator, completion) - } catch (error) { - var returnMethod = iterator['return']; - if (returnMethod !== undefined) anObject(returnMethod.call(iterator)); - throw error; +var iteratorClose = function (iterator) { + var returnMethod = iterator['return']; + if (returnMethod !== undefined) { + return anObject(returnMethod.call(iterator)).value; } }; -var iterate_1 = createCommonjsModule(function (module) { var Result = function (stopped, result) { this.stopped = stopped; this.result = result; }; -var iterate = module.exports = function (iterable, fn, that, AS_ENTRIES, IS_ITERATOR) { - var boundFunction = functionBindContext(fn, that, AS_ENTRIES ? 2 : 1); +var iterate = function (iterable, unboundFunction, options) { + var that = options && options.that; + var AS_ENTRIES = !!(options && options.AS_ENTRIES); + var IS_ITERATOR = !!(options && options.IS_ITERATOR); + var INTERRUPTED = !!(options && options.INTERRUPTED); + var fn = functionBindContext(unboundFunction, that, 1 + AS_ENTRIES + INTERRUPTED); var iterator, iterFn, index, length, result, next, step; + var stop = function (condition) { + if (iterator) iteratorClose(iterator); + return new Result(true, condition); + }; + + var callFn = function (value) { + if (AS_ENTRIES) { + anObject(value); + return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]); + } return INTERRUPTED ? fn(value, stop) : fn(value); + }; + if (IS_ITERATOR) { iterator = iterable; } else { @@ -1449,9 +1326,7 @@ var iterate = module.exports = function (iterable, fn, that, AS_ENTRIES, IS_ITER // optimisation for array iterators if (isArrayIteratorMethod(iterFn)) { for (index = 0, length = toLength(iterable.length); length > index; index++) { - result = AS_ENTRIES - ? boundFunction(anObject(step = iterable[index])[0], step[1]) - : boundFunction(iterable[index]); + result = callFn(iterable[index]); if (result && result instanceof Result) return result; } return new Result(false); } @@ -1460,782 +1335,455 @@ var iterate = module.exports = function (iterable, fn, that, AS_ENTRIES, IS_ITER next = iterator.next; while (!(step = next.call(iterator)).done) { - result = callWithSafeIterationClosing(iterator, boundFunction, step.value, AS_ENTRIES); + try { + result = callFn(step.value); + } catch (error) { + iteratorClose(iterator); + throw error; + } if (typeof result == 'object' && result && result instanceof Result) return result; } return new Result(false); }; -iterate.stop = function (result) { - return new Result(true, result); +var $AggregateError = function AggregateError(errors, message) { + var that = this; + if (!(that instanceof $AggregateError)) return new $AggregateError(errors, message); + if (objectSetPrototypeOf) { + that = objectSetPrototypeOf(new Error(undefined), objectGetPrototypeOf(that)); + } + if (message !== undefined) createNonEnumerableProperty(that, 'message', String(message)); + var errorsArray = []; + iterate(errors, errorsArray.push, { that: errorsArray }); + createNonEnumerableProperty(that, 'errors', errorsArray); + return that; }; + +$AggregateError.prototype = objectCreate(Error.prototype, { + constructor: createPropertyDescriptor(5, $AggregateError), + message: createPropertyDescriptor(5, ''), + name: createPropertyDescriptor(5, 'AggregateError') }); -var createProperty = function (object, key, value) { - var propertyKey = toPrimitive(key); - if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value)); - else object[propertyKey] = value; -}; +_export({ global: true }, { + AggregateError: $AggregateError +}); -// `Object.fromEntries` method -// https://github.com/tc39/proposal-object-from-entries -_export({ target: 'Object', stat: true }, { - fromEntries: function fromEntries(iterable) { - var obj = {}; - iterate_1(iterable, function (k, v) { - createProperty(obj, k, v); - }, undefined, true); - return obj; +// call something on iterator step with safe closing on error +var callWithSafeIterationClosing = function (iterator, fn, value, ENTRIES) { + try { + return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value); + // 7.4.6 IteratorClose(iterator, completion) + } catch (error) { + iteratorClose(iterator); + throw error; } -}); - -var nativeGetOwnPropertyDescriptor$2 = objectGetOwnPropertyDescriptor.f; - - -var FAILS_ON_PRIMITIVES$1 = fails(function () { nativeGetOwnPropertyDescriptor$2(1); }); -var FORCED = !descriptors || FAILS_ON_PRIMITIVES$1; +}; -// `Object.getOwnPropertyDescriptor` method -// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor -_export({ target: 'Object', stat: true, forced: FORCED, sham: !descriptors }, { - getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) { - return nativeGetOwnPropertyDescriptor$2(toIndexedObject(it), key); - } -}); +var createProperty = function (object, key, value) { + var propertyKey = toPrimitive(key); + if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value)); + else object[propertyKey] = value; +}; -// `Object.getOwnPropertyDescriptors` method -// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptors -_export({ target: 'Object', stat: true, sham: !descriptors }, { - getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) { - var O = toIndexedObject(object); - var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f; - var keys = ownKeys(O); - var result = {}; - var index = 0; - var key, descriptor; - while (keys.length > index) { - descriptor = getOwnPropertyDescriptor(O, key = keys[index++]); - if (descriptor !== undefined) createProperty(result, key, descriptor); +// `Array.from` method implementation +// https://tc39.github.io/ecma262/#sec-array.from +var arrayFrom = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { + var O = toObject(arrayLike); + var C = typeof this == 'function' ? this : Array; + var argumentsLength = arguments.length; + var mapfn = argumentsLength > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + var iteratorMethod = getIteratorMethod(O); + var index = 0; + var length, result, step, iterator, next, value; + if (mapping) mapfn = functionBindContext(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2); + // if the target is not iterable or it's an array with the default iterator - use a simple case + if (iteratorMethod != undefined && !(C == Array && isArrayIteratorMethod(iteratorMethod))) { + iterator = iteratorMethod.call(O); + next = iterator.next; + result = new C(); + for (;!(step = next.call(iterator)).done; index++) { + value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value; + createProperty(result, index, value); + } + } else { + length = toLength(O.length); + result = new C(length); + for (;length > index; index++) { + value = mapping ? mapfn(O[index], index) : O[index]; + createProperty(result, index, value); } - return result; } -}); - -var nativeGetOwnPropertyNames$2 = objectGetOwnPropertyNamesExternal.f; - -var FAILS_ON_PRIMITIVES$2 = fails(function () { return !Object.getOwnPropertyNames(1); }); - -// `Object.getOwnPropertyNames` method -// https://tc39.github.io/ecma262/#sec-object.getownpropertynames -_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$2 }, { - getOwnPropertyNames: nativeGetOwnPropertyNames$2 -}); - -var correctPrototypeGetter = !fails(function () { - function F() { /* empty */ } - F.prototype.constructor = null; - return Object.getPrototypeOf(new F()) !== F.prototype; -}); - -var IE_PROTO$1 = sharedKey('IE_PROTO'); -var ObjectPrototype$1 = Object.prototype; - -// `Object.getPrototypeOf` method -// https://tc39.github.io/ecma262/#sec-object.getprototypeof -var objectGetPrototypeOf = correctPrototypeGetter ? Object.getPrototypeOf : function (O) { - O = toObject(O); - if (has(O, IE_PROTO$1)) return O[IE_PROTO$1]; - if (typeof O.constructor == 'function' && O instanceof O.constructor) { - return O.constructor.prototype; - } return O instanceof Object ? ObjectPrototype$1 : null; + result.length = index; + return result; }; -var FAILS_ON_PRIMITIVES$3 = fails(function () { objectGetPrototypeOf(1); }); +var ITERATOR$2 = wellKnownSymbol('iterator'); +var SAFE_CLOSING = false; -// `Object.getPrototypeOf` method -// https://tc39.github.io/ecma262/#sec-object.getprototypeof -_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$3, sham: !correctPrototypeGetter }, { - getPrototypeOf: function getPrototypeOf(it) { - return objectGetPrototypeOf(toObject(it)); - } -}); +try { + var called = 0; + var iteratorWithReturn = { + next: function () { + return { done: !!called++ }; + }, + 'return': function () { + SAFE_CLOSING = true; + } + }; + iteratorWithReturn[ITERATOR$2] = function () { + return this; + }; + // eslint-disable-next-line no-throw-literal + Array.from(iteratorWithReturn, function () { throw 2; }); +} catch (error) { /* empty */ } -// `SameValue` abstract operation -// https://tc39.github.io/ecma262/#sec-samevalue -var sameValue = Object.is || function is(x, y) { - // eslint-disable-next-line no-self-compare - return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; +var checkCorrectnessOfIteration = function (exec, SKIP_CLOSING) { + if (!SKIP_CLOSING && !SAFE_CLOSING) return false; + var ITERATION_SUPPORT = false; + try { + var object = {}; + object[ITERATOR$2] = function () { + return { + next: function () { + return { done: ITERATION_SUPPORT = true }; + } + }; + }; + exec(object); + } catch (error) { /* empty */ } + return ITERATION_SUPPORT; }; -// `Object.is` method -// https://tc39.github.io/ecma262/#sec-object.is -_export({ target: 'Object', stat: true }, { - is: sameValue +var INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) { + Array.from(iterable); }); -var nativeIsExtensible = Object.isExtensible; -var FAILS_ON_PRIMITIVES$4 = fails(function () { nativeIsExtensible(1); }); - -// `Object.isExtensible` method -// https://tc39.github.io/ecma262/#sec-object.isextensible -_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$4 }, { - isExtensible: function isExtensible(it) { - return isObject(it) ? nativeIsExtensible ? nativeIsExtensible(it) : true : false; - } +// `Array.from` method +// https://tc39.github.io/ecma262/#sec-array.from +_export({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, { + from: arrayFrom }); -var nativeIsFrozen = Object.isFrozen; -var FAILS_ON_PRIMITIVES$5 = fails(function () { nativeIsFrozen(1); }); - -// `Object.isFrozen` method -// https://tc39.github.io/ecma262/#sec-object.isfrozen -_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$5 }, { - isFrozen: function isFrozen(it) { - return isObject(it) ? nativeIsFrozen ? nativeIsFrozen(it) : false : true; - } +// `Array.isArray` method +// https://tc39.github.io/ecma262/#sec-array.isarray +_export({ target: 'Array', stat: true }, { + isArray: isArray }); -var nativeIsSealed = Object.isSealed; -var FAILS_ON_PRIMITIVES$6 = fails(function () { nativeIsSealed(1); }); - -// `Object.isSealed` method -// https://tc39.github.io/ecma262/#sec-object.issealed -_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$6 }, { - isSealed: function isSealed(it) { - return isObject(it) ? nativeIsSealed ? nativeIsSealed(it) : false : true; - } +var ISNT_GENERIC = fails(function () { + function F() { /* empty */ } + return !(Array.of.call(F) instanceof F); }); -var FAILS_ON_PRIMITIVES$7 = fails(function () { objectKeys(1); }); - -// `Object.keys` method -// https://tc39.github.io/ecma262/#sec-object.keys -_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$7 }, { - keys: function keys(it) { - return objectKeys(toObject(it)); +// `Array.of` method +// https://tc39.github.io/ecma262/#sec-array.of +// WebKit Array.of isn't generic +_export({ target: 'Array', stat: true, forced: ISNT_GENERIC }, { + of: function of(/* ...args */) { + var index = 0; + var argumentsLength = arguments.length; + var result = new (typeof this == 'function' ? this : Array)(argumentsLength); + while (argumentsLength > index) createProperty(result, index, arguments[index++]); + result.length = argumentsLength; + return result; } }); -var onFreeze$1 = internalMetadata.onFreeze; - - +var engineUserAgent = getBuiltIn('navigator', 'userAgent') || ''; -var nativePreventExtensions = Object.preventExtensions; -var FAILS_ON_PRIMITIVES$8 = fails(function () { nativePreventExtensions(1); }); +var process = global$1.process; +var versions = process && process.versions; +var v8 = versions && versions.v8; +var match, version; -// `Object.preventExtensions` method -// https://tc39.github.io/ecma262/#sec-object.preventextensions -_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$8, sham: !freezing }, { - preventExtensions: function preventExtensions(it) { - return nativePreventExtensions && isObject(it) ? nativePreventExtensions(onFreeze$1(it)) : it; +if (v8) { + match = v8.split('.'); + version = match[0] + match[1]; +} else if (engineUserAgent) { + match = engineUserAgent.match(/Edge\/(\d+)/); + if (!match || match[1] >= 74) { + match = engineUserAgent.match(/Chrome\/(\d+)/); + if (match) version = match[1]; } -}); +} -var onFreeze$2 = internalMetadata.onFreeze; +var engineV8Version = version && +version; +var SPECIES$1 = wellKnownSymbol('species'); +var arrayMethodHasSpeciesSupport = function (METHOD_NAME) { + // We can't use this feature detection in V8 since it causes + // deoptimization and serious performance degradation + // https://github.com/zloirock/core-js/issues/677 + return engineV8Version >= 51 || !fails(function () { + var array = []; + var constructor = array.constructor = {}; + constructor[SPECIES$1] = function () { + return { foo: 1 }; + }; + return array[METHOD_NAME](Boolean).foo !== 1; + }); +}; -var nativeSeal = Object.seal; -var FAILS_ON_PRIMITIVES$9 = fails(function () { nativeSeal(1); }); +var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable'); +var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; +var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded'; -// `Object.seal` method -// https://tc39.github.io/ecma262/#sec-object.seal -_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$9, sham: !freezing }, { - seal: function seal(it) { - return nativeSeal && isObject(it) ? nativeSeal(onFreeze$2(it)) : it; - } +// We can't use this feature detection in V8 since it causes +// deoptimization and serious performance degradation +// https://github.com/zloirock/core-js/issues/679 +var IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () { + var array = []; + array[IS_CONCAT_SPREADABLE] = false; + return array.concat()[0] !== array; }); -var aPossiblePrototype = function (it) { - if (!isObject(it) && it !== null) { - throw TypeError("Can't set " + String(it) + ' as a prototype'); - } return it; +var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat'); + +var isConcatSpreadable = function (O) { + if (!isObject(O)) return false; + var spreadable = O[IS_CONCAT_SPREADABLE]; + return spreadable !== undefined ? !!spreadable : isArray(O); }; -// `Object.setPrototypeOf` method -// https://tc39.github.io/ecma262/#sec-object.setprototypeof -// Works with __proto__ only. Old v8 can't work with null proto objects. -/* eslint-disable no-proto */ -var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () { - var CORRECT_SETTER = false; - var test = {}; - var setter; - try { - setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set; - setter.call(test, []); - CORRECT_SETTER = test instanceof Array; - } catch (error) { /* empty */ } - return function setPrototypeOf(O, proto) { - anObject(O); - aPossiblePrototype(proto); - if (CORRECT_SETTER) setter.call(O, proto); - else O.__proto__ = proto; - return O; - }; -}() : undefined); +var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT; -// `Object.setPrototypeOf` method -// https://tc39.github.io/ecma262/#sec-object.setprototypeof -_export({ target: 'Object', stat: true }, { - setPrototypeOf: objectSetPrototypeOf +// `Array.prototype.concat` method +// https://tc39.github.io/ecma262/#sec-array.prototype.concat +// with adding support of @@isConcatSpreadable and @@species +_export({ target: 'Array', proto: true, forced: FORCED }, { + concat: function concat(arg) { // eslint-disable-line no-unused-vars + var O = toObject(this); + var A = arraySpeciesCreate(O, 0); + var n = 0; + var i, k, length, len, E; + for (i = -1, length = arguments.length; i < length; i++) { + E = i === -1 ? O : arguments[i]; + if (isConcatSpreadable(E)) { + len = toLength(E.length); + if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED); + for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]); + } else { + if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED); + createProperty(A, n++, E); + } + } + A.length = n; + return A; + } }); -var $values = objectToArray.values; +var min$2 = Math.min; -// `Object.values` method -// https://tc39.github.io/ecma262/#sec-object.values -_export({ target: 'Object', stat: true }, { - values: function values(O) { - return $values(O); +// `Array.prototype.copyWithin` method implementation +// https://tc39.github.io/ecma262/#sec-array.prototype.copywithin +var arrayCopyWithin = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) { + var O = toObject(this); + var len = toLength(O.length); + var to = toAbsoluteIndex(target, len); + var from = toAbsoluteIndex(start, len); + var end = arguments.length > 2 ? arguments[2] : undefined; + var count = min$2((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to); + var inc = 1; + if (from < to && to < from + count) { + inc = -1; + from += count - 1; + to += count - 1; } -}); - -// `Object.prototype.toString` method implementation -// https://tc39.github.io/ecma262/#sec-object.prototype.tostring -var objectToString = toStringTagSupport ? {}.toString : function toString() { - return '[object ' + classof(this) + ']'; + while (count-- > 0) { + if (from in O) O[to] = O[from]; + else delete O[to]; + to += inc; + from += inc; + } return O; }; -// `Object.prototype.toString` method -// https://tc39.github.io/ecma262/#sec-object.prototype.tostring -if (!toStringTagSupport) { - redefine(Object.prototype, 'toString', objectToString, { unsafe: true }); +var UNSCOPABLES = wellKnownSymbol('unscopables'); +var ArrayPrototype$1 = Array.prototype; + +// Array.prototype[@@unscopables] +// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables +if (ArrayPrototype$1[UNSCOPABLES] == undefined) { + objectDefineProperty.f(ArrayPrototype$1, UNSCOPABLES, { + configurable: true, + value: objectCreate(null) + }); } -// Forced replacement object prototype accessors methods -var objectPrototypeAccessorsForced = !fails(function () { - var key = Math.random(); - // In FF throws only define methods - // eslint-disable-next-line no-undef, no-useless-call - __defineSetter__.call(null, key, function () { /* empty */ }); - delete global_1[key]; +// add a key to Array.prototype[@@unscopables] +var addToUnscopables = function (key) { + ArrayPrototype$1[UNSCOPABLES][key] = true; +}; + +// `Array.prototype.copyWithin` method +// https://tc39.github.io/ecma262/#sec-array.prototype.copywithin +_export({ target: 'Array', proto: true }, { + copyWithin: arrayCopyWithin }); -// `Object.prototype.__defineGetter__` method -// https://tc39.github.io/ecma262/#sec-object.prototype.__defineGetter__ -if (descriptors) { - _export({ target: 'Object', proto: true, forced: objectPrototypeAccessorsForced }, { - __defineGetter__: function __defineGetter__(P, getter) { - objectDefineProperty.f(toObject(this), P, { get: aFunction$1(getter), enumerable: true, configurable: true }); - } - }); -} +// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables +addToUnscopables('copyWithin'); -// `Object.prototype.__defineSetter__` method -// https://tc39.github.io/ecma262/#sec-object.prototype.__defineSetter__ -if (descriptors) { - _export({ target: 'Object', proto: true, forced: objectPrototypeAccessorsForced }, { - __defineSetter__: function __defineSetter__(P, setter) { - objectDefineProperty.f(toObject(this), P, { set: aFunction$1(setter), enumerable: true, configurable: true }); - } +var arrayMethodIsStrict = function (METHOD_NAME, argument) { + var method = [][METHOD_NAME]; + return !!method && fails(function () { + // eslint-disable-next-line no-useless-call,no-throw-literal + method.call(null, argument || function () { throw 1; }, 1); }); -} +}; -var getOwnPropertyDescriptor$2 = objectGetOwnPropertyDescriptor.f; +var defineProperty$3 = Object.defineProperty; +var cache = {}; -// `Object.prototype.__lookupGetter__` method -// https://tc39.github.io/ecma262/#sec-object.prototype.__lookupGetter__ -if (descriptors) { - _export({ target: 'Object', proto: true, forced: objectPrototypeAccessorsForced }, { - __lookupGetter__: function __lookupGetter__(P) { - var O = toObject(this); - var key = toPrimitive(P, true); - var desc; - do { - if (desc = getOwnPropertyDescriptor$2(O, key)) return desc.get; - } while (O = objectGetPrototypeOf(O)); - } - }); -} +var thrower = function (it) { throw it; }; -var getOwnPropertyDescriptor$3 = objectGetOwnPropertyDescriptor.f; +var arrayMethodUsesToLength = function (METHOD_NAME, options) { + if (has(cache, METHOD_NAME)) return cache[METHOD_NAME]; + if (!options) options = {}; + var method = [][METHOD_NAME]; + var ACCESSORS = has(options, 'ACCESSORS') ? options.ACCESSORS : false; + var argument0 = has(options, 0) ? options[0] : thrower; + var argument1 = has(options, 1) ? options[1] : undefined; -// `Object.prototype.__lookupSetter__` method -// https://tc39.github.io/ecma262/#sec-object.prototype.__lookupSetter__ -if (descriptors) { - _export({ target: 'Object', proto: true, forced: objectPrototypeAccessorsForced }, { - __lookupSetter__: function __lookupSetter__(P) { - var O = toObject(this); - var key = toPrimitive(P, true); - var desc; - do { - if (desc = getOwnPropertyDescriptor$3(O, key)) return desc.set; - } while (O = objectGetPrototypeOf(O)); - } - }); -} + return cache[METHOD_NAME] = !!method && !fails(function () { + if (ACCESSORS && !descriptors) return true; + var O = { length: -1 }; -var slice = [].slice; -var factories = {}; + if (ACCESSORS) defineProperty$3(O, 1, { enumerable: true, get: thrower }); + else O[1] = 1; -var construct = function (C, argsLength, args) { - if (!(argsLength in factories)) { - for (var list = [], i = 0; i < argsLength; i++) list[i] = 'a[' + i + ']'; - // eslint-disable-next-line no-new-func - factories[argsLength] = Function('C,a', 'return new C(' + list.join(',') + ')'); - } return factories[argsLength](C, args); + method.call(O, argument0, argument1); + }); }; -// `Function.prototype.bind` method implementation -// https://tc39.github.io/ecma262/#sec-function.prototype.bind -var functionBind = Function.bind || function bind(that /* , ...args */) { - var fn = aFunction$1(this); - var partArgs = slice.call(arguments, 1); - var boundFunction = function bound(/* args... */) { - var args = partArgs.concat(slice.call(arguments)); - return this instanceof boundFunction ? construct(fn, args.length, args) : fn.apply(that, args); - }; - if (isObject(fn.prototype)) boundFunction.prototype = fn.prototype; - return boundFunction; -}; +var $every = arrayIteration.every; -// `Function.prototype.bind` method -// https://tc39.github.io/ecma262/#sec-function.prototype.bind -_export({ target: 'Function', proto: true }, { - bind: functionBind -}); -var defineProperty$4 = objectDefineProperty.f; -var FunctionPrototype = Function.prototype; -var FunctionPrototypeToString = FunctionPrototype.toString; -var nameRE = /^\s*function ([^ (]*)/; -var NAME = 'name'; +var STRICT_METHOD = arrayMethodIsStrict('every'); +var USES_TO_LENGTH = arrayMethodUsesToLength('every'); -// Function instances `.name` property -// https://tc39.github.io/ecma262/#sec-function-instances-name -if (descriptors && !(NAME in FunctionPrototype)) { - defineProperty$4(FunctionPrototype, NAME, { - configurable: true, - get: function () { - try { - return FunctionPrototypeToString.call(this).match(nameRE)[1]; - } catch (error) { - return ''; - } - } - }); -} +// `Array.prototype.every` method +// https://tc39.github.io/ecma262/#sec-array.prototype.every +_export({ target: 'Array', proto: true, forced: !STRICT_METHOD || !USES_TO_LENGTH }, { + every: function every(callbackfn /* , thisArg */) { + return $every(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + } +}); -var HAS_INSTANCE = wellKnownSymbol('hasInstance'); -var FunctionPrototype$1 = Function.prototype; - -// `Function.prototype[@@hasInstance]` method -// https://tc39.github.io/ecma262/#sec-function.prototype-@@hasinstance -if (!(HAS_INSTANCE in FunctionPrototype$1)) { - objectDefineProperty.f(FunctionPrototype$1, HAS_INSTANCE, { value: function (O) { - if (typeof this != 'function' || !isObject(O)) return false; - if (!isObject(this.prototype)) return O instanceof this; - // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this: - while (O = objectGetPrototypeOf(O)) if (this.prototype === O) return true; - return false; - } }); -} +// `Array.prototype.fill` method implementation +// https://tc39.github.io/ecma262/#sec-array.prototype.fill +var arrayFill = function fill(value /* , start = 0, end = @length */) { + var O = toObject(this); + var length = toLength(O.length); + var argumentsLength = arguments.length; + var index = toAbsoluteIndex(argumentsLength > 1 ? arguments[1] : undefined, length); + var end = argumentsLength > 2 ? arguments[2] : undefined; + var endPos = end === undefined ? length : toAbsoluteIndex(end, length); + while (endPos > index) O[index++] = value; + return O; +}; -// `globalThis` object -// https://github.com/tc39/proposal-global -_export({ global: true }, { - globalThis: global_1 +// `Array.prototype.fill` method +// https://tc39.github.io/ecma262/#sec-array.prototype.fill +_export({ target: 'Array', proto: true }, { + fill: arrayFill }); -// `Array.from` method implementation -// https://tc39.github.io/ecma262/#sec-array.from -var arrayFrom = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { - var O = toObject(arrayLike); - var C = typeof this == 'function' ? this : Array; - var argumentsLength = arguments.length; - var mapfn = argumentsLength > 1 ? arguments[1] : undefined; - var mapping = mapfn !== undefined; - var iteratorMethod = getIteratorMethod(O); - var index = 0; - var length, result, step, iterator, next, value; - if (mapping) mapfn = functionBindContext(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2); - // if the target is not iterable or it's an array with the default iterator - use a simple case - if (iteratorMethod != undefined && !(C == Array && isArrayIteratorMethod(iteratorMethod))) { - iterator = iteratorMethod.call(O); - next = iterator.next; - result = new C(); - for (;!(step = next.call(iterator)).done; index++) { - value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value; - createProperty(result, index, value); - } - } else { - length = toLength(O.length); - result = new C(length); - for (;length > index; index++) { - value = mapping ? mapfn(O[index], index) : O[index]; - createProperty(result, index, value); - } - } - result.length = index; - return result; -}; +// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables +addToUnscopables('fill'); -var ITERATOR$2 = wellKnownSymbol('iterator'); -var SAFE_CLOSING = false; +var $filter = arrayIteration.filter; -try { - var called = 0; - var iteratorWithReturn = { - next: function () { - return { done: !!called++ }; - }, - 'return': function () { - SAFE_CLOSING = true; - } - }; - iteratorWithReturn[ITERATOR$2] = function () { - return this; - }; - // eslint-disable-next-line no-throw-literal - Array.from(iteratorWithReturn, function () { throw 2; }); -} catch (error) { /* empty */ } -var checkCorrectnessOfIteration = function (exec, SKIP_CLOSING) { - if (!SKIP_CLOSING && !SAFE_CLOSING) return false; - var ITERATION_SUPPORT = false; - try { - var object = {}; - object[ITERATOR$2] = function () { - return { - next: function () { - return { done: ITERATION_SUPPORT = true }; - } - }; - }; - exec(object); - } catch (error) { /* empty */ } - return ITERATION_SUPPORT; -}; -var INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) { - Array.from(iterable); -}); +var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter'); +// Edge 14- issue +var USES_TO_LENGTH$1 = arrayMethodUsesToLength('filter'); -// `Array.from` method -// https://tc39.github.io/ecma262/#sec-array.from -_export({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, { - from: arrayFrom +// `Array.prototype.filter` method +// https://tc39.github.io/ecma262/#sec-array.prototype.filter +// with adding support of @@species +_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH$1 }, { + filter: function filter(callbackfn /* , thisArg */) { + return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + } }); -// `Array.isArray` method -// https://tc39.github.io/ecma262/#sec-array.isarray -_export({ target: 'Array', stat: true }, { - isArray: isArray -}); +var $find = arrayIteration.find; -var ISNT_GENERIC = fails(function () { - function F() { /* empty */ } - return !(Array.of.call(F) instanceof F); -}); -// `Array.of` method -// https://tc39.github.io/ecma262/#sec-array.of -// WebKit Array.of isn't generic -_export({ target: 'Array', stat: true, forced: ISNT_GENERIC }, { - of: function of(/* ...args */) { - var index = 0; - var argumentsLength = arguments.length; - var result = new (typeof this == 'function' ? this : Array)(argumentsLength); - while (argumentsLength > index) createProperty(result, index, arguments[index++]); - result.length = argumentsLength; - return result; + +var FIND = 'find'; +var SKIPS_HOLES = true; + +var USES_TO_LENGTH$2 = arrayMethodUsesToLength(FIND); + +// Shouldn't skip holes +if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; }); + +// `Array.prototype.find` method +// https://tc39.github.io/ecma262/#sec-array.prototype.find +_export({ target: 'Array', proto: true, forced: SKIPS_HOLES || !USES_TO_LENGTH$2 }, { + find: function find(callbackfn /* , that = undefined */) { + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); -var engineUserAgent = getBuiltIn('navigator', 'userAgent') || ''; +// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables +addToUnscopables(FIND); -var process = global_1.process; -var versions = process && process.versions; -var v8 = versions && versions.v8; -var match, version; +var $findIndex = arrayIteration.findIndex; -if (v8) { - match = v8.split('.'); - version = match[0] + match[1]; -} else if (engineUserAgent) { - match = engineUserAgent.match(/Edge\/(\d+)/); - if (!match || match[1] >= 74) { - match = engineUserAgent.match(/Chrome\/(\d+)/); - if (match) version = match[1]; - } -} -var engineV8Version = version && +version; -var SPECIES$1 = wellKnownSymbol('species'); +var FIND_INDEX = 'findIndex'; +var SKIPS_HOLES$1 = true; -var arrayMethodHasSpeciesSupport = function (METHOD_NAME) { - // We can't use this feature detection in V8 since it causes - // deoptimization and serious performance degradation - // https://github.com/zloirock/core-js/issues/677 - return engineV8Version >= 51 || !fails(function () { - var array = []; - var constructor = array.constructor = {}; - constructor[SPECIES$1] = function () { - return { foo: 1 }; - }; - return array[METHOD_NAME](Boolean).foo !== 1; - }); -}; +var USES_TO_LENGTH$3 = arrayMethodUsesToLength(FIND_INDEX); -var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable'); -var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; -var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded'; +// Shouldn't skip holes +if (FIND_INDEX in []) Array(1)[FIND_INDEX](function () { SKIPS_HOLES$1 = false; }); -// We can't use this feature detection in V8 since it causes -// deoptimization and serious performance degradation -// https://github.com/zloirock/core-js/issues/679 -var IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () { - var array = []; - array[IS_CONCAT_SPREADABLE] = false; - return array.concat()[0] !== array; +// `Array.prototype.findIndex` method +// https://tc39.github.io/ecma262/#sec-array.prototype.findindex +_export({ target: 'Array', proto: true, forced: SKIPS_HOLES$1 || !USES_TO_LENGTH$3 }, { + findIndex: function findIndex(callbackfn /* , that = undefined */) { + return $findIndex(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + } }); -var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat'); +// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables +addToUnscopables(FIND_INDEX); -var isConcatSpreadable = function (O) { - if (!isObject(O)) return false; - var spreadable = O[IS_CONCAT_SPREADABLE]; - return spreadable !== undefined ? !!spreadable : isArray(O); -}; +// `FlattenIntoArray` abstract operation +// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray +var flattenIntoArray = function (target, original, source, sourceLen, start, depth, mapper, thisArg) { + var targetIndex = start; + var sourceIndex = 0; + var mapFn = mapper ? functionBindContext(mapper, thisArg, 3) : false; + var element; -var FORCED$1 = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT; + while (sourceIndex < sourceLen) { + if (sourceIndex in source) { + element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex]; -// `Array.prototype.concat` method -// https://tc39.github.io/ecma262/#sec-array.prototype.concat -// with adding support of @@isConcatSpreadable and @@species -_export({ target: 'Array', proto: true, forced: FORCED$1 }, { - concat: function concat(arg) { // eslint-disable-line no-unused-vars - var O = toObject(this); - var A = arraySpeciesCreate(O, 0); - var n = 0; - var i, k, length, len, E; - for (i = -1, length = arguments.length; i < length; i++) { - E = i === -1 ? O : arguments[i]; - if (isConcatSpreadable(E)) { - len = toLength(E.length); - if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED); - for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]); + if (depth > 0 && isArray(element)) { + targetIndex = flattenIntoArray(target, original, element, toLength(element.length), targetIndex, depth - 1) - 1; } else { - if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED); - createProperty(A, n++, E); + if (targetIndex >= 0x1FFFFFFFFFFFFF) throw TypeError('Exceed the acceptable array length'); + target[targetIndex] = element; } + + targetIndex++; } - A.length = n; - return A; + sourceIndex++; } -}); + return targetIndex; +}; -var min$2 = Math.min; - -// `Array.prototype.copyWithin` method implementation -// https://tc39.github.io/ecma262/#sec-array.prototype.copywithin -var arrayCopyWithin = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) { - var O = toObject(this); - var len = toLength(O.length); - var to = toAbsoluteIndex(target, len); - var from = toAbsoluteIndex(start, len); - var end = arguments.length > 2 ? arguments[2] : undefined; - var count = min$2((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to); - var inc = 1; - if (from < to && to < from + count) { - inc = -1; - from += count - 1; - to += count - 1; - } - while (count-- > 0) { - if (from in O) O[to] = O[from]; - else delete O[to]; - to += inc; - from += inc; - } return O; -}; - -var UNSCOPABLES = wellKnownSymbol('unscopables'); -var ArrayPrototype$1 = Array.prototype; - -// Array.prototype[@@unscopables] -// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables -if (ArrayPrototype$1[UNSCOPABLES] == undefined) { - objectDefineProperty.f(ArrayPrototype$1, UNSCOPABLES, { - configurable: true, - value: objectCreate(null) - }); -} - -// add a key to Array.prototype[@@unscopables] -var addToUnscopables = function (key) { - ArrayPrototype$1[UNSCOPABLES][key] = true; -}; - -// `Array.prototype.copyWithin` method -// https://tc39.github.io/ecma262/#sec-array.prototype.copywithin -_export({ target: 'Array', proto: true }, { - copyWithin: arrayCopyWithin -}); - -// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables -addToUnscopables('copyWithin'); - -var arrayMethodIsStrict = function (METHOD_NAME, argument) { - var method = [][METHOD_NAME]; - return !!method && fails(function () { - // eslint-disable-next-line no-useless-call,no-throw-literal - method.call(null, argument || function () { throw 1; }, 1); - }); -}; - -var defineProperty$5 = Object.defineProperty; -var cache = {}; - -var thrower = function (it) { throw it; }; - -var arrayMethodUsesToLength = function (METHOD_NAME, options) { - if (has(cache, METHOD_NAME)) return cache[METHOD_NAME]; - if (!options) options = {}; - var method = [][METHOD_NAME]; - var ACCESSORS = has(options, 'ACCESSORS') ? options.ACCESSORS : false; - var argument0 = has(options, 0) ? options[0] : thrower; - var argument1 = has(options, 1) ? options[1] : undefined; - - return cache[METHOD_NAME] = !!method && !fails(function () { - if (ACCESSORS && !descriptors) return true; - var O = { length: -1 }; - - if (ACCESSORS) defineProperty$5(O, 1, { enumerable: true, get: thrower }); - else O[1] = 1; - - method.call(O, argument0, argument1); - }); -}; - -var $every = arrayIteration.every; - - - -var STRICT_METHOD = arrayMethodIsStrict('every'); -var USES_TO_LENGTH = arrayMethodUsesToLength('every'); - -// `Array.prototype.every` method -// https://tc39.github.io/ecma262/#sec-array.prototype.every -_export({ target: 'Array', proto: true, forced: !STRICT_METHOD || !USES_TO_LENGTH }, { - every: function every(callbackfn /* , thisArg */) { - return $every(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); - } -}); - -// `Array.prototype.fill` method implementation -// https://tc39.github.io/ecma262/#sec-array.prototype.fill -var arrayFill = function fill(value /* , start = 0, end = @length */) { - var O = toObject(this); - var length = toLength(O.length); - var argumentsLength = arguments.length; - var index = toAbsoluteIndex(argumentsLength > 1 ? arguments[1] : undefined, length); - var end = argumentsLength > 2 ? arguments[2] : undefined; - var endPos = end === undefined ? length : toAbsoluteIndex(end, length); - while (endPos > index) O[index++] = value; - return O; -}; - -// `Array.prototype.fill` method -// https://tc39.github.io/ecma262/#sec-array.prototype.fill -_export({ target: 'Array', proto: true }, { - fill: arrayFill -}); - -// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables -addToUnscopables('fill'); - -var $filter = arrayIteration.filter; - - - -var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter'); -// Edge 14- issue -var USES_TO_LENGTH$1 = arrayMethodUsesToLength('filter'); - -// `Array.prototype.filter` method -// https://tc39.github.io/ecma262/#sec-array.prototype.filter -// with adding support of @@species -_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH$1 }, { - filter: function filter(callbackfn /* , thisArg */) { - return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); - } -}); - -var $find = arrayIteration.find; - - - -var FIND = 'find'; -var SKIPS_HOLES = true; - -var USES_TO_LENGTH$2 = arrayMethodUsesToLength(FIND); - -// Shouldn't skip holes -if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; }); - -// `Array.prototype.find` method -// https://tc39.github.io/ecma262/#sec-array.prototype.find -_export({ target: 'Array', proto: true, forced: SKIPS_HOLES || !USES_TO_LENGTH$2 }, { - find: function find(callbackfn /* , that = undefined */) { - return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); - } -}); - -// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables -addToUnscopables(FIND); - -var $findIndex = arrayIteration.findIndex; - - - -var FIND_INDEX = 'findIndex'; -var SKIPS_HOLES$1 = true; - -var USES_TO_LENGTH$3 = arrayMethodUsesToLength(FIND_INDEX); - -// Shouldn't skip holes -if (FIND_INDEX in []) Array(1)[FIND_INDEX](function () { SKIPS_HOLES$1 = false; }); - -// `Array.prototype.findIndex` method -// https://tc39.github.io/ecma262/#sec-array.prototype.findindex -_export({ target: 'Array', proto: true, forced: SKIPS_HOLES$1 || !USES_TO_LENGTH$3 }, { - findIndex: function findIndex(callbackfn /* , that = undefined */) { - return $findIndex(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); - } -}); - -// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables -addToUnscopables(FIND_INDEX); - -// `FlattenIntoArray` abstract operation -// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray -var flattenIntoArray = function (target, original, source, sourceLen, start, depth, mapper, thisArg) { - var targetIndex = start; - var sourceIndex = 0; - var mapFn = mapper ? functionBindContext(mapper, thisArg, 3) : false; - var element; - - while (sourceIndex < sourceLen) { - if (sourceIndex in source) { - element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex]; - - if (depth > 0 && isArray(element)) { - targetIndex = flattenIntoArray(target, original, element, toLength(element.length), targetIndex, depth - 1) - 1; - } else { - if (targetIndex >= 0x1FFFFFFFFFFFFF) throw TypeError('Exceed the acceptable array length'); - target[targetIndex] = element; - } - - targetIndex++; - } - sourceIndex++; - } - return targetIndex; -}; - -var flattenIntoArray_1 = flattenIntoArray; +var flattenIntoArray_1 = flattenIntoArray; // `Array.prototype.flat` method // https://github.com/tc39/proposal-flatMap @@ -2340,11 +1888,11 @@ var NEGATIVE_ZERO$1 = !!nativeLastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0; var STRICT_METHOD$4 = arrayMethodIsStrict('lastIndexOf'); // For preventing possible almost infinite loop in non-standard implementations, test the forward version of the method var USES_TO_LENGTH$7 = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 }); -var FORCED$2 = NEGATIVE_ZERO$1 || !STRICT_METHOD$4 || !USES_TO_LENGTH$7; +var FORCED$1 = NEGATIVE_ZERO$1 || !STRICT_METHOD$4 || !USES_TO_LENGTH$7; // `Array.prototype.lastIndexOf` method implementation // https://tc39.github.io/ecma262/#sec-array.prototype.lastindexof -var arrayLastIndexOf = FORCED$2 ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) { +var arrayLastIndexOf = FORCED$1 ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) { // convert -0 to +0 if (NEGATIVE_ZERO$1) return nativeLastIndexOf.apply(this, arguments) || 0; var O = toIndexedObject(this); @@ -2380,7 +1928,7 @@ _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 || !USES_ }); // `Array.prototype.{ reduce, reduceRight }` methods implementation -var createMethod$3 = function (IS_RIGHT) { +var createMethod$2 = function (IS_RIGHT) { return function (that, callbackfn, argumentsLength, memo) { aFunction$1(callbackfn); var O = toObject(that); @@ -2409,22 +1957,29 @@ var createMethod$3 = function (IS_RIGHT) { var arrayReduce = { // `Array.prototype.reduce` method // https://tc39.github.io/ecma262/#sec-array.prototype.reduce - left: createMethod$3(false), + left: createMethod$2(false), // `Array.prototype.reduceRight` method // https://tc39.github.io/ecma262/#sec-array.prototype.reduceright - right: createMethod$3(true) + right: createMethod$2(true) }; +var engineIsNode = classofRaw(global$1.process) == 'process'; + var $reduce = arrayReduce.left; + + var STRICT_METHOD$5 = arrayMethodIsStrict('reduce'); var USES_TO_LENGTH$9 = arrayMethodUsesToLength('reduce', { 1: 0 }); +// Chrome 80-82 has a critical bug +// https://bugs.chromium.org/p/chromium/issues/detail?id=1049982 +var CHROME_BUG = !engineIsNode && engineV8Version > 79 && engineV8Version < 83; // `Array.prototype.reduce` method // https://tc39.github.io/ecma262/#sec-array.prototype.reduce -_export({ target: 'Array', proto: true, forced: !STRICT_METHOD$5 || !USES_TO_LENGTH$9 }, { +_export({ target: 'Array', proto: true, forced: !STRICT_METHOD$5 || !USES_TO_LENGTH$9 || CHROME_BUG }, { reduce: function reduce(callbackfn /* , initialValue */) { return $reduce(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined); } @@ -2434,13 +1989,18 @@ var $reduceRight = arrayReduce.right; + + var STRICT_METHOD$6 = arrayMethodIsStrict('reduceRight'); // For preventing possible almost infinite loop in non-standard implementations, test the forward version of the method var USES_TO_LENGTH$a = arrayMethodUsesToLength('reduce', { 1: 0 }); +// Chrome 80-82 has a critical bug +// https://bugs.chromium.org/p/chromium/issues/detail?id=1049982 +var CHROME_BUG$1 = !engineIsNode && engineV8Version > 79 && engineV8Version < 83; // `Array.prototype.reduceRight` method // https://tc39.github.io/ecma262/#sec-array.prototype.reduceright -_export({ target: 'Array', proto: true, forced: !STRICT_METHOD$6 || !USES_TO_LENGTH$a }, { +_export({ target: 'Array', proto: true, forced: !STRICT_METHOD$6 || !USES_TO_LENGTH$a || CHROME_BUG$1 }, { reduceRight: function reduceRight(callbackfn /* , initialValue */) { return $reduceRight(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined); } @@ -2528,11 +2088,11 @@ var FAILS_ON_NULL = fails(function () { // Old WebKit var STRICT_METHOD$8 = arrayMethodIsStrict('sort'); -var FORCED$3 = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD$8; +var FORCED$2 = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD$8; // `Array.prototype.sort` method // https://tc39.github.io/ecma262/#sec-array.prototype.sort -_export({ target: 'Array', proto: true, forced: FORCED$3 }, { +_export({ target: 'Array', proto: true, forced: FORCED$2 }, { sort: function sort(comparefn) { return comparefn === undefined ? nativeSort.call(toObject(this)) @@ -2600,206 +2160,706 @@ _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$3 || !USES_ } }); -var SPECIES$3 = wellKnownSymbol('species'); +var SPECIES$3 = wellKnownSymbol('species'); + +var setSpecies = function (CONSTRUCTOR_NAME) { + var Constructor = getBuiltIn(CONSTRUCTOR_NAME); + var defineProperty = objectDefineProperty.f; + + if (descriptors && Constructor && !Constructor[SPECIES$3]) { + defineProperty(Constructor, SPECIES$3, { + configurable: true, + get: function () { return this; } + }); + } +}; + +// `Array[@@species]` getter +// https://tc39.github.io/ecma262/#sec-get-array-@@species +setSpecies('Array'); + +// this method was added to unscopables after implementation +// in popular engines, so it's moved to a separate module + + +addToUnscopables('flat'); + +// this method was added to unscopables after implementation +// in popular engines, so it's moved to a separate module + + +addToUnscopables('flatMap'); + +var ITERATOR$3 = wellKnownSymbol('iterator'); +var BUGGY_SAFARI_ITERATORS = false; + +var returnThis = function () { return this; }; + +// `%IteratorPrototype%` object +// https://tc39.github.io/ecma262/#sec-%iteratorprototype%-object +var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator; + +if ([].keys) { + arrayIterator = [].keys(); + // Safari 8 has buggy iterators w/o `next` + if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true; + else { + PrototypeOfArrayIteratorPrototype = objectGetPrototypeOf(objectGetPrototypeOf(arrayIterator)); + if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype; + } +} + +if (IteratorPrototype == undefined) IteratorPrototype = {}; + +// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() +if ( !has(IteratorPrototype, ITERATOR$3)) { + createNonEnumerableProperty(IteratorPrototype, ITERATOR$3, returnThis); +} + +var iteratorsCore = { + IteratorPrototype: IteratorPrototype, + BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS +}; + +var IteratorPrototype$1 = iteratorsCore.IteratorPrototype; + + + + + +var returnThis$1 = function () { return this; }; + +var createIteratorConstructor = function (IteratorConstructor, NAME, next) { + var TO_STRING_TAG = NAME + ' Iterator'; + IteratorConstructor.prototype = objectCreate(IteratorPrototype$1, { next: createPropertyDescriptor(1, next) }); + setToStringTag(IteratorConstructor, TO_STRING_TAG, false); + iterators[TO_STRING_TAG] = returnThis$1; + return IteratorConstructor; +}; + +var IteratorPrototype$2 = iteratorsCore.IteratorPrototype; +var BUGGY_SAFARI_ITERATORS$1 = iteratorsCore.BUGGY_SAFARI_ITERATORS; +var ITERATOR$4 = wellKnownSymbol('iterator'); +var KEYS = 'keys'; +var VALUES = 'values'; +var ENTRIES = 'entries'; + +var returnThis$2 = function () { return this; }; + +var defineIterator = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) { + createIteratorConstructor(IteratorConstructor, NAME, next); + + var getIterationMethod = function (KIND) { + if (KIND === DEFAULT && defaultIterator) return defaultIterator; + if (!BUGGY_SAFARI_ITERATORS$1 && KIND in IterablePrototype) return IterablePrototype[KIND]; + switch (KIND) { + case KEYS: return function keys() { return new IteratorConstructor(this, KIND); }; + case VALUES: return function values() { return new IteratorConstructor(this, KIND); }; + case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); }; + } return function () { return new IteratorConstructor(this); }; + }; + + var TO_STRING_TAG = NAME + ' Iterator'; + var INCORRECT_VALUES_NAME = false; + var IterablePrototype = Iterable.prototype; + var nativeIterator = IterablePrototype[ITERATOR$4] + || IterablePrototype['@@iterator'] + || DEFAULT && IterablePrototype[DEFAULT]; + var defaultIterator = !BUGGY_SAFARI_ITERATORS$1 && nativeIterator || getIterationMethod(DEFAULT); + var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator; + var CurrentIteratorPrototype, methods, KEY; + + // fix native + if (anyNativeIterator) { + CurrentIteratorPrototype = objectGetPrototypeOf(anyNativeIterator.call(new Iterable())); + if (IteratorPrototype$2 !== Object.prototype && CurrentIteratorPrototype.next) { + if ( objectGetPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype$2) { + if (objectSetPrototypeOf) { + objectSetPrototypeOf(CurrentIteratorPrototype, IteratorPrototype$2); + } else if (typeof CurrentIteratorPrototype[ITERATOR$4] != 'function') { + createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR$4, returnThis$2); + } + } + // Set @@toStringTag to native iterators + setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true); + } + } + + // fix Array#{values, @@iterator}.name in V8 / FF + if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) { + INCORRECT_VALUES_NAME = true; + defaultIterator = function values() { return nativeIterator.call(this); }; + } + + // define iterator + if ( IterablePrototype[ITERATOR$4] !== defaultIterator) { + createNonEnumerableProperty(IterablePrototype, ITERATOR$4, defaultIterator); + } + iterators[NAME] = defaultIterator; + + // export additional methods + if (DEFAULT) { + methods = { + values: getIterationMethod(VALUES), + keys: IS_SET ? defaultIterator : getIterationMethod(KEYS), + entries: getIterationMethod(ENTRIES) + }; + if (FORCED) for (KEY in methods) { + if (BUGGY_SAFARI_ITERATORS$1 || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) { + redefine(IterablePrototype, KEY, methods[KEY]); + } + } else _export({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS$1 || INCORRECT_VALUES_NAME }, methods); + } + + return methods; +}; + +var ARRAY_ITERATOR = 'Array Iterator'; +var setInternalState$1 = internalState.set; +var getInternalState$1 = internalState.getterFor(ARRAY_ITERATOR); + +// `Array.prototype.entries` method +// https://tc39.github.io/ecma262/#sec-array.prototype.entries +// `Array.prototype.keys` method +// https://tc39.github.io/ecma262/#sec-array.prototype.keys +// `Array.prototype.values` method +// https://tc39.github.io/ecma262/#sec-array.prototype.values +// `Array.prototype[@@iterator]` method +// https://tc39.github.io/ecma262/#sec-array.prototype-@@iterator +// `CreateArrayIterator` internal method +// https://tc39.github.io/ecma262/#sec-createarrayiterator +var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) { + setInternalState$1(this, { + type: ARRAY_ITERATOR, + target: toIndexedObject(iterated), // target + index: 0, // next index + kind: kind // kind + }); +// `%ArrayIteratorPrototype%.next` method +// https://tc39.github.io/ecma262/#sec-%arrayiteratorprototype%.next +}, function () { + var state = getInternalState$1(this); + var target = state.target; + var kind = state.kind; + var index = state.index++; + if (!target || index >= target.length) { + state.target = undefined; + return { value: undefined, done: true }; + } + if (kind == 'keys') return { value: index, done: false }; + if (kind == 'values') return { value: target[index], done: false }; + return { value: [index, target[index]], done: false }; +}, 'values'); + +// argumentsList[@@iterator] is %ArrayProto_values% +// https://tc39.github.io/ecma262/#sec-createunmappedargumentsobject +// https://tc39.github.io/ecma262/#sec-createmappedargumentsobject +iterators.Arguments = iterators.Array; + +// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables +addToUnscopables('keys'); +addToUnscopables('values'); +addToUnscopables('entries'); + +var slice = [].slice; +var factories = {}; + +var construct = function (C, argsLength, args) { + if (!(argsLength in factories)) { + for (var list = [], i = 0; i < argsLength; i++) list[i] = 'a[' + i + ']'; + // eslint-disable-next-line no-new-func + factories[argsLength] = Function('C,a', 'return new C(' + list.join(',') + ')'); + } return factories[argsLength](C, args); +}; + +// `Function.prototype.bind` method implementation +// https://tc39.github.io/ecma262/#sec-function.prototype.bind +var functionBind = Function.bind || function bind(that /* , ...args */) { + var fn = aFunction$1(this); + var partArgs = slice.call(arguments, 1); + var boundFunction = function bound(/* args... */) { + var args = partArgs.concat(slice.call(arguments)); + return this instanceof boundFunction ? construct(fn, args.length, args) : fn.apply(that, args); + }; + if (isObject(fn.prototype)) boundFunction.prototype = fn.prototype; + return boundFunction; +}; + +// `Function.prototype.bind` method +// https://tc39.github.io/ecma262/#sec-function.prototype.bind +_export({ target: 'Function', proto: true }, { + bind: functionBind +}); + +var defineProperty$4 = objectDefineProperty.f; + +var FunctionPrototype = Function.prototype; +var FunctionPrototypeToString = FunctionPrototype.toString; +var nameRE = /^\s*function ([^ (]*)/; +var NAME = 'name'; + +// Function instances `.name` property +// https://tc39.github.io/ecma262/#sec-function-instances-name +if (descriptors && !(NAME in FunctionPrototype)) { + defineProperty$4(FunctionPrototype, NAME, { + configurable: true, + get: function () { + try { + return FunctionPrototypeToString.call(this).match(nameRE)[1]; + } catch (error) { + return ''; + } + } + }); +} + +var HAS_INSTANCE = wellKnownSymbol('hasInstance'); +var FunctionPrototype$1 = Function.prototype; + +// `Function.prototype[@@hasInstance]` method +// https://tc39.github.io/ecma262/#sec-function.prototype-@@hasinstance +if (!(HAS_INSTANCE in FunctionPrototype$1)) { + objectDefineProperty.f(FunctionPrototype$1, HAS_INSTANCE, { value: function (O) { + if (typeof this != 'function' || !isObject(O)) return false; + if (!isObject(this.prototype)) return O instanceof this; + // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this: + while (O = objectGetPrototypeOf(O)) if (this.prototype === O) return true; + return false; + } }); +} + +// `globalThis` object +// https://github.com/tc39/proposal-global +_export({ global: true }, { + globalThis: global$1 +}); + +var nativeAssign = Object.assign; +var defineProperty$5 = Object.defineProperty; + +// `Object.assign` method +// https://tc39.github.io/ecma262/#sec-object.assign +var objectAssign = !nativeAssign || fails(function () { + // should have correct order of operations (Edge bug) + if (descriptors && nativeAssign({ b: 1 }, nativeAssign(defineProperty$5({}, 'a', { + enumerable: true, + get: function () { + defineProperty$5(this, 'b', { + value: 3, + enumerable: false + }); + } + }), { b: 2 })).b !== 1) return true; + // should work with symbols and should have deterministic property order (V8 bug) + var A = {}; + var B = {}; + // eslint-disable-next-line no-undef + var symbol = Symbol(); + var alphabet = 'abcdefghijklmnopqrst'; + A[symbol] = 7; + alphabet.split('').forEach(function (chr) { B[chr] = chr; }); + return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet; +}) ? function assign(target, source) { // eslint-disable-line no-unused-vars + var T = toObject(target); + var argumentsLength = arguments.length; + var index = 1; + var getOwnPropertySymbols = objectGetOwnPropertySymbols.f; + var propertyIsEnumerable = objectPropertyIsEnumerable.f; + while (argumentsLength > index) { + var S = indexedObject(arguments[index++]); + var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S); + var length = keys.length; + var j = 0; + var key; + while (length > j) { + key = keys[j++]; + if (!descriptors || propertyIsEnumerable.call(S, key)) T[key] = S[key]; + } + } return T; +} : nativeAssign; + +// `Object.assign` method +// https://tc39.github.io/ecma262/#sec-object.assign +_export({ target: 'Object', stat: true, forced: Object.assign !== objectAssign }, { + assign: objectAssign +}); + +// `Object.create` method +// https://tc39.github.io/ecma262/#sec-object.create +_export({ target: 'Object', stat: true, sham: !descriptors }, { + create: objectCreate +}); + +// `Object.defineProperty` method +// https://tc39.github.io/ecma262/#sec-object.defineproperty +_export({ target: 'Object', stat: true, forced: !descriptors, sham: !descriptors }, { + defineProperty: objectDefineProperty.f +}); + +// `Object.defineProperties` method +// https://tc39.github.io/ecma262/#sec-object.defineproperties +_export({ target: 'Object', stat: true, forced: !descriptors, sham: !descriptors }, { + defineProperties: objectDefineProperties +}); + +var propertyIsEnumerable = objectPropertyIsEnumerable.f; + +// `Object.{ entries, values }` methods implementation +var createMethod$3 = function (TO_ENTRIES) { + return function (it) { + var O = toIndexedObject(it); + var keys = objectKeys(O); + var length = keys.length; + var i = 0; + var result = []; + var key; + while (length > i) { + key = keys[i++]; + if (!descriptors || propertyIsEnumerable.call(O, key)) { + result.push(TO_ENTRIES ? [key, O[key]] : O[key]); + } + } + return result; + }; +}; + +var objectToArray = { + // `Object.entries` method + // https://tc39.github.io/ecma262/#sec-object.entries + entries: createMethod$3(true), + // `Object.values` method + // https://tc39.github.io/ecma262/#sec-object.values + values: createMethod$3(false) +}; + +var $entries = objectToArray.entries; + +// `Object.entries` method +// https://tc39.github.io/ecma262/#sec-object.entries +_export({ target: 'Object', stat: true }, { + entries: function entries(O) { + return $entries(O); + } +}); + +var freezing = !fails(function () { + return Object.isExtensible(Object.preventExtensions({})); +}); -var setSpecies = function (CONSTRUCTOR_NAME) { - var Constructor = getBuiltIn(CONSTRUCTOR_NAME); - var defineProperty = objectDefineProperty.f; +var internalMetadata = createCommonjsModule(function (module) { +var defineProperty = objectDefineProperty.f; - if (descriptors && Constructor && !Constructor[SPECIES$3]) { - defineProperty(Constructor, SPECIES$3, { - configurable: true, - get: function () { return this; } - }); - } -}; -// `Array[@@species]` getter -// https://tc39.github.io/ecma262/#sec-get-array-@@species -setSpecies('Array'); -// this method was added to unscopables after implementation -// in popular engines, so it's moved to a separate module +var METADATA = uid('meta'); +var id = 0; +var isExtensible = Object.isExtensible || function () { + return true; +}; -addToUnscopables('flat'); +var setMetadata = function (it) { + defineProperty(it, METADATA, { value: { + objectID: 'O' + ++id, // object ID + weakData: {} // weak collections IDs + } }); +}; -// this method was added to unscopables after implementation -// in popular engines, so it's moved to a separate module +var fastKey = function (it, create) { + // return a primitive with prefix + if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + if (!has(it, METADATA)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return 'F'; + // not necessary to add metadata + if (!create) return 'E'; + // add missing metadata + setMetadata(it); + // return object ID + } return it[METADATA].objectID; +}; +var getWeakData = function (it, create) { + if (!has(it, METADATA)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return true; + // not necessary to add metadata + if (!create) return false; + // add missing metadata + setMetadata(it); + // return the store of weak collections IDs + } return it[METADATA].weakData; +}; -addToUnscopables('flatMap'); +// add metadata on freeze-family methods calling +var onFreeze = function (it) { + if (freezing && meta.REQUIRED && isExtensible(it) && !has(it, METADATA)) setMetadata(it); + return it; +}; -var ITERATOR$3 = wellKnownSymbol('iterator'); -var BUGGY_SAFARI_ITERATORS = false; +var meta = module.exports = { + REQUIRED: false, + fastKey: fastKey, + getWeakData: getWeakData, + onFreeze: onFreeze +}; -var returnThis = function () { return this; }; +hiddenKeys[METADATA] = true; +}); -// `%IteratorPrototype%` object -// https://tc39.github.io/ecma262/#sec-%iteratorprototype%-object -var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator; +var onFreeze = internalMetadata.onFreeze; -if ([].keys) { - arrayIterator = [].keys(); - // Safari 8 has buggy iterators w/o `next` - if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true; - else { - PrototypeOfArrayIteratorPrototype = objectGetPrototypeOf(objectGetPrototypeOf(arrayIterator)); - if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype; +var nativeFreeze = Object.freeze; +var FAILS_ON_PRIMITIVES = fails(function () { nativeFreeze(1); }); + +// `Object.freeze` method +// https://tc39.github.io/ecma262/#sec-object.freeze +_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !freezing }, { + freeze: function freeze(it) { + return nativeFreeze && isObject(it) ? nativeFreeze(onFreeze(it)) : it; } -} +}); -if (IteratorPrototype == undefined) IteratorPrototype = {}; +// `Object.fromEntries` method +// https://github.com/tc39/proposal-object-from-entries +_export({ target: 'Object', stat: true }, { + fromEntries: function fromEntries(iterable) { + var obj = {}; + iterate(iterable, function (k, v) { + createProperty(obj, k, v); + }, { AS_ENTRIES: true }); + return obj; + } +}); -// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() -if ( !has(IteratorPrototype, ITERATOR$3)) { - createNonEnumerableProperty(IteratorPrototype, ITERATOR$3, returnThis); -} +var nativeGetOwnPropertyDescriptor$2 = objectGetOwnPropertyDescriptor.f; -var iteratorsCore = { - IteratorPrototype: IteratorPrototype, - BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS -}; -var IteratorPrototype$1 = iteratorsCore.IteratorPrototype; +var FAILS_ON_PRIMITIVES$1 = fails(function () { nativeGetOwnPropertyDescriptor$2(1); }); +var FORCED$3 = !descriptors || FAILS_ON_PRIMITIVES$1; + +// `Object.getOwnPropertyDescriptor` method +// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor +_export({ target: 'Object', stat: true, forced: FORCED$3, sham: !descriptors }, { + getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) { + return nativeGetOwnPropertyDescriptor$2(toIndexedObject(it), key); + } +}); +// `Object.getOwnPropertyDescriptors` method +// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptors +_export({ target: 'Object', stat: true, sham: !descriptors }, { + getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) { + var O = toIndexedObject(object); + var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f; + var keys = ownKeys(O); + var result = {}; + var index = 0; + var key, descriptor; + while (keys.length > index) { + descriptor = getOwnPropertyDescriptor(O, key = keys[index++]); + if (descriptor !== undefined) createProperty(result, key, descriptor); + } + return result; + } +}); +var nativeGetOwnPropertyNames$2 = objectGetOwnPropertyNamesExternal.f; +var FAILS_ON_PRIMITIVES$2 = fails(function () { return !Object.getOwnPropertyNames(1); }); +// `Object.getOwnPropertyNames` method +// https://tc39.github.io/ecma262/#sec-object.getownpropertynames +_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$2 }, { + getOwnPropertyNames: nativeGetOwnPropertyNames$2 +}); -var returnThis$1 = function () { return this; }; +var FAILS_ON_PRIMITIVES$3 = fails(function () { objectGetPrototypeOf(1); }); -var createIteratorConstructor = function (IteratorConstructor, NAME, next) { - var TO_STRING_TAG = NAME + ' Iterator'; - IteratorConstructor.prototype = objectCreate(IteratorPrototype$1, { next: createPropertyDescriptor(1, next) }); - setToStringTag(IteratorConstructor, TO_STRING_TAG, false); - iterators[TO_STRING_TAG] = returnThis$1; - return IteratorConstructor; +// `Object.getPrototypeOf` method +// https://tc39.github.io/ecma262/#sec-object.getprototypeof +_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$3, sham: !correctPrototypeGetter }, { + getPrototypeOf: function getPrototypeOf(it) { + return objectGetPrototypeOf(toObject(it)); + } +}); + +// `SameValue` abstract operation +// https://tc39.github.io/ecma262/#sec-samevalue +var sameValue = Object.is || function is(x, y) { + // eslint-disable-next-line no-self-compare + return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; }; -var IteratorPrototype$2 = iteratorsCore.IteratorPrototype; -var BUGGY_SAFARI_ITERATORS$1 = iteratorsCore.BUGGY_SAFARI_ITERATORS; -var ITERATOR$4 = wellKnownSymbol('iterator'); -var KEYS = 'keys'; -var VALUES = 'values'; -var ENTRIES = 'entries'; +// `Object.is` method +// https://tc39.github.io/ecma262/#sec-object.is +_export({ target: 'Object', stat: true }, { + is: sameValue +}); -var returnThis$2 = function () { return this; }; +var nativeIsExtensible = Object.isExtensible; +var FAILS_ON_PRIMITIVES$4 = fails(function () { nativeIsExtensible(1); }); -var defineIterator = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) { - createIteratorConstructor(IteratorConstructor, NAME, next); +// `Object.isExtensible` method +// https://tc39.github.io/ecma262/#sec-object.isextensible +_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$4 }, { + isExtensible: function isExtensible(it) { + return isObject(it) ? nativeIsExtensible ? nativeIsExtensible(it) : true : false; + } +}); - var getIterationMethod = function (KIND) { - if (KIND === DEFAULT && defaultIterator) return defaultIterator; - if (!BUGGY_SAFARI_ITERATORS$1 && KIND in IterablePrototype) return IterablePrototype[KIND]; - switch (KIND) { - case KEYS: return function keys() { return new IteratorConstructor(this, KIND); }; - case VALUES: return function values() { return new IteratorConstructor(this, KIND); }; - case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); }; - } return function () { return new IteratorConstructor(this); }; - }; +var nativeIsFrozen = Object.isFrozen; +var FAILS_ON_PRIMITIVES$5 = fails(function () { nativeIsFrozen(1); }); - var TO_STRING_TAG = NAME + ' Iterator'; - var INCORRECT_VALUES_NAME = false; - var IterablePrototype = Iterable.prototype; - var nativeIterator = IterablePrototype[ITERATOR$4] - || IterablePrototype['@@iterator'] - || DEFAULT && IterablePrototype[DEFAULT]; - var defaultIterator = !BUGGY_SAFARI_ITERATORS$1 && nativeIterator || getIterationMethod(DEFAULT); - var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator; - var CurrentIteratorPrototype, methods, KEY; +// `Object.isFrozen` method +// https://tc39.github.io/ecma262/#sec-object.isfrozen +_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$5 }, { + isFrozen: function isFrozen(it) { + return isObject(it) ? nativeIsFrozen ? nativeIsFrozen(it) : false : true; + } +}); - // fix native - if (anyNativeIterator) { - CurrentIteratorPrototype = objectGetPrototypeOf(anyNativeIterator.call(new Iterable())); - if (IteratorPrototype$2 !== Object.prototype && CurrentIteratorPrototype.next) { - if ( objectGetPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype$2) { - if (objectSetPrototypeOf) { - objectSetPrototypeOf(CurrentIteratorPrototype, IteratorPrototype$2); - } else if (typeof CurrentIteratorPrototype[ITERATOR$4] != 'function') { - createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR$4, returnThis$2); - } - } - // Set @@toStringTag to native iterators - setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true); - } +var nativeIsSealed = Object.isSealed; +var FAILS_ON_PRIMITIVES$6 = fails(function () { nativeIsSealed(1); }); + +// `Object.isSealed` method +// https://tc39.github.io/ecma262/#sec-object.issealed +_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$6 }, { + isSealed: function isSealed(it) { + return isObject(it) ? nativeIsSealed ? nativeIsSealed(it) : false : true; + } +}); + +var FAILS_ON_PRIMITIVES$7 = fails(function () { objectKeys(1); }); + +// `Object.keys` method +// https://tc39.github.io/ecma262/#sec-object.keys +_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$7 }, { + keys: function keys(it) { + return objectKeys(toObject(it)); } +}); - // fix Array#{values, @@iterator}.name in V8 / FF - if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) { - INCORRECT_VALUES_NAME = true; - defaultIterator = function values() { return nativeIterator.call(this); }; +var onFreeze$1 = internalMetadata.onFreeze; + + + +var nativePreventExtensions = Object.preventExtensions; +var FAILS_ON_PRIMITIVES$8 = fails(function () { nativePreventExtensions(1); }); + +// `Object.preventExtensions` method +// https://tc39.github.io/ecma262/#sec-object.preventextensions +_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$8, sham: !freezing }, { + preventExtensions: function preventExtensions(it) { + return nativePreventExtensions && isObject(it) ? nativePreventExtensions(onFreeze$1(it)) : it; } +}); - // define iterator - if ( IterablePrototype[ITERATOR$4] !== defaultIterator) { - createNonEnumerableProperty(IterablePrototype, ITERATOR$4, defaultIterator); +var onFreeze$2 = internalMetadata.onFreeze; + + + +var nativeSeal = Object.seal; +var FAILS_ON_PRIMITIVES$9 = fails(function () { nativeSeal(1); }); + +// `Object.seal` method +// https://tc39.github.io/ecma262/#sec-object.seal +_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$9, sham: !freezing }, { + seal: function seal(it) { + return nativeSeal && isObject(it) ? nativeSeal(onFreeze$2(it)) : it; } - iterators[NAME] = defaultIterator; +}); - // export additional methods - if (DEFAULT) { - methods = { - values: getIterationMethod(VALUES), - keys: IS_SET ? defaultIterator : getIterationMethod(KEYS), - entries: getIterationMethod(ENTRIES) - }; - if (FORCED) for (KEY in methods) { - if (BUGGY_SAFARI_ITERATORS$1 || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) { - redefine(IterablePrototype, KEY, methods[KEY]); - } - } else _export({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS$1 || INCORRECT_VALUES_NAME }, methods); +// `Object.setPrototypeOf` method +// https://tc39.github.io/ecma262/#sec-object.setprototypeof +_export({ target: 'Object', stat: true }, { + setPrototypeOf: objectSetPrototypeOf +}); + +var $values = objectToArray.values; + +// `Object.values` method +// https://tc39.github.io/ecma262/#sec-object.values +_export({ target: 'Object', stat: true }, { + values: function values(O) { + return $values(O); } +}); - return methods; +// `Object.prototype.toString` method implementation +// https://tc39.github.io/ecma262/#sec-object.prototype.tostring +var objectToString = toStringTagSupport ? {}.toString : function toString() { + return '[object ' + classof(this) + ']'; }; -var ARRAY_ITERATOR = 'Array Iterator'; -var setInternalState$1 = internalState.set; -var getInternalState$1 = internalState.getterFor(ARRAY_ITERATOR); +// `Object.prototype.toString` method +// https://tc39.github.io/ecma262/#sec-object.prototype.tostring +if (!toStringTagSupport) { + redefine(Object.prototype, 'toString', objectToString, { unsafe: true }); +} -// `Array.prototype.entries` method -// https://tc39.github.io/ecma262/#sec-array.prototype.entries -// `Array.prototype.keys` method -// https://tc39.github.io/ecma262/#sec-array.prototype.keys -// `Array.prototype.values` method -// https://tc39.github.io/ecma262/#sec-array.prototype.values -// `Array.prototype[@@iterator]` method -// https://tc39.github.io/ecma262/#sec-array.prototype-@@iterator -// `CreateArrayIterator` internal method -// https://tc39.github.io/ecma262/#sec-createarrayiterator -var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) { - setInternalState$1(this, { - type: ARRAY_ITERATOR, - target: toIndexedObject(iterated), // target - index: 0, // next index - kind: kind // kind +// Forced replacement object prototype accessors methods +var objectPrototypeAccessorsForced = !fails(function () { + var key = Math.random(); + // In FF throws only define methods + // eslint-disable-next-line no-undef, no-useless-call + __defineSetter__.call(null, key, function () { /* empty */ }); + delete global$1[key]; +}); + +// `Object.prototype.__defineGetter__` method +// https://tc39.github.io/ecma262/#sec-object.prototype.__defineGetter__ +if (descriptors) { + _export({ target: 'Object', proto: true, forced: objectPrototypeAccessorsForced }, { + __defineGetter__: function __defineGetter__(P, getter) { + objectDefineProperty.f(toObject(this), P, { get: aFunction$1(getter), enumerable: true, configurable: true }); + } }); -// `%ArrayIteratorPrototype%.next` method -// https://tc39.github.io/ecma262/#sec-%arrayiteratorprototype%.next -}, function () { - var state = getInternalState$1(this); - var target = state.target; - var kind = state.kind; - var index = state.index++; - if (!target || index >= target.length) { - state.target = undefined; - return { value: undefined, done: true }; - } - if (kind == 'keys') return { value: index, done: false }; - if (kind == 'values') return { value: target[index], done: false }; - return { value: [index, target[index]], done: false }; -}, 'values'); +} -// argumentsList[@@iterator] is %ArrayProto_values% -// https://tc39.github.io/ecma262/#sec-createunmappedargumentsobject -// https://tc39.github.io/ecma262/#sec-createmappedargumentsobject -iterators.Arguments = iterators.Array; +// `Object.prototype.__defineSetter__` method +// https://tc39.github.io/ecma262/#sec-object.prototype.__defineSetter__ +if (descriptors) { + _export({ target: 'Object', proto: true, forced: objectPrototypeAccessorsForced }, { + __defineSetter__: function __defineSetter__(P, setter) { + objectDefineProperty.f(toObject(this), P, { set: aFunction$1(setter), enumerable: true, configurable: true }); + } + }); +} -// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables -addToUnscopables('keys'); -addToUnscopables('values'); -addToUnscopables('entries'); +var getOwnPropertyDescriptor$2 = objectGetOwnPropertyDescriptor.f; + +// `Object.prototype.__lookupGetter__` method +// https://tc39.github.io/ecma262/#sec-object.prototype.__lookupGetter__ +if (descriptors) { + _export({ target: 'Object', proto: true, forced: objectPrototypeAccessorsForced }, { + __lookupGetter__: function __lookupGetter__(P) { + var O = toObject(this); + var key = toPrimitive(P, true); + var desc; + do { + if (desc = getOwnPropertyDescriptor$2(O, key)) return desc.get; + } while (O = objectGetPrototypeOf(O)); + } + }); +} + +var getOwnPropertyDescriptor$3 = objectGetOwnPropertyDescriptor.f; + +// `Object.prototype.__lookupSetter__` method +// https://tc39.github.io/ecma262/#sec-object.prototype.__lookupSetter__ +if (descriptors) { + _export({ target: 'Object', proto: true, forced: objectPrototypeAccessorsForced }, { + __lookupSetter__: function __lookupSetter__(P) { + var O = toObject(this); + var key = toPrimitive(P, true); + var desc; + do { + if (desc = getOwnPropertyDescriptor$3(O, key)) return desc.set; + } while (O = objectGetPrototypeOf(O)); + } + }); +} var fromCharCode = String.fromCharCode; var nativeFromCodePoint = String.fromCodePoint; @@ -2898,11 +2958,11 @@ var correctIsRegexpLogic = function (METHOD_NAME) { var regexp = /./; try { '/./'[METHOD_NAME](regexp); - } catch (e) { + } catch (error1) { try { regexp[MATCH$1] = false; return '/./'[METHOD_NAME](regexp); - } catch (f) { /* empty */ } + } catch (error2) { /* empty */ } } return false; }; @@ -3987,6 +4047,47 @@ _export({ target: 'String', proto: true, forced: stringHtmlForced('sup') }, { } }); +var REPLACE$1 = wellKnownSymbol('replace'); +var RegExpPrototype$1 = RegExp.prototype; + +// `String.prototype.replaceAll` method +// https://github.com/tc39/proposal-string-replace-all +_export({ target: 'String', proto: true }, { + replaceAll: function replaceAll(searchValue, replaceValue) { + var O = requireObjectCoercible(this); + var IS_REG_EXP, flags, replacer, string, searchString, template, result, position, index; + if (searchValue != null) { + IS_REG_EXP = isRegexp(searchValue); + if (IS_REG_EXP) { + flags = String(requireObjectCoercible('flags' in RegExpPrototype$1 + ? searchValue.flags + : regexpFlags.call(searchValue) + )); + if (!~flags.indexOf('g')) throw TypeError('`.replaceAll` does not allow non-global regexes'); + } + replacer = searchValue[REPLACE$1]; + if (replacer !== undefined) { + return replacer.call(searchValue, O, replaceValue); + } + } + string = String(O); + searchString = String(searchValue); + if (searchString === '') return replaceAll.call(string, /(?:)/g, replaceValue); + template = string.split(searchString); + if (typeof replaceValue !== 'function') { + return template.join(String(replaceValue)); + } + result = template[0]; + position = result.length; + for (index = 1; index < template.length; index++) { + result += String(replaceValue(searchString, position, string)); + position += searchString.length + template[index].length; + result += template[index]; + } + return result; + } +}); + // makes subclassing work correct for wrapped built-ins var inheritIfRequired = function ($this, dummy, Wrapper) { var NewTarget, NewTargetPrototype; @@ -4014,8 +4115,8 @@ var setInternalState$4 = internalState.set; var MATCH$2 = wellKnownSymbol('match'); -var NativeRegExp = global_1.RegExp; -var RegExpPrototype$1 = NativeRegExp.prototype; +var NativeRegExp = global$1.RegExp; +var RegExpPrototype$2 = NativeRegExp.prototype; var re1 = /a/g; var re2 = /a/g; @@ -4057,7 +4158,7 @@ if (FORCED$6) { var result = inheritIfRequired( CORRECT_NEW ? new NativeRegExp(pattern, flags) : NativeRegExp(pattern, flags), - thisIsRegExp ? this : RegExpPrototype$1, + thisIsRegExp ? this : RegExpPrototype$2, RegExpWrapper ); @@ -4075,9 +4176,9 @@ if (FORCED$6) { var keys$1 = getOwnPropertyNames(NativeRegExp); var index = 0; while (keys$1.length > index) proxy(keys$1[index++]); - RegExpPrototype$1.constructor = RegExpWrapper; - RegExpWrapper.prototype = RegExpPrototype$1; - redefine(global_1, 'RegExp', RegExpWrapper); + RegExpPrototype$2.constructor = RegExpWrapper; + RegExpWrapper.prototype = RegExpPrototype$2; + redefine(global$1, 'RegExp', RegExpWrapper); } // https://tc39.github.io/ecma262/#sec-get-regexp-@@species @@ -4097,14 +4198,14 @@ if (descriptors && (/./g.flags != 'g' || UNSUPPORTED_Y$3)) { var UNSUPPORTED_Y$4 = regexpStickyHelpers.UNSUPPORTED_Y; var defineProperty$7 = objectDefineProperty.f; var getInternalState$4 = internalState.get; -var RegExpPrototype$2 = RegExp.prototype; +var RegExpPrototype$3 = RegExp.prototype; // `RegExp.prototype.sticky` getter if (descriptors && UNSUPPORTED_Y$4) { defineProperty$7(RegExp.prototype, 'sticky', { configurable: true, get: function () { - if (this === RegExpPrototype$2) return undefined; + if (this === RegExpPrototype$3) return undefined; // We can't use InternalStateModule.getterFor because // we don't add metadata for regexps created by a literal. if (this instanceof RegExp) { @@ -4146,8 +4247,8 @@ _export({ target: 'RegExp', proto: true, forced: !DELEGATES_TO_EXEC }, { }); var TO_STRING = 'toString'; -var RegExpPrototype$3 = RegExp.prototype; -var nativeToString = RegExpPrototype$3[TO_STRING]; +var RegExpPrototype$4 = RegExp.prototype; +var nativeToString = RegExpPrototype$4[TO_STRING]; var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; }); // FF44- RegExp#toString has a wrong name @@ -4160,7 +4261,7 @@ if (NOT_GENERIC || INCORRECT_NAME) { var R = anObject(this); var p = String(R.source); var rf = R.flags; - var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype$3) ? regexpFlags.call(R) : rf); + var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype$4) ? regexpFlags.call(R) : rf); return '/' + p + '/' + f; }, { unsafe: true }); } @@ -4168,7 +4269,7 @@ if (NOT_GENERIC || INCORRECT_NAME) { var trim = stringTrim.trim; -var $parseInt = global_1.parseInt; +var $parseInt = global$1.parseInt; var hex = /^[+-]?0[Xx]/; var FORCED$7 = $parseInt(whitespaces + '08') !== 8 || $parseInt(whitespaces + '0x16') !== 22; @@ -4188,7 +4289,7 @@ _export({ global: true, forced: parseInt != numberParseInt }, { var trim$1 = stringTrim.trim; -var $parseFloat = global_1.parseFloat; +var $parseFloat = global$1.parseFloat; var FORCED$8 = 1 / $parseFloat(whitespaces + '-0') !== -Infinity; // `parseFloat` method @@ -4211,7 +4312,7 @@ var defineProperty$8 = objectDefineProperty.f; var trim$2 = stringTrim.trim; var NUMBER = 'Number'; -var NativeNumber = global_1[NUMBER]; +var NativeNumber = global$1[NUMBER]; var NumberPrototype = NativeNumber.prototype; // Opera ~12 has broken Object#toString @@ -4270,7 +4371,7 @@ if (isForced_1(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNu } NumberWrapper.prototype = NumberPrototype; NumberPrototype.constructor = NumberWrapper; - redefine(global_1, NUMBER, NumberWrapper); + redefine(global$1, NUMBER, NumberWrapper); } // `Number.EPSILON` constant @@ -4279,7 +4380,7 @@ _export({ target: 'Number', stat: true }, { EPSILON: Math.pow(2, -52) }); -var globalIsFinite = global_1.isFinite; +var globalIsFinite = global$1.isFinite; // `Number.isFinite` method // https://tc39.github.io/ecma262/#sec-number.isfinite @@ -4894,9 +4995,9 @@ if ($stringify$1) { // JSON[@@toStringTag] property // https://tc39.github.io/ecma262/#sec-json-@@tostringtag -setToStringTag(global_1.JSON, 'JSON', true); +setToStringTag(global$1.JSON, 'JSON', true); -var nativePromiseConstructor = global_1.Promise; +var nativePromiseConstructor = global$1.Promise; var redefineAll = function (target, src, options) { for (var key in src) redefine(target, key, src[key], options); @@ -4911,12 +5012,12 @@ var anInstance = function (it, Constructor, name) { var engineIsIos = /(iphone|ipod|ipad).*applewebkit/i.test(engineUserAgent); -var location = global_1.location; -var set$1 = global_1.setImmediate; -var clear = global_1.clearImmediate; -var process$1 = global_1.process; -var MessageChannel = global_1.MessageChannel; -var Dispatch = global_1.Dispatch; +var location = global$1.location; +var set$1 = global$1.setImmediate; +var clear = global$1.clearImmediate; +var process$1 = global$1.process; +var MessageChannel = global$1.MessageChannel; +var Dispatch = global$1.Dispatch; var counter = 0; var queue = {}; var ONREADYSTATECHANGE = 'onreadystatechange'; @@ -4943,7 +5044,7 @@ var listener = function (event) { var post = function (id) { // old engines have not location.origin - global_1.postMessage(id + '', location.protocol + '//' + location.host); + global$1.postMessage(id + '', location.protocol + '//' + location.host); }; // Node.js 0.9+ & IE10+ has setImmediate, otherwise: @@ -4963,7 +5064,7 @@ if (!set$1 || !clear) { delete queue[id]; }; // Node.js 0.8- - if (classofRaw(process$1) == 'process') { + if (engineIsNode) { defer = function (id) { process$1.nextTick(runner(id)); }; @@ -4982,14 +5083,14 @@ if (!set$1 || !clear) { // Browsers with postMessage, skip WebWorkers // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' } else if ( - global_1.addEventListener && + global$1.addEventListener && typeof postMessage == 'function' && - !global_1.importScripts && - !fails(post) && - location.protocol !== 'file:' + !global$1.importScripts && + location && location.protocol !== 'file:' && + !fails(post) ) { defer = post; - global_1.addEventListener('message', listener, false); + global$1.addEventListener('message', listener, false); // IE8- } else if (ONREADYSTATECHANGE in documentCreateElement('script')) { defer = function (id) { @@ -5012,16 +5113,16 @@ var task = { }; var getOwnPropertyDescriptor$7 = objectGetOwnPropertyDescriptor.f; - var macrotask = task.set; -var MutationObserver = global_1.MutationObserver || global_1.WebKitMutationObserver; -var process$2 = global_1.process; -var Promise = global_1.Promise; -var IS_NODE = classofRaw(process$2) == 'process'; + +var MutationObserver = global$1.MutationObserver || global$1.WebKitMutationObserver; +var document$2 = global$1.document; +var process$2 = global$1.process; +var Promise = global$1.Promise; // Node.js 11 shows ExperimentalWarning on getting `queueMicrotask` -var queueMicrotaskDescriptor = getOwnPropertyDescriptor$7(global_1, 'queueMicrotask'); +var queueMicrotaskDescriptor = getOwnPropertyDescriptor$7(global$1, 'queueMicrotask'); var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value; var flush, head, last, notify, toggle, node, promise, then; @@ -5030,7 +5131,7 @@ var flush, head, last, notify, toggle, node, promise, then; if (!queueMicrotask) { flush = function () { var parent, fn; - if (IS_NODE && (parent = process$2.domain)) parent.exit(); + if (engineIsNode && (parent = process$2.domain)) parent.exit(); while (head) { fn = head.fn; head = head.next; @@ -5045,15 +5146,10 @@ if (!queueMicrotask) { if (parent) parent.enter(); }; - // Node.js - if (IS_NODE) { - notify = function () { - process$2.nextTick(flush); - }; // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339 - } else if (MutationObserver && !engineIsIos) { + if (!engineIsIos && !engineIsNode && MutationObserver && document$2) { toggle = true; - node = document.createTextNode(''); + node = document$2.createTextNode(''); new MutationObserver(flush).observe(node, { characterData: true }); notify = function () { node.data = toggle = !toggle; @@ -5066,6 +5162,11 @@ if (!queueMicrotask) { notify = function () { then.call(promise, flush); }; + // Node.js without promises + } else if (engineIsNode) { + notify = function () { + process$2.nextTick(flush); + }; // for other environments - macrotask based on: // - setImmediate // - MessageChannel @@ -5075,7 +5176,7 @@ if (!queueMicrotask) { } else { notify = function () { // strange IE + webpack dev server bug - use .call(global) - macrotask.call(global_1, flush); + macrotask.call(global$1, flush); }; } } @@ -5119,7 +5220,7 @@ var promiseResolve = function (C, x) { }; var hostReportErrors = function (a, b) { - var console = global_1.console; + var console = global$1.console; if (console && console.error) { arguments.length === 1 ? console.error(a) : console.error(a, b); } @@ -5144,20 +5245,21 @@ var task$1 = task.set; + var SPECIES$6 = wellKnownSymbol('species'); var PROMISE = 'Promise'; var getInternalState$5 = internalState.get; var setInternalState$5 = internalState.set; var getInternalPromiseState = internalState.getterFor(PROMISE); var PromiseConstructor = nativePromiseConstructor; -var TypeError$1 = global_1.TypeError; -var document$2 = global_1.document; -var process$3 = global_1.process; +var TypeError$1 = global$1.TypeError; +var document$3 = global$1.document; +var process$3 = global$1.process; var $fetch = getBuiltIn('fetch'); var newPromiseCapability$1 = newPromiseCapability.f; var newGenericPromiseCapability = newPromiseCapability$1; -var IS_NODE$1 = classofRaw(process$3) == 'process'; -var DISPATCH_EVENT = !!(document$2 && document$2.createEvent && global_1.dispatchEvent); +var DISPATCH_EVENT = !!(document$3 && document$3.createEvent && global$1.dispatchEvent); +var NATIVE_REJECTION_EVENT = typeof PromiseRejectionEvent == 'function'; var UNHANDLED_REJECTION = 'unhandledrejection'; var REJECTION_HANDLED = 'rejectionhandled'; var PENDING = 0; @@ -5175,7 +5277,7 @@ var FORCED$g = isForced_1(PROMISE, function () { // We can't detect it synchronously, so just check versions if (engineV8Version === 66) return true; // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test - if (!IS_NODE$1 && typeof PromiseRejectionEvent != 'function') return true; + if (!engineIsNode && !NATIVE_REJECTION_EVENT) return true; } // We can't use @@species feature detection in V8 since it causes // deoptimization and performance degradation @@ -5201,7 +5303,7 @@ var isThenable = function (it) { return isObject(it) && typeof (then = it.then) == 'function' ? then : false; }; -var notify$1 = function (promise, state, isReject) { +var notify$1 = function (state, isReject) { if (state.notified) return; state.notified = true; var chain = state.reactions; @@ -5220,7 +5322,7 @@ var notify$1 = function (promise, state, isReject) { try { if (handler) { if (!ok) { - if (state.rejection === UNHANDLED) onHandleUnhandled(promise, state); + if (state.rejection === UNHANDLED) onHandleUnhandled(state); state.rejection = HANDLED; } if (handler === true) result = value; @@ -5245,36 +5347,37 @@ var notify$1 = function (promise, state, isReject) { } state.reactions = []; state.notified = false; - if (isReject && !state.rejection) onUnhandled(promise, state); + if (isReject && !state.rejection) onUnhandled(state); }); }; var dispatchEvent = function (name, promise, reason) { var event, handler; if (DISPATCH_EVENT) { - event = document$2.createEvent('Event'); + event = document$3.createEvent('Event'); event.promise = promise; event.reason = reason; event.initEvent(name, false, true); - global_1.dispatchEvent(event); + global$1.dispatchEvent(event); } else event = { promise: promise, reason: reason }; - if (handler = global_1['on' + name]) handler(event); + if (!NATIVE_REJECTION_EVENT && (handler = global$1['on' + name])) handler(event); else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason); }; -var onUnhandled = function (promise, state) { - task$1.call(global_1, function () { +var onUnhandled = function (state) { + task$1.call(global$1, function () { + var promise = state.facade; var value = state.value; var IS_UNHANDLED = isUnhandled(state); var result; if (IS_UNHANDLED) { result = perform(function () { - if (IS_NODE$1) { + if (engineIsNode) { process$3.emit('unhandledRejection', value, promise); } else dispatchEvent(UNHANDLED_REJECTION, promise, value); }); // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should - state.rejection = IS_NODE$1 || isUnhandled(state) ? UNHANDLED : HANDLED; + state.rejection = engineIsNode || isUnhandled(state) ? UNHANDLED : HANDLED; if (result.error) throw result.value; } }); @@ -5284,55 +5387,56 @@ var isUnhandled = function (state) { return state.rejection !== HANDLED && !state.parent; }; -var onHandleUnhandled = function (promise, state) { - task$1.call(global_1, function () { - if (IS_NODE$1) { +var onHandleUnhandled = function (state) { + task$1.call(global$1, function () { + var promise = state.facade; + if (engineIsNode) { process$3.emit('rejectionHandled', promise); } else dispatchEvent(REJECTION_HANDLED, promise, state.value); }); }; -var bind = function (fn, promise, state, unwrap) { +var bind = function (fn, state, unwrap) { return function (value) { - fn(promise, state, value, unwrap); + fn(state, value, unwrap); }; }; -var internalReject = function (promise, state, value, unwrap) { +var internalReject = function (state, value, unwrap) { if (state.done) return; state.done = true; if (unwrap) state = unwrap; state.value = value; state.state = REJECTED; - notify$1(promise, state, true); + notify$1(state, true); }; -var internalResolve = function (promise, state, value, unwrap) { +var internalResolve = function (state, value, unwrap) { if (state.done) return; state.done = true; if (unwrap) state = unwrap; try { - if (promise === value) throw TypeError$1("Promise can't be resolved itself"); + if (state.facade === value) throw TypeError$1("Promise can't be resolved itself"); var then = isThenable(value); if (then) { microtask(function () { var wrapper = { done: false }; try { then.call(value, - bind(internalResolve, promise, wrapper, state), - bind(internalReject, promise, wrapper, state) + bind(internalResolve, wrapper, state), + bind(internalReject, wrapper, state) ); } catch (error) { - internalReject(promise, wrapper, error, state); + internalReject(wrapper, error, state); } }); } else { state.value = value; state.state = FULFILLED; - notify$1(promise, state, false); + notify$1(state, false); } } catch (error) { - internalReject(promise, { done: false }, error, state); + internalReject({ done: false }, error, state); } }; @@ -5345,9 +5449,9 @@ if (FORCED$g) { Internal.call(this); var state = getInternalState$5(this); try { - executor(bind(internalResolve, this, state), bind(internalReject, this, state)); + executor(bind(internalResolve, state), bind(internalReject, state)); } catch (error) { - internalReject(this, state, error); + internalReject(state, error); } }; // eslint-disable-next-line no-unused-vars @@ -5371,10 +5475,10 @@ if (FORCED$g) { var reaction = newPromiseCapability$1(speciesConstructor(this, PromiseConstructor)); reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; reaction.fail = typeof onRejected == 'function' && onRejected; - reaction.domain = IS_NODE$1 ? process$3.domain : undefined; + reaction.domain = engineIsNode ? process$3.domain : undefined; state.parent = true; state.reactions.push(reaction); - if (state.state != PENDING) notify$1(this, state, false); + if (state.state != PENDING) notify$1(state, false); return reaction.promise; }, // `Promise.prototype.catch` method @@ -5387,8 +5491,8 @@ if (FORCED$g) { var promise = new Internal(); var state = getInternalState$5(promise); this.promise = promise; - this.resolve = bind(internalResolve, promise, state); - this.reject = bind(internalReject, promise, state); + this.resolve = bind(internalResolve, state); + this.reject = bind(internalReject, state); }; newPromiseCapability.f = newPromiseCapability$1 = function (C) { return C === PromiseConstructor || C === PromiseWrapper @@ -5412,7 +5516,7 @@ if (FORCED$g) { if (typeof $fetch == 'function') _export({ global: true, enumerable: true, forced: true }, { // eslint-disable-next-line no-unused-vars fetch: function fetch(input /* , init */) { - return promiseResolve(PromiseConstructor, $fetch.apply(global_1, arguments)); + return promiseResolve(PromiseConstructor, $fetch.apply(global$1, arguments)); } }); } @@ -5459,7 +5563,7 @@ _export({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION$1 }, { var values = []; var counter = 0; var remaining = 1; - iterate_1(iterable, function (promise) { + iterate(iterable, function (promise) { var index = counter++; var alreadyCalled = false; values.push(undefined); @@ -5484,7 +5588,7 @@ _export({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION$1 }, { var reject = capability.reject; var result = perform(function () { var $promiseResolve = aFunction$1(C.resolve); - iterate_1(iterable, function (promise) { + iterate(iterable, function (promise) { $promiseResolve.call(C, promise).then(capability.resolve, reject); }); }); @@ -5506,7 +5610,7 @@ _export({ target: 'Promise', stat: true }, { var values = []; var counter = 0; var remaining = 1; - iterate_1(iterable, function (promise) { + iterate(iterable, function (promise) { var index = counter++; var alreadyCalled = false; values.push(undefined); @@ -5516,14 +5620,53 @@ _export({ target: 'Promise', stat: true }, { alreadyCalled = true; values[index] = { status: 'fulfilled', value: value }; --remaining || resolve(values); - }, function (e) { + }, function (error) { if (alreadyCalled) return; alreadyCalled = true; - values[index] = { status: 'rejected', reason: e }; + values[index] = { status: 'rejected', reason: error }; --remaining || resolve(values); }); }); - --remaining || resolve(values); + --remaining || resolve(values); + }); + if (result.error) reject(result.value); + return capability.promise; + } +}); + +var PROMISE_ANY_ERROR = 'No one promise resolved'; + +// `Promise.any` method +// https://github.com/tc39/proposal-promise-any +_export({ target: 'Promise', stat: true }, { + any: function any(iterable) { + var C = this; + var capability = newPromiseCapability.f(C); + var resolve = capability.resolve; + var reject = capability.reject; + var result = perform(function () { + var promiseResolve = aFunction$1(C.resolve); + var errors = []; + var counter = 0; + var remaining = 1; + var alreadyResolved = false; + iterate(iterable, function (promise) { + var index = counter++; + var alreadyRejected = false; + errors.push(undefined); + remaining++; + promiseResolve.call(C, promise).then(function (value) { + if (alreadyRejected || alreadyResolved) return; + alreadyResolved = true; + resolve(value); + }, function (error) { + if (alreadyRejected || alreadyResolved) return; + alreadyRejected = true; + errors[index] = error; + --remaining || reject(new (getBuiltIn('AggregateError'))(errors, PROMISE_ANY_ERROR)); + }); + }); + --remaining || reject(new (getBuiltIn('AggregateError'))(errors, PROMISE_ANY_ERROR)); }); if (result.error) reject(result.value); return capability.promise; @@ -5561,7 +5704,7 @@ var collection = function (CONSTRUCTOR_NAME, wrapper, common) { var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1; var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1; var ADDER = IS_MAP ? 'set' : 'add'; - var NativeConstructor = global_1[CONSTRUCTOR_NAME]; + var NativeConstructor = global$1[CONSTRUCTOR_NAME]; var NativePrototype = NativeConstructor && NativeConstructor.prototype; var Constructor = NativeConstructor; var exported = {}; @@ -5614,7 +5757,7 @@ var collection = function (CONSTRUCTOR_NAME, wrapper, common) { Constructor = wrapper(function (dummy, iterable) { anInstance(dummy, Constructor, CONSTRUCTOR_NAME); var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor); - if (iterable != undefined) iterate_1(iterable, that[ADDER], that, IS_MAP); + if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP }); return that; }); Constructor.prototype = NativePrototype; @@ -5670,7 +5813,7 @@ var collectionStrong = { size: 0 }); if (!descriptors) that.size = 0; - if (iterable != undefined) iterate_1(iterable, that[ADDER], that, IS_MAP); + if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP }); }); var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME); @@ -5902,7 +6045,7 @@ var collectionWeak = { id: id$1++, frozen: undefined }); - if (iterable != undefined) iterate_1(iterable, that[ADDER], that, IS_MAP); + if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP }); }); var getInternalState = internalStateGetterFor$1(CONSTRUCTOR_NAME); @@ -5971,7 +6114,7 @@ var es_weakMap = createCommonjsModule(function (module) { var enforceIternalState = internalState.enforce; -var IS_IE11 = !global_1.ActiveXObject && 'ActiveXObject' in global_1; +var IS_IE11 = !global$1.ActiveXObject && 'ActiveXObject' in global$1; var isExtensible = Object.isExtensible; var InternalWeakMap; @@ -6150,12 +6293,12 @@ var DATA_VIEW = 'DataView'; var PROTOTYPE$2 = 'prototype'; var WRONG_LENGTH = 'Wrong length'; var WRONG_INDEX = 'Wrong index'; -var NativeArrayBuffer = global_1[ARRAY_BUFFER]; +var NativeArrayBuffer = global$1[ARRAY_BUFFER]; var $ArrayBuffer = NativeArrayBuffer; -var $DataView = global_1[DATA_VIEW]; +var $DataView = global$1[DATA_VIEW]; var $DataViewPrototype = $DataView && $DataView[PROTOTYPE$2]; var ObjectPrototype$2 = Object.prototype; -var RangeError$1 = global_1.RangeError; +var RangeError$1 = global$1.RangeError; var packIEEE754 = ieee754.pack; var unpackIEEE754 = ieee754.unpack; @@ -6352,7 +6495,7 @@ var arrayBuffer = { var ARRAY_BUFFER$1 = 'ArrayBuffer'; var ArrayBuffer$1 = arrayBuffer[ARRAY_BUFFER$1]; -var NativeArrayBuffer$1 = global_1[ARRAY_BUFFER$1]; +var NativeArrayBuffer$1 = global$1[ARRAY_BUFFER$1]; // `ArrayBuffer` constructor // https://tc39.github.io/ecma262/#sec-arraybuffer-constructor @@ -6368,9 +6511,9 @@ var defineProperty$b = objectDefineProperty.f; -var Int8Array$1 = global_1.Int8Array; +var Int8Array$1 = global$1.Int8Array; var Int8ArrayPrototype = Int8Array$1 && Int8Array$1.prototype; -var Uint8ClampedArray = global_1.Uint8ClampedArray; +var Uint8ClampedArray = global$1.Uint8ClampedArray; var Uint8ClampedArrayPrototype = Uint8ClampedArray && Uint8ClampedArray.prototype; var TypedArray = Int8Array$1 && objectGetPrototypeOf(Int8Array$1); var TypedArrayPrototype = Int8ArrayPrototype && objectGetPrototypeOf(Int8ArrayPrototype); @@ -6380,7 +6523,7 @@ var isPrototypeOf = ObjectPrototype$3.isPrototypeOf; var TO_STRING_TAG$3 = wellKnownSymbol('toStringTag'); var TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG'); // Fixing native typed arrays in Opera Presto crashes the browser, see #595 -var NATIVE_ARRAY_BUFFER_VIEWS = arrayBufferNative && !!objectSetPrototypeOf && classof(global_1.opera) !== 'Opera'; +var NATIVE_ARRAY_BUFFER_VIEWS = arrayBufferNative && !!objectSetPrototypeOf && classof(global$1.opera) !== 'Opera'; var TYPED_ARRAY_TAG_REQIRED = false; var NAME$1; @@ -6414,7 +6557,7 @@ var aTypedArrayConstructor = function (C) { if (objectSetPrototypeOf) { if (isPrototypeOf.call(TypedArray, C)) return C; } else for (var ARRAY in TypedArrayConstructorsList) if (has(TypedArrayConstructorsList, NAME$1)) { - var TypedArrayConstructor = global_1[ARRAY]; + var TypedArrayConstructor = global$1[ARRAY]; if (TypedArrayConstructor && (C === TypedArrayConstructor || isPrototypeOf.call(TypedArrayConstructor, C))) { return C; } @@ -6424,7 +6567,7 @@ var aTypedArrayConstructor = function (C) { var exportTypedArrayMethod = function (KEY, property, forced) { if (!descriptors) return; if (forced) for (var ARRAY in TypedArrayConstructorsList) { - var TypedArrayConstructor = global_1[ARRAY]; + var TypedArrayConstructor = global$1[ARRAY]; if (TypedArrayConstructor && has(TypedArrayConstructor.prototype, KEY)) { delete TypedArrayConstructor.prototype[KEY]; } @@ -6440,7 +6583,7 @@ var exportTypedArrayStaticMethod = function (KEY, property, forced) { if (!descriptors) return; if (objectSetPrototypeOf) { if (forced) for (ARRAY in TypedArrayConstructorsList) { - TypedArrayConstructor = global_1[ARRAY]; + TypedArrayConstructor = global$1[ARRAY]; if (TypedArrayConstructor && has(TypedArrayConstructor, KEY)) { delete TypedArrayConstructor[KEY]; } @@ -6453,7 +6596,7 @@ var exportTypedArrayStaticMethod = function (KEY, property, forced) { } else return; } for (ARRAY in TypedArrayConstructorsList) { - TypedArrayConstructor = global_1[ARRAY]; + TypedArrayConstructor = global$1[ARRAY]; if (TypedArrayConstructor && (!TypedArrayConstructor[KEY] || forced)) { redefine(TypedArrayConstructor, KEY, property); } @@ -6461,7 +6604,7 @@ var exportTypedArrayStaticMethod = function (KEY, property, forced) { }; for (NAME$1 in TypedArrayConstructorsList) { - if (!global_1[NAME$1]) NATIVE_ARRAY_BUFFER_VIEWS = false; + if (!global$1[NAME$1]) NATIVE_ARRAY_BUFFER_VIEWS = false; } // WebKit bug - typed arrays constructors prototype is Object.prototype @@ -6471,14 +6614,14 @@ if (!NATIVE_ARRAY_BUFFER_VIEWS || typeof TypedArray != 'function' || TypedArray throw TypeError('Incorrect invocation'); }; if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME$1 in TypedArrayConstructorsList) { - if (global_1[NAME$1]) objectSetPrototypeOf(global_1[NAME$1], TypedArray); + if (global$1[NAME$1]) objectSetPrototypeOf(global$1[NAME$1], TypedArray); } } if (!NATIVE_ARRAY_BUFFER_VIEWS || !TypedArrayPrototype || TypedArrayPrototype === ObjectPrototype$3) { TypedArrayPrototype = TypedArray.prototype; if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME$1 in TypedArrayConstructorsList) { - if (global_1[NAME$1]) objectSetPrototypeOf(global_1[NAME$1].prototype, TypedArrayPrototype); + if (global$1[NAME$1]) objectSetPrototypeOf(global$1[NAME$1].prototype, TypedArrayPrototype); } } @@ -6492,8 +6635,8 @@ if (descriptors && !has(TypedArrayPrototype, TO_STRING_TAG$3)) { defineProperty$b(TypedArrayPrototype, TO_STRING_TAG$3, { get: function () { return isObject(this) ? this[TYPED_ARRAY_TAG] : undefined; } }); - for (NAME$1 in TypedArrayConstructorsList) if (global_1[NAME$1]) { - createNonEnumerableProperty(global_1[NAME$1], TYPED_ARRAY_TAG, NAME$1); + for (NAME$1 in TypedArrayConstructorsList) if (global$1[NAME$1]) { + createNonEnumerableProperty(global$1[NAME$1], TYPED_ARRAY_TAG, NAME$1); } } @@ -6554,12 +6697,10 @@ _export({ global: true, forced: !arrayBufferNative }, { /* eslint-disable no-new */ - - var NATIVE_ARRAY_BUFFER_VIEWS$2 = arrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS; -var ArrayBuffer$3 = global_1.ArrayBuffer; -var Int8Array$2 = global_1.Int8Array; +var ArrayBuffer$3 = global$1.ArrayBuffer; +var Int8Array$2 = global$1.Int8Array; var typedArrayConstructorsRequireWrappers = !NATIVE_ARRAY_BUFFER_VIEWS$2 || !fails(function () { Int8Array$2(1); @@ -6648,7 +6789,7 @@ var setInternalState = internalState.set; var nativeDefineProperty = objectDefineProperty.f; var nativeGetOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f; var round = Math.round; -var RangeError = global_1.RangeError; +var RangeError = global$1.RangeError; var ArrayBuffer = arrayBuffer.ArrayBuffer; var DataView = arrayBuffer.DataView; var NATIVE_ARRAY_BUFFER_VIEWS = arrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS; @@ -6728,7 +6869,7 @@ if (descriptors) { var CONSTRUCTOR_NAME = TYPE + (CLAMPED ? 'Clamped' : '') + 'Array'; var GETTER = 'get' + TYPE; var SETTER = 'set' + TYPE; - var NativeTypedArrayConstructor = global_1[CONSTRUCTOR_NAME]; + var NativeTypedArrayConstructor = global$1[CONSTRUCTOR_NAME]; var TypedArrayConstructor = NativeTypedArrayConstructor; var TypedArrayConstructorPrototype = TypedArrayConstructor && TypedArrayConstructor.prototype; var exported = {}; @@ -7044,7 +7185,7 @@ exportTypedArrayMethod$9('indexOf', function indexOf(searchElement /* , fromInde }); var ITERATOR$5 = wellKnownSymbol('iterator'); -var Uint8Array = global_1.Uint8Array; +var Uint8Array = global$1.Uint8Array; var arrayValues = es_array_iterator.values; var arrayKeys = es_array_iterator.keys; var arrayEntries = es_array_iterator.entries; @@ -7233,7 +7374,7 @@ exportTypedArrayMethod$l('subarray', function subarray(begin, end) { ); }); -var Int8Array$3 = global_1.Int8Array; +var Int8Array$3 = global$1.Int8Array; var aTypedArray$m = arrayBufferViewCore.aTypedArray; var exportTypedArrayMethod$m = arrayBufferViewCore.exportTypedArrayMethod; var $toLocaleString = [].toLocaleString; @@ -7260,7 +7401,7 @@ var exportTypedArrayMethod$n = arrayBufferViewCore.exportTypedArrayMethod; -var Uint8Array$1 = global_1.Uint8Array; +var Uint8Array$1 = global$1.Uint8Array; var Uint8ArrayPrototype = Uint8Array$1 && Uint8Array$1.prototype || {}; var arrayToString = [].toString; var arrayJoin = [].join; @@ -7474,9 +7615,10 @@ function set$3(target, propertyKey, V /* , receiver */) { // MS Edge 17-18 Reflect.set allows setting the property to object // with non-writable property on the prototype var MS_EDGE_BUG = fails(function () { - var object = objectDefineProperty.f({}, 'a', { configurable: true }); + var Constructor = function () { /* empty */ }; + var object = objectDefineProperty.f(new Constructor(), 'a', { configurable: true }); // eslint-disable-next-line no-undef - return Reflect.set(objectGetPrototypeOf(object), 'a', 1, object) !== false; + return Reflect.set(Constructor.prototype, 'a', 1, object) !== false; }); _export({ target: 'Reflect', stat: true, forced: MS_EDGE_BUG }, { @@ -7498,6 +7640,12 @@ if (objectSetPrototypeOf) _export({ target: 'Reflect', stat: true }, { } }); +_export({ global: true }, { Reflect: {} }); + +// Reflect[@@toStringTag] property +// https://tc39.es/ecma262/#sec-reflect-@@tostringtag +setToStringTag(global$1.Reflect, 'Reflect', true); + // TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env` @@ -7616,7 +7764,7 @@ var toMetadataKey$4 = reflectMetadata.toKey; var from = function (iter) { var result = []; - iterate_1(iter, result.push, result); + iterate(iter, result.push, { that: result }); return result; }; @@ -7765,9 +7913,14 @@ _export({ target: 'Math', stat: true }, { var charAt$2 = stringMultibyte.charAt; + +var FORCED$l = fails(function () { + return '𠮷'.at(0) !== '𠮷'; +}); + // `String.prototype.at` method // https://github.com/mathiasbynens/String.prototype.at -_export({ target: 'String', proto: true }, { +_export({ target: 'String', proto: true, forced: FORCED$l }, { at: function at(pos) { return charAt$2(this, pos); } @@ -8141,7 +8294,7 @@ var URLSearchParamsConstructor = function URLSearchParams(/* init */) { var URLSearchParamsPrototype = URLSearchParamsConstructor.prototype; redefineAll(URLSearchParamsPrototype, { - // `URLSearchParams.prototype.appent` method + // `URLSearchParams.prototype.append` method // https://url.spec.whatwg.org/#dom-urlsearchparams-append append: function append(name, value) { validateArgumentsLength(arguments.length, 2); @@ -8343,7 +8496,7 @@ var codeAt$1 = stringMultibyte.codeAt; -var NativeURL = global_1.URL; +var NativeURL = global$1.URL; var URLSearchParams$1 = web_urlSearchParams.URLSearchParams; var getInternalSearchParamsState = web_urlSearchParams.getState; var setInternalState$a = internalState.set; @@ -9340,6 +9493,38 @@ _export({ target: 'URL', proto: true, enumerable: true }, { } }); +var $filterOut = arrayIteration.filterOut; + + +// `Array.prototype.filterOut` method +// https://github.com/tc39/proposal-array-filtering +_export({ target: 'Array', proto: true }, { + filterOut: function filterOut(callbackfn /* , thisArg */) { + return $filterOut(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + } +}); + +addToUnscopables('filterOut'); + +var $filterOut$1 = arrayIteration.filterOut; + + +var aTypedArray$n = arrayBufferViewCore.aTypedArray; +var aTypedArrayConstructor$6 = arrayBufferViewCore.aTypedArrayConstructor; +var exportTypedArrayMethod$o = arrayBufferViewCore.exportTypedArrayMethod; + +// `%TypedArray%.prototype.filterOut` method +// https://github.com/tc39/proposal-array-filtering +exportTypedArrayMethod$o('filterOut', function filterOut(callbackfn /* , thisArg */) { + var list = $filterOut$1(aTypedArray$n(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + var C = speciesConstructor(this, this.constructor); + var index = 0; + var length = list.length; + var result = new (aTypedArrayConstructor$6(C))(length); + while (length > index) result[index] = list[index++]; + return result; +}); + var defineProperty$c = objectDefineProperty.f; // `Array.prototype.lastIndex` getter @@ -9379,6 +9564,37 @@ if (descriptors && !('lastItem' in [])) { addToUnscopables('lastItem'); } +var push$1 = [].push; + +// `Array.prototype.uniqueBy` method +// https://github.com/tc39/proposal-array-unique +_export({ target: 'Array', proto: true }, { + uniqueBy: function uniqueBy(resolver) { + var that = toObject(this); + var length = toLength(that.length); + var result = arraySpeciesCreate(that, 0); + var Map = getBuiltIn('Map'); + var map = new Map(); + var resolverFunction, index, item, key; + if (typeof resolver == 'function') resolverFunction = resolver; + else if (resolver == null) resolverFunction = function (value) { + return value; + }; + else throw new TypeError('Incorrect resolver!'); + for (index = 0; index < length; index++) { + item = that[index]; + key = resolverFunction(item); + if (!map.has(key)) map.set(key, item); + } + map.forEach(function (value) { + push$1.call(result, value); + }); + return result; + } +}); + +addToUnscopables('uniqueBy'); + // `Map.groupBy` method // https://github.com/tc39/proposal-collection-methods _export({ target: 'Map', stat: true }, { @@ -9388,7 +9604,7 @@ _export({ target: 'Map', stat: true }, { var has = aFunction$1(newMap.has); var get = aFunction$1(newMap.get); var set = aFunction$1(newMap.set); - iterate_1(iterable, function (element) { + iterate(iterable, function (element) { var derivedKey = keyDerivative(element); if (!has.call(newMap, derivedKey)) set.call(newMap, derivedKey, [element]); else get.call(newMap, derivedKey).push(element); @@ -9404,7 +9620,7 @@ _export({ target: 'Map', stat: true }, { var newMap = new this(); aFunction$1(keyDerivative); var setter = aFunction$1(newMap.set); - iterate_1(iterable, function (element) { + iterate(iterable, function (element) { setter.call(newMap, keyDerivative(element), element); }); return newMap; @@ -9444,9 +9660,9 @@ _export({ target: 'Map', proto: true, real: true, forced: isPure }, { var map = anObject(this); var iterator = getMapIterator(map); var boundFunction = functionBindContext(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); - return !iterate_1(iterator, function (key, value) { - if (!boundFunction(value, key, map)) return iterate_1.stop(); - }, undefined, true, true).stopped; + return !iterate(iterator, function (key, value, stop) { + if (!boundFunction(value, key, map)) return stop(); + }, { AS_ENTRIES: true, IS_ITERATOR: true, INTERRUPTED: true }).stopped; } }); @@ -9459,9 +9675,9 @@ _export({ target: 'Map', proto: true, real: true, forced: isPure }, { var boundFunction = functionBindContext(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); var newMap = new (speciesConstructor(map, getBuiltIn('Map')))(); var setter = aFunction$1(newMap.set); - iterate_1(iterator, function (key, value) { + iterate(iterator, function (key, value) { if (boundFunction(value, key, map)) setter.call(newMap, key, value); - }, undefined, true, true); + }, { AS_ENTRIES: true, IS_ITERATOR: true }); return newMap; } }); @@ -9473,9 +9689,9 @@ _export({ target: 'Map', proto: true, real: true, forced: isPure }, { var map = anObject(this); var iterator = getMapIterator(map); var boundFunction = functionBindContext(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); - return iterate_1(iterator, function (key, value) { - if (boundFunction(value, key, map)) return iterate_1.stop(value); - }, undefined, true, true).result; + return iterate(iterator, function (key, value, stop) { + if (boundFunction(value, key, map)) return stop(value); + }, { AS_ENTRIES: true, IS_ITERATOR: true, INTERRUPTED: true }).result; } }); @@ -9486,9 +9702,9 @@ _export({ target: 'Map', proto: true, real: true, forced: isPure }, { var map = anObject(this); var iterator = getMapIterator(map); var boundFunction = functionBindContext(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); - return iterate_1(iterator, function (key, value) { - if (boundFunction(value, key, map)) return iterate_1.stop(key); - }, undefined, true, true).result; + return iterate(iterator, function (key, value, stop) { + if (boundFunction(value, key, map)) return stop(key); + }, { AS_ENTRIES: true, IS_ITERATOR: true, INTERRUPTED: true }).result; } }); @@ -9503,9 +9719,9 @@ var sameValueZero = function (x, y) { // https://github.com/tc39/proposal-collection-methods _export({ target: 'Map', proto: true, real: true, forced: isPure }, { includes: function includes(searchElement) { - return iterate_1(getMapIterator(anObject(this)), function (key, value) { - if (sameValueZero(value, searchElement)) return iterate_1.stop(); - }, undefined, true, true).stopped; + return iterate(getMapIterator(anObject(this)), function (key, value, stop) { + if (sameValueZero(value, searchElement)) return stop(); + }, { AS_ENTRIES: true, IS_ITERATOR: true, INTERRUPTED: true }).stopped; } }); @@ -9513,9 +9729,9 @@ _export({ target: 'Map', proto: true, real: true, forced: isPure }, { // https://github.com/tc39/proposal-collection-methods _export({ target: 'Map', proto: true, real: true, forced: isPure }, { keyOf: function keyOf(searchElement) { - return iterate_1(getMapIterator(anObject(this)), function (key, value) { - if (value === searchElement) return iterate_1.stop(key); - }, undefined, true, true).result; + return iterate(getMapIterator(anObject(this)), function (key, value, stop) { + if (value === searchElement) return stop(key); + }, { AS_ENTRIES: true, IS_ITERATOR: true, INTERRUPTED: true }).result; } }); @@ -9528,9 +9744,9 @@ _export({ target: 'Map', proto: true, real: true, forced: isPure }, { var boundFunction = functionBindContext(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); var newMap = new (speciesConstructor(map, getBuiltIn('Map')))(); var setter = aFunction$1(newMap.set); - iterate_1(iterator, function (key, value) { + iterate(iterator, function (key, value) { setter.call(newMap, boundFunction(value, key, map), value); - }, undefined, true, true); + }, { AS_ENTRIES: true, IS_ITERATOR: true }); return newMap; } }); @@ -9544,9 +9760,9 @@ _export({ target: 'Map', proto: true, real: true, forced: isPure }, { var boundFunction = functionBindContext(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); var newMap = new (speciesConstructor(map, getBuiltIn('Map')))(); var setter = aFunction$1(newMap.set); - iterate_1(iterator, function (key, value) { + iterate(iterator, function (key, value) { setter.call(newMap, key, boundFunction(value, key, map)); - }, undefined, true, true); + }, { AS_ENTRIES: true, IS_ITERATOR: true }); return newMap; } }); @@ -9560,7 +9776,7 @@ _export({ target: 'Map', proto: true, real: true, forced: isPure }, { var setter = aFunction$1(map.set); var i = 0; while (i < arguments.length) { - iterate_1(arguments[i++], setter, map, true); + iterate(arguments[i++], setter, { that: map, AS_ENTRIES: true }); } return map; } @@ -9575,14 +9791,14 @@ _export({ target: 'Map', proto: true, real: true, forced: isPure }, { var noInitial = arguments.length < 2; var accumulator = noInitial ? undefined : arguments[1]; aFunction$1(callbackfn); - iterate_1(iterator, function (key, value) { + iterate(iterator, function (key, value) { if (noInitial) { noInitial = false; accumulator = value; } else { accumulator = callbackfn(accumulator, value, key, map); } - }, undefined, true, true); + }, { AS_ENTRIES: true, IS_ITERATOR: true }); if (noInitial) throw TypeError('Reduce of empty map with no initial value'); return accumulator; } @@ -9595,9 +9811,9 @@ _export({ target: 'Map', proto: true, real: true, forced: isPure }, { var map = anObject(this); var iterator = getMapIterator(map); var boundFunction = functionBindContext(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); - return iterate_1(iterator, function (key, value) { - if (boundFunction(value, key, map)) return iterate_1.stop(); - }, undefined, true, true).stopped; + return iterate(iterator, function (key, value, stop) { + if (boundFunction(value, key, map)) return stop(); + }, { AS_ENTRIES: true, IS_ITERATOR: true, INTERRUPTED: true }).stopped; } }); @@ -9656,9 +9872,9 @@ _export({ target: 'Set', proto: true, real: true, forced: isPure }, { var set = anObject(this); var iterator = getSetIterator(set); var boundFunction = functionBindContext(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); - return !iterate_1(iterator, function (value) { - if (!boundFunction(value, value, set)) return iterate_1.stop(); - }, undefined, false, true).stopped; + return !iterate(iterator, function (value, stop) { + if (!boundFunction(value, value, set)) return stop(); + }, { IS_ITERATOR: true, INTERRUPTED: true }).stopped; } }); @@ -9671,9 +9887,9 @@ _export({ target: 'Set', proto: true, real: true, forced: isPure }, { var boundFunction = functionBindContext(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); var newSet = new (speciesConstructor(set, getBuiltIn('Set')))(); var adder = aFunction$1(newSet.add); - iterate_1(iterator, function (value) { + iterate(iterator, function (value) { if (boundFunction(value, value, set)) adder.call(newSet, value); - }, undefined, false, true); + }, { IS_ITERATOR: true }); return newSet; } }); @@ -9685,9 +9901,9 @@ _export({ target: 'Set', proto: true, real: true, forced: isPure }, { var set = anObject(this); var iterator = getSetIterator(set); var boundFunction = functionBindContext(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); - return iterate_1(iterator, function (value) { - if (boundFunction(value, value, set)) return iterate_1.stop(value); - }, undefined, false, true).result; + return iterate(iterator, function (value, stop) { + if (boundFunction(value, value, set)) return stop(value); + }, { IS_ITERATOR: true, INTERRUPTED: true }).result; } }); @@ -9699,7 +9915,7 @@ _export({ target: 'Set', proto: true, real: true, forced: isPure }, { var iterator = getSetIterator(set); var sep = separator === undefined ? ',' : String(separator); var result = []; - iterate_1(iterator, result.push, result, false, true); + iterate(iterator, result.push, { that: result, IS_ITERATOR: true }); return result.join(sep); } }); @@ -9713,9 +9929,9 @@ _export({ target: 'Set', proto: true, real: true, forced: isPure }, { var boundFunction = functionBindContext(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); var newSet = new (speciesConstructor(set, getBuiltIn('Set')))(); var adder = aFunction$1(newSet.add); - iterate_1(iterator, function (value) { + iterate(iterator, function (value) { adder.call(newSet, boundFunction(value, value, set)); - }, undefined, false, true); + }, { IS_ITERATOR: true }); return newSet; } }); @@ -9729,14 +9945,14 @@ _export({ target: 'Set', proto: true, real: true, forced: isPure }, { var noInitial = arguments.length < 2; var accumulator = noInitial ? undefined : arguments[1]; aFunction$1(callbackfn); - iterate_1(iterator, function (value) { + iterate(iterator, function (value) { if (noInitial) { noInitial = false; accumulator = value; } else { accumulator = callbackfn(accumulator, value, value, set); } - }, undefined, false, true); + }, { IS_ITERATOR: true }); if (noInitial) throw TypeError('Reduce of empty set with no initial value'); return accumulator; } @@ -9749,9 +9965,9 @@ _export({ target: 'Set', proto: true, real: true, forced: isPure }, { var set = anObject(this); var iterator = getSetIterator(set); var boundFunction = functionBindContext(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); - return iterate_1(iterator, function (value) { - if (boundFunction(value, value, set)) return iterate_1.stop(); - }, undefined, false, true).stopped; + return iterate(iterator, function (value, stop) { + if (boundFunction(value, value, set)) return stop(); + }, { IS_ITERATOR: true, INTERRUPTED: true }).stopped; } }); @@ -9787,22 +10003,22 @@ _export({ target: 'WeakSet', proto: true, real: true, forced: isPure }, { var collectionFrom = function from(source /* , mapFn, thisArg */) { var length = arguments.length; var mapFn = length > 1 ? arguments[1] : undefined; - var mapping, A, n, boundFunction; + var mapping, array, n, boundFunction; aFunction$1(this); mapping = mapFn !== undefined; if (mapping) aFunction$1(mapFn); if (source == undefined) return new this(); - A = []; + array = []; if (mapping) { n = 0; boundFunction = functionBindContext(mapFn, length > 2 ? arguments[2] : undefined, 2); - iterate_1(source, function (nextItem) { - A.push(boundFunction(nextItem, n++)); + iterate(source, function (nextItem) { + array.push(boundFunction(nextItem, n++)); }); } else { - iterate_1(source, A.push, A); + iterate(source, array.push, { that: array }); } - return new this(A); + return new this(array); }; // `Map.from` method @@ -10033,13 +10249,128 @@ _export({ target: 'Number', stat: true }, { } }); -var OBJECT_ITERATOR = 'Object Iterator'; +var INCORRECT_RANGE = 'Incorrect Number.range arguments'; +var RANGE_ITERATOR = 'RangeIterator'; + var setInternalState$b = internalState.set; -var getInternalState$7 = internalState.getterFor(OBJECT_ITERATOR); +var getInternalState$7 = internalState.getterFor(RANGE_ITERATOR); + +var $RangeIterator = createIteratorConstructor(function RangeIterator(start, end, option, type, zero, one) { + if (typeof start != type || (end !== Infinity && end !== -Infinity && typeof end != type)) { + throw new TypeError(INCORRECT_RANGE); + } + if (start === Infinity || start === -Infinity) { + throw new RangeError(INCORRECT_RANGE); + } + var ifIncrease = end > start; + var inclusiveEnd = false; + var step; + if (option === undefined) { + step = undefined; + } else if (isObject(option)) { + step = option.step; + inclusiveEnd = !!option.inclusive; + } else if (typeof option == type) { + step = option; + } else { + throw new TypeError(INCORRECT_RANGE); + } + if (step == null) { + step = ifIncrease ? one : -one; + } + if (typeof step != type) { + throw new TypeError(INCORRECT_RANGE); + } + if (step === Infinity || step === -Infinity || (step === zero && start !== end)) { + throw new RangeError(INCORRECT_RANGE); + } + // eslint-disable-next-line no-self-compare + var hitsEnd = start != start || end != end || step != step || (end > start) !== (step > zero); + setInternalState$b(this, { + type: RANGE_ITERATOR, + start: start, + end: end, + step: step, + inclusiveEnd: inclusiveEnd, + hitsEnd: hitsEnd, + currentCount: zero, + zero: zero + }); + if (!descriptors) { + this.start = start; + this.end = end; + this.step = step; + this.inclusive = inclusiveEnd; + } +}, RANGE_ITERATOR, function next() { + var state = getInternalState$7(this); + if (state.hitsEnd) return { value: undefined, done: true }; + var start = state.start; + var end = state.end; + var step = state.step; + var currentYieldingValue = start + (step * state.currentCount++); + if (currentYieldingValue === end) state.hitsEnd = true; + var inclusiveEnd = state.inclusiveEnd; + var endCondition; + if (end > start) { + endCondition = inclusiveEnd ? currentYieldingValue > end : currentYieldingValue >= end; + } else { + endCondition = inclusiveEnd ? end > currentYieldingValue : end >= currentYieldingValue; + } + if (endCondition) { + return { value: undefined, done: state.hitsEnd = true }; + } return { value: currentYieldingValue, done: false }; +}); + +var getter = function (fn) { + return { get: fn, set: function () { /* empty */ }, configurable: true, enumerable: false }; +}; + +if (descriptors) { + objectDefineProperties($RangeIterator.prototype, { + start: getter(function () { + return getInternalState$7(this).start; + }), + end: getter(function () { + return getInternalState$7(this).end; + }), + inclusive: getter(function () { + return getInternalState$7(this).inclusiveEnd; + }), + step: getter(function () { + return getInternalState$7(this).step; + }) + }); +} + +var rangeIterator = $RangeIterator; + +// `BigInt.range` method +// https://github.com/tc39/proposal-Number.range +if (typeof BigInt == 'function') { + _export({ target: 'BigInt', stat: true }, { + range: function range(start, end, option) { + // eslint-disable-next-line no-undef + return new rangeIterator(start, end, option, 'bigint', BigInt(0), BigInt(1)); + } + }); +} + +// `Number.range` method +// https://github.com/tc39/proposal-Number.range +_export({ target: 'Number', stat: true }, { + range: function range(start, end, option) { + return new rangeIterator(start, end, option, 'number', 0, 1); + } +}); + +var OBJECT_ITERATOR = 'Object Iterator'; +var setInternalState$c = internalState.set; +var getInternalState$8 = internalState.getterFor(OBJECT_ITERATOR); var objectIterator = createIteratorConstructor(function ObjectIterator(source, mode) { var object = toObject(source); - setInternalState$b(this, { + setInternalState$c(this, { type: OBJECT_ITERATOR, mode: mode, object: object, @@ -10047,7 +10378,7 @@ var objectIterator = createIteratorConstructor(function ObjectIterator(source, m index: 0 }); }, 'Object', function next() { - var state = getInternalState$7(this); + var state = getInternalState$8(this); var keys = state.keys; while (true) { if (keys === null || state.index >= keys.length) { @@ -10106,8 +10437,8 @@ var defineProperty$e = objectDefineProperty.f; var OBSERVABLE = wellKnownSymbol('observable'); -var getInternalState$8 = internalState.get; -var setInternalState$c = internalState.set; +var getInternalState$9 = internalState.get; +var setInternalState$d = internalState.set; var getMethod = function (fn) { return fn == null ? undefined : aFunction$1(fn); @@ -10138,7 +10469,7 @@ var close = function (subscription, subscriptionState) { }; var Subscription = function (observer, subscriber) { - var subscriptionState = setInternalState$c(this, { + var subscriptionState = setInternalState$d(this, { cleanup: undefined, observer: anObject(observer), subscriptionObserver: undefined @@ -10166,7 +10497,7 @@ var Subscription = function (observer, subscriber) { Subscription.prototype = redefineAll({}, { unsubscribe: function unsubscribe() { - var subscriptionState = getInternalState$8(this); + var subscriptionState = getInternalState$9(this); if (!subscriptionClosed(subscriptionState)) { close(this, subscriptionState); cleanupSubscription(subscriptionState); @@ -10177,18 +10508,18 @@ Subscription.prototype = redefineAll({}, { if (descriptors) defineProperty$e(Subscription.prototype, 'closed', { configurable: true, get: function () { - return subscriptionClosed(getInternalState$8(this)); + return subscriptionClosed(getInternalState$9(this)); } }); var SubscriptionObserver = function (subscription) { - setInternalState$c(this, { subscription: subscription }); + setInternalState$d(this, { subscription: subscription }); if (!descriptors) this.closed = false; }; SubscriptionObserver.prototype = redefineAll({}, { next: function next(value) { - var subscriptionState = getInternalState$8(getInternalState$8(this).subscription); + var subscriptionState = getInternalState$9(getInternalState$9(this).subscription); if (!subscriptionClosed(subscriptionState)) { var observer = subscriptionState.observer; try { @@ -10200,8 +10531,8 @@ SubscriptionObserver.prototype = redefineAll({}, { } }, error: function error(value) { - var subscription = getInternalState$8(this).subscription; - var subscriptionState = getInternalState$8(subscription); + var subscription = getInternalState$9(this).subscription; + var subscriptionState = getInternalState$9(subscription); if (!subscriptionClosed(subscriptionState)) { var observer = subscriptionState.observer; close(subscription, subscriptionState); @@ -10215,8 +10546,8 @@ SubscriptionObserver.prototype = redefineAll({}, { } }, complete: function complete() { - var subscription = getInternalState$8(this).subscription; - var subscriptionState = getInternalState$8(subscription); + var subscription = getInternalState$9(this).subscription; + var subscriptionState = getInternalState$9(subscription); if (!subscriptionClosed(subscriptionState)) { var observer = subscriptionState.observer; close(subscription, subscriptionState); @@ -10233,13 +10564,13 @@ SubscriptionObserver.prototype = redefineAll({}, { if (descriptors) defineProperty$e(SubscriptionObserver.prototype, 'closed', { configurable: true, get: function () { - return subscriptionClosed(getInternalState$8(getInternalState$8(this).subscription)); + return subscriptionClosed(getInternalState$9(getInternalState$9(this).subscription)); } }); var $Observable = function Observable(subscriber) { anInstance(this, $Observable, 'Observable'); - setInternalState$c(this, { subscriber: aFunction$1(subscriber) }); + setInternalState$d(this, { subscriber: aFunction$1(subscriber) }); }; redefineAll($Observable.prototype, { @@ -10249,7 +10580,7 @@ redefineAll($Observable.prototype, { next: observer, error: length > 1 ? arguments[1] : undefined, complete: length > 2 ? arguments[2] : undefined - } : isObject(observer) ? observer : {}, getInternalState$8(this).subscriber); + } : isObject(observer) ? observer : {}, getInternalState$9(this).subscriber); } }); @@ -10265,10 +10596,10 @@ redefineAll($Observable, { } var iterator = getIterator(x); return new C(function (observer) { - iterate_1(iterator, function (it) { + iterate(iterator, function (it, stop) { observer.next(it); - if (observer.closed) return iterate_1.stop(); - }, undefined, false, true); + if (observer.closed) return stop(); + }, { IS_ITERATOR: true, INTERRUPTED: true }); observer.complete(); }); }, @@ -10316,17 +10647,17 @@ _export({ target: 'Promise', stat: true }, { var SEEDED_RANDOM = 'Seeded Random'; var SEEDED_RANDOM_GENERATOR = SEEDED_RANDOM + ' Generator'; -var setInternalState$d = internalState.set; -var getInternalState$9 = internalState.getterFor(SEEDED_RANDOM_GENERATOR); +var setInternalState$e = internalState.set; +var getInternalState$a = internalState.getterFor(SEEDED_RANDOM_GENERATOR); var SEED_TYPE_ERROR = 'Math.seededPRNG() argument should have a "seed" field with a finite value.'; var $SeededRandomGenerator = createIteratorConstructor(function SeededRandomGenerator(seed) { - setInternalState$d(this, { + setInternalState$e(this, { type: SEEDED_RANDOM_GENERATOR, seed: seed % 2147483647 }); }, SEEDED_RANDOM, function next() { - var state = getInternalState$9(this); + var state = getInternalState$a(this); var seed = state.seed = (state.seed * 1103515245 + 12345) % 2147483647; return { value: (seed & 1073741823) / 1073741823, done: false }; }); @@ -10345,18 +10676,18 @@ _export({ target: 'Math', stat: true, forced: true }, { var codeAt$2 = stringMultibyte.codeAt; var charAt$3 = stringMultibyte.charAt; var STRING_ITERATOR$1 = 'String Iterator'; -var setInternalState$e = internalState.set; -var getInternalState$a = internalState.getterFor(STRING_ITERATOR$1); +var setInternalState$f = internalState.set; +var getInternalState$b = internalState.getterFor(STRING_ITERATOR$1); // TODO: unify with String#@@iterator var $StringIterator = createIteratorConstructor(function StringIterator(string) { - setInternalState$e(this, { + setInternalState$f(this, { type: STRING_ITERATOR$1, string: string, index: 0 }); }, 'String', function next() { - var state = getInternalState$a(this); + var state = getInternalState$b(this); var string = state.string; var index = state.index; var point; @@ -10402,7 +10733,7 @@ _export({ target: 'Array', stat: true }, { var USE_FUNCTION_CONSTRUCTOR = 'USE_FUNCTION_CONSTRUCTOR'; var ASYNC_ITERATOR = wellKnownSymbol('asyncIterator'); -var AsyncIterator = global_1.AsyncIterator; +var AsyncIterator = global$1.AsyncIterator; var PassedAsyncIteratorPrototype = sharedStore.AsyncIteratorPrototype; var AsyncIteratorPrototype, prototype; @@ -10411,7 +10742,7 @@ var AsyncIteratorPrototype, prototype; AsyncIteratorPrototype = PassedAsyncIteratorPrototype; } else if (typeof AsyncIterator == 'function') { AsyncIteratorPrototype = AsyncIterator.prototype; - } else if (sharedStore[USE_FUNCTION_CONSTRUCTOR] || global_1[USE_FUNCTION_CONSTRUCTOR]) { + } else if (sharedStore[USE_FUNCTION_CONSTRUCTOR] || global$1[USE_FUNCTION_CONSTRUCTOR]) { try { // eslint-disable-next-line no-new-func prototype = objectGetPrototypeOf(objectGetPrototypeOf(objectGetPrototypeOf(Function('return async function*(){}()')()))); @@ -10461,13 +10792,13 @@ _export({ global: true, forced: isPure }, { var Promise$1 = getBuiltIn('Promise'); -var setInternalState$f = internalState.set; -var getInternalState$b = internalState.get; +var setInternalState$g = internalState.set; +var getInternalState$c = internalState.get; var TO_STRING_TAG$5 = wellKnownSymbol('toStringTag'); var $return = function (value) { - var iterator = getInternalState$b(this).iterator; + var iterator = getInternalState$c(this).iterator; var $$return = iterator['return']; return $$return === undefined ? Promise$1.resolve({ done: true, value: value }) @@ -10475,7 +10806,7 @@ var $return = function (value) { }; var $throw = function (value) { - var iterator = getInternalState$b(this).iterator; + var iterator = getInternalState$c(this).iterator; var $$throw = iterator['throw']; return $$throw === undefined ? Promise$1.reject(value) @@ -10486,12 +10817,12 @@ var asyncIteratorCreateProxy = function (nextHandler, IS_ITERATOR) { var AsyncIteratorProxy = function AsyncIterator(state) { state.next = aFunction$1(state.iterator.next); state.done = false; - setInternalState$f(this, state); + setInternalState$g(this, state); }; AsyncIteratorProxy.prototype = redefineAll(objectCreate(path.AsyncIterator.prototype), { next: function next(arg) { - var state = getInternalState$b(this); + var state = getInternalState$c(this); if (state.done) return Promise$1.resolve({ done: true, value: undefined }); try { return Promise$1.resolve(anObject(nextHandler.call(state, arg, Promise$1))); @@ -10584,7 +10915,7 @@ _export({ target: 'AsyncIterator', proto: true, real: true }, { var Promise$2 = getBuiltIn('Promise'); -var push$1 = [].push; +var push$2 = [].push; var createMethod$7 = function (TYPE) { var IS_TO_ARRAY = TYPE == 0; @@ -10598,6 +10929,25 @@ var createMethod$7 = function (TYPE) { if (!IS_TO_ARRAY) aFunction$1(fn); return new Promise$2(function (resolve, reject) { + var closeIteration = function (method, argument) { + try { + var returnMethod = iterator['return']; + if (returnMethod !== undefined) { + return Promise$2.resolve(returnMethod.call(iterator)).then(function () { + method(argument); + }, function (error) { + reject(error); + }); + } + } catch (error2) { + return reject(error2); + } method(argument); + }; + + var onError = function (error) { + closeIteration(reject, error); + }; + var loop = function () { try { Promise$2.resolve(anObject(next.call(iterator))).then(function (step) { @@ -10607,23 +10957,23 @@ var createMethod$7 = function (TYPE) { } else { var value = step.value; if (IS_TO_ARRAY) { - push$1.call(array, value); + push$2.call(array, value); loop(); } else { Promise$2.resolve(fn(value)).then(function (result) { if (IS_FOR_EACH) { loop(); } else if (IS_EVERY) { - result ? loop() : resolve(false); + result ? loop() : closeIteration(resolve, false); } else { - result ? resolve(IS_SOME || value) : loop(); + result ? closeIteration(resolve, IS_SOME || value) : loop(); } - }, reject); + }, onError); } } - } catch (err) { reject(err); } - }, reject); - } catch (error) { reject(error); } + } catch (error) { onError(error); } + }, onError); + } catch (error2) { onError(error2); } }; loop(); @@ -10908,11 +11258,20 @@ _export({ target: 'AsyncIterator', proto: true, real: true }, { -var AsyncIteratorProxy$6 = asyncIteratorCreateProxy(function (arg) { +var AsyncIteratorProxy$6 = asyncIteratorCreateProxy(function (arg, Promise) { + var iterator = this.iterator; + var returnMethod, result; if (!this.remaining--) { + result = { done: true, value: undefined }; this.done = true; - return { done: true, value: undefined }; - } return this.next.call(this.iterator, arg); + returnMethod = iterator['return']; + if (returnMethod !== undefined) { + return Promise.resolve(returnMethod.call(iterator)).then(function () { + return result; + }); + } + return result; + } return this.next.call(iterator, arg); }); _export({ target: 'AsyncIterator', proto: true, real: true }, { @@ -10948,10 +11307,10 @@ var IteratorPrototype$3 = iteratorsCore.IteratorPrototype; var ITERATOR$8 = wellKnownSymbol('iterator'); var TO_STRING_TAG$6 = wellKnownSymbol('toStringTag'); -var NativeIterator = global_1.Iterator; +var NativeIterator = global$1.Iterator; // FF56- have non-standard global helper `Iterator` -var FORCED$l = typeof NativeIterator != 'function' +var FORCED$m = typeof NativeIterator != 'function' || NativeIterator.prototype !== IteratorPrototype$3 // FF44- non-standard `Iterator` passes previous tests || !fails(function () { NativeIterator({}); }); @@ -10964,29 +11323,29 @@ if (!has(IteratorPrototype$3, TO_STRING_TAG$6)) { createNonEnumerableProperty(IteratorPrototype$3, TO_STRING_TAG$6, 'Iterator'); } -if (FORCED$l || !has(IteratorPrototype$3, 'constructor') || IteratorPrototype$3.constructor === Object) { +if (FORCED$m || !has(IteratorPrototype$3, 'constructor') || IteratorPrototype$3.constructor === Object) { createNonEnumerableProperty(IteratorPrototype$3, 'constructor', IteratorConstructor); } IteratorConstructor.prototype = IteratorPrototype$3; -_export({ global: true, forced: FORCED$l }, { +_export({ global: true, forced: FORCED$m }, { Iterator: IteratorConstructor }); -var setInternalState$g = internalState.set; -var getInternalState$c = internalState.get; +var setInternalState$h = internalState.set; +var getInternalState$d = internalState.get; var TO_STRING_TAG$7 = wellKnownSymbol('toStringTag'); var $return$1 = function (value) { - var iterator = getInternalState$c(this).iterator; + var iterator = getInternalState$d(this).iterator; var $$return = iterator['return']; return $$return === undefined ? { done: true, value: value } : anObject($$return.call(iterator, value)); }; var $throw$1 = function (value) { - var iterator = getInternalState$c(this).iterator; + var iterator = getInternalState$d(this).iterator; var $$throw = iterator['throw']; if ($$throw === undefined) throw value; return $$throw.call(iterator, value); @@ -10996,12 +11355,12 @@ var iteratorCreateProxy = function (nextHandler, IS_ITERATOR) { var IteratorProxy = function Iterator(state) { state.next = aFunction$1(state.iterator.next); state.done = false; - setInternalState$g(this, state); + setInternalState$h(this, state); }; IteratorProxy.prototype = redefineAll(objectCreate(path.Iterator.prototype), { next: function next() { - var state = getInternalState$c(this); + var state = getInternalState$d(this); var result = state.done ? undefined : nextHandler.apply(state, arguments); return { done: state.done, value: result }; }, @@ -11076,9 +11435,9 @@ _export({ target: 'Iterator', proto: true, real: true }, { every: function every(fn) { anObject(this); aFunction$1(fn); - return !iterate_1(this, function (value) { - if (!fn(value)) return iterate_1.stop(); - }, undefined, false, true).stopped; + return !iterate(this, function (value, stop) { + if (!fn(value)) return stop(); + }, { IS_ITERATOR: true, INTERRUPTED: true }).stopped; } }); @@ -11122,9 +11481,9 @@ _export({ target: 'Iterator', proto: true, real: true }, { find: function find(fn) { anObject(this); aFunction$1(fn); - return iterate_1(this, function (value) { - if (fn(value)) return iterate_1.stop(value); - }, undefined, false, true).result; + return iterate(this, function (value, stop) { + if (fn(value)) return stop(value); + }, { IS_ITERATOR: true, INTERRUPTED: true }).result; } }); @@ -11138,28 +11497,34 @@ _export({ target: 'Iterator', proto: true, real: true }, { var IteratorProxy$3 = iteratorCreateProxy(function (arg) { var iterator = this.iterator; + var mapper = this.mapper; var result, mapped, iteratorMethod, innerIterator; while (true) { - if (innerIterator = this.innerIterator) { - result = anObject(this.innerNext.call(innerIterator)); - if (!result.done) return result.value; - this.innerIterator = this.innerNext = null; - } + try { + if (innerIterator = this.innerIterator) { + result = anObject(this.innerNext.call(innerIterator)); + if (!result.done) return result.value; + this.innerIterator = this.innerNext = null; + } - result = anObject(this.next.call(iterator, arg)); + result = anObject(this.next.call(iterator, arg)); - if (this.done = !!result.done) return; + if (this.done = !!result.done) return; - mapped = callWithSafeIterationClosing(iterator, this.mapper, result.value); - iteratorMethod = getIteratorMethod(mapped); + mapped = mapper(result.value); + iteratorMethod = getIteratorMethod(mapped); - if (iteratorMethod === undefined) { - throw TypeError('.flatMap callback should return an iterable object'); - } + if (iteratorMethod === undefined) { + throw TypeError('.flatMap callback should return an iterable object'); + } - this.innerIterator = innerIterator = anObject(iteratorMethod.call(mapped)); - this.innerNext = aFunction$1(innerIterator.next); + this.innerIterator = innerIterator = anObject(iteratorMethod.call(mapped)); + this.innerNext = aFunction$1(innerIterator.next); + } catch (error) { + iteratorClose(iterator); + throw error; + } } }); @@ -11181,7 +11546,7 @@ _export({ target: 'Iterator', proto: true, real: true }, { _export({ target: 'Iterator', proto: true, real: true }, { forEach: function forEach(fn) { - iterate_1(anObject(this), fn, undefined, false, true); + iterate(anObject(this), fn, { IS_ITERATOR: true }); } }); @@ -11253,14 +11618,14 @@ _export({ target: 'Iterator', proto: true, real: true }, { aFunction$1(reducer); var noInitial = arguments.length < 2; var accumulator = noInitial ? undefined : arguments[1]; - iterate_1(this, function (value) { + iterate(this, function (value) { if (noInitial) { noInitial = false; accumulator = value; } else { accumulator = reducer(accumulator, value); } - }, undefined, false, true); + }, { IS_ITERATOR: true }); if (noInitial) throw TypeError('Reduce of empty iterator with no initial value'); return accumulator; } @@ -11276,9 +11641,9 @@ _export({ target: 'Iterator', proto: true, real: true }, { some: function some(fn) { anObject(this); aFunction$1(fn); - return iterate_1(this, function (value) { - if (fn(value)) return iterate_1.stop(); - }, undefined, false, true).stopped; + return iterate(this, function (value, stop) { + if (fn(value)) return stop(); + }, { IS_ITERATOR: true, INTERRUPTED: true }).stopped; } }); @@ -11288,12 +11653,14 @@ _export({ target: 'Iterator', proto: true, real: true }, { + var IteratorProxy$6 = iteratorCreateProxy(function (arg) { + var iterator = this.iterator; if (!this.remaining--) { this.done = true; - return; + return iteratorClose(iterator); } - var result = anObject(this.next.call(this.iterator, arg)); + var result = anObject(this.next.call(iterator, arg)); var done = this.done = !!result.done; if (!done) return result.value; }); @@ -11312,16 +11679,33 @@ _export({ target: 'Iterator', proto: true, real: true }, { -var push$2 = [].push; +var push$3 = [].push; _export({ target: 'Iterator', proto: true, real: true }, { toArray: function toArray() { var result = []; - iterate_1(anObject(this), push$2, result, false, true); + iterate(anObject(this), push$3, { that: result, IS_ITERATOR: true }); return result; } }); +// `Map.prototype.emplace` method +// https://github.com/thumbsupep/proposal-upsert +var mapEmplace = function emplace(key, handler) { + var map = anObject(this); + var value = (map.has(key) && 'update' in handler) + ? handler.update(map.get(key), key, map) + : handler.insert(key, map); + map.set(key, value); + return value; +}; + +// `Map.prototype.emplace` method +// https://github.com/thumbsupep/proposal-upsert +_export({ target: 'Map', proto: true, real: true, forced: isPure }, { + emplace: mapEmplace +}); + // `Map.prototype.upsert` method // https://github.com/thumbsupep/proposal-upsert var mapUpsert = function upsert(key, updateFn /* , insertFn */) { @@ -11348,20 +11732,36 @@ var mapUpsert = function upsert(key, updateFn /* , insertFn */) { -// `Map.prototype.updateOrInsert` method (replaced by `Map.prototype.upsert`) +// `Map.prototype.updateOrInsert` method (replaced by `Map.prototype.emplace`) // https://github.com/thumbsupep/proposal-upsert _export({ target: 'Map', proto: true, real: true, forced: isPure }, { updateOrInsert: mapUpsert }); -// `Map.prototype.upsert` method +// TODO: remove from `core-js@4` + + + + +// `Map.prototype.upsert` method (replaced by `Map.prototype.emplace`) // https://github.com/thumbsupep/proposal-upsert _export({ target: 'Map', proto: true, real: true, forced: isPure }, { upsert: mapUpsert }); -// `WeakMap.prototype.upsert` method -// https://github.com/thumbsupep/proposal-upsert +// `WeakMap.prototype.emplace` method +// https://github.com/tc39/proposal-upsert +_export({ target: 'WeakMap', proto: true, real: true, forced: isPure }, { + emplace: mapEmplace +}); + +// TODO: remove from `core-js@4` + + + + +// `WeakMap.prototype.upsert` method (replaced by `WeakMap.prototype.emplace`) +// https://github.com/tc39/proposal-upsert _export({ target: 'WeakMap', proto: true, real: true, forced: isPure }, { upsert: mapUpsert }); @@ -11373,7 +11773,7 @@ _export({ target: 'Set', proto: true, real: true, forced: isPure }, { var set = anObject(this); var newSet = new (speciesConstructor(set, getBuiltIn('Set')))(set); var remover = aFunction$1(newSet['delete']); - iterate_1(iterable, function (value) { + iterate(iterable, function (value) { remover.call(newSet, value); }); return newSet; @@ -11388,7 +11788,7 @@ _export({ target: 'Set', proto: true, real: true, forced: isPure }, { var newSet = new (speciesConstructor(set, getBuiltIn('Set')))(); var hasCheck = aFunction$1(set.has); var adder = aFunction$1(newSet.add); - iterate_1(iterable, function (value) { + iterate(iterable, function (value) { if (hasCheck.call(set, value)) adder.call(newSet, value); }); return newSet; @@ -11401,9 +11801,9 @@ _export({ target: 'Set', proto: true, real: true, forced: isPure }, { isDisjointFrom: function isDisjointFrom(iterable) { var set = anObject(this); var hasCheck = aFunction$1(set.has); - return !iterate_1(iterable, function (value) { - if (hasCheck.call(set, value) === true) return iterate_1.stop(); - }).stopped; + return !iterate(iterable, function (value, stop) { + if (hasCheck.call(set, value) === true) return stop(); + }, { INTERRUPTED: true }).stopped; } }); @@ -11418,9 +11818,9 @@ _export({ target: 'Set', proto: true, real: true, forced: isPure }, { otherSet = new (getBuiltIn('Set'))(iterable); hasCheck = aFunction$1(otherSet.has); } - return !iterate_1(iterator, function (value) { - if (hasCheck.call(otherSet, value) === false) return iterate_1.stop(); - }, undefined, false, true).stopped; + return !iterate(iterator, function (value, stop) { + if (hasCheck.call(otherSet, value) === false) return stop(); + }, { IS_ITERATOR: true, INTERRUPTED: true }).stopped; } }); @@ -11430,9 +11830,9 @@ _export({ target: 'Set', proto: true, real: true, forced: isPure }, { isSupersetOf: function isSupersetOf(iterable) { var set = anObject(this); var hasCheck = aFunction$1(set.has); - return !iterate_1(iterable, function (value) { - if (hasCheck.call(set, value) === false) return iterate_1.stop(); - }).stopped; + return !iterate(iterable, function (value, stop) { + if (hasCheck.call(set, value) === false) return stop(); + }, { INTERRUPTED: true }).stopped; } }); @@ -11442,7 +11842,7 @@ _export({ target: 'Set', proto: true, real: true, forced: isPure }, { union: function union(iterable) { var set = anObject(this); var newSet = new (speciesConstructor(set, getBuiltIn('Set')))(set); - iterate_1(iterable, aFunction$1(newSet.add), newSet); + iterate(iterable, aFunction$1(newSet.add), { that: newSet }); return newSet; } }); @@ -11455,7 +11855,7 @@ _export({ target: 'Set', proto: true, real: true, forced: isPure }, { var newSet = new (speciesConstructor(set, getBuiltIn('Set')))(set); var remover = aFunction$1(newSet['delete']); var adder = aFunction$1(newSet.add); - iterate_1(iterable, function (value) { + iterate(iterable, function (value) { remover.call(newSet, value) || adder.call(newSet, value); }); return newSet; @@ -11470,118 +11870,31 @@ defineWellKnownSymbol('asyncDispose'); // https://github.com/tc39/proposal-using-statement defineWellKnownSymbol('dispose'); -var setInternalState$h = internalState.set; -var getInternalAggregateErrorState = internalState.getterFor('AggregateError'); - -var $AggregateError = function AggregateError(errors, message) { - var that = this; - if (!(that instanceof $AggregateError)) return new $AggregateError(errors, message); - if (objectSetPrototypeOf) { - that = objectSetPrototypeOf(new Error(message), objectGetPrototypeOf(that)); +// `Array.prototype.at` method +// https://github.com/tc39/proposal-relative-indexing-method +_export({ target: 'Array', proto: true }, { + at: function at(index) { + var O = toObject(this); + var len = toLength(O.length); + var relativeIndex = toInteger(index); + var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex; + return (k < 0 || k >= len) ? undefined : O[k]; } - var errorsArray = []; - iterate_1(errors, errorsArray.push, errorsArray); - if (descriptors) setInternalState$h(that, { errors: errorsArray, type: 'AggregateError' }); - else that.errors = errorsArray; - if (message !== undefined) createNonEnumerableProperty(that, 'message', String(message)); - return that; -}; - -$AggregateError.prototype = objectCreate(Error.prototype, { - constructor: createPropertyDescriptor(5, $AggregateError), - message: createPropertyDescriptor(5, ''), - name: createPropertyDescriptor(5, 'AggregateError') -}); - -if (descriptors) objectDefineProperty.f($AggregateError.prototype, 'errors', { - get: function () { - return getInternalAggregateErrorState(this).errors; - }, - configurable: true -}); - -_export({ global: true }, { - AggregateError: $AggregateError }); -var PROMISE_ANY_ERROR = 'No one promise resolved'; - -// `Promise.any` method -// https://github.com/tc39/proposal-promise-any -_export({ target: 'Promise', stat: true }, { - any: function any(iterable) { - var C = this; - var capability = newPromiseCapability.f(C); - var resolve = capability.resolve; - var reject = capability.reject; - var result = perform(function () { - var promiseResolve = aFunction$1(C.resolve); - var errors = []; - var counter = 0; - var remaining = 1; - var alreadyResolved = false; - iterate_1(iterable, function (promise) { - var index = counter++; - var alreadyRejected = false; - errors.push(undefined); - remaining++; - promiseResolve.call(C, promise).then(function (value) { - if (alreadyRejected || alreadyResolved) return; - alreadyResolved = true; - resolve(value); - }, function (e) { - if (alreadyRejected || alreadyResolved) return; - alreadyRejected = true; - errors[index] = e; - --remaining || reject(new (getBuiltIn('AggregateError'))(errors, PROMISE_ANY_ERROR)); - }); - }); - --remaining || reject(new (getBuiltIn('AggregateError'))(errors, PROMISE_ANY_ERROR)); - }); - if (result.error) reject(result.value); - return capability.promise; - } -}); +addToUnscopables('at'); -var REPLACE$1 = wellKnownSymbol('replace'); -var RegExpPrototype$4 = RegExp.prototype; +var aTypedArray$o = arrayBufferViewCore.aTypedArray; +var exportTypedArrayMethod$p = arrayBufferViewCore.exportTypedArrayMethod; -// `String.prototype.replaceAll` method -// https://github.com/tc39/proposal-string-replace-all -_export({ target: 'String', proto: true }, { - replaceAll: function replaceAll(searchValue, replaceValue) { - var O = requireObjectCoercible(this); - var IS_REG_EXP, flags, replacer, string, searchString, template, result, position, index; - if (searchValue != null) { - IS_REG_EXP = isRegexp(searchValue); - if (IS_REG_EXP) { - flags = String(requireObjectCoercible('flags' in RegExpPrototype$4 - ? searchValue.flags - : regexpFlags.call(searchValue) - )); - if (!~flags.indexOf('g')) throw TypeError('`.replaceAll` does not allow non-global regexes'); - } - replacer = searchValue[REPLACE$1]; - if (replacer !== undefined) { - return replacer.call(searchValue, O, replaceValue); - } - } - string = String(O); - searchString = String(searchValue); - if (searchString === '') return replaceAll.call(string, /(?:)/g, replaceValue); - template = string.split(searchString); - if (typeof replaceValue !== 'function') { - return template.join(String(replaceValue)); - } - result = template[0]; - position = result.length; - for (index = 1; index < template.length; index++) { - result += String(replaceValue(searchString, position, string)); - position += searchString.length + template[index].length; - result += template[index]; - } - return result; - } +// `%TypedArray%.prototype.at` method +// https://github.com/tc39/proposal-relative-indexing-method +exportTypedArrayMethod$p('at', function at(index) { + var O = aTypedArray$o(this); + var len = toLength(O.length); + var relativeIndex = toInteger(index); + var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex; + return (k < 0 || k >= len) ? undefined : O[k]; }); // TODO: remove from `core-js@4` @@ -11626,7 +11939,7 @@ var domIterables = { }; for (var COLLECTION_NAME in domIterables) { - var Collection = global_1[COLLECTION_NAME]; + var Collection = global$1[COLLECTION_NAME]; var CollectionPrototype = Collection && Collection.prototype; // some Chrome versions have non-configurable methods on DOMTokenList if (CollectionPrototype && CollectionPrototype.forEach !== arrayForEach) try { @@ -11641,7 +11954,7 @@ var TO_STRING_TAG$8 = wellKnownSymbol('toStringTag'); var ArrayValues = es_array_iterator.values; for (var COLLECTION_NAME$1 in domIterables) { - var Collection$1 = global_1[COLLECTION_NAME$1]; + var Collection$1 = global$1[COLLECTION_NAME$1]; var CollectionPrototype$1 = Collection$1 && Collection$1.prototype; if (CollectionPrototype$1) { // some Chrome versions have non-configurable methods on DOMTokenList @@ -11664,10 +11977,10 @@ for (var COLLECTION_NAME$1 in domIterables) { } } -var FORCED$m = !global_1.setImmediate || !global_1.clearImmediate; +var FORCED$n = !global$1.setImmediate || !global$1.clearImmediate; // http://w3c.github.io/setImmediate/ -_export({ global: true, bind: true, enumerable: true, forced: FORCED$m }, { +_export({ global: true, bind: true, enumerable: true, forced: FORCED$n }, { // `setImmediate` method // http://w3c.github.io/setImmediate/#si-setImmediate setImmediate: task.set, @@ -11676,14 +11989,13 @@ _export({ global: true, bind: true, enumerable: true, forced: FORCED$m }, { clearImmediate: task.clear }); -var process$4 = global_1.process; -var isNode = classofRaw(process$4) == 'process'; +var process$4 = global$1.process; // `queueMicrotask` method // https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-queuemicrotask _export({ global: true, enumerable: true, noTargetGet: true }, { queueMicrotask: function queueMicrotask(fn) { - var domain = isNode && process$4.domain; + var domain = engineIsNode && process$4.domain; microtask(domain ? domain.bind(fn) : fn); } }); @@ -11707,8 +12019,8 @@ var wrap$1 = function (scheduler) { _export({ global: true, bind: true, forced: MSIE }, { // `setTimeout` method // https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-settimeout - setTimeout: wrap$1(global_1.setTimeout), + setTimeout: wrap$1(global$1.setTimeout), // `setInterval` method // https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-setinterval - setInterval: wrap$1(global_1.setInterval) + setInterval: wrap$1(global$1.setInterval) }); diff --git a/test/form/samples/supports-es5-shim/_expected.js b/test/form/samples/supports-es5-shim/_expected.js index 0c929f6010f..669b1265ad9 100644 --- a/test/form/samples/supports-es5-shim/_expected.js +++ b/test/form/samples/supports-es5-shim/_expected.js @@ -1,18 +1,15 @@ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; -function createCommonjsModule(fn, basedir, module) { - return module = { - path: basedir, - exports: {}, - require: function (path, base) { - return commonjsRequire(path, (base === undefined || base === null) ? module.path : base); - } - }, fn(module, module.exports), module.exports; +function createCommonjsModule(fn) { + var module = { exports: {} }; + return fn(module, module.exports), module.exports; } -function commonjsRequire () { - throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs'); -} +/*! + * https://github.com/es-shims/es5-shim + * @license es5-shim Copyright 2009-2020 by contributors, MIT License + * see https://github.com/es-shims/es5-shim/blob/master/LICENSE + */ var es5Shim = createCommonjsModule(function (module, exports) { diff --git a/test/form/samples/supports-es6-shim/_expected.js b/test/form/samples/supports-es6-shim/_expected.js index 4c698361001..95b40e15bd4 100644 --- a/test/form/samples/supports-es6-shim/_expected.js +++ b/test/form/samples/supports-es6-shim/_expected.js @@ -1,20 +1,10 @@ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; -function createCommonjsModule(fn, basedir, module) { - return module = { - path: basedir, - exports: {}, - require: function (path, base) { - return commonjsRequire(path, (base === undefined || base === null) ? module.path : base); - } - }, fn(module, module.exports), module.exports; +function createCommonjsModule(fn) { + var module = { exports: {} }; + return fn(module, module.exports), module.exports; } -function commonjsRequire () { - throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs'); -} - -var es6Shim = createCommonjsModule(function (module, exports) { /*! * https://github.com/paulmillr/es6-shim * @license es6-shim Copyright 2013-2016 by Paul Miller (http://paulmillr.com) @@ -25,10 +15,11 @@ var es6Shim = createCommonjsModule(function (module, exports) { * https://github.com/paulmillr/es6-shim/ */ +var es6Shim = createCommonjsModule(function (module, exports) { // UMD (Universal Module Definition) // see https://github.com/umdjs/umd/blob/master/returnExports.js (function (root, factory) { - /*global define, module, exports */ + /*global define */ { // Node. Does not work with strict CommonJS, but // only CommonJS-like environments that support module.exports, @@ -184,7 +175,7 @@ var es6Shim = createCommonjsModule(function (module, exports) { }; var getGlobal = function () { - /* global self, window, global */ + /* global self, window */ // the only reliable means to get the global object is // `Function('return this')()` // However, this causes CSP violations in Chrome apps. @@ -203,6 +194,7 @@ var es6Shim = createCommonjsModule(function (module, exports) { var _strSlice = Function.call.bind(String.prototype.slice); var _push = Function.call.bind(Array.prototype.push); var _pushApply = Function.apply.bind(Array.prototype.push); + var _join = Function.call.bind(Array.prototype.join); var _shift = Function.call.bind(Array.prototype.shift); var _max = Math.max; var _min = Math.min; @@ -365,7 +357,7 @@ var es6Shim = createCommonjsModule(function (module, exports) { }, ToNumber: function (value) { - if (_toString(value) === '[object Symbol]') { + if (hasSymbols && _toString(value) === '[object Symbol]') { throw new TypeError('Cannot convert a Symbol value to a number'); } return +value; @@ -536,6 +528,9 @@ var es6Shim = createCommonjsModule(function (module, exports) { }, ToString: function ToString(string) { + if (hasSymbols && _toString(string) === '[object Symbol]') { + throw new TypeError('Cannot convert a Symbol value to a number'); + } return $String(string); } }; @@ -751,26 +746,26 @@ var es6Shim = createCommonjsModule(function (module, exports) { _push(result, String.fromCharCode((next % 0x400) + 0xDC00)); } } - return result.join(''); + return _join(result, ''); }, - raw: function raw(callSite) { - var cooked = ES.ToObject(callSite, 'bad callSite'); - var rawString = ES.ToObject(cooked.raw, 'bad raw value'); - var len = rawString.length; - var literalsegments = ES.ToLength(len); - if (literalsegments <= 0) { + raw: function raw(template) { + var cooked = ES.ToObject(template, 'bad template'); + var raw = ES.ToObject(cooked.raw, 'bad raw value'); + var len = raw.length; + var literalSegments = ES.ToLength(len); + if (literalSegments <= 0) { return ''; } var stringElements = []; var nextIndex = 0; var nextKey, next, nextSeg, nextSub; - while (nextIndex < literalsegments) { + while (nextIndex < literalSegments) { nextKey = ES.ToString(nextIndex); - nextSeg = ES.ToString(rawString[nextKey]); + nextSeg = ES.ToString(raw[nextKey]); _push(stringElements, nextSeg); - if (nextIndex + 1 >= literalsegments) { + if (nextIndex + 1 >= literalSegments) { break; } next = nextIndex + 1 < arguments.length ? arguments[nextIndex + 1] : ''; @@ -778,7 +773,7 @@ var es6Shim = createCommonjsModule(function (module, exports) { _push(stringElements, nextSub); nextIndex += 1; } - return stringElements.join(''); + return _join(stringElements, ''); } }; if (String.raw && String.raw({ raw: { 0: 'x', 1: 'y', length: 2 } }) !== 'xy') { @@ -1062,7 +1057,8 @@ var es6Shim = createCommonjsModule(function (module, exports) { } if (typeof array !== 'undefined') { var len = ES.ToLength(array.length); - for (; i < len; i++) { + if (i < len) { + //for (; i < len; i++) { var kind = this.kind; var retval; if (kind === 'key') { @@ -1377,7 +1373,7 @@ var es6Shim = createCommonjsModule(function (module, exports) { // Note that in IE 8, RegExp.prototype.test doesn't seem to exist: ie, "test" is an own property of regexes. wtf. var isBinary = binaryRegex.test.bind(binaryRegex); var isOctal = octalRegex.test.bind(octalRegex); - var toPrimitive = function (O) { // need to replace this with `es-to-primitive/es6` + var toPrimitive = function (O, hint) { // need to replace this with `es-to-primitive/es6` var result; if (typeof O.valueOf === 'function') { result = O.valueOf(); @@ -1435,12 +1431,10 @@ var es6Shim = createCommonjsModule(function (module, exports) { NEGATIVE_INFINITY: OrigNumber.NEGATIVE_INFINITY, POSITIVE_INFINITY: OrigNumber.POSITIVE_INFINITY }); - /* globals Number: true */ /* eslint-disable no-undef, no-global-assign */ Number = NumberShim; Value.redefine(globals, 'Number', NumberShim); /* eslint-enable no-undef, no-global-assign */ - /* globals Number: false */ } var maxSafeInteger = Math.pow(2, 53) - 1; @@ -1839,12 +1833,10 @@ var es6Shim = createCommonjsModule(function (module, exports) { wrapConstructor(OrigRegExp, RegExpShim, { $input: true // Chrome < v39 & Opera < 26 have a nonstandard "$input" property }); - /* globals RegExp: true */ /* eslint-disable no-undef, no-global-assign */ RegExp = RegExpShim; Value.redefine(globals, 'RegExp', RegExpShim); /* eslint-enable no-undef, no-global-assign */ - /* globals RegExp: false */ } if (supportsDescriptors) { @@ -2098,6 +2090,8 @@ var es6Shim = createCommonjsModule(function (module, exports) { // FF 35 on Linux reports 22025.465794806725 for Math.expm1(10) var expm1OfTen = Math.expm1(10); defineProperty(Math, 'expm1', MathShims.expm1, expm1OfTen > 22025.465794806719 || expm1OfTen < 22025.4657948067165168); + // node v12.11 - v12.15 report NaN + defineProperty(Math, 'hypot', MathShims.hypot, Math.hypot(Infinity, NaN) !== Infinity); var origMathRound = Math.round; // breaks in e.g. Safari 8, Internet Explorer 11, Opera 12 @@ -2180,7 +2174,6 @@ var es6Shim = createCommonjsModule(function (module, exports) { // find an appropriate setImmediate-alike var makeZeroTimeout; - /*global window */ if (typeof window !== 'undefined' && ES.IsCallable(window.postMessage)) { makeZeroTimeout = function () { // from http://dbaron.org/log/20100309-faster-timeouts @@ -2213,7 +2206,6 @@ var es6Shim = createCommonjsModule(function (module, exports) { return pr.then(task); }; }; - /*global process */ var enqueue = ES.IsCallable(globals.setImmediate) ? globals.setImmediate : typeof process === 'object' && process.nextTick ? process.nextTick : makePromiseAsap() || @@ -2697,7 +2689,6 @@ var es6Shim = createCommonjsModule(function (module, exports) { /* eslint-disable no-undef, no-global-assign */ Promise = PromiseShim; /* eslint-enable no-undef, no-global-assign */ - /* globals Promise: false */ overrideNative(globals, 'Promise', PromiseShim); } if (Promise.all.length !== 1) {