diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ba88604..155d7c4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,6 +36,7 @@ jobs: uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} + - run: yarn install - run: yarn test run-depcheck: @@ -46,7 +47,7 @@ jobs: uses: actions/setup-node@v1 with: node-version: 14.x - - run: yarn pnpify depcheck + - run: yarn depcheck run-pre-commits: runs-on: ubuntu-latest diff --git a/.pnp.cjs b/.pnp.cjs index 0d6c06a..30e5770 100755 --- a/.pnp.cjs +++ b/.pnp.cjs @@ -1,11 +1,6 @@ #!/usr/bin/env node /* eslint-disable */ - -try { - Object.freeze({}).detectStrictMode = true; -} catch (error) { - throw new Error(`The whole PnP file got strict-mode-ified, which is known to break (Emscripten libraries aren't strict mode). This usually happens when the file goes through Babel.`); -} +"use strict"; function $$SETUP_STATE(hydrateRuntimeState, basePath) { return hydrateRuntimeState(JSON.parse('{\ @@ -33,13 +28,16 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { [null, {\ "packageLocation": "./",\ "packageDependencies": [\ - ["@types/chai", "npm:4.3.0"],\ - ["@types/mocha", "npm:9.1.0"],\ + ["@transcend-io/type-utils", "npm:1.1.1"],\ + ["@types/chai", "npm:4.3.8"],\ + ["@types/lodash", "npm:4.14.199"],\ + ["@types/mocha", "npm:10.0.2"],\ + ["@types/pluralize", "npm:0.0.31"],\ ["@typescript-eslint/eslint-plugin", "virtual:b0b673485cd8bf8bfb5d77c8832044ea9a359f69e531c744fd499cdb614a5dbfc2cf264b269d28c6ec99b30a5f6712df8f9d9008403ee41c1d5ad0d930110b1d#npm:5.12.1"],\ ["@typescript-eslint/parser", "virtual:b0b673485cd8bf8bfb5d77c8832044ea9a359f69e531c744fd499cdb614a5dbfc2cf264b269d28c6ec99b30a5f6712df8f9d9008403ee41c1d5ad0d930110b1d#npm:5.12.1"],\ - ["@yarnpkg/pnpify", "npm:3.1.1"],\ - ["@yarnpkg/sdks", "npm:2.6.0"],\ + ["@yarnpkg/sdks", "npm:3.0.0-rc.53"],\ ["chai", "npm:4.3.6"],\ + ["change-case", "npm:4.1.2"],\ ["depcheck", "npm:1.4.3"],\ ["eslint", "npm:8.10.0"],\ ["eslint-config-airbnb-base", "virtual:b0b673485cd8bf8bfb5d77c8832044ea9a359f69e531c744fd499cdb614a5dbfc2cf264b269d28c6ec99b30a5f6712df8f9d9008403ee41c1d5ad0d930110b1d#npm:15.0.0"],\ @@ -47,10 +45,13 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["eslint-plugin-eslint-comments", "virtual:b0b673485cd8bf8bfb5d77c8832044ea9a359f69e531c744fd499cdb614a5dbfc2cf264b269d28c6ec99b30a5f6712df8f9d9008403ee41c1d5ad0d930110b1d#npm:3.2.0"],\ ["eslint-plugin-import", "virtual:b0b673485cd8bf8bfb5d77c8832044ea9a359f69e531c744fd499cdb614a5dbfc2cf264b269d28c6ec99b30a5f6712df8f9d9008403ee41c1d5ad0d930110b1d#npm:2.25.4"],\ ["eslint-plugin-jsdoc", "virtual:b0b673485cd8bf8bfb5d77c8832044ea9a359f69e531c744fd499cdb614a5dbfc2cf264b269d28c6ec99b30a5f6712df8f9d9008403ee41c1d5ad0d930110b1d#npm:37.9.4"],\ - ["mocha", "npm:9.2.1"],\ + ["handlebars", "npm:4.7.8"],\ + ["lodash", "npm:4.17.21"],\ + ["mocha", "npm:10.2.0"],\ + ["pluralize", "npm:8.0.0"],\ ["prettier", "npm:2.5.1"],\ - ["ts-node", "virtual:b0b673485cd8bf8bfb5d77c8832044ea9a359f69e531c744fd499cdb614a5dbfc2cf264b269d28c6ec99b30a5f6712df8f9d9008403ee41c1d5ad0d930110b1d#npm:10.5.0"],\ - ["typescript", "patch:typescript@npm%3A4.5.5#~builtin::version=4.5.5&hash=bda367"]\ + ["ts-node", "virtual:b0b673485cd8bf8bfb5d77c8832044ea9a359f69e531c744fd499cdb614a5dbfc2cf264b269d28c6ec99b30a5f6712df8f9d9008403ee41c1d5ad0d930110b1d#npm:10.9.1"],\ + ["typescript", "patch:typescript@npm%3A5.0.4#~builtin::version=5.0.4&hash=85af82"]\ ],\ "linkType": "SOFT"\ }]\ @@ -209,39 +210,12 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ - ["@chevrotain/types", [\ - ["npm:9.1.0", {\ - "packageLocation": "./.yarn/cache/@chevrotain-types-npm-9.1.0-80ac254cc2-5f26ff26aa.zip/node_modules/@chevrotain/types/",\ - "packageDependencies": [\ - ["@chevrotain/types", "npm:9.1.0"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ - ["@chevrotain/utils", [\ - ["npm:9.1.0", {\ - "packageLocation": "./.yarn/cache/@chevrotain-utils-npm-9.1.0-5e5d6d7acc-ca78c97c7c.zip/node_modules/@chevrotain/utils/",\ - "packageDependencies": [\ - ["@chevrotain/utils", "npm:9.1.0"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ - ["@cspotcode/source-map-consumer", [\ - ["npm:0.8.0", {\ - "packageLocation": "./.yarn/cache/@cspotcode-source-map-consumer-npm-0.8.0-1f37e9e72b-c0c16ca3d2.zip/node_modules/@cspotcode/source-map-consumer/",\ - "packageDependencies": [\ - ["@cspotcode/source-map-consumer", "npm:0.8.0"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ ["@cspotcode/source-map-support", [\ - ["npm:0.7.0", {\ - "packageLocation": "./.yarn/cache/@cspotcode-source-map-support-npm-0.7.0-456c3ea2ce-9faddda775.zip/node_modules/@cspotcode/source-map-support/",\ + ["npm:0.8.1", {\ + "packageLocation": "./.yarn/cache/@cspotcode-source-map-support-npm-0.8.1-964f2de99d-5718f26708.zip/node_modules/@cspotcode/source-map-support/",\ "packageDependencies": [\ - ["@cspotcode/source-map-support", "npm:0.7.0"],\ - ["@cspotcode/source-map-consumer", "npm:0.8.0"]\ + ["@cspotcode/source-map-support", "npm:0.8.1"],\ + ["@jridgewell/trace-mapping", "npm:0.3.9"]\ ],\ "linkType": "HARD"\ }]\ @@ -306,6 +280,35 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ + ["@jridgewell/resolve-uri", [\ + ["npm:3.1.1", {\ + "packageLocation": "./.yarn/cache/@jridgewell-resolve-uri-npm-3.1.1-aa2de3f210-f5b441fe79.zip/node_modules/@jridgewell/resolve-uri/",\ + "packageDependencies": [\ + ["@jridgewell/resolve-uri", "npm:3.1.1"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ + ["@jridgewell/sourcemap-codec", [\ + ["npm:1.4.15", {\ + "packageLocation": "./.yarn/cache/@jridgewell-sourcemap-codec-npm-1.4.15-a055fb62cf-b881c7e503.zip/node_modules/@jridgewell/sourcemap-codec/",\ + "packageDependencies": [\ + ["@jridgewell/sourcemap-codec", "npm:1.4.15"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ + ["@jridgewell/trace-mapping", [\ + ["npm:0.3.9", {\ + "packageLocation": "./.yarn/cache/@jridgewell-trace-mapping-npm-0.3.9-91625cd7fb-d89597752f.zip/node_modules/@jridgewell/trace-mapping/",\ + "packageDependencies": [\ + ["@jridgewell/trace-mapping", "npm:0.3.9"],\ + ["@jridgewell/resolve-uri", "npm:3.1.1"],\ + ["@jridgewell/sourcemap-codec", "npm:1.4.15"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["@nodelib/fs.scandir", [\ ["npm:2.1.5", {\ "packageLocation": "./.yarn/cache/@nodelib-fs.scandir-npm-2.1.5-89c67370dd-a970d595bd.zip/node_modules/@nodelib/fs.scandir/",\ @@ -392,13 +395,16 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageLocation": "./",\ "packageDependencies": [\ ["@transcend-io/handlebars-utils", "workspace:."],\ - ["@types/chai", "npm:4.3.0"],\ - ["@types/mocha", "npm:9.1.0"],\ + ["@transcend-io/type-utils", "npm:1.1.1"],\ + ["@types/chai", "npm:4.3.8"],\ + ["@types/lodash", "npm:4.14.199"],\ + ["@types/mocha", "npm:10.0.2"],\ + ["@types/pluralize", "npm:0.0.31"],\ ["@typescript-eslint/eslint-plugin", "virtual:b0b673485cd8bf8bfb5d77c8832044ea9a359f69e531c744fd499cdb614a5dbfc2cf264b269d28c6ec99b30a5f6712df8f9d9008403ee41c1d5ad0d930110b1d#npm:5.12.1"],\ ["@typescript-eslint/parser", "virtual:b0b673485cd8bf8bfb5d77c8832044ea9a359f69e531c744fd499cdb614a5dbfc2cf264b269d28c6ec99b30a5f6712df8f9d9008403ee41c1d5ad0d930110b1d#npm:5.12.1"],\ - ["@yarnpkg/pnpify", "npm:3.1.1"],\ - ["@yarnpkg/sdks", "npm:2.6.0"],\ + ["@yarnpkg/sdks", "npm:3.0.0-rc.53"],\ ["chai", "npm:4.3.6"],\ + ["change-case", "npm:4.1.2"],\ ["depcheck", "npm:1.4.3"],\ ["eslint", "npm:8.10.0"],\ ["eslint-config-airbnb-base", "virtual:b0b673485cd8bf8bfb5d77c8832044ea9a359f69e531c744fd499cdb614a5dbfc2cf264b269d28c6ec99b30a5f6712df8f9d9008403ee41c1d5ad0d930110b1d#npm:15.0.0"],\ @@ -406,46 +412,60 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["eslint-plugin-eslint-comments", "virtual:b0b673485cd8bf8bfb5d77c8832044ea9a359f69e531c744fd499cdb614a5dbfc2cf264b269d28c6ec99b30a5f6712df8f9d9008403ee41c1d5ad0d930110b1d#npm:3.2.0"],\ ["eslint-plugin-import", "virtual:b0b673485cd8bf8bfb5d77c8832044ea9a359f69e531c744fd499cdb614a5dbfc2cf264b269d28c6ec99b30a5f6712df8f9d9008403ee41c1d5ad0d930110b1d#npm:2.25.4"],\ ["eslint-plugin-jsdoc", "virtual:b0b673485cd8bf8bfb5d77c8832044ea9a359f69e531c744fd499cdb614a5dbfc2cf264b269d28c6ec99b30a5f6712df8f9d9008403ee41c1d5ad0d930110b1d#npm:37.9.4"],\ - ["mocha", "npm:9.2.1"],\ + ["handlebars", "npm:4.7.8"],\ + ["lodash", "npm:4.17.21"],\ + ["mocha", "npm:10.2.0"],\ + ["pluralize", "npm:8.0.0"],\ ["prettier", "npm:2.5.1"],\ - ["ts-node", "virtual:b0b673485cd8bf8bfb5d77c8832044ea9a359f69e531c744fd499cdb614a5dbfc2cf264b269d28c6ec99b30a5f6712df8f9d9008403ee41c1d5ad0d930110b1d#npm:10.5.0"],\ - ["typescript", "patch:typescript@npm%3A4.5.5#~builtin::version=4.5.5&hash=bda367"]\ + ["ts-node", "virtual:b0b673485cd8bf8bfb5d77c8832044ea9a359f69e531c744fd499cdb614a5dbfc2cf264b269d28c6ec99b30a5f6712df8f9d9008403ee41c1d5ad0d930110b1d#npm:10.9.1"],\ + ["typescript", "patch:typescript@npm%3A5.0.4#~builtin::version=5.0.4&hash=85af82"]\ ],\ "linkType": "SOFT"\ }]\ ]],\ + ["@transcend-io/type-utils", [\ + ["npm:1.1.1", {\ + "packageLocation": "./.yarn/cache/@transcend-io-type-utils-npm-1.1.1-27afcd15c0-259cc50823.zip/node_modules/@transcend-io/type-utils/",\ + "packageDependencies": [\ + ["@transcend-io/type-utils", "npm:1.1.1"],\ + ["fp-ts", "npm:2.16.1"],\ + ["io-ts", "virtual:27afcd15c01bf83ed02526605eaa0ee44e5ee82c317c124619b29383347ad3b38d44fe2607b250e54a9be0d55c3fc4da703fefb90144d4cf56f8a9dab8b78d19#npm:2.2.20"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["@tsconfig/node10", [\ - ["npm:1.0.8", {\ - "packageLocation": "./.yarn/cache/@tsconfig-node10-npm-1.0.8-90a8cce25d-b8d5fffbc6.zip/node_modules/@tsconfig/node10/",\ + ["npm:1.0.9", {\ + "packageLocation": "./.yarn/cache/@tsconfig-node10-npm-1.0.9-f2e2d20feb-a33ae4dc2a.zip/node_modules/@tsconfig/node10/",\ "packageDependencies": [\ - ["@tsconfig/node10", "npm:1.0.8"]\ + ["@tsconfig/node10", "npm:1.0.9"]\ ],\ "linkType": "HARD"\ }]\ ]],\ ["@tsconfig/node12", [\ - ["npm:1.0.9", {\ - "packageLocation": "./.yarn/cache/@tsconfig-node12-npm-1.0.9-780563856d-a01b2400ab.zip/node_modules/@tsconfig/node12/",\ + ["npm:1.0.11", {\ + "packageLocation": "./.yarn/cache/@tsconfig-node12-npm-1.0.11-9710d1c61b-5ce29a41b1.zip/node_modules/@tsconfig/node12/",\ "packageDependencies": [\ - ["@tsconfig/node12", "npm:1.0.9"]\ + ["@tsconfig/node12", "npm:1.0.11"]\ ],\ "linkType": "HARD"\ }]\ ]],\ ["@tsconfig/node14", [\ - ["npm:1.0.1", {\ - "packageLocation": "./.yarn/cache/@tsconfig-node14-npm-1.0.1-3ecac58e68-976345e896.zip/node_modules/@tsconfig/node14/",\ + ["npm:1.0.3", {\ + "packageLocation": "./.yarn/cache/@tsconfig-node14-npm-1.0.3-15321421d2-19275fe80c.zip/node_modules/@tsconfig/node14/",\ "packageDependencies": [\ - ["@tsconfig/node14", "npm:1.0.1"]\ + ["@tsconfig/node14", "npm:1.0.3"]\ ],\ "linkType": "HARD"\ }]\ ]],\ ["@tsconfig/node16", [\ - ["npm:1.0.2", {\ - "packageLocation": "./.yarn/cache/@tsconfig-node16-npm-1.0.2-1f43ab567a-ca94d36397.zip/node_modules/@tsconfig/node16/",\ + ["npm:1.0.4", {\ + "packageLocation": "./.yarn/cache/@tsconfig-node16-npm-1.0.4-b7cb87d859-2023197859.zip/node_modules/@tsconfig/node16/",\ "packageDependencies": [\ - ["@tsconfig/node16", "npm:1.0.2"]\ + ["@tsconfig/node16", "npm:1.0.4"]\ ],\ "linkType": "HARD"\ }]\ @@ -464,19 +484,19 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { }]\ ]],\ ["@types/chai", [\ - ["npm:4.3.0", {\ - "packageLocation": "./.yarn/cache/@types-chai-npm-4.3.0-42bcda9bbc-3e393e0942.zip/node_modules/@types/chai/",\ + ["npm:4.3.8", {\ + "packageLocation": "./.yarn/cache/@types-chai-npm-4.3.8-b244550b3d-21431e46fa.zip/node_modules/@types/chai/",\ "packageDependencies": [\ - ["@types/chai", "npm:4.3.0"]\ + ["@types/chai", "npm:4.3.8"]\ ],\ "linkType": "HARD"\ }]\ ]],\ ["@types/emscripten", [\ - ["npm:1.39.5", {\ - "packageLocation": "./.yarn/cache/@types-emscripten-npm-1.39.5-ef4c55ba8e-cb92a99148.zip/node_modules/@types/emscripten/",\ + ["npm:1.39.8", {\ + "packageLocation": "./.yarn/cache/@types-emscripten-npm-1.39.8-b45eeffa86-adccdfcec3.zip/node_modules/@types/emscripten/",\ "packageDependencies": [\ - ["@types/emscripten", "npm:1.39.5"]\ + ["@types/emscripten", "npm:1.39.8"]\ ],\ "linkType": "HARD"\ }]\ @@ -518,6 +538,15 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ + ["@types/lodash", [\ + ["npm:4.14.199", {\ + "packageLocation": "./.yarn/cache/@types-lodash-npm-4.14.199-39fe418e7a-e68d1fcbbf.zip/node_modules/@types/lodash/",\ + "packageDependencies": [\ + ["@types/lodash", "npm:4.14.199"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["@types/minimatch", [\ ["npm:3.0.5", {\ "packageLocation": "./.yarn/cache/@types-minimatch-npm-3.0.5-802bb0797f-c41d136f67.zip/node_modules/@types/minimatch/",\ @@ -528,22 +557,15 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { }]\ ]],\ ["@types/mocha", [\ - ["npm:9.1.0", {\ - "packageLocation": "./.yarn/cache/@types-mocha-npm-9.1.0-8ac56cd8d3-21e1000daf.zip/node_modules/@types/mocha/",\ + ["npm:10.0.2", {\ + "packageLocation": "./.yarn/cache/@types-mocha-npm-10.0.2-d38f8534d9-a78a02691f.zip/node_modules/@types/mocha/",\ "packageDependencies": [\ - ["@types/mocha", "npm:9.1.0"]\ + ["@types/mocha", "npm:10.0.2"]\ ],\ "linkType": "HARD"\ }]\ ]],\ ["@types/node", [\ - ["npm:13.13.52", {\ - "packageLocation": "./.yarn/cache/@types-node-npm-13.13.52-95159539bb-8f1afff497.zip/node_modules/@types/node/",\ - "packageDependencies": [\ - ["@types/node", "npm:13.13.52"]\ - ],\ - "linkType": "HARD"\ - }],\ ["npm:16.11.4", {\ "packageLocation": "./.yarn/cache/@types-node-npm-16.11.4-f4c998d94a-96e08c0f8b.zip/node_modules/@types/node/",\ "packageDependencies": [\ @@ -561,6 +583,15 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ + ["@types/pluralize", [\ + ["npm:0.0.31", {\ + "packageLocation": "./.yarn/cache/@types-pluralize-npm-0.0.31-42e37d038a-950d52d8f6.zip/node_modules/@types/pluralize/",\ + "packageDependencies": [\ + ["@types/pluralize", "npm:0.0.31"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["@types/responselike", [\ ["npm:1.0.0", {\ "packageLocation": "./.yarn/cache/@types-responselike-npm-1.0.0-85dd08af42-e99fc7cc62.zip/node_modules/@types/responselike/",\ @@ -615,7 +646,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["regexpp", "npm:3.2.0"],\ ["semver", "npm:7.3.5"],\ ["tsutils", "virtual:387babd29b41b46444d3e3377032d6eddab87abf1af2920e4160980785bb2ccb78c92bb8613000343e8983e1ba1913e70541153ce209f3e6d2bf9a3cd9e85ca9#npm:3.21.0"],\ - ["typescript", "patch:typescript@npm%3A4.5.5#~builtin::version=4.5.5&hash=bda367"]\ + ["typescript", "patch:typescript@npm%3A5.0.4#~builtin::version=5.0.4&hash=85af82"]\ ],\ "packagePeers": [\ "@types/eslint",\ @@ -647,7 +678,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@typescript-eslint/typescript-estree", "virtual:f2e1e54d70f0b28e9239cef9e2e72ca13370d0874c22c138c9c3bf9a4279370a1360720f69614f16a700775fd97e2d42f89318bcdcfb2f4d8d9a20f43544afb7#npm:5.12.1"],\ ["debug", "virtual:904b3fada4a3265c4dfeed8c42d6542b5b497582d17441c86eea102109bfc3b9e1825aad904bc43dd1b94603ff4820b8cb2ebcf24cfbaf45ecee04e5bc1076b8#npm:4.3.2"],\ ["eslint", "npm:8.10.0"],\ - ["typescript", "patch:typescript@npm%3A4.5.5#~builtin::version=4.5.5&hash=bda367"]\ + ["typescript", "patch:typescript@npm%3A5.0.4#~builtin::version=5.0.4&hash=85af82"]\ ],\ "packagePeers": [\ "@types/eslint",\ @@ -687,7 +718,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["debug", "virtual:904b3fada4a3265c4dfeed8c42d6542b5b497582d17441c86eea102109bfc3b9e1825aad904bc43dd1b94603ff4820b8cb2ebcf24cfbaf45ecee04e5bc1076b8#npm:4.3.2"],\ ["eslint", "npm:8.10.0"],\ ["tsutils", "virtual:387babd29b41b46444d3e3377032d6eddab87abf1af2920e4160980785bb2ccb78c92bb8613000343e8983e1ba1913e70541153ce209f3e6d2bf9a3cd9e85ca9#npm:3.21.0"],\ - ["typescript", "patch:typescript@npm%3A4.5.5#~builtin::version=4.5.5&hash=bda367"]\ + ["typescript", "patch:typescript@npm%3A5.0.4#~builtin::version=5.0.4&hash=85af82"]\ ],\ "packagePeers": [\ "@types/eslint",\ @@ -747,7 +778,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["is-glob", "npm:4.0.3"],\ ["semver", "npm:7.3.5"],\ ["tsutils", "virtual:387babd29b41b46444d3e3377032d6eddab87abf1af2920e4160980785bb2ccb78c92bb8613000343e8983e1ba1913e70541153ce209f3e6d2bf9a3cd9e85ca9#npm:3.21.0"],\ - ["typescript", "patch:typescript@npm%3A4.5.5#~builtin::version=4.5.5&hash=bda367"]\ + ["typescript", "patch:typescript@npm%3A5.0.4#~builtin::version=5.0.4&hash=85af82"]\ ],\ "packagePeers": [\ "@types/typescript",\ @@ -795,15 +826,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ - ["@ungap/promise-all-settled", [\ - ["npm:1.1.2", {\ - "packageLocation": "./.yarn/cache/@ungap-promise-all-settled-npm-1.1.2-c0f42e147b-08d37fdfa2.zip/node_modules/@ungap/promise-all-settled/",\ - "packageDependencies": [\ - ["@ungap/promise-all-settled", "npm:1.1.2"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ ["@vue/compiler-core", [\ ["npm:3.2.20", {\ "packageLocation": "./.yarn/cache/@vue-compiler-core-npm-3.2.20-816031913a-d90f9469e7.zip/node_modules/@vue/compiler-core/",\ @@ -882,176 +904,115 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { }]\ ]],\ ["@yarnpkg/core", [\ - ["npm:3.2.0", {\ - "packageLocation": "./.yarn/cache/@yarnpkg-core-npm-3.2.0-a48f7cad0a-a56839f157.zip/node_modules/@yarnpkg/core/",\ + ["npm:4.0.0-rc.53", {\ + "packageLocation": "./.yarn/cache/@yarnpkg-core-npm-4.0.0-rc.53-048f3958a7-86c0478270.zip/node_modules/@yarnpkg/core/",\ "packageDependencies": [\ - ["@yarnpkg/core", "npm:3.2.0"],\ + ["@yarnpkg/core", "npm:4.0.0-rc.53"],\ ["@arcanis/slice-ansi", "npm:1.1.1"],\ ["@types/semver", "npm:7.3.9"],\ ["@types/treeify", "npm:1.0.0"],\ - ["@yarnpkg/fslib", "npm:2.6.1"],\ - ["@yarnpkg/json-proxy", "npm:2.1.1"],\ - ["@yarnpkg/libzip", "npm:2.2.4"],\ - ["@yarnpkg/parsers", "npm:2.5.0"],\ - ["@yarnpkg/pnp", "npm:3.2.0"],\ - ["@yarnpkg/shell", "npm:3.2.0"],\ + ["@yarnpkg/fslib", "npm:3.0.0-rc.53"],\ + ["@yarnpkg/libzip", "virtual:048f3958a7f699e8758f1cb9392ae5c3bbbfb1519d833f10234a4fc28e1577512b486034ad9412a5201ca0f9e7b1132240fda75bceae6487b268394f60c3bcf9#npm:3.0.0-rc.53"],\ + ["@yarnpkg/parsers", "npm:3.0.0-rc.53"],\ + ["@yarnpkg/shell", "npm:4.0.0-rc.53"],\ ["camelcase", "npm:5.3.1"],\ ["chalk", "npm:3.0.0"],\ ["ci-info", "npm:3.2.0"],\ - ["clipanion", "virtual:aa6dbc485c96a4f23035a31f44481412ab7479eee841cf5f30d392dce33e0547ef7dbed86b365514f32c7fc4d2d00670c7483fbe76a30ee4eead454cfc70e090#npm:3.2.0-rc.10"],\ + ["clipanion", "virtual:2231344b5bb5fdd002067b0579ce639f02d5599ea6664bd499ff224dee51db204fc426b641921096ee846510db1b53303d73637ce3e2ef9c324e654ad4f6c1f5#npm:4.0.0-rc.2"],\ ["cross-spawn", "npm:7.0.3"],\ - ["diff", "npm:4.0.2"],\ - ["globby", "npm:11.0.4"],\ + ["diff", "npm:5.1.0"],\ + ["dotenv", "npm:16.3.1"],\ + ["fast-glob", "npm:3.2.7"],\ ["got", "npm:11.8.2"],\ - ["json-file-plus", "npm:3.3.1"],\ ["lodash", "npm:4.17.21"],\ ["micromatch", "npm:4.0.4"],\ - ["mkdirp", "npm:0.5.5"],\ ["p-limit", "npm:2.3.0"],\ - ["pluralize", "npm:7.0.0"],\ - ["pretty-bytes", "npm:5.6.0"],\ ["semver", "npm:7.3.5"],\ - ["stream-to-promise", "npm:2.2.0"],\ ["strip-ansi", "npm:6.0.1"],\ ["tar", "npm:6.1.11"],\ - ["tinylogic", "npm:1.0.3"],\ + ["tinylogic", "npm:2.0.0"],\ ["treeify", "npm:1.1.0"],\ - ["tslib", "npm:1.14.1"],\ + ["tslib", "npm:2.6.2"],\ ["tunnel", "npm:0.0.6"]\ ],\ "linkType": "HARD"\ }]\ ]],\ ["@yarnpkg/fslib", [\ - ["npm:2.5.2", {\ - "packageLocation": "./.yarn/cache/@yarnpkg-fslib-npm-2.5.2-28ede04921-a4be406e5f.zip/node_modules/@yarnpkg/fslib/",\ - "packageDependencies": [\ - ["@yarnpkg/fslib", "npm:2.5.2"],\ - ["@yarnpkg/libzip", "npm:2.2.2"],\ - ["tslib", "npm:1.14.1"]\ - ],\ - "linkType": "HARD"\ - }],\ - ["npm:2.6.1", {\ - "packageLocation": "./.yarn/cache/@yarnpkg-fslib-npm-2.6.1-57faee1db2-e3bbd796a1.zip/node_modules/@yarnpkg/fslib/",\ - "packageDependencies": [\ - ["@yarnpkg/fslib", "npm:2.6.1"],\ - ["@yarnpkg/libzip", "npm:2.2.4"],\ - ["tslib", "npm:1.14.1"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ - ["@yarnpkg/json-proxy", [\ - ["npm:2.1.1", {\ - "packageLocation": "./.yarn/cache/@yarnpkg-json-proxy-npm-2.1.1-516f902a0f-2c306b6ee1.zip/node_modules/@yarnpkg/json-proxy/",\ + ["npm:3.0.0-rc.53", {\ + "packageLocation": "./.yarn/cache/@yarnpkg-fslib-npm-3.0.0-rc.53-0a466b00ea-026fdc98da.zip/node_modules/@yarnpkg/fslib/",\ "packageDependencies": [\ - ["@yarnpkg/json-proxy", "npm:2.1.1"],\ - ["@yarnpkg/fslib", "npm:2.5.2"],\ - ["tslib", "npm:1.14.1"]\ + ["@yarnpkg/fslib", "npm:3.0.0-rc.53"],\ + ["tslib", "npm:2.6.2"]\ ],\ "linkType": "HARD"\ }]\ ]],\ ["@yarnpkg/libzip", [\ - ["npm:2.2.2", {\ - "packageLocation": "./.yarn/cache/@yarnpkg-libzip-npm-2.2.2-3fa1ab5536-7c09b13fde.zip/node_modules/@yarnpkg/libzip/",\ + ["npm:3.0.0-rc.53", {\ + "packageLocation": "./.yarn/cache/@yarnpkg-libzip-npm-3.0.0-rc.53-a807978274-bf6dbe5184.zip/node_modules/@yarnpkg/libzip/",\ "packageDependencies": [\ - ["@yarnpkg/libzip", "npm:2.2.2"],\ - ["@types/emscripten", "npm:1.39.5"],\ - ["tslib", "npm:1.14.1"]\ + ["@yarnpkg/libzip", "npm:3.0.0-rc.53"]\ ],\ - "linkType": "HARD"\ + "linkType": "SOFT"\ }],\ - ["npm:2.2.4", {\ - "packageLocation": "./.yarn/cache/@yarnpkg-libzip-npm-2.2.4-b8050186bc-974a286d4e.zip/node_modules/@yarnpkg/libzip/",\ + ["virtual:048f3958a7f699e8758f1cb9392ae5c3bbbfb1519d833f10234a4fc28e1577512b486034ad9412a5201ca0f9e7b1132240fda75bceae6487b268394f60c3bcf9#npm:3.0.0-rc.53", {\ + "packageLocation": "./.yarn/__virtual__/@yarnpkg-libzip-virtual-889b330c77/0/cache/@yarnpkg-libzip-npm-3.0.0-rc.53-a807978274-bf6dbe5184.zip/node_modules/@yarnpkg/libzip/",\ "packageDependencies": [\ - ["@yarnpkg/libzip", "npm:2.2.4"],\ - ["@types/emscripten", "npm:1.39.5"],\ - ["tslib", "npm:1.14.1"]\ + ["@yarnpkg/libzip", "virtual:048f3958a7f699e8758f1cb9392ae5c3bbbfb1519d833f10234a4fc28e1577512b486034ad9412a5201ca0f9e7b1132240fda75bceae6487b268394f60c3bcf9#npm:3.0.0-rc.53"],\ + ["@types/emscripten", "npm:1.39.8"],\ + ["@types/yarnpkg__fslib", null],\ + ["@yarnpkg/fslib", "npm:3.0.0-rc.53"],\ + ["tslib", "npm:2.6.2"]\ ],\ - "linkType": "HARD"\ - }]\ - ]],\ - ["@yarnpkg/nm", [\ - ["npm:3.0.1", {\ - "packageLocation": "./.yarn/cache/@yarnpkg-nm-npm-3.0.1-f51363e8b2-bc39d07b4f.zip/node_modules/@yarnpkg/nm/",\ - "packageDependencies": [\ - ["@yarnpkg/nm", "npm:3.0.1"],\ - ["@yarnpkg/core", "npm:3.2.0"],\ - ["@yarnpkg/fslib", "npm:2.6.1"]\ + "packagePeers": [\ + "@types/yarnpkg__fslib",\ + "@yarnpkg/fslib"\ ],\ "linkType": "HARD"\ }]\ ]],\ ["@yarnpkg/parsers", [\ - ["npm:2.5.0", {\ - "packageLocation": "./.yarn/cache/@yarnpkg-parsers-npm-2.5.0-80778f9c50-02678b7b91.zip/node_modules/@yarnpkg/parsers/",\ + ["npm:3.0.0-rc.53", {\ + "packageLocation": "./.yarn/cache/@yarnpkg-parsers-npm-3.0.0-rc.53-c9aed2a00c-ef20025d8d.zip/node_modules/@yarnpkg/parsers/",\ "packageDependencies": [\ - ["@yarnpkg/parsers", "npm:2.5.0"],\ + ["@yarnpkg/parsers", "npm:3.0.0-rc.53"],\ ["js-yaml", "npm:3.14.1"],\ - ["tslib", "npm:1.14.1"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ - ["@yarnpkg/pnp", [\ - ["npm:3.2.0", {\ - "packageLocation": "./.yarn/cache/@yarnpkg-pnp-npm-3.2.0-aa2b642c19-5b99f89e77.zip/node_modules/@yarnpkg/pnp/",\ - "packageDependencies": [\ - ["@yarnpkg/pnp", "npm:3.2.0"],\ - ["@types/node", "npm:13.13.52"],\ - ["@yarnpkg/fslib", "npm:2.6.1"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ - ["@yarnpkg/pnpify", [\ - ["npm:3.1.1", {\ - "packageLocation": "./.yarn/cache/@yarnpkg-pnpify-npm-3.1.1-b3d7d3145e-05a96f9299.zip/node_modules/@yarnpkg/pnpify/",\ - "packageDependencies": [\ - ["@yarnpkg/pnpify", "npm:3.1.1"],\ - ["@yarnpkg/core", "npm:3.2.0"],\ - ["@yarnpkg/fslib", "npm:2.6.1"],\ - ["@yarnpkg/nm", "npm:3.0.1"],\ - ["clipanion", "virtual:aa6dbc485c96a4f23035a31f44481412ab7479eee841cf5f30d392dce33e0547ef7dbed86b365514f32c7fc4d2d00670c7483fbe76a30ee4eead454cfc70e090#npm:3.2.0-rc.10"],\ - ["cross-spawn", "npm:7.0.3"],\ - ["tslib", "npm:1.14.1"]\ + ["tslib", "npm:2.6.2"]\ ],\ "linkType": "HARD"\ }]\ ]],\ ["@yarnpkg/sdks", [\ - ["npm:2.6.0", {\ - "packageLocation": "./.yarn/cache/@yarnpkg-sdks-npm-2.6.0-22968d3ffa-80d3c89311.zip/node_modules/@yarnpkg/sdks/",\ + ["npm:3.0.0-rc.53", {\ + "packageLocation": "./.yarn/cache/@yarnpkg-sdks-npm-3.0.0-rc.53-db477f9713-69746c865b.zip/node_modules/@yarnpkg/sdks/",\ "packageDependencies": [\ - ["@yarnpkg/sdks", "npm:2.6.0"],\ - ["@yarnpkg/core", "npm:3.2.0"],\ - ["@yarnpkg/fslib", "npm:2.6.1"],\ - ["@yarnpkg/parsers", "npm:2.5.0"],\ + ["@yarnpkg/sdks", "npm:3.0.0-rc.53"],\ + ["@yarnpkg/core", "npm:4.0.0-rc.53"],\ + ["@yarnpkg/fslib", "npm:3.0.0-rc.53"],\ + ["@yarnpkg/parsers", "npm:3.0.0-rc.53"],\ ["chalk", "npm:3.0.0"],\ - ["clipanion", "virtual:aa6dbc485c96a4f23035a31f44481412ab7479eee841cf5f30d392dce33e0547ef7dbed86b365514f32c7fc4d2d00670c7483fbe76a30ee4eead454cfc70e090#npm:3.2.0-rc.10"],\ + ["clipanion", "virtual:2231344b5bb5fdd002067b0579ce639f02d5599ea6664bd499ff224dee51db204fc426b641921096ee846510db1b53303d73637ce3e2ef9c324e654ad4f6c1f5#npm:4.0.0-rc.2"],\ ["comment-json", "npm:2.4.2"],\ ["lodash", "npm:4.17.21"],\ - ["tslib", "npm:1.14.1"]\ + ["tslib", "npm:2.6.2"]\ ],\ "linkType": "HARD"\ }]\ ]],\ ["@yarnpkg/shell", [\ - ["npm:3.2.0", {\ - "packageLocation": "./.yarn/cache/@yarnpkg-shell-npm-3.2.0-aa6dbc485c-c1ec5f08a3.zip/node_modules/@yarnpkg/shell/",\ + ["npm:4.0.0-rc.53", {\ + "packageLocation": "./.yarn/cache/@yarnpkg-shell-npm-4.0.0-rc.53-2231344b5b-57fa54bd49.zip/node_modules/@yarnpkg/shell/",\ "packageDependencies": [\ - ["@yarnpkg/shell", "npm:3.2.0"],\ - ["@yarnpkg/fslib", "npm:2.6.1"],\ - ["@yarnpkg/parsers", "npm:2.5.0"],\ + ["@yarnpkg/shell", "npm:4.0.0-rc.53"],\ + ["@yarnpkg/fslib", "npm:3.0.0-rc.53"],\ + ["@yarnpkg/parsers", "npm:3.0.0-rc.53"],\ ["chalk", "npm:3.0.0"],\ - ["clipanion", "virtual:aa6dbc485c96a4f23035a31f44481412ab7479eee841cf5f30d392dce33e0547ef7dbed86b365514f32c7fc4d2d00670c7483fbe76a30ee4eead454cfc70e090#npm:3.2.0-rc.10"],\ + ["clipanion", "virtual:2231344b5bb5fdd002067b0579ce639f02d5599ea6664bd499ff224dee51db204fc426b641921096ee846510db1b53303d73637ce3e2ef9c324e654ad4f6c1f5#npm:4.0.0-rc.2"],\ ["cross-spawn", "npm:7.0.3"],\ ["fast-glob", "npm:3.2.7"],\ ["micromatch", "npm:4.0.4"],\ - ["stream-buffers", "npm:3.0.2"],\ - ["tslib", "npm:1.14.1"]\ + ["tslib", "npm:2.6.2"]\ ],\ "linkType": "HARD"\ }]\ @@ -1066,10 +1027,10 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { }]\ ]],\ ["acorn", [\ - ["npm:8.5.0", {\ - "packageLocation": "./.yarn/cache/acorn-npm-8.5.0-faed0ea119-2e4c1dbed3.zip/node_modules/acorn/",\ + ["npm:8.10.0", {\ + "packageLocation": "./.yarn/cache/acorn-npm-8.10.0-2230c9e83e-538ba38af0.zip/node_modules/acorn/",\ "packageDependencies": [\ - ["acorn", "npm:8.5.0"]\ + ["acorn", "npm:8.10.0"]\ ],\ "linkType": "HARD"\ }],\ @@ -1201,15 +1162,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ - ["any-promise", [\ - ["npm:1.3.0", {\ - "packageLocation": "./.yarn/cache/any-promise-npm-1.3.0-f34eeaa7e7-0ee8a9bdbe.zip/node_modules/any-promise/",\ - "packageDependencies": [\ - ["any-promise", "npm:1.3.0"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ ["anymatch", [\ ["npm:3.1.2", {\ "packageLocation": "./.yarn/cache/anymatch-npm-3.1.2-1d5471acfa-985163db22.zip/node_modules/anymatch/",\ @@ -1320,15 +1272,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ - ["asap", [\ - ["npm:2.0.6", {\ - "packageLocation": "./.yarn/cache/asap-npm-2.0.6-36714d439d-b296c92c4b.zip/node_modules/asap/",\ - "packageDependencies": [\ - ["asap", "npm:2.0.6"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ ["assertion-error", [\ ["npm:1.1.0", {\ "packageLocation": "./.yarn/cache/assertion-error-npm-1.1.0-66b893015e-fd9429d3a3.zip/node_modules/assertion-error/",\ @@ -1365,6 +1308,14 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["concat-map", "npm:0.0.1"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:2.0.1", {\ + "packageLocation": "./.yarn/cache/brace-expansion-npm-2.0.1-17aa2616f9-a61e7cd2e8.zip/node_modules/brace-expansion/",\ + "packageDependencies": [\ + ["brace-expansion", "npm:2.0.1"],\ + ["balanced-match", "npm:1.0.2"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["braces", [\ @@ -1458,6 +1409,17 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ + ["camel-case", [\ + ["npm:4.1.2", {\ + "packageLocation": "./.yarn/cache/camel-case-npm-4.1.2-082bf67a9a-bcbd25cd25.zip/node_modules/camel-case/",\ + "packageDependencies": [\ + ["camel-case", "npm:4.1.2"],\ + ["pascal-case", "npm:3.1.2"],\ + ["tslib", "npm:2.6.2"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["camelcase", [\ ["npm:5.3.1", {\ "packageLocation": "./.yarn/cache/camelcase-npm-5.3.1-5db8af62c5-e6effce26b.zip/node_modules/camelcase/",\ @@ -1474,6 +1436,18 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ + ["capital-case", [\ + ["npm:1.0.4", {\ + "packageLocation": "./.yarn/cache/capital-case-npm-1.0.4-90f8a4641d-41fa8fa87f.zip/node_modules/capital-case/",\ + "packageDependencies": [\ + ["capital-case", "npm:1.0.4"],\ + ["no-case", "npm:3.0.4"],\ + ["tslib", "npm:2.6.2"],\ + ["upper-case-first", "npm:2.0.2"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["chai", [\ ["npm:4.3.6", {\ "packageLocation": "./.yarn/cache/chai-npm-4.3.6-dba90e4b0b-acff93fd53.zip/node_modules/chai/",\ @@ -1520,23 +1494,32 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ - ["check-error", [\ - ["npm:1.0.2", {\ - "packageLocation": "./.yarn/cache/check-error-npm-1.0.2-00c540c6e9-d9d1065044.zip/node_modules/check-error/",\ + ["change-case", [\ + ["npm:4.1.2", {\ + "packageLocation": "./.yarn/cache/change-case-npm-4.1.2-9c42f72b39-e4bc4a093a.zip/node_modules/change-case/",\ "packageDependencies": [\ - ["check-error", "npm:1.0.2"]\ + ["change-case", "npm:4.1.2"],\ + ["camel-case", "npm:4.1.2"],\ + ["capital-case", "npm:1.0.4"],\ + ["constant-case", "npm:3.0.4"],\ + ["dot-case", "npm:3.0.4"],\ + ["header-case", "npm:2.0.4"],\ + ["no-case", "npm:3.0.4"],\ + ["param-case", "npm:3.0.4"],\ + ["pascal-case", "npm:3.1.2"],\ + ["path-case", "npm:3.0.4"],\ + ["sentence-case", "npm:3.0.4"],\ + ["snake-case", "npm:3.0.4"],\ + ["tslib", "npm:2.6.2"]\ ],\ "linkType": "HARD"\ }]\ ]],\ - ["chevrotain", [\ - ["npm:9.1.0", {\ - "packageLocation": "./.yarn/cache/chevrotain-npm-9.1.0-9280f9d77f-632d0d7c69.zip/node_modules/chevrotain/",\ + ["check-error", [\ + ["npm:1.0.2", {\ + "packageLocation": "./.yarn/cache/check-error-npm-1.0.2-00c540c6e9-d9d1065044.zip/node_modules/check-error/",\ "packageDependencies": [\ - ["chevrotain", "npm:9.1.0"],\ - ["@chevrotain/types", "npm:9.1.0"],\ - ["@chevrotain/utils", "npm:9.1.0"],\ - ["regexp-to-ast", "npm:0.5.0"]\ + ["check-error", "npm:1.0.2"]\ ],\ "linkType": "HARD"\ }]\ @@ -1548,7 +1531,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["chokidar", "npm:3.5.2"],\ ["anymatch", "npm:3.1.2"],\ ["braces", "npm:3.0.2"],\ - ["fsevents", "patch:fsevents@npm%3A2.3.2#~builtin::version=2.3.2&hash=18f3a7"],\ + ["fsevents", "patch:fsevents@npm%3A2.3.2#~builtin::version=2.3.2&hash=df0bf1"],\ ["glob-parent", "npm:5.1.2"],\ ["is-binary-path", "npm:2.1.0"],\ ["is-glob", "npm:4.0.3"],\ @@ -1563,7 +1546,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["chokidar", "npm:3.5.3"],\ ["anymatch", "npm:3.1.2"],\ ["braces", "npm:3.0.2"],\ - ["fsevents", "patch:fsevents@npm%3A2.3.2#~builtin::version=2.3.2&hash=18f3a7"],\ + ["fsevents", "patch:fsevents@npm%3A2.3.2#~builtin::version=2.3.2&hash=df0bf1"],\ ["glob-parent", "npm:5.1.2"],\ ["is-binary-path", "npm:2.1.0"],\ ["is-glob", "npm:4.0.3"],\ @@ -1601,19 +1584,19 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { }]\ ]],\ ["clipanion", [\ - ["npm:3.2.0-rc.10", {\ - "packageLocation": "./.yarn/cache/clipanion-npm-3.2.0-rc.10-b702c05bd9-8e45be1282.zip/node_modules/clipanion/",\ + ["npm:4.0.0-rc.2", {\ + "packageLocation": "./.yarn/cache/clipanion-npm-4.0.0-rc.2-ad27d804c4-533a2a0fd2.zip/node_modules/clipanion/",\ "packageDependencies": [\ - ["clipanion", "npm:3.2.0-rc.10"]\ + ["clipanion", "npm:4.0.0-rc.2"]\ ],\ "linkType": "SOFT"\ }],\ - ["virtual:aa6dbc485c96a4f23035a31f44481412ab7479eee841cf5f30d392dce33e0547ef7dbed86b365514f32c7fc4d2d00670c7483fbe76a30ee4eead454cfc70e090#npm:3.2.0-rc.10", {\ - "packageLocation": "./.yarn/__virtual__/clipanion-virtual-78c9428343/0/cache/clipanion-npm-3.2.0-rc.10-b702c05bd9-8e45be1282.zip/node_modules/clipanion/",\ + ["virtual:2231344b5bb5fdd002067b0579ce639f02d5599ea6664bd499ff224dee51db204fc426b641921096ee846510db1b53303d73637ce3e2ef9c324e654ad4f6c1f5#npm:4.0.0-rc.2", {\ + "packageLocation": "./.yarn/__virtual__/clipanion-virtual-af511d34c3/0/cache/clipanion-npm-4.0.0-rc.2-ad27d804c4-533a2a0fd2.zip/node_modules/clipanion/",\ "packageDependencies": [\ - ["clipanion", "virtual:aa6dbc485c96a4f23035a31f44481412ab7479eee841cf5f30d392dce33e0547ef7dbed86b365514f32c7fc4d2d00670c7483fbe76a30ee4eead454cfc70e090#npm:3.2.0-rc.10"],\ + ["clipanion", "virtual:2231344b5bb5fdd002067b0579ce639f02d5599ea6664bd499ff224dee51db204fc426b641921096ee846510db1b53303d73637ce3e2ef9c324e654ad4f6c1f5#npm:4.0.0-rc.2"],\ ["@types/typanion", null],\ - ["typanion", "npm:3.7.1"]\ + ["typanion", "npm:3.14.0"]\ ],\ "packagePeers": [\ "@types/typanion"\ @@ -1735,6 +1718,18 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ + ["constant-case", [\ + ["npm:3.0.4", {\ + "packageLocation": "./.yarn/cache/constant-case-npm-3.0.4-118b472e28-6c3346d51a.zip/node_modules/constant-case/",\ + "packageDependencies": [\ + ["constant-case", "npm:3.0.4"],\ + ["no-case", "npm:3.0.4"],\ + ["tslib", "npm:2.6.2"],\ + ["upper-case", "npm:2.0.2"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["core-util-is", [\ ["npm:1.0.3", {\ "packageLocation": "./.yarn/cache/core-util-is-npm-1.0.3-ca74b76c90-9de8597363.zip/node_modules/core-util-is/",\ @@ -1808,6 +1803,13 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ],\ "linkType": "SOFT"\ }],\ + ["npm:4.3.4", {\ + "packageLocation": "./.yarn/cache/debug-npm-4.3.4-4513954577-3dbad3f94e.zip/node_modules/debug/",\ + "packageDependencies": [\ + ["debug", "npm:4.3.4"]\ + ],\ + "linkType": "SOFT"\ + }],\ ["virtual:04563899f4a29809ba01ec9bce668916a958cc4168f47da36653ce3cccf64abe79f263ebf97ce933d674fd63a1dd23be9ca39e0b5cc70c5b4115cf65937b9e6a#npm:4.3.3", {\ "packageLocation": "./.yarn/__virtual__/debug-virtual-508e69e202/0/cache/debug-npm-4.3.3-710fd4cc7f-14472d56fe.zip/node_modules/debug/",\ "packageDependencies": [\ @@ -1822,13 +1824,13 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ],\ "linkType": "HARD"\ }],\ - ["virtual:29636e12a0a7ec2e9a924b61df8922c1d41a1cb7c34a656e351bfd63d5a19aa4c9054ee77cd2e4af264a763655d4d5c5fdade56f9db4eda9d8869952016b14b1#npm:4.3.3", {\ - "packageLocation": "./.yarn/__virtual__/debug-virtual-c8108de7e6/0/cache/debug-npm-4.3.3-710fd4cc7f-14472d56fe.zip/node_modules/debug/",\ + ["virtual:5f3ccd19660563be843be7f6d93ead0c81b5dad028f8a8d1b87941cbb62fbac6e17eab74c22d221a6243ee8ff7d7a38cc9db842b226f37c35c09b446f13f4d55#npm:2.6.9", {\ + "packageLocation": "./.yarn/__virtual__/debug-virtual-ce0c174b87/0/cache/debug-npm-2.6.9-7d4cb597dc-d2f51589ca.zip/node_modules/debug/",\ "packageDependencies": [\ - ["debug", "virtual:29636e12a0a7ec2e9a924b61df8922c1d41a1cb7c34a656e351bfd63d5a19aa4c9054ee77cd2e4af264a763655d4d5c5fdade56f9db4eda9d8869952016b14b1#npm:4.3.3"],\ + ["debug", "virtual:5f3ccd19660563be843be7f6d93ead0c81b5dad028f8a8d1b87941cbb62fbac6e17eab74c22d221a6243ee8ff7d7a38cc9db842b226f37c35c09b446f13f4d55#npm:2.6.9"],\ ["@types/supports-color", null],\ - ["ms", "npm:2.1.2"],\ - ["supports-color", "npm:8.1.1"]\ + ["ms", "npm:2.0.0"],\ + ["supports-color", null]\ ],\ "packagePeers": [\ "@types/supports-color",\ @@ -1836,13 +1838,13 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ],\ "linkType": "HARD"\ }],\ - ["virtual:5f3ccd19660563be843be7f6d93ead0c81b5dad028f8a8d1b87941cbb62fbac6e17eab74c22d221a6243ee8ff7d7a38cc9db842b226f37c35c09b446f13f4d55#npm:2.6.9", {\ - "packageLocation": "./.yarn/__virtual__/debug-virtual-ce0c174b87/0/cache/debug-npm-2.6.9-7d4cb597dc-d2f51589ca.zip/node_modules/debug/",\ + ["virtual:87db25c7c5e6b25bbc12571091cdabc648b79d427ab445d1714ccfdcdfb3265c9de6561ca760cc3de470037cbedf3af4be56ba3b684b3a1c01d4c9c2fd55a741#npm:4.3.4", {\ + "packageLocation": "./.yarn/__virtual__/debug-virtual-762d08cbe9/0/cache/debug-npm-4.3.4-4513954577-3dbad3f94e.zip/node_modules/debug/",\ "packageDependencies": [\ - ["debug", "virtual:5f3ccd19660563be843be7f6d93ead0c81b5dad028f8a8d1b87941cbb62fbac6e17eab74c22d221a6243ee8ff7d7a38cc9db842b226f37c35c09b446f13f4d55#npm:2.6.9"],\ + ["debug", "virtual:87db25c7c5e6b25bbc12571091cdabc648b79d427ab445d1714ccfdcdfb3265c9de6561ca760cc3de470037cbedf3af4be56ba3b684b3a1c01d4c9c2fd55a741#npm:4.3.4"],\ ["@types/supports-color", null],\ - ["ms", "npm:2.0.0"],\ - ["supports-color", null]\ + ["ms", "npm:2.1.2"],\ + ["supports-color", "npm:8.1.1"]\ ],\ "packagePeers": [\ "@types/supports-color",\ @@ -1968,7 +1970,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["query-ast", "npm:1.0.4"],\ ["readdirp", "npm:3.6.0"],\ ["require-package-name", "npm:2.0.1"],\ - ["resolve", "patch:resolve@npm%3A1.20.0#~builtin::version=1.20.0&hash=07638b"],\ + ["resolve", "patch:resolve@npm%3A1.20.0#~builtin::version=1.20.0&hash=c3c19d"],\ ["sass", "npm:1.43.3"],\ ["scss-parser", "npm:1.0.5"],\ ["semver", "npm:7.3.5"],\ @@ -2009,6 +2011,13 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["diff", "npm:5.0.0"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:5.1.0", {\ + "packageLocation": "./.yarn/cache/diff-npm-5.1.0-d24d222280-c7bf0df7c9.zip/node_modules/diff/",\ + "packageDependencies": [\ + ["diff", "npm:5.1.0"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["dir-glob", [\ @@ -2039,6 +2048,26 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ + ["dot-case", [\ + ["npm:3.0.4", {\ + "packageLocation": "./.yarn/cache/dot-case-npm-3.0.4-09675b5521-a65e351941.zip/node_modules/dot-case/",\ + "packageDependencies": [\ + ["dot-case", "npm:3.0.4"],\ + ["no-case", "npm:3.0.4"],\ + ["tslib", "npm:2.6.2"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ + ["dotenv", [\ + ["npm:16.3.1", {\ + "packageLocation": "./.yarn/cache/dotenv-npm-16.3.1-e6d380a398-15d75e7279.zip/node_modules/dotenv/",\ + "packageDependencies": [\ + ["dotenv", "npm:16.3.1"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["emoji-regex", [\ ["npm:8.0.0", {\ "packageLocation": "./.yarn/cache/emoji-regex-npm-8.0.0-213764015c-d4c5c39d5a.zip/node_modules/emoji-regex/",\ @@ -2059,14 +2088,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { }]\ ]],\ ["end-of-stream", [\ - ["npm:1.1.0", {\ - "packageLocation": "./.yarn/cache/end-of-stream-npm-1.1.0-318d442be5-9fa637e259.zip/node_modules/end-of-stream/",\ - "packageDependencies": [\ - ["end-of-stream", "npm:1.1.0"],\ - ["once", "npm:1.3.3"]\ - ],\ - "linkType": "HARD"\ - }],\ ["npm:1.4.4", {\ "packageLocation": "./.yarn/cache/end-of-stream-npm-1.4.4-497fc6dee1-530a5a5a1e.zip/node_modules/end-of-stream/",\ "packageDependencies": [\ @@ -2250,7 +2271,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageDependencies": [\ ["eslint-import-resolver-node", "npm:0.3.6"],\ ["debug", "virtual:d9426786c635bc4b52511d6cc4b56156f50d780a698c0e20fc6caf10d3be51cbf176e79cff882f4d42a23ff4d0f89fe94222849578214e7fbae0f2754c82af02#npm:3.2.7"],\ - ["resolve", "patch:resolve@npm%3A1.20.0#~builtin::version=1.20.0&hash=07638b"]\ + ["resolve", "patch:resolve@npm%3A1.20.0#~builtin::version=1.20.0&hash=c3c19d"]\ ],\ "linkType": "HARD"\ }]\ @@ -2274,7 +2295,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["eslint-plugin-import", "virtual:b0b673485cd8bf8bfb5d77c8832044ea9a359f69e531c744fd499cdb614a5dbfc2cf264b269d28c6ec99b30a5f6712df8f9d9008403ee41c1d5ad0d930110b1d#npm:2.25.4"],\ ["glob", "npm:7.2.0"],\ ["is-glob", "npm:4.0.3"],\ - ["resolve", "patch:resolve@npm%3A1.20.0#~builtin::version=1.20.0&hash=07638b"],\ + ["resolve", "patch:resolve@npm%3A1.20.0#~builtin::version=1.20.0&hash=c3c19d"],\ ["tsconfig-paths", "npm:3.11.0"]\ ],\ "packagePeers": [\ @@ -2373,7 +2394,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["is-glob", "npm:4.0.3"],\ ["minimatch", "npm:3.0.4"],\ ["object.values", "npm:1.1.5"],\ - ["resolve", "patch:resolve@npm%3A1.20.0#~builtin::version=1.20.0&hash=07638b"],\ + ["resolve", "patch:resolve@npm%3A1.20.0#~builtin::version=1.20.0&hash=c3c19d"],\ ["tsconfig-paths", "npm:3.12.0"]\ ],\ "packagePeers": [\ @@ -2675,6 +2696,15 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ + ["fp-ts", [\ + ["npm:2.16.1", {\ + "packageLocation": "./.yarn/cache/fp-ts-npm-2.16.1-8deb3ec2d6-94e8bb1d03.zip/node_modules/fp-ts/",\ + "packageDependencies": [\ + ["fp-ts", "npm:2.16.1"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["fs-minipass", [\ ["npm:2.1.0", {\ "packageLocation": "./.yarn/cache/fs-minipass-npm-2.1.0-501ef87306-1b8d128dae.zip/node_modules/fs-minipass/",\ @@ -2695,10 +2725,10 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { }]\ ]],\ ["fsevents", [\ - ["patch:fsevents@npm%3A2.3.2#~builtin::version=2.3.2&hash=18f3a7", {\ - "packageLocation": "./.yarn/unplugged/fsevents-patch-3340e2eb10/node_modules/fsevents/",\ + ["patch:fsevents@npm%3A2.3.2#~builtin::version=2.3.2&hash=df0bf1", {\ + "packageLocation": "./.yarn/unplugged/fsevents-patch-2882183fbf/node_modules/fsevents/",\ "packageDependencies": [\ - ["fsevents", "patch:fsevents@npm%3A2.3.2#~builtin::version=2.3.2&hash=18f3a7"],\ + ["fsevents", "patch:fsevents@npm%3A2.3.2#~builtin::version=2.3.2&hash=df0bf1"],\ ["node-gyp", "npm:8.3.0"]\ ],\ "linkType": "HARD"\ @@ -2893,11 +2923,16 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ - ["growl", [\ - ["npm:1.10.5", {\ - "packageLocation": "./.yarn/cache/growl-npm-1.10.5-2d1da54198-4b86685de6.zip/node_modules/growl/",\ + ["handlebars", [\ + ["npm:4.7.8", {\ + "packageLocation": "./.yarn/cache/handlebars-npm-4.7.8-25244c2c82-00e68bb5c1.zip/node_modules/handlebars/",\ "packageDependencies": [\ - ["growl", "npm:1.10.5"]\ + ["handlebars", "npm:4.7.8"],\ + ["minimist", "npm:1.2.5"],\ + ["neo-async", "npm:2.6.2"],\ + ["source-map", "npm:0.6.1"],\ + ["uglify-js", "npm:3.17.4"],\ + ["wordwrap", "npm:1.0.0"]\ ],\ "linkType": "HARD"\ }]\ @@ -2983,6 +3018,17 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ + ["header-case", [\ + ["npm:2.0.4", {\ + "packageLocation": "./.yarn/cache/header-case-npm-2.0.4-7d19e19e6d-571c83eeb2.zip/node_modules/header-case/",\ + "packageDependencies": [\ + ["header-case", "npm:2.0.4"],\ + ["capital-case", "npm:1.0.4"],\ + ["tslib", "npm:2.6.2"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["http-cache-semantics", [\ ["npm:4.1.0", {\ "packageLocation": "./.yarn/cache/http-cache-semantics-npm-4.1.0-860520a31f-974de94a81.zip/node_modules/http-cache-semantics/",\ @@ -3149,20 +3195,33 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ - ["ip", [\ - ["npm:1.1.5", {\ - "packageLocation": "./.yarn/cache/ip-npm-1.1.5-af36318aa6-30133981f0.zip/node_modules/ip/",\ + ["io-ts", [\ + ["npm:2.2.20", {\ + "packageLocation": "./.yarn/cache/io-ts-npm-2.2.20-734099d523-72517bf72a.zip/node_modules/io-ts/",\ "packageDependencies": [\ - ["ip", "npm:1.1.5"]\ + ["io-ts", "npm:2.2.20"]\ + ],\ + "linkType": "SOFT"\ + }],\ + ["virtual:27afcd15c01bf83ed02526605eaa0ee44e5ee82c317c124619b29383347ad3b38d44fe2607b250e54a9be0d55c3fc4da703fefb90144d4cf56f8a9dab8b78d19#npm:2.2.20", {\ + "packageLocation": "./.yarn/__virtual__/io-ts-virtual-74e6184bdc/0/cache/io-ts-npm-2.2.20-734099d523-72517bf72a.zip/node_modules/io-ts/",\ + "packageDependencies": [\ + ["io-ts", "virtual:27afcd15c01bf83ed02526605eaa0ee44e5ee82c317c124619b29383347ad3b38d44fe2607b250e54a9be0d55c3fc4da703fefb90144d4cf56f8a9dab8b78d19#npm:2.2.20"],\ + ["@types/fp-ts", null],\ + ["fp-ts", "npm:2.16.1"]\ + ],\ + "packagePeers": [\ + "@types/fp-ts",\ + "fp-ts"\ ],\ "linkType": "HARD"\ }]\ ]],\ - ["is", [\ - ["npm:3.3.0", {\ - "packageLocation": "./.yarn/cache/is-npm-3.3.0-90b1d93580-81fad3b40c.zip/node_modules/is/",\ + ["ip", [\ + ["npm:1.1.5", {\ + "packageLocation": "./.yarn/cache/ip-npm-1.1.5-af36318aa6-30133981f0.zip/node_modules/ip/",\ "packageDependencies": [\ - ["is", "npm:3.3.0"]\ + ["ip", "npm:1.1.5"]\ ],\ "linkType": "HARD"\ }]\ @@ -3458,20 +3517,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ - ["json-file-plus", [\ - ["npm:3.3.1", {\ - "packageLocation": "./.yarn/cache/json-file-plus-npm-3.3.1-7166c0c0e0-162c7a0c8f.zip/node_modules/json-file-plus/",\ - "packageDependencies": [\ - ["json-file-plus", "npm:3.3.1"],\ - ["is", "npm:3.3.0"],\ - ["node.extend", "npm:2.0.2"],\ - ["object.assign", "npm:4.1.2"],\ - ["promiseback", "npm:2.0.3"],\ - ["safer-buffer", "npm:2.1.2"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ ["json-parse-even-better-errors", [\ ["npm:2.3.1", {\ "packageLocation": "./.yarn/cache/json-parse-even-better-errors-npm-2.3.1-144d62256e-798ed4cf33.zip/node_modules/json-parse-even-better-errors/",\ @@ -3615,6 +3660,16 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ + ["lower-case", [\ + ["npm:2.0.2", {\ + "packageLocation": "./.yarn/cache/lower-case-npm-2.0.2-151055f1c2-83a0a5f159.zip/node_modules/lower-case/",\ + "packageDependencies": [\ + ["lower-case", "npm:2.0.2"],\ + ["tslib", "npm:2.6.2"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["lowercase-keys", [\ ["npm:2.0.0", {\ "packageLocation": "./.yarn/cache/lowercase-keys-npm-2.0.0-1876065a32-24d7ebd56c.zip/node_modules/lowercase-keys/",\ @@ -3722,6 +3777,14 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["brace-expansion", "npm:1.1.11"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:5.0.1", {\ + "packageLocation": "./.yarn/cache/minimatch-npm-5.0.1-612724f6f0-b34b98463d.zip/node_modules/minimatch/",\ + "packageDependencies": [\ + ["minimatch", "npm:5.0.1"],\ + ["brace-expansion", "npm:2.0.1"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["minimist", [\ @@ -3808,14 +3871,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { }]\ ]],\ ["mkdirp", [\ - ["npm:0.5.5", {\ - "packageLocation": "./.yarn/cache/mkdirp-npm-0.5.5-6bc76534fc-3bce20ea52.zip/node_modules/mkdirp/",\ - "packageDependencies": [\ - ["mkdirp", "npm:0.5.5"],\ - ["minimist", "npm:1.2.5"]\ - ],\ - "linkType": "HARD"\ - }],\ ["npm:1.0.4", {\ "packageLocation": "./.yarn/cache/mkdirp-npm-1.0.4-37f6ef56b9-a96865108c.zip/node_modules/mkdirp/",\ "packageDependencies": [\ @@ -3825,31 +3880,28 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { }]\ ]],\ ["mocha", [\ - ["npm:9.2.1", {\ - "packageLocation": "./.yarn/cache/mocha-npm-9.2.1-29636e12a0-10debdf2ee.zip/node_modules/mocha/",\ + ["npm:10.2.0", {\ + "packageLocation": "./.yarn/cache/mocha-npm-10.2.0-87db25c7c5-406c45eab1.zip/node_modules/mocha/",\ "packageDependencies": [\ - ["mocha", "npm:9.2.1"],\ - ["@ungap/promise-all-settled", "npm:1.1.2"],\ + ["mocha", "npm:10.2.0"],\ ["ansi-colors", "npm:4.1.1"],\ ["browser-stdout", "npm:1.3.1"],\ ["chokidar", "npm:3.5.3"],\ - ["debug", "virtual:29636e12a0a7ec2e9a924b61df8922c1d41a1cb7c34a656e351bfd63d5a19aa4c9054ee77cd2e4af264a763655d4d5c5fdade56f9db4eda9d8869952016b14b1#npm:4.3.3"],\ + ["debug", "virtual:87db25c7c5e6b25bbc12571091cdabc648b79d427ab445d1714ccfdcdfb3265c9de6561ca760cc3de470037cbedf3af4be56ba3b684b3a1c01d4c9c2fd55a741#npm:4.3.4"],\ ["diff", "npm:5.0.0"],\ ["escape-string-regexp", "npm:4.0.0"],\ ["find-up", "npm:5.0.0"],\ ["glob", "npm:7.2.0"],\ - ["growl", "npm:1.10.5"],\ ["he", "npm:1.2.0"],\ ["js-yaml", "npm:4.1.0"],\ ["log-symbols", "npm:4.1.0"],\ - ["minimatch", "npm:3.0.4"],\ + ["minimatch", "npm:5.0.1"],\ ["ms", "npm:2.1.3"],\ - ["nanoid", "npm:3.2.0"],\ + ["nanoid", "npm:3.3.3"],\ ["serialize-javascript", "npm:6.0.0"],\ ["strip-json-comments", "npm:3.1.1"],\ ["supports-color", "npm:8.1.1"],\ - ["which", "npm:2.0.2"],\ - ["workerpool", "npm:6.2.0"],\ + ["workerpool", "npm:6.2.1"],\ ["yargs", "npm:16.2.0"],\ ["yargs-parser", "npm:20.2.4"],\ ["yargs-unparser", "npm:2.0.0"]\ @@ -3902,10 +3954,10 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ],\ "linkType": "HARD"\ }],\ - ["npm:3.2.0", {\ - "packageLocation": "./.yarn/cache/nanoid-npm-3.2.0-27f7f3aa52-3d1d5a69fe.zip/node_modules/nanoid/",\ + ["npm:3.3.3", {\ + "packageLocation": "./.yarn/cache/nanoid-npm-3.3.3-25d865be84-ada019402a.zip/node_modules/nanoid/",\ "packageDependencies": [\ - ["nanoid", "npm:3.2.0"]\ + ["nanoid", "npm:3.3.3"]\ ],\ "linkType": "HARD"\ }]\ @@ -3928,6 +3980,26 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ + ["neo-async", [\ + ["npm:2.6.2", {\ + "packageLocation": "./.yarn/cache/neo-async-npm-2.6.2-75d6902586-deac9f8d00.zip/node_modules/neo-async/",\ + "packageDependencies": [\ + ["neo-async", "npm:2.6.2"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ + ["no-case", [\ + ["npm:3.0.4", {\ + "packageLocation": "./.yarn/cache/no-case-npm-3.0.4-12884c3d98-0b2ebc113d.zip/node_modules/no-case/",\ + "packageDependencies": [\ + ["no-case", "npm:3.0.4"],\ + ["lower-case", "npm:2.0.2"],\ + ["tslib", "npm:2.6.2"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["node-gyp", [\ ["npm:8.3.0", {\ "packageLocation": "./.yarn/unplugged/node-gyp-npm-8.3.0-11e93b166f/node_modules/node-gyp/",\ @@ -3947,17 +4019,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ - ["node.extend", [\ - ["npm:2.0.2", {\ - "packageLocation": "./.yarn/cache/node.extend-npm-2.0.2-91a85f1c30-1fe3a1ca7f.zip/node_modules/node.extend/",\ - "packageDependencies": [\ - ["node.extend", "npm:2.0.2"],\ - ["has", "npm:1.0.3"],\ - ["is", "npm:3.3.0"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ ["nopt", [\ ["npm:5.0.0", {\ "packageLocation": "./.yarn/cache/nopt-npm-5.0.0-304b40fbfe-d35fdec187.zip/node_modules/nopt/",\ @@ -4073,14 +4134,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { }]\ ]],\ ["once", [\ - ["npm:1.3.3", {\ - "packageLocation": "./.yarn/cache/once-npm-1.3.3-595f0882a4-8e832de08b.zip/node_modules/once/",\ - "packageDependencies": [\ - ["once", "npm:1.3.3"],\ - ["wrappy", "npm:1.0.2"]\ - ],\ - "linkType": "HARD"\ - }],\ ["npm:1.4.0", {\ "packageLocation": "./.yarn/cache/once-npm-1.4.0-ccf03ef07a-cd0a885013.zip/node_modules/once/",\ "packageDependencies": [\ @@ -4179,7 +4232,18 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["npm:2.2.0", {\ "packageLocation": "./.yarn/cache/p-try-npm-2.2.0-e0390dbaf8-f8a8e9a769.zip/node_modules/p-try/",\ "packageDependencies": [\ - ["p-try", "npm:2.2.0"]\ + ["p-try", "npm:2.2.0"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ + ["param-case", [\ + ["npm:3.0.4", {\ + "packageLocation": "./.yarn/cache/param-case-npm-3.0.4-cfb242ad97-b34227fd0f.zip/node_modules/param-case/",\ + "packageDependencies": [\ + ["param-case", "npm:3.0.4"],\ + ["dot-case", "npm:3.0.4"],\ + ["tslib", "npm:2.6.2"]\ ],\ "linkType": "HARD"\ }]\ @@ -4207,6 +4271,28 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ + ["pascal-case", [\ + ["npm:3.1.2", {\ + "packageLocation": "./.yarn/cache/pascal-case-npm-3.1.2-35f5b9bff6-ba98bfd595.zip/node_modules/pascal-case/",\ + "packageDependencies": [\ + ["pascal-case", "npm:3.1.2"],\ + ["no-case", "npm:3.0.4"],\ + ["tslib", "npm:2.6.2"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ + ["path-case", [\ + ["npm:3.0.4", {\ + "packageLocation": "./.yarn/cache/path-case-npm-3.0.4-5a1981bc0c-61de052622.zip/node_modules/path-case/",\ + "packageDependencies": [\ + ["path-case", "npm:3.0.4"],\ + ["dot-case", "npm:3.0.4"],\ + ["tslib", "npm:2.6.2"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["path-exists", [\ ["npm:3.0.0", {\ "packageLocation": "./.yarn/cache/path-exists-npm-3.0.0-e80371aa68-96e92643aa.zip/node_modules/path-exists/",\ @@ -4297,10 +4383,10 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { }]\ ]],\ ["pluralize", [\ - ["npm:7.0.0", {\ - "packageLocation": "./.yarn/cache/pluralize-npm-7.0.0-5e0212129c-e3f694924b.zip/node_modules/pluralize/",\ + ["npm:8.0.0", {\ + "packageLocation": "./.yarn/cache/pluralize-npm-8.0.0-f5f044ed52-08931d4a6a.zip/node_modules/pluralize/",\ "packageDependencies": [\ - ["pluralize", "npm:7.0.0"]\ + ["pluralize", "npm:8.0.0"]\ ],\ "linkType": "HARD"\ }]\ @@ -4335,15 +4421,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ - ["pretty-bytes", [\ - ["npm:5.6.0", {\ - "packageLocation": "./.yarn/cache/pretty-bytes-npm-5.6.0-0061079c9f-9c082500d1.zip/node_modules/pretty-bytes/",\ - "packageDependencies": [\ - ["pretty-bytes", "npm:5.6.0"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ ["process-nextick-args", [\ ["npm:2.0.1", {\ "packageLocation": "./.yarn/cache/process-nextick-args-npm-2.0.1-b8d7971609-1d38588e52.zip/node_modules/process-nextick-args/",\ @@ -4353,26 +4430,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ - ["promise", [\ - ["npm:7.3.1", {\ - "packageLocation": "./.yarn/cache/promise-npm-7.3.1-5d81d474c0-475bb06913.zip/node_modules/promise/",\ - "packageDependencies": [\ - ["promise", "npm:7.3.1"],\ - ["asap", "npm:2.0.6"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ - ["promise-deferred", [\ - ["npm:2.0.3", {\ - "packageLocation": "./.yarn/cache/promise-deferred-npm-2.0.3-0b6eb75898-2e640ddd1e.zip/node_modules/promise-deferred/",\ - "packageDependencies": [\ - ["promise-deferred", "npm:2.0.3"],\ - ["promise", "npm:7.3.1"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ ["promise-inflight", [\ ["npm:1.0.1", {\ "packageLocation": "./.yarn/cache/promise-inflight-npm-1.0.1-5bb925afac-2274948309.zip/node_modules/promise-inflight/",\ @@ -4406,17 +4463,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ - ["promiseback", [\ - ["npm:2.0.3", {\ - "packageLocation": "./.yarn/cache/promiseback-npm-2.0.3-1de6df4a1a-c4d75176df.zip/node_modules/promiseback/",\ - "packageDependencies": [\ - ["promiseback", "npm:2.0.3"],\ - ["is-callable", "npm:1.2.4"],\ - ["promise-deferred", "npm:2.0.3"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ ["pump", [\ ["npm:3.0.0", {\ "packageLocation": "./.yarn/cache/pump-npm-3.0.0-0080bf6a7a-e42e9229fb.zip/node_modules/pump/",\ @@ -4502,15 +4548,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ - ["regexp-to-ast", [\ - ["npm:0.5.0", {\ - "packageLocation": "./.yarn/cache/regexp-to-ast-npm-0.5.0-1e96b9f3a0-72e32f2a12.zip/node_modules/regexp-to-ast/",\ - "packageDependencies": [\ - ["regexp-to-ast", "npm:0.5.0"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ ["regexpp", [\ ["npm:3.2.0", {\ "packageLocation": "./.yarn/cache/regexpp-npm-3.2.0-2513f32cfc-a78dc5c715.zip/node_modules/regexpp/",\ @@ -4557,10 +4594,10 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { }]\ ]],\ ["resolve", [\ - ["patch:resolve@npm%3A1.20.0#~builtin::version=1.20.0&hash=07638b", {\ - "packageLocation": "./.yarn/cache/resolve-patch-b4a69197d3-a0dd7d16a8.zip/node_modules/resolve/",\ + ["patch:resolve@npm%3A1.20.0#~builtin::version=1.20.0&hash=c3c19d", {\ + "packageLocation": "./.yarn/cache/resolve-patch-020719249b-a0dd7d16a8.zip/node_modules/resolve/",\ "packageDependencies": [\ - ["resolve", "patch:resolve@npm%3A1.20.0#~builtin::version=1.20.0&hash=07638b"],\ + ["resolve", "patch:resolve@npm%3A1.20.0#~builtin::version=1.20.0&hash=c3c19d"],\ ["is-core-module", "npm:2.8.0"],\ ["path-parse", "npm:1.0.7"]\ ],\ @@ -4705,6 +4742,18 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ + ["sentence-case", [\ + ["npm:3.0.4", {\ + "packageLocation": "./.yarn/cache/sentence-case-npm-3.0.4-ed6888d0bc-3cfe6c0143.zip/node_modules/sentence-case/",\ + "packageDependencies": [\ + ["sentence-case", "npm:3.0.4"],\ + ["no-case", "npm:3.0.4"],\ + ["tslib", "npm:2.6.2"],\ + ["upper-case-first", "npm:2.0.2"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["serialize-javascript", [\ ["npm:6.0.0", {\ "packageLocation": "./.yarn/cache/serialize-javascript-npm-6.0.0-0bb8a3c88d-56f90b562a.zip/node_modules/serialize-javascript/",\ @@ -4782,6 +4831,17 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ + ["snake-case", [\ + ["npm:3.0.4", {\ + "packageLocation": "./.yarn/cache/snake-case-npm-3.0.4-67f447c30d-0a7a79900b.zip/node_modules/snake-case/",\ + "packageDependencies": [\ + ["snake-case", "npm:3.0.4"],\ + ["dot-case", "npm:3.0.4"],\ + ["tslib", "npm:2.6.2"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["socks", [\ ["npm:2.6.1", {\ "packageLocation": "./.yarn/cache/socks-npm-2.6.1-09133d0d22-2ca9d616e4.zip/node_modules/socks/",\ @@ -4887,37 +4947,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ - ["stream-buffers", [\ - ["npm:3.0.2", {\ - "packageLocation": "./.yarn/cache/stream-buffers-npm-3.0.2-81e4221c31-b09fdeea60.zip/node_modules/stream-buffers/",\ - "packageDependencies": [\ - ["stream-buffers", "npm:3.0.2"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ - ["stream-to-array", [\ - ["npm:2.3.0", {\ - "packageLocation": "./.yarn/cache/stream-to-array-npm-2.3.0-eaa32c31d8-7feaf63b38.zip/node_modules/stream-to-array/",\ - "packageDependencies": [\ - ["stream-to-array", "npm:2.3.0"],\ - ["any-promise", "npm:1.3.0"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ - ["stream-to-promise", [\ - ["npm:2.2.0", {\ - "packageLocation": "./.yarn/cache/stream-to-promise-npm-2.2.0-27f3ae7c38-2c9ddb69c3.zip/node_modules/stream-to-promise/",\ - "packageDependencies": [\ - ["stream-to-promise", "npm:2.2.0"],\ - ["any-promise", "npm:1.3.0"],\ - ["end-of-stream", "npm:1.1.0"],\ - ["stream-to-array", "npm:2.3.0"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ ["string-width", [\ ["npm:1.0.2", {\ "packageLocation": "./.yarn/cache/string-width-npm-1.0.2-01031f9add-5c79439e95.zip/node_modules/string-width/",\ @@ -5059,11 +5088,10 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { }]\ ]],\ ["tinylogic", [\ - ["npm:1.0.3", {\ - "packageLocation": "./.yarn/cache/tinylogic-npm-1.0.3-bd596a96c4-fdf7fcc170.zip/node_modules/tinylogic/",\ + ["npm:2.0.0", {\ + "packageLocation": "./.yarn/cache/tinylogic-npm-2.0.0-700fcc2fe0-b966cbb412.zip/node_modules/tinylogic/",\ "packageDependencies": [\ - ["tinylogic", "npm:1.0.3"],\ - ["chevrotain", "npm:9.1.0"]\ + ["tinylogic", "npm:2.0.0"]\ ],\ "linkType": "HARD"\ }]\ @@ -5097,36 +5125,36 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { }]\ ]],\ ["ts-node", [\ - ["npm:10.5.0", {\ - "packageLocation": "./.yarn/cache/ts-node-npm-10.5.0-818635380a-d51ac8a9b3.zip/node_modules/ts-node/",\ + ["npm:10.9.1", {\ + "packageLocation": "./.yarn/cache/ts-node-npm-10.9.1-6c268be7f4-090adff130.zip/node_modules/ts-node/",\ "packageDependencies": [\ - ["ts-node", "npm:10.5.0"]\ + ["ts-node", "npm:10.9.1"]\ ],\ "linkType": "SOFT"\ }],\ - ["virtual:b0b673485cd8bf8bfb5d77c8832044ea9a359f69e531c744fd499cdb614a5dbfc2cf264b269d28c6ec99b30a5f6712df8f9d9008403ee41c1d5ad0d930110b1d#npm:10.5.0", {\ - "packageLocation": "./.yarn/__virtual__/ts-node-virtual-09bbcb729d/0/cache/ts-node-npm-10.5.0-818635380a-d51ac8a9b3.zip/node_modules/ts-node/",\ + ["virtual:b0b673485cd8bf8bfb5d77c8832044ea9a359f69e531c744fd499cdb614a5dbfc2cf264b269d28c6ec99b30a5f6712df8f9d9008403ee41c1d5ad0d930110b1d#npm:10.9.1", {\ + "packageLocation": "./.yarn/__virtual__/ts-node-virtual-0114968fcc/0/cache/ts-node-npm-10.9.1-6c268be7f4-090adff130.zip/node_modules/ts-node/",\ "packageDependencies": [\ - ["ts-node", "virtual:b0b673485cd8bf8bfb5d77c8832044ea9a359f69e531c744fd499cdb614a5dbfc2cf264b269d28c6ec99b30a5f6712df8f9d9008403ee41c1d5ad0d930110b1d#npm:10.5.0"],\ - ["@cspotcode/source-map-support", "npm:0.7.0"],\ + ["ts-node", "virtual:b0b673485cd8bf8bfb5d77c8832044ea9a359f69e531c744fd499cdb614a5dbfc2cf264b269d28c6ec99b30a5f6712df8f9d9008403ee41c1d5ad0d930110b1d#npm:10.9.1"],\ + ["@cspotcode/source-map-support", "npm:0.8.1"],\ ["@swc/core", null],\ ["@swc/wasm", null],\ - ["@tsconfig/node10", "npm:1.0.8"],\ - ["@tsconfig/node12", "npm:1.0.9"],\ - ["@tsconfig/node14", "npm:1.0.1"],\ - ["@tsconfig/node16", "npm:1.0.2"],\ + ["@tsconfig/node10", "npm:1.0.9"],\ + ["@tsconfig/node12", "npm:1.0.11"],\ + ["@tsconfig/node14", "npm:1.0.3"],\ + ["@tsconfig/node16", "npm:1.0.4"],\ ["@types/node", null],\ ["@types/swc__core", null],\ ["@types/swc__wasm", null],\ ["@types/typescript", null],\ - ["acorn", "npm:8.5.0"],\ + ["acorn", "npm:8.10.0"],\ ["acorn-walk", "npm:8.2.0"],\ ["arg", "npm:4.1.3"],\ ["create-require", "npm:1.1.1"],\ ["diff", "npm:4.0.2"],\ ["make-error", "npm:1.3.6"],\ - ["typescript", "patch:typescript@npm%3A4.5.5#~builtin::version=4.5.5&hash=bda367"],\ - ["v8-compile-cache-lib", "npm:3.0.0"],\ + ["typescript", "patch:typescript@npm%3A5.0.4#~builtin::version=5.0.4&hash=85af82"],\ + ["v8-compile-cache-lib", "npm:3.0.1"],\ ["yn", "npm:3.1.1"]\ ],\ "packagePeers": [\ @@ -5172,6 +5200,13 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["tslib", "npm:1.14.1"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:2.6.2", {\ + "packageLocation": "./.yarn/cache/tslib-npm-2.6.2-4fc8c068d9-329ea56123.zip/node_modules/tslib/",\ + "packageDependencies": [\ + ["tslib", "npm:2.6.2"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["tsutils", [\ @@ -5188,7 +5223,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["tsutils", "virtual:387babd29b41b46444d3e3377032d6eddab87abf1af2920e4160980785bb2ccb78c92bb8613000343e8983e1ba1913e70541153ce209f3e6d2bf9a3cd9e85ca9#npm:3.21.0"],\ ["@types/typescript", null],\ ["tslib", "npm:1.14.1"],\ - ["typescript", "patch:typescript@npm%3A4.5.5#~builtin::version=4.5.5&hash=bda367"]\ + ["typescript", "patch:typescript@npm%3A5.0.4#~builtin::version=5.0.4&hash=85af82"]\ ],\ "packagePeers": [\ "@types/typescript",\ @@ -5221,10 +5256,10 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { }]\ ]],\ ["typanion", [\ - ["npm:3.7.1", {\ - "packageLocation": "./.yarn/cache/typanion-npm-3.7.1-b7ec4136b5-79f396a960.zip/node_modules/typanion/",\ + ["npm:3.14.0", {\ + "packageLocation": "./.yarn/cache/typanion-npm-3.14.0-8af344c436-fc0590d02c.zip/node_modules/typanion/",\ "packageDependencies": [\ - ["typanion", "npm:3.7.1"]\ + ["typanion", "npm:3.14.0"]\ ],\ "linkType": "HARD"\ }]\ @@ -5258,10 +5293,19 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { }]\ ]],\ ["typescript", [\ - ["patch:typescript@npm%3A4.5.5#~builtin::version=4.5.5&hash=bda367", {\ - "packageLocation": "./.yarn/cache/typescript-patch-1413b5712d-858c61fa63.zip/node_modules/typescript/",\ + ["patch:typescript@npm%3A5.0.4#~builtin::version=5.0.4&hash=85af82", {\ + "packageLocation": "./.yarn/cache/typescript-patch-260000abbe-bb309d320c.zip/node_modules/typescript/",\ + "packageDependencies": [\ + ["typescript", "patch:typescript@npm%3A5.0.4#~builtin::version=5.0.4&hash=85af82"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ + ["uglify-js", [\ + ["npm:3.17.4", {\ + "packageLocation": "./.yarn/cache/uglify-js-npm-3.17.4-58d4ab56aa-7b3897df38.zip/node_modules/uglify-js/",\ "packageDependencies": [\ - ["typescript", "patch:typescript@npm%3A4.5.5#~builtin::version=4.5.5&hash=bda367"]\ + ["uglify-js", "npm:3.17.4"]\ ],\ "linkType": "HARD"\ }]\ @@ -5299,6 +5343,26 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ + ["upper-case", [\ + ["npm:2.0.2", {\ + "packageLocation": "./.yarn/cache/upper-case-npm-2.0.2-6cf3bda96c-508723a2b0.zip/node_modules/upper-case/",\ + "packageDependencies": [\ + ["upper-case", "npm:2.0.2"],\ + ["tslib", "npm:2.6.2"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ + ["upper-case-first", [\ + ["npm:2.0.2", {\ + "packageLocation": "./.yarn/cache/upper-case-first-npm-2.0.2-8e0c5a851a-4487db4701.zip/node_modules/upper-case-first/",\ + "packageDependencies": [\ + ["upper-case-first", "npm:2.0.2"],\ + ["tslib", "npm:2.6.2"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["uri-js", [\ ["npm:4.4.1", {\ "packageLocation": "./.yarn/cache/uri-js-npm-4.4.1-66d11cbcaf-7167432de6.zip/node_modules/uri-js/",\ @@ -5328,10 +5392,10 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { }]\ ]],\ ["v8-compile-cache-lib", [\ - ["npm:3.0.0", {\ - "packageLocation": "./.yarn/cache/v8-compile-cache-lib-npm-3.0.0-82045dda32-674e312bbc.zip/node_modules/v8-compile-cache-lib/",\ + ["npm:3.0.1", {\ + "packageLocation": "./.yarn/cache/v8-compile-cache-lib-npm-3.0.1-4886071ece-78089ad549.zip/node_modules/v8-compile-cache-lib/",\ "packageDependencies": [\ - ["v8-compile-cache-lib", "npm:3.0.0"]\ + ["v8-compile-cache-lib", "npm:3.0.1"]\ ],\ "linkType": "HARD"\ }]\ @@ -5379,11 +5443,20 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ + ["wordwrap", [\ + ["npm:1.0.0", {\ + "packageLocation": "./.yarn/cache/wordwrap-npm-1.0.0-ae57a645e8-2a44b27881.zip/node_modules/wordwrap/",\ + "packageDependencies": [\ + ["wordwrap", "npm:1.0.0"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["workerpool", [\ - ["npm:6.2.0", {\ - "packageLocation": "./.yarn/cache/workerpool-npm-6.2.0-d2a722f6bb-3493b4f0ef.zip/node_modules/workerpool/",\ + ["npm:6.2.1", {\ + "packageLocation": "./.yarn/cache/workerpool-npm-6.2.1-1486cb2056-c2c6eebbc5.zip/node_modules/workerpool/",\ "packageDependencies": [\ - ["workerpool", "npm:6.2.0"]\ + ["workerpool", "npm:6.2.1"]\ ],\ "linkType": "HARD"\ }]\ @@ -5508,8 +5581,10 @@ const path = require('path'); const require$$0 = require('module'); const StringDecoder = require('string_decoder'); const url = require('url'); -const nodeUtils = require('util'); const os = require('os'); +const nodeUtils = require('util'); +const readline = require('readline'); +const assert = require('assert'); const stream = require('stream'); const zlib = require('zlib'); const events = require('events'); @@ -5539,6 +5614,7 @@ const path__default = /*#__PURE__*/_interopDefaultLegacy(path); const require$$0__default = /*#__PURE__*/_interopDefaultLegacy(require$$0); const StringDecoder__default = /*#__PURE__*/_interopDefaultLegacy(StringDecoder); const nodeUtils__namespace = /*#__PURE__*/_interopNamespace(nodeUtils); +const assert__default = /*#__PURE__*/_interopDefaultLegacy(assert); const zlib__default = /*#__PURE__*/_interopDefaultLegacy(zlib); const S_IFMT = 61440; @@ -5730,15 +5806,10 @@ function areStatsEqual(a, b) { return true; } -var PathType; -(function(PathType2) { - PathType2[PathType2["File"] = 0] = "File"; - PathType2[PathType2["Portable"] = 1] = "Portable"; - PathType2[PathType2["Native"] = 2] = "Native"; -})(PathType || (PathType = {})); const PortablePath = { root: `/`, - dot: `.` + dot: `.`, + parent: `..` }; const Filename = { nodeModules: `node_modules`, @@ -5808,40 +5879,16 @@ function convertPath(targetPathUtils, sourcePath) { return targetPathUtils === npath ? fromPortablePath(sourcePath) : toPortablePath(sourcePath); } -var __defProp$4 = Object.defineProperty; -var __defProps$2 = Object.defineProperties; -var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors; -var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols; -var __hasOwnProp$5 = Object.prototype.hasOwnProperty; -var __propIsEnum$5 = Object.prototype.propertyIsEnumerable; -var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, {enumerable: true, configurable: true, writable: true, value}) : obj[key] = value; -var __spreadValues$4 = (a, b) => { - for (var prop in b || (b = {})) - if (__hasOwnProp$5.call(b, prop)) - __defNormalProp$4(a, prop, b[prop]); - if (__getOwnPropSymbols$5) - for (var prop of __getOwnPropSymbols$5(b)) { - if (__propIsEnum$5.call(b, prop)) - __defNormalProp$4(a, prop, b[prop]); - } - return a; -}; -var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b)); const defaultTime = new Date(SAFE_TIME * 1e3); -var LinkStrategy; -(function(LinkStrategy2) { - LinkStrategy2["Allow"] = `allow`; - LinkStrategy2["ReadOnly"] = `readOnly`; -})(LinkStrategy || (LinkStrategy = {})); async function copyPromise(destinationFs, destination, sourceFs, source, opts) { const normalizedDestination = destinationFs.pathUtils.normalize(destination); const normalizedSource = sourceFs.pathUtils.normalize(source); const prelayout = []; const postlayout = []; - const {atime, mtime} = opts.stableTime ? {atime: defaultTime, mtime: defaultTime} : await sourceFs.lstatPromise(normalizedSource); - await destinationFs.mkdirpPromise(destinationFs.pathUtils.dirname(destination), {utimes: [atime, mtime]}); + const { atime, mtime } = opts.stableTime ? { atime: defaultTime, mtime: defaultTime } : await sourceFs.lstatPromise(normalizedSource); + await destinationFs.mkdirpPromise(destinationFs.pathUtils.dirname(destination), { utimes: [atime, mtime] }); const updateTime = typeof destinationFs.lutimesPromise === `function` ? destinationFs.lutimesPromise.bind(destinationFs) : destinationFs.utimesPromise.bind(destinationFs); - await copyImpl(prelayout, postlayout, updateTime, destinationFs, normalizedDestination, sourceFs, normalizedSource, __spreadProps$2(__spreadValues$4({}, opts), {didParentExist: true})); + await copyImpl(prelayout, postlayout, updateTime, destinationFs, normalizedDestination, sourceFs, normalizedSource, { ...opts, didParentExist: true }); for (const operation of prelayout) await operation(); await Promise.all(postlayout.map((operation) => { @@ -5852,7 +5899,7 @@ async function copyImpl(prelayout, postlayout, updateTime, destinationFs, destin var _a, _b; const destinationStat = opts.didParentExist ? await maybeLStat(destinationFs, destination) : null; const sourceStat = await sourceFs.lstatPromise(source); - const {atime, mtime} = opts.stableTime ? {atime: defaultTime, mtime: defaultTime} : sourceStat; + const { atime, mtime } = opts.stableTime ? { atime: defaultTime, mtime: defaultTime } : sourceStat; let updated; switch (true) { case sourceStat.isDirectory(): @@ -5905,7 +5952,7 @@ async function copyFolder(prelayout, postlayout, updateTime, destinationFs, dest if (destinationStat === null) { prelayout.push(async () => { try { - await destinationFs.mkdirPromise(destination, {mode: sourceStat.mode}); + await destinationFs.mkdirPromise(destination, { mode: sourceStat.mode }); } catch (err) { if (err.code !== `EEXIST`) { throw err; @@ -5915,7 +5962,7 @@ async function copyFolder(prelayout, postlayout, updateTime, destinationFs, dest updated = true; } const entries = await sourceFs.readdirPromise(source); - const nextOpts = opts.didParentExist && !destinationStat ? __spreadProps$2(__spreadValues$4({}, opts), {didParentExist: false}) : opts; + const nextOpts = opts.didParentExist && !destinationStat ? { ...opts, didParentExist: false } : opts; if (opts.stableSort) { for (const entry of entries.sort()) { if (await copyImpl(prelayout, postlayout, updateTime, destinationFs, destinationFs.pathUtils.join(destination, entry), sourceFs, sourceFs.pathUtils.join(source, entry), nextOpts)) { @@ -5932,11 +5979,11 @@ async function copyFolder(prelayout, postlayout, updateTime, destinationFs, dest } return updated; } -const isCloneSupportedCache = new WeakMap(); +const isCloneSupportedCache = /* @__PURE__ */ new WeakMap(); function makeLinkOperation(opFs, destination, source, sourceStat, linkStrategy) { return async () => { await opFs.linkPromise(source, destination); - if (linkStrategy === LinkStrategy.ReadOnly) { + if (linkStrategy === "readOnly" /* ReadOnly */) { sourceStat.mode &= ~146; await opFs.chmodPromise(destination, sourceStat.mode); } @@ -5997,7 +6044,7 @@ async function copySymlink(prelayout, postlayout, updateTime, destinationFs, des } function makeError$1(code, message) { - return Object.assign(new Error(`${code}: ${message}`), {code}); + return Object.assign(new Error(`${code}: ${message}`), { code }); } function EBUSY(message) { return makeError$1(`EBUSY`, message); @@ -6104,7 +6151,7 @@ class FakeFS { constructor(pathUtils) { this.pathUtils = pathUtils; } - async *genTraversePromise(init, {stableSort = false} = {}) { + async *genTraversePromise(init, { stableSort = false } = {}) { const stack = [init]; while (stack.length > 0) { const p = stack.shift(); @@ -6123,7 +6170,7 @@ class FakeFS { } } } - async removePromise(p, {recursive = true, maxRetries = 5} = {}) { + async removePromise(p, { recursive = true, maxRetries = 5 } = {}) { let stat; try { stat = await this.lstatPromise(p); @@ -6157,7 +6204,7 @@ class FakeFS { await this.unlinkPromise(p); } } - removeSync(p, {recursive = true} = {}) { + removeSync(p, { recursive = true } = {}) { let stat; try { stat = this.lstatSync(p); @@ -6177,11 +6224,12 @@ class FakeFS { this.unlinkSync(p); } } - async mkdirpPromise(p, {chmod, utimes} = {}) { + async mkdirpPromise(p, { chmod, utimes } = {}) { p = this.resolve(p); if (p === this.pathUtils.dirname(p)) - return; + return void 0; const parts = p.split(this.pathUtils.sep); + let createdDirectory; for (let u = 2; u <= parts.length; ++u) { const subPath = parts.slice(0, u).join(this.pathUtils.sep); if (!this.existsSync(subPath)) { @@ -6194,6 +6242,7 @@ class FakeFS { throw error; } } + createdDirectory != null ? createdDirectory : createdDirectory = subPath; if (chmod != null) await this.chmodPromise(subPath, chmod); if (utimes != null) { @@ -6204,12 +6253,14 @@ class FakeFS { } } } + return createdDirectory; } - mkdirpSync(p, {chmod, utimes} = {}) { + mkdirpSync(p, { chmod, utimes } = {}) { p = this.resolve(p); if (p === this.pathUtils.dirname(p)) - return; + return void 0; const parts = p.split(this.pathUtils.sep); + let createdDirectory; for (let u = 2; u <= parts.length; ++u) { const subPath = parts.slice(0, u).join(this.pathUtils.sep); if (!this.existsSync(subPath)) { @@ -6222,6 +6273,7 @@ class FakeFS { throw error; } } + createdDirectory != null ? createdDirectory : createdDirectory = subPath; if (chmod != null) this.chmodSync(subPath, chmod); if (utimes != null) { @@ -6232,18 +6284,19 @@ class FakeFS { } } } + return createdDirectory; } - async copyPromise(destination, source, {baseFs = this, overwrite = true, stableSort = false, stableTime = false, linkStrategy = null} = {}) { - return await copyPromise(this, destination, baseFs, source, {overwrite, stableSort, stableTime, linkStrategy}); + async copyPromise(destination, source, { baseFs = this, overwrite = true, stableSort = false, stableTime = false, linkStrategy = null } = {}) { + return await copyPromise(this, destination, baseFs, source, { overwrite, stableSort, stableTime, linkStrategy }); } - copySync(destination, source, {baseFs = this, overwrite = true} = {}) { + copySync(destination, source, { baseFs = this, overwrite = true } = {}) { const stat = baseFs.lstatSync(source); const exists = this.existsSync(destination); if (stat.isDirectory()) { this.mkdirpSync(destination); const directoryListing = baseFs.readdirSync(source); for (const entry of directoryListing) { - this.copySync(this.pathUtils.join(destination, entry), baseFs.pathUtils.join(source, entry), {baseFs, overwrite}); + this.copySync(this.pathUtils.join(destination, entry), baseFs.pathUtils.join(source, entry), { baseFs, overwrite }); } } else if (stat.isFile()) { if (!exists || overwrite) { @@ -6272,7 +6325,7 @@ class FakeFS { return this.changeFileTextPromise(p, content, opts); } } - async changeFileBufferPromise(p, content, {mode} = {}) { + async changeFileBufferPromise(p, content, { mode } = {}) { let current = Buffer.alloc(0); try { current = await this.readFilePromise(p); @@ -6280,9 +6333,9 @@ class FakeFS { } if (Buffer.compare(current, content) === 0) return; - await this.writeFilePromise(p, content, {mode}); + await this.writeFilePromise(p, content, { mode }); } - async changeFileTextPromise(p, content, {automaticNewlines, mode} = {}) { + async changeFileTextPromise(p, content, { automaticNewlines, mode } = {}) { let current = ``; try { current = await this.readFilePromise(p, `utf8`); @@ -6291,7 +6344,7 @@ class FakeFS { const normalizedContent = automaticNewlines ? normalizeLineEndings(current, content) : content; if (current === normalizedContent) return; - await this.writeFilePromise(p, normalizedContent, {mode}); + await this.writeFilePromise(p, normalizedContent, { mode }); } changeFileSync(p, content, opts = {}) { if (Buffer.isBuffer(content)) { @@ -6300,7 +6353,7 @@ class FakeFS { return this.changeFileTextSync(p, content, opts); } } - changeFileBufferSync(p, content, {mode} = {}) { + changeFileBufferSync(p, content, { mode } = {}) { let current = Buffer.alloc(0); try { current = this.readFileSync(p); @@ -6308,9 +6361,9 @@ class FakeFS { } if (Buffer.compare(current, content) === 0) return; - this.writeFileSync(p, content, {mode}); + this.writeFileSync(p, content, { mode }); } - changeFileTextSync(p, content, {automaticNewlines = false, mode} = {}) { + changeFileTextSync(p, content, { automaticNewlines = false, mode } = {}) { let current = ``; try { current = this.readFileSync(p, `utf8`); @@ -6319,7 +6372,7 @@ class FakeFS { const normalizedContent = automaticNewlines ? normalizeLineEndings(current, content) : content; if (current === normalizedContent) return; - this.writeFileSync(p, normalizedContent, {mode}); + this.writeFileSync(p, normalizedContent, { mode }); } async movePromise(fromP, toP) { try { @@ -6500,12 +6553,12 @@ class NodeFS extends BasePortableFakeFS { this.realFs.opendir(npath.fromPortablePath(p), this.makeCallback(resolve, reject)); } }).then((dir) => { - return Object.defineProperty(dir, `path`, {value: p, configurable: true, writable: true}); + return Object.defineProperty(dir, `path`, { value: p, configurable: true, writable: true }); }); } opendirSync(p, opts) { const dir = typeof opts !== `undefined` ? this.realFs.opendirSync(npath.fromPortablePath(p), opts) : this.realFs.opendirSync(npath.fromPortablePath(p)); - return Object.defineProperty(dir, `path`, {value: p, configurable: true, writable: true}); + return Object.defineProperty(dir, `path`, { value: p, configurable: true, writable: true }); } async readPromise(fd, buffer, offset = 0, length = 0, position = -1) { return await new Promise((resolve, reject) => { @@ -6627,6 +6680,14 @@ class NodeFS extends BasePortableFakeFS { return this.realFs.lstatSync(npath.fromPortablePath(p)); } } + async fchmodPromise(fd, mask) { + return await new Promise((resolve, reject) => { + this.realFs.fchmod(fd, mask, this.makeCallback(resolve, reject)); + }); + } + fchmodSync(fd, mask) { + return this.realFs.fchmodSync(fd, mask); + } async chmodPromise(p, mask) { return await new Promise((resolve, reject) => { this.realFs.chmod(npath.fromPortablePath(p), mask, this.makeCallback(resolve, reject)); @@ -6635,6 +6696,14 @@ class NodeFS extends BasePortableFakeFS { chmodSync(p, mask) { return this.realFs.chmodSync(npath.fromPortablePath(p), mask); } + async fchownPromise(fd, uid, gid) { + return await new Promise((resolve, reject) => { + this.realFs.fchown(fd, uid, gid, this.makeCallback(resolve, reject)); + }); + } + fchownSync(fd, uid, gid) { + return this.realFs.fchownSync(fd, uid, gid); + } async chownPromise(p, uid, gid) { return await new Promise((resolve, reject) => { this.realFs.chown(npath.fromPortablePath(p), uid, gid, this.makeCallback(resolve, reject)); @@ -6774,7 +6843,7 @@ class NodeFS extends BasePortableFakeFS { async readdirPromise(p, opts) { return await new Promise((resolve, reject) => { if (opts == null ? void 0 : opts.withFileTypes) { - this.realFs.readdir(npath.fromPortablePath(p), {withFileTypes: true}, this.makeCallback(resolve, reject)); + this.realFs.readdir(npath.fromPortablePath(p), { withFileTypes: true }, this.makeCallback(resolve, reject)); } else { this.realFs.readdir(npath.fromPortablePath(p), this.makeCallback((value) => resolve(value), reject)); } @@ -6782,7 +6851,7 @@ class NodeFS extends BasePortableFakeFS { } readdirSync(p, opts) { if (opts == null ? void 0 : opts.withFileTypes) { - return this.realFs.readdirSync(npath.fromPortablePath(p), {withFileTypes: true}); + return this.realFs.readdirSync(npath.fromPortablePath(p), { withFileTypes: true }); } else { return this.realFs.readdirSync(npath.fromPortablePath(p)); } @@ -6805,11 +6874,27 @@ class NodeFS extends BasePortableFakeFS { truncateSync(p, len) { return this.realFs.truncateSync(npath.fromPortablePath(p), len); } + async ftruncatePromise(fd, len) { + return await new Promise((resolve, reject) => { + this.realFs.ftruncate(fd, len, this.makeCallback(resolve, reject)); + }); + } + ftruncateSync(fd, len) { + return this.realFs.ftruncateSync(fd, len); + } watch(p, a, b) { - return this.realFs.watch(npath.fromPortablePath(p), a, b); + return this.realFs.watch( + npath.fromPortablePath(p), + a, + b + ); } watchFile(p, a, b) { - return this.realFs.watchFile(npath.fromPortablePath(p), a, b); + return this.realFs.watchFile( + npath.fromPortablePath(p), + a, + b + ); } unwatchFile(p, cb) { return this.realFs.unwatchFile(npath.fromPortablePath(p), cb); @@ -6825,27 +6910,16 @@ class NodeFS extends BasePortableFakeFS { } } -var Event; -(function(Event2) { - Event2["Change"] = `change`; - Event2["Stop"] = `stop`; -})(Event || (Event = {})); -var Status; -(function(Status2) { - Status2["Ready"] = `ready`; - Status2["Running"] = `running`; - Status2["Stopped"] = `stopped`; -})(Status || (Status = {})); function assertStatus(current, expected) { if (current !== expected) { throw new Error(`Invalid StatWatcher status: expected '${expected}', got '${current}'`); } } class CustomStatWatcher extends events.EventEmitter { - constructor(fakeFs, path, {bigint = false} = {}) { + constructor(fakeFs, path, { bigint = false } = {}) { super(); - this.status = Status.Ready; - this.changeListeners = new Map(); + this.status = "ready" /* Ready */; + this.changeListeners = /* @__PURE__ */ new Map(); this.startTimeout = null; this.fakeFs = fakeFs; this.path = path; @@ -6858,27 +6932,27 @@ class CustomStatWatcher extends events.EventEmitter { return statWatcher; } start() { - assertStatus(this.status, Status.Ready); - this.status = Status.Running; + assertStatus(this.status, "ready" /* Ready */); + this.status = "running" /* Running */; this.startTimeout = setTimeout(() => { this.startTimeout = null; if (!this.fakeFs.existsSync(this.path)) { - this.emit(Event.Change, this.lastStats, this.lastStats); + this.emit("change" /* Change */, this.lastStats, this.lastStats); } }, 3); } stop() { - assertStatus(this.status, Status.Running); - this.status = Status.Stopped; + assertStatus(this.status, "running" /* Running */); + this.status = "stopped" /* Stopped */; if (this.startTimeout !== null) { clearTimeout(this.startTimeout); this.startTimeout = null; } - this.emit(Event.Stop); + this.emit("stop" /* Stop */); } stat() { try { - return this.fakeFs.statSync(this.path, {bigint: this.bigint}); + return this.fakeFs.statSync(this.path, { bigint: this.bigint }); } catch (error) { const statInstance = this.bigint ? new BigIntStatsEntry() : new StatEntry(); return clearStats(statInstance); @@ -6891,16 +6965,16 @@ class CustomStatWatcher extends events.EventEmitter { if (areStatsEqual(currentStats, previousStats)) return; this.lastStats = currentStats; - this.emit(Event.Change, currentStats, previousStats); + this.emit("change" /* Change */, currentStats, previousStats); }, opts.interval); return opts.persistent ? interval : interval.unref(); } registerChangeListener(listener, opts) { - this.addListener(Event.Change, listener); + this.addListener("change" /* Change */, listener); this.changeListeners.set(listener, this.makeInterval(opts)); } unregisterChangeListener(listener) { - this.removeListener(Event.Change, listener); + this.removeListener("change" /* Change */, listener); const interval = this.changeListeners.get(listener); if (typeof interval !== `undefined`) clearInterval(interval); @@ -6926,7 +7000,7 @@ class CustomStatWatcher extends events.EventEmitter { } } -const statWatchersByFakeFS = new WeakMap(); +const statWatchersByFakeFS = /* @__PURE__ */ new WeakMap(); function watchFile(fakeFs, path, a, b) { let bigint; let persistent; @@ -6954,13 +7028,13 @@ function watchFile(fakeFs, path, a, b) { } let statWatchers = statWatchersByFakeFS.get(fakeFs); if (typeof statWatchers === `undefined`) - statWatchersByFakeFS.set(fakeFs, statWatchers = new Map()); + statWatchersByFakeFS.set(fakeFs, statWatchers = /* @__PURE__ */ new Map()); let statWatcher = statWatchers.get(path); if (typeof statWatcher === `undefined`) { - statWatcher = CustomStatWatcher.create(fakeFs, path, {bigint}); + statWatcher = CustomStatWatcher.create(fakeFs, path, { bigint }); statWatchers.set(path, statWatcher); } - statWatcher.registerChangeListener(listener, {persistent, interval}); + statWatcher.registerChangeListener(listener, { persistent, interval }); return statWatcher; } function unwatchFile(fakeFs, path, cb) { @@ -6988,27 +7062,11 @@ function unwatchAllFiles(fakeFs) { } } -var __defProp$3 = Object.defineProperty; -var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols; -var __hasOwnProp$4 = Object.prototype.hasOwnProperty; -var __propIsEnum$4 = Object.prototype.propertyIsEnumerable; -var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, {enumerable: true, configurable: true, writable: true, value}) : obj[key] = value; -var __spreadValues$3 = (a, b) => { - for (var prop in b || (b = {})) - if (__hasOwnProp$4.call(b, prop)) - __defNormalProp$3(a, prop, b[prop]); - if (__getOwnPropSymbols$4) - for (var prop of __getOwnPropSymbols$4(b)) { - if (__propIsEnum$4.call(b, prop)) - __defNormalProp$3(a, prop, b[prop]); - } - return a; -}; const DEFAULT_COMPRESSION_LEVEL = `mixed`; function toUnixTimestamp(time) { if (typeof time === `string` && String(+time) === time) return +time; - if (Number.isFinite(time)) { + if (typeof time === `number` && Number.isFinite(time)) { if (time < 0) { return Date.now() / 1e3; } else { @@ -7049,10 +7107,10 @@ class ZipFS extends BasePortableFakeFS { constructor(source, opts) { super(); this.lzSource = null; - this.listings = new Map(); - this.entries = new Map(); - this.fileSources = new Map(); - this.fds = new Map(); + this.listings = /* @__PURE__ */ new Map(); + this.entries = /* @__PURE__ */ new Map(); + this.fileSources = /* @__PURE__ */ new Map(); + this.fds = /* @__PURE__ */ new Map(); this.nextFd = 0; this.ready = false; this.readOnly = false; @@ -7061,7 +7119,7 @@ class ZipFS extends BasePortableFakeFS { this.level = typeof pathOptions.level !== `undefined` ? pathOptions.level : DEFAULT_COMPRESSION_LEVEL; source != null ? source : source = makeEmptyArchive(); if (typeof source === `string`) { - const {baseFs = new NodeFS()} = pathOptions; + const { baseFs = new NodeFS() } = pathOptions; this.baseFs = baseFs; this.path = source; } else { @@ -7114,7 +7172,7 @@ class ZipFS extends BasePortableFakeFS { } finally { this.libzip.free(errPtr); } - this.listings.set(PortablePath.root, new Set()); + this.listings.set(PortablePath.root, /* @__PURE__ */ new Set()); const entryCount = this.libzip.getNumEntries(this.zip, 0); for (let t = 0; t < entryCount; ++t) { const raw = this.libzip.getName(this.zip, t, 0); @@ -7160,6 +7218,10 @@ class ZipFS extends BasePortableFakeFS { this.prepareClose(); if (!this.lzSource) throw new Error(`ZipFS was not created from a Buffer`); + if (this.entries.size === 0) { + this.discardAndClose(); + return makeEmptyArchive(); + } try { this.libzip.source.keep(this.lzSource); if (this.libzip.close(this.zip) === -1) @@ -7211,7 +7273,7 @@ class ZipFS extends BasePortableFakeFS { const newMode = this.baseFs.existsSync(this.path) || this.stats.mode === DEFAULT_MODE ? void 0 : this.stats.mode; if (this.entries.size === 0) { this.discardAndClose(); - this.baseFs.writeFileSync(this.path, makeEmptyArchive(), {mode: newMode}); + this.baseFs.writeFileSync(this.path, makeEmptyArchive(), { mode: newMode }); } else { const rc = this.libzip.close(this.zip); if (rc === -1) @@ -7235,7 +7297,7 @@ class ZipFS extends BasePortableFakeFS { } openSync(p, flags, mode) { const fd = this.nextFd++; - this.fds.set(fd, {cursor: 0, p}); + this.fds.set(fd, { cursor: 0, p }); return fd; } hasOpenFileHandles() { @@ -7256,7 +7318,7 @@ class ZipFS extends BasePortableFakeFS { const onClose = () => { this.closeSync(fd); }; - return opendir(this, resolvedP, entries, {onClose}); + return opendir(this, resolvedP, entries, { onClose }); } async readPromise(fd, buffer, offset, length, position) { return this.readSync(fd, buffer, offset, length, position); @@ -7295,25 +7357,28 @@ class ZipFS extends BasePortableFakeFS { throw EBADF(`read`); this.fds.delete(fd); } - createReadStream(p, {encoding} = {}) { + createReadStream(p, { encoding } = {}) { if (p === null) throw new Error(`Unimplemented`); const fd = this.openSync(p, `r`); - const stream$1 = Object.assign(new stream.PassThrough({ - emitClose: true, - autoDestroy: true, - destroy: (error, callback) => { - clearImmediate(immediate); - this.closeSync(fd); - callback(error); - } - }), { - close() { - stream$1.destroy(); - }, - bytesRead: 0, - path: p - }); + const stream$1 = Object.assign( + new stream.PassThrough({ + emitClose: true, + autoDestroy: true, + destroy: (error, callback) => { + clearImmediate(immediate); + this.closeSync(fd); + callback(error); + } + }), + { + close() { + stream$1.destroy(); + }, + bytesRead: 0, + path: p + } + ); const immediate = setImmediate(async () => { try { const data = await this.readFilePromise(p, encoding); @@ -7325,37 +7390,40 @@ class ZipFS extends BasePortableFakeFS { }); return stream$1; } - createWriteStream(p, {encoding} = {}) { + createWriteStream(p, { encoding } = {}) { if (this.readOnly) throw EROFS(`open '${p}'`); if (p === null) throw new Error(`Unimplemented`); const chunks = []; const fd = this.openSync(p, `w`); - const stream$1 = Object.assign(new stream.PassThrough({ - autoDestroy: true, - emitClose: true, - destroy: (error, callback) => { - try { - if (error) { - callback(error); - } else { - this.writeFileSync(p, Buffer.concat(chunks), encoding); - callback(null); + const stream$1 = Object.assign( + new stream.PassThrough({ + autoDestroy: true, + emitClose: true, + destroy: (error, callback) => { + try { + if (error) { + callback(error); + } else { + this.writeFileSync(p, Buffer.concat(chunks), encoding); + callback(null); + } + } catch (err) { + callback(err); + } finally { + this.closeSync(fd); } - } catch (err) { - callback(err); - } finally { - this.closeSync(fd); + } + }), + { + bytesWritten: 0, + path: p, + close() { + stream$1.destroy(); } } - }), { - bytesWritten: 0, - path: p, - close() { - stream$1.destroy(); - } - }); + ); stream$1.on(`data`, (chunk) => { const chunkBuffer = Buffer.from(chunk); stream$1.bytesWritten += chunkBuffer.length; @@ -7384,10 +7452,12 @@ class ZipFS extends BasePortableFakeFS { } let resolvedP; try { - resolvedP = this.resolveFilename(`stat '${p}'`, p); + resolvedP = this.resolveFilename(`stat '${p}'`, p, void 0, false); } catch (error) { return false; } + if (resolvedP === void 0) + return false; return this.entries.has(resolvedP) || this.listings.has(resolvedP); } async accessPromise(p, mode) { @@ -7401,13 +7471,20 @@ class ZipFS extends BasePortableFakeFS { throw EROFS(`access '${p}'`); } } - async statPromise(p, opts) { - return this.statSync(p, opts); + async statPromise(p, opts = { bigint: false }) { + if (opts.bigint) + return this.statSync(p, { bigint: true }); + return this.statSync(p); } - statSync(p, opts) { - const resolvedP = this.resolveFilename(`stat '${p}'`, p); - if (!this.entries.has(resolvedP) && !this.listings.has(resolvedP)) + statSync(p, opts = { bigint: false, throwIfNoEntry: true }) { + const resolvedP = this.resolveFilename(`stat '${p}'`, p, void 0, opts.throwIfNoEntry); + if (resolvedP === void 0) + return void 0; + if (!this.entries.has(resolvedP) && !this.listings.has(resolvedP)) { + if (opts.throwIfNoEntry === false) + return void 0; throw ENOENT(`stat '${p}'`); + } if (p[p.length - 1] === `/` && !this.listings.has(resolvedP)) throw ENOTDIR(`stat '${p}'`); return this.statImpl(`stat '${p}'`, resolvedP, opts); @@ -7419,7 +7496,7 @@ class ZipFS extends BasePortableFakeFS { const entry = this.fds.get(fd); if (typeof entry === `undefined`) throw EBADF(`fstatSync`); - const {p} = entry; + const { p } = entry; const resolvedP = this.resolveFilename(`stat '${p}'`, p); if (!this.entries.has(resolvedP) && !this.listings.has(resolvedP)) throw ENOENT(`stat '${p}'`); @@ -7427,13 +7504,20 @@ class ZipFS extends BasePortableFakeFS { throw ENOTDIR(`stat '${p}'`); return this.statImpl(`fstat '${p}'`, resolvedP, opts); } - async lstatPromise(p, opts) { - return this.lstatSync(p, opts); - } - lstatSync(p, opts) { - const resolvedP = this.resolveFilename(`lstat '${p}'`, p, false); - if (!this.entries.has(resolvedP) && !this.listings.has(resolvedP)) + async lstatPromise(p, opts = { bigint: false }) { + if (opts.bigint) + return this.lstatSync(p, { bigint: true }); + return this.lstatSync(p); + } + lstatSync(p, opts = { bigint: false, throwIfNoEntry: true }) { + const resolvedP = this.resolveFilename(`lstat '${p}'`, p, false, opts.throwIfNoEntry); + if (resolvedP === void 0) + return void 0; + if (!this.entries.has(resolvedP) && !this.listings.has(resolvedP)) { + if (opts.throwIfNoEntry === false) + return void 0; throw ENOENT(`lstat '${p}'`); + } if (p[p.length - 1] === `/` && !this.listings.has(resolvedP)) throw ENOTDIR(`lstat '${p}'`); return this.statImpl(`lstat '${p}'`, resolvedP, opts); @@ -7462,7 +7546,7 @@ class ZipFS extends BasePortableFakeFS { const defaultMode = type === S_IFDIR ? 493 : 420; const mode = type | this.getUnixMode(entry, defaultMode) & 511; const crc = this.libzip.struct.statCrc(stat); - const statInstance = Object.assign(new StatEntry(), {uid, gid, size, blksize, blocks, atime, birthtime, ctime, mtime, atimeMs, birthtimeMs, ctimeMs, mtimeMs, mode, crc}); + const statInstance = Object.assign(new StatEntry(), { uid, gid, size, blksize, blocks, atime, birthtime, ctime, mtime, atimeMs, birthtimeMs, ctimeMs, mtimeMs, mode, crc }); return opts.bigint === true ? convertToBigIntStats(statInstance) : statInstance; } if (this.listings.has(p)) { @@ -7481,7 +7565,7 @@ class ZipFS extends BasePortableFakeFS { const mtime = new Date(mtimeMs); const mode = S_IFDIR | 493; const crc = 0; - const statInstance = Object.assign(new StatEntry(), {uid, gid, size, blksize, blocks, atime, birthtime, ctime, mtime, atimeMs, birthtimeMs, ctimeMs, mtimeMs, mode, crc}); + const statInstance = Object.assign(new StatEntry(), { uid, gid, size, blksize, blocks, atime, birthtime, ctime, mtime, atimeMs, birthtimeMs, ctimeMs, mtimeMs, mode, crc }); return opts.bigint === true ? convertToBigIntStats(statInstance) : statInstance; } throw new Error(`Unreachable`); @@ -7501,7 +7585,7 @@ class ZipFS extends BasePortableFakeFS { return existingListing; const parentListing = this.registerListing(ppath.dirname(p)); parentListing.add(ppath.basename(p)); - const newListing = new Set(); + const newListing = /* @__PURE__ */ new Set(); this.listings.set(p, newListing); return newListing; } @@ -7533,7 +7617,7 @@ class ZipFS extends BasePortableFakeFS { throw this.makeLibzipError(this.libzip.getError(this.zip)); } } - resolveFilename(reason, p, resolveLastComponent = true) { + resolveFilename(reason, p, resolveLastComponent = true, throwIfNoEntry = true) { if (!this.ready) throw EBUSY(`archive closed, ${reason}`); let resolvedP = ppath.resolve(PortablePath.root, p); @@ -7543,23 +7627,28 @@ class ZipFS extends BasePortableFakeFS { if (resolveLastComponent && fileIndex !== void 0) { if (this.symlinkCount !== 0 && this.isSymbolicLink(fileIndex)) { const target = this.getFileSource(fileIndex).toString(); - return this.resolveFilename(reason, ppath.resolve(ppath.dirname(resolvedP), target), true); + return this.resolveFilename(reason, ppath.resolve(ppath.dirname(resolvedP), target), true, throwIfNoEntry); } else { return resolvedP; } } while (true) { - const parentP = this.resolveFilename(reason, ppath.dirname(resolvedP), true); + const parentP = this.resolveFilename(reason, ppath.dirname(resolvedP), true, throwIfNoEntry); + if (parentP === void 0) + return parentP; const isDir = this.listings.has(parentP); const doesExist = this.entries.has(parentP); - if (!isDir && !doesExist) + if (!isDir && !doesExist) { + if (throwIfNoEntry === false) + return void 0; throw ENOENT(reason); + } if (!isDir) throw ENOTDIR(reason); resolvedP = ppath.resolve(parentP, ppath.basename(resolvedP)); if (!resolveLastComponent || this.symlinkCount === 0) break; - const index = this.libzip.name.locate(this.zip, resolvedP.slice(1)); + const index = this.libzip.name.locate(this.zip, resolvedP.slice(1), 0); if (index === -1) break; if (this.isSymbolicLink(index)) { @@ -7579,12 +7668,12 @@ class ZipFS extends BasePortableFakeFS { throw new Error(`Couldn't allocate enough memory`); const heap = new Uint8Array(this.libzip.HEAPU8.buffer, buffer, content.byteLength); heap.set(content); - return {buffer, byteLength: content.byteLength}; + return { buffer, byteLength: content.byteLength }; } allocateUnattachedSource(content) { const error = this.libzip.struct.errorS(); - const {buffer, byteLength} = this.allocateBuffer(content); - const source = this.libzip.source.fromUnattachedBuffer(buffer, byteLength, 0, true, error); + const { buffer, byteLength } = this.allocateBuffer(content); + const source = this.libzip.source.fromUnattachedBuffer(buffer, byteLength, 0, 1, error); if (source === 0) { this.libzip.free(error); throw this.makeLibzipError(error); @@ -7592,8 +7681,8 @@ class ZipFS extends BasePortableFakeFS { return source; } allocateSource(content) { - const {buffer, byteLength} = this.allocateBuffer(content); - const source = this.libzip.source.fromBuffer(this.zip, buffer, byteLength, 0, true); + const { buffer, byteLength } = this.allocateBuffer(content); + const source = this.libzip.source.fromBuffer(this.zip, buffer, byteLength, 0, 1); if (source === 0) { this.libzip.free(buffer); throw this.makeLibzipError(this.libzip.getError(this.zip)); @@ -7634,7 +7723,7 @@ class ZipFS extends BasePortableFakeFS { const attributes = this.libzip.getValue(this.libzip.uint32S, `i32`) >>> 16; return (attributes & S_IFMT) === S_IFLNK; } - getFileSource(index, opts = {asyncDecompress: false}) { + getFileSource(index, opts = { asyncDecompress: false }) { const cachedFileSource = this.fileSources.get(index); if (typeof cachedFileSource !== `undefined`) return cachedFileSource; @@ -7685,6 +7774,12 @@ class ZipFS extends BasePortableFakeFS { this.libzip.free(buffer); } } + async fchmodPromise(fd, mask) { + return this.chmodPromise(this.fdToPath(fd, `fchmod`), mask); + } + fchmodSync(fd, mask) { + return this.chmodSync(this.fdToPath(fd, `fchmodSync`), mask); + } async chmodPromise(p, mask) { return this.chmodSync(p, mask); } @@ -7703,6 +7798,12 @@ class ZipFS extends BasePortableFakeFS { throw this.makeLibzipError(this.libzip.getError(this.zip)); } } + async fchownPromise(fd, uid, gid) { + return this.chownPromise(this.fdToPath(fd, `fchown`), uid, gid); + } + fchownSync(fd, uid, gid) { + return this.chownSync(this.fdToPath(fd, `fchownSync`), uid, gid); + } async chownPromise(p, uid, gid) { return this.chownSync(p, uid, gid); } @@ -7716,15 +7817,15 @@ class ZipFS extends BasePortableFakeFS { throw new Error(`Unimplemented`); } async copyFilePromise(sourceP, destP, flags) { - const {indexSource, indexDest, resolvedDestP} = this.prepareCopyFile(sourceP, destP, flags); - const source = await this.getFileSource(indexSource, {asyncDecompress: true}); + const { indexSource, indexDest, resolvedDestP } = this.prepareCopyFile(sourceP, destP, flags); + const source = await this.getFileSource(indexSource, { asyncDecompress: true }); const newIndex = this.setFileSource(resolvedDestP, source); if (newIndex !== indexDest) { this.registerEntry(resolvedDestP, newIndex); } } copyFileSync(sourceP, destP, flags = 0) { - const {indexSource, indexDest, resolvedDestP} = this.prepareCopyFile(sourceP, destP, flags); + const { indexSource, indexDest, resolvedDestP } = this.prepareCopyFile(sourceP, destP, flags); const source = this.getFileSource(indexSource); const newIndex = this.setFileSource(resolvedDestP, source); if (newIndex !== indexDest) { @@ -7754,22 +7855,22 @@ class ZipFS extends BasePortableFakeFS { if (this.readOnly) throw EROFS(`open '${p}'`); if (typeof opts === `undefined`) - opts = {flag: `a`}; + opts = { flag: `a` }; else if (typeof opts === `string`) - opts = {flag: `a`, encoding: opts}; + opts = { flag: `a`, encoding: opts }; else if (typeof opts.flag === `undefined`) - opts = __spreadValues$3({flag: `a`}, opts); + opts = { flag: `a`, ...opts }; return this.writeFilePromise(p, content, opts); } appendFileSync(p, content, opts = {}) { if (this.readOnly) throw EROFS(`open '${p}'`); if (typeof opts === `undefined`) - opts = {flag: `a`}; + opts = { flag: `a` }; else if (typeof opts === `string`) - opts = {flag: `a`, encoding: opts}; + opts = { flag: `a`, encoding: opts }; else if (typeof opts.flag === `undefined`) - opts = __spreadValues$3({flag: `a`}, opts); + opts = { flag: `a`, ...opts }; return this.writeFileSync(p, content, opts); } fdToPath(fd, reason) { @@ -7780,9 +7881,9 @@ class ZipFS extends BasePortableFakeFS { return path; } async writeFilePromise(p, content, opts) { - const {encoding, mode, index, resolvedP} = this.prepareWriteFile(p, opts); + const { encoding, mode, index, resolvedP } = this.prepareWriteFile(p, opts); if (index !== void 0 && typeof opts === `object` && opts.flag && opts.flag.includes(`a`)) - content = Buffer.concat([await this.getFileSource(index, {asyncDecompress: true}), Buffer.from(content)]); + content = Buffer.concat([await this.getFileSource(index, { asyncDecompress: true }), Buffer.from(content)]); if (encoding !== null) content = content.toString(encoding); const newIndex = this.setFileSource(resolvedP, content); @@ -7793,7 +7894,7 @@ class ZipFS extends BasePortableFakeFS { } } writeFileSync(p, content, opts) { - const {encoding, mode, index, resolvedP} = this.prepareWriteFile(p, opts); + const { encoding, mode, index, resolvedP } = this.prepareWriteFile(p, opts); if (index !== void 0 && typeof opts === `object` && opts.flag && opts.flag.includes(`a`)) content = Buffer.concat([this.getFileSource(index), Buffer.from(content)]); if (encoding !== null) @@ -7878,11 +7979,9 @@ class ZipFS extends BasePortableFakeFS { async mkdirPromise(p, opts) { return this.mkdirSync(p, opts); } - mkdirSync(p, {mode = 493, recursive = false} = {}) { - if (recursive) { - this.mkdirpSync(p, {chmod: mode}); - return; - } + mkdirSync(p, { mode = 493, recursive = false } = {}) { + if (recursive) + return this.mkdirpSync(p, { chmod: mode }); if (this.readOnly) throw EROFS(`mkdir '${p}'`); const resolvedP = this.resolveFilename(`mkdir '${p}'`, p); @@ -7890,11 +7989,12 @@ class ZipFS extends BasePortableFakeFS { throw EEXIST(`mkdir '${p}'`); this.hydrateDirectory(resolvedP); this.chmodSync(resolvedP, mode); + return void 0; } async rmdirPromise(p, opts) { return this.rmdirSync(p, opts); } - rmdirSync(p, {recursive = false} = {}) { + rmdirSync(p, { recursive = false } = {}) { if (this.readOnly) throw EROFS(`rmdir '${p}'`); if (recursive) { @@ -7947,7 +8047,7 @@ class ZipFS extends BasePortableFakeFS { async readFilePromise(p, encoding) { if (typeof encoding === `object`) encoding = encoding ? encoding.encoding : void 0; - const data = await this.readFileBuffer(p, {asyncDecompress: true}); + const data = await this.readFileBuffer(p, { asyncDecompress: true }); return encoding ? data.toString(encoding) : data; } readFileSync(p, encoding) { @@ -7956,7 +8056,7 @@ class ZipFS extends BasePortableFakeFS { const data = this.readFileBuffer(p); return encoding ? data.toString(encoding) : data; } - readFileBuffer(p, opts = {asyncDecompress: false}) { + readFileBuffer(p, opts = { asyncDecompress: false }) { if (typeof p === `number`) p = this.fdToPath(p, `read`); const resolvedP = this.resolveFilename(`open '${p}'`, p); @@ -7992,7 +8092,7 @@ class ZipFS extends BasePortableFakeFS { } async readlinkPromise(p) { const entry = this.prepareReadlink(p); - return (await this.getFileSource(entry, {asyncDecompress: true})).toString(); + return (await this.getFileSource(entry, { asyncDecompress: true })).toString(); } readlinkSync(p) { const entry = this.prepareReadlink(p); @@ -8018,7 +8118,7 @@ class ZipFS extends BasePortableFakeFS { const index = this.entries.get(resolvedP); if (typeof index === `undefined`) throw EINVAL(`open '${p}'`); - const source = await this.getFileSource(index, {asyncDecompress: true}); + const source = await this.getFileSource(index, { asyncDecompress: true }); const truncated = Buffer.alloc(len, 0); source.copy(truncated); return await this.writeFilePromise(p, truncated); @@ -8033,6 +8133,12 @@ class ZipFS extends BasePortableFakeFS { source.copy(truncated); return this.writeFileSync(p, truncated); } + async ftruncatePromise(fd, len) { + return this.truncatePromise(this.fdToPath(fd, `ftruncate`), len); + } + ftruncateSync(fd, len) { + return this.truncateSync(this.fdToPath(fd, `ftruncateSync`), len); + } watch(p, a, b) { let persistent; switch (typeof a) { @@ -8045,20 +8151,20 @@ class ZipFS extends BasePortableFakeFS { break; default: { - ({persistent = true} = a); + ({ persistent = true } = a); } break; } if (!persistent) - return {on: () => { + return { on: () => { }, close: () => { - }}; + } }; const interval = setInterval(() => { }, 24 * 60 * 60 * 1e3); - return {on: () => { + return { on: () => { }, close: () => { clearInterval(interval); - }}; + } }; } watchFile(p, a, b) { const resolvedP = ppath.resolve(PortablePath.root, p); @@ -8087,10 +8193,10 @@ class ProxiedFS extends FakeFS { return this.baseFs.openSync(this.mapToBase(p), flags, mode); } async opendirPromise(p, opts) { - return Object.assign(await this.baseFs.opendirPromise(this.mapToBase(p), opts), {path: p}); + return Object.assign(await this.baseFs.opendirPromise(this.mapToBase(p), opts), { path: p }); } opendirSync(p, opts) { - return Object.assign(this.baseFs.opendirSync(this.mapToBase(p), opts), {path: p}); + return Object.assign(this.baseFs.opendirSync(this.mapToBase(p), opts), { path: p }); } async readPromise(fd, buffer, offset, length, position) { return await this.baseFs.readPromise(fd, buffer, offset, length, position); @@ -8154,18 +8260,30 @@ class ProxiedFS extends FakeFS { fstatSync(fd, opts) { return this.baseFs.fstatSync(fd, opts); } - async lstatPromise(p, opts) { + lstatPromise(p, opts) { return this.baseFs.lstatPromise(this.mapToBase(p), opts); } lstatSync(p, opts) { return this.baseFs.lstatSync(this.mapToBase(p), opts); } + async fchmodPromise(fd, mask) { + return this.baseFs.fchmodPromise(fd, mask); + } + fchmodSync(fd, mask) { + return this.baseFs.fchmodSync(fd, mask); + } async chmodPromise(p, mask) { return this.baseFs.chmodPromise(this.mapToBase(p), mask); } chmodSync(p, mask) { return this.baseFs.chmodSync(this.mapToBase(p), mask); } + async fchownPromise(fd, uid, gid) { + return this.baseFs.fchownPromise(fd, uid, gid); + } + fchownSync(fd, uid, gid) { + return this.baseFs.fchownSync(fd, uid, gid); + } async chownPromise(p, uid, gid) { return this.baseFs.chownPromise(this.mapToBase(p), uid, gid); } @@ -8274,11 +8392,25 @@ class ProxiedFS extends FakeFS { truncateSync(p, len) { return this.baseFs.truncateSync(this.mapToBase(p), len); } + async ftruncatePromise(fd, len) { + return this.baseFs.ftruncatePromise(fd, len); + } + ftruncateSync(fd, len) { + return this.baseFs.ftruncateSync(fd, len); + } watch(p, a, b) { - return this.baseFs.watch(this.mapToBase(p), a, b); + return this.baseFs.watch( + this.mapToBase(p), + a, + b + ); } watchFile(p, a, b) { - return this.baseFs.watchFile(this.mapToBase(p), a, b); + return this.baseFs.watchFile( + this.mapToBase(p), + a, + b + ); } unwatchFile(p, cb) { return this.baseFs.unwatchFile(this.mapToBase(p), cb); @@ -8309,6 +8441,10 @@ const NUMBER_REGEXP = /^[0-9]+$/; const VIRTUAL_REGEXP = /^(\/(?:[^/]+\/)*?(?:\$\$virtual|__virtual__))((?:\/((?:[^/]+-)?[a-f0-9]+)(?:\/([^/]+))?)?((?:\/.*)?))$/; const VALID_COMPONENT = /^([^/]+-)?[a-f0-9]+$/; class VirtualFS extends ProxiedFS { + constructor({ baseFs = new NodeFS() } = {}) { + super(ppath); + this.baseFs = baseFs; + } static makeVirtualPath(base, component, to) { if (ppath.basename(base) !== `__virtual__`) throw new Error(`Assertion failed: Virtual folders must be named "__virtual__"`); @@ -8338,10 +8474,6 @@ class VirtualFS extends ProxiedFS { const subpath = match[5] || `.`; return VirtualFS.resolveVirtual(ppath.join(target, backstep, subpath)); } - constructor({baseFs = new NodeFS()} = {}) { - super(ppath); - this.baseFs = baseFs; - } getExtractHint(hints) { return this.baseFs.getExtractHint(hints); } @@ -8380,7 +8512,8 @@ class VirtualFS extends ProxiedFS { } } -const ZIP_FD = 2147483648; +const ZIP_MASK = 4278190080; +const ZIP_MAGIC = 704643072; const getArchivePart = (path, extension) => { let idx = path.indexOf(extension); if (idx <= 0) @@ -8399,17 +8532,17 @@ const getArchivePart = (path, extension) => { return path.slice(0, nextCharIdx); }; class ZipOpenFS extends BasePortableFakeFS { - constructor({libzip, baseFs = new NodeFS(), filter = null, maxOpenFiles = Infinity, readOnlyArchives = false, useCache = true, maxAge = 5e3, fileExtensions = null}) { + constructor({ libzip, baseFs = new NodeFS(), filter = null, maxOpenFiles = Infinity, readOnlyArchives = false, useCache = true, maxAge = 5e3, fileExtensions = null }) { super(); - this.fdMap = new Map(); + this.fdMap = /* @__PURE__ */ new Map(); this.nextFd = 3; - this.isZip = new Set(); - this.notZip = new Set(); - this.realPaths = new Map(); + this.isZip = /* @__PURE__ */ new Set(); + this.notZip = /* @__PURE__ */ new Set(); + this.realPaths = /* @__PURE__ */ new Map(); this.limitOpenFilesTimeout = null; this.libzipFactory = typeof libzip !== `function` ? () => libzip : libzip; this.baseFs = baseFs; - this.zipInstances = useCache ? new Map() : null; + this.zipInstances = useCache ? /* @__PURE__ */ new Map() : null; this.filter = filter; this.maxOpenFiles = maxOpenFiles; this.readOnlyArchives = readOnlyArchives; @@ -8438,7 +8571,7 @@ class ZipOpenFS extends BasePortableFakeFS { saveAndClose() { unwatchAllFiles(this); if (this.zipInstances) { - for (const [path, {zipFs}] of this.zipInstances.entries()) { + for (const [path, { zipFs }] of this.zipInstances.entries()) { zipFs.saveAndClose(); this.zipInstances.delete(path); } @@ -8447,7 +8580,7 @@ class ZipOpenFS extends BasePortableFakeFS { discardAndClose() { unwatchAllFiles(this); if (this.zipInstances) { - for (const [path, {zipFs}] of this.zipInstances.entries()) { + for (const [path, { zipFs }] of this.zipInstances.entries()) { zipFs.discardAndClose(); this.zipInstances.delete(path); } @@ -8457,28 +8590,28 @@ class ZipOpenFS extends BasePortableFakeFS { return this.baseFs.resolve(p); } remapFd(zipFs, fd) { - const remappedFd = this.nextFd++ | ZIP_FD; + const remappedFd = this.nextFd++ | ZIP_MAGIC; this.fdMap.set(remappedFd, [zipFs, fd]); return remappedFd; } async openPromise(p, flags, mode) { return await this.makeCallPromise(p, async () => { return await this.baseFs.openPromise(p, flags, mode); - }, async (zipFs, {subPath}) => { + }, async (zipFs, { subPath }) => { return this.remapFd(zipFs, await zipFs.openPromise(subPath, flags, mode)); }); } openSync(p, flags, mode) { return this.makeCallSync(p, () => { return this.baseFs.openSync(p, flags, mode); - }, (zipFs, {subPath}) => { + }, (zipFs, { subPath }) => { return this.remapFd(zipFs, zipFs.openSync(subPath, flags, mode)); }); } async opendirPromise(p, opts) { return await this.makeCallPromise(p, async () => { return await this.baseFs.opendirPromise(p, opts); - }, async (zipFs, {subPath}) => { + }, async (zipFs, { subPath }) => { return await zipFs.opendirPromise(subPath, opts); }, { requireSubpath: false @@ -8487,14 +8620,14 @@ class ZipOpenFS extends BasePortableFakeFS { opendirSync(p, opts) { return this.makeCallSync(p, () => { return this.baseFs.opendirSync(p, opts); - }, (zipFs, {subPath}) => { + }, (zipFs, { subPath }) => { return zipFs.opendirSync(subPath, opts); }, { requireSubpath: false }); } async readPromise(fd, buffer, offset, length, position) { - if ((fd & ZIP_FD) === 0) + if ((fd & ZIP_MASK) !== ZIP_MAGIC) return await this.baseFs.readPromise(fd, buffer, offset, length, position); const entry = this.fdMap.get(fd); if (typeof entry === `undefined`) @@ -8503,7 +8636,7 @@ class ZipOpenFS extends BasePortableFakeFS { return await zipFs.readPromise(realFd, buffer, offset, length, position); } readSync(fd, buffer, offset, length, position) { - if ((fd & ZIP_FD) === 0) + if ((fd & ZIP_MASK) !== ZIP_MAGIC) return this.baseFs.readSync(fd, buffer, offset, length, position); const entry = this.fdMap.get(fd); if (typeof entry === `undefined`) @@ -8512,7 +8645,7 @@ class ZipOpenFS extends BasePortableFakeFS { return zipFs.readSync(realFd, buffer, offset, length, position); } async writePromise(fd, buffer, offset, length, position) { - if ((fd & ZIP_FD) === 0) { + if ((fd & ZIP_MASK) !== ZIP_MAGIC) { if (typeof buffer === `string`) { return await this.baseFs.writePromise(fd, buffer, offset); } else { @@ -8530,7 +8663,7 @@ class ZipOpenFS extends BasePortableFakeFS { } } writeSync(fd, buffer, offset, length, position) { - if ((fd & ZIP_FD) === 0) { + if ((fd & ZIP_MASK) !== ZIP_MAGIC) { if (typeof buffer === `string`) { return this.baseFs.writeSync(fd, buffer, offset); } else { @@ -8548,7 +8681,7 @@ class ZipOpenFS extends BasePortableFakeFS { } } async closePromise(fd) { - if ((fd & ZIP_FD) === 0) + if ((fd & ZIP_MASK) !== ZIP_MAGIC) return await this.baseFs.closePromise(fd); const entry = this.fdMap.get(fd); if (typeof entry === `undefined`) @@ -8558,7 +8691,7 @@ class ZipOpenFS extends BasePortableFakeFS { return await zipFs.closePromise(realFd); } closeSync(fd) { - if ((fd & ZIP_FD) === 0) + if ((fd & ZIP_MASK) !== ZIP_MAGIC) return this.baseFs.closeSync(fd); const entry = this.fdMap.get(fd); if (typeof entry === `undefined`) @@ -8572,7 +8705,7 @@ class ZipOpenFS extends BasePortableFakeFS { return this.baseFs.createReadStream(p, opts); return this.makeCallSync(p, () => { return this.baseFs.createReadStream(p, opts); - }, (zipFs, {archivePath, subPath}) => { + }, (zipFs, { archivePath, subPath }) => { const stream = zipFs.createReadStream(subPath, opts); stream.path = npath.fromPortablePath(this.pathUtils.join(archivePath, subPath)); return stream; @@ -8583,14 +8716,14 @@ class ZipOpenFS extends BasePortableFakeFS { return this.baseFs.createWriteStream(p, opts); return this.makeCallSync(p, () => { return this.baseFs.createWriteStream(p, opts); - }, (zipFs, {subPath}) => { + }, (zipFs, { subPath }) => { return zipFs.createWriteStream(subPath, opts); }); } async realpathPromise(p) { return await this.makeCallPromise(p, async () => { return await this.baseFs.realpathPromise(p); - }, async (zipFs, {archivePath, subPath}) => { + }, async (zipFs, { archivePath, subPath }) => { let realArchivePath = this.realPaths.get(archivePath); if (typeof realArchivePath === `undefined`) { realArchivePath = await this.baseFs.realpathPromise(archivePath); @@ -8602,7 +8735,7 @@ class ZipOpenFS extends BasePortableFakeFS { realpathSync(p) { return this.makeCallSync(p, () => { return this.baseFs.realpathSync(p); - }, (zipFs, {archivePath, subPath}) => { + }, (zipFs, { archivePath, subPath }) => { let realArchivePath = this.realPaths.get(archivePath); if (typeof realArchivePath === `undefined`) { realArchivePath = this.baseFs.realpathSync(archivePath); @@ -8614,47 +8747,47 @@ class ZipOpenFS extends BasePortableFakeFS { async existsPromise(p) { return await this.makeCallPromise(p, async () => { return await this.baseFs.existsPromise(p); - }, async (zipFs, {subPath}) => { + }, async (zipFs, { subPath }) => { return await zipFs.existsPromise(subPath); }); } existsSync(p) { return this.makeCallSync(p, () => { return this.baseFs.existsSync(p); - }, (zipFs, {subPath}) => { + }, (zipFs, { subPath }) => { return zipFs.existsSync(subPath); }); } async accessPromise(p, mode) { return await this.makeCallPromise(p, async () => { return await this.baseFs.accessPromise(p, mode); - }, async (zipFs, {subPath}) => { + }, async (zipFs, { subPath }) => { return await zipFs.accessPromise(subPath, mode); }); } accessSync(p, mode) { return this.makeCallSync(p, () => { return this.baseFs.accessSync(p, mode); - }, (zipFs, {subPath}) => { + }, (zipFs, { subPath }) => { return zipFs.accessSync(subPath, mode); }); } async statPromise(p, opts) { return await this.makeCallPromise(p, async () => { return await this.baseFs.statPromise(p, opts); - }, async (zipFs, {subPath}) => { + }, async (zipFs, { subPath }) => { return await zipFs.statPromise(subPath, opts); }); } statSync(p, opts) { return this.makeCallSync(p, () => { return this.baseFs.statSync(p, opts); - }, (zipFs, {subPath}) => { + }, (zipFs, { subPath }) => { return zipFs.statSync(subPath, opts); }); } async fstatPromise(fd, opts) { - if ((fd & ZIP_FD) === 0) + if ((fd & ZIP_MASK) !== ZIP_MAGIC) return this.baseFs.fstatPromise(fd, opts); const entry = this.fdMap.get(fd); if (typeof entry === `undefined`) @@ -8663,7 +8796,7 @@ class ZipOpenFS extends BasePortableFakeFS { return zipFs.fstatPromise(realFd, opts); } fstatSync(fd, opts) { - if ((fd & ZIP_FD) === 0) + if ((fd & ZIP_MASK) !== ZIP_MAGIC) return this.baseFs.fstatSync(fd, opts); const entry = this.fdMap.get(fd); if (typeof entry === `undefined`) @@ -8674,42 +8807,78 @@ class ZipOpenFS extends BasePortableFakeFS { async lstatPromise(p, opts) { return await this.makeCallPromise(p, async () => { return await this.baseFs.lstatPromise(p, opts); - }, async (zipFs, {subPath}) => { + }, async (zipFs, { subPath }) => { return await zipFs.lstatPromise(subPath, opts); }); } lstatSync(p, opts) { return this.makeCallSync(p, () => { return this.baseFs.lstatSync(p, opts); - }, (zipFs, {subPath}) => { + }, (zipFs, { subPath }) => { return zipFs.lstatSync(subPath, opts); }); } + async fchmodPromise(fd, mask) { + if ((fd & ZIP_MASK) !== ZIP_MAGIC) + return this.baseFs.fchmodPromise(fd, mask); + const entry = this.fdMap.get(fd); + if (typeof entry === `undefined`) + throw EBADF(`fchmod`); + const [zipFs, realFd] = entry; + return zipFs.fchmodPromise(realFd, mask); + } + fchmodSync(fd, mask) { + if ((fd & ZIP_MASK) !== ZIP_MAGIC) + return this.baseFs.fchmodSync(fd, mask); + const entry = this.fdMap.get(fd); + if (typeof entry === `undefined`) + throw EBADF(`fchmodSync`); + const [zipFs, realFd] = entry; + return zipFs.fchmodSync(realFd, mask); + } async chmodPromise(p, mask) { return await this.makeCallPromise(p, async () => { return await this.baseFs.chmodPromise(p, mask); - }, async (zipFs, {subPath}) => { + }, async (zipFs, { subPath }) => { return await zipFs.chmodPromise(subPath, mask); }); } chmodSync(p, mask) { return this.makeCallSync(p, () => { return this.baseFs.chmodSync(p, mask); - }, (zipFs, {subPath}) => { + }, (zipFs, { subPath }) => { return zipFs.chmodSync(subPath, mask); }); } + async fchownPromise(fd, uid, gid) { + if ((fd & ZIP_MASK) !== ZIP_MAGIC) + return this.baseFs.fchownPromise(fd, uid, gid); + const entry = this.fdMap.get(fd); + if (typeof entry === `undefined`) + throw EBADF(`fchown`); + const [zipFs, realFd] = entry; + return zipFs.fchownPromise(realFd, uid, gid); + } + fchownSync(fd, uid, gid) { + if ((fd & ZIP_MASK) !== ZIP_MAGIC) + return this.baseFs.fchownSync(fd, uid, gid); + const entry = this.fdMap.get(fd); + if (typeof entry === `undefined`) + throw EBADF(`fchownSync`); + const [zipFs, realFd] = entry; + return zipFs.fchownSync(realFd, uid, gid); + } async chownPromise(p, uid, gid) { return await this.makeCallPromise(p, async () => { return await this.baseFs.chownPromise(p, uid, gid); - }, async (zipFs, {subPath}) => { + }, async (zipFs, { subPath }) => { return await zipFs.chownPromise(subPath, uid, gid); }); } chownSync(p, uid, gid) { return this.makeCallSync(p, () => { return this.baseFs.chownSync(p, uid, gid); - }, (zipFs, {subPath}) => { + }, (zipFs, { subPath }) => { return zipFs.chownSync(subPath, uid, gid); }); } @@ -8718,14 +8887,14 @@ class ZipOpenFS extends BasePortableFakeFS { return await this.makeCallPromise(newP, async () => { return await this.baseFs.renamePromise(oldP, newP); }, async () => { - throw Object.assign(new Error(`EEXDEV: cross-device link not permitted`), {code: `EEXDEV`}); + throw Object.assign(new Error(`EEXDEV: cross-device link not permitted`), { code: `EEXDEV` }); }); - }, async (zipFsO, {subPath: subPathO}) => { + }, async (zipFsO, { subPath: subPathO }) => { return await this.makeCallPromise(newP, async () => { - throw Object.assign(new Error(`EEXDEV: cross-device link not permitted`), {code: `EEXDEV`}); - }, async (zipFsN, {subPath: subPathN}) => { + throw Object.assign(new Error(`EEXDEV: cross-device link not permitted`), { code: `EEXDEV` }); + }, async (zipFsN, { subPath: subPathN }) => { if (zipFsO !== zipFsN) { - throw Object.assign(new Error(`EEXDEV: cross-device link not permitted`), {code: `EEXDEV`}); + throw Object.assign(new Error(`EEXDEV: cross-device link not permitted`), { code: `EEXDEV` }); } else { return await zipFsO.renamePromise(subPathO, subPathN); } @@ -8737,14 +8906,14 @@ class ZipOpenFS extends BasePortableFakeFS { return this.makeCallSync(newP, () => { return this.baseFs.renameSync(oldP, newP); }, () => { - throw Object.assign(new Error(`EEXDEV: cross-device link not permitted`), {code: `EEXDEV`}); + throw Object.assign(new Error(`EEXDEV: cross-device link not permitted`), { code: `EEXDEV` }); }); - }, (zipFsO, {subPath: subPathO}) => { + }, (zipFsO, { subPath: subPathO }) => { return this.makeCallSync(newP, () => { - throw Object.assign(new Error(`EEXDEV: cross-device link not permitted`), {code: `EEXDEV`}); - }, (zipFsN, {subPath: subPathN}) => { + throw Object.assign(new Error(`EEXDEV: cross-device link not permitted`), { code: `EEXDEV` }); + }, (zipFsN, { subPath: subPathN }) => { if (zipFsO !== zipFsN) { - throw Object.assign(new Error(`EEXDEV: cross-device link not permitted`), {code: `EEXDEV`}); + throw Object.assign(new Error(`EEXDEV: cross-device link not permitted`), { code: `EEXDEV` }); } else { return zipFsO.renameSync(subPathO, subPathN); } @@ -8754,27 +8923,27 @@ class ZipOpenFS extends BasePortableFakeFS { async copyFilePromise(sourceP, destP, flags = 0) { const fallback = async (sourceFs, sourceP2, destFs, destP2) => { if ((flags & fs.constants.COPYFILE_FICLONE_FORCE) !== 0) - throw Object.assign(new Error(`EXDEV: cross-device clone not permitted, copyfile '${sourceP2}' -> ${destP2}'`), {code: `EXDEV`}); + throw Object.assign(new Error(`EXDEV: cross-device clone not permitted, copyfile '${sourceP2}' -> ${destP2}'`), { code: `EXDEV` }); if (flags & fs.constants.COPYFILE_EXCL && await this.existsPromise(sourceP2)) - throw Object.assign(new Error(`EEXIST: file already exists, copyfile '${sourceP2}' -> '${destP2}'`), {code: `EEXIST`}); + throw Object.assign(new Error(`EEXIST: file already exists, copyfile '${sourceP2}' -> '${destP2}'`), { code: `EEXIST` }); let content; try { content = await sourceFs.readFilePromise(sourceP2); } catch (error) { - throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${sourceP2}' -> '${destP2}'`), {code: `EINVAL`}); + throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${sourceP2}' -> '${destP2}'`), { code: `EINVAL` }); } await destFs.writeFilePromise(destP2, content); }; return await this.makeCallPromise(sourceP, async () => { return await this.makeCallPromise(destP, async () => { return await this.baseFs.copyFilePromise(sourceP, destP, flags); - }, async (zipFsD, {subPath: subPathD}) => { + }, async (zipFsD, { subPath: subPathD }) => { return await fallback(this.baseFs, sourceP, zipFsD, subPathD); }); - }, async (zipFsS, {subPath: subPathS}) => { + }, async (zipFsS, { subPath: subPathS }) => { return await this.makeCallPromise(destP, async () => { return await fallback(zipFsS, subPathS, this.baseFs, destP); - }, async (zipFsD, {subPath: subPathD}) => { + }, async (zipFsD, { subPath: subPathD }) => { if (zipFsS !== zipFsD) { return await fallback(zipFsS, subPathS, zipFsD, subPathD); } else { @@ -8786,27 +8955,27 @@ class ZipOpenFS extends BasePortableFakeFS { copyFileSync(sourceP, destP, flags = 0) { const fallback = (sourceFs, sourceP2, destFs, destP2) => { if ((flags & fs.constants.COPYFILE_FICLONE_FORCE) !== 0) - throw Object.assign(new Error(`EXDEV: cross-device clone not permitted, copyfile '${sourceP2}' -> ${destP2}'`), {code: `EXDEV`}); + throw Object.assign(new Error(`EXDEV: cross-device clone not permitted, copyfile '${sourceP2}' -> ${destP2}'`), { code: `EXDEV` }); if (flags & fs.constants.COPYFILE_EXCL && this.existsSync(sourceP2)) - throw Object.assign(new Error(`EEXIST: file already exists, copyfile '${sourceP2}' -> '${destP2}'`), {code: `EEXIST`}); + throw Object.assign(new Error(`EEXIST: file already exists, copyfile '${sourceP2}' -> '${destP2}'`), { code: `EEXIST` }); let content; try { content = sourceFs.readFileSync(sourceP2); } catch (error) { - throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${sourceP2}' -> '${destP2}'`), {code: `EINVAL`}); + throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${sourceP2}' -> '${destP2}'`), { code: `EINVAL` }); } destFs.writeFileSync(destP2, content); }; return this.makeCallSync(sourceP, () => { return this.makeCallSync(destP, () => { return this.baseFs.copyFileSync(sourceP, destP, flags); - }, (zipFsD, {subPath: subPathD}) => { + }, (zipFsD, { subPath: subPathD }) => { return fallback(this.baseFs, sourceP, zipFsD, subPathD); }); - }, (zipFsS, {subPath: subPathS}) => { + }, (zipFsS, { subPath: subPathS }) => { return this.makeCallSync(destP, () => { return fallback(zipFsS, subPathS, this.baseFs, destP); - }, (zipFsD, {subPath: subPathD}) => { + }, (zipFsD, { subPath: subPathD }) => { if (zipFsS !== zipFsD) { return fallback(zipFsS, subPathS, zipFsD, subPathD); } else { @@ -8818,112 +8987,112 @@ class ZipOpenFS extends BasePortableFakeFS { async appendFilePromise(p, content, opts) { return await this.makeCallPromise(p, async () => { return await this.baseFs.appendFilePromise(p, content, opts); - }, async (zipFs, {subPath}) => { + }, async (zipFs, { subPath }) => { return await zipFs.appendFilePromise(subPath, content, opts); }); } appendFileSync(p, content, opts) { return this.makeCallSync(p, () => { return this.baseFs.appendFileSync(p, content, opts); - }, (zipFs, {subPath}) => { + }, (zipFs, { subPath }) => { return zipFs.appendFileSync(subPath, content, opts); }); } async writeFilePromise(p, content, opts) { return await this.makeCallPromise(p, async () => { return await this.baseFs.writeFilePromise(p, content, opts); - }, async (zipFs, {subPath}) => { + }, async (zipFs, { subPath }) => { return await zipFs.writeFilePromise(subPath, content, opts); }); } writeFileSync(p, content, opts) { return this.makeCallSync(p, () => { return this.baseFs.writeFileSync(p, content, opts); - }, (zipFs, {subPath}) => { + }, (zipFs, { subPath }) => { return zipFs.writeFileSync(subPath, content, opts); }); } async unlinkPromise(p) { return await this.makeCallPromise(p, async () => { return await this.baseFs.unlinkPromise(p); - }, async (zipFs, {subPath}) => { + }, async (zipFs, { subPath }) => { return await zipFs.unlinkPromise(subPath); }); } unlinkSync(p) { return this.makeCallSync(p, () => { return this.baseFs.unlinkSync(p); - }, (zipFs, {subPath}) => { + }, (zipFs, { subPath }) => { return zipFs.unlinkSync(subPath); }); } async utimesPromise(p, atime, mtime) { return await this.makeCallPromise(p, async () => { return await this.baseFs.utimesPromise(p, atime, mtime); - }, async (zipFs, {subPath}) => { + }, async (zipFs, { subPath }) => { return await zipFs.utimesPromise(subPath, atime, mtime); }); } utimesSync(p, atime, mtime) { return this.makeCallSync(p, () => { return this.baseFs.utimesSync(p, atime, mtime); - }, (zipFs, {subPath}) => { + }, (zipFs, { subPath }) => { return zipFs.utimesSync(subPath, atime, mtime); }); } async mkdirPromise(p, opts) { return await this.makeCallPromise(p, async () => { return await this.baseFs.mkdirPromise(p, opts); - }, async (zipFs, {subPath}) => { + }, async (zipFs, { subPath }) => { return await zipFs.mkdirPromise(subPath, opts); }); } mkdirSync(p, opts) { return this.makeCallSync(p, () => { return this.baseFs.mkdirSync(p, opts); - }, (zipFs, {subPath}) => { + }, (zipFs, { subPath }) => { return zipFs.mkdirSync(subPath, opts); }); } async rmdirPromise(p, opts) { return await this.makeCallPromise(p, async () => { return await this.baseFs.rmdirPromise(p, opts); - }, async (zipFs, {subPath}) => { + }, async (zipFs, { subPath }) => { return await zipFs.rmdirPromise(subPath, opts); }); } rmdirSync(p, opts) { return this.makeCallSync(p, () => { return this.baseFs.rmdirSync(p, opts); - }, (zipFs, {subPath}) => { + }, (zipFs, { subPath }) => { return zipFs.rmdirSync(subPath, opts); }); } async linkPromise(existingP, newP) { return await this.makeCallPromise(newP, async () => { return await this.baseFs.linkPromise(existingP, newP); - }, async (zipFs, {subPath}) => { + }, async (zipFs, { subPath }) => { return await zipFs.linkPromise(existingP, subPath); }); } linkSync(existingP, newP) { return this.makeCallSync(newP, () => { return this.baseFs.linkSync(existingP, newP); - }, (zipFs, {subPath}) => { + }, (zipFs, { subPath }) => { return zipFs.linkSync(existingP, subPath); }); } async symlinkPromise(target, p, type) { return await this.makeCallPromise(p, async () => { return await this.baseFs.symlinkPromise(target, p, type); - }, async (zipFs, {subPath}) => { + }, async (zipFs, { subPath }) => { return await zipFs.symlinkPromise(target, subPath); }); } symlinkSync(target, p, type) { return this.makeCallSync(p, () => { return this.baseFs.symlinkSync(target, p, type); - }, (zipFs, {subPath}) => { + }, (zipFs, { subPath }) => { return zipFs.symlinkSync(target, subPath); }); } @@ -8935,7 +9104,7 @@ class ZipOpenFS extends BasePortableFakeFS { default: return await this.baseFs.readFilePromise(p, encoding); } - }, async (zipFs, {subPath}) => { + }, async (zipFs, { subPath }) => { return await zipFs.readFilePromise(subPath, encoding); }); } @@ -8947,14 +9116,14 @@ class ZipOpenFS extends BasePortableFakeFS { default: return this.baseFs.readFileSync(p, encoding); } - }, (zipFs, {subPath}) => { + }, (zipFs, { subPath }) => { return zipFs.readFileSync(subPath, encoding); }); } async readdirPromise(p, opts) { return await this.makeCallPromise(p, async () => { return await this.baseFs.readdirPromise(p, opts); - }, async (zipFs, {subPath}) => { + }, async (zipFs, { subPath }) => { return await zipFs.readdirPromise(subPath, opts); }, { requireSubpath: false @@ -8963,7 +9132,7 @@ class ZipOpenFS extends BasePortableFakeFS { readdirSync(p, opts) { return this.makeCallSync(p, () => { return this.baseFs.readdirSync(p, opts); - }, (zipFs, {subPath}) => { + }, (zipFs, { subPath }) => { return zipFs.readdirSync(subPath, opts); }, { requireSubpath: false @@ -8972,41 +9141,71 @@ class ZipOpenFS extends BasePortableFakeFS { async readlinkPromise(p) { return await this.makeCallPromise(p, async () => { return await this.baseFs.readlinkPromise(p); - }, async (zipFs, {subPath}) => { + }, async (zipFs, { subPath }) => { return await zipFs.readlinkPromise(subPath); }); } readlinkSync(p) { return this.makeCallSync(p, () => { return this.baseFs.readlinkSync(p); - }, (zipFs, {subPath}) => { + }, (zipFs, { subPath }) => { return zipFs.readlinkSync(subPath); }); } async truncatePromise(p, len) { return await this.makeCallPromise(p, async () => { return await this.baseFs.truncatePromise(p, len); - }, async (zipFs, {subPath}) => { + }, async (zipFs, { subPath }) => { return await zipFs.truncatePromise(subPath, len); }); } truncateSync(p, len) { return this.makeCallSync(p, () => { return this.baseFs.truncateSync(p, len); - }, (zipFs, {subPath}) => { + }, (zipFs, { subPath }) => { return zipFs.truncateSync(subPath, len); }); } + async ftruncatePromise(fd, len) { + if ((fd & ZIP_MASK) !== ZIP_MAGIC) + return this.baseFs.ftruncatePromise(fd, len); + const entry = this.fdMap.get(fd); + if (typeof entry === `undefined`) + throw EBADF(`ftruncate`); + const [zipFs, realFd] = entry; + return zipFs.ftruncatePromise(realFd, len); + } + ftruncateSync(fd, len) { + if ((fd & ZIP_MASK) !== ZIP_MAGIC) + return this.baseFs.ftruncateSync(fd, len); + const entry = this.fdMap.get(fd); + if (typeof entry === `undefined`) + throw EBADF(`ftruncateSync`); + const [zipFs, realFd] = entry; + return zipFs.ftruncateSync(realFd, len); + } watch(p, a, b) { return this.makeCallSync(p, () => { - return this.baseFs.watch(p, a, b); - }, (zipFs, {subPath}) => { - return zipFs.watch(subPath, a, b); + return this.baseFs.watch( + p, + a, + b + ); + }, (zipFs, { subPath }) => { + return zipFs.watch( + subPath, + a, + b + ); }); } watchFile(p, a, b) { return this.makeCallSync(p, () => { - return this.baseFs.watchFile(p, a, b); + return this.baseFs.watchFile( + p, + a, + b + ); }, () => { return watchFile(this, p, a, b); }); @@ -9018,7 +9217,7 @@ class ZipOpenFS extends BasePortableFakeFS { return unwatchFile(this, p, cb); }); } - async makeCallPromise(p, discard, accept, {requireSubpath = true} = {}) { + async makeCallPromise(p, discard, accept, { requireSubpath = true } = {}) { if (typeof p !== `string`) return await discard(); const normalizedP = this.resolve(p); @@ -9029,7 +9228,7 @@ class ZipOpenFS extends BasePortableFakeFS { return await discard(); return await this.getZipPromise(zipInfo.archivePath, async (zipFs) => await accept(zipFs, zipInfo)); } - makeCallSync(p, discard, accept, {requireSubpath = true} = {}) { + makeCallSync(p, discard, accept, { requireSubpath = true } = {}) { if (typeof p !== `string`) return discard(); const normalizedP = this.resolve(p); @@ -9085,7 +9284,7 @@ class ZipOpenFS extends BasePortableFakeFS { const now = Date.now(); let nextExpiresAt = now + this.maxAge; let closeCount = max === null ? 0 : this.zipInstances.size - max; - for (const [path, {zipFs, expiresAt, refCount}] of this.zipInstances.entries()) { + for (const [path, { zipFs, expiresAt, refCount }] of this.zipInstances.entries()) { if (refCount !== 0 || zipFs.hasOpenFileHandles()) { continue; } else if (now >= expiresAt) { @@ -9177,30 +9376,261 @@ class ZipOpenFS extends BasePortableFakeFS { } } } -} - -class URLFS extends ProxiedFS { - constructor(baseFs) { - super(npath); - this.baseFs = baseFs; +} + +class NodePathFS extends ProxiedFS { + constructor(baseFs) { + super(npath); + this.baseFs = baseFs; + } + mapFromBase(path) { + return path; + } + mapToBase(path) { + if (typeof path === `string`) + return path; + if (path instanceof url.URL) + return url.fileURLToPath(path); + if (Buffer.isBuffer(path)) { + const str = path.toString(); + if (Buffer.byteLength(str) !== path.byteLength) + throw new Error(`Non-utf8 buffers are not supported at the moment. Please upvote the following issue if you encounter this error: https://github.com/yarnpkg/berry/issues/4942`); + return str; + } + throw new Error(`Unsupported path type: ${nodeUtils.inspect(path)}`); + } +} + +var _a, _b, _c, _d; +const kBaseFs = Symbol(`kBaseFs`); +const kFd = Symbol(`kFd`); +const kClosePromise = Symbol(`kClosePromise`); +const kCloseResolve = Symbol(`kCloseResolve`); +const kCloseReject = Symbol(`kCloseReject`); +const kRefs = Symbol(`kRefs`); +const kRef = Symbol(`kRef`); +const kUnref = Symbol(`kUnref`); +class FileHandle { + constructor(fd, baseFs) { + this[_a] = 1; + this[_b] = void 0; + this[_c] = void 0; + this[_d] = void 0; + this[kBaseFs] = baseFs; + this[kFd] = fd; + } + get fd() { + return this[kFd]; + } + async appendFile(data, options) { + var _a2; + try { + this[kRef](this.appendFile); + const encoding = (_a2 = typeof options === `string` ? options : options == null ? void 0 : options.encoding) != null ? _a2 : void 0; + return await this[kBaseFs].appendFilePromise(this.fd, data, encoding ? { encoding } : void 0); + } finally { + this[kUnref](); + } + } + async chown(uid, gid) { + try { + this[kRef](this.chown); + return await this[kBaseFs].fchownPromise(this.fd, uid, gid); + } finally { + this[kUnref](); + } + } + async chmod(mode) { + try { + this[kRef](this.chmod); + return await this[kBaseFs].fchmodPromise(this.fd, mode); + } finally { + this[kUnref](); + } + } + createReadStream(options) { + return this[kBaseFs].createReadStream(null, { ...options, fd: this.fd }); + } + createWriteStream(options) { + return this[kBaseFs].createWriteStream(null, { ...options, fd: this.fd }); + } + datasync() { + throw new Error(`Method not implemented.`); + } + sync() { + throw new Error(`Method not implemented.`); + } + async read(bufferOrOptions, offset, length, position) { + var _a2, _b2, _c2; + try { + this[kRef](this.read); + let buffer; + if (!Buffer.isBuffer(bufferOrOptions)) { + bufferOrOptions != null ? bufferOrOptions : bufferOrOptions = {}; + buffer = (_a2 = bufferOrOptions.buffer) != null ? _a2 : Buffer.alloc(16384); + offset = bufferOrOptions.offset || 0; + length = (_b2 = bufferOrOptions.length) != null ? _b2 : buffer.byteLength; + position = (_c2 = bufferOrOptions.position) != null ? _c2 : null; + } else { + buffer = bufferOrOptions; + } + offset != null ? offset : offset = 0; + length != null ? length : length = 0; + if (length === 0) { + return { + bytesRead: length, + buffer + }; + } + const bytesRead = await this[kBaseFs].readPromise(this.fd, buffer, offset, length, position); + return { + bytesRead, + buffer + }; + } finally { + this[kUnref](); + } + } + async readFile(options) { + var _a2; + try { + this[kRef](this.readFile); + const encoding = (_a2 = typeof options === `string` ? options : options == null ? void 0 : options.encoding) != null ? _a2 : void 0; + return await this[kBaseFs].readFilePromise(this.fd, encoding); + } finally { + this[kUnref](); + } + } + readLines(options) { + return readline.createInterface({ + input: this.createReadStream(options), + crlfDelay: Infinity + }); + } + async stat(opts) { + try { + this[kRef](this.stat); + return await this[kBaseFs].fstatPromise(this.fd, opts); + } finally { + this[kUnref](); + } + } + async truncate(len) { + try { + this[kRef](this.truncate); + return await this[kBaseFs].ftruncatePromise(this.fd, len); + } finally { + this[kUnref](); + } + } + utimes(atime, mtime) { + throw new Error(`Method not implemented.`); + } + async writeFile(data, options) { + var _a2; + try { + this[kRef](this.writeFile); + const encoding = (_a2 = typeof options === `string` ? options : options == null ? void 0 : options.encoding) != null ? _a2 : void 0; + await this[kBaseFs].writeFilePromise(this.fd, data, encoding); + } finally { + this[kUnref](); + } + } + async write(...args) { + try { + this[kRef](this.write); + if (ArrayBuffer.isView(args[0])) { + const [buffer, offset, length, position] = args; + const bytesWritten = await this[kBaseFs].writePromise(this.fd, buffer, offset != null ? offset : void 0, length != null ? length : void 0, position != null ? position : void 0); + return { bytesWritten, buffer }; + } else { + const [data, position, encoding] = args; + const bytesWritten = await this[kBaseFs].writePromise(this.fd, data, position, encoding); + return { bytesWritten, buffer: data }; + } + } finally { + this[kUnref](); + } + } + async writev(buffers, position) { + try { + this[kRef](this.writev); + let bytesWritten = 0; + if (typeof position !== `undefined`) { + for (const buffer of buffers) { + const writeResult = await this.write(buffer, void 0, void 0, position); + bytesWritten += writeResult.bytesWritten; + position += writeResult.bytesWritten; + } + } else { + for (const buffer of buffers) { + const writeResult = await this.write(buffer); + bytesWritten += writeResult.bytesWritten; + } + } + return { + buffers, + bytesWritten + }; + } finally { + this[kUnref](); + } + } + readv(buffers, position) { + throw new Error(`Method not implemented.`); + } + close() { + if (this[kFd] === -1) + return Promise.resolve(); + if (this[kClosePromise]) + return this[kClosePromise]; + this[kRefs]--; + if (this[kRefs] === 0) { + const fd = this[kFd]; + this[kFd] = -1; + this[kClosePromise] = this[kBaseFs].closePromise(fd).finally(() => { + this[kClosePromise] = void 0; + }); + } else { + this[kClosePromise] = new Promise((resolve, reject) => { + this[kCloseResolve] = resolve; + this[kCloseReject] = reject; + }).finally(() => { + this[kClosePromise] = void 0; + this[kCloseReject] = void 0; + this[kCloseResolve] = void 0; + }); + } + return this[kClosePromise]; } - mapFromBase(path) { - return path; + [(_a = kRefs, _b = kClosePromise, _c = kCloseResolve, _d = kCloseReject, kRef)](caller) { + if (this[kFd] === -1) { + const err = new Error(`file closed`); + err.code = `EBADF`; + err.syscall = caller.name; + throw err; + } + this[kRefs]++; } - mapToBase(path) { - if (path instanceof url.URL) - return url.fileURLToPath(path); - return path; + [kUnref]() { + this[kRefs]--; + if (this[kRefs] === 0) { + const fd = this[kFd]; + this[kFd] = -1; + this[kBaseFs].closePromise(fd).then(this[kCloseResolve], this[kCloseReject]); + } } } -const SYNC_IMPLEMENTATIONS = new Set([ +const SYNC_IMPLEMENTATIONS = /* @__PURE__ */ new Set([ `accessSync`, `appendFileSync`, `createReadStream`, `createWriteStream`, `chmodSync`, + `fchmodSync`, `chownSync`, + `fchownSync`, `closeSync`, `copyFileSync`, `linkSync`, @@ -9220,6 +9650,7 @@ const SYNC_IMPLEMENTATIONS = new Set([ `statSync`, `symlinkSync`, `truncateSync`, + `ftruncateSync`, `unlinkSync`, `unwatchFile`, `utimesSync`, @@ -9228,10 +9659,12 @@ const SYNC_IMPLEMENTATIONS = new Set([ `writeFileSync`, `writeSync` ]); -const ASYNC_IMPLEMENTATIONS = new Set([ +const ASYNC_IMPLEMENTATIONS = /* @__PURE__ */ new Set([ `accessPromise`, `appendFilePromise`, + `fchmodPromise`, `chmodPromise`, + `fchownPromise`, `chownPromise`, `closePromise`, `copyFilePromise`, @@ -9252,26 +9685,14 @@ const ASYNC_IMPLEMENTATIONS = new Set([ `statPromise`, `symlinkPromise`, `truncatePromise`, + `ftruncatePromise`, `unlinkPromise`, `utimesPromise`, `writeFilePromise`, `writeSync` ]); -const FILEHANDLE_IMPLEMENTATIONS = new Set([ - `appendFilePromise`, - `chmodPromise`, - `chownPromise`, - `closePromise`, - `readPromise`, - `readFilePromise`, - `statPromise`, - `truncatePromise`, - `utimesPromise`, - `writePromise`, - `writeFilePromise` -]); function patchFs(patchedFs, fakeFs) { - fakeFs = new URLFS(fakeFs); + fakeFs = new NodePathFS(fakeFs); const setupFn = (target, name, replacement) => { const orig = target[name]; target[name] = replacement; @@ -9363,7 +9784,7 @@ function patchFs(patchedFs, fakeFs) { let [fd, buffer, offset, length, position] = args; if (args.length <= 3) { const options = args[2] || {}; - ({offset = 0, length = buffer.byteLength, position} = options); + ({ offset = 0, length = buffer.byteLength, position } = options); } if (offset == null) offset = 0; @@ -9405,32 +9826,28 @@ function patchFs(patchedFs, fakeFs) { continue; if (fnName === `open`) continue; - setupFn(patchedFsPromises, origName, fakeImpl.bind(fakeFs)); - } - class FileHandle { - constructor(fd) { - this.fd = fd; - } - } - for (const fnName of FILEHANDLE_IMPLEMENTATIONS) { - const origName = fnName.replace(/Promise$/, ``); - const fakeImpl = fakeFs[fnName]; - if (typeof fakeImpl === `undefined`) - continue; - setupFn(FileHandle.prototype, origName, function(...args) { - return fakeImpl.call(fakeFs, this.fd, ...args); + setupFn(patchedFsPromises, origName, (pathLike, ...args) => { + if (pathLike instanceof FileHandle) { + return pathLike[origName].apply(pathLike, args); + } else { + return fakeImpl.call(fakeFs, pathLike, ...args); + } }); } setupFn(patchedFsPromises, `open`, async (...args) => { const fd = await fakeFs.openPromise(...args); - return new FileHandle(fd); + return new FileHandle(fd, fakeFs); }); } } { - patchedFs.read[nodeUtils.promisify.custom] = async (p, buffer, ...args) => { - const res = fakeFs.readPromise(p, buffer, ...args); - return {bytesRead: await res, buffer}; + patchedFs.read[nodeUtils.promisify.custom] = async (fd, buffer, ...args) => { + const res = fakeFs.readPromise(fd, buffer, ...args); + return { bytesRead: await res, buffer }; + }; + patchedFs.write[nodeUtils.promisify.custom] = async (fd, buffer, ...args) => { + const res = fakeFs.writePromise(fd, buffer, ...args); + return { bytesWritten: await res, buffer }; }; } } @@ -9560,7 +9977,10 @@ var createModule = function() { } function getCFunc(ident) { var func = Module["_" + ident]; - assert(func, "Cannot call unknown function " + ident + ", make sure it is exported"); + assert( + func, + "Cannot call unknown function " + ident + ", make sure it is exported" + ); return func; } function ccall(ident, returnType, argTypes, args, opts) { @@ -9859,14 +10279,16 @@ var createModule = function() { var str = e.toString(); err("failed to compile wasm module: " + str); if (str.includes("imported Memory") || str.includes("memory import")) { - err("Memory size incompatibility issues may be due to changing INITIAL_MEMORY at runtime to something too large. Use ALLOW_MEMORY_GROWTH to allow any size memory (and also make sure not to set INITIAL_MEMORY at runtime to something smaller than it was at compile time)."); + err( + "Memory size incompatibility issues may be due to changing INITIAL_MEMORY at runtime to something too large. Use ALLOW_MEMORY_GROWTH to allow any size memory (and also make sure not to set INITIAL_MEMORY at runtime to something smaller than it was at compile time)." + ); } throw e; } return [instance, module2]; } function createWasm() { - var info = {a: asmLibraryArg}; + var info = { a: asmLibraryArg }; function receiveInstance(instance, module2) { var exports3 = instance.exports; Module["asm"] = exports3; @@ -9961,9 +10383,12 @@ var createModule = function() { }, normalize: function(path) { var isAbsolute = path.charAt(0) === "/", trailingSlash = path.substr(-1) === "/"; - path = PATH.normalizeArray(path.split("/").filter(function(p) { - return !!p; - }), !isAbsolute).join("/"); + path = PATH.normalizeArray( + path.split("/").filter(function(p) { + return !!p; + }), + !isAbsolute + ).join("/"); if (!path && !isAbsolute) { path = "."; } @@ -10030,9 +10455,12 @@ var createModule = function() { resolvedPath = path + "/" + resolvedPath; resolvedAbsolute = path.charAt(0) === "/"; } - resolvedPath = PATH.normalizeArray(resolvedPath.split("/").filter(function(p) { - return !!p; - }), !resolvedAbsolute).join("/"); + resolvedPath = PATH.normalizeArray( + resolvedPath.split("/").filter(function(p) { + return !!p; + }), + !resolvedAbsolute + ).join("/"); return (resolvedAbsolute ? "/" : "") + resolvedPath || "."; }, relative: function(from, to) { @@ -10078,7 +10506,7 @@ var createModule = function() { shutdown: function() { }, register: function(dev, ops) { - TTY.ttys[dev] = {input: [], output: [], ops}; + TTY.ttys[dev] = { input: [], output: [], ops }; FS.registerDevice(dev, TTY.stream_ops); }, stream_ops: { @@ -10147,7 +10575,13 @@ var createModule = function() { var buf = Buffer.alloc ? Buffer.alloc(BUFSIZE) : new Buffer(BUFSIZE); var bytesRead = 0; try { - bytesRead = nodeFS.readSync(process.stdin.fd, buf, 0, BUFSIZE, null); + bytesRead = nodeFS.readSync( + process.stdin.fd, + buf, + 0, + BUFSIZE, + null + ); } catch (e) { if (e.toString().includes("EOF")) bytesRead = 0; @@ -10231,7 +10665,7 @@ var createModule = function() { readdir: MEMFS.node_ops.readdir, symlink: MEMFS.node_ops.symlink }, - stream: {llseek: MEMFS.stream_ops.llseek} + stream: { llseek: MEMFS.stream_ops.llseek } }, file: { node: { @@ -10300,7 +10734,10 @@ var createModule = function() { if (prevCapacity >= newCapacity) return; var CAPACITY_DOUBLING_MAX = 1024 * 1024; - newCapacity = Math.max(newCapacity, prevCapacity * (prevCapacity < CAPACITY_DOUBLING_MAX ? 2 : 1.125) >>> 0); + newCapacity = Math.max( + newCapacity, + prevCapacity * (prevCapacity < CAPACITY_DOUBLING_MAX ? 2 : 1.125) >>> 0 + ); if (prevCapacity != 0) newCapacity = Math.max(newCapacity, 256); var oldContents = node.contents; @@ -10318,7 +10755,9 @@ var createModule = function() { var oldContents = node.contents; node.contents = new Uint8Array(newSize); if (oldContents) { - node.contents.set(oldContents.subarray(0, Math.min(newSize, node.usedBytes))); + node.contents.set( + oldContents.subarray(0, Math.min(newSize, node.usedBytes)) + ); } node.usedBytes = newSize; } @@ -10452,13 +10891,19 @@ var createModule = function() { node.usedBytes = length; return length; } else if (position + length <= node.usedBytes) { - node.contents.set(buffer2.subarray(offset, offset + length), position); + node.contents.set( + buffer2.subarray(offset, offset + length), + position + ); return length; } } MEMFS.expandFileStorage(node, position + length); if (node.contents.subarray && buffer2.subarray) { - node.contents.set(buffer2.subarray(offset, offset + length), position); + node.contents.set( + buffer2.subarray(offset, offset + length), + position + ); } else { for (var i = 0; i < length; i++) { node.contents[position + i] = buffer2[offset + i]; @@ -10483,7 +10928,10 @@ var createModule = function() { }, allocate: function(stream, offset, length) { MEMFS.expandFileStorage(stream.node, offset + length); - stream.node.usedBytes = Math.max(stream.node.usedBytes, offset + length); + stream.node.usedBytes = Math.max( + stream.node.usedBytes, + offset + length + ); }, mmap: function(stream, address, length, position, prot, flags) { if (address !== 0) { @@ -10503,7 +10951,11 @@ var createModule = function() { if (contents.subarray) { contents = contents.subarray(position, position + length); } else { - contents = Array.prototype.slice.call(contents, position, position + length); + contents = Array.prototype.slice.call( + contents, + position, + position + length + ); } } allocated = true; @@ -10513,7 +10965,7 @@ var createModule = function() { } HEAP8.set(contents, ptr); } - return {ptr, allocated}; + return { ptr, allocated }; }, msync: function(stream, buffer2, offset, length, mmapFlags) { if (!FS.isFile(stream.node.mode)) { @@ -10522,7 +10974,14 @@ var createModule = function() { if (mmapFlags & 2) { return 0; } - MEMFS.stream_ops.write(stream, buffer2, 0, length, offset, false); + MEMFS.stream_ops.write( + stream, + buffer2, + 0, + length, + offset, + false + ); return 0; } } @@ -10654,7 +11113,7 @@ var createModule = function() { isWindows: false, staticInit: function() { NODEFS.isWindows = !!process.platform.match(/^win/); - var flags = {fs: fs.constants}; + var flags = { fs: fs.constants }; if (flags["fs"]) { flags = flags["fs"]; } @@ -10796,7 +11255,7 @@ var createModule = function() { if (FS.isDir(node.mode)) { fs.mkdirSync(path, node.mode); } else { - fs.writeFileSync(path, "", {mode: node.mode}); + fs.writeFileSync(path, "", { mode: node.mode }); } } catch (e) { if (!e.code) @@ -10861,7 +11320,10 @@ var createModule = function() { var path = NODEFS.realPath(node); try { path = fs.readlinkSync(path); - path = NODEJS_PATH.relative(NODEJS_PATH.resolve(node.mount.opts.root), path); + path = NODEJS_PATH.relative( + NODEJS_PATH.resolve(node.mount.opts.root), + path + ); return path; } catch (e) { if (!e.code) @@ -10898,14 +11360,26 @@ var createModule = function() { if (length === 0) return 0; try { - return fs.readSync(stream.nfd, NODEFS.bufferFrom(buffer2.buffer), offset, length, position); + return fs.readSync( + stream.nfd, + NODEFS.bufferFrom(buffer2.buffer), + offset, + length, + position + ); } catch (e) { throw new FS.ErrnoError(NODEFS.convertNodeCode(e)); } }, write: function(stream, buffer2, offset, length, position) { try { - return fs.writeSync(stream.nfd, NODEFS.bufferFrom(buffer2.buffer), offset, length, position); + return fs.writeSync( + stream.nfd, + NODEFS.bufferFrom(buffer2.buffer), + offset, + length, + position + ); } catch (e) { throw new FS.ErrnoError(NODEFS.convertNodeCode(e)); } @@ -10938,7 +11412,7 @@ var createModule = function() { } var ptr = mmapAlloc(length); NODEFS.stream_ops.read(stream, HEAP8, ptr, length, position); - return {ptr, allocated: true}; + return { ptr, allocated: true }; }, msync: function(stream, buffer2, offset, length, mmapFlags) { if (!FS.isFile(stream.node.mode)) { @@ -10947,14 +11421,21 @@ var createModule = function() { if (mmapFlags & 2) { return 0; } - NODEFS.stream_ops.write(stream, buffer2, 0, length, offset, false); + NODEFS.stream_ops.write( + stream, + buffer2, + 0, + length, + offset, + false + ); return 0; } } }; var NODERAWFS = { lookupPath: function(path) { - return {path, node: {mode: NODEFS.getMode(path)}}; + return { path, node: { mode: NODEFS.getMode(path) } }; }, createStandardStreams: function() { FS.streams[0] = { @@ -10988,7 +11469,7 @@ var createModule = function() { if (FS.isDir(path)) { fs.mkdirSync(path, mode); } else { - fs.writeFileSync(path, "", {mode}); + fs.writeFileSync(path, "", { mode }); } }, mkdir: function() { @@ -11090,7 +11571,13 @@ var createModule = function() { var seeking = typeof position !== "undefined"; if (!seeking && stream.seekable) position = stream.position; - var bytesRead = fs.readSync(stream.nfd, NODEFS.bufferFrom(buffer2.buffer), offset, length, position); + var bytesRead = fs.readSync( + stream.nfd, + NODEFS.bufferFrom(buffer2.buffer), + offset, + length, + position + ); if (!seeking) stream.position += bytesRead; return bytesRead; @@ -11105,7 +11592,13 @@ var createModule = function() { var seeking = typeof position !== "undefined"; if (!seeking && stream.seekable) position = stream.position; - var bytesWritten = fs.writeSync(stream.nfd, NODEFS.bufferFrom(buffer2.buffer), offset, length, position); + var bytesWritten = fs.writeSync( + stream.nfd, + NODEFS.bufferFrom(buffer2.buffer), + offset, + length, + position + ); if (!seeking) stream.position += bytesWritten; return bytesWritten; @@ -11122,7 +11615,7 @@ var createModule = function() { } var ptr = mmapAlloc(length); FS.read(stream, HEAP8, ptr, length, position); - return {ptr, allocated: true}; + return { ptr, allocated: true }; }, msync: function(stream, buffer2, offset, length, mmapFlags) { if (stream.stream_ops) { @@ -11152,7 +11645,7 @@ var createModule = function() { initialized: false, ignorePermissions: true, trackingDelegate: {}, - tracking: {openFlags: {READ: 1, WRITE: 2}}, + tracking: { openFlags: { READ: 1, WRITE: 2 } }, ErrnoError: null, genericErrors: {}, filesystems: null, @@ -11161,8 +11654,8 @@ var createModule = function() { path = PATH_FS.resolve(FS.cwd(), path); opts = opts || {}; if (!path) - return {path: "", node: null}; - var defaults = {follow_mount: true, recurse_count: 0}; + return { path: "", node: null }; + var defaults = { follow_mount: true, recurse_count: 0 }; for (var key2 in defaults) { if (opts[key2] === void 0) { opts[key2] = defaults[key2]; @@ -11171,9 +11664,12 @@ var createModule = function() { if (opts.recurse_count > 8) { throw new FS.ErrnoError(32); } - var parts = PATH.normalizeArray(path.split("/").filter(function(p) { - return !!p; - }), false); + var parts = PATH.normalizeArray( + path.split("/").filter(function(p) { + return !!p; + }), + false + ); var current = FS.root; var current_path = "/"; for (var i = 0; i < parts.length; i++) { @@ -11203,7 +11699,7 @@ var createModule = function() { } } } - return {path: current_path, node: current}; + return { path: current_path, node: current }; }, getPath: function(node) { var path; @@ -11294,7 +11790,7 @@ var createModule = function() { isSocket: function(mode) { return (mode & 49152) === 49152; }, - flagModes: {r: 0, "r+": 2, w: 577, "w+": 578, a: 1089, "a+": 1090}, + flagModes: { r: 0, "r+": 2, w: 577, "w+": 578, a: 1089, "a+": 1090 }, modeStringToFlags: function(str) { var flags = FS.flagModes[str]; if (typeof flags === "undefined") { @@ -11455,7 +11951,7 @@ var createModule = function() { return ma << 8 | mi; }, registerDevice: function(dev, ops) { - FS.devices[dev] = {stream_ops: ops}; + FS.devices[dev] = { stream_ops: ops }; }, getDevice: function(dev) { return FS.devices[dev]; @@ -11477,7 +11973,9 @@ var createModule = function() { } FS.syncFSRequests++; if (FS.syncFSRequests > 1) { - err("warning: " + FS.syncFSRequests + " FS.syncfs operations in flight at once, probably just doing extra work"); + err( + "warning: " + FS.syncFSRequests + " FS.syncfs operations in flight at once, probably just doing extra work" + ); } var mounts = FS.getMounts(FS.root.mount); var completed = 0; @@ -11511,7 +12009,7 @@ var createModule = function() { if (root && FS.root) { throw new FS.ErrnoError(10); } else if (!root && !pseudo) { - var lookup = FS.lookupPath(mountpoint, {follow_mount: false}); + var lookup = FS.lookupPath(mountpoint, { follow_mount: false }); mountpoint = lookup.path; node = lookup.node; if (FS.isMountpoint(node)) { @@ -11541,7 +12039,7 @@ var createModule = function() { return mountRoot; }, unmount: function(mountpoint) { - var lookup = FS.lookupPath(mountpoint, {follow_mount: false}); + var lookup = FS.lookupPath(mountpoint, { follow_mount: false }); if (!FS.isMountpoint(lookup.node)) { throw new FS.ErrnoError(28); } @@ -11566,7 +12064,7 @@ var createModule = function() { return parent.node_ops.lookup(parent, name); }, mknod: function(path, mode, dev) { - var lookup = FS.lookupPath(path, {parent: true}); + var lookup = FS.lookupPath(path, { parent: true }); var parent = lookup.node; var name = PATH.basename(path); if (!name || name === "." || name === "..") { @@ -11620,7 +12118,7 @@ var createModule = function() { if (!PATH_FS.resolve(oldpath)) { throw new FS.ErrnoError(44); } - var lookup = FS.lookupPath(newpath, {parent: true}); + var lookup = FS.lookupPath(newpath, { parent: true }); var parent = lookup.node; if (!parent) { throw new FS.ErrnoError(44); @@ -11641,9 +12139,9 @@ var createModule = function() { var old_name = PATH.basename(old_path); var new_name = PATH.basename(new_path); var lookup, old_dir, new_dir; - lookup = FS.lookupPath(old_path, {parent: true}); + lookup = FS.lookupPath(old_path, { parent: true }); old_dir = lookup.node; - lookup = FS.lookupPath(new_path, {parent: true}); + lookup = FS.lookupPath(new_path, { parent: true }); new_dir = lookup.node; if (!old_dir || !new_dir) throw new FS.ErrnoError(44); @@ -11693,7 +12191,9 @@ var createModule = function() { FS.trackingDelegate["willMovePath"](old_path, new_path); } } catch (e) { - err("FS.trackingDelegate['willMovePath']('" + old_path + "', '" + new_path + "') threw an exception: " + e.message); + err( + "FS.trackingDelegate['willMovePath']('" + old_path + "', '" + new_path + "') threw an exception: " + e.message + ); } FS.hashRemoveNode(old_node); try { @@ -11707,11 +12207,13 @@ var createModule = function() { if (FS.trackingDelegate["onMovePath"]) FS.trackingDelegate["onMovePath"](old_path, new_path); } catch (e) { - err("FS.trackingDelegate['onMovePath']('" + old_path + "', '" + new_path + "') threw an exception: " + e.message); + err( + "FS.trackingDelegate['onMovePath']('" + old_path + "', '" + new_path + "') threw an exception: " + e.message + ); } }, rmdir: function(path) { - var lookup = FS.lookupPath(path, {parent: true}); + var lookup = FS.lookupPath(path, { parent: true }); var parent = lookup.node; var name = PATH.basename(path); var node = FS.lookupNode(parent, name); @@ -11730,7 +12232,9 @@ var createModule = function() { FS.trackingDelegate["willDeletePath"](path); } } catch (e) { - err("FS.trackingDelegate['willDeletePath']('" + path + "') threw an exception: " + e.message); + err( + "FS.trackingDelegate['willDeletePath']('" + path + "') threw an exception: " + e.message + ); } parent.node_ops.rmdir(parent, name); FS.destroyNode(node); @@ -11738,11 +12242,13 @@ var createModule = function() { if (FS.trackingDelegate["onDeletePath"]) FS.trackingDelegate["onDeletePath"](path); } catch (e) { - err("FS.trackingDelegate['onDeletePath']('" + path + "') threw an exception: " + e.message); + err( + "FS.trackingDelegate['onDeletePath']('" + path + "') threw an exception: " + e.message + ); } }, readdir: function(path) { - var lookup = FS.lookupPath(path, {follow: true}); + var lookup = FS.lookupPath(path, { follow: true }); var node = lookup.node; if (!node.node_ops.readdir) { throw new FS.ErrnoError(54); @@ -11750,7 +12256,7 @@ var createModule = function() { return node.node_ops.readdir(node); }, unlink: function(path) { - var lookup = FS.lookupPath(path, {parent: true}); + var lookup = FS.lookupPath(path, { parent: true }); var parent = lookup.node; var name = PATH.basename(path); var node = FS.lookupNode(parent, name); @@ -11769,7 +12275,9 @@ var createModule = function() { FS.trackingDelegate["willDeletePath"](path); } } catch (e) { - err("FS.trackingDelegate['willDeletePath']('" + path + "') threw an exception: " + e.message); + err( + "FS.trackingDelegate['willDeletePath']('" + path + "') threw an exception: " + e.message + ); } parent.node_ops.unlink(parent, name); FS.destroyNode(node); @@ -11777,7 +12285,9 @@ var createModule = function() { if (FS.trackingDelegate["onDeletePath"]) FS.trackingDelegate["onDeletePath"](path); } catch (e) { - err("FS.trackingDelegate['onDeletePath']('" + path + "') threw an exception: " + e.message); + err( + "FS.trackingDelegate['onDeletePath']('" + path + "') threw an exception: " + e.message + ); } }, readlink: function(path) { @@ -11789,10 +12299,13 @@ var createModule = function() { if (!link.node_ops.readlink) { throw new FS.ErrnoError(28); } - return PATH_FS.resolve(FS.getPath(link.parent), link.node_ops.readlink(link)); + return PATH_FS.resolve( + FS.getPath(link.parent), + link.node_ops.readlink(link) + ); }, stat: function(path, dontFollow) { - var lookup = FS.lookupPath(path, {follow: !dontFollow}); + var lookup = FS.lookupPath(path, { follow: !dontFollow }); var node = lookup.node; if (!node) { throw new FS.ErrnoError(44); @@ -11808,7 +12321,7 @@ var createModule = function() { chmod: function(path, mode, dontFollow) { var node; if (typeof path === "string") { - var lookup = FS.lookupPath(path, {follow: !dontFollow}); + var lookup = FS.lookupPath(path, { follow: !dontFollow }); node = lookup.node; } else { node = path; @@ -11834,7 +12347,7 @@ var createModule = function() { chown: function(path, uid, gid, dontFollow) { var node; if (typeof path === "string") { - var lookup = FS.lookupPath(path, {follow: !dontFollow}); + var lookup = FS.lookupPath(path, { follow: !dontFollow }); node = lookup.node; } else { node = path; @@ -11842,7 +12355,7 @@ var createModule = function() { if (!node.node_ops.setattr) { throw new FS.ErrnoError(63); } - node.node_ops.setattr(node, {timestamp: Date.now()}); + node.node_ops.setattr(node, { timestamp: Date.now() }); }, lchown: function(path, uid, gid) { FS.chown(path, uid, gid, true); @@ -11860,7 +12373,7 @@ var createModule = function() { } var node; if (typeof path === "string") { - var lookup = FS.lookupPath(path, {follow: true}); + var lookup = FS.lookupPath(path, { follow: true }); node = lookup.node; } else { node = path; @@ -11878,7 +12391,7 @@ var createModule = function() { if (errCode) { throw new FS.ErrnoError(errCode); } - node.node_ops.setattr(node, {size: len, timestamp: Date.now()}); + node.node_ops.setattr(node, { size: len, timestamp: Date.now() }); }, ftruncate: function(fd, len) { var stream = FS.getStream(fd); @@ -11891,9 +12404,9 @@ var createModule = function() { FS.truncate(stream.node, len); }, utime: function(path, atime, mtime) { - var lookup = FS.lookupPath(path, {follow: true}); + var lookup = FS.lookupPath(path, { follow: true }); var node = lookup.node; - node.node_ops.setattr(node, {timestamp: Math.max(atime, mtime)}); + node.node_ops.setattr(node, { timestamp: Math.max(atime, mtime) }); }, open: function(path, flags, mode, fd_start, fd_end) { if (path === "") { @@ -11912,7 +12425,7 @@ var createModule = function() { } else { path = PATH.normalize(path); try { - var lookup = FS.lookupPath(path, {follow: !(flags & 131072)}); + var lookup = FS.lookupPath(path, { follow: !(flags & 131072) }); node = lookup.node; } catch (e) { } @@ -11947,16 +12460,20 @@ var createModule = function() { FS.truncate(node, 0); } flags &= ~(128 | 512 | 131072); - var stream = FS.createStream({ - node, - path: FS.getPath(node), - flags, - seekable: true, - position: 0, - stream_ops: node.stream_ops, - ungotten: [], - error: false - }, fd_start, fd_end); + var stream = FS.createStream( + { + node, + path: FS.getPath(node), + flags, + seekable: true, + position: 0, + stream_ops: node.stream_ops, + ungotten: [], + error: false + }, + fd_start, + fd_end + ); if (stream.stream_ops.open) { stream.stream_ops.open(stream); } @@ -11980,7 +12497,9 @@ var createModule = function() { FS.trackingDelegate["onOpenFile"](path, trackingFlags); } } catch (e) { - err("FS.trackingDelegate['onOpenFile']('" + path + "', flags) threw an exception: " + e.message); + err( + "FS.trackingDelegate['onOpenFile']('" + path + "', flags) threw an exception: " + e.message + ); } return stream; }, @@ -12040,7 +12559,13 @@ var createModule = function() { } else if (!stream.seekable) { throw new FS.ErrnoError(70); } - var bytesRead = stream.stream_ops.read(stream, buffer2, offset, length, position); + var bytesRead = stream.stream_ops.read( + stream, + buffer2, + offset, + length, + position + ); if (!seeking) stream.position += bytesRead; return bytesRead; @@ -12070,14 +12595,23 @@ var createModule = function() { } else if (!stream.seekable) { throw new FS.ErrnoError(70); } - var bytesWritten = stream.stream_ops.write(stream, buffer2, offset, length, position, canOwn); + var bytesWritten = stream.stream_ops.write( + stream, + buffer2, + offset, + length, + position, + canOwn + ); if (!seeking) stream.position += bytesWritten; try { if (stream.path && FS.trackingDelegate["onWriteToFile"]) FS.trackingDelegate["onWriteToFile"](stream.path); } catch (e) { - err("FS.trackingDelegate['onWriteToFile']('" + stream.path + "') threw an exception: " + e.message); + err( + "FS.trackingDelegate['onWriteToFile']('" + stream.path + "') threw an exception: " + e.message + ); } return bytesWritten; }, @@ -12109,13 +12643,26 @@ var createModule = function() { if (!stream.stream_ops.mmap) { throw new FS.ErrnoError(43); } - return stream.stream_ops.mmap(stream, address, length, position, prot, flags); + return stream.stream_ops.mmap( + stream, + address, + length, + position, + prot, + flags + ); }, msync: function(stream, buffer2, offset, length, mmapFlags) { if (!stream || !stream.stream_ops.msync) { return 0; } - return stream.stream_ops.msync(stream, buffer2, offset, length, mmapFlags); + return stream.stream_ops.msync( + stream, + buffer2, + offset, + length, + mmapFlags + ); }, munmap: function(stream) { return 0; @@ -12166,7 +12713,7 @@ var createModule = function() { return FS.currentPath; }, chdir: function(path) { - var lookup = FS.lookupPath(path, {follow: true}); + var lookup = FS.lookupPath(path, { follow: true }); if (lookup.node === null) { throw new FS.ErrnoError(44); } @@ -12209,31 +12756,35 @@ var createModule = function() { FS.mkdir("/proc"); var proc_self = FS.mkdir("/proc/self"); FS.mkdir("/proc/self/fd"); - FS.mount({ - mount: function() { - var node = FS.createNode(proc_self, "fd", 16384 | 511, 73); - node.node_ops = { - lookup: function(parent, name) { - var fd = +name; - var stream = FS.getStream(fd); - if (!stream) - throw new FS.ErrnoError(8); - var ret = { - parent: null, - mount: {mountpoint: "fake"}, - node_ops: { - readlink: function() { - return stream.path; + FS.mount( + { + mount: function() { + var node = FS.createNode(proc_self, "fd", 16384 | 511, 73); + node.node_ops = { + lookup: function(parent, name) { + var fd = +name; + var stream = FS.getStream(fd); + if (!stream) + throw new FS.ErrnoError(8); + var ret = { + parent: null, + mount: { mountpoint: "fake" }, + node_ops: { + readlink: function() { + return stream.path; + } } - } - }; - ret.parent = ret; - return ret; - } - }; - return node; - } - }, {}, "/proc/self/fd"); + }; + ret.parent = ret; + return ret; + } + }; + return node; + } + }, + {}, + "/proc/self/fd" + ); }, createStandardStreams: function() { if (Module["stdin"]) { @@ -12280,7 +12831,7 @@ var createModule = function() { FS.createDefaultDirectories(); FS.createDefaultDevices(); FS.createSpecialDirectories(); - FS.filesystems = {MEMFS, NODEFS}; + FS.filesystems = { MEMFS, NODEFS }; }, init: function(input, output, error) { FS.init.initialized = true; @@ -12321,7 +12872,7 @@ var createModule = function() { }, analyzePath: function(path, dontResolveLastLink) { try { - var lookup = FS.lookupPath(path, {follow: !dontResolveLastLink}); + var lookup = FS.lookupPath(path, { follow: !dontResolveLastLink }); path = lookup.path; } catch (e) { } @@ -12337,12 +12888,12 @@ var createModule = function() { parentObject: null }; try { - var lookup = FS.lookupPath(path, {parent: true}); + var lookup = FS.lookupPath(path, { parent: true }); ret.parentExists = true; ret.parentPath = lookup.path; ret.parentObject = lookup.node; ret.name = PATH.basename(path); - lookup = FS.lookupPath(path, {follow: !dontResolveLastLink}); + lookup = FS.lookupPath(path, { follow: !dontResolveLastLink }); ret.exists = true; ret.path = lookup.path; ret.object = lookup.node; @@ -12370,12 +12921,18 @@ var createModule = function() { return current; }, createFile: function(parent, name, properties, canRead, canWrite) { - var path = PATH.join2(typeof parent === "string" ? parent : FS.getPath(parent), name); + var path = PATH.join2( + typeof parent === "string" ? parent : FS.getPath(parent), + name + ); var mode = FS.getMode(canRead, canWrite); return FS.create(path, mode); }, createDataFile: function(parent, name, data, canRead, canWrite, canOwn) { - var path = name ? PATH.join2(typeof parent === "string" ? parent : FS.getPath(parent), name) : parent; + var path = name ? PATH.join2( + typeof parent === "string" ? parent : FS.getPath(parent), + name + ) : parent; var mode = FS.getMode(canRead, canWrite); var node = FS.create(path, mode); if (data) { @@ -12394,7 +12951,10 @@ var createModule = function() { return node; }, createDevice: function(parent, name, input, output) { - var path = PATH.join2(typeof parent === "string" ? parent : FS.getPath(parent), name); + var path = PATH.join2( + typeof parent === "string" ? parent : FS.getPath(parent), + name + ); var mode = FS.getMode(!!input, !!output); if (!FS.createDevice.major) FS.createDevice.major = 64; @@ -12462,7 +13022,7 @@ var createModule = function() { }, createLazyFile: function(parent, name, url, canRead, canWrite) { var properties; { - var properties = {isDevice: false, url}; + var properties = { isDevice: false, url }; } var node = FS.createFile(parent, name, properties, canRead, canWrite); if (properties.contents) { @@ -12515,7 +13075,14 @@ var createModule = function() { if (preFinish) preFinish(); if (!dontCreateFile) { - FS.createDataFile(parent, name, byteArray2, canRead, canWrite, canOwn); + FS.createDataFile( + parent, + name, + byteArray2, + canRead, + canWrite, + canOwn + ); } if (onload) onload(); @@ -12539,9 +13106,13 @@ var createModule = function() { } addRunDependency(); if (typeof url == "string") { - Browser.asyncLoad(url, function(byteArray) { - processData(byteArray); - }, onerror); + Browser.asyncLoad( + url, + function(byteArray) { + processData(byteArray); + }, + onerror + ); } else { processData(url); } @@ -12582,7 +13153,10 @@ var createModule = function() { onerror(); } paths.forEach(function(path) { - var putRequest = files.put(FS.analyzePath(path).object.contents, path); + var putRequest = files.put( + FS.analyzePath(path).object.contents, + path + ); putRequest.onsuccess = function putRequest_onsuccess() { ok++; if (ok + fail == total) @@ -12632,7 +13206,14 @@ var createModule = function() { if (FS.analyzePath(path).exists) { FS.unlink(path); } - FS.createDataFile(PATH.dirname(path), PATH.basename(path), getRequest.result, true, true, true); + FS.createDataFile( + PATH.dirname(path), + PATH.basename(path), + getRequest.result, + true, + true, + true + ); ok++; if (ok + fail == total) finish(); @@ -12693,7 +13274,9 @@ var createModule = function() { HEAP32[buf + 32 >> 2] = 0; tempI64 = [ stat.size >>> 0, - (tempDouble = stat.size, +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? (Math.min(+Math.floor(tempDouble / 4294967296), 4294967295) | 0) >>> 0 : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 : 0) + (tempDouble = stat.size, +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? (Math.min(+Math.floor(tempDouble / 4294967296), 4294967295) | 0) >>> 0 : ~~+Math.ceil( + (tempDouble - +(~~tempDouble >>> 0)) / 4294967296 + ) >>> 0 : 0) ], HEAP32[buf + 40 >> 2] = tempI64[0], HEAP32[buf + 44 >> 2] = tempI64[1]; HEAP32[buf + 48 >> 2] = 4096; HEAP32[buf + 52 >> 2] = stat.blocks; @@ -12705,7 +13288,9 @@ var createModule = function() { HEAP32[buf + 76 >> 2] = 0; tempI64 = [ stat.ino >>> 0, - (tempDouble = stat.ino, +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? (Math.min(+Math.floor(tempDouble / 4294967296), 4294967295) | 0) >>> 0 : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 : 0) + (tempDouble = stat.ino, +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? (Math.min(+Math.floor(tempDouble / 4294967296), 4294967295) | 0) >>> 0 : ~~+Math.ceil( + (tempDouble - +(~~tempDouble >>> 0)) / 4294967296 + ) >>> 0 : 0) ], HEAP32[buf + 80 >> 2] = tempI64[0], HEAP32[buf + 84 >> 2] = tempI64[1]; return 0; }, @@ -12749,7 +13334,7 @@ var createModule = function() { return -28; } var node; - var lookup = FS.lookupPath(path, {follow: true}); + var lookup = FS.lookupPath(path, { follow: true }); node = lookup.node; if (!node) { return -44; @@ -13025,8 +13610,14 @@ var createModule = function() { } for (var cutDown = 1; cutDown <= 4; cutDown *= 2) { var overGrownHeapSize = oldSize * (1 + 0.2 / cutDown); - overGrownHeapSize = Math.min(overGrownHeapSize, requestedSize + 100663296); - var newSize = Math.min(maxHeapSize, alignUp(Math.max(requestedSize, overGrownHeapSize), 65536)); + overGrownHeapSize = Math.min( + overGrownHeapSize, + requestedSize + 100663296 + ); + var newSize = Math.min( + maxHeapSize, + alignUp(Math.max(requestedSize, overGrownHeapSize), 65536) + ); var replacement = emscripten_realloc_buffer(newSize); if (replacement) { return true; @@ -13081,7 +13672,9 @@ var createModule = function() { FS.llseek(stream, offset, whence); tempI64 = [ stream.position >>> 0, - (tempDouble = stream.position, +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? (Math.min(+Math.floor(tempDouble / 4294967296), 4294967295) | 0) >>> 0 : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 : 0) + (tempDouble = stream.position, +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? (Math.min(+Math.floor(tempDouble / 4294967296), 4294967295) | 0) >>> 0 : ~~+Math.ceil( + (tempDouble - +(~~tempDouble >>> 0)) / 4294967296 + ) >>> 0 : 0) ], HEAP32[newOffset >> 2] = tempI64[0], HEAP32[newOffset + 4 >> 2] = tempI64[1]; if (stream.getdents && offset === 0 && whence === 0) stream.getdents = null; @@ -13143,7 +13736,15 @@ var createModule = function() { } function _timegm(tmPtr) { _tzset(); - var time = Date.UTC(HEAP32[tmPtr + 20 >> 2] + 1900, HEAP32[tmPtr + 16 >> 2], HEAP32[tmPtr + 12 >> 2], HEAP32[tmPtr + 8 >> 2], HEAP32[tmPtr + 4 >> 2], HEAP32[tmPtr >> 2], 0); + var time = Date.UTC( + HEAP32[tmPtr + 20 >> 2] + 1900, + HEAP32[tmPtr + 16 >> 2], + HEAP32[tmPtr + 12 >> 2], + HEAP32[tmPtr + 8 >> 2], + HEAP32[tmPtr + 4 >> 2], + HEAP32[tmPtr >> 2], + 0 + ); var date = new Date(time); HEAP32[tmPtr + 24 >> 2] = date.getUTCDay(); var start = Date.UTC(date.getUTCFullYear(), 0, 1, 0, 0, 0, 0); @@ -13221,7 +13822,12 @@ var createModule = function() { function intArrayFromString(stringy, dontAddNull, length) { var len = length > 0 ? length : lengthBytesUTF8(stringy) + 1; var u8array = new Array(len); - var numBytesWritten = stringToUTF8Array(stringy, u8array, 0, u8array.length); + var numBytesWritten = stringToUTF8Array( + stringy, + u8array, + 0, + u8array.length + ); if (dontAddNull) u8array.length = numBytesWritten; return u8array; @@ -13234,7 +13840,11 @@ var createModule = function() { } catch (_) { buf = new Buffer(s, "base64"); } - return new Uint8Array(buf["buffer"], buf["byteOffset"], buf["byteLength"]); + return new Uint8Array( + buf["buffer"], + buf["byteOffset"], + buf["byteLength"] + ); } } function tryParseAsDataURI(filename) { @@ -13387,8 +13997,7 @@ const number64 = [ `number`, `number` ]; -var Errors; -(function(Errors2) { +var Errors = /* @__PURE__ */ ((Errors2) => { Errors2[Errors2["ZIP_ER_OK"] = 0] = "ZIP_ER_OK"; Errors2[Errors2["ZIP_ER_MULTIDISK"] = 1] = "ZIP_ER_MULTIDISK"; Errors2[Errors2["ZIP_ER_RENAME"] = 2] = "ZIP_ER_RENAME"; @@ -13421,7 +14030,8 @@ var Errors; Errors2[Errors2["ZIP_ER_INUSE"] = 29] = "ZIP_ER_INUSE"; Errors2[Errors2["ZIP_ER_TELL"] = 30] = "ZIP_ER_TELL"; Errors2[Errors2["ZIP_ER_COMPRESSED_DATA"] = 31] = "ZIP_ER_COMPRESSED_DATA"; -})(Errors || (Errors = {})); + return Errors2; +})(Errors || {}); const makeInterface = (libzip) => ({ get HEAP8() { return libzip.HEAP8; @@ -13506,7 +14116,7 @@ const makeInterface = (libzip) => ({ locate: libzip.cwrap(`zip_name_locate`, `number`, [`number`, `string`, `number`]) }, source: { - fromUnattachedBuffer: libzip.cwrap(`zip_source_buffer_create`, `number`, [`number`, `number`, `number`, `number`]), + fromUnattachedBuffer: libzip.cwrap(`zip_source_buffer_create`, `number`, [`number`, ...number64, `number`, `number`]), fromBuffer: libzip.cwrap(`zip_source_buffer`, `number`, [`number`, `number`, ...number64, `number`]), free: libzip.cwrap(`zip_source_free`, null, [`number`]), keep: libzip.cwrap(`zip_source_keep`, null, [`number`]), @@ -13541,27 +14151,7 @@ function getLibzipSync() { return mod; } -var __defProp$2 = Object.defineProperty; -var __defProps$1 = Object.defineProperties; -var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors; -var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols; -var __hasOwnProp$3 = Object.prototype.hasOwnProperty; -var __propIsEnum$3 = Object.prototype.propertyIsEnumerable; -var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, {enumerable: true, configurable: true, writable: true, value}) : obj[key] = value; -var __spreadValues$2 = (a, b) => { - for (var prop in b || (b = {})) - if (__hasOwnProp$3.call(b, prop)) - __defNormalProp$2(a, prop, b[prop]); - if (__getOwnPropSymbols$3) - for (var prop of __getOwnPropSymbols$3(b)) { - if (__propIsEnum$3.call(b, prop)) - __defNormalProp$2(a, prop, b[prop]); - } - return a; -}; -var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b)); -var ErrorCode; -(function(ErrorCode2) { +var ErrorCode = /* @__PURE__ */ ((ErrorCode2) => { ErrorCode2["API_ERROR"] = `API_ERROR`; ErrorCode2["BUILTIN_NODE_RESOLUTION_FAILED"] = `BUILTIN_NODE_RESOLUTION_FAILED`; ErrorCode2["EXPORTS_RESOLUTION_FAILED"] = `EXPORTS_RESOLUTION_FAILED`; @@ -13571,13 +14161,14 @@ var ErrorCode; ErrorCode2["INTERNAL"] = `INTERNAL`; ErrorCode2["UNDECLARED_DEPENDENCY"] = `UNDECLARED_DEPENDENCY`; ErrorCode2["UNSUPPORTED"] = `UNSUPPORTED`; -})(ErrorCode || (ErrorCode = {})); -const MODULE_NOT_FOUND_ERRORS = new Set([ - ErrorCode.BUILTIN_NODE_RESOLUTION_FAILED, - ErrorCode.MISSING_DEPENDENCY, - ErrorCode.MISSING_PEER_DEPENDENCY, - ErrorCode.QUALIFIED_PATH_RESOLUTION_FAILED, - ErrorCode.UNDECLARED_DEPENDENCY + return ErrorCode2; +})(ErrorCode || {}); +const MODULE_NOT_FOUND_ERRORS = /* @__PURE__ */ new Set([ + "BUILTIN_NODE_RESOLUTION_FAILED" /* BUILTIN_NODE_RESOLUTION_FAILED */, + "MISSING_DEPENDENCY" /* MISSING_DEPENDENCY */, + "MISSING_PEER_DEPENDENCY" /* MISSING_PEER_DEPENDENCY */, + "QUALIFIED_PATH_RESOLUTION_FAILED" /* QUALIFIED_PATH_RESOLUTION_FAILED */, + "UNDECLARED_DEPENDENCY" /* UNDECLARED_DEPENDENCY */ ]); function makeError(pnpCode, message, data = {}, code) { code != null ? code : code = MODULE_NOT_FOUND_ERRORS.has(pnpCode) ? `MODULE_NOT_FOUND` : pnpCode; @@ -13587,15 +14178,18 @@ function makeError(pnpCode, message, data = {}, code) { enumerable: false }; return Object.defineProperties(new Error(message), { - code: __spreadProps$1(__spreadValues$2({}, propertySpec), { + code: { + ...propertySpec, value: code - }), - pnpCode: __spreadProps$1(__spreadValues$2({}, propertySpec), { + }, + pnpCode: { + ...propertySpec, value: pnpCode - }), - data: __spreadProps$1(__spreadValues$2({}, propertySpec), { + }, + data: { + ...propertySpec, value: data - }) + } }); } function getIssuerModule(parent) { @@ -13608,6 +14202,9 @@ function getPathForDisplay(p) { return npath.normalize(npath.fromPortablePath(p)); } +const [major, minor] = process.versions.node.split(`.`).map((value) => parseInt(value, 10)); +const WATCH_MODE_MESSAGE_USES_ARRAYS = major > 19 || major === 19 && minor >= 2 || major === 18 && minor >= 13; + const builtinModules = new Set(require$$0.Module.builtinModules || Object.keys(process.binding(`natives`))); const isBuiltinModule = (request) => request.startsWith(`node:`) || builtinModules.has(request); function readPackageScope(checkPath) { @@ -13642,22 +14239,19 @@ Instead change the require of ${basename} in ${parentPath} to a dynamic import() err.code = `ERR_REQUIRE_ESM`; return err; } +function reportRequiredFilesToWatchMode(files) { + if (process.env.WATCH_REPORT_DEPENDENCIES && process.send) { + files = files.map((filename) => npath.fromPortablePath(VirtualFS.resolveVirtual(npath.toPortablePath(filename)))); + if (WATCH_MODE_MESSAGE_USES_ARRAYS) { + process.send({ "watch:require": files }); + } else { + for (const filename of files) { + process.send({ "watch:require": filename }); + } + } + } +} -var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols; -var __hasOwnProp$2 = Object.prototype.hasOwnProperty; -var __propIsEnum$2 = Object.prototype.propertyIsEnumerable; -var __objRest$1 = (source, exclude) => { - var target = {}; - for (var prop in source) - if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0) - target[prop] = source[prop]; - if (source != null && __getOwnPropSymbols$2) - for (var prop of __getOwnPropSymbols$2(source)) { - if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop)) - target[prop] = source[prop]; - } - return target; -}; function applyPatch(pnpapi, opts) { const defaultCache = {}; let enableNativeHooks = true; @@ -13698,7 +14292,7 @@ function applyPatch(pnpapi, opts) { const modulePath = require$$0.Module._resolveFilename(request, parent, isMain); const isOwnedByRuntime = parentApi !== null ? parentApi.findPackageLocator(modulePath) !== null : false; const moduleApiPath = isOwnedByRuntime ? parentApiPath : opts.manager.findApiPathFor(npath.dirname(modulePath)); - const entry = moduleApiPath !== null ? opts.manager.getApiEntry(moduleApiPath) : {instance: null, cache: defaultCache}; + const entry = moduleApiPath !== null ? opts.manager.getApiEntry(moduleApiPath) : { instance: null, cache: defaultCache }; const cacheEntry = entry.cache[modulePath]; if (cacheEntry) { if (cacheEntry.loaded === false && cacheEntry.isLoading !== true) { @@ -13717,6 +14311,7 @@ function applyPatch(pnpapi, opts) { } const module = new require$$0.Module(modulePath, parent != null ? parent : void 0); module.pnpApiPath = moduleApiPath; + reportRequiredFilesToWatchMode([modulePath]); entry.cache[modulePath] = module; if (isMain) { process.mainModule = module; @@ -13755,11 +14350,11 @@ function applyPatch(pnpapi, opts) { if (issuer !== null) { const path = npath.dirname(issuer.filename); const apiPath = opts.manager.getApiPathFromParent(issuer); - return [{apiPath, path, module}]; + return [{ apiPath, path, module }]; } else { const path = process.cwd(); const apiPath = (_a = opts.manager.findApiPathFor(npath.join(path, `[file]`))) != null ? _a : opts.manager.getApiPathFromParent(null); - return [{apiPath, path, module}]; + return [{ apiPath, path, module }]; } } function makeFakeParent(path) { @@ -13776,7 +14371,7 @@ function applyPatch(pnpapi, opts) { if (!enableNativeHooks) return originalModuleResolveFilename.call(require$$0.Module, request, parent, isMain, options); if (options && options.plugnplay === false) { - const _a = options, rest = __objRest$1(_a, ["plugnplay"]); + const { plugnplay, ...rest } = options; const forwardedOptions = Object.keys(rest).length > 0 ? rest : void 0; try { enableNativeHooks = false; @@ -13790,7 +14385,10 @@ function applyPatch(pnpapi, opts) { optionNames.delete(`paths`); optionNames.delete(`plugnplay`); if (optionNames.size > 0) { - throw makeError(ErrorCode.UNSUPPORTED, `Some options passed to require() aren't supported by PnP yet (${Array.from(optionNames).join(`, `)})`); + throw makeError( + ErrorCode.UNSUPPORTED, + `Some options passed to require() aren't supported by PnP yet (${Array.from(optionNames).join(`, `)})` + ); } } const issuerSpecs = options && options.paths ? getIssuerSpecsFromPaths(options.paths) : getIssuerSpecsFromModule(parent); @@ -13809,7 +14407,7 @@ function applyPatch(pnpapi, opts) { } } let firstError; - for (const {apiPath, path, module} of issuerSpecs) { + for (const { apiPath, path, module } of issuerSpecs) { let resolution; const issuerApi = apiPath !== null ? opts.manager.getApiEntry(apiPath, true).instance : null; try { @@ -13887,30 +14485,40 @@ Require stack: } originalExtensionJSFunction.call(this, module, filename); }; - const originalEmitWarning = process.emitWarning; - process.emitWarning = function(warning, name, ctor) { - if (name === `ExperimentalWarning` && typeof warning === `string` && warning.includes(`--experimental-loader`)) - return; - originalEmitWarning.apply(process, arguments); + const originalDlopen = process.dlopen; + process.dlopen = function(...args) { + const [module, filename, ...rest] = args; + return originalDlopen.call( + this, + module, + npath.fromPortablePath(VirtualFS.resolveVirtual(npath.toPortablePath(filename))), + ...rest + ); + }; + const originalEmit = process.emit; + process.emit = function(name, data, ...args) { + if (name === `warning` && typeof data === `object` && data.name === `ExperimentalWarning` && (data.message.includes(`--experimental-loader`) || data.message.includes(`Custom ESM Loaders is an experimental feature`))) + return false; + return originalEmit.apply(process, arguments); }; patchFs(fs__default.default, new PosixFS(opts.fakeFs)); } -function hydrateRuntimeState(data, {basePath}) { +function hydrateRuntimeState(data, { basePath }) { const portablePath = npath.toPortablePath(basePath); const absolutePortablePath = ppath.resolve(portablePath); const ignorePattern = data.ignorePatternData !== null ? new RegExp(data.ignorePatternData) : null; - const packageLocatorsByLocations = new Map(); + const packageLocatorsByLocations = /* @__PURE__ */ new Map(); const packageRegistry = new Map(data.packageRegistryData.map(([packageName, packageStoreData]) => { return [packageName, new Map(packageStoreData.map(([packageReference, packageInformationData]) => { var _a; if (packageName === null !== (packageReference === null)) throw new Error(`Assertion failed: The name and reference should be null, or neither should`); const discardFromLookup = (_a = packageInformationData.discardFromLookup) != null ? _a : false; - const packageLocator = {name: packageName, reference: packageReference}; + const packageLocator = { name: packageName, reference: packageReference }; const entry = packageLocatorsByLocations.get(packageInformationData.packageLocation); if (!entry) { - packageLocatorsByLocations.set(packageInformationData.packageLocation, {locator: packageLocator, discardFromLookup}); + packageLocatorsByLocations.set(packageInformationData.packageLocation, { locator: packageLocator, discardFromLookup }); } else { entry.discardFromLookup = entry.discardFromLookup && discardFromLookup; if (!discardFromLookup) { @@ -14059,25 +14667,744 @@ function resolve(pkg, entry='.', options={}) { } } -var __defProp$1 = Object.defineProperty; -var __defProps = Object.defineProperties; -var __getOwnPropDescs = Object.getOwnPropertyDescriptors; -var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols; -var __hasOwnProp$1 = Object.prototype.hasOwnProperty; -var __propIsEnum$1 = Object.prototype.propertyIsEnumerable; -var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, {enumerable: true, configurable: true, writable: true, value}) : obj[key] = value; -var __spreadValues$1 = (a, b) => { - for (var prop in b || (b = {})) - if (__hasOwnProp$1.call(b, prop)) - __defNormalProp$1(a, prop, b[prop]); - if (__getOwnPropSymbols$1) - for (var prop of __getOwnPropSymbols$1(b)) { - if (__propIsEnum$1.call(b, prop)) - __defNormalProp$1(a, prop, b[prop]); - } - return a; +const ArrayIsArray = Array.isArray; +const JSONStringify = JSON.stringify; +const ObjectGetOwnPropertyNames = Object.getOwnPropertyNames; +const ObjectPrototypeHasOwnProperty = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop); +const RegExpPrototypeExec = (obj, string) => RegExp.prototype.exec.call(obj, string); +const RegExpPrototypeSymbolReplace = (obj, ...rest) => RegExp.prototype[Symbol.replace].apply(obj, rest); +const StringPrototypeEndsWith = (str, ...rest) => String.prototype.endsWith.apply(str, rest); +const StringPrototypeIncludes = (str, ...rest) => String.prototype.includes.apply(str, rest); +const StringPrototypeLastIndexOf = (str, ...rest) => String.prototype.lastIndexOf.apply(str, rest); +const StringPrototypeIndexOf = (str, ...rest) => String.prototype.indexOf.apply(str, rest); +const StringPrototypeReplace = (str, ...rest) => String.prototype.replace.apply(str, rest); +const StringPrototypeSlice = (str, ...rest) => String.prototype.slice.apply(str, rest); +const StringPrototypeStartsWith = (str, ...rest) => String.prototype.startsWith.apply(str, rest); +const SafeMap = Map; +const JSONParse = JSON.parse; + +function createErrorType(code, messageCreator, errorType) { + return class extends errorType { + constructor(...args) { + super(messageCreator(...args)); + this.code = code; + this.name = `${errorType.name} [${code}]`; + } + }; +} +const ERR_PACKAGE_IMPORT_NOT_DEFINED = createErrorType( + `ERR_PACKAGE_IMPORT_NOT_DEFINED`, + (specifier, packagePath, base) => { + return `Package import specifier "${specifier}" is not defined${packagePath ? ` in package ${packagePath}package.json` : ``} imported from ${base}`; + }, + TypeError +); +const ERR_INVALID_MODULE_SPECIFIER = createErrorType( + `ERR_INVALID_MODULE_SPECIFIER`, + (request, reason, base = void 0) => { + return `Invalid module "${request}" ${reason}${base ? ` imported from ${base}` : ``}`; + }, + TypeError +); +const ERR_INVALID_PACKAGE_TARGET = createErrorType( + `ERR_INVALID_PACKAGE_TARGET`, + (pkgPath, key, target, isImport = false, base = void 0) => { + const relError = typeof target === `string` && !isImport && target.length && !StringPrototypeStartsWith(target, `./`); + if (key === `.`) { + assert__default.default(isImport === false); + return `Invalid "exports" main target ${JSONStringify(target)} defined in the package config ${pkgPath}package.json${base ? ` imported from ${base}` : ``}${relError ? `; targets must start with "./"` : ``}`; + } + return `Invalid "${isImport ? `imports` : `exports`}" target ${JSONStringify( + target + )} defined for '${key}' in the package config ${pkgPath}package.json${base ? ` imported from ${base}` : ``}${relError ? `; targets must start with "./"` : ``}`; + }, + Error +); +const ERR_INVALID_PACKAGE_CONFIG = createErrorType( + `ERR_INVALID_PACKAGE_CONFIG`, + (path, base, message) => { + return `Invalid package config ${path}${base ? ` while importing ${base}` : ``}${message ? `. ${message}` : ``}`; + }, + Error +); + +function filterOwnProperties(source, keys) { + const filtered = /* @__PURE__ */ Object.create(null); + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + if (ObjectPrototypeHasOwnProperty(source, key)) { + filtered[key] = source[key]; + } + } + return filtered; +} + +const packageJSONCache = new SafeMap(); +function getPackageConfig(path, specifier, base, readFileSyncFn) { + const existing = packageJSONCache.get(path); + if (existing !== void 0) { + return existing; + } + const source = readFileSyncFn(path); + if (source === void 0) { + const packageConfig2 = { + pjsonPath: path, + exists: false, + main: void 0, + name: void 0, + type: "none", + exports: void 0, + imports: void 0 + }; + packageJSONCache.set(path, packageConfig2); + return packageConfig2; + } + let packageJSON; + try { + packageJSON = JSONParse(source); + } catch (error) { + throw new ERR_INVALID_PACKAGE_CONFIG( + path, + (base ? `"${specifier}" from ` : "") + url.fileURLToPath(base || specifier), + error.message + ); + } + let { imports, main, name, type } = filterOwnProperties(packageJSON, [ + "imports", + "main", + "name", + "type" + ]); + const exports = ObjectPrototypeHasOwnProperty(packageJSON, "exports") ? packageJSON.exports : void 0; + if (typeof imports !== "object" || imports === null) { + imports = void 0; + } + if (typeof main !== "string") { + main = void 0; + } + if (typeof name !== "string") { + name = void 0; + } + if (type !== "module" && type !== "commonjs") { + type = "none"; + } + const packageConfig = { + pjsonPath: path, + exists: true, + main, + name, + type, + exports, + imports + }; + packageJSONCache.set(path, packageConfig); + return packageConfig; +} +function getPackageScopeConfig(resolved, readFileSyncFn) { + let packageJSONUrl = new URL("./package.json", resolved); + while (true) { + const packageJSONPath2 = packageJSONUrl.pathname; + if (StringPrototypeEndsWith(packageJSONPath2, "node_modules/package.json")) { + break; + } + const packageConfig2 = getPackageConfig( + url.fileURLToPath(packageJSONUrl), + resolved, + void 0, + readFileSyncFn + ); + if (packageConfig2.exists) { + return packageConfig2; + } + const lastPackageJSONUrl = packageJSONUrl; + packageJSONUrl = new URL("../package.json", packageJSONUrl); + if (packageJSONUrl.pathname === lastPackageJSONUrl.pathname) { + break; + } + } + const packageJSONPath = url.fileURLToPath(packageJSONUrl); + const packageConfig = { + pjsonPath: packageJSONPath, + exists: false, + main: void 0, + name: void 0, + type: "none", + exports: void 0, + imports: void 0 + }; + packageJSONCache.set(packageJSONPath, packageConfig); + return packageConfig; +} + +/** + @license + Copyright Node.js contributors. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + IN THE SOFTWARE. +*/ +function throwImportNotDefined(specifier, packageJSONUrl, base) { + throw new ERR_PACKAGE_IMPORT_NOT_DEFINED( + specifier, + packageJSONUrl && url.fileURLToPath(new URL(".", packageJSONUrl)), + url.fileURLToPath(base) + ); +} +function throwInvalidSubpath(subpath, packageJSONUrl, internal, base) { + const reason = `request is not a valid subpath for the "${internal ? "imports" : "exports"}" resolution of ${url.fileURLToPath(packageJSONUrl)}`; + throw new ERR_INVALID_MODULE_SPECIFIER( + subpath, + reason, + base && url.fileURLToPath(base) + ); +} +function throwInvalidPackageTarget(subpath, target, packageJSONUrl, internal, base) { + if (typeof target === "object" && target !== null) { + target = JSONStringify(target, null, ""); + } else { + target = `${target}`; + } + throw new ERR_INVALID_PACKAGE_TARGET( + url.fileURLToPath(new URL(".", packageJSONUrl)), + subpath, + target, + internal, + base && url.fileURLToPath(base) + ); +} +const invalidSegmentRegEx = /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i; +const patternRegEx = /\*/g; +function resolvePackageTargetString(target, subpath, match, packageJSONUrl, base, pattern, internal, conditions) { + if (subpath !== "" && !pattern && target[target.length - 1] !== "/") + throwInvalidPackageTarget(match, target, packageJSONUrl, internal, base); + if (!StringPrototypeStartsWith(target, "./")) { + if (internal && !StringPrototypeStartsWith(target, "../") && !StringPrototypeStartsWith(target, "/")) { + let isURL = false; + try { + new URL(target); + isURL = true; + } catch { + } + if (!isURL) { + const exportTarget = pattern ? RegExpPrototypeSymbolReplace(patternRegEx, target, () => subpath) : target + subpath; + return exportTarget; + } + } + throwInvalidPackageTarget(match, target, packageJSONUrl, internal, base); + } + if (RegExpPrototypeExec( + invalidSegmentRegEx, + StringPrototypeSlice(target, 2) + ) !== null) + throwInvalidPackageTarget(match, target, packageJSONUrl, internal, base); + const resolved = new URL(target, packageJSONUrl); + const resolvedPath = resolved.pathname; + const packagePath = new URL(".", packageJSONUrl).pathname; + if (!StringPrototypeStartsWith(resolvedPath, packagePath)) + throwInvalidPackageTarget(match, target, packageJSONUrl, internal, base); + if (subpath === "") + return resolved; + if (RegExpPrototypeExec(invalidSegmentRegEx, subpath) !== null) { + const request = pattern ? StringPrototypeReplace(match, "*", () => subpath) : match + subpath; + throwInvalidSubpath(request, packageJSONUrl, internal, base); + } + if (pattern) { + return new URL( + RegExpPrototypeSymbolReplace(patternRegEx, resolved.href, () => subpath) + ); + } + return new URL(subpath, resolved); +} +function isArrayIndex(key) { + const keyNum = +key; + if (`${keyNum}` !== key) + return false; + return keyNum >= 0 && keyNum < 4294967295; +} +function resolvePackageTarget(packageJSONUrl, target, subpath, packageSubpath, base, pattern, internal, conditions) { + if (typeof target === "string") { + return resolvePackageTargetString( + target, + subpath, + packageSubpath, + packageJSONUrl, + base, + pattern, + internal); + } else if (ArrayIsArray(target)) { + if (target.length === 0) { + return null; + } + let lastException; + for (let i = 0; i < target.length; i++) { + const targetItem = target[i]; + let resolveResult; + try { + resolveResult = resolvePackageTarget( + packageJSONUrl, + targetItem, + subpath, + packageSubpath, + base, + pattern, + internal, + conditions + ); + } catch (e) { + lastException = e; + if (e.code === "ERR_INVALID_PACKAGE_TARGET") { + continue; + } + throw e; + } + if (resolveResult === void 0) { + continue; + } + if (resolveResult === null) { + lastException = null; + continue; + } + return resolveResult; + } + if (lastException === void 0 || lastException === null) + return lastException; + throw lastException; + } else if (typeof target === "object" && target !== null) { + const keys = ObjectGetOwnPropertyNames(target); + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + if (isArrayIndex(key)) { + throw new ERR_INVALID_PACKAGE_CONFIG( + url.fileURLToPath(packageJSONUrl), + base, + '"exports" cannot contain numeric property keys.' + ); + } + } + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + if (key === "default" || conditions.has(key)) { + const conditionalTarget = target[key]; + const resolveResult = resolvePackageTarget( + packageJSONUrl, + conditionalTarget, + subpath, + packageSubpath, + base, + pattern, + internal, + conditions + ); + if (resolveResult === void 0) + continue; + return resolveResult; + } + } + return void 0; + } else if (target === null) { + return null; + } + throwInvalidPackageTarget( + packageSubpath, + target, + packageJSONUrl, + internal, + base + ); +} +function patternKeyCompare(a, b) { + const aPatternIndex = StringPrototypeIndexOf(a, "*"); + const bPatternIndex = StringPrototypeIndexOf(b, "*"); + const baseLenA = aPatternIndex === -1 ? a.length : aPatternIndex + 1; + const baseLenB = bPatternIndex === -1 ? b.length : bPatternIndex + 1; + if (baseLenA > baseLenB) + return -1; + if (baseLenB > baseLenA) + return 1; + if (aPatternIndex === -1) + return 1; + if (bPatternIndex === -1) + return -1; + if (a.length > b.length) + return -1; + if (b.length > a.length) + return 1; + return 0; +} +function packageImportsResolve({ + name, + base, + conditions, + readFileSyncFn +}) { + if (name === "#" || StringPrototypeStartsWith(name, "#/") || StringPrototypeEndsWith(name, "/")) { + const reason = "is not a valid internal imports specifier name"; + throw new ERR_INVALID_MODULE_SPECIFIER(name, reason, url.fileURLToPath(base)); + } + let packageJSONUrl; + const packageConfig = getPackageScopeConfig(base, readFileSyncFn); + if (packageConfig.exists) { + packageJSONUrl = url.pathToFileURL(packageConfig.pjsonPath); + const imports = packageConfig.imports; + if (imports) { + if (ObjectPrototypeHasOwnProperty(imports, name) && !StringPrototypeIncludes(name, "*")) { + const resolveResult = resolvePackageTarget( + packageJSONUrl, + imports[name], + "", + name, + base, + false, + true, + conditions + ); + if (resolveResult != null) { + return resolveResult; + } + } else { + let bestMatch = ""; + let bestMatchSubpath; + const keys = ObjectGetOwnPropertyNames(imports); + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + const patternIndex = StringPrototypeIndexOf(key, "*"); + if (patternIndex !== -1 && StringPrototypeStartsWith( + name, + StringPrototypeSlice(key, 0, patternIndex) + )) { + const patternTrailer = StringPrototypeSlice(key, patternIndex + 1); + if (name.length >= key.length && StringPrototypeEndsWith(name, patternTrailer) && patternKeyCompare(bestMatch, key) === 1 && StringPrototypeLastIndexOf(key, "*") === patternIndex) { + bestMatch = key; + bestMatchSubpath = StringPrototypeSlice( + name, + patternIndex, + name.length - patternTrailer.length + ); + } + } + } + if (bestMatch) { + const target = imports[bestMatch]; + const resolveResult = resolvePackageTarget( + packageJSONUrl, + target, + bestMatchSubpath, + bestMatch, + base, + true, + true, + conditions + ); + if (resolveResult != null) { + return resolveResult; + } + } + } + } + } + throwImportNotDefined(name, packageJSONUrl, base); +} + +const flagSymbol = Symbol('arg flag'); + +class ArgError extends Error { + constructor(msg, code) { + super(msg); + this.name = 'ArgError'; + this.code = code; + + Object.setPrototypeOf(this, ArgError.prototype); + } +} + +function arg( + opts, + { + argv = process.argv.slice(2), + permissive = false, + stopAtPositional = false + } = {} +) { + if (!opts) { + throw new ArgError( + 'argument specification object is required', + 'ARG_CONFIG_NO_SPEC' + ); + } + + const result = { _: [] }; + + const aliases = {}; + const handlers = {}; + + for (const key of Object.keys(opts)) { + if (!key) { + throw new ArgError( + 'argument key cannot be an empty string', + 'ARG_CONFIG_EMPTY_KEY' + ); + } + + if (key[0] !== '-') { + throw new ArgError( + `argument key must start with '-' but found: '${key}'`, + 'ARG_CONFIG_NONOPT_KEY' + ); + } + + if (key.length === 1) { + throw new ArgError( + `argument key must have a name; singular '-' keys are not allowed: ${key}`, + 'ARG_CONFIG_NONAME_KEY' + ); + } + + if (typeof opts[key] === 'string') { + aliases[key] = opts[key]; + continue; + } + + let type = opts[key]; + let isFlag = false; + + if ( + Array.isArray(type) && + type.length === 1 && + typeof type[0] === 'function' + ) { + const [fn] = type; + type = (value, name, prev = []) => { + prev.push(fn(value, name, prev[prev.length - 1])); + return prev; + }; + isFlag = fn === Boolean || fn[flagSymbol] === true; + } else if (typeof type === 'function') { + isFlag = type === Boolean || type[flagSymbol] === true; + } else { + throw new ArgError( + `type missing or not a function or valid array type: ${key}`, + 'ARG_CONFIG_VAD_TYPE' + ); + } + + if (key[1] !== '-' && key.length > 2) { + throw new ArgError( + `short argument keys (with a single hyphen) must have only one character: ${key}`, + 'ARG_CONFIG_SHORTOPT_TOOLONG' + ); + } + + handlers[key] = [type, isFlag]; + } + + for (let i = 0, len = argv.length; i < len; i++) { + const wholeArg = argv[i]; + + if (stopAtPositional && result._.length > 0) { + result._ = result._.concat(argv.slice(i)); + break; + } + + if (wholeArg === '--') { + result._ = result._.concat(argv.slice(i + 1)); + break; + } + + if (wholeArg.length > 1 && wholeArg[0] === '-') { + /* eslint-disable operator-linebreak */ + const separatedArguments = + wholeArg[1] === '-' || wholeArg.length === 2 + ? [wholeArg] + : wholeArg + .slice(1) + .split('') + .map((a) => `-${a}`); + /* eslint-enable operator-linebreak */ + + for (let j = 0; j < separatedArguments.length; j++) { + const arg = separatedArguments[j]; + const [originalArgName, argStr] = + arg[1] === '-' ? arg.split(/=(.*)/, 2) : [arg, undefined]; + + let argName = originalArgName; + while (argName in aliases) { + argName = aliases[argName]; + } + + if (!(argName in handlers)) { + if (permissive) { + result._.push(arg); + continue; + } else { + throw new ArgError( + `unknown or unexpected option: ${originalArgName}`, + 'ARG_UNKNOWN_OPTION' + ); + } + } + + const [type, isFlag] = handlers[argName]; + + if (!isFlag && j + 1 < separatedArguments.length) { + throw new ArgError( + `option requires argument (but was followed by another short argument): ${originalArgName}`, + 'ARG_MISSING_REQUIRED_SHORTARG' + ); + } + + if (isFlag) { + result[argName] = type(true, argName, result[argName]); + } else if (argStr === undefined) { + if ( + argv.length < i + 2 || + (argv[i + 1].length > 1 && + argv[i + 1][0] === '-' && + !( + argv[i + 1].match(/^-?\d*(\.(?=\d))?\d*$/) && + (type === Number || + // eslint-disable-next-line no-undef + (typeof BigInt !== 'undefined' && type === BigInt)) + )) + ) { + const extended = + originalArgName === argName ? '' : ` (alias for ${argName})`; + throw new ArgError( + `option requires argument: ${originalArgName}${extended}`, + 'ARG_MISSING_REQUIRED_LONGARG' + ); + } + + result[argName] = type(argv[i + 1], argName, result[argName]); + ++i; + } else { + result[argName] = type(argStr, argName, result[argName]); + } + } + } else { + result._.push(wholeArg); + } + } + + return result; +} + +arg.flag = (fn) => { + fn[flagSymbol] = true; + return fn; }; -var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); + +// Utility types +arg.COUNT = arg.flag((v, name, existingCount) => (existingCount || 0) + 1); + +// Expose error class +arg.ArgError = ArgError; + +var arg_1 = arg; + +/** + @license + The MIT License (MIT) + + Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com) + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ +function getOptionValue(opt) { + parseOptions(); + return options[opt]; +} +let options; +function parseOptions() { + if (!options) { + options = { + "--conditions": [], + ...parseArgv(getNodeOptionsEnvArgv()), + ...parseArgv(process.execArgv) + }; + } +} +function parseArgv(argv) { + return arg_1( + { + "--conditions": [String], + "-C": "--conditions" + }, + { + argv, + permissive: true + } + ); +} +function getNodeOptionsEnvArgv() { + const errors = []; + const envArgv = ParseNodeOptionsEnvVar(process.env.NODE_OPTIONS || "", errors); + if (errors.length !== 0) ; + return envArgv; +} +function ParseNodeOptionsEnvVar(node_options, errors) { + const env_argv = []; + let is_in_string = false; + let will_start_new_arg = true; + for (let index = 0; index < node_options.length; ++index) { + let c = node_options[index]; + if (c === "\\" && is_in_string) { + if (index + 1 === node_options.length) { + errors.push("invalid value for NODE_OPTIONS (invalid escape)\n"); + return env_argv; + } else { + c = node_options[++index]; + } + } else if (c === " " && !is_in_string) { + will_start_new_arg = true; + continue; + } else if (c === '"') { + is_in_string = !is_in_string; + continue; + } + if (will_start_new_arg) { + env_argv.push(c); + will_start_new_arg = false; + } else { + env_argv[env_argv.length - 1] += c; + } + } + if (is_in_string) { + errors.push("invalid value for NODE_OPTIONS (unterminated string)\n"); + } + return env_argv; +} + function makeApi(runtimeState, opts) { const alwaysWarnOnFallback = Number(process.env.PNP_ALWAYS_WARN_ON_FALLBACK) > 0; const debugLevel = Number(process.env.PNP_DEBUG_LEVEL); @@ -14085,9 +15412,9 @@ function makeApi(runtimeState, opts) { const isStrictRegExp = /^(\/|\.{1,2}(\/|$))/; const isDirRegExp = /\/$/; const isRelativeRegexp = /^\.{0,2}\//; - const topLevelLocator = {name: null, reference: null}; + const topLevelLocator = { name: null, reference: null }; const fallbackLocators = []; - const emittedWarnings = new Set(); + const emittedWarnings = /* @__PURE__ */ new Set(); if (runtimeState.enableTopLevelFallback === true) fallbackLocators.push(topLevelLocator); if (opts.compatibilityMode !== false) { @@ -14098,7 +15425,7 @@ function makeApi(runtimeState, opts) { if (reference === null) { throw new Error(`Assertion failed: This reference shouldn't be null`); } else { - fallbackLocators.push({name, reference}); + fallbackLocators.push({ name, reference }); } } } @@ -14120,7 +15447,7 @@ function makeApi(runtimeState, opts) { function trace(entry) { var _a, _b, _c, _d, _e, _f; const colors = (_c = (_b = (_a = process.stderr) == null ? void 0 : _a.hasColors) == null ? void 0 : _b.call(_a)) != null ? _c : process.stdout.isTTY; - const c = (n, str) => `[${n}m${str}`; + const c = (n, str) => `\x1B[${n}m${str}\x1B[0m`; const error = entry.error; if (error) console.error(c(`31;1`, `\u2716 ${(_d = entry.error) == null ? void 0 : _d.message.replace(/\n.*/s, ``)}`)); @@ -14129,10 +15456,10 @@ function makeApi(runtimeState, opts) { if (entry.args.length > 0) console.error(); for (const arg of entry.args) - console.error(` ${c(`37;1`, `In \u2190`)} ${nodeUtils.inspect(arg, {colors, compact: true})}`); + console.error(` ${c(`37;1`, `In \u2190`)} ${nodeUtils.inspect(arg, { colors, compact: true })}`); if (entry.result) { console.error(); - console.error(` ${c(`37;1`, `Out \u2192`)} ${nodeUtils.inspect(entry.result, {colors, compact: true})}`); + console.error(` ${c(`37;1`, `Out \u2192`)} ${nodeUtils.inspect(entry.result, { colors, compact: true })}`); } const stack = (_f = (_e = new Error().stack.match(/(?<=^ +)at.*/gm)) == null ? void 0 : _e.slice(2)) != null ? _f : []; if (stack.length > 0) { @@ -14176,7 +15503,10 @@ function makeApi(runtimeState, opts) { function getPackageInformationSafe(packageLocator) { const packageInformation = getPackageInformation(packageLocator); if (!packageInformation) { - throw makeError(ErrorCode.INTERNAL, `Couldn't find a matching entry in the dependency tree for the specified parent (this is probably an internal error)`); + throw makeError( + ErrorCode.INTERNAL, + `Couldn't find a matching entry in the dependency tree for the specified parent (this is probably an internal error)` + ); } return packageInformation; } @@ -14188,23 +15518,34 @@ function makeApi(runtimeState, opts) { return true; return false; } - const defaultExportsConditions = new Set([`default`, `node`, `require`]); + const defaultExportsConditions = /* @__PURE__ */ new Set([ + `default`, + `node`, + `require`, + ...getOptionValue(`--conditions`) + ]); function applyNodeExportsResolution(unqualifiedPath, conditions = defaultExportsConditions) { const locator = findPackageLocator(ppath.join(unqualifiedPath, `internal.js`), { resolveIgnored: true, includeDiscardFromLookup: true }); if (locator === null) { - throw makeError(ErrorCode.INTERNAL, `The locator that owns the "${unqualifiedPath}" path can't be found inside the dependency tree (this is probably an internal error)`); + throw makeError( + ErrorCode.INTERNAL, + `The locator that owns the "${unqualifiedPath}" path can't be found inside the dependency tree (this is probably an internal error)` + ); } - const {packageLocation} = getPackageInformationSafe(locator); + const { packageLocation } = getPackageInformationSafe(locator); const manifestPath = ppath.join(packageLocation, Filename.manifest); if (!opts.fakeFs.existsSync(manifestPath)) return null; const pkgJson = JSON.parse(opts.fakeFs.readFileSync(manifestPath, `utf8`)); let subpath = ppath.contains(packageLocation, unqualifiedPath); if (subpath === null) { - throw makeError(ErrorCode.INTERNAL, `unqualifiedPath doesn't contain the packageLocation (this is probably an internal error)`); + throw makeError( + ErrorCode.INTERNAL, + `unqualifiedPath doesn't contain the packageLocation (this is probably an internal error)` + ); } if (!isRelativeRegexp.test(subpath)) subpath = `./${subpath}`; @@ -14215,13 +15556,18 @@ function makeApi(runtimeState, opts) { unsafe: true }); } catch (error) { - throw makeError(ErrorCode.EXPORTS_RESOLUTION_FAILED, error.message, {unqualifiedPath: getPathForDisplay(unqualifiedPath), locator, pkgJson, subpath: getPathForDisplay(subpath), conditions}, `ERR_PACKAGE_PATH_NOT_EXPORTED`); + throw makeError( + ErrorCode.EXPORTS_RESOLUTION_FAILED, + error.message, + { unqualifiedPath: getPathForDisplay(unqualifiedPath), locator, pkgJson, subpath: getPathForDisplay(subpath), conditions }, + `ERR_PACKAGE_PATH_NOT_EXPORTED` + ); } if (typeof resolvedExport === `string`) return ppath.join(packageLocation, resolvedExport); return null; } - function applyNodeExtensionResolution(unqualifiedPath, candidates, {extensions}) { + function applyNodeExtensionResolution(unqualifiedPath, candidates, { extensions }) { let stat; try { candidates.push(unqualifiedPath); @@ -14240,7 +15586,7 @@ function makeApi(runtimeState, opts) { if (pkgJson && pkgJson.main) nextUnqualifiedPath = ppath.resolve(unqualifiedPath, pkgJson.main); if (nextUnqualifiedPath && nextUnqualifiedPath !== unqualifiedPath) { - const resolution = applyNodeExtensionResolution(nextUnqualifiedPath, candidates, {extensions}); + const resolution = applyNodeExtensionResolution(nextUnqualifiedPath, candidates, { extensions }); if (resolution !== null) { return resolution; } @@ -14255,7 +15601,7 @@ function makeApi(runtimeState, opts) { } if (stat && stat.isDirectory()) { for (let i = 0, length = extensions.length; i < length; i++) { - const candidateFile = ppath.format({dir: unqualifiedPath, name: `index`, ext: extensions[i]}); + const candidateFile = ppath.format({ dir: unqualifiedPath, name: `index`, ext: extensions[i] }); candidates.push(candidateFile); if (opts.fakeFs.existsSync(candidateFile)) { return candidateFile; @@ -14273,7 +15619,7 @@ function makeApi(runtimeState, opts) { function callNativeResolution(request, issuer) { if (issuer.endsWith(`/`)) issuer = ppath.join(issuer, `internal.js`); - return require$$0.Module._resolveFilename(npath.fromPortablePath(request), makeFakeModule(npath.fromPortablePath(issuer)), false, {plugnplay: false}); + return require$$0.Module._resolveFilename(npath.fromPortablePath(request), makeFakeModule(npath.fromPortablePath(issuer)), false, { plugnplay: false }); } function isPathIgnored(path) { if (ignorePattern === null) @@ -14287,9 +15633,9 @@ function makeApi(runtimeState, opts) { return false; } } - const VERSIONS = {std: 3, resolveVirtual: 1, getAllLocators: 1}; + const VERSIONS = { std: 3, resolveVirtual: 1, getAllLocators: 1 }; const topLevel = topLevelLocator; - function getPackageInformation({name, reference}) { + function getPackageInformation({ name, reference }) { const packageInformationStore = packageRegistry.get(name); if (!packageInformationStore) return null; @@ -14298,7 +15644,7 @@ function makeApi(runtimeState, opts) { return null; return packageInformation; } - function findPackageDependents({name, reference}) { + function findPackageDependents({ name, reference }) { const dependents = []; for (const [dependentName, packageInformationStore] of packageRegistry) { if (dependentName === null) @@ -14320,8 +15666,8 @@ function makeApi(runtimeState, opts) { return dependents; } function findBrokenPeerDependencies(dependency, initialPackage) { - const brokenPackages = new Map(); - const alreadyVisited = new Set(); + const brokenPackages = /* @__PURE__ */ new Map(); + const alreadyVisited = /* @__PURE__ */ new Set(); const traversal = (currentPackage) => { const identifier = JSON.stringify(currentPackage.name); if (alreadyVisited.has(identifier)) @@ -14335,7 +15681,7 @@ function makeApi(runtimeState, opts) { } else { let brokenSet = brokenPackages.get(dependent.name); if (typeof brokenSet === `undefined`) - brokenPackages.set(dependent.name, brokenSet = new Set()); + brokenPackages.set(dependent.name, brokenSet = /* @__PURE__ */ new Set()); brokenSet.add(dependent.reference); } } @@ -14344,10 +15690,10 @@ function makeApi(runtimeState, opts) { const brokenList = []; for (const name of [...brokenPackages.keys()].sort()) for (const reference of [...brokenPackages.get(name)].sort()) - brokenList.push({name, reference}); + brokenList.push({ name, reference }); return brokenList; } - function findPackageLocator(location, {resolveIgnored = false, includeDiscardFromLookup = false} = {}) { + function findPackageLocator(location, { resolveIgnored = false, includeDiscardFromLookup = false } = {}) { if (isPathIgnored(location) && !resolveIgnored) return null; let relativeLocation = ppath.relative(runtimeState.basePath, location); @@ -14365,7 +15711,18 @@ function makeApi(runtimeState, opts) { } while (relativeLocation !== ``); return null; } - function resolveToUnqualified(request, issuer, {considerBuiltins = true} = {}) { + function tryReadFile(filePath) { + try { + return opts.fakeFs.readFileSync(npath.toPortablePath(filePath), `utf8`); + } catch (err) { + if (err.code === `ENOENT`) + return void 0; + throw err; + } + } + function resolveToUnqualified(request, issuer, { considerBuiltins = true } = {}) { + if (request.startsWith(`#`)) + throw new Error(`resolveToUnqualified can not handle private import mappings`); if (request === `pnpapi`) return npath.toPortablePath(opts.pnpapiResolution); if (considerBuiltins && isBuiltinModule(request)) @@ -14376,11 +15733,15 @@ function makeApi(runtimeState, opts) { if (!ppath.isAbsolute(request) || findPackageLocator(request) === null) { const result = callNativeResolution(request, issuer); if (result === false) { - throw makeError(ErrorCode.BUILTIN_NODE_RESOLUTION_FAILED, `The builtin node resolution algorithm was unable to resolve the requested module (it didn't go through the pnp resolver because the issuer was explicitely ignored by the regexp) + throw makeError( + ErrorCode.BUILTIN_NODE_RESOLUTION_FAILED, + `The builtin node resolution algorithm was unable to resolve the requested module (it didn't go through the pnp resolver because the issuer was explicitely ignored by the regexp) Require request: "${requestForDisplay}" Required by: ${issuerForDisplay} -`, {request: requestForDisplay, issuer: issuerForDisplay}); +`, + { request: requestForDisplay, issuer: issuerForDisplay } + ); } return npath.toPortablePath(result); } @@ -14392,7 +15753,11 @@ Required by: ${issuerForDisplay} unqualifiedPath = ppath.normalize(request); } else { if (!issuer) { - throw makeError(ErrorCode.API_ERROR, `The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute`, {request: requestForDisplay, issuer: issuerForDisplay}); + throw makeError( + ErrorCode.API_ERROR, + `The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute`, + { request: requestForDisplay, issuer: issuerForDisplay } + ); } const absoluteIssuer = ppath.resolve(issuer); if (issuer.match(isDirRegExp)) { @@ -14403,18 +15768,26 @@ Required by: ${issuerForDisplay} } } else { if (!issuer) { - throw makeError(ErrorCode.API_ERROR, `The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute`, {request: requestForDisplay, issuer: issuerForDisplay}); + throw makeError( + ErrorCode.API_ERROR, + `The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute`, + { request: requestForDisplay, issuer: issuerForDisplay } + ); } const [, dependencyName, subPath] = dependencyNameMatch; const issuerLocator = findPackageLocator(issuer); if (!issuerLocator) { const result = callNativeResolution(request, issuer); if (result === false) { - throw makeError(ErrorCode.BUILTIN_NODE_RESOLUTION_FAILED, `The builtin node resolution algorithm was unable to resolve the requested module (it didn't go through the pnp resolver because the issuer doesn't seem to be part of the Yarn-managed dependency tree). + throw makeError( + ErrorCode.BUILTIN_NODE_RESOLUTION_FAILED, + `The builtin node resolution algorithm was unable to resolve the requested module (it didn't go through the pnp resolver because the issuer doesn't seem to be part of the Yarn-managed dependency tree). Require path: "${requestForDisplay}" Required by: ${issuerForDisplay} -`, {request: requestForDisplay, issuer: issuerForDisplay}); +`, + { request: requestForDisplay, issuer: issuerForDisplay } + ); } return npath.toPortablePath(result); } @@ -14451,60 +15824,88 @@ Required by: ${issuerForDisplay} let error = null; if (dependencyReference === null) { if (isDependencyTreeRoot(issuerLocator)) { - error = makeError(ErrorCode.MISSING_PEER_DEPENDENCY, `Your application tried to access ${dependencyName} (a peer dependency); this isn't allowed as there is no ancestor to satisfy the requirement. Use a devDependency if needed. + error = makeError( + ErrorCode.MISSING_PEER_DEPENDENCY, + `Your application tried to access ${dependencyName} (a peer dependency); this isn't allowed as there is no ancestor to satisfy the requirement. Use a devDependency if needed. Required package: ${dependencyName}${dependencyName !== requestForDisplay ? ` (via "${requestForDisplay}")` : ``} Required by: ${issuerForDisplay} -`, {request: requestForDisplay, issuer: issuerForDisplay, dependencyName}); +`, + { request: requestForDisplay, issuer: issuerForDisplay, dependencyName } + ); } else { const brokenAncestors = findBrokenPeerDependencies(dependencyName, issuerLocator); if (brokenAncestors.every((ancestor) => isDependencyTreeRoot(ancestor))) { - error = makeError(ErrorCode.MISSING_PEER_DEPENDENCY, `${issuerLocator.name} tried to access ${dependencyName} (a peer dependency) but it isn't provided by your application; this makes the require call ambiguous and unsound. + error = makeError( + ErrorCode.MISSING_PEER_DEPENDENCY, + `${issuerLocator.name} tried to access ${dependencyName} (a peer dependency) but it isn't provided by your application; this makes the require call ambiguous and unsound. Required package: ${dependencyName}${dependencyName !== requestForDisplay ? ` (via "${requestForDisplay}")` : ``} Required by: ${issuerLocator.name}@${issuerLocator.reference} (via ${issuerForDisplay}) ${brokenAncestors.map((ancestorLocator) => `Ancestor breaking the chain: ${ancestorLocator.name}@${ancestorLocator.reference} `).join(``)} -`, {request: requestForDisplay, issuer: issuerForDisplay, issuerLocator: Object.assign({}, issuerLocator), dependencyName, brokenAncestors}); +`, + { request: requestForDisplay, issuer: issuerForDisplay, issuerLocator: Object.assign({}, issuerLocator), dependencyName, brokenAncestors } + ); } else { - error = makeError(ErrorCode.MISSING_PEER_DEPENDENCY, `${issuerLocator.name} tried to access ${dependencyName} (a peer dependency) but it isn't provided by its ancestors; this makes the require call ambiguous and unsound. + error = makeError( + ErrorCode.MISSING_PEER_DEPENDENCY, + `${issuerLocator.name} tried to access ${dependencyName} (a peer dependency) but it isn't provided by its ancestors; this makes the require call ambiguous and unsound. Required package: ${dependencyName}${dependencyName !== requestForDisplay ? ` (via "${requestForDisplay}")` : ``} Required by: ${issuerLocator.name}@${issuerLocator.reference} (via ${issuerForDisplay}) ${brokenAncestors.map((ancestorLocator) => `Ancestor breaking the chain: ${ancestorLocator.name}@${ancestorLocator.reference} `).join(``)} -`, {request: requestForDisplay, issuer: issuerForDisplay, issuerLocator: Object.assign({}, issuerLocator), dependencyName, brokenAncestors}); +`, + { request: requestForDisplay, issuer: issuerForDisplay, issuerLocator: Object.assign({}, issuerLocator), dependencyName, brokenAncestors } + ); } } } else if (dependencyReference === void 0) { if (!considerBuiltins && isBuiltinModule(request)) { if (isDependencyTreeRoot(issuerLocator)) { - error = makeError(ErrorCode.UNDECLARED_DEPENDENCY, `Your application tried to access ${dependencyName}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${dependencyName} isn't otherwise declared in your dependencies, this makes the require call ambiguous and unsound. + error = makeError( + ErrorCode.UNDECLARED_DEPENDENCY, + `Your application tried to access ${dependencyName}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${dependencyName} isn't otherwise declared in your dependencies, this makes the require call ambiguous and unsound. Required package: ${dependencyName}${dependencyName !== requestForDisplay ? ` (via "${requestForDisplay}")` : ``} Required by: ${issuerForDisplay} -`, {request: requestForDisplay, issuer: issuerForDisplay, dependencyName}); +`, + { request: requestForDisplay, issuer: issuerForDisplay, dependencyName } + ); } else { - error = makeError(ErrorCode.UNDECLARED_DEPENDENCY, `${issuerLocator.name} tried to access ${dependencyName}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${dependencyName} isn't otherwise declared in ${issuerLocator.name}'s dependencies, this makes the require call ambiguous and unsound. + error = makeError( + ErrorCode.UNDECLARED_DEPENDENCY, + `${issuerLocator.name} tried to access ${dependencyName}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${dependencyName} isn't otherwise declared in ${issuerLocator.name}'s dependencies, this makes the require call ambiguous and unsound. Required package: ${dependencyName}${dependencyName !== requestForDisplay ? ` (via "${requestForDisplay}")` : ``} Required by: ${issuerForDisplay} -`, {request: requestForDisplay, issuer: issuerForDisplay, issuerLocator: Object.assign({}, issuerLocator), dependencyName}); +`, + { request: requestForDisplay, issuer: issuerForDisplay, issuerLocator: Object.assign({}, issuerLocator), dependencyName } + ); } } else { if (isDependencyTreeRoot(issuerLocator)) { - error = makeError(ErrorCode.UNDECLARED_DEPENDENCY, `Your application tried to access ${dependencyName}, but it isn't declared in your dependencies; this makes the require call ambiguous and unsound. + error = makeError( + ErrorCode.UNDECLARED_DEPENDENCY, + `Your application tried to access ${dependencyName}, but it isn't declared in your dependencies; this makes the require call ambiguous and unsound. Required package: ${dependencyName}${dependencyName !== requestForDisplay ? ` (via "${requestForDisplay}")` : ``} Required by: ${issuerForDisplay} -`, {request: requestForDisplay, issuer: issuerForDisplay, dependencyName}); +`, + { request: requestForDisplay, issuer: issuerForDisplay, dependencyName } + ); } else { - error = makeError(ErrorCode.UNDECLARED_DEPENDENCY, `${issuerLocator.name} tried to access ${dependencyName}, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound. + error = makeError( + ErrorCode.UNDECLARED_DEPENDENCY, + `${issuerLocator.name} tried to access ${dependencyName}, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound. Required package: ${dependencyName}${dependencyName !== requestForDisplay ? ` (via "${requestForDisplay}")` : ``} Required by: ${issuerLocator.name}@${issuerLocator.reference} (via ${issuerForDisplay}) -`, {request: requestForDisplay, issuer: issuerForDisplay, issuerLocator: Object.assign({}, issuerLocator), dependencyName}); +`, + { request: requestForDisplay, issuer: issuerForDisplay, issuerLocator: Object.assign({}, issuerLocator), dependencyName } + ); } } } @@ -14519,14 +15920,18 @@ Required by: ${issuerLocator.name}@${issuerLocator.reference} (via ${issuerForDi process.emitWarning(error); } } - const dependencyLocator = Array.isArray(dependencyReference) ? {name: dependencyReference[0], reference: dependencyReference[1]} : {name: dependencyName, reference: dependencyReference}; + const dependencyLocator = Array.isArray(dependencyReference) ? { name: dependencyReference[0], reference: dependencyReference[1] } : { name: dependencyName, reference: dependencyReference }; const dependencyInformation = getPackageInformationSafe(dependencyLocator); if (!dependencyInformation.packageLocation) { - throw makeError(ErrorCode.MISSING_DEPENDENCY, `A dependency seems valid but didn't get installed for some reason. This might be caused by a partial install, such as dev vs prod. + throw makeError( + ErrorCode.MISSING_DEPENDENCY, + `A dependency seems valid but didn't get installed for some reason. This might be caused by a partial install, such as dev vs prod. Required package: ${dependencyLocator.name}@${dependencyLocator.reference}${dependencyLocator.name !== requestForDisplay ? ` (via "${requestForDisplay}")` : ``} Required by: ${issuerLocator.name}@${issuerLocator.reference} (via ${issuerForDisplay}) -`, {request: requestForDisplay, issuer: issuerForDisplay, dependencyLocator: Object.assign({}, dependencyLocator)}); +`, + { request: requestForDisplay, issuer: issuerForDisplay, dependencyLocator: Object.assign({}, dependencyLocator) } + ); } const dependencyLocation = dependencyInformation.packageLocation; if (subPath) { @@ -14547,17 +15952,18 @@ Required by: ${issuerLocator.name}@${issuerLocator.reference} (via ${issuerForDi return unqualifiedPath; } } - function resolveUnqualified(unqualifiedPath, {extensions = Object.keys(require$$0.Module._extensions)} = {}) { + function resolveUnqualified(unqualifiedPath, { extensions = Object.keys(require$$0.Module._extensions) } = {}) { var _a, _b; const candidates = []; - const qualifiedPath = applyNodeExtensionResolution(unqualifiedPath, candidates, {extensions}); + const qualifiedPath = applyNodeExtensionResolution(unqualifiedPath, candidates, { extensions }); if (qualifiedPath) { return ppath.normalize(qualifiedPath); } else { + reportRequiredFilesToWatchMode(candidates.map((candidate) => npath.fromPortablePath(candidate))); const unqualifiedPathForDisplay = getPathForDisplay(unqualifiedPath); const containingPackage = findPackageLocator(unqualifiedPath); if (containingPackage) { - const {packageLocation} = getPackageInformationSafe(containingPackage); + const { packageLocation } = getPackageInformationSafe(containingPackage); let exists = true; try { opts.fakeFs.accessSync(packageLocation); @@ -14570,38 +15976,67 @@ Required by: ${issuerLocator.name}@${issuerLocator.reference} (via ${issuerForDi Missing package: ${containingPackage.name}@${containingPackage.reference} Expected package location: ${getPathForDisplay(packageLocation)} -`, {unqualifiedPath: unqualifiedPathForDisplay, extensions}); +`, { unqualifiedPath: unqualifiedPathForDisplay, extensions }); } } if (!exists) { const errorMessage = packageLocation.includes(`/unplugged/`) ? `Required unplugged package missing from disk. This may happen when switching branches without running installs (unplugged packages must be fully materialized on disk to work).` : `Required package missing from disk. If you keep your packages inside your repository then restarting the Node process may be enough. Otherwise, try to run an install first.`; - throw makeError(ErrorCode.QUALIFIED_PATH_RESOLUTION_FAILED, `${errorMessage} + throw makeError( + ErrorCode.QUALIFIED_PATH_RESOLUTION_FAILED, + `${errorMessage} Missing package: ${containingPackage.name}@${containingPackage.reference} Expected package location: ${getPathForDisplay(packageLocation)} -`, {unqualifiedPath: unqualifiedPathForDisplay, extensions}); +`, + { unqualifiedPath: unqualifiedPathForDisplay, extensions } + ); } } - throw makeError(ErrorCode.QUALIFIED_PATH_RESOLUTION_FAILED, `Qualified path resolution failed: we looked for the following paths, but none could be accessed. + throw makeError( + ErrorCode.QUALIFIED_PATH_RESOLUTION_FAILED, + `Qualified path resolution failed: we looked for the following paths, but none could be accessed. Source path: ${unqualifiedPathForDisplay} ${candidates.map((candidate) => `Not found: ${getPathForDisplay(candidate)} -`).join(``)}`, {unqualifiedPath: unqualifiedPathForDisplay, extensions}); +`).join(``)}`, + { unqualifiedPath: unqualifiedPathForDisplay, extensions } + ); } } - function resolveRequest(request, issuer, {considerBuiltins, extensions, conditions} = {}) { + function resolvePrivateRequest(request, issuer, opts2) { + var _a; + if (!issuer) + throw new Error(`Assertion failed: An issuer is required to resolve private import mappings`); + const resolved = packageImportsResolve({ + name: request, + base: url.pathToFileURL(npath.fromPortablePath(issuer)), + conditions: (_a = opts2.conditions) != null ? _a : defaultExportsConditions, + readFileSyncFn: tryReadFile + }); + if (resolved instanceof url.URL) { + return resolveUnqualified(npath.toPortablePath(url.fileURLToPath(resolved)), { extensions: opts2.extensions }); + } else { + if (resolved.startsWith(`#`)) + throw new Error(`Mapping from one private import to another isn't allowed`); + return resolveRequest(resolved, issuer, opts2); + } + } + function resolveRequest(request, issuer, opts2 = {}) { try { - const unqualifiedPath = resolveToUnqualified(request, issuer, {considerBuiltins}); + if (request.startsWith(`#`)) + return resolvePrivateRequest(request, issuer, opts2); + const { considerBuiltins, extensions, conditions } = opts2; + const unqualifiedPath = resolveToUnqualified(request, issuer, { considerBuiltins }); if (request === `pnpapi`) return unqualifiedPath; if (unqualifiedPath === null) return null; const isIssuerIgnored = () => issuer !== null ? isPathIgnored(issuer) : false; const remappedPath = (!considerBuiltins || !isBuiltinModule(request)) && !isIssuerIgnored() ? resolveUnqualifiedExport(request, unqualifiedPath, conditions) : unqualifiedPath; - return resolveUnqualified(remappedPath, {extensions}); + return resolveUnqualified(remappedPath, { extensions }); } catch (error) { if (Object.prototype.hasOwnProperty.call(error, `pnpCode`)) - Object.assign(error.data, {request: getPathForDisplay(request), issuer: issuer && getPathForDisplay(issuer)}); + Object.assign(error.data, { request: getPathForDisplay(request), issuer: issuer && getPathForDisplay(issuer) }); throw error; } } @@ -14615,9 +16050,9 @@ ${candidates.map((candidate) => `Not found: ${getPathForDisplay(candidate)} topLevel, getLocator: (name, referencish) => { if (Array.isArray(referencish)) { - return {name: referencish[0], reference: referencish[1]}; + return { name: referencish[0], reference: referencish[1] }; } else { - return {name, reference: referencish}; + return { name, reference: referencish }; } }, getDependencyTreeRoots: () => { @@ -14628,7 +16063,7 @@ ${candidates.map((candidate) => `Not found: ${getPathForDisplay(candidate)} for (const [name, entry] of packageRegistry) for (const reference of entry.keys()) if (name !== null && reference !== null) - locators.push({name, reference}); + locators.push({ name, reference }); return locators; }, getPackageInformation: (locator) => { @@ -14636,7 +16071,7 @@ ${candidates.map((candidate) => `Not found: ${getPathForDisplay(candidate)} if (info === null) return null; const packageLocation = npath.fromPortablePath(info.packageLocation); - const nativeInfo = __spreadProps(__spreadValues$1({}, info), {packageLocation}); + const nativeInfo = { ...info, packageLocation }; return nativeInfo; }, findPackageLocator: (path) => { @@ -14673,7 +16108,7 @@ ${candidates.map((candidate) => `Not found: ${getPathForDisplay(candidate)} function makeManager(pnpapi, opts) { const initialApiPath = npath.toPortablePath(pnpapi.resolveToUnqualified(`pnpapi`, null)); const initialApiStats = opts.fakeFs.statSync(npath.toPortablePath(initialApiPath)); - const apiMetadata = new Map([ + const apiMetadata = /* @__PURE__ */ new Map([ [initialApiPath, { cache: require$$0.Module._cache, instance: pnpapi, @@ -14715,7 +16150,7 @@ function makeManager(pnpapi, opts) { } return apiEntry; } - const findApiPathCache = new Map(); + const findApiPathCache = /* @__PURE__ */ new Map(); function addToCacheAndReturn(start, end, target) { if (target !== null) target = VirtualFS.resolveVirtual(target); @@ -14740,11 +16175,11 @@ function makeManager(pnpapi, opts) { if (!packageInformation) throw new Error(`Assertion failed: Couldn't get package information for '${modulePath}'`); if (!bestCandidate) - bestCandidate = {packageLocation: packageInformation.packageLocation, apiPaths: []}; + bestCandidate = { packageLocation: packageInformation.packageLocation, apiPaths: [] }; if (packageInformation.packageLocation === bestCandidate.packageLocation) { bestCandidate.apiPaths.push(apiPath); } else if (packageInformation.packageLocation.length > bestCandidate.packageLocation.length) { - bestCandidate = {packageLocation: packageInformation.packageLocation, apiPaths: [apiPath]}; + bestCandidate = { packageLocation: packageInformation.packageLocation, apiPaths: [apiPath] }; } } if (bestCandidate) { @@ -14798,35 +16233,7 @@ ${controlSegment} }; } -var __defProp = Object.defineProperty; -var __getOwnPropSymbols = Object.getOwnPropertySymbols; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __propIsEnum = Object.prototype.propertyIsEnumerable; -var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {enumerable: true, configurable: true, writable: true, value}) : obj[key] = value; -var __spreadValues = (a, b) => { - for (var prop in b || (b = {})) - if (__hasOwnProp.call(b, prop)) - __defNormalProp(a, prop, b[prop]); - if (__getOwnPropSymbols) - for (var prop of __getOwnPropSymbols(b)) { - if (__propIsEnum.call(b, prop)) - __defNormalProp(a, prop, b[prop]); - } - return a; -}; -var __objRest = (source, exclude) => { - var target = {}; - for (var prop in source) - if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0) - target[prop] = source[prop]; - if (source != null && __getOwnPropSymbols) - for (var prop of __getOwnPropSymbols(source)) { - if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop)) - target[prop] = source[prop]; - } - return target; -}; -const localFs = __spreadValues({}, fs__default.default); +const localFs = { ...fs__default.default }; const nodeFs = new NodeFS(localFs); const defaultRuntimeState = $$SETUP_STATE(hydrateRuntimeState); const defaultPnpapiResolution = __filename; @@ -14856,21 +16263,18 @@ const defaultApi = Object.assign(makeApi(defaultRuntimeState, { fakeFs: dynamicFsLayer, pnpapiResolution: defaultPnpapiResolution }), { - makeApi: (_a) => { - var _b = _a, { - basePath = void 0, - fakeFs = dynamicFsLayer, - pnpapiResolution = defaultPnpapiResolution - } = _b, rest = __objRest(_b, [ - "basePath", - "fakeFs", - "pnpapiResolution" - ]); + makeApi: ({ + basePath = void 0, + fakeFs = dynamicFsLayer, + pnpapiResolution = defaultPnpapiResolution, + ...rest + }) => { const apiRuntimeState = typeof basePath !== `undefined` ? $$SETUP_STATE(hydrateRuntimeState, basePath) : defaultRuntimeState; - return makeApi(apiRuntimeState, __spreadValues({ + return makeApi(apiRuntimeState, { fakeFs, - pnpapiResolution - }, rest)); + pnpapiResolution, + ...rest + }); }, setup: (api) => { applyPatch(api || defaultApi, { @@ -14891,7 +16295,7 @@ if (module.parent && module.parent.id === `internal/preload`) { } if (process.mainModule === module) { const reportError = (code, message, data) => { - process.stdout.write(`${JSON.stringify([{code, message, data}, null])} + process.stdout.write(`${JSON.stringify([{ code, message, data }, null])} `); }; const reportSuccess = (resolution) => { diff --git a/.pnp.loader.mjs b/.pnp.loader.mjs index 70fb408..057766a 100644 --- a/.pnp.loader.mjs +++ b/.pnp.loader.mjs @@ -1,14 +1,17 @@ -import { URL, fileURLToPath, pathToFileURL } from 'url'; +import { URL as URL$1, fileURLToPath, pathToFileURL } from 'url'; import fs from 'fs'; import path from 'path'; import moduleExports, { Module } from 'module'; +import { EOL } from 'os'; +import assert from 'assert'; -var PathType; -(function(PathType2) { - PathType2[PathType2["File"] = 0] = "File"; - PathType2[PathType2["Portable"] = 1] = "Portable"; - PathType2[PathType2["Native"] = 2] = "Native"; -})(PathType || (PathType = {})); +const SAFE_TIME = 456789e3; + +const PortablePath = { + root: `/`, + dot: `.`, + parent: `..` +}; const npath = Object.create(path); const ppath = Object.create(path.posix); npath.cwd = () => process.cwd(); @@ -64,6 +67,1272 @@ function toPortablePath(p) { p = `/unc/${uncWindowsPathMatch[1] ? `.dot/` : ``}${uncWindowsPathMatch[2]}`; return p; } +function convertPath(targetPathUtils, sourcePath) { + return targetPathUtils === npath ? fromPortablePath(sourcePath) : toPortablePath(sourcePath); +} + +const defaultTime = new Date(SAFE_TIME * 1e3); +async function copyPromise(destinationFs, destination, sourceFs, source, opts) { + const normalizedDestination = destinationFs.pathUtils.normalize(destination); + const normalizedSource = sourceFs.pathUtils.normalize(source); + const prelayout = []; + const postlayout = []; + const { atime, mtime } = opts.stableTime ? { atime: defaultTime, mtime: defaultTime } : await sourceFs.lstatPromise(normalizedSource); + await destinationFs.mkdirpPromise(destinationFs.pathUtils.dirname(destination), { utimes: [atime, mtime] }); + const updateTime = typeof destinationFs.lutimesPromise === `function` ? destinationFs.lutimesPromise.bind(destinationFs) : destinationFs.utimesPromise.bind(destinationFs); + await copyImpl(prelayout, postlayout, updateTime, destinationFs, normalizedDestination, sourceFs, normalizedSource, { ...opts, didParentExist: true }); + for (const operation of prelayout) + await operation(); + await Promise.all(postlayout.map((operation) => { + return operation(); + })); +} +async function copyImpl(prelayout, postlayout, updateTime, destinationFs, destination, sourceFs, source, opts) { + var _a, _b; + const destinationStat = opts.didParentExist ? await maybeLStat(destinationFs, destination) : null; + const sourceStat = await sourceFs.lstatPromise(source); + const { atime, mtime } = opts.stableTime ? { atime: defaultTime, mtime: defaultTime } : sourceStat; + let updated; + switch (true) { + case sourceStat.isDirectory(): + { + updated = await copyFolder(prelayout, postlayout, updateTime, destinationFs, destination, destinationStat, sourceFs, source, sourceStat, opts); + } + break; + case sourceStat.isFile(): + { + updated = await copyFile(prelayout, postlayout, updateTime, destinationFs, destination, destinationStat, sourceFs, source, sourceStat, opts); + } + break; + case sourceStat.isSymbolicLink(): + { + updated = await copySymlink(prelayout, postlayout, updateTime, destinationFs, destination, destinationStat, sourceFs, source, sourceStat, opts); + } + break; + default: + { + throw new Error(`Unsupported file type (${sourceStat.mode})`); + } + } + if (updated || ((_a = destinationStat == null ? void 0 : destinationStat.mtime) == null ? void 0 : _a.getTime()) !== mtime.getTime() || ((_b = destinationStat == null ? void 0 : destinationStat.atime) == null ? void 0 : _b.getTime()) !== atime.getTime()) { + postlayout.push(() => updateTime(destination, atime, mtime)); + updated = true; + } + if (destinationStat === null || (destinationStat.mode & 511) !== (sourceStat.mode & 511)) { + postlayout.push(() => destinationFs.chmodPromise(destination, sourceStat.mode & 511)); + updated = true; + } + return updated; +} +async function maybeLStat(baseFs, p) { + try { + return await baseFs.lstatPromise(p); + } catch (e) { + return null; + } +} +async function copyFolder(prelayout, postlayout, updateTime, destinationFs, destination, destinationStat, sourceFs, source, sourceStat, opts) { + if (destinationStat !== null && !destinationStat.isDirectory()) { + if (opts.overwrite) { + prelayout.push(async () => destinationFs.removePromise(destination)); + destinationStat = null; + } else { + return false; + } + } + let updated = false; + if (destinationStat === null) { + prelayout.push(async () => { + try { + await destinationFs.mkdirPromise(destination, { mode: sourceStat.mode }); + } catch (err) { + if (err.code !== `EEXIST`) { + throw err; + } + } + }); + updated = true; + } + const entries = await sourceFs.readdirPromise(source); + const nextOpts = opts.didParentExist && !destinationStat ? { ...opts, didParentExist: false } : opts; + if (opts.stableSort) { + for (const entry of entries.sort()) { + if (await copyImpl(prelayout, postlayout, updateTime, destinationFs, destinationFs.pathUtils.join(destination, entry), sourceFs, sourceFs.pathUtils.join(source, entry), nextOpts)) { + updated = true; + } + } + } else { + const entriesUpdateStatus = await Promise.all(entries.map(async (entry) => { + await copyImpl(prelayout, postlayout, updateTime, destinationFs, destinationFs.pathUtils.join(destination, entry), sourceFs, sourceFs.pathUtils.join(source, entry), nextOpts); + })); + if (entriesUpdateStatus.some((status) => status)) { + updated = true; + } + } + return updated; +} +const isCloneSupportedCache = /* @__PURE__ */ new WeakMap(); +function makeLinkOperation(opFs, destination, source, sourceStat, linkStrategy) { + return async () => { + await opFs.linkPromise(source, destination); + if (linkStrategy === "readOnly" /* ReadOnly */) { + sourceStat.mode &= ~146; + await opFs.chmodPromise(destination, sourceStat.mode); + } + }; +} +function makeCloneLinkOperation(opFs, destination, source, sourceStat, linkStrategy) { + const isCloneSupported = isCloneSupportedCache.get(opFs); + if (typeof isCloneSupported === `undefined`) { + return async () => { + try { + await opFs.copyFilePromise(source, destination, fs.constants.COPYFILE_FICLONE_FORCE); + isCloneSupportedCache.set(opFs, true); + } catch (err) { + if (err.code === `ENOSYS` || err.code === `ENOTSUP`) { + isCloneSupportedCache.set(opFs, false); + await makeLinkOperation(opFs, destination, source, sourceStat, linkStrategy)(); + } else { + throw err; + } + } + }; + } else { + if (isCloneSupported) { + return async () => opFs.copyFilePromise(source, destination, fs.constants.COPYFILE_FICLONE_FORCE); + } else { + return makeLinkOperation(opFs, destination, source, sourceStat, linkStrategy); + } + } +} +async function copyFile(prelayout, postlayout, updateTime, destinationFs, destination, destinationStat, sourceFs, source, sourceStat, opts) { + var _a; + if (destinationStat !== null) { + if (opts.overwrite) { + prelayout.push(async () => destinationFs.removePromise(destination)); + destinationStat = null; + } else { + return false; + } + } + const linkStrategy = (_a = opts.linkStrategy) != null ? _a : null; + const op = destinationFs === sourceFs ? linkStrategy !== null ? makeCloneLinkOperation(destinationFs, destination, source, sourceStat, linkStrategy) : async () => destinationFs.copyFilePromise(source, destination, fs.constants.COPYFILE_FICLONE) : linkStrategy !== null ? makeLinkOperation(destinationFs, destination, source, sourceStat, linkStrategy) : async () => destinationFs.writeFilePromise(destination, await sourceFs.readFilePromise(source)); + prelayout.push(async () => op()); + return true; +} +async function copySymlink(prelayout, postlayout, updateTime, destinationFs, destination, destinationStat, sourceFs, source, sourceStat, opts) { + if (destinationStat !== null) { + if (opts.overwrite) { + prelayout.push(async () => destinationFs.removePromise(destination)); + destinationStat = null; + } else { + return false; + } + } + prelayout.push(async () => { + await destinationFs.symlinkPromise(convertPath(destinationFs.pathUtils, await sourceFs.readlinkPromise(source)), destination); + }); + return true; +} + +function makeError(code, message) { + return Object.assign(new Error(`${code}: ${message}`), { code }); +} +function ENOSYS(message, reason) { + return makeError(`ENOSYS`, `${message}, ${reason}`); +} + +class FakeFS { + constructor(pathUtils) { + this.pathUtils = pathUtils; + } + async *genTraversePromise(init, { stableSort = false } = {}) { + const stack = [init]; + while (stack.length > 0) { + const p = stack.shift(); + const entry = await this.lstatPromise(p); + if (entry.isDirectory()) { + const entries = await this.readdirPromise(p); + if (stableSort) { + for (const entry2 of entries.sort()) { + stack.push(this.pathUtils.join(p, entry2)); + } + } else { + throw new Error(`Not supported`); + } + } else { + yield p; + } + } + } + async removePromise(p, { recursive = true, maxRetries = 5 } = {}) { + let stat; + try { + stat = await this.lstatPromise(p); + } catch (error) { + if (error.code === `ENOENT`) { + return; + } else { + throw error; + } + } + if (stat.isDirectory()) { + if (recursive) { + const entries = await this.readdirPromise(p); + await Promise.all(entries.map((entry) => { + return this.removePromise(this.pathUtils.resolve(p, entry)); + })); + } + for (let t = 0; t <= maxRetries; t++) { + try { + await this.rmdirPromise(p); + break; + } catch (error) { + if (error.code !== `EBUSY` && error.code !== `ENOTEMPTY`) { + throw error; + } else if (t < maxRetries) { + await new Promise((resolve) => setTimeout(resolve, t * 100)); + } + } + } + } else { + await this.unlinkPromise(p); + } + } + removeSync(p, { recursive = true } = {}) { + let stat; + try { + stat = this.lstatSync(p); + } catch (error) { + if (error.code === `ENOENT`) { + return; + } else { + throw error; + } + } + if (stat.isDirectory()) { + if (recursive) + for (const entry of this.readdirSync(p)) + this.removeSync(this.pathUtils.resolve(p, entry)); + this.rmdirSync(p); + } else { + this.unlinkSync(p); + } + } + async mkdirpPromise(p, { chmod, utimes } = {}) { + p = this.resolve(p); + if (p === this.pathUtils.dirname(p)) + return void 0; + const parts = p.split(this.pathUtils.sep); + let createdDirectory; + for (let u = 2; u <= parts.length; ++u) { + const subPath = parts.slice(0, u).join(this.pathUtils.sep); + if (!this.existsSync(subPath)) { + try { + await this.mkdirPromise(subPath); + } catch (error) { + if (error.code === `EEXIST`) { + continue; + } else { + throw error; + } + } + createdDirectory != null ? createdDirectory : createdDirectory = subPath; + if (chmod != null) + await this.chmodPromise(subPath, chmod); + if (utimes != null) { + await this.utimesPromise(subPath, utimes[0], utimes[1]); + } else { + const parentStat = await this.statPromise(this.pathUtils.dirname(subPath)); + await this.utimesPromise(subPath, parentStat.atime, parentStat.mtime); + } + } + } + return createdDirectory; + } + mkdirpSync(p, { chmod, utimes } = {}) { + p = this.resolve(p); + if (p === this.pathUtils.dirname(p)) + return void 0; + const parts = p.split(this.pathUtils.sep); + let createdDirectory; + for (let u = 2; u <= parts.length; ++u) { + const subPath = parts.slice(0, u).join(this.pathUtils.sep); + if (!this.existsSync(subPath)) { + try { + this.mkdirSync(subPath); + } catch (error) { + if (error.code === `EEXIST`) { + continue; + } else { + throw error; + } + } + createdDirectory != null ? createdDirectory : createdDirectory = subPath; + if (chmod != null) + this.chmodSync(subPath, chmod); + if (utimes != null) { + this.utimesSync(subPath, utimes[0], utimes[1]); + } else { + const parentStat = this.statSync(this.pathUtils.dirname(subPath)); + this.utimesSync(subPath, parentStat.atime, parentStat.mtime); + } + } + } + return createdDirectory; + } + async copyPromise(destination, source, { baseFs = this, overwrite = true, stableSort = false, stableTime = false, linkStrategy = null } = {}) { + return await copyPromise(this, destination, baseFs, source, { overwrite, stableSort, stableTime, linkStrategy }); + } + copySync(destination, source, { baseFs = this, overwrite = true } = {}) { + const stat = baseFs.lstatSync(source); + const exists = this.existsSync(destination); + if (stat.isDirectory()) { + this.mkdirpSync(destination); + const directoryListing = baseFs.readdirSync(source); + for (const entry of directoryListing) { + this.copySync(this.pathUtils.join(destination, entry), baseFs.pathUtils.join(source, entry), { baseFs, overwrite }); + } + } else if (stat.isFile()) { + if (!exists || overwrite) { + if (exists) + this.removeSync(destination); + const content = baseFs.readFileSync(source); + this.writeFileSync(destination, content); + } + } else if (stat.isSymbolicLink()) { + if (!exists || overwrite) { + if (exists) + this.removeSync(destination); + const target = baseFs.readlinkSync(source); + this.symlinkSync(convertPath(this.pathUtils, target), destination); + } + } else { + throw new Error(`Unsupported file type (file: ${source}, mode: 0o${stat.mode.toString(8).padStart(6, `0`)})`); + } + const mode = stat.mode & 511; + this.chmodSync(destination, mode); + } + async changeFilePromise(p, content, opts = {}) { + if (Buffer.isBuffer(content)) { + return this.changeFileBufferPromise(p, content, opts); + } else { + return this.changeFileTextPromise(p, content, opts); + } + } + async changeFileBufferPromise(p, content, { mode } = {}) { + let current = Buffer.alloc(0); + try { + current = await this.readFilePromise(p); + } catch (error) { + } + if (Buffer.compare(current, content) === 0) + return; + await this.writeFilePromise(p, content, { mode }); + } + async changeFileTextPromise(p, content, { automaticNewlines, mode } = {}) { + let current = ``; + try { + current = await this.readFilePromise(p, `utf8`); + } catch (error) { + } + const normalizedContent = automaticNewlines ? normalizeLineEndings(current, content) : content; + if (current === normalizedContent) + return; + await this.writeFilePromise(p, normalizedContent, { mode }); + } + changeFileSync(p, content, opts = {}) { + if (Buffer.isBuffer(content)) { + return this.changeFileBufferSync(p, content, opts); + } else { + return this.changeFileTextSync(p, content, opts); + } + } + changeFileBufferSync(p, content, { mode } = {}) { + let current = Buffer.alloc(0); + try { + current = this.readFileSync(p); + } catch (error) { + } + if (Buffer.compare(current, content) === 0) + return; + this.writeFileSync(p, content, { mode }); + } + changeFileTextSync(p, content, { automaticNewlines = false, mode } = {}) { + let current = ``; + try { + current = this.readFileSync(p, `utf8`); + } catch (error) { + } + const normalizedContent = automaticNewlines ? normalizeLineEndings(current, content) : content; + if (current === normalizedContent) + return; + this.writeFileSync(p, normalizedContent, { mode }); + } + async movePromise(fromP, toP) { + try { + await this.renamePromise(fromP, toP); + } catch (error) { + if (error.code === `EXDEV`) { + await this.copyPromise(toP, fromP); + await this.removePromise(fromP); + } else { + throw error; + } + } + } + moveSync(fromP, toP) { + try { + this.renameSync(fromP, toP); + } catch (error) { + if (error.code === `EXDEV`) { + this.copySync(toP, fromP); + this.removeSync(fromP); + } else { + throw error; + } + } + } + async lockPromise(affectedPath, callback) { + const lockPath = `${affectedPath}.flock`; + const interval = 1e3 / 60; + const startTime = Date.now(); + let fd = null; + const isAlive = async () => { + let pid; + try { + [pid] = await this.readJsonPromise(lockPath); + } catch (error) { + return Date.now() - startTime < 500; + } + try { + process.kill(pid, 0); + return true; + } catch (error) { + return false; + } + }; + while (fd === null) { + try { + fd = await this.openPromise(lockPath, `wx`); + } catch (error) { + if (error.code === `EEXIST`) { + if (!await isAlive()) { + try { + await this.unlinkPromise(lockPath); + continue; + } catch (error2) { + } + } + if (Date.now() - startTime < 60 * 1e3) { + await new Promise((resolve) => setTimeout(resolve, interval)); + } else { + throw new Error(`Couldn't acquire a lock in a reasonable time (via ${lockPath})`); + } + } else { + throw error; + } + } + } + await this.writePromise(fd, JSON.stringify([process.pid])); + try { + return await callback(); + } finally { + try { + await this.closePromise(fd); + await this.unlinkPromise(lockPath); + } catch (error) { + } + } + } + async readJsonPromise(p) { + const content = await this.readFilePromise(p, `utf8`); + try { + return JSON.parse(content); + } catch (error) { + error.message += ` (in ${p})`; + throw error; + } + } + readJsonSync(p) { + const content = this.readFileSync(p, `utf8`); + try { + return JSON.parse(content); + } catch (error) { + error.message += ` (in ${p})`; + throw error; + } + } + async writeJsonPromise(p, data) { + return await this.writeFilePromise(p, `${JSON.stringify(data, null, 2)} +`); + } + writeJsonSync(p, data) { + return this.writeFileSync(p, `${JSON.stringify(data, null, 2)} +`); + } + async preserveTimePromise(p, cb) { + const stat = await this.lstatPromise(p); + const result = await cb(); + if (typeof result !== `undefined`) + p = result; + if (this.lutimesPromise) { + await this.lutimesPromise(p, stat.atime, stat.mtime); + } else if (!stat.isSymbolicLink()) { + await this.utimesPromise(p, stat.atime, stat.mtime); + } + } + async preserveTimeSync(p, cb) { + const stat = this.lstatSync(p); + const result = cb(); + if (typeof result !== `undefined`) + p = result; + if (this.lutimesSync) { + this.lutimesSync(p, stat.atime, stat.mtime); + } else if (!stat.isSymbolicLink()) { + this.utimesSync(p, stat.atime, stat.mtime); + } + } +} +class BasePortableFakeFS extends FakeFS { + constructor() { + super(ppath); + } +} +function getEndOfLine(content) { + const matches = content.match(/\r?\n/g); + if (matches === null) + return EOL; + const crlf = matches.filter((nl) => nl === `\r +`).length; + const lf = matches.length - crlf; + return crlf > lf ? `\r +` : ` +`; +} +function normalizeLineEndings(originalContent, newContent) { + return newContent.replace(/\r?\n/g, getEndOfLine(originalContent)); +} + +class NodeFS extends BasePortableFakeFS { + constructor(realFs = fs) { + super(); + this.realFs = realFs; + if (typeof this.realFs.lutimes !== `undefined`) { + this.lutimesPromise = this.lutimesPromiseImpl; + this.lutimesSync = this.lutimesSyncImpl; + } + } + getExtractHint() { + return false; + } + getRealPath() { + return PortablePath.root; + } + resolve(p) { + return ppath.resolve(p); + } + async openPromise(p, flags, mode) { + return await new Promise((resolve, reject) => { + this.realFs.open(npath.fromPortablePath(p), flags, mode, this.makeCallback(resolve, reject)); + }); + } + openSync(p, flags, mode) { + return this.realFs.openSync(npath.fromPortablePath(p), flags, mode); + } + async opendirPromise(p, opts) { + return await new Promise((resolve, reject) => { + if (typeof opts !== `undefined`) { + this.realFs.opendir(npath.fromPortablePath(p), opts, this.makeCallback(resolve, reject)); + } else { + this.realFs.opendir(npath.fromPortablePath(p), this.makeCallback(resolve, reject)); + } + }).then((dir) => { + return Object.defineProperty(dir, `path`, { value: p, configurable: true, writable: true }); + }); + } + opendirSync(p, opts) { + const dir = typeof opts !== `undefined` ? this.realFs.opendirSync(npath.fromPortablePath(p), opts) : this.realFs.opendirSync(npath.fromPortablePath(p)); + return Object.defineProperty(dir, `path`, { value: p, configurable: true, writable: true }); + } + async readPromise(fd, buffer, offset = 0, length = 0, position = -1) { + return await new Promise((resolve, reject) => { + this.realFs.read(fd, buffer, offset, length, position, (error, bytesRead) => { + if (error) { + reject(error); + } else { + resolve(bytesRead); + } + }); + }); + } + readSync(fd, buffer, offset, length, position) { + return this.realFs.readSync(fd, buffer, offset, length, position); + } + async writePromise(fd, buffer, offset, length, position) { + return await new Promise((resolve, reject) => { + if (typeof buffer === `string`) { + return this.realFs.write(fd, buffer, offset, this.makeCallback(resolve, reject)); + } else { + return this.realFs.write(fd, buffer, offset, length, position, this.makeCallback(resolve, reject)); + } + }); + } + writeSync(fd, buffer, offset, length, position) { + if (typeof buffer === `string`) { + return this.realFs.writeSync(fd, buffer, offset); + } else { + return this.realFs.writeSync(fd, buffer, offset, length, position); + } + } + async closePromise(fd) { + await new Promise((resolve, reject) => { + this.realFs.close(fd, this.makeCallback(resolve, reject)); + }); + } + closeSync(fd) { + this.realFs.closeSync(fd); + } + createReadStream(p, opts) { + const realPath = p !== null ? npath.fromPortablePath(p) : p; + return this.realFs.createReadStream(realPath, opts); + } + createWriteStream(p, opts) { + const realPath = p !== null ? npath.fromPortablePath(p) : p; + return this.realFs.createWriteStream(realPath, opts); + } + async realpathPromise(p) { + return await new Promise((resolve, reject) => { + this.realFs.realpath(npath.fromPortablePath(p), {}, this.makeCallback(resolve, reject)); + }).then((path) => { + return npath.toPortablePath(path); + }); + } + realpathSync(p) { + return npath.toPortablePath(this.realFs.realpathSync(npath.fromPortablePath(p), {})); + } + async existsPromise(p) { + return await new Promise((resolve) => { + this.realFs.exists(npath.fromPortablePath(p), resolve); + }); + } + accessSync(p, mode) { + return this.realFs.accessSync(npath.fromPortablePath(p), mode); + } + async accessPromise(p, mode) { + return await new Promise((resolve, reject) => { + this.realFs.access(npath.fromPortablePath(p), mode, this.makeCallback(resolve, reject)); + }); + } + existsSync(p) { + return this.realFs.existsSync(npath.fromPortablePath(p)); + } + async statPromise(p, opts) { + return await new Promise((resolve, reject) => { + if (opts) { + this.realFs.stat(npath.fromPortablePath(p), opts, this.makeCallback(resolve, reject)); + } else { + this.realFs.stat(npath.fromPortablePath(p), this.makeCallback(resolve, reject)); + } + }); + } + statSync(p, opts) { + if (opts) { + return this.realFs.statSync(npath.fromPortablePath(p), opts); + } else { + return this.realFs.statSync(npath.fromPortablePath(p)); + } + } + async fstatPromise(fd, opts) { + return await new Promise((resolve, reject) => { + if (opts) { + this.realFs.fstat(fd, opts, this.makeCallback(resolve, reject)); + } else { + this.realFs.fstat(fd, this.makeCallback(resolve, reject)); + } + }); + } + fstatSync(fd, opts) { + if (opts) { + return this.realFs.fstatSync(fd, opts); + } else { + return this.realFs.fstatSync(fd); + } + } + async lstatPromise(p, opts) { + return await new Promise((resolve, reject) => { + if (opts) { + this.realFs.lstat(npath.fromPortablePath(p), opts, this.makeCallback(resolve, reject)); + } else { + this.realFs.lstat(npath.fromPortablePath(p), this.makeCallback(resolve, reject)); + } + }); + } + lstatSync(p, opts) { + if (opts) { + return this.realFs.lstatSync(npath.fromPortablePath(p), opts); + } else { + return this.realFs.lstatSync(npath.fromPortablePath(p)); + } + } + async fchmodPromise(fd, mask) { + return await new Promise((resolve, reject) => { + this.realFs.fchmod(fd, mask, this.makeCallback(resolve, reject)); + }); + } + fchmodSync(fd, mask) { + return this.realFs.fchmodSync(fd, mask); + } + async chmodPromise(p, mask) { + return await new Promise((resolve, reject) => { + this.realFs.chmod(npath.fromPortablePath(p), mask, this.makeCallback(resolve, reject)); + }); + } + chmodSync(p, mask) { + return this.realFs.chmodSync(npath.fromPortablePath(p), mask); + } + async fchownPromise(fd, uid, gid) { + return await new Promise((resolve, reject) => { + this.realFs.fchown(fd, uid, gid, this.makeCallback(resolve, reject)); + }); + } + fchownSync(fd, uid, gid) { + return this.realFs.fchownSync(fd, uid, gid); + } + async chownPromise(p, uid, gid) { + return await new Promise((resolve, reject) => { + this.realFs.chown(npath.fromPortablePath(p), uid, gid, this.makeCallback(resolve, reject)); + }); + } + chownSync(p, uid, gid) { + return this.realFs.chownSync(npath.fromPortablePath(p), uid, gid); + } + async renamePromise(oldP, newP) { + return await new Promise((resolve, reject) => { + this.realFs.rename(npath.fromPortablePath(oldP), npath.fromPortablePath(newP), this.makeCallback(resolve, reject)); + }); + } + renameSync(oldP, newP) { + return this.realFs.renameSync(npath.fromPortablePath(oldP), npath.fromPortablePath(newP)); + } + async copyFilePromise(sourceP, destP, flags = 0) { + return await new Promise((resolve, reject) => { + this.realFs.copyFile(npath.fromPortablePath(sourceP), npath.fromPortablePath(destP), flags, this.makeCallback(resolve, reject)); + }); + } + copyFileSync(sourceP, destP, flags = 0) { + return this.realFs.copyFileSync(npath.fromPortablePath(sourceP), npath.fromPortablePath(destP), flags); + } + async appendFilePromise(p, content, opts) { + return await new Promise((resolve, reject) => { + const fsNativePath = typeof p === `string` ? npath.fromPortablePath(p) : p; + if (opts) { + this.realFs.appendFile(fsNativePath, content, opts, this.makeCallback(resolve, reject)); + } else { + this.realFs.appendFile(fsNativePath, content, this.makeCallback(resolve, reject)); + } + }); + } + appendFileSync(p, content, opts) { + const fsNativePath = typeof p === `string` ? npath.fromPortablePath(p) : p; + if (opts) { + this.realFs.appendFileSync(fsNativePath, content, opts); + } else { + this.realFs.appendFileSync(fsNativePath, content); + } + } + async writeFilePromise(p, content, opts) { + return await new Promise((resolve, reject) => { + const fsNativePath = typeof p === `string` ? npath.fromPortablePath(p) : p; + if (opts) { + this.realFs.writeFile(fsNativePath, content, opts, this.makeCallback(resolve, reject)); + } else { + this.realFs.writeFile(fsNativePath, content, this.makeCallback(resolve, reject)); + } + }); + } + writeFileSync(p, content, opts) { + const fsNativePath = typeof p === `string` ? npath.fromPortablePath(p) : p; + if (opts) { + this.realFs.writeFileSync(fsNativePath, content, opts); + } else { + this.realFs.writeFileSync(fsNativePath, content); + } + } + async unlinkPromise(p) { + return await new Promise((resolve, reject) => { + this.realFs.unlink(npath.fromPortablePath(p), this.makeCallback(resolve, reject)); + }); + } + unlinkSync(p) { + return this.realFs.unlinkSync(npath.fromPortablePath(p)); + } + async utimesPromise(p, atime, mtime) { + return await new Promise((resolve, reject) => { + this.realFs.utimes(npath.fromPortablePath(p), atime, mtime, this.makeCallback(resolve, reject)); + }); + } + utimesSync(p, atime, mtime) { + this.realFs.utimesSync(npath.fromPortablePath(p), atime, mtime); + } + async lutimesPromiseImpl(p, atime, mtime) { + const lutimes = this.realFs.lutimes; + if (typeof lutimes === `undefined`) + throw ENOSYS(`unavailable Node binding`, `lutimes '${p}'`); + return await new Promise((resolve, reject) => { + lutimes.call(this.realFs, npath.fromPortablePath(p), atime, mtime, this.makeCallback(resolve, reject)); + }); + } + lutimesSyncImpl(p, atime, mtime) { + const lutimesSync = this.realFs.lutimesSync; + if (typeof lutimesSync === `undefined`) + throw ENOSYS(`unavailable Node binding`, `lutimes '${p}'`); + lutimesSync.call(this.realFs, npath.fromPortablePath(p), atime, mtime); + } + async mkdirPromise(p, opts) { + return await new Promise((resolve, reject) => { + this.realFs.mkdir(npath.fromPortablePath(p), opts, this.makeCallback(resolve, reject)); + }); + } + mkdirSync(p, opts) { + return this.realFs.mkdirSync(npath.fromPortablePath(p), opts); + } + async rmdirPromise(p, opts) { + return await new Promise((resolve, reject) => { + if (opts) { + this.realFs.rmdir(npath.fromPortablePath(p), opts, this.makeCallback(resolve, reject)); + } else { + this.realFs.rmdir(npath.fromPortablePath(p), this.makeCallback(resolve, reject)); + } + }); + } + rmdirSync(p, opts) { + return this.realFs.rmdirSync(npath.fromPortablePath(p), opts); + } + async linkPromise(existingP, newP) { + return await new Promise((resolve, reject) => { + this.realFs.link(npath.fromPortablePath(existingP), npath.fromPortablePath(newP), this.makeCallback(resolve, reject)); + }); + } + linkSync(existingP, newP) { + return this.realFs.linkSync(npath.fromPortablePath(existingP), npath.fromPortablePath(newP)); + } + async symlinkPromise(target, p, type) { + return await new Promise((resolve, reject) => { + this.realFs.symlink(npath.fromPortablePath(target.replace(/\/+$/, ``)), npath.fromPortablePath(p), type, this.makeCallback(resolve, reject)); + }); + } + symlinkSync(target, p, type) { + return this.realFs.symlinkSync(npath.fromPortablePath(target.replace(/\/+$/, ``)), npath.fromPortablePath(p), type); + } + async readFilePromise(p, encoding) { + return await new Promise((resolve, reject) => { + const fsNativePath = typeof p === `string` ? npath.fromPortablePath(p) : p; + this.realFs.readFile(fsNativePath, encoding, this.makeCallback(resolve, reject)); + }); + } + readFileSync(p, encoding) { + const fsNativePath = typeof p === `string` ? npath.fromPortablePath(p) : p; + return this.realFs.readFileSync(fsNativePath, encoding); + } + async readdirPromise(p, opts) { + return await new Promise((resolve, reject) => { + if (opts == null ? void 0 : opts.withFileTypes) { + this.realFs.readdir(npath.fromPortablePath(p), { withFileTypes: true }, this.makeCallback(resolve, reject)); + } else { + this.realFs.readdir(npath.fromPortablePath(p), this.makeCallback((value) => resolve(value), reject)); + } + }); + } + readdirSync(p, opts) { + if (opts == null ? void 0 : opts.withFileTypes) { + return this.realFs.readdirSync(npath.fromPortablePath(p), { withFileTypes: true }); + } else { + return this.realFs.readdirSync(npath.fromPortablePath(p)); + } + } + async readlinkPromise(p) { + return await new Promise((resolve, reject) => { + this.realFs.readlink(npath.fromPortablePath(p), this.makeCallback(resolve, reject)); + }).then((path) => { + return npath.toPortablePath(path); + }); + } + readlinkSync(p) { + return npath.toPortablePath(this.realFs.readlinkSync(npath.fromPortablePath(p))); + } + async truncatePromise(p, len) { + return await new Promise((resolve, reject) => { + this.realFs.truncate(npath.fromPortablePath(p), len, this.makeCallback(resolve, reject)); + }); + } + truncateSync(p, len) { + return this.realFs.truncateSync(npath.fromPortablePath(p), len); + } + async ftruncatePromise(fd, len) { + return await new Promise((resolve, reject) => { + this.realFs.ftruncate(fd, len, this.makeCallback(resolve, reject)); + }); + } + ftruncateSync(fd, len) { + return this.realFs.ftruncateSync(fd, len); + } + watch(p, a, b) { + return this.realFs.watch( + npath.fromPortablePath(p), + a, + b + ); + } + watchFile(p, a, b) { + return this.realFs.watchFile( + npath.fromPortablePath(p), + a, + b + ); + } + unwatchFile(p, cb) { + return this.realFs.unwatchFile(npath.fromPortablePath(p), cb); + } + makeCallback(resolve, reject) { + return (err, result) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }; + } +} + +class ProxiedFS extends FakeFS { + getExtractHint(hints) { + return this.baseFs.getExtractHint(hints); + } + resolve(path) { + return this.mapFromBase(this.baseFs.resolve(this.mapToBase(path))); + } + getRealPath() { + return this.mapFromBase(this.baseFs.getRealPath()); + } + async openPromise(p, flags, mode) { + return this.baseFs.openPromise(this.mapToBase(p), flags, mode); + } + openSync(p, flags, mode) { + return this.baseFs.openSync(this.mapToBase(p), flags, mode); + } + async opendirPromise(p, opts) { + return Object.assign(await this.baseFs.opendirPromise(this.mapToBase(p), opts), { path: p }); + } + opendirSync(p, opts) { + return Object.assign(this.baseFs.opendirSync(this.mapToBase(p), opts), { path: p }); + } + async readPromise(fd, buffer, offset, length, position) { + return await this.baseFs.readPromise(fd, buffer, offset, length, position); + } + readSync(fd, buffer, offset, length, position) { + return this.baseFs.readSync(fd, buffer, offset, length, position); + } + async writePromise(fd, buffer, offset, length, position) { + if (typeof buffer === `string`) { + return await this.baseFs.writePromise(fd, buffer, offset); + } else { + return await this.baseFs.writePromise(fd, buffer, offset, length, position); + } + } + writeSync(fd, buffer, offset, length, position) { + if (typeof buffer === `string`) { + return this.baseFs.writeSync(fd, buffer, offset); + } else { + return this.baseFs.writeSync(fd, buffer, offset, length, position); + } + } + async closePromise(fd) { + return this.baseFs.closePromise(fd); + } + closeSync(fd) { + this.baseFs.closeSync(fd); + } + createReadStream(p, opts) { + return this.baseFs.createReadStream(p !== null ? this.mapToBase(p) : p, opts); + } + createWriteStream(p, opts) { + return this.baseFs.createWriteStream(p !== null ? this.mapToBase(p) : p, opts); + } + async realpathPromise(p) { + return this.mapFromBase(await this.baseFs.realpathPromise(this.mapToBase(p))); + } + realpathSync(p) { + return this.mapFromBase(this.baseFs.realpathSync(this.mapToBase(p))); + } + async existsPromise(p) { + return this.baseFs.existsPromise(this.mapToBase(p)); + } + existsSync(p) { + return this.baseFs.existsSync(this.mapToBase(p)); + } + accessSync(p, mode) { + return this.baseFs.accessSync(this.mapToBase(p), mode); + } + async accessPromise(p, mode) { + return this.baseFs.accessPromise(this.mapToBase(p), mode); + } + async statPromise(p, opts) { + return this.baseFs.statPromise(this.mapToBase(p), opts); + } + statSync(p, opts) { + return this.baseFs.statSync(this.mapToBase(p), opts); + } + async fstatPromise(fd, opts) { + return this.baseFs.fstatPromise(fd, opts); + } + fstatSync(fd, opts) { + return this.baseFs.fstatSync(fd, opts); + } + lstatPromise(p, opts) { + return this.baseFs.lstatPromise(this.mapToBase(p), opts); + } + lstatSync(p, opts) { + return this.baseFs.lstatSync(this.mapToBase(p), opts); + } + async fchmodPromise(fd, mask) { + return this.baseFs.fchmodPromise(fd, mask); + } + fchmodSync(fd, mask) { + return this.baseFs.fchmodSync(fd, mask); + } + async chmodPromise(p, mask) { + return this.baseFs.chmodPromise(this.mapToBase(p), mask); + } + chmodSync(p, mask) { + return this.baseFs.chmodSync(this.mapToBase(p), mask); + } + async fchownPromise(fd, uid, gid) { + return this.baseFs.fchownPromise(fd, uid, gid); + } + fchownSync(fd, uid, gid) { + return this.baseFs.fchownSync(fd, uid, gid); + } + async chownPromise(p, uid, gid) { + return this.baseFs.chownPromise(this.mapToBase(p), uid, gid); + } + chownSync(p, uid, gid) { + return this.baseFs.chownSync(this.mapToBase(p), uid, gid); + } + async renamePromise(oldP, newP) { + return this.baseFs.renamePromise(this.mapToBase(oldP), this.mapToBase(newP)); + } + renameSync(oldP, newP) { + return this.baseFs.renameSync(this.mapToBase(oldP), this.mapToBase(newP)); + } + async copyFilePromise(sourceP, destP, flags = 0) { + return this.baseFs.copyFilePromise(this.mapToBase(sourceP), this.mapToBase(destP), flags); + } + copyFileSync(sourceP, destP, flags = 0) { + return this.baseFs.copyFileSync(this.mapToBase(sourceP), this.mapToBase(destP), flags); + } + async appendFilePromise(p, content, opts) { + return this.baseFs.appendFilePromise(this.fsMapToBase(p), content, opts); + } + appendFileSync(p, content, opts) { + return this.baseFs.appendFileSync(this.fsMapToBase(p), content, opts); + } + async writeFilePromise(p, content, opts) { + return this.baseFs.writeFilePromise(this.fsMapToBase(p), content, opts); + } + writeFileSync(p, content, opts) { + return this.baseFs.writeFileSync(this.fsMapToBase(p), content, opts); + } + async unlinkPromise(p) { + return this.baseFs.unlinkPromise(this.mapToBase(p)); + } + unlinkSync(p) { + return this.baseFs.unlinkSync(this.mapToBase(p)); + } + async utimesPromise(p, atime, mtime) { + return this.baseFs.utimesPromise(this.mapToBase(p), atime, mtime); + } + utimesSync(p, atime, mtime) { + return this.baseFs.utimesSync(this.mapToBase(p), atime, mtime); + } + async mkdirPromise(p, opts) { + return this.baseFs.mkdirPromise(this.mapToBase(p), opts); + } + mkdirSync(p, opts) { + return this.baseFs.mkdirSync(this.mapToBase(p), opts); + } + async rmdirPromise(p, opts) { + return this.baseFs.rmdirPromise(this.mapToBase(p), opts); + } + rmdirSync(p, opts) { + return this.baseFs.rmdirSync(this.mapToBase(p), opts); + } + async linkPromise(existingP, newP) { + return this.baseFs.linkPromise(this.mapToBase(existingP), this.mapToBase(newP)); + } + linkSync(existingP, newP) { + return this.baseFs.linkSync(this.mapToBase(existingP), this.mapToBase(newP)); + } + async symlinkPromise(target, p, type) { + const mappedP = this.mapToBase(p); + if (this.pathUtils.isAbsolute(target)) + return this.baseFs.symlinkPromise(this.mapToBase(target), mappedP, type); + const mappedAbsoluteTarget = this.mapToBase(this.pathUtils.join(this.pathUtils.dirname(p), target)); + const mappedTarget = this.baseFs.pathUtils.relative(this.baseFs.pathUtils.dirname(mappedP), mappedAbsoluteTarget); + return this.baseFs.symlinkPromise(mappedTarget, mappedP, type); + } + symlinkSync(target, p, type) { + const mappedP = this.mapToBase(p); + if (this.pathUtils.isAbsolute(target)) + return this.baseFs.symlinkSync(this.mapToBase(target), mappedP, type); + const mappedAbsoluteTarget = this.mapToBase(this.pathUtils.join(this.pathUtils.dirname(p), target)); + const mappedTarget = this.baseFs.pathUtils.relative(this.baseFs.pathUtils.dirname(mappedP), mappedAbsoluteTarget); + return this.baseFs.symlinkSync(mappedTarget, mappedP, type); + } + async readFilePromise(p, encoding) { + if (encoding === `utf8`) { + return this.baseFs.readFilePromise(this.fsMapToBase(p), encoding); + } else { + return this.baseFs.readFilePromise(this.fsMapToBase(p), encoding); + } + } + readFileSync(p, encoding) { + if (encoding === `utf8`) { + return this.baseFs.readFileSync(this.fsMapToBase(p), encoding); + } else { + return this.baseFs.readFileSync(this.fsMapToBase(p), encoding); + } + } + async readdirPromise(p, opts) { + return this.baseFs.readdirPromise(this.mapToBase(p), opts); + } + readdirSync(p, opts) { + return this.baseFs.readdirSync(this.mapToBase(p), opts); + } + async readlinkPromise(p) { + return this.mapFromBase(await this.baseFs.readlinkPromise(this.mapToBase(p))); + } + readlinkSync(p) { + return this.mapFromBase(this.baseFs.readlinkSync(this.mapToBase(p))); + } + async truncatePromise(p, len) { + return this.baseFs.truncatePromise(this.mapToBase(p), len); + } + truncateSync(p, len) { + return this.baseFs.truncateSync(this.mapToBase(p), len); + } + async ftruncatePromise(fd, len) { + return this.baseFs.ftruncatePromise(fd, len); + } + ftruncateSync(fd, len) { + return this.baseFs.ftruncateSync(fd, len); + } + watch(p, a, b) { + return this.baseFs.watch( + this.mapToBase(p), + a, + b + ); + } + watchFile(p, a, b) { + return this.baseFs.watchFile( + this.mapToBase(p), + a, + b + ); + } + unwatchFile(p, cb) { + return this.baseFs.unwatchFile(this.mapToBase(p), cb); + } + fsMapToBase(p) { + if (typeof p === `number`) { + return p; + } else { + return this.mapToBase(p); + } + } +} + +const NUMBER_REGEXP = /^[0-9]+$/; +const VIRTUAL_REGEXP = /^(\/(?:[^/]+\/)*?(?:\$\$virtual|__virtual__))((?:\/((?:[^/]+-)?[a-f0-9]+)(?:\/([^/]+))?)?((?:\/.*)?))$/; +const VALID_COMPONENT = /^([^/]+-)?[a-f0-9]+$/; +class VirtualFS extends ProxiedFS { + constructor({ baseFs = new NodeFS() } = {}) { + super(ppath); + this.baseFs = baseFs; + } + static makeVirtualPath(base, component, to) { + if (ppath.basename(base) !== `__virtual__`) + throw new Error(`Assertion failed: Virtual folders must be named "__virtual__"`); + if (!ppath.basename(component).match(VALID_COMPONENT)) + throw new Error(`Assertion failed: Virtual components must be ended by an hexadecimal hash`); + const target = ppath.relative(ppath.dirname(base), to); + const segments = target.split(`/`); + let depth = 0; + while (depth < segments.length && segments[depth] === `..`) + depth += 1; + const finalSegments = segments.slice(depth); + const fullVirtualPath = ppath.join(base, component, String(depth), ...finalSegments); + return fullVirtualPath; + } + static resolveVirtual(p) { + const match = p.match(VIRTUAL_REGEXP); + if (!match || !match[3] && match[5]) + return p; + const target = ppath.dirname(match[1]); + if (!match[3] || !match[4]) + return target; + const isnum = NUMBER_REGEXP.test(match[4]); + if (!isnum) + return p; + const depth = Number(match[4]); + const backstep = `../`.repeat(depth); + const subpath = match[5] || `.`; + return VirtualFS.resolveVirtual(ppath.join(target, backstep, subpath)); + } + getExtractHint(hints) { + return this.baseFs.getExtractHint(hints); + } + getRealPath() { + return this.baseFs.getRealPath(); + } + realpathSync(p) { + const match = p.match(VIRTUAL_REGEXP); + if (!match) + return this.baseFs.realpathSync(p); + if (!match[5]) + return p; + const realpath = this.baseFs.realpathSync(this.mapToBase(p)); + return VirtualFS.makeVirtualPath(match[1], match[3], realpath); + } + async realpathPromise(p) { + const match = p.match(VIRTUAL_REGEXP); + if (!match) + return await this.baseFs.realpathPromise(p); + if (!match[5]) + return p; + const realpath = await this.baseFs.realpathPromise(this.mapToBase(p)); + return VirtualFS.makeVirtualPath(match[1], match[3], realpath); + } + mapToBase(p) { + if (p === ``) + return p; + if (this.pathUtils.isAbsolute(p)) + return VirtualFS.resolveVirtual(p); + const resolvedRoot = VirtualFS.resolveVirtual(this.baseFs.resolve(PortablePath.dot)); + const resolvedP = VirtualFS.resolveVirtual(this.baseFs.resolve(p)); + return ppath.relative(resolvedRoot, resolvedP) || PortablePath.dot; + } + mapFromBase(p) { + return p; + } +} + +const [major, minor] = process.versions.node.split(`.`).map((value) => parseInt(value, 10)); +const HAS_CONSOLIDATED_HOOKS = major > 16 || major === 16 && minor >= 12; +const HAS_UNFLAGGED_JSON_MODULES = major > 17 || major === 17 && minor >= 5 || major === 16 && minor >= 15; +const HAS_JSON_IMPORT_ASSERTION_REQUIREMENT = major > 17 || major === 17 && minor >= 1 || major === 16 && minor > 14; +const WATCH_MODE_MESSAGE_USES_ARRAYS = major > 19 || major === 19 && minor >= 2 || major === 18 && minor >= 13; const builtinModules = new Set(Module.builtinModules || Object.keys(process.binding(`natives`))); const isBuiltinModule = (request) => request.startsWith(`node:`) || builtinModules.has(request); @@ -92,7 +1361,7 @@ function readPackage(requestPath) { return JSON.parse(fs.readFileSync(jsonPath, `utf8`)); } -async function tryReadFile(path2) { +async function tryReadFile$1(path2) { try { return await fs.promises.readFile(path2, `utf8`); } catch (error) { @@ -103,11 +1372,15 @@ async function tryReadFile(path2) { } function tryParseURL(str, base) { try { - return new URL(str, base); + return new URL$1(str, base); } catch { return null; } } +let entrypointPath = null; +function setEntrypointPath(file) { + entrypointPath = file; +} function getFileFormat(filepath) { var _a, _b; const ext = path.extname(filepath); @@ -119,10 +1392,16 @@ function getFileFormat(filepath) { return `commonjs`; } case `.wasm`: { - throw new Error(`Unknown file extension ".wasm" for ${filepath}`); + throw new Error( + `Unknown file extension ".wasm" for ${filepath}` + ); } case `.json`: { - throw new Error(`Unknown file extension ".json" for ${filepath}`); + if (HAS_UNFLAGGED_JSON_MODULES) + return `json`; + throw new Error( + `Unknown file extension ".json" for ${filepath}` + ); } case `.js`: { const pkg = readPackageScope(filepath); @@ -131,8 +1410,7 @@ function getFileFormat(filepath) { return (_a = pkg.data.type) != null ? _a : `commonjs`; } default: { - const isMain = process.argv[1] === filepath; - if (!isMain) + if (entrypointPath !== filepath) return null; const pkg = readPackageScope(filepath); if (!pkg) @@ -166,47 +1444,543 @@ async function getSource$1(urlString, context, defaultGetSource) { }; } -async function load$1(urlString, context, defaultLoad) { +async function load$1(urlString, context, nextLoad) { + var _a; const url = tryParseURL(urlString); if ((url == null ? void 0 : url.protocol) !== `file:`) - return defaultLoad(urlString, context, defaultLoad); + return nextLoad(urlString, context, nextLoad); const filePath = fileURLToPath(url); const format = getFileFormat(filePath); if (!format) - return defaultLoad(urlString, context, defaultLoad); + return nextLoad(urlString, context, nextLoad); + if (HAS_JSON_IMPORT_ASSERTION_REQUIREMENT && format === `json` && ((_a = context.importAssertions) == null ? void 0 : _a.type) !== `json`) { + const err = new TypeError(`[ERR_IMPORT_ASSERTION_TYPE_MISSING]: Module "${urlString}" needs an import assertion of type "json"`); + err.code = `ERR_IMPORT_ASSERTION_TYPE_MISSING`; + throw err; + } + if (process.env.WATCH_REPORT_DEPENDENCIES && process.send) { + const pathToSend = pathToFileURL( + npath.fromPortablePath( + VirtualFS.resolveVirtual(npath.toPortablePath(filePath)) + ) + ).href; + process.send({ + "watch:import": WATCH_MODE_MESSAGE_USES_ARRAYS ? [pathToSend] : pathToSend + }); + } return { format, - source: await fs.promises.readFile(filePath, `utf8`) + source: await fs.promises.readFile(filePath, `utf8`), + shortCircuit: true }; } +const ArrayIsArray = Array.isArray; +const JSONStringify = JSON.stringify; +const ObjectGetOwnPropertyNames = Object.getOwnPropertyNames; +const ObjectPrototypeHasOwnProperty = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop); +const RegExpPrototypeExec = (obj, string) => RegExp.prototype.exec.call(obj, string); +const RegExpPrototypeSymbolReplace = (obj, ...rest) => RegExp.prototype[Symbol.replace].apply(obj, rest); +const StringPrototypeEndsWith = (str, ...rest) => String.prototype.endsWith.apply(str, rest); +const StringPrototypeIncludes = (str, ...rest) => String.prototype.includes.apply(str, rest); +const StringPrototypeLastIndexOf = (str, ...rest) => String.prototype.lastIndexOf.apply(str, rest); +const StringPrototypeIndexOf = (str, ...rest) => String.prototype.indexOf.apply(str, rest); +const StringPrototypeReplace = (str, ...rest) => String.prototype.replace.apply(str, rest); +const StringPrototypeSlice = (str, ...rest) => String.prototype.slice.apply(str, rest); +const StringPrototypeStartsWith = (str, ...rest) => String.prototype.startsWith.apply(str, rest); +const SafeMap = Map; +const JSONParse = JSON.parse; + +function createErrorType(code, messageCreator, errorType) { + return class extends errorType { + constructor(...args) { + super(messageCreator(...args)); + this.code = code; + this.name = `${errorType.name} [${code}]`; + } + }; +} +const ERR_PACKAGE_IMPORT_NOT_DEFINED = createErrorType( + `ERR_PACKAGE_IMPORT_NOT_DEFINED`, + (specifier, packagePath, base) => { + return `Package import specifier "${specifier}" is not defined${packagePath ? ` in package ${packagePath}package.json` : ``} imported from ${base}`; + }, + TypeError +); +const ERR_INVALID_MODULE_SPECIFIER = createErrorType( + `ERR_INVALID_MODULE_SPECIFIER`, + (request, reason, base = void 0) => { + return `Invalid module "${request}" ${reason}${base ? ` imported from ${base}` : ``}`; + }, + TypeError +); +const ERR_INVALID_PACKAGE_TARGET = createErrorType( + `ERR_INVALID_PACKAGE_TARGET`, + (pkgPath, key, target, isImport = false, base = void 0) => { + const relError = typeof target === `string` && !isImport && target.length && !StringPrototypeStartsWith(target, `./`); + if (key === `.`) { + assert(isImport === false); + return `Invalid "exports" main target ${JSONStringify(target)} defined in the package config ${pkgPath}package.json${base ? ` imported from ${base}` : ``}${relError ? `; targets must start with "./"` : ``}`; + } + return `Invalid "${isImport ? `imports` : `exports`}" target ${JSONStringify( + target + )} defined for '${key}' in the package config ${pkgPath}package.json${base ? ` imported from ${base}` : ``}${relError ? `; targets must start with "./"` : ``}`; + }, + Error +); +const ERR_INVALID_PACKAGE_CONFIG = createErrorType( + `ERR_INVALID_PACKAGE_CONFIG`, + (path, base, message) => { + return `Invalid package config ${path}${base ? ` while importing ${base}` : ``}${message ? `. ${message}` : ``}`; + }, + Error +); + +function filterOwnProperties(source, keys) { + const filtered = /* @__PURE__ */ Object.create(null); + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + if (ObjectPrototypeHasOwnProperty(source, key)) { + filtered[key] = source[key]; + } + } + return filtered; +} + +const packageJSONCache = new SafeMap(); +function getPackageConfig(path, specifier, base, readFileSyncFn) { + const existing = packageJSONCache.get(path); + if (existing !== void 0) { + return existing; + } + const source = readFileSyncFn(path); + if (source === void 0) { + const packageConfig2 = { + pjsonPath: path, + exists: false, + main: void 0, + name: void 0, + type: "none", + exports: void 0, + imports: void 0 + }; + packageJSONCache.set(path, packageConfig2); + return packageConfig2; + } + let packageJSON; + try { + packageJSON = JSONParse(source); + } catch (error) { + throw new ERR_INVALID_PACKAGE_CONFIG( + path, + (base ? `"${specifier}" from ` : "") + fileURLToPath(base || specifier), + error.message + ); + } + let { imports, main, name, type } = filterOwnProperties(packageJSON, [ + "imports", + "main", + "name", + "type" + ]); + const exports = ObjectPrototypeHasOwnProperty(packageJSON, "exports") ? packageJSON.exports : void 0; + if (typeof imports !== "object" || imports === null) { + imports = void 0; + } + if (typeof main !== "string") { + main = void 0; + } + if (typeof name !== "string") { + name = void 0; + } + if (type !== "module" && type !== "commonjs") { + type = "none"; + } + const packageConfig = { + pjsonPath: path, + exists: true, + main, + name, + type, + exports, + imports + }; + packageJSONCache.set(path, packageConfig); + return packageConfig; +} +function getPackageScopeConfig(resolved, readFileSyncFn) { + let packageJSONUrl = new URL("./package.json", resolved); + while (true) { + const packageJSONPath2 = packageJSONUrl.pathname; + if (StringPrototypeEndsWith(packageJSONPath2, "node_modules/package.json")) { + break; + } + const packageConfig2 = getPackageConfig( + fileURLToPath(packageJSONUrl), + resolved, + void 0, + readFileSyncFn + ); + if (packageConfig2.exists) { + return packageConfig2; + } + const lastPackageJSONUrl = packageJSONUrl; + packageJSONUrl = new URL("../package.json", packageJSONUrl); + if (packageJSONUrl.pathname === lastPackageJSONUrl.pathname) { + break; + } + } + const packageJSONPath = fileURLToPath(packageJSONUrl); + const packageConfig = { + pjsonPath: packageJSONPath, + exists: false, + main: void 0, + name: void 0, + type: "none", + exports: void 0, + imports: void 0 + }; + packageJSONCache.set(packageJSONPath, packageConfig); + return packageConfig; +} + +/** + @license + Copyright Node.js contributors. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + IN THE SOFTWARE. +*/ +function throwImportNotDefined(specifier, packageJSONUrl, base) { + throw new ERR_PACKAGE_IMPORT_NOT_DEFINED( + specifier, + packageJSONUrl && fileURLToPath(new URL(".", packageJSONUrl)), + fileURLToPath(base) + ); +} +function throwInvalidSubpath(subpath, packageJSONUrl, internal, base) { + const reason = `request is not a valid subpath for the "${internal ? "imports" : "exports"}" resolution of ${fileURLToPath(packageJSONUrl)}`; + throw new ERR_INVALID_MODULE_SPECIFIER( + subpath, + reason, + base && fileURLToPath(base) + ); +} +function throwInvalidPackageTarget(subpath, target, packageJSONUrl, internal, base) { + if (typeof target === "object" && target !== null) { + target = JSONStringify(target, null, ""); + } else { + target = `${target}`; + } + throw new ERR_INVALID_PACKAGE_TARGET( + fileURLToPath(new URL(".", packageJSONUrl)), + subpath, + target, + internal, + base && fileURLToPath(base) + ); +} +const invalidSegmentRegEx = /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i; +const patternRegEx = /\*/g; +function resolvePackageTargetString(target, subpath, match, packageJSONUrl, base, pattern, internal, conditions) { + if (subpath !== "" && !pattern && target[target.length - 1] !== "/") + throwInvalidPackageTarget(match, target, packageJSONUrl, internal, base); + if (!StringPrototypeStartsWith(target, "./")) { + if (internal && !StringPrototypeStartsWith(target, "../") && !StringPrototypeStartsWith(target, "/")) { + let isURL = false; + try { + new URL(target); + isURL = true; + } catch { + } + if (!isURL) { + const exportTarget = pattern ? RegExpPrototypeSymbolReplace(patternRegEx, target, () => subpath) : target + subpath; + return exportTarget; + } + } + throwInvalidPackageTarget(match, target, packageJSONUrl, internal, base); + } + if (RegExpPrototypeExec( + invalidSegmentRegEx, + StringPrototypeSlice(target, 2) + ) !== null) + throwInvalidPackageTarget(match, target, packageJSONUrl, internal, base); + const resolved = new URL(target, packageJSONUrl); + const resolvedPath = resolved.pathname; + const packagePath = new URL(".", packageJSONUrl).pathname; + if (!StringPrototypeStartsWith(resolvedPath, packagePath)) + throwInvalidPackageTarget(match, target, packageJSONUrl, internal, base); + if (subpath === "") + return resolved; + if (RegExpPrototypeExec(invalidSegmentRegEx, subpath) !== null) { + const request = pattern ? StringPrototypeReplace(match, "*", () => subpath) : match + subpath; + throwInvalidSubpath(request, packageJSONUrl, internal, base); + } + if (pattern) { + return new URL( + RegExpPrototypeSymbolReplace(patternRegEx, resolved.href, () => subpath) + ); + } + return new URL(subpath, resolved); +} +function isArrayIndex(key) { + const keyNum = +key; + if (`${keyNum}` !== key) + return false; + return keyNum >= 0 && keyNum < 4294967295; +} +function resolvePackageTarget(packageJSONUrl, target, subpath, packageSubpath, base, pattern, internal, conditions) { + if (typeof target === "string") { + return resolvePackageTargetString( + target, + subpath, + packageSubpath, + packageJSONUrl, + base, + pattern, + internal); + } else if (ArrayIsArray(target)) { + if (target.length === 0) { + return null; + } + let lastException; + for (let i = 0; i < target.length; i++) { + const targetItem = target[i]; + let resolveResult; + try { + resolveResult = resolvePackageTarget( + packageJSONUrl, + targetItem, + subpath, + packageSubpath, + base, + pattern, + internal, + conditions + ); + } catch (e) { + lastException = e; + if (e.code === "ERR_INVALID_PACKAGE_TARGET") { + continue; + } + throw e; + } + if (resolveResult === void 0) { + continue; + } + if (resolveResult === null) { + lastException = null; + continue; + } + return resolveResult; + } + if (lastException === void 0 || lastException === null) + return lastException; + throw lastException; + } else if (typeof target === "object" && target !== null) { + const keys = ObjectGetOwnPropertyNames(target); + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + if (isArrayIndex(key)) { + throw new ERR_INVALID_PACKAGE_CONFIG( + fileURLToPath(packageJSONUrl), + base, + '"exports" cannot contain numeric property keys.' + ); + } + } + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + if (key === "default" || conditions.has(key)) { + const conditionalTarget = target[key]; + const resolveResult = resolvePackageTarget( + packageJSONUrl, + conditionalTarget, + subpath, + packageSubpath, + base, + pattern, + internal, + conditions + ); + if (resolveResult === void 0) + continue; + return resolveResult; + } + } + return void 0; + } else if (target === null) { + return null; + } + throwInvalidPackageTarget( + packageSubpath, + target, + packageJSONUrl, + internal, + base + ); +} +function patternKeyCompare(a, b) { + const aPatternIndex = StringPrototypeIndexOf(a, "*"); + const bPatternIndex = StringPrototypeIndexOf(b, "*"); + const baseLenA = aPatternIndex === -1 ? a.length : aPatternIndex + 1; + const baseLenB = bPatternIndex === -1 ? b.length : bPatternIndex + 1; + if (baseLenA > baseLenB) + return -1; + if (baseLenB > baseLenA) + return 1; + if (aPatternIndex === -1) + return 1; + if (bPatternIndex === -1) + return -1; + if (a.length > b.length) + return -1; + if (b.length > a.length) + return 1; + return 0; +} +function packageImportsResolve({ + name, + base, + conditions, + readFileSyncFn +}) { + if (name === "#" || StringPrototypeStartsWith(name, "#/") || StringPrototypeEndsWith(name, "/")) { + const reason = "is not a valid internal imports specifier name"; + throw new ERR_INVALID_MODULE_SPECIFIER(name, reason, fileURLToPath(base)); + } + let packageJSONUrl; + const packageConfig = getPackageScopeConfig(base, readFileSyncFn); + if (packageConfig.exists) { + packageJSONUrl = pathToFileURL(packageConfig.pjsonPath); + const imports = packageConfig.imports; + if (imports) { + if (ObjectPrototypeHasOwnProperty(imports, name) && !StringPrototypeIncludes(name, "*")) { + const resolveResult = resolvePackageTarget( + packageJSONUrl, + imports[name], + "", + name, + base, + false, + true, + conditions + ); + if (resolveResult != null) { + return resolveResult; + } + } else { + let bestMatch = ""; + let bestMatchSubpath; + const keys = ObjectGetOwnPropertyNames(imports); + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + const patternIndex = StringPrototypeIndexOf(key, "*"); + if (patternIndex !== -1 && StringPrototypeStartsWith( + name, + StringPrototypeSlice(key, 0, patternIndex) + )) { + const patternTrailer = StringPrototypeSlice(key, patternIndex + 1); + if (name.length >= key.length && StringPrototypeEndsWith(name, patternTrailer) && patternKeyCompare(bestMatch, key) === 1 && StringPrototypeLastIndexOf(key, "*") === patternIndex) { + bestMatch = key; + bestMatchSubpath = StringPrototypeSlice( + name, + patternIndex, + name.length - patternTrailer.length + ); + } + } + } + if (bestMatch) { + const target = imports[bestMatch]; + const resolveResult = resolvePackageTarget( + packageJSONUrl, + target, + bestMatchSubpath, + bestMatch, + base, + true, + true, + conditions + ); + if (resolveResult != null) { + return resolveResult; + } + } + } + } + } + throwImportNotDefined(name, packageJSONUrl, base); +} + const pathRegExp = /^(?![a-zA-Z]:[\\/]|\\\\|\.{0,2}(?:\/|$))((?:node:)?(?:@[^/]+\/)?[^/]+)\/*(.*|)$/; const isRelativeRegexp = /^\.{0,2}\//; -async function resolve$1(originalSpecifier, context, defaultResolver) { +function tryReadFile(filePath) { + try { + return fs.readFileSync(filePath, `utf8`); + } catch (err) { + if (err.code === `ENOENT`) + return void 0; + throw err; + } +} +async function resolvePrivateRequest(specifier, issuer, context, nextResolve) { + const resolved = packageImportsResolve({ + name: specifier, + base: pathToFileURL(issuer), + conditions: new Set(context.conditions), + readFileSyncFn: tryReadFile + }); + if (resolved instanceof URL$1) { + return { url: resolved.href, shortCircuit: true }; + } else { + if (resolved.startsWith(`#`)) + throw new Error(`Mapping from one private import to another isn't allowed`); + return resolve$1(resolved, context, nextResolve); + } +} +async function resolve$1(originalSpecifier, context, nextResolve) { var _a; - const {findPnpApi} = moduleExports; + const { findPnpApi } = moduleExports; if (!findPnpApi || isBuiltinModule(originalSpecifier)) - return defaultResolver(originalSpecifier, context, defaultResolver); + return nextResolve(originalSpecifier, context, nextResolve); let specifier = originalSpecifier; const url = tryParseURL(specifier, isRelativeRegexp.test(specifier) ? context.parentURL : void 0); if (url) { if (url.protocol !== `file:`) - return defaultResolver(originalSpecifier, context, defaultResolver); + return nextResolve(originalSpecifier, context, nextResolve); specifier = fileURLToPath(url); } - const {parentURL, conditions = []} = context; + const { parentURL, conditions = [] } = context; const issuer = parentURL ? fileURLToPath(parentURL) : process.cwd(); const pnpapi = (_a = findPnpApi(issuer)) != null ? _a : url ? findPnpApi(specifier) : null; if (!pnpapi) - return defaultResolver(originalSpecifier, context, defaultResolver); + return nextResolve(originalSpecifier, context, nextResolve); + if (specifier.startsWith(`#`)) + return resolvePrivateRequest(specifier, issuer, context, nextResolve); const dependencyNameMatch = specifier.match(pathRegExp); let allowLegacyResolve = false; if (dependencyNameMatch) { const [, dependencyName, subPath] = dependencyNameMatch; - if (subPath === ``) { + if (subPath === `` && dependencyName !== `pnpapi`) { const resolved = pnpapi.resolveToUnqualified(`${dependencyName}/package.json`, issuer); if (resolved) { - const content = await tryReadFile(resolved); + const content = await tryReadFile$1(resolved); if (content) { const pkg = JSON.parse(content); allowLegacyResolve = pkg.exports == null; @@ -225,17 +1999,21 @@ async function resolve$1(originalSpecifier, context, defaultResolver) { resultURL.search = url.search; resultURL.hash = url.hash; } + if (!parentURL) + setEntrypointPath(fileURLToPath(resultURL)); return { - url: resultURL.href + url: resultURL.href, + shortCircuit: true }; } const binding = process.binding(`fs`); const originalfstat = binding.fstat; -const ZIP_FD = 2147483648; +const ZIP_MASK = 4278190080; +const ZIP_MAGIC = 704643072; binding.fstat = function(...args) { const [fd, useBigint, req] = args; - if ((fd & ZIP_FD) !== 0 && useBigint === false && req === void 0) { + if ((fd & ZIP_MASK) === ZIP_MAGIC && useBigint === false && req === void 0) { try { const stats = fs.fstatSync(fd); return new Float64Array([ @@ -256,11 +2034,9 @@ binding.fstat = function(...args) { return originalfstat.apply(this, args); }; -const [major, minor] = process.versions.node.split(`.`).map((value) => parseInt(value, 10)); -const hasConsolidatedHooks = major > 16 || major === 16 && minor >= 12; const resolve = resolve$1; -const getFormat = hasConsolidatedHooks ? void 0 : getFormat$1; -const getSource = hasConsolidatedHooks ? void 0 : getSource$1; -const load = hasConsolidatedHooks ? load$1 : void 0; +const getFormat = HAS_CONSOLIDATED_HOOKS ? void 0 : getFormat$1; +const getSource = HAS_CONSOLIDATED_HOOKS ? void 0 : getSource$1; +const load = HAS_CONSOLIDATED_HOOKS ? load$1 : void 0; export { getFormat, getSource, load, resolve }; diff --git a/.yarn/cache/@chevrotain-types-npm-9.1.0-80ac254cc2-5f26ff26aa.zip b/.yarn/cache/@chevrotain-types-npm-9.1.0-80ac254cc2-5f26ff26aa.zip deleted file mode 100644 index 9ce956c..0000000 Binary files a/.yarn/cache/@chevrotain-types-npm-9.1.0-80ac254cc2-5f26ff26aa.zip and /dev/null differ diff --git a/.yarn/cache/@chevrotain-utils-npm-9.1.0-5e5d6d7acc-ca78c97c7c.zip b/.yarn/cache/@chevrotain-utils-npm-9.1.0-5e5d6d7acc-ca78c97c7c.zip deleted file mode 100644 index 699df33..0000000 Binary files a/.yarn/cache/@chevrotain-utils-npm-9.1.0-5e5d6d7acc-ca78c97c7c.zip and /dev/null differ diff --git a/.yarn/cache/@cspotcode-source-map-consumer-npm-0.8.0-1f37e9e72b-c0c16ca3d2.zip b/.yarn/cache/@cspotcode-source-map-consumer-npm-0.8.0-1f37e9e72b-c0c16ca3d2.zip deleted file mode 100644 index 273fc20..0000000 Binary files a/.yarn/cache/@cspotcode-source-map-consumer-npm-0.8.0-1f37e9e72b-c0c16ca3d2.zip and /dev/null differ diff --git a/.yarn/cache/@cspotcode-source-map-support-npm-0.7.0-456c3ea2ce-9faddda775.zip b/.yarn/cache/@cspotcode-source-map-support-npm-0.7.0-456c3ea2ce-9faddda775.zip deleted file mode 100644 index 4f0f68a..0000000 Binary files a/.yarn/cache/@cspotcode-source-map-support-npm-0.7.0-456c3ea2ce-9faddda775.zip and /dev/null differ diff --git a/.yarn/cache/@cspotcode-source-map-support-npm-0.8.1-964f2de99d-5718f26708.zip b/.yarn/cache/@cspotcode-source-map-support-npm-0.8.1-964f2de99d-5718f26708.zip new file mode 100644 index 0000000..1a4763a Binary files /dev/null and b/.yarn/cache/@cspotcode-source-map-support-npm-0.8.1-964f2de99d-5718f26708.zip differ diff --git a/.yarn/cache/@jridgewell-resolve-uri-npm-3.1.1-aa2de3f210-f5b441fe79.zip b/.yarn/cache/@jridgewell-resolve-uri-npm-3.1.1-aa2de3f210-f5b441fe79.zip new file mode 100644 index 0000000..0cb5724 Binary files /dev/null and b/.yarn/cache/@jridgewell-resolve-uri-npm-3.1.1-aa2de3f210-f5b441fe79.zip differ diff --git a/.yarn/cache/@jridgewell-sourcemap-codec-npm-1.4.15-a055fb62cf-b881c7e503.zip b/.yarn/cache/@jridgewell-sourcemap-codec-npm-1.4.15-a055fb62cf-b881c7e503.zip new file mode 100644 index 0000000..402f52b Binary files /dev/null and b/.yarn/cache/@jridgewell-sourcemap-codec-npm-1.4.15-a055fb62cf-b881c7e503.zip differ diff --git a/.yarn/cache/@jridgewell-trace-mapping-npm-0.3.9-91625cd7fb-d89597752f.zip b/.yarn/cache/@jridgewell-trace-mapping-npm-0.3.9-91625cd7fb-d89597752f.zip new file mode 100644 index 0000000..8bf87a9 Binary files /dev/null and b/.yarn/cache/@jridgewell-trace-mapping-npm-0.3.9-91625cd7fb-d89597752f.zip differ diff --git a/.yarn/cache/@transcend-io-type-utils-npm-1.1.1-27afcd15c0-259cc50823.zip b/.yarn/cache/@transcend-io-type-utils-npm-1.1.1-27afcd15c0-259cc50823.zip new file mode 100644 index 0000000..15fbdf9 Binary files /dev/null and b/.yarn/cache/@transcend-io-type-utils-npm-1.1.1-27afcd15c0-259cc50823.zip differ diff --git a/.yarn/cache/@tsconfig-node10-npm-1.0.8-90a8cce25d-b8d5fffbc6.zip b/.yarn/cache/@tsconfig-node10-npm-1.0.8-90a8cce25d-b8d5fffbc6.zip deleted file mode 100644 index 484f8ab..0000000 Binary files a/.yarn/cache/@tsconfig-node10-npm-1.0.8-90a8cce25d-b8d5fffbc6.zip and /dev/null differ diff --git a/.yarn/cache/@tsconfig-node10-npm-1.0.9-f2e2d20feb-a33ae4dc2a.zip b/.yarn/cache/@tsconfig-node10-npm-1.0.9-f2e2d20feb-a33ae4dc2a.zip new file mode 100644 index 0000000..b213bf3 Binary files /dev/null and b/.yarn/cache/@tsconfig-node10-npm-1.0.9-f2e2d20feb-a33ae4dc2a.zip differ diff --git a/.yarn/cache/@tsconfig-node12-npm-1.0.11-9710d1c61b-5ce29a41b1.zip b/.yarn/cache/@tsconfig-node12-npm-1.0.11-9710d1c61b-5ce29a41b1.zip new file mode 100644 index 0000000..001dd13 Binary files /dev/null and b/.yarn/cache/@tsconfig-node12-npm-1.0.11-9710d1c61b-5ce29a41b1.zip differ diff --git a/.yarn/cache/@tsconfig-node12-npm-1.0.9-780563856d-a01b2400ab.zip b/.yarn/cache/@tsconfig-node12-npm-1.0.9-780563856d-a01b2400ab.zip deleted file mode 100644 index 0d3ceef..0000000 Binary files a/.yarn/cache/@tsconfig-node12-npm-1.0.9-780563856d-a01b2400ab.zip and /dev/null differ diff --git a/.yarn/cache/@tsconfig-node14-npm-1.0.1-3ecac58e68-976345e896.zip b/.yarn/cache/@tsconfig-node14-npm-1.0.1-3ecac58e68-976345e896.zip deleted file mode 100644 index 85d7b4c..0000000 Binary files a/.yarn/cache/@tsconfig-node14-npm-1.0.1-3ecac58e68-976345e896.zip and /dev/null differ diff --git a/.yarn/cache/@tsconfig-node14-npm-1.0.3-15321421d2-19275fe80c.zip b/.yarn/cache/@tsconfig-node14-npm-1.0.3-15321421d2-19275fe80c.zip new file mode 100644 index 0000000..9b825a0 Binary files /dev/null and b/.yarn/cache/@tsconfig-node14-npm-1.0.3-15321421d2-19275fe80c.zip differ diff --git a/.yarn/cache/@tsconfig-node16-npm-1.0.2-1f43ab567a-ca94d36397.zip b/.yarn/cache/@tsconfig-node16-npm-1.0.2-1f43ab567a-ca94d36397.zip deleted file mode 100644 index e39b74d..0000000 Binary files a/.yarn/cache/@tsconfig-node16-npm-1.0.2-1f43ab567a-ca94d36397.zip and /dev/null differ diff --git a/.yarn/cache/@tsconfig-node16-npm-1.0.4-b7cb87d859-2023197859.zip b/.yarn/cache/@tsconfig-node16-npm-1.0.4-b7cb87d859-2023197859.zip new file mode 100644 index 0000000..2638f0f Binary files /dev/null and b/.yarn/cache/@tsconfig-node16-npm-1.0.4-b7cb87d859-2023197859.zip differ diff --git a/.yarn/cache/@types-chai-npm-4.3.0-42bcda9bbc-3e393e0942.zip b/.yarn/cache/@types-chai-npm-4.3.0-42bcda9bbc-3e393e0942.zip deleted file mode 100644 index a96a099..0000000 Binary files a/.yarn/cache/@types-chai-npm-4.3.0-42bcda9bbc-3e393e0942.zip and /dev/null differ diff --git a/.yarn/cache/@types-chai-npm-4.3.8-b244550b3d-21431e46fa.zip b/.yarn/cache/@types-chai-npm-4.3.8-b244550b3d-21431e46fa.zip new file mode 100644 index 0000000..d88a0ac Binary files /dev/null and b/.yarn/cache/@types-chai-npm-4.3.8-b244550b3d-21431e46fa.zip differ diff --git a/.yarn/cache/@types-emscripten-npm-1.39.5-ef4c55ba8e-cb92a99148.zip b/.yarn/cache/@types-emscripten-npm-1.39.5-ef4c55ba8e-cb92a99148.zip deleted file mode 100644 index c8616f9..0000000 Binary files a/.yarn/cache/@types-emscripten-npm-1.39.5-ef4c55ba8e-cb92a99148.zip and /dev/null differ diff --git a/.yarn/cache/@types-emscripten-npm-1.39.8-b45eeffa86-adccdfcec3.zip b/.yarn/cache/@types-emscripten-npm-1.39.8-b45eeffa86-adccdfcec3.zip new file mode 100644 index 0000000..b4367ea Binary files /dev/null and b/.yarn/cache/@types-emscripten-npm-1.39.8-b45eeffa86-adccdfcec3.zip differ diff --git a/.yarn/cache/@types-lodash-npm-4.14.199-39fe418e7a-e68d1fcbbf.zip b/.yarn/cache/@types-lodash-npm-4.14.199-39fe418e7a-e68d1fcbbf.zip new file mode 100644 index 0000000..d20fece Binary files /dev/null and b/.yarn/cache/@types-lodash-npm-4.14.199-39fe418e7a-e68d1fcbbf.zip differ diff --git a/.yarn/cache/@types-mocha-npm-10.0.2-d38f8534d9-a78a02691f.zip b/.yarn/cache/@types-mocha-npm-10.0.2-d38f8534d9-a78a02691f.zip new file mode 100644 index 0000000..61ccd26 Binary files /dev/null and b/.yarn/cache/@types-mocha-npm-10.0.2-d38f8534d9-a78a02691f.zip differ diff --git a/.yarn/cache/@types-mocha-npm-9.1.0-8ac56cd8d3-21e1000daf.zip b/.yarn/cache/@types-mocha-npm-9.1.0-8ac56cd8d3-21e1000daf.zip deleted file mode 100644 index b7f2132..0000000 Binary files a/.yarn/cache/@types-mocha-npm-9.1.0-8ac56cd8d3-21e1000daf.zip and /dev/null differ diff --git a/.yarn/cache/@types-node-npm-13.13.52-95159539bb-8f1afff497.zip b/.yarn/cache/@types-node-npm-13.13.52-95159539bb-8f1afff497.zip deleted file mode 100644 index 954faa2..0000000 Binary files a/.yarn/cache/@types-node-npm-13.13.52-95159539bb-8f1afff497.zip and /dev/null differ diff --git a/.yarn/cache/@types-pluralize-npm-0.0.31-42e37d038a-950d52d8f6.zip b/.yarn/cache/@types-pluralize-npm-0.0.31-42e37d038a-950d52d8f6.zip new file mode 100644 index 0000000..5beec00 Binary files /dev/null and b/.yarn/cache/@types-pluralize-npm-0.0.31-42e37d038a-950d52d8f6.zip differ diff --git a/.yarn/cache/@ungap-promise-all-settled-npm-1.1.2-c0f42e147b-08d37fdfa2.zip b/.yarn/cache/@ungap-promise-all-settled-npm-1.1.2-c0f42e147b-08d37fdfa2.zip deleted file mode 100644 index 074ceb3..0000000 Binary files a/.yarn/cache/@ungap-promise-all-settled-npm-1.1.2-c0f42e147b-08d37fdfa2.zip and /dev/null differ diff --git a/.yarn/cache/@yarnpkg-core-npm-3.2.0-a48f7cad0a-a56839f157.zip b/.yarn/cache/@yarnpkg-core-npm-3.2.0-a48f7cad0a-a56839f157.zip deleted file mode 100644 index 28bd692..0000000 Binary files a/.yarn/cache/@yarnpkg-core-npm-3.2.0-a48f7cad0a-a56839f157.zip and /dev/null differ diff --git a/.yarn/cache/@yarnpkg-core-npm-4.0.0-rc.53-048f3958a7-86c0478270.zip b/.yarn/cache/@yarnpkg-core-npm-4.0.0-rc.53-048f3958a7-86c0478270.zip new file mode 100644 index 0000000..c1ad721 Binary files /dev/null and b/.yarn/cache/@yarnpkg-core-npm-4.0.0-rc.53-048f3958a7-86c0478270.zip differ diff --git a/.yarn/cache/@yarnpkg-fslib-npm-2.5.2-28ede04921-a4be406e5f.zip b/.yarn/cache/@yarnpkg-fslib-npm-2.5.2-28ede04921-a4be406e5f.zip deleted file mode 100644 index 9acda27..0000000 Binary files a/.yarn/cache/@yarnpkg-fslib-npm-2.5.2-28ede04921-a4be406e5f.zip and /dev/null differ diff --git a/.yarn/cache/@yarnpkg-fslib-npm-2.6.1-57faee1db2-e3bbd796a1.zip b/.yarn/cache/@yarnpkg-fslib-npm-2.6.1-57faee1db2-e3bbd796a1.zip deleted file mode 100644 index a3fcad8..0000000 Binary files a/.yarn/cache/@yarnpkg-fslib-npm-2.6.1-57faee1db2-e3bbd796a1.zip and /dev/null differ diff --git a/.yarn/cache/@yarnpkg-fslib-npm-3.0.0-rc.53-0a466b00ea-026fdc98da.zip b/.yarn/cache/@yarnpkg-fslib-npm-3.0.0-rc.53-0a466b00ea-026fdc98da.zip new file mode 100644 index 0000000..d58ebb2 Binary files /dev/null and b/.yarn/cache/@yarnpkg-fslib-npm-3.0.0-rc.53-0a466b00ea-026fdc98da.zip differ diff --git a/.yarn/cache/@yarnpkg-json-proxy-npm-2.1.1-516f902a0f-2c306b6ee1.zip b/.yarn/cache/@yarnpkg-json-proxy-npm-2.1.1-516f902a0f-2c306b6ee1.zip deleted file mode 100644 index 970fa11..0000000 Binary files a/.yarn/cache/@yarnpkg-json-proxy-npm-2.1.1-516f902a0f-2c306b6ee1.zip and /dev/null differ diff --git a/.yarn/cache/@yarnpkg-libzip-npm-2.2.2-3fa1ab5536-7c09b13fde.zip b/.yarn/cache/@yarnpkg-libzip-npm-2.2.2-3fa1ab5536-7c09b13fde.zip deleted file mode 100644 index 062b70f..0000000 Binary files a/.yarn/cache/@yarnpkg-libzip-npm-2.2.2-3fa1ab5536-7c09b13fde.zip and /dev/null differ diff --git a/.yarn/cache/@yarnpkg-libzip-npm-2.2.4-b8050186bc-974a286d4e.zip b/.yarn/cache/@yarnpkg-libzip-npm-2.2.4-b8050186bc-974a286d4e.zip deleted file mode 100644 index adcb674..0000000 Binary files a/.yarn/cache/@yarnpkg-libzip-npm-2.2.4-b8050186bc-974a286d4e.zip and /dev/null differ diff --git a/.yarn/cache/@yarnpkg-libzip-npm-3.0.0-rc.53-a807978274-bf6dbe5184.zip b/.yarn/cache/@yarnpkg-libzip-npm-3.0.0-rc.53-a807978274-bf6dbe5184.zip new file mode 100644 index 0000000..e70b29a Binary files /dev/null and b/.yarn/cache/@yarnpkg-libzip-npm-3.0.0-rc.53-a807978274-bf6dbe5184.zip differ diff --git a/.yarn/cache/@yarnpkg-nm-npm-3.0.1-f51363e8b2-bc39d07b4f.zip b/.yarn/cache/@yarnpkg-nm-npm-3.0.1-f51363e8b2-bc39d07b4f.zip deleted file mode 100644 index e495b41..0000000 Binary files a/.yarn/cache/@yarnpkg-nm-npm-3.0.1-f51363e8b2-bc39d07b4f.zip and /dev/null differ diff --git a/.yarn/cache/@yarnpkg-parsers-npm-2.5.0-80778f9c50-02678b7b91.zip b/.yarn/cache/@yarnpkg-parsers-npm-2.5.0-80778f9c50-02678b7b91.zip deleted file mode 100644 index 3312014..0000000 Binary files a/.yarn/cache/@yarnpkg-parsers-npm-2.5.0-80778f9c50-02678b7b91.zip and /dev/null differ diff --git a/.yarn/cache/@yarnpkg-parsers-npm-3.0.0-rc.53-c9aed2a00c-ef20025d8d.zip b/.yarn/cache/@yarnpkg-parsers-npm-3.0.0-rc.53-c9aed2a00c-ef20025d8d.zip new file mode 100644 index 0000000..45bd9e0 Binary files /dev/null and b/.yarn/cache/@yarnpkg-parsers-npm-3.0.0-rc.53-c9aed2a00c-ef20025d8d.zip differ diff --git a/.yarn/cache/@yarnpkg-pnp-npm-3.2.0-aa2b642c19-5b99f89e77.zip b/.yarn/cache/@yarnpkg-pnp-npm-3.2.0-aa2b642c19-5b99f89e77.zip deleted file mode 100644 index 5e2f53f..0000000 Binary files a/.yarn/cache/@yarnpkg-pnp-npm-3.2.0-aa2b642c19-5b99f89e77.zip and /dev/null differ diff --git a/.yarn/cache/@yarnpkg-pnpify-npm-3.1.1-b3d7d3145e-05a96f9299.zip b/.yarn/cache/@yarnpkg-pnpify-npm-3.1.1-b3d7d3145e-05a96f9299.zip deleted file mode 100644 index b0a2a50..0000000 Binary files a/.yarn/cache/@yarnpkg-pnpify-npm-3.1.1-b3d7d3145e-05a96f9299.zip and /dev/null differ diff --git a/.yarn/cache/@yarnpkg-sdks-npm-2.6.0-22968d3ffa-80d3c89311.zip b/.yarn/cache/@yarnpkg-sdks-npm-2.6.0-22968d3ffa-80d3c89311.zip deleted file mode 100644 index ec549c5..0000000 Binary files a/.yarn/cache/@yarnpkg-sdks-npm-2.6.0-22968d3ffa-80d3c89311.zip and /dev/null differ diff --git a/.yarn/cache/@yarnpkg-sdks-npm-3.0.0-rc.53-db477f9713-69746c865b.zip b/.yarn/cache/@yarnpkg-sdks-npm-3.0.0-rc.53-db477f9713-69746c865b.zip new file mode 100644 index 0000000..758834e Binary files /dev/null and b/.yarn/cache/@yarnpkg-sdks-npm-3.0.0-rc.53-db477f9713-69746c865b.zip differ diff --git a/.yarn/cache/@yarnpkg-shell-npm-3.2.0-aa6dbc485c-c1ec5f08a3.zip b/.yarn/cache/@yarnpkg-shell-npm-3.2.0-aa6dbc485c-c1ec5f08a3.zip deleted file mode 100644 index c36dfcc..0000000 Binary files a/.yarn/cache/@yarnpkg-shell-npm-3.2.0-aa6dbc485c-c1ec5f08a3.zip and /dev/null differ diff --git a/.yarn/cache/@yarnpkg-shell-npm-4.0.0-rc.53-2231344b5b-57fa54bd49.zip b/.yarn/cache/@yarnpkg-shell-npm-4.0.0-rc.53-2231344b5b-57fa54bd49.zip new file mode 100644 index 0000000..d498a77 Binary files /dev/null and b/.yarn/cache/@yarnpkg-shell-npm-4.0.0-rc.53-2231344b5b-57fa54bd49.zip differ diff --git a/.yarn/cache/acorn-npm-8.10.0-2230c9e83e-538ba38af0.zip b/.yarn/cache/acorn-npm-8.10.0-2230c9e83e-538ba38af0.zip new file mode 100644 index 0000000..6820207 Binary files /dev/null and b/.yarn/cache/acorn-npm-8.10.0-2230c9e83e-538ba38af0.zip differ diff --git a/.yarn/cache/acorn-npm-8.5.0-faed0ea119-2e4c1dbed3.zip b/.yarn/cache/acorn-npm-8.5.0-faed0ea119-2e4c1dbed3.zip deleted file mode 100644 index 9b9db23..0000000 Binary files a/.yarn/cache/acorn-npm-8.5.0-faed0ea119-2e4c1dbed3.zip and /dev/null differ diff --git a/.yarn/cache/any-promise-npm-1.3.0-f34eeaa7e7-0ee8a9bdbe.zip b/.yarn/cache/any-promise-npm-1.3.0-f34eeaa7e7-0ee8a9bdbe.zip deleted file mode 100644 index 2f709d5..0000000 Binary files a/.yarn/cache/any-promise-npm-1.3.0-f34eeaa7e7-0ee8a9bdbe.zip and /dev/null differ diff --git a/.yarn/cache/asap-npm-2.0.6-36714d439d-b296c92c4b.zip b/.yarn/cache/asap-npm-2.0.6-36714d439d-b296c92c4b.zip deleted file mode 100644 index ca3c436..0000000 Binary files a/.yarn/cache/asap-npm-2.0.6-36714d439d-b296c92c4b.zip and /dev/null differ diff --git a/.yarn/cache/brace-expansion-npm-2.0.1-17aa2616f9-a61e7cd2e8.zip b/.yarn/cache/brace-expansion-npm-2.0.1-17aa2616f9-a61e7cd2e8.zip new file mode 100644 index 0000000..11d5bd0 Binary files /dev/null and b/.yarn/cache/brace-expansion-npm-2.0.1-17aa2616f9-a61e7cd2e8.zip differ diff --git a/.yarn/cache/camel-case-npm-4.1.2-082bf67a9a-bcbd25cd25.zip b/.yarn/cache/camel-case-npm-4.1.2-082bf67a9a-bcbd25cd25.zip new file mode 100644 index 0000000..6bb1dd0 Binary files /dev/null and b/.yarn/cache/camel-case-npm-4.1.2-082bf67a9a-bcbd25cd25.zip differ diff --git a/.yarn/cache/capital-case-npm-1.0.4-90f8a4641d-41fa8fa87f.zip b/.yarn/cache/capital-case-npm-1.0.4-90f8a4641d-41fa8fa87f.zip new file mode 100644 index 0000000..5ca2b13 Binary files /dev/null and b/.yarn/cache/capital-case-npm-1.0.4-90f8a4641d-41fa8fa87f.zip differ diff --git a/.yarn/cache/change-case-npm-4.1.2-9c42f72b39-e4bc4a093a.zip b/.yarn/cache/change-case-npm-4.1.2-9c42f72b39-e4bc4a093a.zip new file mode 100644 index 0000000..78283fd Binary files /dev/null and b/.yarn/cache/change-case-npm-4.1.2-9c42f72b39-e4bc4a093a.zip differ diff --git a/.yarn/cache/chevrotain-npm-9.1.0-9280f9d77f-632d0d7c69.zip b/.yarn/cache/chevrotain-npm-9.1.0-9280f9d77f-632d0d7c69.zip deleted file mode 100644 index 25fc152..0000000 Binary files a/.yarn/cache/chevrotain-npm-9.1.0-9280f9d77f-632d0d7c69.zip and /dev/null differ diff --git a/.yarn/cache/clipanion-npm-3.2.0-rc.10-b702c05bd9-8e45be1282.zip b/.yarn/cache/clipanion-npm-3.2.0-rc.10-b702c05bd9-8e45be1282.zip deleted file mode 100644 index 70ab8e3..0000000 Binary files a/.yarn/cache/clipanion-npm-3.2.0-rc.10-b702c05bd9-8e45be1282.zip and /dev/null differ diff --git a/.yarn/cache/clipanion-npm-4.0.0-rc.2-ad27d804c4-533a2a0fd2.zip b/.yarn/cache/clipanion-npm-4.0.0-rc.2-ad27d804c4-533a2a0fd2.zip new file mode 100644 index 0000000..ec83b8f Binary files /dev/null and b/.yarn/cache/clipanion-npm-4.0.0-rc.2-ad27d804c4-533a2a0fd2.zip differ diff --git a/.yarn/cache/constant-case-npm-3.0.4-118b472e28-6c3346d51a.zip b/.yarn/cache/constant-case-npm-3.0.4-118b472e28-6c3346d51a.zip new file mode 100644 index 0000000..502e335 Binary files /dev/null and b/.yarn/cache/constant-case-npm-3.0.4-118b472e28-6c3346d51a.zip differ diff --git a/.yarn/cache/debug-npm-4.3.4-4513954577-3dbad3f94e.zip b/.yarn/cache/debug-npm-4.3.4-4513954577-3dbad3f94e.zip new file mode 100644 index 0000000..d3a11d8 Binary files /dev/null and b/.yarn/cache/debug-npm-4.3.4-4513954577-3dbad3f94e.zip differ diff --git a/.yarn/cache/diff-npm-5.1.0-d24d222280-c7bf0df7c9.zip b/.yarn/cache/diff-npm-5.1.0-d24d222280-c7bf0df7c9.zip new file mode 100644 index 0000000..14dfd16 Binary files /dev/null and b/.yarn/cache/diff-npm-5.1.0-d24d222280-c7bf0df7c9.zip differ diff --git a/.yarn/cache/dot-case-npm-3.0.4-09675b5521-a65e351941.zip b/.yarn/cache/dot-case-npm-3.0.4-09675b5521-a65e351941.zip new file mode 100644 index 0000000..67efd7f Binary files /dev/null and b/.yarn/cache/dot-case-npm-3.0.4-09675b5521-a65e351941.zip differ diff --git a/.yarn/cache/dotenv-npm-16.3.1-e6d380a398-15d75e7279.zip b/.yarn/cache/dotenv-npm-16.3.1-e6d380a398-15d75e7279.zip new file mode 100644 index 0000000..7bdd10c Binary files /dev/null and b/.yarn/cache/dotenv-npm-16.3.1-e6d380a398-15d75e7279.zip differ diff --git a/.yarn/cache/end-of-stream-npm-1.1.0-318d442be5-9fa637e259.zip b/.yarn/cache/end-of-stream-npm-1.1.0-318d442be5-9fa637e259.zip deleted file mode 100644 index ce8f761..0000000 Binary files a/.yarn/cache/end-of-stream-npm-1.1.0-318d442be5-9fa637e259.zip and /dev/null differ diff --git a/.yarn/cache/fp-ts-npm-2.16.1-8deb3ec2d6-94e8bb1d03.zip b/.yarn/cache/fp-ts-npm-2.16.1-8deb3ec2d6-94e8bb1d03.zip new file mode 100644 index 0000000..d9033e1 Binary files /dev/null and b/.yarn/cache/fp-ts-npm-2.16.1-8deb3ec2d6-94e8bb1d03.zip differ diff --git a/.yarn/cache/fsevents-patch-3340e2eb10-8.zip b/.yarn/cache/fsevents-patch-2882183fbf-8.zip similarity index 100% rename from .yarn/cache/fsevents-patch-3340e2eb10-8.zip rename to .yarn/cache/fsevents-patch-2882183fbf-8.zip diff --git a/.yarn/cache/growl-npm-1.10.5-2d1da54198-4b86685de6.zip b/.yarn/cache/growl-npm-1.10.5-2d1da54198-4b86685de6.zip deleted file mode 100644 index b05a103..0000000 Binary files a/.yarn/cache/growl-npm-1.10.5-2d1da54198-4b86685de6.zip and /dev/null differ diff --git a/.yarn/cache/handlebars-npm-4.7.8-25244c2c82-00e68bb5c1.zip b/.yarn/cache/handlebars-npm-4.7.8-25244c2c82-00e68bb5c1.zip new file mode 100644 index 0000000..b9f0b1e Binary files /dev/null and b/.yarn/cache/handlebars-npm-4.7.8-25244c2c82-00e68bb5c1.zip differ diff --git a/.yarn/cache/header-case-npm-2.0.4-7d19e19e6d-571c83eeb2.zip b/.yarn/cache/header-case-npm-2.0.4-7d19e19e6d-571c83eeb2.zip new file mode 100644 index 0000000..59ec3c6 Binary files /dev/null and b/.yarn/cache/header-case-npm-2.0.4-7d19e19e6d-571c83eeb2.zip differ diff --git a/.yarn/cache/io-ts-npm-2.2.20-734099d523-72517bf72a.zip b/.yarn/cache/io-ts-npm-2.2.20-734099d523-72517bf72a.zip new file mode 100644 index 0000000..1a42100 Binary files /dev/null and b/.yarn/cache/io-ts-npm-2.2.20-734099d523-72517bf72a.zip differ diff --git a/.yarn/cache/is-npm-3.3.0-90b1d93580-81fad3b40c.zip b/.yarn/cache/is-npm-3.3.0-90b1d93580-81fad3b40c.zip deleted file mode 100644 index 10830b9..0000000 Binary files a/.yarn/cache/is-npm-3.3.0-90b1d93580-81fad3b40c.zip and /dev/null differ diff --git a/.yarn/cache/json-file-plus-npm-3.3.1-7166c0c0e0-162c7a0c8f.zip b/.yarn/cache/json-file-plus-npm-3.3.1-7166c0c0e0-162c7a0c8f.zip deleted file mode 100644 index d80e8ed..0000000 Binary files a/.yarn/cache/json-file-plus-npm-3.3.1-7166c0c0e0-162c7a0c8f.zip and /dev/null differ diff --git a/.yarn/cache/lower-case-npm-2.0.2-151055f1c2-83a0a5f159.zip b/.yarn/cache/lower-case-npm-2.0.2-151055f1c2-83a0a5f159.zip new file mode 100644 index 0000000..0f0a86e Binary files /dev/null and b/.yarn/cache/lower-case-npm-2.0.2-151055f1c2-83a0a5f159.zip differ diff --git a/.yarn/cache/minimatch-npm-5.0.1-612724f6f0-b34b98463d.zip b/.yarn/cache/minimatch-npm-5.0.1-612724f6f0-b34b98463d.zip new file mode 100644 index 0000000..3e1e05a Binary files /dev/null and b/.yarn/cache/minimatch-npm-5.0.1-612724f6f0-b34b98463d.zip differ diff --git a/.yarn/cache/mkdirp-npm-0.5.5-6bc76534fc-3bce20ea52.zip b/.yarn/cache/mkdirp-npm-0.5.5-6bc76534fc-3bce20ea52.zip deleted file mode 100644 index c9be0e5..0000000 Binary files a/.yarn/cache/mkdirp-npm-0.5.5-6bc76534fc-3bce20ea52.zip and /dev/null differ diff --git a/.yarn/cache/mocha-npm-10.2.0-87db25c7c5-406c45eab1.zip b/.yarn/cache/mocha-npm-10.2.0-87db25c7c5-406c45eab1.zip new file mode 100644 index 0000000..171c682 Binary files /dev/null and b/.yarn/cache/mocha-npm-10.2.0-87db25c7c5-406c45eab1.zip differ diff --git a/.yarn/cache/mocha-npm-9.2.1-29636e12a0-10debdf2ee.zip b/.yarn/cache/mocha-npm-9.2.1-29636e12a0-10debdf2ee.zip deleted file mode 100644 index 22a3df5..0000000 Binary files a/.yarn/cache/mocha-npm-9.2.1-29636e12a0-10debdf2ee.zip and /dev/null differ diff --git a/.yarn/cache/nanoid-npm-3.2.0-27f7f3aa52-3d1d5a69fe.zip b/.yarn/cache/nanoid-npm-3.2.0-27f7f3aa52-3d1d5a69fe.zip deleted file mode 100644 index 6229117..0000000 Binary files a/.yarn/cache/nanoid-npm-3.2.0-27f7f3aa52-3d1d5a69fe.zip and /dev/null differ diff --git a/.yarn/cache/nanoid-npm-3.3.3-25d865be84-ada019402a.zip b/.yarn/cache/nanoid-npm-3.3.3-25d865be84-ada019402a.zip new file mode 100644 index 0000000..d28e91f Binary files /dev/null and b/.yarn/cache/nanoid-npm-3.3.3-25d865be84-ada019402a.zip differ diff --git a/.yarn/cache/neo-async-npm-2.6.2-75d6902586-deac9f8d00.zip b/.yarn/cache/neo-async-npm-2.6.2-75d6902586-deac9f8d00.zip new file mode 100644 index 0000000..cbf9a76 Binary files /dev/null and b/.yarn/cache/neo-async-npm-2.6.2-75d6902586-deac9f8d00.zip differ diff --git a/.yarn/cache/no-case-npm-3.0.4-12884c3d98-0b2ebc113d.zip b/.yarn/cache/no-case-npm-3.0.4-12884c3d98-0b2ebc113d.zip new file mode 100644 index 0000000..1e5347b Binary files /dev/null and b/.yarn/cache/no-case-npm-3.0.4-12884c3d98-0b2ebc113d.zip differ diff --git a/.yarn/cache/node.extend-npm-2.0.2-91a85f1c30-1fe3a1ca7f.zip b/.yarn/cache/node.extend-npm-2.0.2-91a85f1c30-1fe3a1ca7f.zip deleted file mode 100644 index d29a4a4..0000000 Binary files a/.yarn/cache/node.extend-npm-2.0.2-91a85f1c30-1fe3a1ca7f.zip and /dev/null differ diff --git a/.yarn/cache/once-npm-1.3.3-595f0882a4-8e832de08b.zip b/.yarn/cache/once-npm-1.3.3-595f0882a4-8e832de08b.zip deleted file mode 100644 index 74033f6..0000000 Binary files a/.yarn/cache/once-npm-1.3.3-595f0882a4-8e832de08b.zip and /dev/null differ diff --git a/.yarn/cache/param-case-npm-3.0.4-cfb242ad97-b34227fd0f.zip b/.yarn/cache/param-case-npm-3.0.4-cfb242ad97-b34227fd0f.zip new file mode 100644 index 0000000..8da8250 Binary files /dev/null and b/.yarn/cache/param-case-npm-3.0.4-cfb242ad97-b34227fd0f.zip differ diff --git a/.yarn/cache/pascal-case-npm-3.1.2-35f5b9bff6-ba98bfd595.zip b/.yarn/cache/pascal-case-npm-3.1.2-35f5b9bff6-ba98bfd595.zip new file mode 100644 index 0000000..fc44c75 Binary files /dev/null and b/.yarn/cache/pascal-case-npm-3.1.2-35f5b9bff6-ba98bfd595.zip differ diff --git a/.yarn/cache/path-case-npm-3.0.4-5a1981bc0c-61de052622.zip b/.yarn/cache/path-case-npm-3.0.4-5a1981bc0c-61de052622.zip new file mode 100644 index 0000000..e69be60 Binary files /dev/null and b/.yarn/cache/path-case-npm-3.0.4-5a1981bc0c-61de052622.zip differ diff --git a/.yarn/cache/pluralize-npm-7.0.0-5e0212129c-e3f694924b.zip b/.yarn/cache/pluralize-npm-7.0.0-5e0212129c-e3f694924b.zip deleted file mode 100644 index aff88fb..0000000 Binary files a/.yarn/cache/pluralize-npm-7.0.0-5e0212129c-e3f694924b.zip and /dev/null differ diff --git a/.yarn/cache/pluralize-npm-8.0.0-f5f044ed52-08931d4a6a.zip b/.yarn/cache/pluralize-npm-8.0.0-f5f044ed52-08931d4a6a.zip new file mode 100644 index 0000000..cb849f4 Binary files /dev/null and b/.yarn/cache/pluralize-npm-8.0.0-f5f044ed52-08931d4a6a.zip differ diff --git a/.yarn/cache/pretty-bytes-npm-5.6.0-0061079c9f-9c082500d1.zip b/.yarn/cache/pretty-bytes-npm-5.6.0-0061079c9f-9c082500d1.zip deleted file mode 100644 index 767e74f..0000000 Binary files a/.yarn/cache/pretty-bytes-npm-5.6.0-0061079c9f-9c082500d1.zip and /dev/null differ diff --git a/.yarn/cache/promise-deferred-npm-2.0.3-0b6eb75898-2e640ddd1e.zip b/.yarn/cache/promise-deferred-npm-2.0.3-0b6eb75898-2e640ddd1e.zip deleted file mode 100644 index faa54c5..0000000 Binary files a/.yarn/cache/promise-deferred-npm-2.0.3-0b6eb75898-2e640ddd1e.zip and /dev/null differ diff --git a/.yarn/cache/promise-npm-7.3.1-5d81d474c0-475bb06913.zip b/.yarn/cache/promise-npm-7.3.1-5d81d474c0-475bb06913.zip deleted file mode 100644 index 8cdeb99..0000000 Binary files a/.yarn/cache/promise-npm-7.3.1-5d81d474c0-475bb06913.zip and /dev/null differ diff --git a/.yarn/cache/promiseback-npm-2.0.3-1de6df4a1a-c4d75176df.zip b/.yarn/cache/promiseback-npm-2.0.3-1de6df4a1a-c4d75176df.zip deleted file mode 100644 index b0bf162..0000000 Binary files a/.yarn/cache/promiseback-npm-2.0.3-1de6df4a1a-c4d75176df.zip and /dev/null differ diff --git a/.yarn/cache/regexp-to-ast-npm-0.5.0-1e96b9f3a0-72e32f2a12.zip b/.yarn/cache/regexp-to-ast-npm-0.5.0-1e96b9f3a0-72e32f2a12.zip deleted file mode 100644 index 15fdfab..0000000 Binary files a/.yarn/cache/regexp-to-ast-npm-0.5.0-1e96b9f3a0-72e32f2a12.zip and /dev/null differ diff --git a/.yarn/cache/resolve-patch-b4a69197d3-a0dd7d16a8.zip b/.yarn/cache/resolve-patch-020719249b-a0dd7d16a8.zip similarity index 100% rename from .yarn/cache/resolve-patch-b4a69197d3-a0dd7d16a8.zip rename to .yarn/cache/resolve-patch-020719249b-a0dd7d16a8.zip diff --git a/.yarn/cache/sentence-case-npm-3.0.4-ed6888d0bc-3cfe6c0143.zip b/.yarn/cache/sentence-case-npm-3.0.4-ed6888d0bc-3cfe6c0143.zip new file mode 100644 index 0000000..48ea000 Binary files /dev/null and b/.yarn/cache/sentence-case-npm-3.0.4-ed6888d0bc-3cfe6c0143.zip differ diff --git a/.yarn/cache/snake-case-npm-3.0.4-67f447c30d-0a7a79900b.zip b/.yarn/cache/snake-case-npm-3.0.4-67f447c30d-0a7a79900b.zip new file mode 100644 index 0000000..b240641 Binary files /dev/null and b/.yarn/cache/snake-case-npm-3.0.4-67f447c30d-0a7a79900b.zip differ diff --git a/.yarn/cache/stream-buffers-npm-3.0.2-81e4221c31-b09fdeea60.zip b/.yarn/cache/stream-buffers-npm-3.0.2-81e4221c31-b09fdeea60.zip deleted file mode 100644 index b9c06e5..0000000 Binary files a/.yarn/cache/stream-buffers-npm-3.0.2-81e4221c31-b09fdeea60.zip and /dev/null differ diff --git a/.yarn/cache/stream-to-array-npm-2.3.0-eaa32c31d8-7feaf63b38.zip b/.yarn/cache/stream-to-array-npm-2.3.0-eaa32c31d8-7feaf63b38.zip deleted file mode 100644 index b8434b3..0000000 Binary files a/.yarn/cache/stream-to-array-npm-2.3.0-eaa32c31d8-7feaf63b38.zip and /dev/null differ diff --git a/.yarn/cache/stream-to-promise-npm-2.2.0-27f3ae7c38-2c9ddb69c3.zip b/.yarn/cache/stream-to-promise-npm-2.2.0-27f3ae7c38-2c9ddb69c3.zip deleted file mode 100644 index 475e1dc..0000000 Binary files a/.yarn/cache/stream-to-promise-npm-2.2.0-27f3ae7c38-2c9ddb69c3.zip and /dev/null differ diff --git a/.yarn/cache/tinylogic-npm-1.0.3-bd596a96c4-fdf7fcc170.zip b/.yarn/cache/tinylogic-npm-1.0.3-bd596a96c4-fdf7fcc170.zip deleted file mode 100644 index 28b97ce..0000000 Binary files a/.yarn/cache/tinylogic-npm-1.0.3-bd596a96c4-fdf7fcc170.zip and /dev/null differ diff --git a/.yarn/cache/tinylogic-npm-2.0.0-700fcc2fe0-b966cbb412.zip b/.yarn/cache/tinylogic-npm-2.0.0-700fcc2fe0-b966cbb412.zip new file mode 100644 index 0000000..ef13ec7 Binary files /dev/null and b/.yarn/cache/tinylogic-npm-2.0.0-700fcc2fe0-b966cbb412.zip differ diff --git a/.yarn/cache/ts-node-npm-10.5.0-818635380a-d51ac8a9b3.zip b/.yarn/cache/ts-node-npm-10.5.0-818635380a-d51ac8a9b3.zip deleted file mode 100644 index dcf8baf..0000000 Binary files a/.yarn/cache/ts-node-npm-10.5.0-818635380a-d51ac8a9b3.zip and /dev/null differ diff --git a/.yarn/cache/ts-node-npm-10.9.1-6c268be7f4-090adff130.zip b/.yarn/cache/ts-node-npm-10.9.1-6c268be7f4-090adff130.zip new file mode 100644 index 0000000..064018a Binary files /dev/null and b/.yarn/cache/ts-node-npm-10.9.1-6c268be7f4-090adff130.zip differ diff --git a/.yarn/cache/tslib-npm-2.6.2-4fc8c068d9-329ea56123.zip b/.yarn/cache/tslib-npm-2.6.2-4fc8c068d9-329ea56123.zip new file mode 100644 index 0000000..3424b44 Binary files /dev/null and b/.yarn/cache/tslib-npm-2.6.2-4fc8c068d9-329ea56123.zip differ diff --git a/.yarn/cache/typanion-npm-3.14.0-8af344c436-fc0590d02c.zip b/.yarn/cache/typanion-npm-3.14.0-8af344c436-fc0590d02c.zip new file mode 100644 index 0000000..45ee94a Binary files /dev/null and b/.yarn/cache/typanion-npm-3.14.0-8af344c436-fc0590d02c.zip differ diff --git a/.yarn/cache/typanion-npm-3.7.1-b7ec4136b5-79f396a960.zip b/.yarn/cache/typanion-npm-3.7.1-b7ec4136b5-79f396a960.zip deleted file mode 100644 index a9c71fa..0000000 Binary files a/.yarn/cache/typanion-npm-3.7.1-b7ec4136b5-79f396a960.zip and /dev/null differ diff --git a/.yarn/cache/typescript-npm-4.5.5-b3e3678b69-506f4c919d.zip b/.yarn/cache/typescript-npm-4.5.5-b3e3678b69-506f4c919d.zip deleted file mode 100644 index 055d025..0000000 Binary files a/.yarn/cache/typescript-npm-4.5.5-b3e3678b69-506f4c919d.zip and /dev/null differ diff --git a/.yarn/cache/typescript-npm-5.0.4-122f6a883a-82b94da3f4.zip b/.yarn/cache/typescript-npm-5.0.4-122f6a883a-82b94da3f4.zip new file mode 100644 index 0000000..8c72d57 Binary files /dev/null and b/.yarn/cache/typescript-npm-5.0.4-122f6a883a-82b94da3f4.zip differ diff --git a/.yarn/cache/typescript-patch-1413b5712d-858c61fa63.zip b/.yarn/cache/typescript-patch-1413b5712d-858c61fa63.zip deleted file mode 100644 index a6c52be..0000000 Binary files a/.yarn/cache/typescript-patch-1413b5712d-858c61fa63.zip and /dev/null differ diff --git a/.yarn/cache/typescript-patch-260000abbe-bb309d320c.zip b/.yarn/cache/typescript-patch-260000abbe-bb309d320c.zip new file mode 100644 index 0000000..3c47d9e Binary files /dev/null and b/.yarn/cache/typescript-patch-260000abbe-bb309d320c.zip differ diff --git a/.yarn/cache/uglify-js-npm-3.17.4-58d4ab56aa-7b3897df38.zip b/.yarn/cache/uglify-js-npm-3.17.4-58d4ab56aa-7b3897df38.zip new file mode 100644 index 0000000..c3d1c95 Binary files /dev/null and b/.yarn/cache/uglify-js-npm-3.17.4-58d4ab56aa-7b3897df38.zip differ diff --git a/.yarn/cache/upper-case-first-npm-2.0.2-8e0c5a851a-4487db4701.zip b/.yarn/cache/upper-case-first-npm-2.0.2-8e0c5a851a-4487db4701.zip new file mode 100644 index 0000000..d45be36 Binary files /dev/null and b/.yarn/cache/upper-case-first-npm-2.0.2-8e0c5a851a-4487db4701.zip differ diff --git a/.yarn/cache/upper-case-npm-2.0.2-6cf3bda96c-508723a2b0.zip b/.yarn/cache/upper-case-npm-2.0.2-6cf3bda96c-508723a2b0.zip new file mode 100644 index 0000000..2cc3875 Binary files /dev/null and b/.yarn/cache/upper-case-npm-2.0.2-6cf3bda96c-508723a2b0.zip differ diff --git a/.yarn/cache/v8-compile-cache-lib-npm-3.0.0-82045dda32-674e312bbc.zip b/.yarn/cache/v8-compile-cache-lib-npm-3.0.0-82045dda32-674e312bbc.zip deleted file mode 100644 index 6502b0e..0000000 Binary files a/.yarn/cache/v8-compile-cache-lib-npm-3.0.0-82045dda32-674e312bbc.zip and /dev/null differ diff --git a/.yarn/cache/v8-compile-cache-lib-npm-3.0.1-4886071ece-78089ad549.zip b/.yarn/cache/v8-compile-cache-lib-npm-3.0.1-4886071ece-78089ad549.zip new file mode 100644 index 0000000..005ea72 Binary files /dev/null and b/.yarn/cache/v8-compile-cache-lib-npm-3.0.1-4886071ece-78089ad549.zip differ diff --git a/.yarn/cache/wordwrap-npm-1.0.0-ae57a645e8-2a44b27881.zip b/.yarn/cache/wordwrap-npm-1.0.0-ae57a645e8-2a44b27881.zip new file mode 100644 index 0000000..5463df0 Binary files /dev/null and b/.yarn/cache/wordwrap-npm-1.0.0-ae57a645e8-2a44b27881.zip differ diff --git a/.yarn/cache/workerpool-npm-6.2.0-d2a722f6bb-3493b4f0ef.zip b/.yarn/cache/workerpool-npm-6.2.1-1486cb2056-c2c6eebbc5.zip similarity index 55% rename from .yarn/cache/workerpool-npm-6.2.0-d2a722f6bb-3493b4f0ef.zip rename to .yarn/cache/workerpool-npm-6.2.1-1486cb2056-c2c6eebbc5.zip index 74dcf56..0de5c0c 100644 Binary files a/.yarn/cache/workerpool-npm-6.2.0-d2a722f6bb-3493b4f0ef.zip and b/.yarn/cache/workerpool-npm-6.2.1-1486cb2056-c2c6eebbc5.zip differ diff --git a/.yarn/releases/yarn-3.5.0.cjs b/.yarn/releases/yarn-3.5.0.cjs new file mode 100755 index 0000000..093e64a --- /dev/null +++ b/.yarn/releases/yarn-3.5.0.cjs @@ -0,0 +1,873 @@ +#!/usr/bin/env node +/* eslint-disable */ +//prettier-ignore +(()=>{var Qge=Object.create;var AS=Object.defineProperty;var bge=Object.getOwnPropertyDescriptor;var Sge=Object.getOwnPropertyNames;var vge=Object.getPrototypeOf,xge=Object.prototype.hasOwnProperty;var J=(r=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(r,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):r)(function(r){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+r+'" is not supported')});var Pge=(r,e)=>()=>(r&&(e=r(r=0)),e);var w=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),ut=(r,e)=>{for(var t in e)AS(r,t,{get:e[t],enumerable:!0})},Dge=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Sge(e))!xge.call(r,n)&&n!==t&&AS(r,n,{get:()=>e[n],enumerable:!(i=bge(e,n))||i.enumerable});return r};var Pe=(r,e,t)=>(t=r!=null?Qge(vge(r)):{},Dge(e||!r||!r.__esModule?AS(t,"default",{value:r,enumerable:!0}):t,r));var QK=w((GXe,BK)=>{BK.exports=wK;wK.sync=Zge;var IK=J("fs");function Xge(r,e){var t=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!t||(t=t.split(";"),t.indexOf("")!==-1))return!0;for(var i=0;i{xK.exports=SK;SK.sync=_ge;var bK=J("fs");function SK(r,e,t){bK.stat(r,function(i,n){t(i,i?!1:vK(n,e))})}function _ge(r,e){return vK(bK.statSync(r),e)}function vK(r,e){return r.isFile()&&$ge(r,e)}function $ge(r,e){var t=r.mode,i=r.uid,n=r.gid,s=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),o=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),a=parseInt("100",8),l=parseInt("010",8),c=parseInt("001",8),u=a|l,g=t&c||t&l&&n===o||t&a&&i===s||t&u&&s===0;return g}});var kK=w((qXe,DK)=>{var jXe=J("fs"),sI;process.platform==="win32"||global.TESTING_WINDOWS?sI=QK():sI=PK();DK.exports=SS;SS.sync=efe;function SS(r,e,t){if(typeof e=="function"&&(t=e,e={}),!t){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(i,n){SS(r,e||{},function(s,o){s?n(s):i(o)})})}sI(r,e||{},function(i,n){i&&(i.code==="EACCES"||e&&e.ignoreErrors)&&(i=null,n=!1),t(i,n)})}function efe(r,e){try{return sI.sync(r,e||{})}catch(t){if(e&&e.ignoreErrors||t.code==="EACCES")return!1;throw t}}});var MK=w((JXe,OK)=>{var vg=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",RK=J("path"),tfe=vg?";":":",FK=kK(),NK=r=>Object.assign(new Error(`not found: ${r}`),{code:"ENOENT"}),LK=(r,e)=>{let t=e.colon||tfe,i=r.match(/\//)||vg&&r.match(/\\/)?[""]:[...vg?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(t)],n=vg?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=vg?n.split(t):[""];return vg&&r.indexOf(".")!==-1&&s[0]!==""&&s.unshift(""),{pathEnv:i,pathExt:s,pathExtExe:n}},TK=(r,e,t)=>{typeof e=="function"&&(t=e,e={}),e||(e={});let{pathEnv:i,pathExt:n,pathExtExe:s}=LK(r,e),o=[],a=c=>new Promise((u,g)=>{if(c===i.length)return e.all&&o.length?u(o):g(NK(r));let f=i[c],h=/^".*"$/.test(f)?f.slice(1,-1):f,p=RK.join(h,r),C=!h&&/^\.[\\\/]/.test(r)?r.slice(0,2)+p:p;u(l(C,c,0))}),l=(c,u,g)=>new Promise((f,h)=>{if(g===n.length)return f(a(u+1));let p=n[g];FK(c+p,{pathExt:s},(C,y)=>{if(!C&&y)if(e.all)o.push(c+p);else return f(c+p);return f(l(c,u,g+1))})});return t?a(0).then(c=>t(null,c),t):a(0)},rfe=(r,e)=>{e=e||{};let{pathEnv:t,pathExt:i,pathExtExe:n}=LK(r,e),s=[];for(let o=0;o{"use strict";var KK=(r={})=>{let e=r.env||process.env;return(r.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(i=>i.toUpperCase()==="PATH")||"Path"};vS.exports=KK;vS.exports.default=KK});var jK=w((zXe,YK)=>{"use strict";var HK=J("path"),ife=MK(),nfe=UK();function GK(r,e){let t=r.options.env||process.env,i=process.cwd(),n=r.options.cwd!=null,s=n&&process.chdir!==void 0&&!process.chdir.disabled;if(s)try{process.chdir(r.options.cwd)}catch{}let o;try{o=ife.sync(r.command,{path:t[nfe({env:t})],pathExt:e?HK.delimiter:void 0})}catch{}finally{s&&process.chdir(i)}return o&&(o=HK.resolve(n?r.options.cwd:"",o)),o}function sfe(r){return GK(r)||GK(r,!0)}YK.exports=sfe});var qK=w((VXe,PS)=>{"use strict";var xS=/([()\][%!^"`<>&|;, *?])/g;function ofe(r){return r=r.replace(xS,"^$1"),r}function afe(r,e){return r=`${r}`,r=r.replace(/(\\*)"/g,'$1$1\\"'),r=r.replace(/(\\*)$/,"$1$1"),r=`"${r}"`,r=r.replace(xS,"^$1"),e&&(r=r.replace(xS,"^$1")),r}PS.exports.command=ofe;PS.exports.argument=afe});var WK=w((XXe,JK)=>{"use strict";JK.exports=/^#!(.*)/});var VK=w((ZXe,zK)=>{"use strict";var Afe=WK();zK.exports=(r="")=>{let e=r.match(Afe);if(!e)return null;let[t,i]=e[0].replace(/#! ?/,"").split(" "),n=t.split("/").pop();return n==="env"?i:i?`${n} ${i}`:n}});var ZK=w((_Xe,XK)=>{"use strict";var DS=J("fs"),lfe=VK();function cfe(r){let t=Buffer.alloc(150),i;try{i=DS.openSync(r,"r"),DS.readSync(i,t,0,150,0),DS.closeSync(i)}catch{}return lfe(t.toString())}XK.exports=cfe});var tU=w(($Xe,eU)=>{"use strict";var ufe=J("path"),_K=jK(),$K=qK(),gfe=ZK(),ffe=process.platform==="win32",hfe=/\.(?:com|exe)$/i,pfe=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function dfe(r){r.file=_K(r);let e=r.file&&gfe(r.file);return e?(r.args.unshift(r.file),r.command=e,_K(r)):r.file}function Cfe(r){if(!ffe)return r;let e=dfe(r),t=!hfe.test(e);if(r.options.forceShell||t){let i=pfe.test(e);r.command=ufe.normalize(r.command),r.command=$K.command(r.command),r.args=r.args.map(s=>$K.argument(s,i));let n=[r.command].concat(r.args).join(" ");r.args=["/d","/s","/c",`"${n}"`],r.command=process.env.comspec||"cmd.exe",r.options.windowsVerbatimArguments=!0}return r}function mfe(r,e,t){e&&!Array.isArray(e)&&(t=e,e=null),e=e?e.slice(0):[],t=Object.assign({},t);let i={command:r,args:e,options:t,file:void 0,original:{command:r,args:e}};return t.shell?i:Cfe(i)}eU.exports=mfe});var nU=w((eZe,iU)=>{"use strict";var kS=process.platform==="win32";function RS(r,e){return Object.assign(new Error(`${e} ${r.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${r.command}`,path:r.command,spawnargs:r.args})}function Efe(r,e){if(!kS)return;let t=r.emit;r.emit=function(i,n){if(i==="exit"){let s=rU(n,e,"spawn");if(s)return t.call(r,"error",s)}return t.apply(r,arguments)}}function rU(r,e){return kS&&r===1&&!e.file?RS(e.original,"spawn"):null}function Ife(r,e){return kS&&r===1&&!e.file?RS(e.original,"spawnSync"):null}iU.exports={hookChildProcess:Efe,verifyENOENT:rU,verifyENOENTSync:Ife,notFoundError:RS}});var LS=w((tZe,xg)=>{"use strict";var sU=J("child_process"),FS=tU(),NS=nU();function oU(r,e,t){let i=FS(r,e,t),n=sU.spawn(i.command,i.args,i.options);return NS.hookChildProcess(n,i),n}function yfe(r,e,t){let i=FS(r,e,t),n=sU.spawnSync(i.command,i.args,i.options);return n.error=n.error||NS.verifyENOENTSync(n.status,i),n}xg.exports=oU;xg.exports.spawn=oU;xg.exports.sync=yfe;xg.exports._parse=FS;xg.exports._enoent=NS});var AU=w((rZe,aU)=>{"use strict";function wfe(r,e){function t(){this.constructor=r}t.prototype=e.prototype,r.prototype=new t}function Wl(r,e,t,i){this.message=r,this.expected=e,this.found=t,this.location=i,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Wl)}wfe(Wl,Error);Wl.buildMessage=function(r,e){var t={literal:function(c){return'"'+n(c.text)+'"'},class:function(c){var u="",g;for(g=0;g0){for(g=1,f=1;g>",ie=me(">>",!1),de=">&",_e=me(">&",!1),Pt=">",It=me(">",!1),Or="<<<",ii=me("<<<",!1),gi="<&",hr=me("<&",!1),fi="<",ni=me("<",!1),Os=function(m){return{type:"argument",segments:[].concat(...m)}},pr=function(m){return m},Ii="$'",es=me("$'",!1),ua="'",pA=me("'",!1),ag=function(m){return[{type:"text",text:m}]},ts='""',dA=me('""',!1),ga=function(){return{type:"text",text:""}},yp='"',CA=me('"',!1),mA=function(m){return m},wr=function(m){return{type:"arithmetic",arithmetic:m,quoted:!0}},kl=function(m){return{type:"shell",shell:m,quoted:!0}},Ag=function(m){return{type:"variable",...m,quoted:!0}},Io=function(m){return{type:"text",text:m}},lg=function(m){return{type:"arithmetic",arithmetic:m,quoted:!1}},wp=function(m){return{type:"shell",shell:m,quoted:!1}},Bp=function(m){return{type:"variable",...m,quoted:!1}},vr=function(m){return{type:"glob",pattern:m}},se=/^[^']/,yo=Je(["'"],!0,!1),kn=function(m){return m.join("")},cg=/^[^$"]/,Qt=Je(["$",'"'],!0,!1),Rl=`\\ +`,Rn=me(`\\ +`,!1),rs=function(){return""},is="\\",gt=me("\\",!1),wo=/^[\\$"`]/,At=Je(["\\","$",'"',"`"],!1,!1),an=function(m){return m},S="\\a",Tt=me("\\a",!1),ug=function(){return"a"},Fl="\\b",Qp=me("\\b",!1),bp=function(){return"\b"},Sp=/^[Ee]/,vp=Je(["E","e"],!1,!1),xp=function(){return"\x1B"},G="\\f",yt=me("\\f",!1),EA=function(){return"\f"},Ji="\\n",Nl=me("\\n",!1),Xe=function(){return` +`},fa="\\r",gg=me("\\r",!1),FE=function(){return"\r"},Pp="\\t",NE=me("\\t",!1),ar=function(){return" "},Fn="\\v",Ll=me("\\v",!1),Dp=function(){return"\v"},Ms=/^[\\'"?]/,ha=Je(["\\","'",'"',"?"],!1,!1),An=function(m){return String.fromCharCode(parseInt(m,16))},Te="\\x",fg=me("\\x",!1),Tl="\\u",Ks=me("\\u",!1),Ol="\\U",IA=me("\\U",!1),hg=function(m){return String.fromCodePoint(parseInt(m,16))},pg=/^[0-7]/,pa=Je([["0","7"]],!1,!1),da=/^[0-9a-fA-f]/,rt=Je([["0","9"],["a","f"],["A","f"]],!1,!1),Bo=nt(),yA="-",Ml=me("-",!1),Us="+",Kl=me("+",!1),LE=".",kp=me(".",!1),dg=function(m,b,N){return{type:"number",value:(m==="-"?-1:1)*parseFloat(b.join("")+"."+N.join(""))}},Rp=function(m,b){return{type:"number",value:(m==="-"?-1:1)*parseInt(b.join(""))}},TE=function(m){return{type:"variable",...m}},Ul=function(m){return{type:"variable",name:m}},OE=function(m){return m},Cg="*",wA=me("*",!1),Rr="/",ME=me("/",!1),Hs=function(m,b,N){return{type:b==="*"?"multiplication":"division",right:N}},Gs=function(m,b){return b.reduce((N,U)=>({left:N,...U}),m)},mg=function(m,b,N){return{type:b==="+"?"addition":"subtraction",right:N}},BA="$((",R=me("$((",!1),q="))",Ce=me("))",!1),Ke=function(m){return m},Re="$(",ze=me("$(",!1),dt=function(m){return m},Ft="${",Nn=me("${",!1),qb=":-",S1=me(":-",!1),v1=function(m,b){return{name:m,defaultValue:b}},Jb=":-}",x1=me(":-}",!1),P1=function(m){return{name:m,defaultValue:[]}},Wb=":+",D1=me(":+",!1),k1=function(m,b){return{name:m,alternativeValue:b}},zb=":+}",R1=me(":+}",!1),F1=function(m){return{name:m,alternativeValue:[]}},Vb=function(m){return{name:m}},N1="$",L1=me("$",!1),T1=function(m){return e.isGlobPattern(m)},O1=function(m){return m},Xb=/^[a-zA-Z0-9_]/,Zb=Je([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),_b=function(){return T()},$b=/^[$@*?#a-zA-Z0-9_\-]/,eS=Je(["$","@","*","?","#",["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),M1=/^[(){}<>$|&; \t"']/,Eg=Je(["(",")","{","}","<",">","$","|","&",";"," "," ",'"',"'"],!1,!1),tS=/^[<>&; \t"']/,rS=Je(["<",">","&",";"," "," ",'"',"'"],!1,!1),KE=/^[ \t]/,UE=Je([" "," "],!1,!1),Q=0,Me=0,QA=[{line:1,column:1}],d=0,E=[],I=0,k;if("startRule"in e){if(!(e.startRule in i))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');n=i[e.startRule]}function T(){return r.substring(Me,Q)}function Z(){return Et(Me,Q)}function te(m,b){throw b=b!==void 0?b:Et(Me,Q),Ri([lt(m)],r.substring(Me,Q),b)}function Be(m,b){throw b=b!==void 0?b:Et(Me,Q),Ln(m,b)}function me(m,b){return{type:"literal",text:m,ignoreCase:b}}function Je(m,b,N){return{type:"class",parts:m,inverted:b,ignoreCase:N}}function nt(){return{type:"any"}}function wt(){return{type:"end"}}function lt(m){return{type:"other",description:m}}function it(m){var b=QA[m],N;if(b)return b;for(N=m-1;!QA[N];)N--;for(b=QA[N],b={line:b.line,column:b.column};Nd&&(d=Q,E=[]),E.push(m))}function Ln(m,b){return new Wl(m,null,null,b)}function Ri(m,b,N){return new Wl(Wl.buildMessage(m,b),m,b,N)}function bA(){var m,b;return m=Q,b=Mr(),b===t&&(b=null),b!==t&&(Me=m,b=s(b)),m=b,m}function Mr(){var m,b,N,U,ce;if(m=Q,b=Kr(),b!==t){for(N=[],U=He();U!==t;)N.push(U),U=He();N!==t?(U=Ca(),U!==t?(ce=ns(),ce===t&&(ce=null),ce!==t?(Me=m,b=o(b,U,ce),m=b):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t)}else Q=m,m=t;if(m===t)if(m=Q,b=Kr(),b!==t){for(N=[],U=He();U!==t;)N.push(U),U=He();N!==t?(U=Ca(),U===t&&(U=null),U!==t?(Me=m,b=a(b,U),m=b):(Q=m,m=t)):(Q=m,m=t)}else Q=m,m=t;return m}function ns(){var m,b,N,U,ce;for(m=Q,b=[],N=He();N!==t;)b.push(N),N=He();if(b!==t)if(N=Mr(),N!==t){for(U=[],ce=He();ce!==t;)U.push(ce),ce=He();U!==t?(Me=m,b=l(N),m=b):(Q=m,m=t)}else Q=m,m=t;else Q=m,m=t;return m}function Ca(){var m;return r.charCodeAt(Q)===59?(m=c,Q++):(m=t,I===0&&Qe(u)),m===t&&(r.charCodeAt(Q)===38?(m=g,Q++):(m=t,I===0&&Qe(f))),m}function Kr(){var m,b,N;return m=Q,b=K1(),b!==t?(N=age(),N===t&&(N=null),N!==t?(Me=m,b=h(b,N),m=b):(Q=m,m=t)):(Q=m,m=t),m}function age(){var m,b,N,U,ce,Se,ht;for(m=Q,b=[],N=He();N!==t;)b.push(N),N=He();if(b!==t)if(N=Age(),N!==t){for(U=[],ce=He();ce!==t;)U.push(ce),ce=He();if(U!==t)if(ce=Kr(),ce!==t){for(Se=[],ht=He();ht!==t;)Se.push(ht),ht=He();Se!==t?(Me=m,b=p(N,ce),m=b):(Q=m,m=t)}else Q=m,m=t;else Q=m,m=t}else Q=m,m=t;else Q=m,m=t;return m}function Age(){var m;return r.substr(Q,2)===C?(m=C,Q+=2):(m=t,I===0&&Qe(y)),m===t&&(r.substr(Q,2)===B?(m=B,Q+=2):(m=t,I===0&&Qe(v))),m}function K1(){var m,b,N;return m=Q,b=uge(),b!==t?(N=lge(),N===t&&(N=null),N!==t?(Me=m,b=D(b,N),m=b):(Q=m,m=t)):(Q=m,m=t),m}function lge(){var m,b,N,U,ce,Se,ht;for(m=Q,b=[],N=He();N!==t;)b.push(N),N=He();if(b!==t)if(N=cge(),N!==t){for(U=[],ce=He();ce!==t;)U.push(ce),ce=He();if(U!==t)if(ce=K1(),ce!==t){for(Se=[],ht=He();ht!==t;)Se.push(ht),ht=He();Se!==t?(Me=m,b=L(N,ce),m=b):(Q=m,m=t)}else Q=m,m=t;else Q=m,m=t}else Q=m,m=t;else Q=m,m=t;return m}function cge(){var m;return r.substr(Q,2)===H?(m=H,Q+=2):(m=t,I===0&&Qe(j)),m===t&&(r.charCodeAt(Q)===124?(m=$,Q++):(m=t,I===0&&Qe(V))),m}function HE(){var m,b,N,U,ce,Se;if(m=Q,b=Z1(),b!==t)if(r.charCodeAt(Q)===61?(N=W,Q++):(N=t,I===0&&Qe(_)),N!==t)if(U=G1(),U!==t){for(ce=[],Se=He();Se!==t;)ce.push(Se),Se=He();ce!==t?(Me=m,b=A(b,U),m=b):(Q=m,m=t)}else Q=m,m=t;else Q=m,m=t;else Q=m,m=t;if(m===t)if(m=Q,b=Z1(),b!==t)if(r.charCodeAt(Q)===61?(N=W,Q++):(N=t,I===0&&Qe(_)),N!==t){for(U=[],ce=He();ce!==t;)U.push(ce),ce=He();U!==t?(Me=m,b=ae(b),m=b):(Q=m,m=t)}else Q=m,m=t;else Q=m,m=t;return m}function uge(){var m,b,N,U,ce,Se,ht,Bt,Jr,hi,ss;for(m=Q,b=[],N=He();N!==t;)b.push(N),N=He();if(b!==t)if(r.charCodeAt(Q)===40?(N=ge,Q++):(N=t,I===0&&Qe(re)),N!==t){for(U=[],ce=He();ce!==t;)U.push(ce),ce=He();if(U!==t)if(ce=Mr(),ce!==t){for(Se=[],ht=He();ht!==t;)Se.push(ht),ht=He();if(Se!==t)if(r.charCodeAt(Q)===41?(ht=O,Q++):(ht=t,I===0&&Qe(F)),ht!==t){for(Bt=[],Jr=He();Jr!==t;)Bt.push(Jr),Jr=He();if(Bt!==t){for(Jr=[],hi=Fp();hi!==t;)Jr.push(hi),hi=Fp();if(Jr!==t){for(hi=[],ss=He();ss!==t;)hi.push(ss),ss=He();hi!==t?(Me=m,b=ue(ce,Jr),m=b):(Q=m,m=t)}else Q=m,m=t}else Q=m,m=t}else Q=m,m=t;else Q=m,m=t}else Q=m,m=t;else Q=m,m=t}else Q=m,m=t;else Q=m,m=t;if(m===t){for(m=Q,b=[],N=He();N!==t;)b.push(N),N=He();if(b!==t)if(r.charCodeAt(Q)===123?(N=he,Q++):(N=t,I===0&&Qe(ke)),N!==t){for(U=[],ce=He();ce!==t;)U.push(ce),ce=He();if(U!==t)if(ce=Mr(),ce!==t){for(Se=[],ht=He();ht!==t;)Se.push(ht),ht=He();if(Se!==t)if(r.charCodeAt(Q)===125?(ht=Fe,Q++):(ht=t,I===0&&Qe(Ne)),ht!==t){for(Bt=[],Jr=He();Jr!==t;)Bt.push(Jr),Jr=He();if(Bt!==t){for(Jr=[],hi=Fp();hi!==t;)Jr.push(hi),hi=Fp();if(Jr!==t){for(hi=[],ss=He();ss!==t;)hi.push(ss),ss=He();hi!==t?(Me=m,b=oe(ce,Jr),m=b):(Q=m,m=t)}else Q=m,m=t}else Q=m,m=t}else Q=m,m=t;else Q=m,m=t}else Q=m,m=t;else Q=m,m=t}else Q=m,m=t;else Q=m,m=t;if(m===t){for(m=Q,b=[],N=He();N!==t;)b.push(N),N=He();if(b!==t){for(N=[],U=HE();U!==t;)N.push(U),U=HE();if(N!==t){for(U=[],ce=He();ce!==t;)U.push(ce),ce=He();if(U!==t){if(ce=[],Se=H1(),Se!==t)for(;Se!==t;)ce.push(Se),Se=H1();else ce=t;if(ce!==t){for(Se=[],ht=He();ht!==t;)Se.push(ht),ht=He();Se!==t?(Me=m,b=le(N,ce),m=b):(Q=m,m=t)}else Q=m,m=t}else Q=m,m=t}else Q=m,m=t}else Q=m,m=t;if(m===t){for(m=Q,b=[],N=He();N!==t;)b.push(N),N=He();if(b!==t){if(N=[],U=HE(),U!==t)for(;U!==t;)N.push(U),U=HE();else N=t;if(N!==t){for(U=[],ce=He();ce!==t;)U.push(ce),ce=He();U!==t?(Me=m,b=we(N),m=b):(Q=m,m=t)}else Q=m,m=t}else Q=m,m=t}}}return m}function U1(){var m,b,N,U,ce;for(m=Q,b=[],N=He();N!==t;)b.push(N),N=He();if(b!==t){if(N=[],U=GE(),U!==t)for(;U!==t;)N.push(U),U=GE();else N=t;if(N!==t){for(U=[],ce=He();ce!==t;)U.push(ce),ce=He();U!==t?(Me=m,b=fe(N),m=b):(Q=m,m=t)}else Q=m,m=t}else Q=m,m=t;return m}function H1(){var m,b,N;for(m=Q,b=[],N=He();N!==t;)b.push(N),N=He();if(b!==t?(N=Fp(),N!==t?(Me=m,b=Ae(N),m=b):(Q=m,m=t)):(Q=m,m=t),m===t){for(m=Q,b=[],N=He();N!==t;)b.push(N),N=He();b!==t?(N=GE(),N!==t?(Me=m,b=Ae(N),m=b):(Q=m,m=t)):(Q=m,m=t)}return m}function Fp(){var m,b,N,U,ce;for(m=Q,b=[],N=He();N!==t;)b.push(N),N=He();return b!==t?(qe.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Qe(ne)),N===t&&(N=null),N!==t?(U=gge(),U!==t?(ce=GE(),ce!==t?(Me=m,b=Y(N,U,ce),m=b):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t),m}function gge(){var m;return r.substr(Q,2)===pe?(m=pe,Q+=2):(m=t,I===0&&Qe(ie)),m===t&&(r.substr(Q,2)===de?(m=de,Q+=2):(m=t,I===0&&Qe(_e)),m===t&&(r.charCodeAt(Q)===62?(m=Pt,Q++):(m=t,I===0&&Qe(It)),m===t&&(r.substr(Q,3)===Or?(m=Or,Q+=3):(m=t,I===0&&Qe(ii)),m===t&&(r.substr(Q,2)===gi?(m=gi,Q+=2):(m=t,I===0&&Qe(hr)),m===t&&(r.charCodeAt(Q)===60?(m=fi,Q++):(m=t,I===0&&Qe(ni))))))),m}function GE(){var m,b,N;for(m=Q,b=[],N=He();N!==t;)b.push(N),N=He();return b!==t?(N=G1(),N!==t?(Me=m,b=Ae(N),m=b):(Q=m,m=t)):(Q=m,m=t),m}function G1(){var m,b,N;if(m=Q,b=[],N=Y1(),N!==t)for(;N!==t;)b.push(N),N=Y1();else b=t;return b!==t&&(Me=m,b=Os(b)),m=b,m}function Y1(){var m,b;return m=Q,b=fge(),b!==t&&(Me=m,b=pr(b)),m=b,m===t&&(m=Q,b=hge(),b!==t&&(Me=m,b=pr(b)),m=b,m===t&&(m=Q,b=pge(),b!==t&&(Me=m,b=pr(b)),m=b,m===t&&(m=Q,b=dge(),b!==t&&(Me=m,b=pr(b)),m=b))),m}function fge(){var m,b,N,U;return m=Q,r.substr(Q,2)===Ii?(b=Ii,Q+=2):(b=t,I===0&&Qe(es)),b!==t?(N=Ege(),N!==t?(r.charCodeAt(Q)===39?(U=ua,Q++):(U=t,I===0&&Qe(pA)),U!==t?(Me=m,b=ag(N),m=b):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t),m}function hge(){var m,b,N,U;return m=Q,r.charCodeAt(Q)===39?(b=ua,Q++):(b=t,I===0&&Qe(pA)),b!==t?(N=Cge(),N!==t?(r.charCodeAt(Q)===39?(U=ua,Q++):(U=t,I===0&&Qe(pA)),U!==t?(Me=m,b=ag(N),m=b):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t),m}function pge(){var m,b,N,U;if(m=Q,r.substr(Q,2)===ts?(b=ts,Q+=2):(b=t,I===0&&Qe(dA)),b!==t&&(Me=m,b=ga()),m=b,m===t)if(m=Q,r.charCodeAt(Q)===34?(b=yp,Q++):(b=t,I===0&&Qe(CA)),b!==t){for(N=[],U=j1();U!==t;)N.push(U),U=j1();N!==t?(r.charCodeAt(Q)===34?(U=yp,Q++):(U=t,I===0&&Qe(CA)),U!==t?(Me=m,b=mA(N),m=b):(Q=m,m=t)):(Q=m,m=t)}else Q=m,m=t;return m}function dge(){var m,b,N;if(m=Q,b=[],N=q1(),N!==t)for(;N!==t;)b.push(N),N=q1();else b=t;return b!==t&&(Me=m,b=mA(b)),m=b,m}function j1(){var m,b;return m=Q,b=V1(),b!==t&&(Me=m,b=wr(b)),m=b,m===t&&(m=Q,b=X1(),b!==t&&(Me=m,b=kl(b)),m=b,m===t&&(m=Q,b=oS(),b!==t&&(Me=m,b=Ag(b)),m=b,m===t&&(m=Q,b=mge(),b!==t&&(Me=m,b=Io(b)),m=b))),m}function q1(){var m,b;return m=Q,b=V1(),b!==t&&(Me=m,b=lg(b)),m=b,m===t&&(m=Q,b=X1(),b!==t&&(Me=m,b=wp(b)),m=b,m===t&&(m=Q,b=oS(),b!==t&&(Me=m,b=Bp(b)),m=b,m===t&&(m=Q,b=wge(),b!==t&&(Me=m,b=vr(b)),m=b,m===t&&(m=Q,b=yge(),b!==t&&(Me=m,b=Io(b)),m=b)))),m}function Cge(){var m,b,N;for(m=Q,b=[],se.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Qe(yo));N!==t;)b.push(N),se.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Qe(yo));return b!==t&&(Me=m,b=kn(b)),m=b,m}function mge(){var m,b,N;if(m=Q,b=[],N=J1(),N===t&&(cg.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Qe(Qt))),N!==t)for(;N!==t;)b.push(N),N=J1(),N===t&&(cg.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Qe(Qt)));else b=t;return b!==t&&(Me=m,b=kn(b)),m=b,m}function J1(){var m,b,N;return m=Q,r.substr(Q,2)===Rl?(b=Rl,Q+=2):(b=t,I===0&&Qe(Rn)),b!==t&&(Me=m,b=rs()),m=b,m===t&&(m=Q,r.charCodeAt(Q)===92?(b=is,Q++):(b=t,I===0&&Qe(gt)),b!==t?(wo.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Qe(At)),N!==t?(Me=m,b=an(N),m=b):(Q=m,m=t)):(Q=m,m=t)),m}function Ege(){var m,b,N;for(m=Q,b=[],N=W1(),N===t&&(se.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Qe(yo)));N!==t;)b.push(N),N=W1(),N===t&&(se.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Qe(yo)));return b!==t&&(Me=m,b=kn(b)),m=b,m}function W1(){var m,b,N;return m=Q,r.substr(Q,2)===S?(b=S,Q+=2):(b=t,I===0&&Qe(Tt)),b!==t&&(Me=m,b=ug()),m=b,m===t&&(m=Q,r.substr(Q,2)===Fl?(b=Fl,Q+=2):(b=t,I===0&&Qe(Qp)),b!==t&&(Me=m,b=bp()),m=b,m===t&&(m=Q,r.charCodeAt(Q)===92?(b=is,Q++):(b=t,I===0&&Qe(gt)),b!==t?(Sp.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Qe(vp)),N!==t?(Me=m,b=xp(),m=b):(Q=m,m=t)):(Q=m,m=t),m===t&&(m=Q,r.substr(Q,2)===G?(b=G,Q+=2):(b=t,I===0&&Qe(yt)),b!==t&&(Me=m,b=EA()),m=b,m===t&&(m=Q,r.substr(Q,2)===Ji?(b=Ji,Q+=2):(b=t,I===0&&Qe(Nl)),b!==t&&(Me=m,b=Xe()),m=b,m===t&&(m=Q,r.substr(Q,2)===fa?(b=fa,Q+=2):(b=t,I===0&&Qe(gg)),b!==t&&(Me=m,b=FE()),m=b,m===t&&(m=Q,r.substr(Q,2)===Pp?(b=Pp,Q+=2):(b=t,I===0&&Qe(NE)),b!==t&&(Me=m,b=ar()),m=b,m===t&&(m=Q,r.substr(Q,2)===Fn?(b=Fn,Q+=2):(b=t,I===0&&Qe(Ll)),b!==t&&(Me=m,b=Dp()),m=b,m===t&&(m=Q,r.charCodeAt(Q)===92?(b=is,Q++):(b=t,I===0&&Qe(gt)),b!==t?(Ms.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Qe(ha)),N!==t?(Me=m,b=an(N),m=b):(Q=m,m=t)):(Q=m,m=t),m===t&&(m=Ige()))))))))),m}function Ige(){var m,b,N,U,ce,Se,ht,Bt,Jr,hi,ss,aS;return m=Q,r.charCodeAt(Q)===92?(b=is,Q++):(b=t,I===0&&Qe(gt)),b!==t?(N=iS(),N!==t?(Me=m,b=An(N),m=b):(Q=m,m=t)):(Q=m,m=t),m===t&&(m=Q,r.substr(Q,2)===Te?(b=Te,Q+=2):(b=t,I===0&&Qe(fg)),b!==t?(N=Q,U=Q,ce=iS(),ce!==t?(Se=Tn(),Se!==t?(ce=[ce,Se],U=ce):(Q=U,U=t)):(Q=U,U=t),U===t&&(U=iS()),U!==t?N=r.substring(N,Q):N=U,N!==t?(Me=m,b=An(N),m=b):(Q=m,m=t)):(Q=m,m=t),m===t&&(m=Q,r.substr(Q,2)===Tl?(b=Tl,Q+=2):(b=t,I===0&&Qe(Ks)),b!==t?(N=Q,U=Q,ce=Tn(),ce!==t?(Se=Tn(),Se!==t?(ht=Tn(),ht!==t?(Bt=Tn(),Bt!==t?(ce=[ce,Se,ht,Bt],U=ce):(Q=U,U=t)):(Q=U,U=t)):(Q=U,U=t)):(Q=U,U=t),U!==t?N=r.substring(N,Q):N=U,N!==t?(Me=m,b=An(N),m=b):(Q=m,m=t)):(Q=m,m=t),m===t&&(m=Q,r.substr(Q,2)===Ol?(b=Ol,Q+=2):(b=t,I===0&&Qe(IA)),b!==t?(N=Q,U=Q,ce=Tn(),ce!==t?(Se=Tn(),Se!==t?(ht=Tn(),ht!==t?(Bt=Tn(),Bt!==t?(Jr=Tn(),Jr!==t?(hi=Tn(),hi!==t?(ss=Tn(),ss!==t?(aS=Tn(),aS!==t?(ce=[ce,Se,ht,Bt,Jr,hi,ss,aS],U=ce):(Q=U,U=t)):(Q=U,U=t)):(Q=U,U=t)):(Q=U,U=t)):(Q=U,U=t)):(Q=U,U=t)):(Q=U,U=t)):(Q=U,U=t),U!==t?N=r.substring(N,Q):N=U,N!==t?(Me=m,b=hg(N),m=b):(Q=m,m=t)):(Q=m,m=t)))),m}function iS(){var m;return pg.test(r.charAt(Q))?(m=r.charAt(Q),Q++):(m=t,I===0&&Qe(pa)),m}function Tn(){var m;return da.test(r.charAt(Q))?(m=r.charAt(Q),Q++):(m=t,I===0&&Qe(rt)),m}function yge(){var m,b,N,U,ce;if(m=Q,b=[],N=Q,r.charCodeAt(Q)===92?(U=is,Q++):(U=t,I===0&&Qe(gt)),U!==t?(r.length>Q?(ce=r.charAt(Q),Q++):(ce=t,I===0&&Qe(Bo)),ce!==t?(Me=N,U=an(ce),N=U):(Q=N,N=t)):(Q=N,N=t),N===t&&(N=Q,U=Q,I++,ce=_1(),I--,ce===t?U=void 0:(Q=U,U=t),U!==t?(r.length>Q?(ce=r.charAt(Q),Q++):(ce=t,I===0&&Qe(Bo)),ce!==t?(Me=N,U=an(ce),N=U):(Q=N,N=t)):(Q=N,N=t)),N!==t)for(;N!==t;)b.push(N),N=Q,r.charCodeAt(Q)===92?(U=is,Q++):(U=t,I===0&&Qe(gt)),U!==t?(r.length>Q?(ce=r.charAt(Q),Q++):(ce=t,I===0&&Qe(Bo)),ce!==t?(Me=N,U=an(ce),N=U):(Q=N,N=t)):(Q=N,N=t),N===t&&(N=Q,U=Q,I++,ce=_1(),I--,ce===t?U=void 0:(Q=U,U=t),U!==t?(r.length>Q?(ce=r.charAt(Q),Q++):(ce=t,I===0&&Qe(Bo)),ce!==t?(Me=N,U=an(ce),N=U):(Q=N,N=t)):(Q=N,N=t));else b=t;return b!==t&&(Me=m,b=kn(b)),m=b,m}function nS(){var m,b,N,U,ce,Se;if(m=Q,r.charCodeAt(Q)===45?(b=yA,Q++):(b=t,I===0&&Qe(Ml)),b===t&&(r.charCodeAt(Q)===43?(b=Us,Q++):(b=t,I===0&&Qe(Kl))),b===t&&(b=null),b!==t){if(N=[],qe.test(r.charAt(Q))?(U=r.charAt(Q),Q++):(U=t,I===0&&Qe(ne)),U!==t)for(;U!==t;)N.push(U),qe.test(r.charAt(Q))?(U=r.charAt(Q),Q++):(U=t,I===0&&Qe(ne));else N=t;if(N!==t)if(r.charCodeAt(Q)===46?(U=LE,Q++):(U=t,I===0&&Qe(kp)),U!==t){if(ce=[],qe.test(r.charAt(Q))?(Se=r.charAt(Q),Q++):(Se=t,I===0&&Qe(ne)),Se!==t)for(;Se!==t;)ce.push(Se),qe.test(r.charAt(Q))?(Se=r.charAt(Q),Q++):(Se=t,I===0&&Qe(ne));else ce=t;ce!==t?(Me=m,b=dg(b,N,ce),m=b):(Q=m,m=t)}else Q=m,m=t;else Q=m,m=t}else Q=m,m=t;if(m===t){if(m=Q,r.charCodeAt(Q)===45?(b=yA,Q++):(b=t,I===0&&Qe(Ml)),b===t&&(r.charCodeAt(Q)===43?(b=Us,Q++):(b=t,I===0&&Qe(Kl))),b===t&&(b=null),b!==t){if(N=[],qe.test(r.charAt(Q))?(U=r.charAt(Q),Q++):(U=t,I===0&&Qe(ne)),U!==t)for(;U!==t;)N.push(U),qe.test(r.charAt(Q))?(U=r.charAt(Q),Q++):(U=t,I===0&&Qe(ne));else N=t;N!==t?(Me=m,b=Rp(b,N),m=b):(Q=m,m=t)}else Q=m,m=t;if(m===t&&(m=Q,b=oS(),b!==t&&(Me=m,b=TE(b)),m=b,m===t&&(m=Q,b=Hl(),b!==t&&(Me=m,b=Ul(b)),m=b,m===t)))if(m=Q,r.charCodeAt(Q)===40?(b=ge,Q++):(b=t,I===0&&Qe(re)),b!==t){for(N=[],U=He();U!==t;)N.push(U),U=He();if(N!==t)if(U=z1(),U!==t){for(ce=[],Se=He();Se!==t;)ce.push(Se),Se=He();ce!==t?(r.charCodeAt(Q)===41?(Se=O,Q++):(Se=t,I===0&&Qe(F)),Se!==t?(Me=m,b=OE(U),m=b):(Q=m,m=t)):(Q=m,m=t)}else Q=m,m=t;else Q=m,m=t}else Q=m,m=t}return m}function sS(){var m,b,N,U,ce,Se,ht,Bt;if(m=Q,b=nS(),b!==t){for(N=[],U=Q,ce=[],Se=He();Se!==t;)ce.push(Se),Se=He();if(ce!==t)if(r.charCodeAt(Q)===42?(Se=Cg,Q++):(Se=t,I===0&&Qe(wA)),Se===t&&(r.charCodeAt(Q)===47?(Se=Rr,Q++):(Se=t,I===0&&Qe(ME))),Se!==t){for(ht=[],Bt=He();Bt!==t;)ht.push(Bt),Bt=He();ht!==t?(Bt=nS(),Bt!==t?(Me=U,ce=Hs(b,Se,Bt),U=ce):(Q=U,U=t)):(Q=U,U=t)}else Q=U,U=t;else Q=U,U=t;for(;U!==t;){for(N.push(U),U=Q,ce=[],Se=He();Se!==t;)ce.push(Se),Se=He();if(ce!==t)if(r.charCodeAt(Q)===42?(Se=Cg,Q++):(Se=t,I===0&&Qe(wA)),Se===t&&(r.charCodeAt(Q)===47?(Se=Rr,Q++):(Se=t,I===0&&Qe(ME))),Se!==t){for(ht=[],Bt=He();Bt!==t;)ht.push(Bt),Bt=He();ht!==t?(Bt=nS(),Bt!==t?(Me=U,ce=Hs(b,Se,Bt),U=ce):(Q=U,U=t)):(Q=U,U=t)}else Q=U,U=t;else Q=U,U=t}N!==t?(Me=m,b=Gs(b,N),m=b):(Q=m,m=t)}else Q=m,m=t;return m}function z1(){var m,b,N,U,ce,Se,ht,Bt;if(m=Q,b=sS(),b!==t){for(N=[],U=Q,ce=[],Se=He();Se!==t;)ce.push(Se),Se=He();if(ce!==t)if(r.charCodeAt(Q)===43?(Se=Us,Q++):(Se=t,I===0&&Qe(Kl)),Se===t&&(r.charCodeAt(Q)===45?(Se=yA,Q++):(Se=t,I===0&&Qe(Ml))),Se!==t){for(ht=[],Bt=He();Bt!==t;)ht.push(Bt),Bt=He();ht!==t?(Bt=sS(),Bt!==t?(Me=U,ce=mg(b,Se,Bt),U=ce):(Q=U,U=t)):(Q=U,U=t)}else Q=U,U=t;else Q=U,U=t;for(;U!==t;){for(N.push(U),U=Q,ce=[],Se=He();Se!==t;)ce.push(Se),Se=He();if(ce!==t)if(r.charCodeAt(Q)===43?(Se=Us,Q++):(Se=t,I===0&&Qe(Kl)),Se===t&&(r.charCodeAt(Q)===45?(Se=yA,Q++):(Se=t,I===0&&Qe(Ml))),Se!==t){for(ht=[],Bt=He();Bt!==t;)ht.push(Bt),Bt=He();ht!==t?(Bt=sS(),Bt!==t?(Me=U,ce=mg(b,Se,Bt),U=ce):(Q=U,U=t)):(Q=U,U=t)}else Q=U,U=t;else Q=U,U=t}N!==t?(Me=m,b=Gs(b,N),m=b):(Q=m,m=t)}else Q=m,m=t;return m}function V1(){var m,b,N,U,ce,Se;if(m=Q,r.substr(Q,3)===BA?(b=BA,Q+=3):(b=t,I===0&&Qe(R)),b!==t){for(N=[],U=He();U!==t;)N.push(U),U=He();if(N!==t)if(U=z1(),U!==t){for(ce=[],Se=He();Se!==t;)ce.push(Se),Se=He();ce!==t?(r.substr(Q,2)===q?(Se=q,Q+=2):(Se=t,I===0&&Qe(Ce)),Se!==t?(Me=m,b=Ke(U),m=b):(Q=m,m=t)):(Q=m,m=t)}else Q=m,m=t;else Q=m,m=t}else Q=m,m=t;return m}function X1(){var m,b,N,U;return m=Q,r.substr(Q,2)===Re?(b=Re,Q+=2):(b=t,I===0&&Qe(ze)),b!==t?(N=Mr(),N!==t?(r.charCodeAt(Q)===41?(U=O,Q++):(U=t,I===0&&Qe(F)),U!==t?(Me=m,b=dt(N),m=b):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t),m}function oS(){var m,b,N,U,ce,Se;return m=Q,r.substr(Q,2)===Ft?(b=Ft,Q+=2):(b=t,I===0&&Qe(Nn)),b!==t?(N=Hl(),N!==t?(r.substr(Q,2)===qb?(U=qb,Q+=2):(U=t,I===0&&Qe(S1)),U!==t?(ce=U1(),ce!==t?(r.charCodeAt(Q)===125?(Se=Fe,Q++):(Se=t,I===0&&Qe(Ne)),Se!==t?(Me=m,b=v1(N,ce),m=b):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t),m===t&&(m=Q,r.substr(Q,2)===Ft?(b=Ft,Q+=2):(b=t,I===0&&Qe(Nn)),b!==t?(N=Hl(),N!==t?(r.substr(Q,3)===Jb?(U=Jb,Q+=3):(U=t,I===0&&Qe(x1)),U!==t?(Me=m,b=P1(N),m=b):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t),m===t&&(m=Q,r.substr(Q,2)===Ft?(b=Ft,Q+=2):(b=t,I===0&&Qe(Nn)),b!==t?(N=Hl(),N!==t?(r.substr(Q,2)===Wb?(U=Wb,Q+=2):(U=t,I===0&&Qe(D1)),U!==t?(ce=U1(),ce!==t?(r.charCodeAt(Q)===125?(Se=Fe,Q++):(Se=t,I===0&&Qe(Ne)),Se!==t?(Me=m,b=k1(N,ce),m=b):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t),m===t&&(m=Q,r.substr(Q,2)===Ft?(b=Ft,Q+=2):(b=t,I===0&&Qe(Nn)),b!==t?(N=Hl(),N!==t?(r.substr(Q,3)===zb?(U=zb,Q+=3):(U=t,I===0&&Qe(R1)),U!==t?(Me=m,b=F1(N),m=b):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t),m===t&&(m=Q,r.substr(Q,2)===Ft?(b=Ft,Q+=2):(b=t,I===0&&Qe(Nn)),b!==t?(N=Hl(),N!==t?(r.charCodeAt(Q)===125?(U=Fe,Q++):(U=t,I===0&&Qe(Ne)),U!==t?(Me=m,b=Vb(N),m=b):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t),m===t&&(m=Q,r.charCodeAt(Q)===36?(b=N1,Q++):(b=t,I===0&&Qe(L1)),b!==t?(N=Hl(),N!==t?(Me=m,b=Vb(N),m=b):(Q=m,m=t)):(Q=m,m=t)))))),m}function wge(){var m,b,N;return m=Q,b=Bge(),b!==t?(Me=Q,N=T1(b),N?N=void 0:N=t,N!==t?(Me=m,b=O1(b),m=b):(Q=m,m=t)):(Q=m,m=t),m}function Bge(){var m,b,N,U,ce;if(m=Q,b=[],N=Q,U=Q,I++,ce=$1(),I--,ce===t?U=void 0:(Q=U,U=t),U!==t?(r.length>Q?(ce=r.charAt(Q),Q++):(ce=t,I===0&&Qe(Bo)),ce!==t?(Me=N,U=an(ce),N=U):(Q=N,N=t)):(Q=N,N=t),N!==t)for(;N!==t;)b.push(N),N=Q,U=Q,I++,ce=$1(),I--,ce===t?U=void 0:(Q=U,U=t),U!==t?(r.length>Q?(ce=r.charAt(Q),Q++):(ce=t,I===0&&Qe(Bo)),ce!==t?(Me=N,U=an(ce),N=U):(Q=N,N=t)):(Q=N,N=t);else b=t;return b!==t&&(Me=m,b=kn(b)),m=b,m}function Z1(){var m,b,N;if(m=Q,b=[],Xb.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Qe(Zb)),N!==t)for(;N!==t;)b.push(N),Xb.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Qe(Zb));else b=t;return b!==t&&(Me=m,b=_b()),m=b,m}function Hl(){var m,b,N;if(m=Q,b=[],$b.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Qe(eS)),N!==t)for(;N!==t;)b.push(N),$b.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Qe(eS));else b=t;return b!==t&&(Me=m,b=_b()),m=b,m}function _1(){var m;return M1.test(r.charAt(Q))?(m=r.charAt(Q),Q++):(m=t,I===0&&Qe(Eg)),m}function $1(){var m;return tS.test(r.charAt(Q))?(m=r.charAt(Q),Q++):(m=t,I===0&&Qe(rS)),m}function He(){var m,b;if(m=[],KE.test(r.charAt(Q))?(b=r.charAt(Q),Q++):(b=t,I===0&&Qe(UE)),b!==t)for(;b!==t;)m.push(b),KE.test(r.charAt(Q))?(b=r.charAt(Q),Q++):(b=t,I===0&&Qe(UE));else m=t;return m}if(k=n(),k!==t&&Q===r.length)return k;throw k!==t&&Q{"use strict";function Qfe(r,e){function t(){this.constructor=r}t.prototype=e.prototype,r.prototype=new t}function Vl(r,e,t,i){this.message=r,this.expected=e,this.found=t,this.location=i,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Vl)}Qfe(Vl,Error);Vl.buildMessage=function(r,e){var t={literal:function(c){return'"'+n(c.text)+'"'},class:function(c){var u="",g;for(g=0;g0){for(g=1,f=1;gH&&(H=v,j=[]),j.push(ne))}function Ne(ne,Y){return new Vl(ne,null,null,Y)}function oe(ne,Y,pe){return new Vl(Vl.buildMessage(ne,Y),ne,Y,pe)}function le(){var ne,Y,pe,ie;return ne=v,Y=we(),Y!==t?(r.charCodeAt(v)===47?(pe=s,v++):(pe=t,$===0&&Fe(o)),pe!==t?(ie=we(),ie!==t?(D=ne,Y=a(Y,ie),ne=Y):(v=ne,ne=t)):(v=ne,ne=t)):(v=ne,ne=t),ne===t&&(ne=v,Y=we(),Y!==t&&(D=ne,Y=l(Y)),ne=Y),ne}function we(){var ne,Y,pe,ie;return ne=v,Y=fe(),Y!==t?(r.charCodeAt(v)===64?(pe=c,v++):(pe=t,$===0&&Fe(u)),pe!==t?(ie=qe(),ie!==t?(D=ne,Y=g(Y,ie),ne=Y):(v=ne,ne=t)):(v=ne,ne=t)):(v=ne,ne=t),ne===t&&(ne=v,Y=fe(),Y!==t&&(D=ne,Y=f(Y)),ne=Y),ne}function fe(){var ne,Y,pe,ie,de;return ne=v,r.charCodeAt(v)===64?(Y=c,v++):(Y=t,$===0&&Fe(u)),Y!==t?(pe=Ae(),pe!==t?(r.charCodeAt(v)===47?(ie=s,v++):(ie=t,$===0&&Fe(o)),ie!==t?(de=Ae(),de!==t?(D=ne,Y=h(),ne=Y):(v=ne,ne=t)):(v=ne,ne=t)):(v=ne,ne=t)):(v=ne,ne=t),ne===t&&(ne=v,Y=Ae(),Y!==t&&(D=ne,Y=h()),ne=Y),ne}function Ae(){var ne,Y,pe;if(ne=v,Y=[],p.test(r.charAt(v))?(pe=r.charAt(v),v++):(pe=t,$===0&&Fe(C)),pe!==t)for(;pe!==t;)Y.push(pe),p.test(r.charAt(v))?(pe=r.charAt(v),v++):(pe=t,$===0&&Fe(C));else Y=t;return Y!==t&&(D=ne,Y=h()),ne=Y,ne}function qe(){var ne,Y,pe;if(ne=v,Y=[],y.test(r.charAt(v))?(pe=r.charAt(v),v++):(pe=t,$===0&&Fe(B)),pe!==t)for(;pe!==t;)Y.push(pe),y.test(r.charAt(v))?(pe=r.charAt(v),v++):(pe=t,$===0&&Fe(B));else Y=t;return Y!==t&&(D=ne,Y=h()),ne=Y,ne}if(V=n(),V!==t&&v===r.length)return V;throw V!==t&&v{"use strict";function fU(r){return typeof r>"u"||r===null}function Sfe(r){return typeof r=="object"&&r!==null}function vfe(r){return Array.isArray(r)?r:fU(r)?[]:[r]}function xfe(r,e){var t,i,n,s;if(e)for(s=Object.keys(e),t=0,i=s.length;t{"use strict";function Wp(r,e){Error.call(this),this.name="YAMLException",this.reason=r,this.mark=e,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Wp.prototype=Object.create(Error.prototype);Wp.prototype.constructor=Wp;Wp.prototype.toString=function(e){var t=this.name+": ";return t+=this.reason||"(unknown reason)",!e&&this.mark&&(t+=" "+this.mark.toString()),t};hU.exports=Wp});var CU=w((IZe,dU)=>{"use strict";var pU=Zl();function HS(r,e,t,i,n){this.name=r,this.buffer=e,this.position=t,this.line=i,this.column=n}HS.prototype.getSnippet=function(e,t){var i,n,s,o,a;if(!this.buffer)return null;for(e=e||4,t=t||75,i="",n=this.position;n>0&&`\0\r +\x85\u2028\u2029`.indexOf(this.buffer.charAt(n-1))===-1;)if(n-=1,this.position-n>t/2-1){i=" ... ",n+=5;break}for(s="",o=this.position;ot/2-1){s=" ... ",o-=5;break}return a=this.buffer.slice(n,o),pU.repeat(" ",e)+i+a+s+` +`+pU.repeat(" ",e+this.position-n+i.length)+"^"};HS.prototype.toString=function(e){var t,i="";return this.name&&(i+='in "'+this.name+'" '),i+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet(),t&&(i+=`: +`+t)),i};dU.exports=HS});var si=w((yZe,EU)=>{"use strict";var mU=kg(),kfe=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],Rfe=["scalar","sequence","mapping"];function Ffe(r){var e={};return r!==null&&Object.keys(r).forEach(function(t){r[t].forEach(function(i){e[String(i)]=t})}),e}function Nfe(r,e){if(e=e||{},Object.keys(e).forEach(function(t){if(kfe.indexOf(t)===-1)throw new mU('Unknown option "'+t+'" is met in definition of "'+r+'" YAML type.')}),this.tag=r,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.defaultStyle=e.defaultStyle||null,this.styleAliases=Ffe(e.styleAliases||null),Rfe.indexOf(this.kind)===-1)throw new mU('Unknown kind "'+this.kind+'" is specified for "'+r+'" YAML type.')}EU.exports=Nfe});var _l=w((wZe,yU)=>{"use strict";var IU=Zl(),gI=kg(),Lfe=si();function GS(r,e,t){var i=[];return r.include.forEach(function(n){t=GS(n,e,t)}),r[e].forEach(function(n){t.forEach(function(s,o){s.tag===n.tag&&s.kind===n.kind&&i.push(o)}),t.push(n)}),t.filter(function(n,s){return i.indexOf(s)===-1})}function Tfe(){var r={scalar:{},sequence:{},mapping:{},fallback:{}},e,t;function i(n){r[n.kind][n.tag]=r.fallback[n.tag]=n}for(e=0,t=arguments.length;e{"use strict";var Ofe=si();wU.exports=new Ofe("tag:yaml.org,2002:str",{kind:"scalar",construct:function(r){return r!==null?r:""}})});var bU=w((QZe,QU)=>{"use strict";var Mfe=si();QU.exports=new Mfe("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(r){return r!==null?r:[]}})});var vU=w((bZe,SU)=>{"use strict";var Kfe=si();SU.exports=new Kfe("tag:yaml.org,2002:map",{kind:"mapping",construct:function(r){return r!==null?r:{}}})});var fI=w((SZe,xU)=>{"use strict";var Ufe=_l();xU.exports=new Ufe({explicit:[BU(),bU(),vU()]})});var DU=w((vZe,PU)=>{"use strict";var Hfe=si();function Gfe(r){if(r===null)return!0;var e=r.length;return e===1&&r==="~"||e===4&&(r==="null"||r==="Null"||r==="NULL")}function Yfe(){return null}function jfe(r){return r===null}PU.exports=new Hfe("tag:yaml.org,2002:null",{kind:"scalar",resolve:Gfe,construct:Yfe,predicate:jfe,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var RU=w((xZe,kU)=>{"use strict";var qfe=si();function Jfe(r){if(r===null)return!1;var e=r.length;return e===4&&(r==="true"||r==="True"||r==="TRUE")||e===5&&(r==="false"||r==="False"||r==="FALSE")}function Wfe(r){return r==="true"||r==="True"||r==="TRUE"}function zfe(r){return Object.prototype.toString.call(r)==="[object Boolean]"}kU.exports=new qfe("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Jfe,construct:Wfe,predicate:zfe,represent:{lowercase:function(r){return r?"true":"false"},uppercase:function(r){return r?"TRUE":"FALSE"},camelcase:function(r){return r?"True":"False"}},defaultStyle:"lowercase"})});var NU=w((PZe,FU)=>{"use strict";var Vfe=Zl(),Xfe=si();function Zfe(r){return 48<=r&&r<=57||65<=r&&r<=70||97<=r&&r<=102}function _fe(r){return 48<=r&&r<=55}function $fe(r){return 48<=r&&r<=57}function ehe(r){if(r===null)return!1;var e=r.length,t=0,i=!1,n;if(!e)return!1;if(n=r[t],(n==="-"||n==="+")&&(n=r[++t]),n==="0"){if(t+1===e)return!0;if(n=r[++t],n==="b"){for(t++;t=0?"0b"+r.toString(2):"-0b"+r.toString(2).slice(1)},octal:function(r){return r>=0?"0"+r.toString(8):"-0"+r.toString(8).slice(1)},decimal:function(r){return r.toString(10)},hexadecimal:function(r){return r>=0?"0x"+r.toString(16).toUpperCase():"-0x"+r.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})});var OU=w((DZe,TU)=>{"use strict";var LU=Zl(),ihe=si(),nhe=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function she(r){return!(r===null||!nhe.test(r)||r[r.length-1]==="_")}function ohe(r){var e,t,i,n;return e=r.replace(/_/g,"").toLowerCase(),t=e[0]==="-"?-1:1,n=[],"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?t===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:e.indexOf(":")>=0?(e.split(":").forEach(function(s){n.unshift(parseFloat(s,10))}),e=0,i=1,n.forEach(function(s){e+=s*i,i*=60}),t*e):t*parseFloat(e,10)}var ahe=/^[-+]?[0-9]+e/;function Ahe(r,e){var t;if(isNaN(r))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===r)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===r)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(LU.isNegativeZero(r))return"-0.0";return t=r.toString(10),ahe.test(t)?t.replace("e",".e"):t}function lhe(r){return Object.prototype.toString.call(r)==="[object Number]"&&(r%1!==0||LU.isNegativeZero(r))}TU.exports=new ihe("tag:yaml.org,2002:float",{kind:"scalar",resolve:she,construct:ohe,predicate:lhe,represent:Ahe,defaultStyle:"lowercase"})});var YS=w((kZe,MU)=>{"use strict";var che=_l();MU.exports=new che({include:[fI()],implicit:[DU(),RU(),NU(),OU()]})});var jS=w((RZe,KU)=>{"use strict";var uhe=_l();KU.exports=new uhe({include:[YS()]})});var YU=w((FZe,GU)=>{"use strict";var ghe=si(),UU=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),HU=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function fhe(r){return r===null?!1:UU.exec(r)!==null||HU.exec(r)!==null}function hhe(r){var e,t,i,n,s,o,a,l=0,c=null,u,g,f;if(e=UU.exec(r),e===null&&(e=HU.exec(r)),e===null)throw new Error("Date resolve error");if(t=+e[1],i=+e[2]-1,n=+e[3],!e[4])return new Date(Date.UTC(t,i,n));if(s=+e[4],o=+e[5],a=+e[6],e[7]){for(l=e[7].slice(0,3);l.length<3;)l+="0";l=+l}return e[9]&&(u=+e[10],g=+(e[11]||0),c=(u*60+g)*6e4,e[9]==="-"&&(c=-c)),f=new Date(Date.UTC(t,i,n,s,o,a,l)),c&&f.setTime(f.getTime()-c),f}function phe(r){return r.toISOString()}GU.exports=new ghe("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:fhe,construct:hhe,instanceOf:Date,represent:phe})});var qU=w((NZe,jU)=>{"use strict";var dhe=si();function Che(r){return r==="<<"||r===null}jU.exports=new dhe("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Che})});var zU=w((LZe,WU)=>{"use strict";var $l;try{JU=J,$l=JU("buffer").Buffer}catch{}var JU,mhe=si(),qS=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= +\r`;function Ehe(r){if(r===null)return!1;var e,t,i=0,n=r.length,s=qS;for(t=0;t64)){if(e<0)return!1;i+=6}return i%8===0}function Ihe(r){var e,t,i=r.replace(/[\r\n=]/g,""),n=i.length,s=qS,o=0,a=[];for(e=0;e>16&255),a.push(o>>8&255),a.push(o&255)),o=o<<6|s.indexOf(i.charAt(e));return t=n%4*6,t===0?(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)):t===18?(a.push(o>>10&255),a.push(o>>2&255)):t===12&&a.push(o>>4&255),$l?$l.from?$l.from(a):new $l(a):a}function yhe(r){var e="",t=0,i,n,s=r.length,o=qS;for(i=0;i>18&63],e+=o[t>>12&63],e+=o[t>>6&63],e+=o[t&63]),t=(t<<8)+r[i];return n=s%3,n===0?(e+=o[t>>18&63],e+=o[t>>12&63],e+=o[t>>6&63],e+=o[t&63]):n===2?(e+=o[t>>10&63],e+=o[t>>4&63],e+=o[t<<2&63],e+=o[64]):n===1&&(e+=o[t>>2&63],e+=o[t<<4&63],e+=o[64],e+=o[64]),e}function whe(r){return $l&&$l.isBuffer(r)}WU.exports=new mhe("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Ehe,construct:Ihe,predicate:whe,represent:yhe})});var XU=w((TZe,VU)=>{"use strict";var Bhe=si(),Qhe=Object.prototype.hasOwnProperty,bhe=Object.prototype.toString;function She(r){if(r===null)return!0;var e=[],t,i,n,s,o,a=r;for(t=0,i=a.length;t{"use strict";var xhe=si(),Phe=Object.prototype.toString;function Dhe(r){if(r===null)return!0;var e,t,i,n,s,o=r;for(s=new Array(o.length),e=0,t=o.length;e{"use strict";var Rhe=si(),Fhe=Object.prototype.hasOwnProperty;function Nhe(r){if(r===null)return!0;var e,t=r;for(e in t)if(Fhe.call(t,e)&&t[e]!==null)return!1;return!0}function Lhe(r){return r!==null?r:{}}$U.exports=new Rhe("tag:yaml.org,2002:set",{kind:"mapping",resolve:Nhe,construct:Lhe})});var Fg=w((KZe,t2)=>{"use strict";var The=_l();t2.exports=new The({include:[jS()],implicit:[YU(),qU()],explicit:[zU(),XU(),_U(),e2()]})});var i2=w((UZe,r2)=>{"use strict";var Ohe=si();function Mhe(){return!0}function Khe(){}function Uhe(){return""}function Hhe(r){return typeof r>"u"}r2.exports=new Ohe("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:Mhe,construct:Khe,predicate:Hhe,represent:Uhe})});var s2=w((HZe,n2)=>{"use strict";var Ghe=si();function Yhe(r){if(r===null||r.length===0)return!1;var e=r,t=/\/([gim]*)$/.exec(r),i="";return!(e[0]==="/"&&(t&&(i=t[1]),i.length>3||e[e.length-i.length-1]!=="/"))}function jhe(r){var e=r,t=/\/([gim]*)$/.exec(r),i="";return e[0]==="/"&&(t&&(i=t[1]),e=e.slice(1,e.length-i.length-1)),new RegExp(e,i)}function qhe(r){var e="/"+r.source+"/";return r.global&&(e+="g"),r.multiline&&(e+="m"),r.ignoreCase&&(e+="i"),e}function Jhe(r){return Object.prototype.toString.call(r)==="[object RegExp]"}n2.exports=new Ghe("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:Yhe,construct:jhe,predicate:Jhe,represent:qhe})});var A2=w((GZe,a2)=>{"use strict";var hI;try{o2=J,hI=o2("esprima")}catch{typeof window<"u"&&(hI=window.esprima)}var o2,Whe=si();function zhe(r){if(r===null)return!1;try{var e="("+r+")",t=hI.parse(e,{range:!0});return!(t.type!=="Program"||t.body.length!==1||t.body[0].type!=="ExpressionStatement"||t.body[0].expression.type!=="ArrowFunctionExpression"&&t.body[0].expression.type!=="FunctionExpression")}catch{return!1}}function Vhe(r){var e="("+r+")",t=hI.parse(e,{range:!0}),i=[],n;if(t.type!=="Program"||t.body.length!==1||t.body[0].type!=="ExpressionStatement"||t.body[0].expression.type!=="ArrowFunctionExpression"&&t.body[0].expression.type!=="FunctionExpression")throw new Error("Failed to resolve function");return t.body[0].expression.params.forEach(function(s){i.push(s.name)}),n=t.body[0].expression.body.range,t.body[0].expression.body.type==="BlockStatement"?new Function(i,e.slice(n[0]+1,n[1]-1)):new Function(i,"return "+e.slice(n[0],n[1]))}function Xhe(r){return r.toString()}function Zhe(r){return Object.prototype.toString.call(r)==="[object Function]"}a2.exports=new Whe("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:zhe,construct:Vhe,predicate:Zhe,represent:Xhe})});var zp=w((YZe,c2)=>{"use strict";var l2=_l();c2.exports=l2.DEFAULT=new l2({include:[Fg()],explicit:[i2(),s2(),A2()]})});var P2=w((jZe,Vp)=>{"use strict";var ya=Zl(),C2=kg(),_he=CU(),m2=Fg(),$he=zp(),DA=Object.prototype.hasOwnProperty,pI=1,E2=2,I2=3,dI=4,JS=1,epe=2,u2=3,tpe=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,rpe=/[\x85\u2028\u2029]/,ipe=/[,\[\]\{\}]/,y2=/^(?:!|!!|![a-z\-]+!)$/i,w2=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function g2(r){return Object.prototype.toString.call(r)}function vo(r){return r===10||r===13}function tc(r){return r===9||r===32}function un(r){return r===9||r===32||r===10||r===13}function Ng(r){return r===44||r===91||r===93||r===123||r===125}function npe(r){var e;return 48<=r&&r<=57?r-48:(e=r|32,97<=e&&e<=102?e-97+10:-1)}function spe(r){return r===120?2:r===117?4:r===85?8:0}function ope(r){return 48<=r&&r<=57?r-48:-1}function f2(r){return r===48?"\0":r===97?"\x07":r===98?"\b":r===116||r===9?" ":r===110?` +`:r===118?"\v":r===102?"\f":r===114?"\r":r===101?"\x1B":r===32?" ":r===34?'"':r===47?"/":r===92?"\\":r===78?"\x85":r===95?"\xA0":r===76?"\u2028":r===80?"\u2029":""}function ape(r){return r<=65535?String.fromCharCode(r):String.fromCharCode((r-65536>>10)+55296,(r-65536&1023)+56320)}var B2=new Array(256),Q2=new Array(256);for(ec=0;ec<256;ec++)B2[ec]=f2(ec)?1:0,Q2[ec]=f2(ec);var ec;function Ape(r,e){this.input=r,this.filename=e.filename||null,this.schema=e.schema||$he,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=r.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function b2(r,e){return new C2(e,new _he(r.filename,r.input,r.position,r.line,r.position-r.lineStart))}function ft(r,e){throw b2(r,e)}function CI(r,e){r.onWarning&&r.onWarning.call(null,b2(r,e))}var h2={YAML:function(e,t,i){var n,s,o;e.version!==null&&ft(e,"duplication of %YAML directive"),i.length!==1&&ft(e,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&&ft(e,"ill-formed argument of the YAML directive"),s=parseInt(n[1],10),o=parseInt(n[2],10),s!==1&&ft(e,"unacceptable YAML version of the document"),e.version=i[0],e.checkLineBreaks=o<2,o!==1&&o!==2&&CI(e,"unsupported YAML version of the document")},TAG:function(e,t,i){var n,s;i.length!==2&&ft(e,"TAG directive accepts exactly two arguments"),n=i[0],s=i[1],y2.test(n)||ft(e,"ill-formed tag handle (first argument) of the TAG directive"),DA.call(e.tagMap,n)&&ft(e,'there is a previously declared suffix for "'+n+'" tag handle'),w2.test(s)||ft(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[n]=s}};function PA(r,e,t,i){var n,s,o,a;if(e1&&(r.result+=ya.repeat(` +`,e-1))}function lpe(r,e,t){var i,n,s,o,a,l,c,u,g=r.kind,f=r.result,h;if(h=r.input.charCodeAt(r.position),un(h)||Ng(h)||h===35||h===38||h===42||h===33||h===124||h===62||h===39||h===34||h===37||h===64||h===96||(h===63||h===45)&&(n=r.input.charCodeAt(r.position+1),un(n)||t&&Ng(n)))return!1;for(r.kind="scalar",r.result="",s=o=r.position,a=!1;h!==0;){if(h===58){if(n=r.input.charCodeAt(r.position+1),un(n)||t&&Ng(n))break}else if(h===35){if(i=r.input.charCodeAt(r.position-1),un(i))break}else{if(r.position===r.lineStart&&mI(r)||t&&Ng(h))break;if(vo(h))if(l=r.line,c=r.lineStart,u=r.lineIndent,zr(r,!1,-1),r.lineIndent>=e){a=!0,h=r.input.charCodeAt(r.position);continue}else{r.position=o,r.line=l,r.lineStart=c,r.lineIndent=u;break}}a&&(PA(r,s,o,!1),zS(r,r.line-l),s=o=r.position,a=!1),tc(h)||(o=r.position+1),h=r.input.charCodeAt(++r.position)}return PA(r,s,o,!1),r.result?!0:(r.kind=g,r.result=f,!1)}function cpe(r,e){var t,i,n;if(t=r.input.charCodeAt(r.position),t!==39)return!1;for(r.kind="scalar",r.result="",r.position++,i=n=r.position;(t=r.input.charCodeAt(r.position))!==0;)if(t===39)if(PA(r,i,r.position,!0),t=r.input.charCodeAt(++r.position),t===39)i=r.position,r.position++,n=r.position;else return!0;else vo(t)?(PA(r,i,n,!0),zS(r,zr(r,!1,e)),i=n=r.position):r.position===r.lineStart&&mI(r)?ft(r,"unexpected end of the document within a single quoted scalar"):(r.position++,n=r.position);ft(r,"unexpected end of the stream within a single quoted scalar")}function upe(r,e){var t,i,n,s,o,a;if(a=r.input.charCodeAt(r.position),a!==34)return!1;for(r.kind="scalar",r.result="",r.position++,t=i=r.position;(a=r.input.charCodeAt(r.position))!==0;){if(a===34)return PA(r,t,r.position,!0),r.position++,!0;if(a===92){if(PA(r,t,r.position,!0),a=r.input.charCodeAt(++r.position),vo(a))zr(r,!1,e);else if(a<256&&B2[a])r.result+=Q2[a],r.position++;else if((o=spe(a))>0){for(n=o,s=0;n>0;n--)a=r.input.charCodeAt(++r.position),(o=npe(a))>=0?s=(s<<4)+o:ft(r,"expected hexadecimal character");r.result+=ape(s),r.position++}else ft(r,"unknown escape sequence");t=i=r.position}else vo(a)?(PA(r,t,i,!0),zS(r,zr(r,!1,e)),t=i=r.position):r.position===r.lineStart&&mI(r)?ft(r,"unexpected end of the document within a double quoted scalar"):(r.position++,i=r.position)}ft(r,"unexpected end of the stream within a double quoted scalar")}function gpe(r,e){var t=!0,i,n=r.tag,s,o=r.anchor,a,l,c,u,g,f={},h,p,C,y;if(y=r.input.charCodeAt(r.position),y===91)l=93,g=!1,s=[];else if(y===123)l=125,g=!0,s={};else return!1;for(r.anchor!==null&&(r.anchorMap[r.anchor]=s),y=r.input.charCodeAt(++r.position);y!==0;){if(zr(r,!0,e),y=r.input.charCodeAt(r.position),y===l)return r.position++,r.tag=n,r.anchor=o,r.kind=g?"mapping":"sequence",r.result=s,!0;t||ft(r,"missed comma between flow collection entries"),p=h=C=null,c=u=!1,y===63&&(a=r.input.charCodeAt(r.position+1),un(a)&&(c=u=!0,r.position++,zr(r,!0,e))),i=r.line,Tg(r,e,pI,!1,!0),p=r.tag,h=r.result,zr(r,!0,e),y=r.input.charCodeAt(r.position),(u||r.line===i)&&y===58&&(c=!0,y=r.input.charCodeAt(++r.position),zr(r,!0,e),Tg(r,e,pI,!1,!0),C=r.result),g?Lg(r,s,f,p,h,C):c?s.push(Lg(r,null,f,p,h,C)):s.push(h),zr(r,!0,e),y=r.input.charCodeAt(r.position),y===44?(t=!0,y=r.input.charCodeAt(++r.position)):t=!1}ft(r,"unexpected end of the stream within a flow collection")}function fpe(r,e){var t,i,n=JS,s=!1,o=!1,a=e,l=0,c=!1,u,g;if(g=r.input.charCodeAt(r.position),g===124)i=!1;else if(g===62)i=!0;else return!1;for(r.kind="scalar",r.result="";g!==0;)if(g=r.input.charCodeAt(++r.position),g===43||g===45)JS===n?n=g===43?u2:epe:ft(r,"repeat of a chomping mode identifier");else if((u=ope(g))>=0)u===0?ft(r,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?ft(r,"repeat of an indentation width identifier"):(a=e+u-1,o=!0);else break;if(tc(g)){do g=r.input.charCodeAt(++r.position);while(tc(g));if(g===35)do g=r.input.charCodeAt(++r.position);while(!vo(g)&&g!==0)}for(;g!==0;){for(WS(r),r.lineIndent=0,g=r.input.charCodeAt(r.position);(!o||r.lineIndenta&&(a=r.lineIndent),vo(g)){l++;continue}if(r.lineIndente)&&l!==0)ft(r,"bad indentation of a sequence entry");else if(r.lineIndente)&&(Tg(r,e,dI,!0,n)&&(p?f=r.result:h=r.result),p||(Lg(r,c,u,g,f,h,s,o),g=f=h=null),zr(r,!0,-1),y=r.input.charCodeAt(r.position)),r.lineIndent>e&&y!==0)ft(r,"bad indentation of a mapping entry");else if(r.lineIndente?l=1:r.lineIndent===e?l=0:r.lineIndente?l=1:r.lineIndent===e?l=0:r.lineIndent tag; it should be "scalar", not "'+r.kind+'"'),g=0,f=r.implicitTypes.length;g tag; it should be "'+h.kind+'", not "'+r.kind+'"'),h.resolve(r.result)?(r.result=h.construct(r.result),r.anchor!==null&&(r.anchorMap[r.anchor]=r.result)):ft(r,"cannot resolve a node with !<"+r.tag+"> explicit tag")):ft(r,"unknown tag !<"+r.tag+">");return r.listener!==null&&r.listener("close",r),r.tag!==null||r.anchor!==null||u}function mpe(r){var e=r.position,t,i,n,s=!1,o;for(r.version=null,r.checkLineBreaks=r.legacy,r.tagMap={},r.anchorMap={};(o=r.input.charCodeAt(r.position))!==0&&(zr(r,!0,-1),o=r.input.charCodeAt(r.position),!(r.lineIndent>0||o!==37));){for(s=!0,o=r.input.charCodeAt(++r.position),t=r.position;o!==0&&!un(o);)o=r.input.charCodeAt(++r.position);for(i=r.input.slice(t,r.position),n=[],i.length<1&&ft(r,"directive name must not be less than one character in length");o!==0;){for(;tc(o);)o=r.input.charCodeAt(++r.position);if(o===35){do o=r.input.charCodeAt(++r.position);while(o!==0&&!vo(o));break}if(vo(o))break;for(t=r.position;o!==0&&!un(o);)o=r.input.charCodeAt(++r.position);n.push(r.input.slice(t,r.position))}o!==0&&WS(r),DA.call(h2,i)?h2[i](r,i,n):CI(r,'unknown document directive "'+i+'"')}if(zr(r,!0,-1),r.lineIndent===0&&r.input.charCodeAt(r.position)===45&&r.input.charCodeAt(r.position+1)===45&&r.input.charCodeAt(r.position+2)===45?(r.position+=3,zr(r,!0,-1)):s&&ft(r,"directives end mark is expected"),Tg(r,r.lineIndent-1,dI,!1,!0),zr(r,!0,-1),r.checkLineBreaks&&rpe.test(r.input.slice(e,r.position))&&CI(r,"non-ASCII line breaks are interpreted as content"),r.documents.push(r.result),r.position===r.lineStart&&mI(r)){r.input.charCodeAt(r.position)===46&&(r.position+=3,zr(r,!0,-1));return}if(r.position"u"&&(t=e,e=null);var i=S2(r,t);if(typeof e!="function")return i;for(var n=0,s=i.length;n"u"&&(t=e,e=null),v2(r,e,ya.extend({schema:m2},t))}function Ipe(r,e){return x2(r,ya.extend({schema:m2},e))}Vp.exports.loadAll=v2;Vp.exports.load=x2;Vp.exports.safeLoadAll=Epe;Vp.exports.safeLoad=Ipe});var _2=w((qZe,_S)=>{"use strict";var Zp=Zl(),_p=kg(),ype=zp(),wpe=Fg(),O2=Object.prototype.toString,M2=Object.prototype.hasOwnProperty,Bpe=9,Xp=10,Qpe=13,bpe=32,Spe=33,vpe=34,K2=35,xpe=37,Ppe=38,Dpe=39,kpe=42,U2=44,Rpe=45,H2=58,Fpe=61,Npe=62,Lpe=63,Tpe=64,G2=91,Y2=93,Ope=96,j2=123,Mpe=124,q2=125,Ni={};Ni[0]="\\0";Ni[7]="\\a";Ni[8]="\\b";Ni[9]="\\t";Ni[10]="\\n";Ni[11]="\\v";Ni[12]="\\f";Ni[13]="\\r";Ni[27]="\\e";Ni[34]='\\"';Ni[92]="\\\\";Ni[133]="\\N";Ni[160]="\\_";Ni[8232]="\\L";Ni[8233]="\\P";var Kpe=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function Upe(r,e){var t,i,n,s,o,a,l;if(e===null)return{};for(t={},i=Object.keys(e),n=0,s=i.length;n0?r.charCodeAt(s-1):null,f=f&&R2(o,a)}else{for(s=0;si&&r[g+1]!==" ",g=s);else if(!Og(o))return EI;a=s>0?r.charCodeAt(s-1):null,f=f&&R2(o,a)}c=c||u&&s-g-1>i&&r[g+1]!==" "}return!l&&!c?f&&!n(r)?W2:z2:t>9&&J2(r)?EI:c?X2:V2}function Jpe(r,e,t,i){r.dump=function(){if(e.length===0)return"''";if(!r.noCompatMode&&Kpe.indexOf(e)!==-1)return"'"+e+"'";var n=r.indent*Math.max(1,t),s=r.lineWidth===-1?-1:Math.max(Math.min(r.lineWidth,40),r.lineWidth-n),o=i||r.flowLevel>-1&&t>=r.flowLevel;function a(l){return Gpe(r,l)}switch(qpe(e,o,r.indent,s,a)){case W2:return e;case z2:return"'"+e.replace(/'/g,"''")+"'";case V2:return"|"+F2(e,r.indent)+N2(k2(e,n));case X2:return">"+F2(e,r.indent)+N2(k2(Wpe(e,s),n));case EI:return'"'+zpe(e,s)+'"';default:throw new _p("impossible error: invalid scalar style")}}()}function F2(r,e){var t=J2(r)?String(e):"",i=r[r.length-1]===` +`,n=i&&(r[r.length-2]===` +`||r===` +`),s=n?"+":i?"":"-";return t+s+` +`}function N2(r){return r[r.length-1]===` +`?r.slice(0,-1):r}function Wpe(r,e){for(var t=/(\n+)([^\n]*)/g,i=function(){var c=r.indexOf(` +`);return c=c!==-1?c:r.length,t.lastIndex=c,L2(r.slice(0,c),e)}(),n=r[0]===` +`||r[0]===" ",s,o;o=t.exec(r);){var a=o[1],l=o[2];s=l[0]===" ",i+=a+(!n&&!s&&l!==""?` +`:"")+L2(l,e),n=s}return i}function L2(r,e){if(r===""||r[0]===" ")return r;for(var t=/ [^ ]/g,i,n=0,s,o=0,a=0,l="";i=t.exec(r);)a=i.index,a-n>e&&(s=o>n?o:a,l+=` +`+r.slice(n,s),n=s+1),o=a;return l+=` +`,r.length-n>e&&o>n?l+=r.slice(n,o)+` +`+r.slice(o+1):l+=r.slice(n),l.slice(1)}function zpe(r){for(var e="",t,i,n,s=0;s=55296&&t<=56319&&(i=r.charCodeAt(s+1),i>=56320&&i<=57343)){e+=D2((t-55296)*1024+i-56320+65536),s++;continue}n=Ni[t],e+=!n&&Og(t)?r[s]:n||D2(t)}return e}function Vpe(r,e,t){var i="",n=r.tag,s,o;for(s=0,o=t.length;s1024&&(u+="? "),u+=r.dump+(r.condenseFlow?'"':"")+":"+(r.condenseFlow?"":" "),rc(r,e,c,!1,!1)&&(u+=r.dump,i+=u));r.tag=n,r.dump="{"+i+"}"}function _pe(r,e,t,i){var n="",s=r.tag,o=Object.keys(t),a,l,c,u,g,f;if(r.sortKeys===!0)o.sort();else if(typeof r.sortKeys=="function")o.sort(r.sortKeys);else if(r.sortKeys)throw new _p("sortKeys must be a boolean or a function");for(a=0,l=o.length;a1024,g&&(r.dump&&Xp===r.dump.charCodeAt(0)?f+="?":f+="? "),f+=r.dump,g&&(f+=VS(r,e)),rc(r,e+1,u,!0,g)&&(r.dump&&Xp===r.dump.charCodeAt(0)?f+=":":f+=": ",f+=r.dump,n+=f));r.tag=s,r.dump=n||"{}"}function T2(r,e,t){var i,n,s,o,a,l;for(n=t?r.explicitTypes:r.implicitTypes,s=0,o=n.length;s tag resolver accepts not "'+l+'" style');r.dump=i}return!0}return!1}function rc(r,e,t,i,n,s){r.tag=null,r.dump=t,T2(r,t,!1)||T2(r,t,!0);var o=O2.call(r.dump);i&&(i=r.flowLevel<0||r.flowLevel>e);var a=o==="[object Object]"||o==="[object Array]",l,c;if(a&&(l=r.duplicates.indexOf(t),c=l!==-1),(r.tag!==null&&r.tag!=="?"||c||r.indent!==2&&e>0)&&(n=!1),c&&r.usedDuplicates[l])r.dump="*ref_"+l;else{if(a&&c&&!r.usedDuplicates[l]&&(r.usedDuplicates[l]=!0),o==="[object Object]")i&&Object.keys(r.dump).length!==0?(_pe(r,e,r.dump,n),c&&(r.dump="&ref_"+l+r.dump)):(Zpe(r,e,r.dump),c&&(r.dump="&ref_"+l+" "+r.dump));else if(o==="[object Array]"){var u=r.noArrayIndent&&e>0?e-1:e;i&&r.dump.length!==0?(Xpe(r,u,r.dump,n),c&&(r.dump="&ref_"+l+r.dump)):(Vpe(r,u,r.dump),c&&(r.dump="&ref_"+l+" "+r.dump))}else if(o==="[object String]")r.tag!=="?"&&Jpe(r,r.dump,e,s);else{if(r.skipInvalid)return!1;throw new _p("unacceptable kind of an object to dump "+o)}r.tag!==null&&r.tag!=="?"&&(r.dump="!<"+r.tag+"> "+r.dump)}return!0}function $pe(r,e){var t=[],i=[],n,s;for(XS(r,t,i),n=0,s=i.length;n{"use strict";var II=P2(),$2=_2();function yI(r){return function(){throw new Error("Function "+r+" is deprecated and cannot be used.")}}Fr.exports.Type=si();Fr.exports.Schema=_l();Fr.exports.FAILSAFE_SCHEMA=fI();Fr.exports.JSON_SCHEMA=YS();Fr.exports.CORE_SCHEMA=jS();Fr.exports.DEFAULT_SAFE_SCHEMA=Fg();Fr.exports.DEFAULT_FULL_SCHEMA=zp();Fr.exports.load=II.load;Fr.exports.loadAll=II.loadAll;Fr.exports.safeLoad=II.safeLoad;Fr.exports.safeLoadAll=II.safeLoadAll;Fr.exports.dump=$2.dump;Fr.exports.safeDump=$2.safeDump;Fr.exports.YAMLException=kg();Fr.exports.MINIMAL_SCHEMA=fI();Fr.exports.SAFE_SCHEMA=Fg();Fr.exports.DEFAULT_SCHEMA=zp();Fr.exports.scan=yI("scan");Fr.exports.parse=yI("parse");Fr.exports.compose=yI("compose");Fr.exports.addConstructor=yI("addConstructor")});var rH=w((WZe,tH)=>{"use strict";var tde=eH();tH.exports=tde});var nH=w((zZe,iH)=>{"use strict";function rde(r,e){function t(){this.constructor=r}t.prototype=e.prototype,r.prototype=new t}function ic(r,e,t,i){this.message=r,this.expected=e,this.found=t,this.location=i,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,ic)}rde(ic,Error);ic.buildMessage=function(r,e){var t={literal:function(c){return'"'+n(c.text)+'"'},class:function(c){var u="",g;for(g=0;g0){for(g=1,f=1;g({[Ke]:Ce})))},H=function(R){return R},j=function(R){return R},$=Ms("correct indentation"),V=" ",W=ar(" ",!1),_=function(R){return R.length===BA*mg},A=function(R){return R.length===(BA+1)*mg},ae=function(){return BA++,!0},ge=function(){return BA--,!0},re=function(){return gg()},O=Ms("pseudostring"),F=/^[^\r\n\t ?:,\][{}#&*!|>'"%@`\-]/,ue=Fn(["\r",` +`," "," ","?",":",",","]","[","{","}","#","&","*","!","|",">","'",'"',"%","@","`","-"],!0,!1),he=/^[^\r\n\t ,\][{}:#"']/,ke=Fn(["\r",` +`," "," ",",","]","[","{","}",":","#",'"',"'"],!0,!1),Fe=function(){return gg().replace(/^ *| *$/g,"")},Ne="--",oe=ar("--",!1),le=/^[a-zA-Z\/0-9]/,we=Fn([["a","z"],["A","Z"],"/",["0","9"]],!1,!1),fe=/^[^\r\n\t :,]/,Ae=Fn(["\r",` +`," "," ",":",","],!0,!1),qe="null",ne=ar("null",!1),Y=function(){return null},pe="true",ie=ar("true",!1),de=function(){return!0},_e="false",Pt=ar("false",!1),It=function(){return!1},Or=Ms("string"),ii='"',gi=ar('"',!1),hr=function(){return""},fi=function(R){return R},ni=function(R){return R.join("")},Os=/^[^"\\\0-\x1F\x7F]/,pr=Fn(['"',"\\",["\0",""],"\x7F"],!0,!1),Ii='\\"',es=ar('\\"',!1),ua=function(){return'"'},pA="\\\\",ag=ar("\\\\",!1),ts=function(){return"\\"},dA="\\/",ga=ar("\\/",!1),yp=function(){return"/"},CA="\\b",mA=ar("\\b",!1),wr=function(){return"\b"},kl="\\f",Ag=ar("\\f",!1),Io=function(){return"\f"},lg="\\n",wp=ar("\\n",!1),Bp=function(){return` +`},vr="\\r",se=ar("\\r",!1),yo=function(){return"\r"},kn="\\t",cg=ar("\\t",!1),Qt=function(){return" "},Rl="\\u",Rn=ar("\\u",!1),rs=function(R,q,Ce,Ke){return String.fromCharCode(parseInt(`0x${R}${q}${Ce}${Ke}`))},is=/^[0-9a-fA-F]/,gt=Fn([["0","9"],["a","f"],["A","F"]],!1,!1),wo=Ms("blank space"),At=/^[ \t]/,an=Fn([" "," "],!1,!1),S=Ms("white space"),Tt=/^[ \t\n\r]/,ug=Fn([" "," ",` +`,"\r"],!1,!1),Fl=`\r +`,Qp=ar(`\r +`,!1),bp=` +`,Sp=ar(` +`,!1),vp="\r",xp=ar("\r",!1),G=0,yt=0,EA=[{line:1,column:1}],Ji=0,Nl=[],Xe=0,fa;if("startRule"in e){if(!(e.startRule in i))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');n=i[e.startRule]}function gg(){return r.substring(yt,G)}function FE(){return An(yt,G)}function Pp(R,q){throw q=q!==void 0?q:An(yt,G),Tl([Ms(R)],r.substring(yt,G),q)}function NE(R,q){throw q=q!==void 0?q:An(yt,G),fg(R,q)}function ar(R,q){return{type:"literal",text:R,ignoreCase:q}}function Fn(R,q,Ce){return{type:"class",parts:R,inverted:q,ignoreCase:Ce}}function Ll(){return{type:"any"}}function Dp(){return{type:"end"}}function Ms(R){return{type:"other",description:R}}function ha(R){var q=EA[R],Ce;if(q)return q;for(Ce=R-1;!EA[Ce];)Ce--;for(q=EA[Ce],q={line:q.line,column:q.column};CeJi&&(Ji=G,Nl=[]),Nl.push(R))}function fg(R,q){return new ic(R,null,null,q)}function Tl(R,q,Ce){return new ic(ic.buildMessage(R,q),R,q,Ce)}function Ks(){var R;return R=hg(),R}function Ol(){var R,q,Ce;for(R=G,q=[],Ce=IA();Ce!==t;)q.push(Ce),Ce=IA();return q!==t&&(yt=R,q=s(q)),R=q,R}function IA(){var R,q,Ce,Ke,Re;return R=G,q=da(),q!==t?(r.charCodeAt(G)===45?(Ce=o,G++):(Ce=t,Xe===0&&Te(a)),Ce!==t?(Ke=Rr(),Ke!==t?(Re=pa(),Re!==t?(yt=R,q=l(Re),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t),R}function hg(){var R,q,Ce;for(R=G,q=[],Ce=pg();Ce!==t;)q.push(Ce),Ce=pg();return q!==t&&(yt=R,q=c(q)),R=q,R}function pg(){var R,q,Ce,Ke,Re,ze,dt,Ft,Nn;if(R=G,q=Rr(),q===t&&(q=null),q!==t){if(Ce=G,r.charCodeAt(G)===35?(Ke=u,G++):(Ke=t,Xe===0&&Te(g)),Ke!==t){if(Re=[],ze=G,dt=G,Xe++,Ft=Gs(),Xe--,Ft===t?dt=void 0:(G=dt,dt=t),dt!==t?(r.length>G?(Ft=r.charAt(G),G++):(Ft=t,Xe===0&&Te(f)),Ft!==t?(dt=[dt,Ft],ze=dt):(G=ze,ze=t)):(G=ze,ze=t),ze!==t)for(;ze!==t;)Re.push(ze),ze=G,dt=G,Xe++,Ft=Gs(),Xe--,Ft===t?dt=void 0:(G=dt,dt=t),dt!==t?(r.length>G?(Ft=r.charAt(G),G++):(Ft=t,Xe===0&&Te(f)),Ft!==t?(dt=[dt,Ft],ze=dt):(G=ze,ze=t)):(G=ze,ze=t);else Re=t;Re!==t?(Ke=[Ke,Re],Ce=Ke):(G=Ce,Ce=t)}else G=Ce,Ce=t;if(Ce===t&&(Ce=null),Ce!==t){if(Ke=[],Re=Hs(),Re!==t)for(;Re!==t;)Ke.push(Re),Re=Hs();else Ke=t;Ke!==t?(yt=R,q=h(),R=q):(G=R,R=t)}else G=R,R=t}else G=R,R=t;if(R===t&&(R=G,q=da(),q!==t?(Ce=Ml(),Ce!==t?(Ke=Rr(),Ke===t&&(Ke=null),Ke!==t?(r.charCodeAt(G)===58?(Re=p,G++):(Re=t,Xe===0&&Te(C)),Re!==t?(ze=Rr(),ze===t&&(ze=null),ze!==t?(dt=pa(),dt!==t?(yt=R,q=y(Ce,dt),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t),R===t&&(R=G,q=da(),q!==t?(Ce=Us(),Ce!==t?(Ke=Rr(),Ke===t&&(Ke=null),Ke!==t?(r.charCodeAt(G)===58?(Re=p,G++):(Re=t,Xe===0&&Te(C)),Re!==t?(ze=Rr(),ze===t&&(ze=null),ze!==t?(dt=pa(),dt!==t?(yt=R,q=y(Ce,dt),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t),R===t))){if(R=G,q=da(),q!==t)if(Ce=Us(),Ce!==t)if(Ke=Rr(),Ke!==t)if(Re=LE(),Re!==t){if(ze=[],dt=Hs(),dt!==t)for(;dt!==t;)ze.push(dt),dt=Hs();else ze=t;ze!==t?(yt=R,q=y(Ce,Re),R=q):(G=R,R=t)}else G=R,R=t;else G=R,R=t;else G=R,R=t;else G=R,R=t;if(R===t)if(R=G,q=da(),q!==t)if(Ce=Us(),Ce!==t){if(Ke=[],Re=G,ze=Rr(),ze===t&&(ze=null),ze!==t?(r.charCodeAt(G)===44?(dt=B,G++):(dt=t,Xe===0&&Te(v)),dt!==t?(Ft=Rr(),Ft===t&&(Ft=null),Ft!==t?(Nn=Us(),Nn!==t?(yt=Re,ze=D(Ce,Nn),Re=ze):(G=Re,Re=t)):(G=Re,Re=t)):(G=Re,Re=t)):(G=Re,Re=t),Re!==t)for(;Re!==t;)Ke.push(Re),Re=G,ze=Rr(),ze===t&&(ze=null),ze!==t?(r.charCodeAt(G)===44?(dt=B,G++):(dt=t,Xe===0&&Te(v)),dt!==t?(Ft=Rr(),Ft===t&&(Ft=null),Ft!==t?(Nn=Us(),Nn!==t?(yt=Re,ze=D(Ce,Nn),Re=ze):(G=Re,Re=t)):(G=Re,Re=t)):(G=Re,Re=t)):(G=Re,Re=t);else Ke=t;Ke!==t?(Re=Rr(),Re===t&&(Re=null),Re!==t?(r.charCodeAt(G)===58?(ze=p,G++):(ze=t,Xe===0&&Te(C)),ze!==t?(dt=Rr(),dt===t&&(dt=null),dt!==t?(Ft=pa(),Ft!==t?(yt=R,q=L(Ce,Ke,Ft),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)}else G=R,R=t;else G=R,R=t}return R}function pa(){var R,q,Ce,Ke,Re,ze,dt;if(R=G,q=G,Xe++,Ce=G,Ke=Gs(),Ke!==t?(Re=rt(),Re!==t?(r.charCodeAt(G)===45?(ze=o,G++):(ze=t,Xe===0&&Te(a)),ze!==t?(dt=Rr(),dt!==t?(Ke=[Ke,Re,ze,dt],Ce=Ke):(G=Ce,Ce=t)):(G=Ce,Ce=t)):(G=Ce,Ce=t)):(G=Ce,Ce=t),Xe--,Ce!==t?(G=q,q=void 0):q=t,q!==t?(Ce=Hs(),Ce!==t?(Ke=Bo(),Ke!==t?(Re=Ol(),Re!==t?(ze=yA(),ze!==t?(yt=R,q=H(Re),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t),R===t&&(R=G,q=Gs(),q!==t?(Ce=Bo(),Ce!==t?(Ke=hg(),Ke!==t?(Re=yA(),Re!==t?(yt=R,q=H(Ke),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t),R===t))if(R=G,q=Kl(),q!==t){if(Ce=[],Ke=Hs(),Ke!==t)for(;Ke!==t;)Ce.push(Ke),Ke=Hs();else Ce=t;Ce!==t?(yt=R,q=j(q),R=q):(G=R,R=t)}else G=R,R=t;return R}function da(){var R,q,Ce;for(Xe++,R=G,q=[],r.charCodeAt(G)===32?(Ce=V,G++):(Ce=t,Xe===0&&Te(W));Ce!==t;)q.push(Ce),r.charCodeAt(G)===32?(Ce=V,G++):(Ce=t,Xe===0&&Te(W));return q!==t?(yt=G,Ce=_(q),Ce?Ce=void 0:Ce=t,Ce!==t?(q=[q,Ce],R=q):(G=R,R=t)):(G=R,R=t),Xe--,R===t&&(q=t,Xe===0&&Te($)),R}function rt(){var R,q,Ce;for(R=G,q=[],r.charCodeAt(G)===32?(Ce=V,G++):(Ce=t,Xe===0&&Te(W));Ce!==t;)q.push(Ce),r.charCodeAt(G)===32?(Ce=V,G++):(Ce=t,Xe===0&&Te(W));return q!==t?(yt=G,Ce=A(q),Ce?Ce=void 0:Ce=t,Ce!==t?(q=[q,Ce],R=q):(G=R,R=t)):(G=R,R=t),R}function Bo(){var R;return yt=G,R=ae(),R?R=void 0:R=t,R}function yA(){var R;return yt=G,R=ge(),R?R=void 0:R=t,R}function Ml(){var R;return R=Ul(),R===t&&(R=kp()),R}function Us(){var R,q,Ce;if(R=Ul(),R===t){if(R=G,q=[],Ce=dg(),Ce!==t)for(;Ce!==t;)q.push(Ce),Ce=dg();else q=t;q!==t&&(yt=R,q=re()),R=q}return R}function Kl(){var R;return R=Rp(),R===t&&(R=TE(),R===t&&(R=Ul(),R===t&&(R=kp()))),R}function LE(){var R;return R=Rp(),R===t&&(R=Ul(),R===t&&(R=dg())),R}function kp(){var R,q,Ce,Ke,Re,ze;if(Xe++,R=G,F.test(r.charAt(G))?(q=r.charAt(G),G++):(q=t,Xe===0&&Te(ue)),q!==t){for(Ce=[],Ke=G,Re=Rr(),Re===t&&(Re=null),Re!==t?(he.test(r.charAt(G))?(ze=r.charAt(G),G++):(ze=t,Xe===0&&Te(ke)),ze!==t?(Re=[Re,ze],Ke=Re):(G=Ke,Ke=t)):(G=Ke,Ke=t);Ke!==t;)Ce.push(Ke),Ke=G,Re=Rr(),Re===t&&(Re=null),Re!==t?(he.test(r.charAt(G))?(ze=r.charAt(G),G++):(ze=t,Xe===0&&Te(ke)),ze!==t?(Re=[Re,ze],Ke=Re):(G=Ke,Ke=t)):(G=Ke,Ke=t);Ce!==t?(yt=R,q=Fe(),R=q):(G=R,R=t)}else G=R,R=t;return Xe--,R===t&&(q=t,Xe===0&&Te(O)),R}function dg(){var R,q,Ce,Ke,Re;if(R=G,r.substr(G,2)===Ne?(q=Ne,G+=2):(q=t,Xe===0&&Te(oe)),q===t&&(q=null),q!==t)if(le.test(r.charAt(G))?(Ce=r.charAt(G),G++):(Ce=t,Xe===0&&Te(we)),Ce!==t){for(Ke=[],fe.test(r.charAt(G))?(Re=r.charAt(G),G++):(Re=t,Xe===0&&Te(Ae));Re!==t;)Ke.push(Re),fe.test(r.charAt(G))?(Re=r.charAt(G),G++):(Re=t,Xe===0&&Te(Ae));Ke!==t?(yt=R,q=Fe(),R=q):(G=R,R=t)}else G=R,R=t;else G=R,R=t;return R}function Rp(){var R,q;return R=G,r.substr(G,4)===qe?(q=qe,G+=4):(q=t,Xe===0&&Te(ne)),q!==t&&(yt=R,q=Y()),R=q,R}function TE(){var R,q;return R=G,r.substr(G,4)===pe?(q=pe,G+=4):(q=t,Xe===0&&Te(ie)),q!==t&&(yt=R,q=de()),R=q,R===t&&(R=G,r.substr(G,5)===_e?(q=_e,G+=5):(q=t,Xe===0&&Te(Pt)),q!==t&&(yt=R,q=It()),R=q),R}function Ul(){var R,q,Ce,Ke;return Xe++,R=G,r.charCodeAt(G)===34?(q=ii,G++):(q=t,Xe===0&&Te(gi)),q!==t?(r.charCodeAt(G)===34?(Ce=ii,G++):(Ce=t,Xe===0&&Te(gi)),Ce!==t?(yt=R,q=hr(),R=q):(G=R,R=t)):(G=R,R=t),R===t&&(R=G,r.charCodeAt(G)===34?(q=ii,G++):(q=t,Xe===0&&Te(gi)),q!==t?(Ce=OE(),Ce!==t?(r.charCodeAt(G)===34?(Ke=ii,G++):(Ke=t,Xe===0&&Te(gi)),Ke!==t?(yt=R,q=fi(Ce),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)),Xe--,R===t&&(q=t,Xe===0&&Te(Or)),R}function OE(){var R,q,Ce;if(R=G,q=[],Ce=Cg(),Ce!==t)for(;Ce!==t;)q.push(Ce),Ce=Cg();else q=t;return q!==t&&(yt=R,q=ni(q)),R=q,R}function Cg(){var R,q,Ce,Ke,Re,ze;return Os.test(r.charAt(G))?(R=r.charAt(G),G++):(R=t,Xe===0&&Te(pr)),R===t&&(R=G,r.substr(G,2)===Ii?(q=Ii,G+=2):(q=t,Xe===0&&Te(es)),q!==t&&(yt=R,q=ua()),R=q,R===t&&(R=G,r.substr(G,2)===pA?(q=pA,G+=2):(q=t,Xe===0&&Te(ag)),q!==t&&(yt=R,q=ts()),R=q,R===t&&(R=G,r.substr(G,2)===dA?(q=dA,G+=2):(q=t,Xe===0&&Te(ga)),q!==t&&(yt=R,q=yp()),R=q,R===t&&(R=G,r.substr(G,2)===CA?(q=CA,G+=2):(q=t,Xe===0&&Te(mA)),q!==t&&(yt=R,q=wr()),R=q,R===t&&(R=G,r.substr(G,2)===kl?(q=kl,G+=2):(q=t,Xe===0&&Te(Ag)),q!==t&&(yt=R,q=Io()),R=q,R===t&&(R=G,r.substr(G,2)===lg?(q=lg,G+=2):(q=t,Xe===0&&Te(wp)),q!==t&&(yt=R,q=Bp()),R=q,R===t&&(R=G,r.substr(G,2)===vr?(q=vr,G+=2):(q=t,Xe===0&&Te(se)),q!==t&&(yt=R,q=yo()),R=q,R===t&&(R=G,r.substr(G,2)===kn?(q=kn,G+=2):(q=t,Xe===0&&Te(cg)),q!==t&&(yt=R,q=Qt()),R=q,R===t&&(R=G,r.substr(G,2)===Rl?(q=Rl,G+=2):(q=t,Xe===0&&Te(Rn)),q!==t?(Ce=wA(),Ce!==t?(Ke=wA(),Ke!==t?(Re=wA(),Re!==t?(ze=wA(),ze!==t?(yt=R,q=rs(Ce,Ke,Re,ze),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)))))))))),R}function wA(){var R;return is.test(r.charAt(G))?(R=r.charAt(G),G++):(R=t,Xe===0&&Te(gt)),R}function Rr(){var R,q;if(Xe++,R=[],At.test(r.charAt(G))?(q=r.charAt(G),G++):(q=t,Xe===0&&Te(an)),q!==t)for(;q!==t;)R.push(q),At.test(r.charAt(G))?(q=r.charAt(G),G++):(q=t,Xe===0&&Te(an));else R=t;return Xe--,R===t&&(q=t,Xe===0&&Te(wo)),R}function ME(){var R,q;if(Xe++,R=[],Tt.test(r.charAt(G))?(q=r.charAt(G),G++):(q=t,Xe===0&&Te(ug)),q!==t)for(;q!==t;)R.push(q),Tt.test(r.charAt(G))?(q=r.charAt(G),G++):(q=t,Xe===0&&Te(ug));else R=t;return Xe--,R===t&&(q=t,Xe===0&&Te(S)),R}function Hs(){var R,q,Ce,Ke,Re,ze;if(R=G,q=Gs(),q!==t){for(Ce=[],Ke=G,Re=Rr(),Re===t&&(Re=null),Re!==t?(ze=Gs(),ze!==t?(Re=[Re,ze],Ke=Re):(G=Ke,Ke=t)):(G=Ke,Ke=t);Ke!==t;)Ce.push(Ke),Ke=G,Re=Rr(),Re===t&&(Re=null),Re!==t?(ze=Gs(),ze!==t?(Re=[Re,ze],Ke=Re):(G=Ke,Ke=t)):(G=Ke,Ke=t);Ce!==t?(q=[q,Ce],R=q):(G=R,R=t)}else G=R,R=t;return R}function Gs(){var R;return r.substr(G,2)===Fl?(R=Fl,G+=2):(R=t,Xe===0&&Te(Qp)),R===t&&(r.charCodeAt(G)===10?(R=bp,G++):(R=t,Xe===0&&Te(Sp)),R===t&&(r.charCodeAt(G)===13?(R=vp,G++):(R=t,Xe===0&&Te(xp)))),R}let mg=2,BA=0;if(fa=n(),fa!==t&&G===r.length)return fa;throw fa!==t&&G{"use strict";var Ade=r=>{let e=!1,t=!1,i=!1;for(let n=0;n{if(!(typeof r=="string"||Array.isArray(r)))throw new TypeError("Expected the input to be `string | string[]`");e=Object.assign({pascalCase:!1},e);let t=n=>e.pascalCase?n.charAt(0).toUpperCase()+n.slice(1):n;return Array.isArray(r)?r=r.map(n=>n.trim()).filter(n=>n.length).join("-"):r=r.trim(),r.length===0?"":r.length===1?e.pascalCase?r.toUpperCase():r.toLowerCase():(r!==r.toLowerCase()&&(r=Ade(r)),r=r.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,(n,s)=>s.toUpperCase()).replace(/\d+(\w|$)/g,n=>n.toUpperCase()),t(r))};ev.exports=lH;ev.exports.default=lH});var uH=w((e_e,lde)=>{lde.exports=[{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI",pr:"SYSTEM_PULLREQUEST_PULLREQUESTID"},{name:"Appcircle",constant:"APPCIRCLE",env:"AC_APPCIRCLE"},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN"},{name:"Codefresh",constant:"CODEFRESH",env:"CF_BUILD_ID",pr:{any:["CF_PULL_REQUEST_NUMBER","CF_PULL_REQUEST_ID"]}},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"GitHub Actions",constant:"GITHUB_ACTIONS",env:"GITHUB_ACTIONS",pr:{GITHUB_EVENT_NAME:"pull_request"}},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI",pr:"CI_MERGE_REQUEST_ID"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"LayerCI",constant:"LAYERCI",env:"LAYERCI",pr:"LAYERCI_PULL_REQUEST"},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Nevercode",constant:"NEVERCODE",env:"NEVERCODE",pr:{env:"NEVERCODE_PULL_REQUEST",ne:"false"}},{name:"Render",constant:"RENDER",env:"RENDER",pr:{IS_PULL_REQUEST:"true"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Screwdriver",constant:"SCREWDRIVER",env:"SCREWDRIVER",pr:{env:"SD_PULL_REQUEST",ne:"false"}},{name:"Shippable",constant:"SHIPPABLE",env:"SHIPPABLE",pr:{IS_PULL_REQUEST:"true"}},{name:"Solano CI",constant:"SOLANO",env:"TDDIUM",pr:"TDDIUM_PR_ID"},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}},{name:"Vercel",constant:"VERCEL",env:"NOW_BUILDER"},{name:"Visual Studio App Center",constant:"APPCENTER",env:"APPCENTER_BUILD_ID"}]});var nc=w(Mn=>{"use strict";var fH=uH(),xo=process.env;Object.defineProperty(Mn,"_vendors",{value:fH.map(function(r){return r.constant})});Mn.name=null;Mn.isPR=null;fH.forEach(function(r){let t=(Array.isArray(r.env)?r.env:[r.env]).every(function(i){return gH(i)});if(Mn[r.constant]=t,t)switch(Mn.name=r.name,typeof r.pr){case"string":Mn.isPR=!!xo[r.pr];break;case"object":"env"in r.pr?Mn.isPR=r.pr.env in xo&&xo[r.pr.env]!==r.pr.ne:"any"in r.pr?Mn.isPR=r.pr.any.some(function(i){return!!xo[i]}):Mn.isPR=gH(r.pr);break;default:Mn.isPR=null}});Mn.isCI=!!(xo.CI||xo.CONTINUOUS_INTEGRATION||xo.BUILD_NUMBER||xo.RUN_ID||Mn.name);function gH(r){return typeof r=="string"?!!xo[r]:Object.keys(r).every(function(e){return xo[e]===r[e]})}});var gn={};ut(gn,{KeyRelationship:()=>sc,applyCascade:()=>nd,base64RegExp:()=>mH,colorStringAlphaRegExp:()=>CH,colorStringRegExp:()=>dH,computeKey:()=>kA,getPrintable:()=>Vr,hasExactLength:()=>BH,hasForbiddenKeys:()=>Hde,hasKeyRelationship:()=>av,hasMaxLength:()=>Qde,hasMinLength:()=>Bde,hasMutuallyExclusiveKeys:()=>Gde,hasRequiredKeys:()=>Ude,hasUniqueItems:()=>bde,isArray:()=>pde,isAtLeast:()=>xde,isAtMost:()=>Pde,isBase64:()=>Mde,isBoolean:()=>gde,isDate:()=>hde,isDict:()=>Cde,isEnum:()=>Vi,isHexColor:()=>Ode,isISO8601:()=>Tde,isInExclusiveRange:()=>kde,isInInclusiveRange:()=>Dde,isInstanceOf:()=>Ede,isInteger:()=>Rde,isJSON:()=>Kde,isLiteral:()=>cde,isLowerCase:()=>Fde,isNegative:()=>Sde,isNullable:()=>wde,isNumber:()=>fde,isObject:()=>mde,isOneOf:()=>Ide,isOptional:()=>yde,isPositive:()=>vde,isString:()=>id,isTuple:()=>dde,isUUID4:()=>Lde,isUnknown:()=>wH,isUpperCase:()=>Nde,iso8601RegExp:()=>ov,makeCoercionFn:()=>oc,makeSetter:()=>yH,makeTrait:()=>IH,makeValidator:()=>bt,matchesRegExp:()=>sd,plural:()=>vI,pushError:()=>pt,simpleKeyRegExp:()=>pH,uuid4RegExp:()=>EH});function bt({test:r}){return IH(r)()}function Vr(r){return r===null?"null":r===void 0?"undefined":r===""?"an empty string":JSON.stringify(r)}function kA(r,e){var t,i,n;return typeof e=="number"?`${(t=r==null?void 0:r.p)!==null&&t!==void 0?t:"."}[${e}]`:pH.test(e)?`${(i=r==null?void 0:r.p)!==null&&i!==void 0?i:""}.${e}`:`${(n=r==null?void 0:r.p)!==null&&n!==void 0?n:"."}[${JSON.stringify(e)}]`}function oc(r,e){return t=>{let i=r[e];return r[e]=t,oc(r,e).bind(null,i)}}function yH(r,e){return t=>{r[e]=t}}function vI(r,e,t){return r===1?e:t}function pt({errors:r,p:e}={},t){return r==null||r.push(`${e!=null?e:"."}: ${t}`),!1}function cde(r){return bt({test:(e,t)=>e!==r?pt(t,`Expected a literal (got ${Vr(r)})`):!0})}function Vi(r){let e=Array.isArray(r)?r:Object.values(r),t=new Set(e);return bt({test:(i,n)=>t.has(i)?!0:pt(n,`Expected a valid enumeration value (got ${Vr(i)})`)})}var pH,dH,CH,mH,EH,ov,IH,wH,id,ude,gde,fde,hde,pde,dde,Cde,mde,Ede,Ide,nd,yde,wde,Bde,Qde,BH,bde,Sde,vde,xde,Pde,Dde,kde,Rde,sd,Fde,Nde,Lde,Tde,Ode,Mde,Kde,Ude,Hde,Gde,sc,Yde,av,as=Pge(()=>{pH=/^[a-zA-Z_][a-zA-Z0-9_]*$/,dH=/^#[0-9a-f]{6}$/i,CH=/^#[0-9a-f]{6}([0-9a-f]{2})?$/i,mH=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,EH=/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}$/i,ov=/^(?:[1-9]\d{3}(-?)(?:(?:0[1-9]|1[0-2])\1(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])\1(?:29|30)|(?:0[13578]|1[02])(?:\1)31|00[1-9]|0[1-9]\d|[12]\d{2}|3(?:[0-5]\d|6[0-5]))|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)(?:(-?)02(?:\2)29|-?366))T(?:[01]\d|2[0-3])(:?)[0-5]\d(?:\3[0-5]\d)?(?:Z|[+-][01]\d(?:\3[0-5]\d)?)$/,IH=r=>()=>r;wH=()=>bt({test:(r,e)=>!0});id=()=>bt({test:(r,e)=>typeof r!="string"?pt(e,`Expected a string (got ${Vr(r)})`):!0});ude=new Map([["true",!0],["True",!0],["1",!0],[1,!0],["false",!1],["False",!1],["0",!1],[0,!1]]),gde=()=>bt({test:(r,e)=>{var t;if(typeof r!="boolean"){if(typeof(e==null?void 0:e.coercions)<"u"){if(typeof(e==null?void 0:e.coercion)>"u")return pt(e,"Unbound coercion result");let i=ude.get(r);if(typeof i<"u")return e.coercions.push([(t=e.p)!==null&&t!==void 0?t:".",e.coercion.bind(null,i)]),!0}return pt(e,`Expected a boolean (got ${Vr(r)})`)}return!0}}),fde=()=>bt({test:(r,e)=>{var t;if(typeof r!="number"){if(typeof(e==null?void 0:e.coercions)<"u"){if(typeof(e==null?void 0:e.coercion)>"u")return pt(e,"Unbound coercion result");let i;if(typeof r=="string"){let n;try{n=JSON.parse(r)}catch{}if(typeof n=="number")if(JSON.stringify(n)===r)i=n;else return pt(e,`Received a number that can't be safely represented by the runtime (${r})`)}if(typeof i<"u")return e.coercions.push([(t=e.p)!==null&&t!==void 0?t:".",e.coercion.bind(null,i)]),!0}return pt(e,`Expected a number (got ${Vr(r)})`)}return!0}}),hde=()=>bt({test:(r,e)=>{var t;if(!(r instanceof Date)){if(typeof(e==null?void 0:e.coercions)<"u"){if(typeof(e==null?void 0:e.coercion)>"u")return pt(e,"Unbound coercion result");let i;if(typeof r=="string"&&ov.test(r))i=new Date(r);else{let n;if(typeof r=="string"){let s;try{s=JSON.parse(r)}catch{}typeof s=="number"&&(n=s)}else typeof r=="number"&&(n=r);if(typeof n<"u")if(Number.isSafeInteger(n)||!Number.isSafeInteger(n*1e3))i=new Date(n*1e3);else return pt(e,`Received a timestamp that can't be safely represented by the runtime (${r})`)}if(typeof i<"u")return e.coercions.push([(t=e.p)!==null&&t!==void 0?t:".",e.coercion.bind(null,i)]),!0}return pt(e,`Expected a date (got ${Vr(r)})`)}return!0}}),pde=(r,{delimiter:e}={})=>bt({test:(t,i)=>{var n;if(typeof t=="string"&&typeof e<"u"&&typeof(i==null?void 0:i.coercions)<"u"){if(typeof(i==null?void 0:i.coercion)>"u")return pt(i,"Unbound coercion result");t=t.split(e),i.coercions.push([(n=i.p)!==null&&n!==void 0?n:".",i.coercion.bind(null,t)])}if(!Array.isArray(t))return pt(i,`Expected an array (got ${Vr(t)})`);let s=!0;for(let o=0,a=t.length;o{let t=BH(r.length);return bt({test:(i,n)=>{var s;if(typeof i=="string"&&typeof e<"u"&&typeof(n==null?void 0:n.coercions)<"u"){if(typeof(n==null?void 0:n.coercion)>"u")return pt(n,"Unbound coercion result");i=i.split(e),n.coercions.push([(s=n.p)!==null&&s!==void 0?s:".",n.coercion.bind(null,i)])}if(!Array.isArray(i))return pt(n,`Expected a tuple (got ${Vr(i)})`);let o=t(i,Object.assign({},n));for(let a=0,l=i.length;abt({test:(t,i)=>{if(typeof t!="object"||t===null)return pt(i,`Expected an object (got ${Vr(t)})`);let n=Object.keys(t),s=!0;for(let o=0,a=n.length;o{let t=Object.keys(r);return bt({test:(i,n)=>{if(typeof i!="object"||i===null)return pt(n,`Expected an object (got ${Vr(i)})`);let s=new Set([...t,...Object.keys(i)]),o={},a=!0;for(let l of s){if(l==="constructor"||l==="__proto__")a=pt(Object.assign(Object.assign({},n),{p:kA(n,l)}),"Unsafe property name");else{let c=Object.prototype.hasOwnProperty.call(r,l)?r[l]:void 0,u=Object.prototype.hasOwnProperty.call(i,l)?i[l]:void 0;typeof c<"u"?a=c(u,Object.assign(Object.assign({},n),{p:kA(n,l),coercion:oc(i,l)}))&&a:e===null?a=pt(Object.assign(Object.assign({},n),{p:kA(n,l)}),`Extraneous property (got ${Vr(u)})`):Object.defineProperty(o,l,{enumerable:!0,get:()=>u,set:yH(i,l)})}if(!a&&(n==null?void 0:n.errors)==null)break}return e!==null&&(a||(n==null?void 0:n.errors)!=null)&&(a=e(o,n)&&a),a}})},Ede=r=>bt({test:(e,t)=>e instanceof r?!0:pt(t,`Expected an instance of ${r.name} (got ${Vr(e)})`)}),Ide=(r,{exclusive:e=!1}={})=>bt({test:(t,i)=>{var n,s,o;let a=[],l=typeof(i==null?void 0:i.errors)<"u"?[]:void 0;for(let c=0,u=r.length;c1?pt(i,`Expected to match exactly a single predicate (matched ${a.join(", ")})`):(o=i==null?void 0:i.errors)===null||o===void 0||o.push(...l),!1}}),nd=(r,e)=>bt({test:(t,i)=>{var n,s;let o={value:t},a=typeof(i==null?void 0:i.coercions)<"u"?oc(o,"value"):void 0,l=typeof(i==null?void 0:i.coercions)<"u"?[]:void 0;if(!r(t,Object.assign(Object.assign({},i),{coercion:a,coercions:l})))return!1;let c=[];if(typeof l<"u")for(let[,u]of l)c.push(u());try{if(typeof(i==null?void 0:i.coercions)<"u"){if(o.value!==t){if(typeof(i==null?void 0:i.coercion)>"u")return pt(i,"Unbound coercion result");i.coercions.push([(n=i.p)!==null&&n!==void 0?n:".",i.coercion.bind(null,o.value)])}(s=i==null?void 0:i.coercions)===null||s===void 0||s.push(...l)}return e.every(u=>u(o.value,i))}finally{for(let u of c)u()}}}),yde=r=>bt({test:(e,t)=>typeof e>"u"?!0:r(e,t)}),wde=r=>bt({test:(e,t)=>e===null?!0:r(e,t)}),Bde=r=>bt({test:(e,t)=>e.length>=r?!0:pt(t,`Expected to have a length of at least ${r} elements (got ${e.length})`)}),Qde=r=>bt({test:(e,t)=>e.length<=r?!0:pt(t,`Expected to have a length of at most ${r} elements (got ${e.length})`)}),BH=r=>bt({test:(e,t)=>e.length!==r?pt(t,`Expected to have a length of exactly ${r} elements (got ${e.length})`):!0}),bde=({map:r}={})=>bt({test:(e,t)=>{let i=new Set,n=new Set;for(let s=0,o=e.length;sbt({test:(r,e)=>r<=0?!0:pt(e,`Expected to be negative (got ${r})`)}),vde=()=>bt({test:(r,e)=>r>=0?!0:pt(e,`Expected to be positive (got ${r})`)}),xde=r=>bt({test:(e,t)=>e>=r?!0:pt(t,`Expected to be at least ${r} (got ${e})`)}),Pde=r=>bt({test:(e,t)=>e<=r?!0:pt(t,`Expected to be at most ${r} (got ${e})`)}),Dde=(r,e)=>bt({test:(t,i)=>t>=r&&t<=e?!0:pt(i,`Expected to be in the [${r}; ${e}] range (got ${t})`)}),kde=(r,e)=>bt({test:(t,i)=>t>=r&&tbt({test:(e,t)=>e!==Math.round(e)?pt(t,`Expected to be an integer (got ${e})`):Number.isSafeInteger(e)?!0:pt(t,`Expected to be a safe integer (got ${e})`)}),sd=r=>bt({test:(e,t)=>r.test(e)?!0:pt(t,`Expected to match the pattern ${r.toString()} (got ${Vr(e)})`)}),Fde=()=>bt({test:(r,e)=>r!==r.toLowerCase()?pt(e,`Expected to be all-lowercase (got ${r})`):!0}),Nde=()=>bt({test:(r,e)=>r!==r.toUpperCase()?pt(e,`Expected to be all-uppercase (got ${r})`):!0}),Lde=()=>bt({test:(r,e)=>EH.test(r)?!0:pt(e,`Expected to be a valid UUID v4 (got ${Vr(r)})`)}),Tde=()=>bt({test:(r,e)=>ov.test(r)?!1:pt(e,`Expected to be a valid ISO 8601 date string (got ${Vr(r)})`)}),Ode=({alpha:r=!1})=>bt({test:(e,t)=>(r?dH.test(e):CH.test(e))?!0:pt(t,`Expected to be a valid hexadecimal color string (got ${Vr(e)})`)}),Mde=()=>bt({test:(r,e)=>mH.test(r)?!0:pt(e,`Expected to be a valid base 64 string (got ${Vr(r)})`)}),Kde=(r=wH())=>bt({test:(e,t)=>{let i;try{i=JSON.parse(e)}catch{return pt(t,`Expected to be a valid JSON string (got ${Vr(e)})`)}return r(i,t)}}),Ude=r=>{let e=new Set(r);return bt({test:(t,i)=>{let n=new Set(Object.keys(t)),s=[];for(let o of e)n.has(o)||s.push(o);return s.length>0?pt(i,`Missing required ${vI(s.length,"property","properties")} ${s.map(o=>`"${o}"`).join(", ")}`):!0}})},Hde=r=>{let e=new Set(r);return bt({test:(t,i)=>{let n=new Set(Object.keys(t)),s=[];for(let o of e)n.has(o)&&s.push(o);return s.length>0?pt(i,`Forbidden ${vI(s.length,"property","properties")} ${s.map(o=>`"${o}"`).join(", ")}`):!0}})},Gde=r=>{let e=new Set(r);return bt({test:(t,i)=>{let n=new Set(Object.keys(t)),s=[];for(let o of e)n.has(o)&&s.push(o);return s.length>1?pt(i,`Mutually exclusive properties ${s.map(o=>`"${o}"`).join(", ")}`):!0}})};(function(r){r.Forbids="Forbids",r.Requires="Requires"})(sc||(sc={}));Yde={[sc.Forbids]:{expect:!1,message:"forbids using"},[sc.Requires]:{expect:!0,message:"requires using"}},av=(r,e,t,{ignore:i=[]}={})=>{let n=new Set(i),s=new Set(t),o=Yde[e];return bt({test:(a,l)=>{let c=new Set(Object.keys(a));if(!c.has(r)||n.has(a[r]))return!0;let u=[];for(let g of s)(c.has(g)&&!n.has(a[g]))!==o.expect&&u.push(g);return u.length>=1?pt(l,`Property "${r}" ${o.message} ${vI(u.length,"property","properties")} ${u.map(g=>`"${g}"`).join(", ")}`):!0}})}});var UH=w((e$e,KH)=>{"use strict";KH.exports=(r,...e)=>new Promise(t=>{t(r(...e))})});var Yg=w((t$e,pv)=>{"use strict";var oCe=UH(),HH=r=>{if(r<1)throw new TypeError("Expected `concurrency` to be a number from 1 and up");let e=[],t=0,i=()=>{t--,e.length>0&&e.shift()()},n=(a,l,...c)=>{t++;let u=oCe(a,...c);l(u),u.then(i,i)},s=(a,l,...c)=>{tnew Promise(c=>s(a,c,...l));return Object.defineProperties(o,{activeCount:{get:()=>t},pendingCount:{get:()=>e.length}}),o};pv.exports=HH;pv.exports.default=HH});var cd=w((i$e,GH)=>{var aCe="2.0.0",ACe=Number.MAX_SAFE_INTEGER||9007199254740991,lCe=16;GH.exports={SEMVER_SPEC_VERSION:aCe,MAX_LENGTH:256,MAX_SAFE_INTEGER:ACe,MAX_SAFE_COMPONENT_LENGTH:lCe}});var ud=w((n$e,YH)=>{var cCe=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};YH.exports=cCe});var ac=w((FA,jH)=>{var{MAX_SAFE_COMPONENT_LENGTH:dv}=cd(),uCe=ud();FA=jH.exports={};var gCe=FA.re=[],et=FA.src=[],tt=FA.t={},fCe=0,St=(r,e,t)=>{let i=fCe++;uCe(i,e),tt[r]=i,et[i]=e,gCe[i]=new RegExp(e,t?"g":void 0)};St("NUMERICIDENTIFIER","0|[1-9]\\d*");St("NUMERICIDENTIFIERLOOSE","[0-9]+");St("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");St("MAINVERSION",`(${et[tt.NUMERICIDENTIFIER]})\\.(${et[tt.NUMERICIDENTIFIER]})\\.(${et[tt.NUMERICIDENTIFIER]})`);St("MAINVERSIONLOOSE",`(${et[tt.NUMERICIDENTIFIERLOOSE]})\\.(${et[tt.NUMERICIDENTIFIERLOOSE]})\\.(${et[tt.NUMERICIDENTIFIERLOOSE]})`);St("PRERELEASEIDENTIFIER",`(?:${et[tt.NUMERICIDENTIFIER]}|${et[tt.NONNUMERICIDENTIFIER]})`);St("PRERELEASEIDENTIFIERLOOSE",`(?:${et[tt.NUMERICIDENTIFIERLOOSE]}|${et[tt.NONNUMERICIDENTIFIER]})`);St("PRERELEASE",`(?:-(${et[tt.PRERELEASEIDENTIFIER]}(?:\\.${et[tt.PRERELEASEIDENTIFIER]})*))`);St("PRERELEASELOOSE",`(?:-?(${et[tt.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${et[tt.PRERELEASEIDENTIFIERLOOSE]})*))`);St("BUILDIDENTIFIER","[0-9A-Za-z-]+");St("BUILD",`(?:\\+(${et[tt.BUILDIDENTIFIER]}(?:\\.${et[tt.BUILDIDENTIFIER]})*))`);St("FULLPLAIN",`v?${et[tt.MAINVERSION]}${et[tt.PRERELEASE]}?${et[tt.BUILD]}?`);St("FULL",`^${et[tt.FULLPLAIN]}$`);St("LOOSEPLAIN",`[v=\\s]*${et[tt.MAINVERSIONLOOSE]}${et[tt.PRERELEASELOOSE]}?${et[tt.BUILD]}?`);St("LOOSE",`^${et[tt.LOOSEPLAIN]}$`);St("GTLT","((?:<|>)?=?)");St("XRANGEIDENTIFIERLOOSE",`${et[tt.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);St("XRANGEIDENTIFIER",`${et[tt.NUMERICIDENTIFIER]}|x|X|\\*`);St("XRANGEPLAIN",`[v=\\s]*(${et[tt.XRANGEIDENTIFIER]})(?:\\.(${et[tt.XRANGEIDENTIFIER]})(?:\\.(${et[tt.XRANGEIDENTIFIER]})(?:${et[tt.PRERELEASE]})?${et[tt.BUILD]}?)?)?`);St("XRANGEPLAINLOOSE",`[v=\\s]*(${et[tt.XRANGEIDENTIFIERLOOSE]})(?:\\.(${et[tt.XRANGEIDENTIFIERLOOSE]})(?:\\.(${et[tt.XRANGEIDENTIFIERLOOSE]})(?:${et[tt.PRERELEASELOOSE]})?${et[tt.BUILD]}?)?)?`);St("XRANGE",`^${et[tt.GTLT]}\\s*${et[tt.XRANGEPLAIN]}$`);St("XRANGELOOSE",`^${et[tt.GTLT]}\\s*${et[tt.XRANGEPLAINLOOSE]}$`);St("COERCE",`(^|[^\\d])(\\d{1,${dv}})(?:\\.(\\d{1,${dv}}))?(?:\\.(\\d{1,${dv}}))?(?:$|[^\\d])`);St("COERCERTL",et[tt.COERCE],!0);St("LONETILDE","(?:~>?)");St("TILDETRIM",`(\\s*)${et[tt.LONETILDE]}\\s+`,!0);FA.tildeTrimReplace="$1~";St("TILDE",`^${et[tt.LONETILDE]}${et[tt.XRANGEPLAIN]}$`);St("TILDELOOSE",`^${et[tt.LONETILDE]}${et[tt.XRANGEPLAINLOOSE]}$`);St("LONECARET","(?:\\^)");St("CARETTRIM",`(\\s*)${et[tt.LONECARET]}\\s+`,!0);FA.caretTrimReplace="$1^";St("CARET",`^${et[tt.LONECARET]}${et[tt.XRANGEPLAIN]}$`);St("CARETLOOSE",`^${et[tt.LONECARET]}${et[tt.XRANGEPLAINLOOSE]}$`);St("COMPARATORLOOSE",`^${et[tt.GTLT]}\\s*(${et[tt.LOOSEPLAIN]})$|^$`);St("COMPARATOR",`^${et[tt.GTLT]}\\s*(${et[tt.FULLPLAIN]})$|^$`);St("COMPARATORTRIM",`(\\s*)${et[tt.GTLT]}\\s*(${et[tt.LOOSEPLAIN]}|${et[tt.XRANGEPLAIN]})`,!0);FA.comparatorTrimReplace="$1$2$3";St("HYPHENRANGE",`^\\s*(${et[tt.XRANGEPLAIN]})\\s+-\\s+(${et[tt.XRANGEPLAIN]})\\s*$`);St("HYPHENRANGELOOSE",`^\\s*(${et[tt.XRANGEPLAINLOOSE]})\\s+-\\s+(${et[tt.XRANGEPLAINLOOSE]})\\s*$`);St("STAR","(<|>)?=?\\s*\\*");St("GTE0","^\\s*>=\\s*0.0.0\\s*$");St("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")});var gd=w((s$e,qH)=>{var hCe=["includePrerelease","loose","rtl"],pCe=r=>r?typeof r!="object"?{loose:!0}:hCe.filter(e=>r[e]).reduce((e,t)=>(e[t]=!0,e),{}):{};qH.exports=pCe});var FI=w((o$e,zH)=>{var JH=/^[0-9]+$/,WH=(r,e)=>{let t=JH.test(r),i=JH.test(e);return t&&i&&(r=+r,e=+e),r===e?0:t&&!i?-1:i&&!t?1:rWH(e,r);zH.exports={compareIdentifiers:WH,rcompareIdentifiers:dCe}});var Ti=w((a$e,_H)=>{var NI=ud(),{MAX_LENGTH:VH,MAX_SAFE_INTEGER:LI}=cd(),{re:XH,t:ZH}=ac(),CCe=gd(),{compareIdentifiers:fd}=FI(),Hn=class{constructor(e,t){if(t=CCe(t),e instanceof Hn){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid Version: ${e}`);if(e.length>VH)throw new TypeError(`version is longer than ${VH} characters`);NI("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let i=e.trim().match(t.loose?XH[ZH.LOOSE]:XH[ZH.FULL]);if(!i)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>LI||this.major<0)throw new TypeError("Invalid major version");if(this.minor>LI||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>LI||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(n=>{if(/^[0-9]+$/.test(n)){let s=+n;if(s>=0&&s=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);i===-1&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}};_H.exports=Hn});var Ac=w((A$e,rG)=>{var{MAX_LENGTH:mCe}=cd(),{re:$H,t:eG}=ac(),tG=Ti(),ECe=gd(),ICe=(r,e)=>{if(e=ECe(e),r instanceof tG)return r;if(typeof r!="string"||r.length>mCe||!(e.loose?$H[eG.LOOSE]:$H[eG.FULL]).test(r))return null;try{return new tG(r,e)}catch{return null}};rG.exports=ICe});var nG=w((l$e,iG)=>{var yCe=Ac(),wCe=(r,e)=>{let t=yCe(r,e);return t?t.version:null};iG.exports=wCe});var oG=w((c$e,sG)=>{var BCe=Ac(),QCe=(r,e)=>{let t=BCe(r.trim().replace(/^[=v]+/,""),e);return t?t.version:null};sG.exports=QCe});var AG=w((u$e,aG)=>{var bCe=Ti(),SCe=(r,e,t,i)=>{typeof t=="string"&&(i=t,t=void 0);try{return new bCe(r,t).inc(e,i).version}catch{return null}};aG.exports=SCe});var As=w((g$e,cG)=>{var lG=Ti(),vCe=(r,e,t)=>new lG(r,t).compare(new lG(e,t));cG.exports=vCe});var TI=w((f$e,uG)=>{var xCe=As(),PCe=(r,e,t)=>xCe(r,e,t)===0;uG.exports=PCe});var hG=w((h$e,fG)=>{var gG=Ac(),DCe=TI(),kCe=(r,e)=>{if(DCe(r,e))return null;{let t=gG(r),i=gG(e),n=t.prerelease.length||i.prerelease.length,s=n?"pre":"",o=n?"prerelease":"";for(let a in t)if((a==="major"||a==="minor"||a==="patch")&&t[a]!==i[a])return s+a;return o}};fG.exports=kCe});var dG=w((p$e,pG)=>{var RCe=Ti(),FCe=(r,e)=>new RCe(r,e).major;pG.exports=FCe});var mG=w((d$e,CG)=>{var NCe=Ti(),LCe=(r,e)=>new NCe(r,e).minor;CG.exports=LCe});var IG=w((C$e,EG)=>{var TCe=Ti(),OCe=(r,e)=>new TCe(r,e).patch;EG.exports=OCe});var wG=w((m$e,yG)=>{var MCe=Ac(),KCe=(r,e)=>{let t=MCe(r,e);return t&&t.prerelease.length?t.prerelease:null};yG.exports=KCe});var QG=w((E$e,BG)=>{var UCe=As(),HCe=(r,e,t)=>UCe(e,r,t);BG.exports=HCe});var SG=w((I$e,bG)=>{var GCe=As(),YCe=(r,e)=>GCe(r,e,!0);bG.exports=YCe});var OI=w((y$e,xG)=>{var vG=Ti(),jCe=(r,e,t)=>{let i=new vG(r,t),n=new vG(e,t);return i.compare(n)||i.compareBuild(n)};xG.exports=jCe});var DG=w((w$e,PG)=>{var qCe=OI(),JCe=(r,e)=>r.sort((t,i)=>qCe(t,i,e));PG.exports=JCe});var RG=w((B$e,kG)=>{var WCe=OI(),zCe=(r,e)=>r.sort((t,i)=>WCe(i,t,e));kG.exports=zCe});var hd=w((Q$e,FG)=>{var VCe=As(),XCe=(r,e,t)=>VCe(r,e,t)>0;FG.exports=XCe});var MI=w((b$e,NG)=>{var ZCe=As(),_Ce=(r,e,t)=>ZCe(r,e,t)<0;NG.exports=_Ce});var Cv=w((S$e,LG)=>{var $Ce=As(),eme=(r,e,t)=>$Ce(r,e,t)!==0;LG.exports=eme});var KI=w((v$e,TG)=>{var tme=As(),rme=(r,e,t)=>tme(r,e,t)>=0;TG.exports=rme});var UI=w((x$e,OG)=>{var ime=As(),nme=(r,e,t)=>ime(r,e,t)<=0;OG.exports=nme});var mv=w((P$e,MG)=>{var sme=TI(),ome=Cv(),ame=hd(),Ame=KI(),lme=MI(),cme=UI(),ume=(r,e,t,i)=>{switch(e){case"===":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r===t;case"!==":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r!==t;case"":case"=":case"==":return sme(r,t,i);case"!=":return ome(r,t,i);case">":return ame(r,t,i);case">=":return Ame(r,t,i);case"<":return lme(r,t,i);case"<=":return cme(r,t,i);default:throw new TypeError(`Invalid operator: ${e}`)}};MG.exports=ume});var UG=w((D$e,KG)=>{var gme=Ti(),fme=Ac(),{re:HI,t:GI}=ac(),hme=(r,e)=>{if(r instanceof gme)return r;if(typeof r=="number"&&(r=String(r)),typeof r!="string")return null;e=e||{};let t=null;if(!e.rtl)t=r.match(HI[GI.COERCE]);else{let i;for(;(i=HI[GI.COERCERTL].exec(r))&&(!t||t.index+t[0].length!==r.length);)(!t||i.index+i[0].length!==t.index+t[0].length)&&(t=i),HI[GI.COERCERTL].lastIndex=i.index+i[1].length+i[2].length;HI[GI.COERCERTL].lastIndex=-1}return t===null?null:fme(`${t[2]}.${t[3]||"0"}.${t[4]||"0"}`,e)};KG.exports=hme});var GG=w((k$e,HG)=>{"use strict";HG.exports=function(r){r.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var YI=w((R$e,YG)=>{"use strict";YG.exports=Ht;Ht.Node=lc;Ht.create=Ht;function Ht(r){var e=this;if(e instanceof Ht||(e=new Ht),e.tail=null,e.head=null,e.length=0,r&&typeof r.forEach=="function")r.forEach(function(n){e.push(n)});else if(arguments.length>0)for(var t=0,i=arguments.length;t1)t=e;else if(this.head)i=this.head.next,t=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var n=0;i!==null;n++)t=r(t,i.value,n),i=i.next;return t};Ht.prototype.reduceReverse=function(r,e){var t,i=this.tail;if(arguments.length>1)t=e;else if(this.tail)i=this.tail.prev,t=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var n=this.length-1;i!==null;n--)t=r(t,i.value,n),i=i.prev;return t};Ht.prototype.toArray=function(){for(var r=new Array(this.length),e=0,t=this.head;t!==null;e++)r[e]=t.value,t=t.next;return r};Ht.prototype.toArrayReverse=function(){for(var r=new Array(this.length),e=0,t=this.tail;t!==null;e++)r[e]=t.value,t=t.prev;return r};Ht.prototype.slice=function(r,e){e=e||this.length,e<0&&(e+=this.length),r=r||0,r<0&&(r+=this.length);var t=new Ht;if(ethis.length&&(e=this.length);for(var i=0,n=this.head;n!==null&&ithis.length&&(e=this.length);for(var i=this.length,n=this.tail;n!==null&&i>e;i--)n=n.prev;for(;n!==null&&i>r;i--,n=n.prev)t.push(n.value);return t};Ht.prototype.splice=function(r,e,...t){r>this.length&&(r=this.length-1),r<0&&(r=this.length+r);for(var i=0,n=this.head;n!==null&&i{"use strict";var mme=YI(),cc=Symbol("max"),ba=Symbol("length"),jg=Symbol("lengthCalculator"),dd=Symbol("allowStale"),uc=Symbol("maxAge"),Qa=Symbol("dispose"),jG=Symbol("noDisposeOnSet"),di=Symbol("lruList"),Vs=Symbol("cache"),JG=Symbol("updateAgeOnGet"),Ev=()=>1,yv=class{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");let t=this[cc]=e.max||1/0,i=e.length||Ev;if(this[jg]=typeof i!="function"?Ev:i,this[dd]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[uc]=e.maxAge||0,this[Qa]=e.dispose,this[jG]=e.noDisposeOnSet||!1,this[JG]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[cc]=e||1/0,pd(this)}get max(){return this[cc]}set allowStale(e){this[dd]=!!e}get allowStale(){return this[dd]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[uc]=e,pd(this)}get maxAge(){return this[uc]}set lengthCalculator(e){typeof e!="function"&&(e=Ev),e!==this[jg]&&(this[jg]=e,this[ba]=0,this[di].forEach(t=>{t.length=this[jg](t.value,t.key),this[ba]+=t.length})),pd(this)}get lengthCalculator(){return this[jg]}get length(){return this[ba]}get itemCount(){return this[di].length}rforEach(e,t){t=t||this;for(let i=this[di].tail;i!==null;){let n=i.prev;qG(this,e,i,t),i=n}}forEach(e,t){t=t||this;for(let i=this[di].head;i!==null;){let n=i.next;qG(this,e,i,t),i=n}}keys(){return this[di].toArray().map(e=>e.key)}values(){return this[di].toArray().map(e=>e.value)}reset(){this[Qa]&&this[di]&&this[di].length&&this[di].forEach(e=>this[Qa](e.key,e.value)),this[Vs]=new Map,this[di]=new mme,this[ba]=0}dump(){return this[di].map(e=>jI(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[di]}set(e,t,i){if(i=i||this[uc],i&&typeof i!="number")throw new TypeError("maxAge must be a number");let n=i?Date.now():0,s=this[jg](t,e);if(this[Vs].has(e)){if(s>this[cc])return qg(this,this[Vs].get(e)),!1;let l=this[Vs].get(e).value;return this[Qa]&&(this[jG]||this[Qa](e,l.value)),l.now=n,l.maxAge=i,l.value=t,this[ba]+=s-l.length,l.length=s,this.get(e),pd(this),!0}let o=new wv(e,t,s,n,i);return o.length>this[cc]?(this[Qa]&&this[Qa](e,t),!1):(this[ba]+=o.length,this[di].unshift(o),this[Vs].set(e,this[di].head),pd(this),!0)}has(e){if(!this[Vs].has(e))return!1;let t=this[Vs].get(e).value;return!jI(this,t)}get(e){return Iv(this,e,!0)}peek(e){return Iv(this,e,!1)}pop(){let e=this[di].tail;return e?(qg(this,e),e.value):null}del(e){qg(this,this[Vs].get(e))}load(e){this.reset();let t=Date.now();for(let i=e.length-1;i>=0;i--){let n=e[i],s=n.e||0;if(s===0)this.set(n.k,n.v);else{let o=s-t;o>0&&this.set(n.k,n.v,o)}}}prune(){this[Vs].forEach((e,t)=>Iv(this,t,!1))}},Iv=(r,e,t)=>{let i=r[Vs].get(e);if(i){let n=i.value;if(jI(r,n)){if(qg(r,i),!r[dd])return}else t&&(r[JG]&&(i.value.now=Date.now()),r[di].unshiftNode(i));return n.value}},jI=(r,e)=>{if(!e||!e.maxAge&&!r[uc])return!1;let t=Date.now()-e.now;return e.maxAge?t>e.maxAge:r[uc]&&t>r[uc]},pd=r=>{if(r[ba]>r[cc])for(let e=r[di].tail;r[ba]>r[cc]&&e!==null;){let t=e.prev;qg(r,e),e=t}},qg=(r,e)=>{if(e){let t=e.value;r[Qa]&&r[Qa](t.key,t.value),r[ba]-=t.length,r[Vs].delete(t.key),r[di].removeNode(e)}},wv=class{constructor(e,t,i,n,s){this.key=e,this.value=t,this.length=i,this.now=n,this.maxAge=s||0}},qG=(r,e,t,i)=>{let n=t.value;jI(r,n)&&(qg(r,t),r[dd]||(n=void 0)),n&&e.call(i,n.value,n.key,r)};WG.exports=yv});var ls=w((N$e,_G)=>{var gc=class{constructor(e,t){if(t=Ime(t),e instanceof gc)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new gc(e.raw,t);if(e instanceof Bv)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(i=>this.parseRange(i.trim())).filter(i=>i.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){let i=this.set[0];if(this.set=this.set.filter(n=>!XG(n[0])),this.set.length===0)this.set=[i];else if(this.set.length>1){for(let n of this.set)if(n.length===1&&bme(n[0])){this.set=[n];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();let i=`parseRange:${Object.keys(this.options).join(",")}:${e}`,n=VG.get(i);if(n)return n;let s=this.options.loose,o=s?Oi[Qi.HYPHENRANGELOOSE]:Oi[Qi.HYPHENRANGE];e=e.replace(o,Lme(this.options.includePrerelease)),Gr("hyphen replace",e),e=e.replace(Oi[Qi.COMPARATORTRIM],wme),Gr("comparator trim",e,Oi[Qi.COMPARATORTRIM]),e=e.replace(Oi[Qi.TILDETRIM],Bme),e=e.replace(Oi[Qi.CARETTRIM],Qme),e=e.split(/\s+/).join(" ");let a=s?Oi[Qi.COMPARATORLOOSE]:Oi[Qi.COMPARATOR],l=e.split(" ").map(f=>Sme(f,this.options)).join(" ").split(/\s+/).map(f=>Nme(f,this.options)).filter(this.options.loose?f=>!!f.match(a):()=>!0).map(f=>new Bv(f,this.options)),c=l.length,u=new Map;for(let f of l){if(XG(f))return[f];u.set(f.value,f)}u.size>1&&u.has("")&&u.delete("");let g=[...u.values()];return VG.set(i,g),g}intersects(e,t){if(!(e instanceof gc))throw new TypeError("a Range is required");return this.set.some(i=>ZG(i,t)&&e.set.some(n=>ZG(n,t)&&i.every(s=>n.every(o=>s.intersects(o,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new yme(e,this.options)}catch{return!1}for(let t=0;tr.value==="<0.0.0-0",bme=r=>r.value==="",ZG=(r,e)=>{let t=!0,i=r.slice(),n=i.pop();for(;t&&i.length;)t=i.every(s=>n.intersects(s,e)),n=i.pop();return t},Sme=(r,e)=>(Gr("comp",r,e),r=Pme(r,e),Gr("caret",r),r=vme(r,e),Gr("tildes",r),r=kme(r,e),Gr("xrange",r),r=Fme(r,e),Gr("stars",r),r),Zi=r=>!r||r.toLowerCase()==="x"||r==="*",vme=(r,e)=>r.trim().split(/\s+/).map(t=>xme(t,e)).join(" "),xme=(r,e)=>{let t=e.loose?Oi[Qi.TILDELOOSE]:Oi[Qi.TILDE];return r.replace(t,(i,n,s,o,a)=>{Gr("tilde",r,i,n,s,o,a);let l;return Zi(n)?l="":Zi(s)?l=`>=${n}.0.0 <${+n+1}.0.0-0`:Zi(o)?l=`>=${n}.${s}.0 <${n}.${+s+1}.0-0`:a?(Gr("replaceTilde pr",a),l=`>=${n}.${s}.${o}-${a} <${n}.${+s+1}.0-0`):l=`>=${n}.${s}.${o} <${n}.${+s+1}.0-0`,Gr("tilde return",l),l})},Pme=(r,e)=>r.trim().split(/\s+/).map(t=>Dme(t,e)).join(" "),Dme=(r,e)=>{Gr("caret",r,e);let t=e.loose?Oi[Qi.CARETLOOSE]:Oi[Qi.CARET],i=e.includePrerelease?"-0":"";return r.replace(t,(n,s,o,a,l)=>{Gr("caret",r,n,s,o,a,l);let c;return Zi(s)?c="":Zi(o)?c=`>=${s}.0.0${i} <${+s+1}.0.0-0`:Zi(a)?s==="0"?c=`>=${s}.${o}.0${i} <${s}.${+o+1}.0-0`:c=`>=${s}.${o}.0${i} <${+s+1}.0.0-0`:l?(Gr("replaceCaret pr",l),s==="0"?o==="0"?c=`>=${s}.${o}.${a}-${l} <${s}.${o}.${+a+1}-0`:c=`>=${s}.${o}.${a}-${l} <${s}.${+o+1}.0-0`:c=`>=${s}.${o}.${a}-${l} <${+s+1}.0.0-0`):(Gr("no pr"),s==="0"?o==="0"?c=`>=${s}.${o}.${a}${i} <${s}.${o}.${+a+1}-0`:c=`>=${s}.${o}.${a}${i} <${s}.${+o+1}.0-0`:c=`>=${s}.${o}.${a} <${+s+1}.0.0-0`),Gr("caret return",c),c})},kme=(r,e)=>(Gr("replaceXRanges",r,e),r.split(/\s+/).map(t=>Rme(t,e)).join(" ")),Rme=(r,e)=>{r=r.trim();let t=e.loose?Oi[Qi.XRANGELOOSE]:Oi[Qi.XRANGE];return r.replace(t,(i,n,s,o,a,l)=>{Gr("xRange",r,i,n,s,o,a,l);let c=Zi(s),u=c||Zi(o),g=u||Zi(a),f=g;return n==="="&&f&&(n=""),l=e.includePrerelease?"-0":"",c?n===">"||n==="<"?i="<0.0.0-0":i="*":n&&f?(u&&(o=0),a=0,n===">"?(n=">=",u?(s=+s+1,o=0,a=0):(o=+o+1,a=0)):n==="<="&&(n="<",u?s=+s+1:o=+o+1),n==="<"&&(l="-0"),i=`${n+s}.${o}.${a}${l}`):u?i=`>=${s}.0.0${l} <${+s+1}.0.0-0`:g&&(i=`>=${s}.${o}.0${l} <${s}.${+o+1}.0-0`),Gr("xRange return",i),i})},Fme=(r,e)=>(Gr("replaceStars",r,e),r.trim().replace(Oi[Qi.STAR],"")),Nme=(r,e)=>(Gr("replaceGTE0",r,e),r.trim().replace(Oi[e.includePrerelease?Qi.GTE0PRE:Qi.GTE0],"")),Lme=r=>(e,t,i,n,s,o,a,l,c,u,g,f,h)=>(Zi(i)?t="":Zi(n)?t=`>=${i}.0.0${r?"-0":""}`:Zi(s)?t=`>=${i}.${n}.0${r?"-0":""}`:o?t=`>=${t}`:t=`>=${t}${r?"-0":""}`,Zi(c)?l="":Zi(u)?l=`<${+c+1}.0.0-0`:Zi(g)?l=`<${c}.${+u+1}.0-0`:f?l=`<=${c}.${u}.${g}-${f}`:r?l=`<${c}.${u}.${+g+1}-0`:l=`<=${l}`,`${t} ${l}`.trim()),Tme=(r,e,t)=>{for(let i=0;i0){let n=r[i].semver;if(n.major===e.major&&n.minor===e.minor&&n.patch===e.patch)return!0}return!1}return!0}});var Cd=w((L$e,iY)=>{var md=Symbol("SemVer ANY"),Jg=class{static get ANY(){return md}constructor(e,t){if(t=Ome(t),e instanceof Jg){if(e.loose===!!t.loose)return e;e=e.value}bv("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===md?this.value="":this.value=this.operator+this.semver.version,bv("comp",this)}parse(e){let t=this.options.loose?$G[eY.COMPARATORLOOSE]:$G[eY.COMPARATOR],i=e.match(t);if(!i)throw new TypeError(`Invalid comparator: ${e}`);this.operator=i[1]!==void 0?i[1]:"",this.operator==="="&&(this.operator=""),i[2]?this.semver=new tY(i[2],this.options.loose):this.semver=md}toString(){return this.value}test(e){if(bv("Comparator.test",e,this.options.loose),this.semver===md||e===md)return!0;if(typeof e=="string")try{e=new tY(e,this.options)}catch{return!1}return Qv(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Jg))throw new TypeError("a Comparator is required");if((!t||typeof t!="object")&&(t={loose:!!t,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new rY(e.value,t).test(this.value);if(e.operator==="")return e.value===""?!0:new rY(this.value,t).test(e.semver);let i=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">"),n=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<"),s=this.semver.version===e.semver.version,o=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<="),a=Qv(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),l=Qv(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return i||n||s&&o||a||l}};iY.exports=Jg;var Ome=gd(),{re:$G,t:eY}=ac(),Qv=mv(),bv=ud(),tY=Ti(),rY=ls()});var Ed=w((T$e,nY)=>{var Mme=ls(),Kme=(r,e,t)=>{try{e=new Mme(e,t)}catch{return!1}return e.test(r)};nY.exports=Kme});var oY=w((O$e,sY)=>{var Ume=ls(),Hme=(r,e)=>new Ume(r,e).set.map(t=>t.map(i=>i.value).join(" ").trim().split(" "));sY.exports=Hme});var AY=w((M$e,aY)=>{var Gme=Ti(),Yme=ls(),jme=(r,e,t)=>{let i=null,n=null,s=null;try{s=new Yme(e,t)}catch{return null}return r.forEach(o=>{s.test(o)&&(!i||n.compare(o)===-1)&&(i=o,n=new Gme(i,t))}),i};aY.exports=jme});var cY=w((K$e,lY)=>{var qme=Ti(),Jme=ls(),Wme=(r,e,t)=>{let i=null,n=null,s=null;try{s=new Jme(e,t)}catch{return null}return r.forEach(o=>{s.test(o)&&(!i||n.compare(o)===1)&&(i=o,n=new qme(i,t))}),i};lY.exports=Wme});var fY=w((U$e,gY)=>{var Sv=Ti(),zme=ls(),uY=hd(),Vme=(r,e)=>{r=new zme(r,e);let t=new Sv("0.0.0");if(r.test(t)||(t=new Sv("0.0.0-0"),r.test(t)))return t;t=null;for(let i=0;i{let a=new Sv(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!s||uY(a,s))&&(s=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),s&&(!t||uY(t,s))&&(t=s)}return t&&r.test(t)?t:null};gY.exports=Vme});var pY=w((H$e,hY)=>{var Xme=ls(),Zme=(r,e)=>{try{return new Xme(r,e).range||"*"}catch{return null}};hY.exports=Zme});var qI=w((G$e,EY)=>{var _me=Ti(),mY=Cd(),{ANY:$me}=mY,eEe=ls(),tEe=Ed(),dY=hd(),CY=MI(),rEe=UI(),iEe=KI(),nEe=(r,e,t,i)=>{r=new _me(r,i),e=new eEe(e,i);let n,s,o,a,l;switch(t){case">":n=dY,s=rEe,o=CY,a=">",l=">=";break;case"<":n=CY,s=iEe,o=dY,a="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(tEe(r,e,i))return!1;for(let c=0;c{h.semver===$me&&(h=new mY(">=0.0.0")),g=g||h,f=f||h,n(h.semver,g.semver,i)?g=h:o(h.semver,f.semver,i)&&(f=h)}),g.operator===a||g.operator===l||(!f.operator||f.operator===a)&&s(r,f.semver))return!1;if(f.operator===l&&o(r,f.semver))return!1}return!0};EY.exports=nEe});var yY=w((Y$e,IY)=>{var sEe=qI(),oEe=(r,e,t)=>sEe(r,e,">",t);IY.exports=oEe});var BY=w((j$e,wY)=>{var aEe=qI(),AEe=(r,e,t)=>aEe(r,e,"<",t);wY.exports=AEe});var SY=w((q$e,bY)=>{var QY=ls(),lEe=(r,e,t)=>(r=new QY(r,t),e=new QY(e,t),r.intersects(e));bY.exports=lEe});var xY=w((J$e,vY)=>{var cEe=Ed(),uEe=As();vY.exports=(r,e,t)=>{let i=[],n=null,s=null,o=r.sort((u,g)=>uEe(u,g,t));for(let u of o)cEe(u,e,t)?(s=u,n||(n=u)):(s&&i.push([n,s]),s=null,n=null);n&&i.push([n,null]);let a=[];for(let[u,g]of i)u===g?a.push(u):!g&&u===o[0]?a.push("*"):g?u===o[0]?a.push(`<=${g}`):a.push(`${u} - ${g}`):a.push(`>=${u}`);let l=a.join(" || "),c=typeof e.raw=="string"?e.raw:String(e);return l.length{var PY=ls(),JI=Cd(),{ANY:vv}=JI,Id=Ed(),xv=As(),gEe=(r,e,t={})=>{if(r===e)return!0;r=new PY(r,t),e=new PY(e,t);let i=!1;e:for(let n of r.set){for(let s of e.set){let o=fEe(n,s,t);if(i=i||o!==null,o)continue e}if(i)return!1}return!0},fEe=(r,e,t)=>{if(r===e)return!0;if(r.length===1&&r[0].semver===vv){if(e.length===1&&e[0].semver===vv)return!0;t.includePrerelease?r=[new JI(">=0.0.0-0")]:r=[new JI(">=0.0.0")]}if(e.length===1&&e[0].semver===vv){if(t.includePrerelease)return!0;e=[new JI(">=0.0.0")]}let i=new Set,n,s;for(let h of r)h.operator===">"||h.operator===">="?n=DY(n,h,t):h.operator==="<"||h.operator==="<="?s=kY(s,h,t):i.add(h.semver);if(i.size>1)return null;let o;if(n&&s){if(o=xv(n.semver,s.semver,t),o>0)return null;if(o===0&&(n.operator!==">="||s.operator!=="<="))return null}for(let h of i){if(n&&!Id(h,String(n),t)||s&&!Id(h,String(s),t))return null;for(let p of e)if(!Id(h,String(p),t))return!1;return!0}let a,l,c,u,g=s&&!t.includePrerelease&&s.semver.prerelease.length?s.semver:!1,f=n&&!t.includePrerelease&&n.semver.prerelease.length?n.semver:!1;g&&g.prerelease.length===1&&s.operator==="<"&&g.prerelease[0]===0&&(g=!1);for(let h of e){if(u=u||h.operator===">"||h.operator===">=",c=c||h.operator==="<"||h.operator==="<=",n){if(f&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===f.major&&h.semver.minor===f.minor&&h.semver.patch===f.patch&&(f=!1),h.operator===">"||h.operator===">="){if(a=DY(n,h,t),a===h&&a!==n)return!1}else if(n.operator===">="&&!Id(n.semver,String(h),t))return!1}if(s){if(g&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===g.major&&h.semver.minor===g.minor&&h.semver.patch===g.patch&&(g=!1),h.operator==="<"||h.operator==="<="){if(l=kY(s,h,t),l===h&&l!==s)return!1}else if(s.operator==="<="&&!Id(s.semver,String(h),t))return!1}if(!h.operator&&(s||n)&&o!==0)return!1}return!(n&&c&&!s&&o!==0||s&&u&&!n&&o!==0||f||g)},DY=(r,e,t)=>{if(!r)return e;let i=xv(r.semver,e.semver,t);return i>0?r:i<0||e.operator===">"&&r.operator===">="?e:r},kY=(r,e,t)=>{if(!r)return e;let i=xv(r.semver,e.semver,t);return i<0?r:i>0||e.operator==="<"&&r.operator==="<="?e:r};RY.exports=gEe});var Xr=w((z$e,NY)=>{var Pv=ac();NY.exports={re:Pv.re,src:Pv.src,tokens:Pv.t,SEMVER_SPEC_VERSION:cd().SEMVER_SPEC_VERSION,SemVer:Ti(),compareIdentifiers:FI().compareIdentifiers,rcompareIdentifiers:FI().rcompareIdentifiers,parse:Ac(),valid:nG(),clean:oG(),inc:AG(),diff:hG(),major:dG(),minor:mG(),patch:IG(),prerelease:wG(),compare:As(),rcompare:QG(),compareLoose:SG(),compareBuild:OI(),sort:DG(),rsort:RG(),gt:hd(),lt:MI(),eq:TI(),neq:Cv(),gte:KI(),lte:UI(),cmp:mv(),coerce:UG(),Comparator:Cd(),Range:ls(),satisfies:Ed(),toComparators:oY(),maxSatisfying:AY(),minSatisfying:cY(),minVersion:fY(),validRange:pY(),outside:qI(),gtr:yY(),ltr:BY(),intersects:SY(),simplifyRange:xY(),subset:FY()}});var Dv=w(WI=>{"use strict";Object.defineProperty(WI,"__esModule",{value:!0});WI.VERSION=void 0;WI.VERSION="9.1.0"});var Gt=w((exports,module)=>{"use strict";var __spreadArray=exports&&exports.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var i=0,n=e.length,s;i{(function(r,e){typeof define=="function"&&define.amd?define([],e):typeof zI=="object"&&zI.exports?zI.exports=e():r.regexpToAst=e()})(typeof self<"u"?self:LY,function(){function r(){}r.prototype.saveState=function(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}},r.prototype.restoreState=function(p){this.idx=p.idx,this.input=p.input,this.groupIdx=p.groupIdx},r.prototype.pattern=function(p){this.idx=0,this.input=p,this.groupIdx=0,this.consumeChar("/");var C=this.disjunction();this.consumeChar("/");for(var y={type:"Flags",loc:{begin:this.idx,end:p.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};this.isRegExpFlag();)switch(this.popChar()){case"g":o(y,"global");break;case"i":o(y,"ignoreCase");break;case"m":o(y,"multiLine");break;case"u":o(y,"unicode");break;case"y":o(y,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:y,value:C,loc:this.loc(0)}},r.prototype.disjunction=function(){var p=[],C=this.idx;for(p.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),p.push(this.alternative());return{type:"Disjunction",value:p,loc:this.loc(C)}},r.prototype.alternative=function(){for(var p=[],C=this.idx;this.isTerm();)p.push(this.term());return{type:"Alternative",value:p,loc:this.loc(C)}},r.prototype.term=function(){return this.isAssertion()?this.assertion():this.atom()},r.prototype.assertion=function(){var p=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(p)};case"$":return{type:"EndAnchor",loc:this.loc(p)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(p)};case"B":return{type:"NonWordBoundary",loc:this.loc(p)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");var C;switch(this.popChar()){case"=":C="Lookahead";break;case"!":C="NegativeLookahead";break}a(C);var y=this.disjunction();return this.consumeChar(")"),{type:C,value:y,loc:this.loc(p)}}l()},r.prototype.quantifier=function(p){var C,y=this.idx;switch(this.popChar()){case"*":C={atLeast:0,atMost:1/0};break;case"+":C={atLeast:1,atMost:1/0};break;case"?":C={atLeast:0,atMost:1};break;case"{":var B=this.integerIncludingZero();switch(this.popChar()){case"}":C={atLeast:B,atMost:B};break;case",":var v;this.isDigit()?(v=this.integerIncludingZero(),C={atLeast:B,atMost:v}):C={atLeast:B,atMost:1/0},this.consumeChar("}");break}if(p===!0&&C===void 0)return;a(C);break}if(!(p===!0&&C===void 0))return a(C),this.peekChar(0)==="?"?(this.consumeChar("?"),C.greedy=!1):C.greedy=!0,C.type="Quantifier",C.loc=this.loc(y),C},r.prototype.atom=function(){var p,C=this.idx;switch(this.peekChar()){case".":p=this.dotAll();break;case"\\":p=this.atomEscape();break;case"[":p=this.characterClass();break;case"(":p=this.group();break}return p===void 0&&this.isPatternCharacter()&&(p=this.patternCharacter()),a(p),p.loc=this.loc(C),this.isQuantifier()&&(p.quantifier=this.quantifier()),p},r.prototype.dotAll=function(){return this.consumeChar("."),{type:"Set",complement:!0,value:[n(` +`),n("\r"),n("\u2028"),n("\u2029")]}},r.prototype.atomEscape=function(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}},r.prototype.decimalEscapeAtom=function(){var p=this.positiveInteger();return{type:"GroupBackReference",value:p}},r.prototype.characterClassEscape=function(){var p,C=!1;switch(this.popChar()){case"d":p=u;break;case"D":p=u,C=!0;break;case"s":p=f;break;case"S":p=f,C=!0;break;case"w":p=g;break;case"W":p=g,C=!0;break}return a(p),{type:"Set",value:p,complement:C}},r.prototype.controlEscapeAtom=function(){var p;switch(this.popChar()){case"f":p=n("\f");break;case"n":p=n(` +`);break;case"r":p=n("\r");break;case"t":p=n(" ");break;case"v":p=n("\v");break}return a(p),{type:"Character",value:p}},r.prototype.controlLetterEscapeAtom=function(){this.consumeChar("c");var p=this.popChar();if(/[a-zA-Z]/.test(p)===!1)throw Error("Invalid ");var C=p.toUpperCase().charCodeAt(0)-64;return{type:"Character",value:C}},r.prototype.nulCharacterAtom=function(){return this.consumeChar("0"),{type:"Character",value:n("\0")}},r.prototype.hexEscapeSequenceAtom=function(){return this.consumeChar("x"),this.parseHexDigits(2)},r.prototype.regExpUnicodeEscapeSequenceAtom=function(){return this.consumeChar("u"),this.parseHexDigits(4)},r.prototype.identityEscapeAtom=function(){var p=this.popChar();return{type:"Character",value:n(p)}},r.prototype.classPatternCharacterAtom=function(){switch(this.peekChar()){case` +`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:var p=this.popChar();return{type:"Character",value:n(p)}}},r.prototype.characterClass=function(){var p=[],C=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),C=!0);this.isClassAtom();){var y=this.classAtom(),B=y.type==="Character";if(B&&this.isRangeDash()){this.consumeChar("-");var v=this.classAtom(),D=v.type==="Character";if(D){if(v.value=this.input.length)throw Error("Unexpected end of input");this.idx++},r.prototype.loc=function(p){return{begin:p,end:this.idx}};var e=/[0-9a-fA-F]/,t=/[0-9]/,i=/[1-9]/;function n(p){return p.charCodeAt(0)}function s(p,C){p.length!==void 0?p.forEach(function(y){C.push(y)}):C.push(p)}function o(p,C){if(p[C]===!0)throw"duplicate flag "+C;p[C]=!0}function a(p){if(p===void 0)throw Error("Internal Error - Should never get here!")}function l(){throw Error("Internal Error - Should never get here!")}var c,u=[];for(c=n("0");c<=n("9");c++)u.push(c);var g=[n("_")].concat(u);for(c=n("a");c<=n("z");c++)g.push(c);for(c=n("A");c<=n("Z");c++)g.push(c);var f=[n(" "),n("\f"),n(` +`),n("\r"),n(" "),n("\v"),n(" "),n("\xA0"),n("\u1680"),n("\u2000"),n("\u2001"),n("\u2002"),n("\u2003"),n("\u2004"),n("\u2005"),n("\u2006"),n("\u2007"),n("\u2008"),n("\u2009"),n("\u200A"),n("\u2028"),n("\u2029"),n("\u202F"),n("\u205F"),n("\u3000"),n("\uFEFF")];function h(){}return h.prototype.visitChildren=function(p){for(var C in p){var y=p[C];p.hasOwnProperty(C)&&(y.type!==void 0?this.visit(y):Array.isArray(y)&&y.forEach(function(B){this.visit(B)},this))}},h.prototype.visit=function(p){switch(p.type){case"Pattern":this.visitPattern(p);break;case"Flags":this.visitFlags(p);break;case"Disjunction":this.visitDisjunction(p);break;case"Alternative":this.visitAlternative(p);break;case"StartAnchor":this.visitStartAnchor(p);break;case"EndAnchor":this.visitEndAnchor(p);break;case"WordBoundary":this.visitWordBoundary(p);break;case"NonWordBoundary":this.visitNonWordBoundary(p);break;case"Lookahead":this.visitLookahead(p);break;case"NegativeLookahead":this.visitNegativeLookahead(p);break;case"Character":this.visitCharacter(p);break;case"Set":this.visitSet(p);break;case"Group":this.visitGroup(p);break;case"GroupBackReference":this.visitGroupBackReference(p);break;case"Quantifier":this.visitQuantifier(p);break}this.visitChildren(p)},h.prototype.visitPattern=function(p){},h.prototype.visitFlags=function(p){},h.prototype.visitDisjunction=function(p){},h.prototype.visitAlternative=function(p){},h.prototype.visitStartAnchor=function(p){},h.prototype.visitEndAnchor=function(p){},h.prototype.visitWordBoundary=function(p){},h.prototype.visitNonWordBoundary=function(p){},h.prototype.visitLookahead=function(p){},h.prototype.visitNegativeLookahead=function(p){},h.prototype.visitCharacter=function(p){},h.prototype.visitSet=function(p){},h.prototype.visitGroup=function(p){},h.prototype.visitGroupBackReference=function(p){},h.prototype.visitQuantifier=function(p){},{RegExpParser:r,BaseRegExpVisitor:h,VERSION:"0.5.0"}})});var ZI=w(Wg=>{"use strict";Object.defineProperty(Wg,"__esModule",{value:!0});Wg.clearRegExpParserCache=Wg.getRegExpAst=void 0;var hEe=VI(),XI={},pEe=new hEe.RegExpParser;function dEe(r){var e=r.toString();if(XI.hasOwnProperty(e))return XI[e];var t=pEe.pattern(e);return XI[e]=t,t}Wg.getRegExpAst=dEe;function CEe(){XI={}}Wg.clearRegExpParserCache=CEe});var UY=w(pn=>{"use strict";var mEe=pn&&pn.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(pn,"__esModule",{value:!0});pn.canMatchCharCode=pn.firstCharOptimizedIndices=pn.getOptimizedStartCodesIndices=pn.failedOptimizationPrefixMsg=void 0;var OY=VI(),cs=Gt(),MY=ZI(),Sa=Rv(),KY="Complement Sets are not supported for first char optimization";pn.failedOptimizationPrefixMsg=`Unable to use "first char" lexer optimizations: +`;function EEe(r,e){e===void 0&&(e=!1);try{var t=(0,MY.getRegExpAst)(r),i=$I(t.value,{},t.flags.ignoreCase);return i}catch(s){if(s.message===KY)e&&(0,cs.PRINT_WARNING)(""+pn.failedOptimizationPrefixMsg+(" Unable to optimize: < "+r.toString()+` > +`)+` Complement Sets cannot be automatically optimized. + This will disable the lexer's first char optimizations. + See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{var n="";e&&(n=` + This will disable the lexer's first char optimizations. + See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),(0,cs.PRINT_ERROR)(pn.failedOptimizationPrefixMsg+` +`+(" Failed parsing: < "+r.toString()+` > +`)+(" Using the regexp-to-ast library version: "+OY.VERSION+` +`)+" Please open an issue at: https://github.com/bd82/regexp-to-ast/issues"+n)}}return[]}pn.getOptimizedStartCodesIndices=EEe;function $I(r,e,t){switch(r.type){case"Disjunction":for(var i=0;i=Sa.minOptimizationVal)for(var f=u.from>=Sa.minOptimizationVal?u.from:Sa.minOptimizationVal,h=u.to,p=(0,Sa.charCodeToOptimizedIndex)(f),C=(0,Sa.charCodeToOptimizedIndex)(h),y=p;y<=C;y++)e[y]=y}}});break;case"Group":$I(o.value,e,t);break;default:throw Error("Non Exhaustive Match")}var a=o.quantifier!==void 0&&o.quantifier.atLeast===0;if(o.type==="Group"&&kv(o)===!1||o.type!=="Group"&&a===!1)break}break;default:throw Error("non exhaustive match!")}return(0,cs.values)(e)}pn.firstCharOptimizedIndices=$I;function _I(r,e,t){var i=(0,Sa.charCodeToOptimizedIndex)(r);e[i]=i,t===!0&&IEe(r,e)}function IEe(r,e){var t=String.fromCharCode(r),i=t.toUpperCase();if(i!==t){var n=(0,Sa.charCodeToOptimizedIndex)(i.charCodeAt(0));e[n]=n}else{var s=t.toLowerCase();if(s!==t){var n=(0,Sa.charCodeToOptimizedIndex)(s.charCodeAt(0));e[n]=n}}}function TY(r,e){return(0,cs.find)(r.value,function(t){if(typeof t=="number")return(0,cs.contains)(e,t);var i=t;return(0,cs.find)(e,function(n){return i.from<=n&&n<=i.to})!==void 0})}function kv(r){return r.quantifier&&r.quantifier.atLeast===0?!0:r.value?(0,cs.isArray)(r.value)?(0,cs.every)(r.value,kv):kv(r.value):!1}var yEe=function(r){mEe(e,r);function e(t){var i=r.call(this)||this;return i.targetCharCodes=t,i.found=!1,i}return e.prototype.visitChildren=function(t){if(this.found!==!0){switch(t.type){case"Lookahead":this.visitLookahead(t);return;case"NegativeLookahead":this.visitNegativeLookahead(t);return}r.prototype.visitChildren.call(this,t)}},e.prototype.visitCharacter=function(t){(0,cs.contains)(this.targetCharCodes,t.value)&&(this.found=!0)},e.prototype.visitSet=function(t){t.complement?TY(t,this.targetCharCodes)===void 0&&(this.found=!0):TY(t,this.targetCharCodes)!==void 0&&(this.found=!0)},e}(OY.BaseRegExpVisitor);function wEe(r,e){if(e instanceof RegExp){var t=(0,MY.getRegExpAst)(e),i=new yEe(r);return i.visit(t),i.found}else return(0,cs.find)(e,function(n){return(0,cs.contains)(r,n.charCodeAt(0))})!==void 0}pn.canMatchCharCode=wEe});var Rv=w(Ve=>{"use strict";var HY=Ve&&Ve.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Ve,"__esModule",{value:!0});Ve.charCodeToOptimizedIndex=Ve.minOptimizationVal=Ve.buildLineBreakIssueMessage=Ve.LineTerminatorOptimizedTester=Ve.isShortPattern=Ve.isCustomPattern=Ve.cloneEmptyGroups=Ve.performWarningRuntimeChecks=Ve.performRuntimeChecks=Ve.addStickyFlag=Ve.addStartOfInput=Ve.findUnreachablePatterns=Ve.findModesThatDoNotExist=Ve.findInvalidGroupType=Ve.findDuplicatePatterns=Ve.findUnsupportedFlags=Ve.findStartOfInputAnchor=Ve.findEmptyMatchRegExps=Ve.findEndOfInputAnchor=Ve.findInvalidPatterns=Ve.findMissingPatterns=Ve.validatePatterns=Ve.analyzeTokenTypes=Ve.enableSticky=Ve.disableSticky=Ve.SUPPORT_STICKY=Ve.MODES=Ve.DEFAULT_MODE=void 0;var GY=VI(),ir=yd(),xe=Gt(),zg=UY(),YY=ZI(),Do="PATTERN";Ve.DEFAULT_MODE="defaultMode";Ve.MODES="modes";Ve.SUPPORT_STICKY=typeof new RegExp("(?:)").sticky=="boolean";function BEe(){Ve.SUPPORT_STICKY=!1}Ve.disableSticky=BEe;function QEe(){Ve.SUPPORT_STICKY=!0}Ve.enableSticky=QEe;function bEe(r,e){e=(0,xe.defaults)(e,{useSticky:Ve.SUPPORT_STICKY,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",` +`],tracer:function(v,D){return D()}});var t=e.tracer;t("initCharCodeToOptimizedIndexMap",function(){LEe()});var i;t("Reject Lexer.NA",function(){i=(0,xe.reject)(r,function(v){return v[Do]===ir.Lexer.NA})});var n=!1,s;t("Transform Patterns",function(){n=!1,s=(0,xe.map)(i,function(v){var D=v[Do];if((0,xe.isRegExp)(D)){var L=D.source;return L.length===1&&L!=="^"&&L!=="$"&&L!=="."&&!D.ignoreCase?L:L.length===2&&L[0]==="\\"&&!(0,xe.contains)(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],L[1])?L[1]:e.useSticky?Lv(D):Nv(D)}else{if((0,xe.isFunction)(D))return n=!0,{exec:D};if((0,xe.has)(D,"exec"))return n=!0,D;if(typeof D=="string"){if(D.length===1)return D;var H=D.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),j=new RegExp(H);return e.useSticky?Lv(j):Nv(j)}else throw Error("non exhaustive match")}})});var o,a,l,c,u;t("misc mapping",function(){o=(0,xe.map)(i,function(v){return v.tokenTypeIdx}),a=(0,xe.map)(i,function(v){var D=v.GROUP;if(D!==ir.Lexer.SKIPPED){if((0,xe.isString)(D))return D;if((0,xe.isUndefined)(D))return!1;throw Error("non exhaustive match")}}),l=(0,xe.map)(i,function(v){var D=v.LONGER_ALT;if(D){var L=(0,xe.isArray)(D)?(0,xe.map)(D,function(H){return(0,xe.indexOf)(i,H)}):[(0,xe.indexOf)(i,D)];return L}}),c=(0,xe.map)(i,function(v){return v.PUSH_MODE}),u=(0,xe.map)(i,function(v){return(0,xe.has)(v,"POP_MODE")})});var g;t("Line Terminator Handling",function(){var v=ij(e.lineTerminatorCharacters);g=(0,xe.map)(i,function(D){return!1}),e.positionTracking!=="onlyOffset"&&(g=(0,xe.map)(i,function(D){if((0,xe.has)(D,"LINE_BREAKS"))return D.LINE_BREAKS;if(tj(D,v)===!1)return(0,zg.canMatchCharCode)(v,D.PATTERN)}))});var f,h,p,C;t("Misc Mapping #2",function(){f=(0,xe.map)(i,Ov),h=(0,xe.map)(s,ej),p=(0,xe.reduce)(i,function(v,D){var L=D.GROUP;return(0,xe.isString)(L)&&L!==ir.Lexer.SKIPPED&&(v[L]=[]),v},{}),C=(0,xe.map)(s,function(v,D){return{pattern:s[D],longerAlt:l[D],canLineTerminator:g[D],isCustom:f[D],short:h[D],group:a[D],push:c[D],pop:u[D],tokenTypeIdx:o[D],tokenType:i[D]}})});var y=!0,B=[];return e.safeMode||t("First Char Optimization",function(){B=(0,xe.reduce)(i,function(v,D,L){if(typeof D.PATTERN=="string"){var H=D.PATTERN.charCodeAt(0),j=Tv(H);Fv(v,j,C[L])}else if((0,xe.isArray)(D.START_CHARS_HINT)){var $;(0,xe.forEach)(D.START_CHARS_HINT,function(W){var _=typeof W=="string"?W.charCodeAt(0):W,A=Tv(_);$!==A&&($=A,Fv(v,A,C[L]))})}else if((0,xe.isRegExp)(D.PATTERN))if(D.PATTERN.unicode)y=!1,e.ensureOptimizations&&(0,xe.PRINT_ERROR)(""+zg.failedOptimizationPrefixMsg+(" Unable to analyze < "+D.PATTERN.toString()+` > pattern. +`)+` The regexp unicode flag is not currently supported by the regexp-to-ast library. + This will disable the lexer's first char optimizations. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{var V=(0,zg.getOptimizedStartCodesIndices)(D.PATTERN,e.ensureOptimizations);(0,xe.isEmpty)(V)&&(y=!1),(0,xe.forEach)(V,function(W){Fv(v,W,C[L])})}else e.ensureOptimizations&&(0,xe.PRINT_ERROR)(""+zg.failedOptimizationPrefixMsg+(" TokenType: <"+D.name+`> is using a custom token pattern without providing parameter. +`)+` This will disable the lexer's first char optimizations. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),y=!1;return v},[])}),t("ArrayPacking",function(){B=(0,xe.packArray)(B)}),{emptyGroups:p,patternIdxToConfig:C,charCodeToPatternIdxToConfig:B,hasCustom:n,canBeOptimized:y}}Ve.analyzeTokenTypes=bEe;function SEe(r,e){var t=[],i=jY(r);t=t.concat(i.errors);var n=qY(i.valid),s=n.valid;return t=t.concat(n.errors),t=t.concat(vEe(s)),t=t.concat(ZY(s)),t=t.concat(_Y(s,e)),t=t.concat($Y(s)),t}Ve.validatePatterns=SEe;function vEe(r){var e=[],t=(0,xe.filter)(r,function(i){return(0,xe.isRegExp)(i[Do])});return e=e.concat(JY(t)),e=e.concat(zY(t)),e=e.concat(VY(t)),e=e.concat(XY(t)),e=e.concat(WY(t)),e}function jY(r){var e=(0,xe.filter)(r,function(n){return!(0,xe.has)(n,Do)}),t=(0,xe.map)(e,function(n){return{message:"Token Type: ->"+n.name+"<- missing static 'PATTERN' property",type:ir.LexerDefinitionErrorType.MISSING_PATTERN,tokenTypes:[n]}}),i=(0,xe.difference)(r,e);return{errors:t,valid:i}}Ve.findMissingPatterns=jY;function qY(r){var e=(0,xe.filter)(r,function(n){var s=n[Do];return!(0,xe.isRegExp)(s)&&!(0,xe.isFunction)(s)&&!(0,xe.has)(s,"exec")&&!(0,xe.isString)(s)}),t=(0,xe.map)(e,function(n){return{message:"Token Type: ->"+n.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:ir.LexerDefinitionErrorType.INVALID_PATTERN,tokenTypes:[n]}}),i=(0,xe.difference)(r,e);return{errors:t,valid:i}}Ve.findInvalidPatterns=qY;var xEe=/[^\\][\$]/;function JY(r){var e=function(n){HY(s,n);function s(){var o=n!==null&&n.apply(this,arguments)||this;return o.found=!1,o}return s.prototype.visitEndAnchor=function(o){this.found=!0},s}(GY.BaseRegExpVisitor),t=(0,xe.filter)(r,function(n){var s=n[Do];try{var o=(0,YY.getRegExpAst)(s),a=new e;return a.visit(o),a.found}catch{return xEe.test(s.source)}}),i=(0,xe.map)(t,function(n){return{message:`Unexpected RegExp Anchor Error: + Token Type: ->`+n.name+`<- static 'PATTERN' cannot contain end of input anchor '$' + See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:ir.LexerDefinitionErrorType.EOI_ANCHOR_FOUND,tokenTypes:[n]}});return i}Ve.findEndOfInputAnchor=JY;function WY(r){var e=(0,xe.filter)(r,function(i){var n=i[Do];return n.test("")}),t=(0,xe.map)(e,function(i){return{message:"Token Type: ->"+i.name+"<- static 'PATTERN' must not match an empty string",type:ir.LexerDefinitionErrorType.EMPTY_MATCH_PATTERN,tokenTypes:[i]}});return t}Ve.findEmptyMatchRegExps=WY;var PEe=/[^\\[][\^]|^\^/;function zY(r){var e=function(n){HY(s,n);function s(){var o=n!==null&&n.apply(this,arguments)||this;return o.found=!1,o}return s.prototype.visitStartAnchor=function(o){this.found=!0},s}(GY.BaseRegExpVisitor),t=(0,xe.filter)(r,function(n){var s=n[Do];try{var o=(0,YY.getRegExpAst)(s),a=new e;return a.visit(o),a.found}catch{return PEe.test(s.source)}}),i=(0,xe.map)(t,function(n){return{message:`Unexpected RegExp Anchor Error: + Token Type: ->`+n.name+`<- static 'PATTERN' cannot contain start of input anchor '^' + See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:ir.LexerDefinitionErrorType.SOI_ANCHOR_FOUND,tokenTypes:[n]}});return i}Ve.findStartOfInputAnchor=zY;function VY(r){var e=(0,xe.filter)(r,function(i){var n=i[Do];return n instanceof RegExp&&(n.multiline||n.global)}),t=(0,xe.map)(e,function(i){return{message:"Token Type: ->"+i.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:ir.LexerDefinitionErrorType.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[i]}});return t}Ve.findUnsupportedFlags=VY;function XY(r){var e=[],t=(0,xe.map)(r,function(s){return(0,xe.reduce)(r,function(o,a){return s.PATTERN.source===a.PATTERN.source&&!(0,xe.contains)(e,a)&&a.PATTERN!==ir.Lexer.NA&&(e.push(a),o.push(a)),o},[])});t=(0,xe.compact)(t);var i=(0,xe.filter)(t,function(s){return s.length>1}),n=(0,xe.map)(i,function(s){var o=(0,xe.map)(s,function(l){return l.name}),a=(0,xe.first)(s).PATTERN;return{message:"The same RegExp pattern ->"+a+"<-"+("has been used in all of the following Token Types: "+o.join(", ")+" <-"),type:ir.LexerDefinitionErrorType.DUPLICATE_PATTERNS_FOUND,tokenTypes:s}});return n}Ve.findDuplicatePatterns=XY;function ZY(r){var e=(0,xe.filter)(r,function(i){if(!(0,xe.has)(i,"GROUP"))return!1;var n=i.GROUP;return n!==ir.Lexer.SKIPPED&&n!==ir.Lexer.NA&&!(0,xe.isString)(n)}),t=(0,xe.map)(e,function(i){return{message:"Token Type: ->"+i.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:ir.LexerDefinitionErrorType.INVALID_GROUP_TYPE_FOUND,tokenTypes:[i]}});return t}Ve.findInvalidGroupType=ZY;function _Y(r,e){var t=(0,xe.filter)(r,function(n){return n.PUSH_MODE!==void 0&&!(0,xe.contains)(e,n.PUSH_MODE)}),i=(0,xe.map)(t,function(n){var s="Token Type: ->"+n.name+"<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->"+n.PUSH_MODE+"<-which does not exist";return{message:s,type:ir.LexerDefinitionErrorType.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[n]}});return i}Ve.findModesThatDoNotExist=_Y;function $Y(r){var e=[],t=(0,xe.reduce)(r,function(i,n,s){var o=n.PATTERN;return o===ir.Lexer.NA||((0,xe.isString)(o)?i.push({str:o,idx:s,tokenType:n}):(0,xe.isRegExp)(o)&&kEe(o)&&i.push({str:o.source,idx:s,tokenType:n})),i},[]);return(0,xe.forEach)(r,function(i,n){(0,xe.forEach)(t,function(s){var o=s.str,a=s.idx,l=s.tokenType;if(n"+i.name+"<-")+`in the lexer's definition. +See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;e.push({message:c,type:ir.LexerDefinitionErrorType.UNREACHABLE_PATTERN,tokenTypes:[i,l]})}})}),e}Ve.findUnreachablePatterns=$Y;function DEe(r,e){if((0,xe.isRegExp)(e)){var t=e.exec(r);return t!==null&&t.index===0}else{if((0,xe.isFunction)(e))return e(r,0,[],{});if((0,xe.has)(e,"exec"))return e.exec(r,0,[],{});if(typeof e=="string")return e===r;throw Error("non exhaustive match")}}function kEe(r){var e=[".","\\","[","]","|","^","$","(",")","?","*","+","{"];return(0,xe.find)(e,function(t){return r.source.indexOf(t)!==-1})===void 0}function Nv(r){var e=r.ignoreCase?"i":"";return new RegExp("^(?:"+r.source+")",e)}Ve.addStartOfInput=Nv;function Lv(r){var e=r.ignoreCase?"iy":"y";return new RegExp(""+r.source,e)}Ve.addStickyFlag=Lv;function REe(r,e,t){var i=[];return(0,xe.has)(r,Ve.DEFAULT_MODE)||i.push({message:"A MultiMode Lexer cannot be initialized without a <"+Ve.DEFAULT_MODE+`> property in its definition +`,type:ir.LexerDefinitionErrorType.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),(0,xe.has)(r,Ve.MODES)||i.push({message:"A MultiMode Lexer cannot be initialized without a <"+Ve.MODES+`> property in its definition +`,type:ir.LexerDefinitionErrorType.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),(0,xe.has)(r,Ve.MODES)&&(0,xe.has)(r,Ve.DEFAULT_MODE)&&!(0,xe.has)(r.modes,r.defaultMode)&&i.push({message:"A MultiMode Lexer cannot be initialized with a "+Ve.DEFAULT_MODE+": <"+r.defaultMode+`>which does not exist +`,type:ir.LexerDefinitionErrorType.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),(0,xe.has)(r,Ve.MODES)&&(0,xe.forEach)(r.modes,function(n,s){(0,xe.forEach)(n,function(o,a){(0,xe.isUndefined)(o)&&i.push({message:"A Lexer cannot be initialized using an undefined Token Type. Mode:"+("<"+s+"> at index: <"+a+`> +`),type:ir.LexerDefinitionErrorType.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED})})}),i}Ve.performRuntimeChecks=REe;function FEe(r,e,t){var i=[],n=!1,s=(0,xe.compact)((0,xe.flatten)((0,xe.mapValues)(r.modes,function(l){return l}))),o=(0,xe.reject)(s,function(l){return l[Do]===ir.Lexer.NA}),a=ij(t);return e&&(0,xe.forEach)(o,function(l){var c=tj(l,a);if(c!==!1){var u=rj(l,c),g={message:u,type:c.issue,tokenType:l};i.push(g)}else(0,xe.has)(l,"LINE_BREAKS")?l.LINE_BREAKS===!0&&(n=!0):(0,zg.canMatchCharCode)(a,l.PATTERN)&&(n=!0)}),e&&!n&&i.push({message:`Warning: No LINE_BREAKS Found. + This Lexer has been defined to track line and column information, + But none of the Token Types can be identified as matching a line terminator. + See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS + for details.`,type:ir.LexerDefinitionErrorType.NO_LINE_BREAKS_FLAGS}),i}Ve.performWarningRuntimeChecks=FEe;function NEe(r){var e={},t=(0,xe.keys)(r);return(0,xe.forEach)(t,function(i){var n=r[i];if((0,xe.isArray)(n))e[i]=[];else throw Error("non exhaustive match")}),e}Ve.cloneEmptyGroups=NEe;function Ov(r){var e=r.PATTERN;if((0,xe.isRegExp)(e))return!1;if((0,xe.isFunction)(e))return!0;if((0,xe.has)(e,"exec"))return!0;if((0,xe.isString)(e))return!1;throw Error("non exhaustive match")}Ve.isCustomPattern=Ov;function ej(r){return(0,xe.isString)(r)&&r.length===1?r.charCodeAt(0):!1}Ve.isShortPattern=ej;Ve.LineTerminatorOptimizedTester={test:function(r){for(var e=r.length,t=this.lastIndex;t Token Type +`)+(" Root cause: "+e.errMsg+`. +`)+" For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR";if(e.issue===ir.LexerDefinitionErrorType.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the option. +`+(" The problem is in the <"+r.name+`> Token Type +`)+" For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK";throw Error("non exhaustive match")}Ve.buildLineBreakIssueMessage=rj;function ij(r){var e=(0,xe.map)(r,function(t){return(0,xe.isString)(t)&&t.length>0?t.charCodeAt(0):t});return e}function Fv(r,e,t){r[e]===void 0?r[e]=[t]:r[e].push(t)}Ve.minOptimizationVal=256;var ey=[];function Tv(r){return r255?255+~~(r/255):r}}});var Vg=w(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.isTokenType=Nt.hasExtendingTokensTypesMapProperty=Nt.hasExtendingTokensTypesProperty=Nt.hasCategoriesProperty=Nt.hasShortKeyProperty=Nt.singleAssignCategoriesToksMap=Nt.assignCategoriesMapProp=Nt.assignCategoriesTokensProp=Nt.assignTokenDefaultProps=Nt.expandCategories=Nt.augmentTokenTypes=Nt.tokenIdxToClass=Nt.tokenShortNameIdx=Nt.tokenStructuredMatcherNoCategories=Nt.tokenStructuredMatcher=void 0;var Zr=Gt();function TEe(r,e){var t=r.tokenTypeIdx;return t===e.tokenTypeIdx?!0:e.isParent===!0&&e.categoryMatchesMap[t]===!0}Nt.tokenStructuredMatcher=TEe;function OEe(r,e){return r.tokenTypeIdx===e.tokenTypeIdx}Nt.tokenStructuredMatcherNoCategories=OEe;Nt.tokenShortNameIdx=1;Nt.tokenIdxToClass={};function MEe(r){var e=nj(r);sj(e),aj(e),oj(e),(0,Zr.forEach)(e,function(t){t.isParent=t.categoryMatches.length>0})}Nt.augmentTokenTypes=MEe;function nj(r){for(var e=(0,Zr.cloneArr)(r),t=r,i=!0;i;){t=(0,Zr.compact)((0,Zr.flatten)((0,Zr.map)(t,function(s){return s.CATEGORIES})));var n=(0,Zr.difference)(t,e);e=e.concat(n),(0,Zr.isEmpty)(n)?i=!1:t=n}return e}Nt.expandCategories=nj;function sj(r){(0,Zr.forEach)(r,function(e){Aj(e)||(Nt.tokenIdxToClass[Nt.tokenShortNameIdx]=e,e.tokenTypeIdx=Nt.tokenShortNameIdx++),Mv(e)&&!(0,Zr.isArray)(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),Mv(e)||(e.CATEGORIES=[]),lj(e)||(e.categoryMatches=[]),cj(e)||(e.categoryMatchesMap={})})}Nt.assignTokenDefaultProps=sj;function oj(r){(0,Zr.forEach)(r,function(e){e.categoryMatches=[],(0,Zr.forEach)(e.categoryMatchesMap,function(t,i){e.categoryMatches.push(Nt.tokenIdxToClass[i].tokenTypeIdx)})})}Nt.assignCategoriesTokensProp=oj;function aj(r){(0,Zr.forEach)(r,function(e){Kv([],e)})}Nt.assignCategoriesMapProp=aj;function Kv(r,e){(0,Zr.forEach)(r,function(t){e.categoryMatchesMap[t.tokenTypeIdx]=!0}),(0,Zr.forEach)(e.CATEGORIES,function(t){var i=r.concat(e);(0,Zr.contains)(i,t)||Kv(i,t)})}Nt.singleAssignCategoriesToksMap=Kv;function Aj(r){return(0,Zr.has)(r,"tokenTypeIdx")}Nt.hasShortKeyProperty=Aj;function Mv(r){return(0,Zr.has)(r,"CATEGORIES")}Nt.hasCategoriesProperty=Mv;function lj(r){return(0,Zr.has)(r,"categoryMatches")}Nt.hasExtendingTokensTypesProperty=lj;function cj(r){return(0,Zr.has)(r,"categoryMatchesMap")}Nt.hasExtendingTokensTypesMapProperty=cj;function KEe(r){return(0,Zr.has)(r,"tokenTypeIdx")}Nt.isTokenType=KEe});var Uv=w(ty=>{"use strict";Object.defineProperty(ty,"__esModule",{value:!0});ty.defaultLexerErrorProvider=void 0;ty.defaultLexerErrorProvider={buildUnableToPopLexerModeMessage:function(r){return"Unable to pop Lexer Mode after encountering Token ->"+r.image+"<- The Mode Stack is empty"},buildUnexpectedCharactersMessage:function(r,e,t,i,n){return"unexpected character: ->"+r.charAt(e)+"<- at offset: "+e+","+(" skipped "+t+" characters.")}}});var yd=w(fc=>{"use strict";Object.defineProperty(fc,"__esModule",{value:!0});fc.Lexer=fc.LexerDefinitionErrorType=void 0;var Xs=Rv(),nr=Gt(),UEe=Vg(),HEe=Uv(),GEe=ZI(),YEe;(function(r){r[r.MISSING_PATTERN=0]="MISSING_PATTERN",r[r.INVALID_PATTERN=1]="INVALID_PATTERN",r[r.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",r[r.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",r[r.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",r[r.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",r[r.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",r[r.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",r[r.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",r[r.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",r[r.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",r[r.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",r[r.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",r[r.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",r[r.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",r[r.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",r[r.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK"})(YEe=fc.LexerDefinitionErrorType||(fc.LexerDefinitionErrorType={}));var wd={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[` +`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:HEe.defaultLexerErrorProvider,traceInitPerf:!1,skipValidations:!1};Object.freeze(wd);var jEe=function(){function r(e,t){var i=this;if(t===void 0&&(t=wd),this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.config=void 0,this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},typeof t=="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object. +a boolean 2nd argument is no longer supported`);this.config=(0,nr.merge)(wd,t);var n=this.config.traceInitPerf;n===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof n=="number"&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",function(){var s,o=!0;i.TRACE_INIT("Lexer Config handling",function(){if(i.config.lineTerminatorsPattern===wd.lineTerminatorsPattern)i.config.lineTerminatorsPattern=Xs.LineTerminatorOptimizedTester;else if(i.config.lineTerminatorCharacters===wd.lineTerminatorCharacters)throw Error(`Error: Missing property on the Lexer config. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(t.safeMode&&t.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');i.trackStartLines=/full|onlyStart/i.test(i.config.positionTracking),i.trackEndLines=/full/i.test(i.config.positionTracking),(0,nr.isArray)(e)?(s={modes:{}},s.modes[Xs.DEFAULT_MODE]=(0,nr.cloneArr)(e),s[Xs.DEFAULT_MODE]=Xs.DEFAULT_MODE):(o=!1,s=(0,nr.cloneObj)(e))}),i.config.skipValidations===!1&&(i.TRACE_INIT("performRuntimeChecks",function(){i.lexerDefinitionErrors=i.lexerDefinitionErrors.concat((0,Xs.performRuntimeChecks)(s,i.trackStartLines,i.config.lineTerminatorCharacters))}),i.TRACE_INIT("performWarningRuntimeChecks",function(){i.lexerDefinitionWarning=i.lexerDefinitionWarning.concat((0,Xs.performWarningRuntimeChecks)(s,i.trackStartLines,i.config.lineTerminatorCharacters))})),s.modes=s.modes?s.modes:{},(0,nr.forEach)(s.modes,function(u,g){s.modes[g]=(0,nr.reject)(u,function(f){return(0,nr.isUndefined)(f)})});var a=(0,nr.keys)(s.modes);if((0,nr.forEach)(s.modes,function(u,g){i.TRACE_INIT("Mode: <"+g+"> processing",function(){if(i.modes.push(g),i.config.skipValidations===!1&&i.TRACE_INIT("validatePatterns",function(){i.lexerDefinitionErrors=i.lexerDefinitionErrors.concat((0,Xs.validatePatterns)(u,a))}),(0,nr.isEmpty)(i.lexerDefinitionErrors)){(0,UEe.augmentTokenTypes)(u);var f;i.TRACE_INIT("analyzeTokenTypes",function(){f=(0,Xs.analyzeTokenTypes)(u,{lineTerminatorCharacters:i.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:i.TRACE_INIT.bind(i)})}),i.patternIdxToConfig[g]=f.patternIdxToConfig,i.charCodeToPatternIdxToConfig[g]=f.charCodeToPatternIdxToConfig,i.emptyGroups=(0,nr.merge)(i.emptyGroups,f.emptyGroups),i.hasCustom=f.hasCustom||i.hasCustom,i.canModeBeOptimized[g]=f.canBeOptimized}})}),i.defaultMode=s.defaultMode,!(0,nr.isEmpty)(i.lexerDefinitionErrors)&&!i.config.deferDefinitionErrorsHandling){var l=(0,nr.map)(i.lexerDefinitionErrors,function(u){return u.message}),c=l.join(`----------------------- +`);throw new Error(`Errors detected in definition of Lexer: +`+c)}(0,nr.forEach)(i.lexerDefinitionWarning,function(u){(0,nr.PRINT_WARNING)(u.message)}),i.TRACE_INIT("Choosing sub-methods implementations",function(){if(Xs.SUPPORT_STICKY?(i.chopInput=nr.IDENTITY,i.match=i.matchWithTest):(i.updateLastIndex=nr.NOOP,i.match=i.matchWithExec),o&&(i.handleModes=nr.NOOP),i.trackStartLines===!1&&(i.computeNewColumn=nr.IDENTITY),i.trackEndLines===!1&&(i.updateTokenEndLineColumnLocation=nr.NOOP),/full/i.test(i.config.positionTracking))i.createTokenInstance=i.createFullToken;else if(/onlyStart/i.test(i.config.positionTracking))i.createTokenInstance=i.createStartOnlyToken;else if(/onlyOffset/i.test(i.config.positionTracking))i.createTokenInstance=i.createOffsetOnlyToken;else throw Error('Invalid config option: "'+i.config.positionTracking+'"');i.hasCustom?(i.addToken=i.addTokenUsingPush,i.handlePayload=i.handlePayloadWithCustom):(i.addToken=i.addTokenUsingMemberAccess,i.handlePayload=i.handlePayloadNoCustom)}),i.TRACE_INIT("Failed Optimization Warnings",function(){var u=(0,nr.reduce)(i.canModeBeOptimized,function(g,f,h){return f===!1&&g.push(h),g},[]);if(t.ensureOptimizations&&!(0,nr.isEmpty)(u))throw Error("Lexer Modes: < "+u.join(", ")+` > cannot be optimized. + Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode. + Or inspect the console log for details on how to resolve these issues.`)}),i.TRACE_INIT("clearRegExpParserCache",function(){(0,GEe.clearRegExpParserCache)()}),i.TRACE_INIT("toFastProperties",function(){(0,nr.toFastProperties)(i)})})}return r.prototype.tokenize=function(e,t){if(t===void 0&&(t=this.defaultMode),!(0,nr.isEmpty)(this.lexerDefinitionErrors)){var i=(0,nr.map)(this.lexerDefinitionErrors,function(o){return o.message}),n=i.join(`----------------------- +`);throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer: +`+n)}var s=this.tokenizeInternal(e,t);return s},r.prototype.tokenizeInternal=function(e,t){var i=this,n,s,o,a,l,c,u,g,f,h,p,C,y,B,v,D,L=e,H=L.length,j=0,$=0,V=this.hasCustom?0:Math.floor(e.length/10),W=new Array(V),_=[],A=this.trackStartLines?1:void 0,ae=this.trackStartLines?1:void 0,ge=(0,Xs.cloneEmptyGroups)(this.emptyGroups),re=this.trackStartLines,O=this.config.lineTerminatorsPattern,F=0,ue=[],he=[],ke=[],Fe=[];Object.freeze(Fe);var Ne=void 0;function oe(){return ue}function le(pr){var Ii=(0,Xs.charCodeToOptimizedIndex)(pr),es=he[Ii];return es===void 0?Fe:es}var we=function(pr){if(ke.length===1&&pr.tokenType.PUSH_MODE===void 0){var Ii=i.config.errorMessageProvider.buildUnableToPopLexerModeMessage(pr);_.push({offset:pr.startOffset,line:pr.startLine!==void 0?pr.startLine:void 0,column:pr.startColumn!==void 0?pr.startColumn:void 0,length:pr.image.length,message:Ii})}else{ke.pop();var es=(0,nr.last)(ke);ue=i.patternIdxToConfig[es],he=i.charCodeToPatternIdxToConfig[es],F=ue.length;var ua=i.canModeBeOptimized[es]&&i.config.safeMode===!1;he&&ua?Ne=le:Ne=oe}};function fe(pr){ke.push(pr),he=this.charCodeToPatternIdxToConfig[pr],ue=this.patternIdxToConfig[pr],F=ue.length,F=ue.length;var Ii=this.canModeBeOptimized[pr]&&this.config.safeMode===!1;he&&Ii?Ne=le:Ne=oe}fe.call(this,t);for(var Ae;jc.length){c=a,u=g,Ae=_e;break}}}break}}if(c!==null){if(f=c.length,h=Ae.group,h!==void 0&&(p=Ae.tokenTypeIdx,C=this.createTokenInstance(c,j,p,Ae.tokenType,A,ae,f),this.handlePayload(C,u),h===!1?$=this.addToken(W,$,C):ge[h].push(C)),e=this.chopInput(e,f),j=j+f,ae=this.computeNewColumn(ae,f),re===!0&&Ae.canLineTerminator===!0){var It=0,Or=void 0,ii=void 0;O.lastIndex=0;do Or=O.test(c),Or===!0&&(ii=O.lastIndex-1,It++);while(Or===!0);It!==0&&(A=A+It,ae=f-ii,this.updateTokenEndLineColumnLocation(C,h,ii,It,A,ae,f))}this.handleModes(Ae,we,fe,C)}else{for(var gi=j,hr=A,fi=ae,ni=!1;!ni&&j <"+e+">");var n=(0,nr.timer)(t),s=n.time,o=n.value,a=s>10?console.warn:console.log;return this.traceInitIndent time: "+s+"ms"),this.traceInitIndent--,o}else return t()},r.SKIPPED="This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.",r.NA=/NOT_APPLICABLE/,r}();fc.Lexer=jEe});var NA=w(bi=>{"use strict";Object.defineProperty(bi,"__esModule",{value:!0});bi.tokenMatcher=bi.createTokenInstance=bi.EOF=bi.createToken=bi.hasTokenLabel=bi.tokenName=bi.tokenLabel=void 0;var Zs=Gt(),qEe=yd(),Hv=Vg();function JEe(r){return Ej(r)?r.LABEL:r.name}bi.tokenLabel=JEe;function WEe(r){return r.name}bi.tokenName=WEe;function Ej(r){return(0,Zs.isString)(r.LABEL)&&r.LABEL!==""}bi.hasTokenLabel=Ej;var zEe="parent",uj="categories",gj="label",fj="group",hj="push_mode",pj="pop_mode",dj="longer_alt",Cj="line_breaks",mj="start_chars_hint";function Ij(r){return VEe(r)}bi.createToken=Ij;function VEe(r){var e=r.pattern,t={};if(t.name=r.name,(0,Zs.isUndefined)(e)||(t.PATTERN=e),(0,Zs.has)(r,zEe))throw`The parent property is no longer supported. +See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return(0,Zs.has)(r,uj)&&(t.CATEGORIES=r[uj]),(0,Hv.augmentTokenTypes)([t]),(0,Zs.has)(r,gj)&&(t.LABEL=r[gj]),(0,Zs.has)(r,fj)&&(t.GROUP=r[fj]),(0,Zs.has)(r,pj)&&(t.POP_MODE=r[pj]),(0,Zs.has)(r,hj)&&(t.PUSH_MODE=r[hj]),(0,Zs.has)(r,dj)&&(t.LONGER_ALT=r[dj]),(0,Zs.has)(r,Cj)&&(t.LINE_BREAKS=r[Cj]),(0,Zs.has)(r,mj)&&(t.START_CHARS_HINT=r[mj]),t}bi.EOF=Ij({name:"EOF",pattern:qEe.Lexer.NA});(0,Hv.augmentTokenTypes)([bi.EOF]);function XEe(r,e,t,i,n,s,o,a){return{image:e,startOffset:t,endOffset:i,startLine:n,endLine:s,startColumn:o,endColumn:a,tokenTypeIdx:r.tokenTypeIdx,tokenType:r}}bi.createTokenInstance=XEe;function ZEe(r,e){return(0,Hv.tokenStructuredMatcher)(r,e)}bi.tokenMatcher=ZEe});var dn=w(zt=>{"use strict";var va=zt&&zt.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(zt,"__esModule",{value:!0});zt.serializeProduction=zt.serializeGrammar=zt.Terminal=zt.Alternation=zt.RepetitionWithSeparator=zt.Repetition=zt.RepetitionMandatoryWithSeparator=zt.RepetitionMandatory=zt.Option=zt.Alternative=zt.Rule=zt.NonTerminal=zt.AbstractProduction=void 0;var Ar=Gt(),_Ee=NA(),ko=function(){function r(e){this._definition=e}return Object.defineProperty(r.prototype,"definition",{get:function(){return this._definition},set:function(e){this._definition=e},enumerable:!1,configurable:!0}),r.prototype.accept=function(e){e.visit(this),(0,Ar.forEach)(this.definition,function(t){t.accept(e)})},r}();zt.AbstractProduction=ko;var yj=function(r){va(e,r);function e(t){var i=r.call(this,[])||this;return i.idx=1,(0,Ar.assign)(i,(0,Ar.pick)(t,function(n){return n!==void 0})),i}return Object.defineProperty(e.prototype,"definition",{get:function(){return this.referencedRule!==void 0?this.referencedRule.definition:[]},set:function(t){},enumerable:!1,configurable:!0}),e.prototype.accept=function(t){t.visit(this)},e}(ko);zt.NonTerminal=yj;var wj=function(r){va(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.orgText="",(0,Ar.assign)(i,(0,Ar.pick)(t,function(n){return n!==void 0})),i}return e}(ko);zt.Rule=wj;var Bj=function(r){va(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.ignoreAmbiguities=!1,(0,Ar.assign)(i,(0,Ar.pick)(t,function(n){return n!==void 0})),i}return e}(ko);zt.Alternative=Bj;var Qj=function(r){va(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,(0,Ar.assign)(i,(0,Ar.pick)(t,function(n){return n!==void 0})),i}return e}(ko);zt.Option=Qj;var bj=function(r){va(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,(0,Ar.assign)(i,(0,Ar.pick)(t,function(n){return n!==void 0})),i}return e}(ko);zt.RepetitionMandatory=bj;var Sj=function(r){va(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,(0,Ar.assign)(i,(0,Ar.pick)(t,function(n){return n!==void 0})),i}return e}(ko);zt.RepetitionMandatoryWithSeparator=Sj;var vj=function(r){va(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,(0,Ar.assign)(i,(0,Ar.pick)(t,function(n){return n!==void 0})),i}return e}(ko);zt.Repetition=vj;var xj=function(r){va(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,(0,Ar.assign)(i,(0,Ar.pick)(t,function(n){return n!==void 0})),i}return e}(ko);zt.RepetitionWithSeparator=xj;var Pj=function(r){va(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,i.ignoreAmbiguities=!1,i.hasPredicates=!1,(0,Ar.assign)(i,(0,Ar.pick)(t,function(n){return n!==void 0})),i}return Object.defineProperty(e.prototype,"definition",{get:function(){return this._definition},set:function(t){this._definition=t},enumerable:!1,configurable:!0}),e}(ko);zt.Alternation=Pj;var ry=function(){function r(e){this.idx=1,(0,Ar.assign)(this,(0,Ar.pick)(e,function(t){return t!==void 0}))}return r.prototype.accept=function(e){e.visit(this)},r}();zt.Terminal=ry;function $Ee(r){return(0,Ar.map)(r,Bd)}zt.serializeGrammar=$Ee;function Bd(r){function e(s){return(0,Ar.map)(s,Bd)}if(r instanceof yj){var t={type:"NonTerminal",name:r.nonTerminalName,idx:r.idx};return(0,Ar.isString)(r.label)&&(t.label=r.label),t}else{if(r instanceof Bj)return{type:"Alternative",definition:e(r.definition)};if(r instanceof Qj)return{type:"Option",idx:r.idx,definition:e(r.definition)};if(r instanceof bj)return{type:"RepetitionMandatory",idx:r.idx,definition:e(r.definition)};if(r instanceof Sj)return{type:"RepetitionMandatoryWithSeparator",idx:r.idx,separator:Bd(new ry({terminalType:r.separator})),definition:e(r.definition)};if(r instanceof xj)return{type:"RepetitionWithSeparator",idx:r.idx,separator:Bd(new ry({terminalType:r.separator})),definition:e(r.definition)};if(r instanceof vj)return{type:"Repetition",idx:r.idx,definition:e(r.definition)};if(r instanceof Pj)return{type:"Alternation",idx:r.idx,definition:e(r.definition)};if(r instanceof ry){var i={type:"Terminal",name:r.terminalType.name,label:(0,_Ee.tokenLabel)(r.terminalType),idx:r.idx};(0,Ar.isString)(r.label)&&(i.terminalLabel=r.label);var n=r.terminalType.PATTERN;return r.terminalType.PATTERN&&(i.pattern=(0,Ar.isRegExp)(n)?n.source:n),i}else{if(r instanceof wj)return{type:"Rule",name:r.name,orgText:r.orgText,definition:e(r.definition)};throw Error("non exhaustive match")}}}zt.serializeProduction=Bd});var ny=w(iy=>{"use strict";Object.defineProperty(iy,"__esModule",{value:!0});iy.RestWalker=void 0;var Gv=Gt(),Cn=dn(),eIe=function(){function r(){}return r.prototype.walk=function(e,t){var i=this;t===void 0&&(t=[]),(0,Gv.forEach)(e.definition,function(n,s){var o=(0,Gv.drop)(e.definition,s+1);if(n instanceof Cn.NonTerminal)i.walkProdRef(n,o,t);else if(n instanceof Cn.Terminal)i.walkTerminal(n,o,t);else if(n instanceof Cn.Alternative)i.walkFlat(n,o,t);else if(n instanceof Cn.Option)i.walkOption(n,o,t);else if(n instanceof Cn.RepetitionMandatory)i.walkAtLeastOne(n,o,t);else if(n instanceof Cn.RepetitionMandatoryWithSeparator)i.walkAtLeastOneSep(n,o,t);else if(n instanceof Cn.RepetitionWithSeparator)i.walkManySep(n,o,t);else if(n instanceof Cn.Repetition)i.walkMany(n,o,t);else if(n instanceof Cn.Alternation)i.walkOr(n,o,t);else throw Error("non exhaustive match")})},r.prototype.walkTerminal=function(e,t,i){},r.prototype.walkProdRef=function(e,t,i){},r.prototype.walkFlat=function(e,t,i){var n=t.concat(i);this.walk(e,n)},r.prototype.walkOption=function(e,t,i){var n=t.concat(i);this.walk(e,n)},r.prototype.walkAtLeastOne=function(e,t,i){var n=[new Cn.Option({definition:e.definition})].concat(t,i);this.walk(e,n)},r.prototype.walkAtLeastOneSep=function(e,t,i){var n=Dj(e,t,i);this.walk(e,n)},r.prototype.walkMany=function(e,t,i){var n=[new Cn.Option({definition:e.definition})].concat(t,i);this.walk(e,n)},r.prototype.walkManySep=function(e,t,i){var n=Dj(e,t,i);this.walk(e,n)},r.prototype.walkOr=function(e,t,i){var n=this,s=t.concat(i);(0,Gv.forEach)(e.definition,function(o){var a=new Cn.Alternative({definition:[o]});n.walk(a,s)})},r}();iy.RestWalker=eIe;function Dj(r,e,t){var i=[new Cn.Option({definition:[new Cn.Terminal({terminalType:r.separator})].concat(r.definition)})],n=i.concat(e,t);return n}});var Xg=w(sy=>{"use strict";Object.defineProperty(sy,"__esModule",{value:!0});sy.GAstVisitor=void 0;var Ro=dn(),tIe=function(){function r(){}return r.prototype.visit=function(e){var t=e;switch(t.constructor){case Ro.NonTerminal:return this.visitNonTerminal(t);case Ro.Alternative:return this.visitAlternative(t);case Ro.Option:return this.visitOption(t);case Ro.RepetitionMandatory:return this.visitRepetitionMandatory(t);case Ro.RepetitionMandatoryWithSeparator:return this.visitRepetitionMandatoryWithSeparator(t);case Ro.RepetitionWithSeparator:return this.visitRepetitionWithSeparator(t);case Ro.Repetition:return this.visitRepetition(t);case Ro.Alternation:return this.visitAlternation(t);case Ro.Terminal:return this.visitTerminal(t);case Ro.Rule:return this.visitRule(t);default:throw Error("non exhaustive match")}},r.prototype.visitNonTerminal=function(e){},r.prototype.visitAlternative=function(e){},r.prototype.visitOption=function(e){},r.prototype.visitRepetition=function(e){},r.prototype.visitRepetitionMandatory=function(e){},r.prototype.visitRepetitionMandatoryWithSeparator=function(e){},r.prototype.visitRepetitionWithSeparator=function(e){},r.prototype.visitAlternation=function(e){},r.prototype.visitTerminal=function(e){},r.prototype.visitRule=function(e){},r}();sy.GAstVisitor=tIe});var bd=w(Mi=>{"use strict";var rIe=Mi&&Mi.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Mi,"__esModule",{value:!0});Mi.collectMethods=Mi.DslMethodsCollectorVisitor=Mi.getProductionDslName=Mi.isBranchingProd=Mi.isOptionalProd=Mi.isSequenceProd=void 0;var Qd=Gt(),Qr=dn(),iIe=Xg();function nIe(r){return r instanceof Qr.Alternative||r instanceof Qr.Option||r instanceof Qr.Repetition||r instanceof Qr.RepetitionMandatory||r instanceof Qr.RepetitionMandatoryWithSeparator||r instanceof Qr.RepetitionWithSeparator||r instanceof Qr.Terminal||r instanceof Qr.Rule}Mi.isSequenceProd=nIe;function Yv(r,e){e===void 0&&(e=[]);var t=r instanceof Qr.Option||r instanceof Qr.Repetition||r instanceof Qr.RepetitionWithSeparator;return t?!0:r instanceof Qr.Alternation?(0,Qd.some)(r.definition,function(i){return Yv(i,e)}):r instanceof Qr.NonTerminal&&(0,Qd.contains)(e,r)?!1:r instanceof Qr.AbstractProduction?(r instanceof Qr.NonTerminal&&e.push(r),(0,Qd.every)(r.definition,function(i){return Yv(i,e)})):!1}Mi.isOptionalProd=Yv;function sIe(r){return r instanceof Qr.Alternation}Mi.isBranchingProd=sIe;function oIe(r){if(r instanceof Qr.NonTerminal)return"SUBRULE";if(r instanceof Qr.Option)return"OPTION";if(r instanceof Qr.Alternation)return"OR";if(r instanceof Qr.RepetitionMandatory)return"AT_LEAST_ONE";if(r instanceof Qr.RepetitionMandatoryWithSeparator)return"AT_LEAST_ONE_SEP";if(r instanceof Qr.RepetitionWithSeparator)return"MANY_SEP";if(r instanceof Qr.Repetition)return"MANY";if(r instanceof Qr.Terminal)return"CONSUME";throw Error("non exhaustive match")}Mi.getProductionDslName=oIe;var kj=function(r){rIe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.separator="-",t.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]},t}return e.prototype.reset=function(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}},e.prototype.visitTerminal=function(t){var i=t.terminalType.name+this.separator+"Terminal";(0,Qd.has)(this.dslMethods,i)||(this.dslMethods[i]=[]),this.dslMethods[i].push(t)},e.prototype.visitNonTerminal=function(t){var i=t.nonTerminalName+this.separator+"Terminal";(0,Qd.has)(this.dslMethods,i)||(this.dslMethods[i]=[]),this.dslMethods[i].push(t)},e.prototype.visitOption=function(t){this.dslMethods.option.push(t)},e.prototype.visitRepetitionWithSeparator=function(t){this.dslMethods.repetitionWithSeparator.push(t)},e.prototype.visitRepetitionMandatory=function(t){this.dslMethods.repetitionMandatory.push(t)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.dslMethods.repetitionMandatoryWithSeparator.push(t)},e.prototype.visitRepetition=function(t){this.dslMethods.repetition.push(t)},e.prototype.visitAlternation=function(t){this.dslMethods.alternation.push(t)},e}(iIe.GAstVisitor);Mi.DslMethodsCollectorVisitor=kj;var oy=new kj;function aIe(r){oy.reset(),r.accept(oy);var e=oy.dslMethods;return oy.reset(),e}Mi.collectMethods=aIe});var qv=w(Fo=>{"use strict";Object.defineProperty(Fo,"__esModule",{value:!0});Fo.firstForTerminal=Fo.firstForBranching=Fo.firstForSequence=Fo.first=void 0;var ay=Gt(),Rj=dn(),jv=bd();function Ay(r){if(r instanceof Rj.NonTerminal)return Ay(r.referencedRule);if(r instanceof Rj.Terminal)return Lj(r);if((0,jv.isSequenceProd)(r))return Fj(r);if((0,jv.isBranchingProd)(r))return Nj(r);throw Error("non exhaustive match")}Fo.first=Ay;function Fj(r){for(var e=[],t=r.definition,i=0,n=t.length>i,s,o=!0;n&&o;)s=t[i],o=(0,jv.isOptionalProd)(s),e=e.concat(Ay(s)),i=i+1,n=t.length>i;return(0,ay.uniq)(e)}Fo.firstForSequence=Fj;function Nj(r){var e=(0,ay.map)(r.definition,function(t){return Ay(t)});return(0,ay.uniq)((0,ay.flatten)(e))}Fo.firstForBranching=Nj;function Lj(r){return[r.terminalType]}Fo.firstForTerminal=Lj});var Jv=w(ly=>{"use strict";Object.defineProperty(ly,"__esModule",{value:!0});ly.IN=void 0;ly.IN="_~IN~_"});var Uj=w(us=>{"use strict";var AIe=us&&us.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(us,"__esModule",{value:!0});us.buildInProdFollowPrefix=us.buildBetweenProdsFollowPrefix=us.computeAllProdsFollows=us.ResyncFollowsWalker=void 0;var lIe=ny(),cIe=qv(),Tj=Gt(),Oj=Jv(),uIe=dn(),Mj=function(r){AIe(e,r);function e(t){var i=r.call(this)||this;return i.topProd=t,i.follows={},i}return e.prototype.startWalking=function(){return this.walk(this.topProd),this.follows},e.prototype.walkTerminal=function(t,i,n){},e.prototype.walkProdRef=function(t,i,n){var s=Kj(t.referencedRule,t.idx)+this.topProd.name,o=i.concat(n),a=new uIe.Alternative({definition:o}),l=(0,cIe.first)(a);this.follows[s]=l},e}(lIe.RestWalker);us.ResyncFollowsWalker=Mj;function gIe(r){var e={};return(0,Tj.forEach)(r,function(t){var i=new Mj(t).startWalking();(0,Tj.assign)(e,i)}),e}us.computeAllProdsFollows=gIe;function Kj(r,e){return r.name+e+Oj.IN}us.buildBetweenProdsFollowPrefix=Kj;function fIe(r){var e=r.terminalType.name;return e+r.idx+Oj.IN}us.buildInProdFollowPrefix=fIe});var Sd=w(xa=>{"use strict";Object.defineProperty(xa,"__esModule",{value:!0});xa.defaultGrammarValidatorErrorProvider=xa.defaultGrammarResolverErrorProvider=xa.defaultParserErrorProvider=void 0;var Zg=NA(),hIe=Gt(),_s=Gt(),Wv=dn(),Hj=bd();xa.defaultParserErrorProvider={buildMismatchTokenMessage:function(r){var e=r.expected,t=r.actual,i=r.previous,n=r.ruleName,s=(0,Zg.hasTokenLabel)(e),o=s?"--> "+(0,Zg.tokenLabel)(e)+" <--":"token of type --> "+e.name+" <--",a="Expecting "+o+" but found --> '"+t.image+"' <--";return a},buildNotAllInputParsedMessage:function(r){var e=r.firstRedundant,t=r.ruleName;return"Redundant input, expecting EOF but found: "+e.image},buildNoViableAltMessage:function(r){var e=r.expectedPathsPerAlt,t=r.actual,i=r.previous,n=r.customUserDescription,s=r.ruleName,o="Expecting: ",a=(0,_s.first)(t).image,l=` +but found: '`+a+"'";if(n)return o+n+l;var c=(0,_s.reduce)(e,function(h,p){return h.concat(p)},[]),u=(0,_s.map)(c,function(h){return"["+(0,_s.map)(h,function(p){return(0,Zg.tokenLabel)(p)}).join(", ")+"]"}),g=(0,_s.map)(u,function(h,p){return" "+(p+1)+". "+h}),f=`one of these possible Token sequences: +`+g.join(` +`);return o+f+l},buildEarlyExitMessage:function(r){var e=r.expectedIterationPaths,t=r.actual,i=r.customUserDescription,n=r.ruleName,s="Expecting: ",o=(0,_s.first)(t).image,a=` +but found: '`+o+"'";if(i)return s+i+a;var l=(0,_s.map)(e,function(u){return"["+(0,_s.map)(u,function(g){return(0,Zg.tokenLabel)(g)}).join(",")+"]"}),c=`expecting at least one iteration which starts with one of these possible Token sequences:: + `+("<"+l.join(" ,")+">");return s+c+a}};Object.freeze(xa.defaultParserErrorProvider);xa.defaultGrammarResolverErrorProvider={buildRuleNotFoundError:function(r,e){var t="Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+`<- +inside top level rule: ->`+r.name+"<-";return t}};xa.defaultGrammarValidatorErrorProvider={buildDuplicateFoundError:function(r,e){function t(u){return u instanceof Wv.Terminal?u.terminalType.name:u instanceof Wv.NonTerminal?u.nonTerminalName:""}var i=r.name,n=(0,_s.first)(e),s=n.idx,o=(0,Hj.getProductionDslName)(n),a=t(n),l=s>0,c="->"+o+(l?s:"")+"<- "+(a?"with argument: ->"+a+"<-":"")+` + appears more than once (`+e.length+" times) in the top level rule: ->"+i+`<-. + For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES + `;return c=c.replace(/[ \t]+/g," "),c=c.replace(/\s\s+/g,` +`),c},buildNamespaceConflictError:function(r){var e=`Namespace conflict found in grammar. +`+("The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <"+r.name+`>. +`)+`To resolve this make sure each Terminal and Non-Terminal names are unique +This is easy to accomplish by using the convention that Terminal names start with an uppercase letter +and Non-Terminal names start with a lower case letter.`;return e},buildAlternationPrefixAmbiguityError:function(r){var e=(0,_s.map)(r.prefixPath,function(n){return(0,Zg.tokenLabel)(n)}).join(", "),t=r.alternation.idx===0?"":r.alternation.idx,i="Ambiguous alternatives: <"+r.ambiguityIndices.join(" ,")+`> due to common lookahead prefix +`+("in inside <"+r.topLevelRule.name+`> Rule, +`)+("<"+e+`> may appears as a prefix path in all these alternatives. +`)+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX +For Further details.`;return i},buildAlternationAmbiguityError:function(r){var e=(0,_s.map)(r.prefixPath,function(n){return(0,Zg.tokenLabel)(n)}).join(", "),t=r.alternation.idx===0?"":r.alternation.idx,i="Ambiguous Alternatives Detected: <"+r.ambiguityIndices.join(" ,")+"> in "+(" inside <"+r.topLevelRule.name+`> Rule, +`)+("<"+e+`> may appears as a prefix path in all these alternatives. +`);return i=i+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES +For Further details.`,i},buildEmptyRepetitionError:function(r){var e=(0,Hj.getProductionDslName)(r.repetition);r.repetition.idx!==0&&(e+=r.repetition.idx);var t="The repetition <"+e+"> within Rule <"+r.topLevelRule.name+`> can never consume any tokens. +This could lead to an infinite loop.`;return t},buildTokenNameError:function(r){return"deprecated"},buildEmptyAlternationError:function(r){var e="Ambiguous empty alternative: <"+(r.emptyChoiceIdx+1)+">"+(" in inside <"+r.topLevelRule.name+`> Rule. +`)+"Only the last alternative may be an empty alternative.";return e},buildTooManyAlternativesError:function(r){var e=`An Alternation cannot have more than 256 alternatives: +`+(" inside <"+r.topLevelRule.name+`> Rule. + has `+(r.alternation.definition.length+1)+" alternatives.");return e},buildLeftRecursionError:function(r){var e=r.topLevelRule.name,t=hIe.map(r.leftRecursionPath,function(s){return s.name}),i=e+" --> "+t.concat([e]).join(" --> "),n=`Left Recursion found in grammar. +`+("rule: <"+e+`> can be invoked from itself (directly or indirectly) +`)+(`without consuming any Tokens. The grammar path that causes this is: + `+i+` +`)+` To fix this refactor your grammar to remove the left recursion. +see: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring.`;return n},buildInvalidRuleNameError:function(r){return"deprecated"},buildDuplicateRuleNameError:function(r){var e;r.topLevelRule instanceof Wv.Rule?e=r.topLevelRule.name:e=r.topLevelRule;var t="Duplicate definition, rule: ->"+e+"<- is already defined in the grammar: ->"+r.grammarName+"<-";return t}}});var jj=w(LA=>{"use strict";var pIe=LA&&LA.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(LA,"__esModule",{value:!0});LA.GastRefResolverVisitor=LA.resolveGrammar=void 0;var dIe=Gn(),Gj=Gt(),CIe=Xg();function mIe(r,e){var t=new Yj(r,e);return t.resolveRefs(),t.errors}LA.resolveGrammar=mIe;var Yj=function(r){pIe(e,r);function e(t,i){var n=r.call(this)||this;return n.nameToTopRule=t,n.errMsgProvider=i,n.errors=[],n}return e.prototype.resolveRefs=function(){var t=this;(0,Gj.forEach)((0,Gj.values)(this.nameToTopRule),function(i){t.currTopLevel=i,i.accept(t)})},e.prototype.visitNonTerminal=function(t){var i=this.nameToTopRule[t.nonTerminalName];if(i)t.referencedRule=i;else{var n=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,t);this.errors.push({message:n,type:dIe.ParserDefinitionErrorType.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:t.nonTerminalName})}},e}(CIe.GAstVisitor);LA.GastRefResolverVisitor=Yj});var xd=w(Nr=>{"use strict";var hc=Nr&&Nr.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Nr,"__esModule",{value:!0});Nr.nextPossibleTokensAfter=Nr.possiblePathsFrom=Nr.NextTerminalAfterAtLeastOneSepWalker=Nr.NextTerminalAfterAtLeastOneWalker=Nr.NextTerminalAfterManySepWalker=Nr.NextTerminalAfterManyWalker=Nr.AbstractNextTerminalAfterProductionWalker=Nr.NextAfterTokenWalker=Nr.AbstractNextPossibleTokensWalker=void 0;var qj=ny(),Kt=Gt(),EIe=qv(),kt=dn(),Jj=function(r){hc(e,r);function e(t,i){var n=r.call(this)||this;return n.topProd=t,n.path=i,n.possibleTokTypes=[],n.nextProductionName="",n.nextProductionOccurrence=0,n.found=!1,n.isAtEndOfPath=!1,n}return e.prototype.startWalking=function(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=(0,Kt.cloneArr)(this.path.ruleStack).reverse(),this.occurrenceStack=(0,Kt.cloneArr)(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes},e.prototype.walk=function(t,i){i===void 0&&(i=[]),this.found||r.prototype.walk.call(this,t,i)},e.prototype.walkProdRef=function(t,i,n){if(t.referencedRule.name===this.nextProductionName&&t.idx===this.nextProductionOccurrence){var s=i.concat(n);this.updateExpectedNext(),this.walk(t.referencedRule,s)}},e.prototype.updateExpectedNext=function(){(0,Kt.isEmpty)(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())},e}(qj.RestWalker);Nr.AbstractNextPossibleTokensWalker=Jj;var IIe=function(r){hc(e,r);function e(t,i){var n=r.call(this,t,i)||this;return n.path=i,n.nextTerminalName="",n.nextTerminalOccurrence=0,n.nextTerminalName=n.path.lastTok.name,n.nextTerminalOccurrence=n.path.lastTokOccurrence,n}return e.prototype.walkTerminal=function(t,i,n){if(this.isAtEndOfPath&&t.terminalType.name===this.nextTerminalName&&t.idx===this.nextTerminalOccurrence&&!this.found){var s=i.concat(n),o=new kt.Alternative({definition:s});this.possibleTokTypes=(0,EIe.first)(o),this.found=!0}},e}(Jj);Nr.NextAfterTokenWalker=IIe;var vd=function(r){hc(e,r);function e(t,i){var n=r.call(this)||this;return n.topRule=t,n.occurrence=i,n.result={token:void 0,occurrence:void 0,isEndOfRule:void 0},n}return e.prototype.startWalking=function(){return this.walk(this.topRule),this.result},e}(qj.RestWalker);Nr.AbstractNextTerminalAfterProductionWalker=vd;var yIe=function(r){hc(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.walkMany=function(t,i,n){if(t.idx===this.occurrence){var s=(0,Kt.first)(i.concat(n));this.result.isEndOfRule=s===void 0,s instanceof kt.Terminal&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else r.prototype.walkMany.call(this,t,i,n)},e}(vd);Nr.NextTerminalAfterManyWalker=yIe;var wIe=function(r){hc(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.walkManySep=function(t,i,n){if(t.idx===this.occurrence){var s=(0,Kt.first)(i.concat(n));this.result.isEndOfRule=s===void 0,s instanceof kt.Terminal&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else r.prototype.walkManySep.call(this,t,i,n)},e}(vd);Nr.NextTerminalAfterManySepWalker=wIe;var BIe=function(r){hc(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.walkAtLeastOne=function(t,i,n){if(t.idx===this.occurrence){var s=(0,Kt.first)(i.concat(n));this.result.isEndOfRule=s===void 0,s instanceof kt.Terminal&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else r.prototype.walkAtLeastOne.call(this,t,i,n)},e}(vd);Nr.NextTerminalAfterAtLeastOneWalker=BIe;var QIe=function(r){hc(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.walkAtLeastOneSep=function(t,i,n){if(t.idx===this.occurrence){var s=(0,Kt.first)(i.concat(n));this.result.isEndOfRule=s===void 0,s instanceof kt.Terminal&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else r.prototype.walkAtLeastOneSep.call(this,t,i,n)},e}(vd);Nr.NextTerminalAfterAtLeastOneSepWalker=QIe;function Wj(r,e,t){t===void 0&&(t=[]),t=(0,Kt.cloneArr)(t);var i=[],n=0;function s(c){return c.concat((0,Kt.drop)(r,n+1))}function o(c){var u=Wj(s(c),e,t);return i.concat(u)}for(;t.length=0;ge--){var re=B.definition[ge],O={idx:p,def:re.definition.concat((0,Kt.drop)(h)),ruleStack:C,occurrenceStack:y};g.push(O),g.push(o)}else if(B instanceof kt.Alternative)g.push({idx:p,def:B.definition.concat((0,Kt.drop)(h)),ruleStack:C,occurrenceStack:y});else if(B instanceof kt.Rule)g.push(SIe(B,p,C,y));else throw Error("non exhaustive match")}}return u}Nr.nextPossibleTokensAfter=bIe;function SIe(r,e,t,i){var n=(0,Kt.cloneArr)(t);n.push(r.name);var s=(0,Kt.cloneArr)(i);return s.push(1),{idx:e,def:r.definition,ruleStack:n,occurrenceStack:s}}});var Pd=w(Zt=>{"use strict";var Xj=Zt&&Zt.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Zt,"__esModule",{value:!0});Zt.areTokenCategoriesNotUsed=Zt.isStrictPrefixOfPath=Zt.containsPath=Zt.getLookaheadPathsForOptionalProd=Zt.getLookaheadPathsForOr=Zt.lookAheadSequenceFromAlternatives=Zt.buildSingleAlternativeLookaheadFunction=Zt.buildAlternativesLookAheadFunc=Zt.buildLookaheadFuncForOptionalProd=Zt.buildLookaheadFuncForOr=Zt.getProdType=Zt.PROD_TYPE=void 0;var sr=Gt(),zj=xd(),vIe=ny(),cy=Vg(),TA=dn(),xIe=Xg(),oi;(function(r){r[r.OPTION=0]="OPTION",r[r.REPETITION=1]="REPETITION",r[r.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",r[r.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",r[r.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",r[r.ALTERNATION=5]="ALTERNATION"})(oi=Zt.PROD_TYPE||(Zt.PROD_TYPE={}));function PIe(r){if(r instanceof TA.Option)return oi.OPTION;if(r instanceof TA.Repetition)return oi.REPETITION;if(r instanceof TA.RepetitionMandatory)return oi.REPETITION_MANDATORY;if(r instanceof TA.RepetitionMandatoryWithSeparator)return oi.REPETITION_MANDATORY_WITH_SEPARATOR;if(r instanceof TA.RepetitionWithSeparator)return oi.REPETITION_WITH_SEPARATOR;if(r instanceof TA.Alternation)return oi.ALTERNATION;throw Error("non exhaustive match")}Zt.getProdType=PIe;function DIe(r,e,t,i,n,s){var o=_j(r,e,t),a=Xv(o)?cy.tokenStructuredMatcherNoCategories:cy.tokenStructuredMatcher;return s(o,i,a,n)}Zt.buildLookaheadFuncForOr=DIe;function kIe(r,e,t,i,n,s){var o=$j(r,e,n,t),a=Xv(o)?cy.tokenStructuredMatcherNoCategories:cy.tokenStructuredMatcher;return s(o[0],a,i)}Zt.buildLookaheadFuncForOptionalProd=kIe;function RIe(r,e,t,i){var n=r.length,s=(0,sr.every)(r,function(l){return(0,sr.every)(l,function(c){return c.length===1})});if(e)return function(l){for(var c=(0,sr.map)(l,function(D){return D.GATE}),u=0;u{"use strict";var Zv=Vt&&Vt.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Vt,"__esModule",{value:!0});Vt.checkPrefixAlternativesAmbiguities=Vt.validateSomeNonEmptyLookaheadPath=Vt.validateTooManyAlts=Vt.RepetionCollector=Vt.validateAmbiguousAlternationAlternatives=Vt.validateEmptyOrAlternative=Vt.getFirstNoneTerminal=Vt.validateNoLeftRecursion=Vt.validateRuleIsOverridden=Vt.validateRuleDoesNotAlreadyExist=Vt.OccurrenceValidationCollector=Vt.identifyProductionForDuplicates=Vt.validateGrammar=void 0;var er=Gt(),br=Gt(),No=Gn(),_v=bd(),_g=Pd(),OIe=xd(),$s=dn(),$v=Xg();function MIe(r,e,t,i,n){var s=er.map(r,function(h){return KIe(h,i)}),o=er.map(r,function(h){return ex(h,h,i)}),a=[],l=[],c=[];(0,br.every)(o,br.isEmpty)&&(a=(0,br.map)(r,function(h){return sq(h,i)}),l=(0,br.map)(r,function(h){return oq(h,e,i)}),c=lq(r,e,i));var u=GIe(r,t,i),g=(0,br.map)(r,function(h){return Aq(h,i)}),f=(0,br.map)(r,function(h){return nq(h,r,n,i)});return er.flatten(s.concat(c,o,a,l,u,g,f))}Vt.validateGrammar=MIe;function KIe(r,e){var t=new iq;r.accept(t);var i=t.allProductions,n=er.groupBy(i,tq),s=er.pick(n,function(a){return a.length>1}),o=er.map(er.values(s),function(a){var l=er.first(a),c=e.buildDuplicateFoundError(r,a),u=(0,_v.getProductionDslName)(l),g={message:c,type:No.ParserDefinitionErrorType.DUPLICATE_PRODUCTIONS,ruleName:r.name,dslName:u,occurrence:l.idx},f=rq(l);return f&&(g.parameter=f),g});return o}function tq(r){return(0,_v.getProductionDslName)(r)+"_#_"+r.idx+"_#_"+rq(r)}Vt.identifyProductionForDuplicates=tq;function rq(r){return r instanceof $s.Terminal?r.terminalType.name:r instanceof $s.NonTerminal?r.nonTerminalName:""}var iq=function(r){Zv(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.allProductions=[],t}return e.prototype.visitNonTerminal=function(t){this.allProductions.push(t)},e.prototype.visitOption=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatory=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetition=function(t){this.allProductions.push(t)},e.prototype.visitAlternation=function(t){this.allProductions.push(t)},e.prototype.visitTerminal=function(t){this.allProductions.push(t)},e}($v.GAstVisitor);Vt.OccurrenceValidationCollector=iq;function nq(r,e,t,i){var n=[],s=(0,br.reduce)(e,function(a,l){return l.name===r.name?a+1:a},0);if(s>1){var o=i.buildDuplicateRuleNameError({topLevelRule:r,grammarName:t});n.push({message:o,type:No.ParserDefinitionErrorType.DUPLICATE_RULE_NAME,ruleName:r.name})}return n}Vt.validateRuleDoesNotAlreadyExist=nq;function UIe(r,e,t){var i=[],n;return er.contains(e,r)||(n="Invalid rule override, rule: ->"+r+"<- cannot be overridden in the grammar: ->"+t+"<-as it is not defined in any of the super grammars ",i.push({message:n,type:No.ParserDefinitionErrorType.INVALID_RULE_OVERRIDE,ruleName:r})),i}Vt.validateRuleIsOverridden=UIe;function ex(r,e,t,i){i===void 0&&(i=[]);var n=[],s=Dd(e.definition);if(er.isEmpty(s))return[];var o=r.name,a=er.contains(s,r);a&&n.push({message:t.buildLeftRecursionError({topLevelRule:r,leftRecursionPath:i}),type:No.ParserDefinitionErrorType.LEFT_RECURSION,ruleName:o});var l=er.difference(s,i.concat([r])),c=er.map(l,function(u){var g=er.cloneArr(i);return g.push(u),ex(r,u,t,g)});return n.concat(er.flatten(c))}Vt.validateNoLeftRecursion=ex;function Dd(r){var e=[];if(er.isEmpty(r))return e;var t=er.first(r);if(t instanceof $s.NonTerminal)e.push(t.referencedRule);else if(t instanceof $s.Alternative||t instanceof $s.Option||t instanceof $s.RepetitionMandatory||t instanceof $s.RepetitionMandatoryWithSeparator||t instanceof $s.RepetitionWithSeparator||t instanceof $s.Repetition)e=e.concat(Dd(t.definition));else if(t instanceof $s.Alternation)e=er.flatten(er.map(t.definition,function(o){return Dd(o.definition)}));else if(!(t instanceof $s.Terminal))throw Error("non exhaustive match");var i=(0,_v.isOptionalProd)(t),n=r.length>1;if(i&&n){var s=er.drop(r);return e.concat(Dd(s))}else return e}Vt.getFirstNoneTerminal=Dd;var tx=function(r){Zv(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.alternations=[],t}return e.prototype.visitAlternation=function(t){this.alternations.push(t)},e}($v.GAstVisitor);function sq(r,e){var t=new tx;r.accept(t);var i=t.alternations,n=er.reduce(i,function(s,o){var a=er.dropRight(o.definition),l=er.map(a,function(c,u){var g=(0,OIe.nextPossibleTokensAfter)([c],[],null,1);return er.isEmpty(g)?{message:e.buildEmptyAlternationError({topLevelRule:r,alternation:o,emptyChoiceIdx:u}),type:No.ParserDefinitionErrorType.NONE_LAST_EMPTY_ALT,ruleName:r.name,occurrence:o.idx,alternative:u+1}:null});return s.concat(er.compact(l))},[]);return n}Vt.validateEmptyOrAlternative=sq;function oq(r,e,t){var i=new tx;r.accept(i);var n=i.alternations;n=(0,br.reject)(n,function(o){return o.ignoreAmbiguities===!0});var s=er.reduce(n,function(o,a){var l=a.idx,c=a.maxLookahead||e,u=(0,_g.getLookaheadPathsForOr)(l,r,c,a),g=HIe(u,a,r,t),f=cq(u,a,r,t);return o.concat(g,f)},[]);return s}Vt.validateAmbiguousAlternationAlternatives=oq;var aq=function(r){Zv(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.allProductions=[],t}return e.prototype.visitRepetitionWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatory=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetition=function(t){this.allProductions.push(t)},e}($v.GAstVisitor);Vt.RepetionCollector=aq;function Aq(r,e){var t=new tx;r.accept(t);var i=t.alternations,n=er.reduce(i,function(s,o){return o.definition.length>255&&s.push({message:e.buildTooManyAlternativesError({topLevelRule:r,alternation:o}),type:No.ParserDefinitionErrorType.TOO_MANY_ALTS,ruleName:r.name,occurrence:o.idx}),s},[]);return n}Vt.validateTooManyAlts=Aq;function lq(r,e,t){var i=[];return(0,br.forEach)(r,function(n){var s=new aq;n.accept(s);var o=s.allProductions;(0,br.forEach)(o,function(a){var l=(0,_g.getProdType)(a),c=a.maxLookahead||e,u=a.idx,g=(0,_g.getLookaheadPathsForOptionalProd)(u,n,l,c),f=g[0];if((0,br.isEmpty)((0,br.flatten)(f))){var h=t.buildEmptyRepetitionError({topLevelRule:n,repetition:a});i.push({message:h,type:No.ParserDefinitionErrorType.NO_NON_EMPTY_LOOKAHEAD,ruleName:n.name})}})}),i}Vt.validateSomeNonEmptyLookaheadPath=lq;function HIe(r,e,t,i){var n=[],s=(0,br.reduce)(r,function(a,l,c){return e.definition[c].ignoreAmbiguities===!0||(0,br.forEach)(l,function(u){var g=[c];(0,br.forEach)(r,function(f,h){c!==h&&(0,_g.containsPath)(f,u)&&e.definition[h].ignoreAmbiguities!==!0&&g.push(h)}),g.length>1&&!(0,_g.containsPath)(n,u)&&(n.push(u),a.push({alts:g,path:u}))}),a},[]),o=er.map(s,function(a){var l=(0,br.map)(a.alts,function(u){return u+1}),c=i.buildAlternationAmbiguityError({topLevelRule:t,alternation:e,ambiguityIndices:l,prefixPath:a.path});return{message:c,type:No.ParserDefinitionErrorType.AMBIGUOUS_ALTS,ruleName:t.name,occurrence:e.idx,alternatives:[a.alts]}});return o}function cq(r,e,t,i){var n=[],s=(0,br.reduce)(r,function(o,a,l){var c=(0,br.map)(a,function(u){return{idx:l,path:u}});return o.concat(c)},[]);return(0,br.forEach)(s,function(o){var a=e.definition[o.idx];if(a.ignoreAmbiguities!==!0){var l=o.idx,c=o.path,u=(0,br.findAll)(s,function(f){return e.definition[f.idx].ignoreAmbiguities!==!0&&f.idx{"use strict";Object.defineProperty($g,"__esModule",{value:!0});$g.validateGrammar=$g.resolveGrammar=void 0;var ix=Gt(),YIe=jj(),jIe=rx(),uq=Sd();function qIe(r){r=(0,ix.defaults)(r,{errMsgProvider:uq.defaultGrammarResolverErrorProvider});var e={};return(0,ix.forEach)(r.rules,function(t){e[t.name]=t}),(0,YIe.resolveGrammar)(e,r.errMsgProvider)}$g.resolveGrammar=qIe;function JIe(r){return r=(0,ix.defaults)(r,{errMsgProvider:uq.defaultGrammarValidatorErrorProvider}),(0,jIe.validateGrammar)(r.rules,r.maxLookahead,r.tokenTypes,r.errMsgProvider,r.grammarName)}$g.validateGrammar=JIe});var ef=w(mn=>{"use strict";var kd=mn&&mn.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(mn,"__esModule",{value:!0});mn.EarlyExitException=mn.NotAllInputParsedException=mn.NoViableAltException=mn.MismatchedTokenException=mn.isRecognitionException=void 0;var WIe=Gt(),fq="MismatchedTokenException",hq="NoViableAltException",pq="EarlyExitException",dq="NotAllInputParsedException",Cq=[fq,hq,pq,dq];Object.freeze(Cq);function zIe(r){return(0,WIe.contains)(Cq,r.name)}mn.isRecognitionException=zIe;var uy=function(r){kd(e,r);function e(t,i){var n=this.constructor,s=r.call(this,t)||this;return s.token=i,s.resyncedTokens=[],Object.setPrototypeOf(s,n.prototype),Error.captureStackTrace&&Error.captureStackTrace(s,s.constructor),s}return e}(Error),VIe=function(r){kd(e,r);function e(t,i,n){var s=r.call(this,t,i)||this;return s.previousToken=n,s.name=fq,s}return e}(uy);mn.MismatchedTokenException=VIe;var XIe=function(r){kd(e,r);function e(t,i,n){var s=r.call(this,t,i)||this;return s.previousToken=n,s.name=hq,s}return e}(uy);mn.NoViableAltException=XIe;var ZIe=function(r){kd(e,r);function e(t,i){var n=r.call(this,t,i)||this;return n.name=dq,n}return e}(uy);mn.NotAllInputParsedException=ZIe;var _Ie=function(r){kd(e,r);function e(t,i,n){var s=r.call(this,t,i)||this;return s.previousToken=n,s.name=pq,s}return e}(uy);mn.EarlyExitException=_Ie});var sx=w(Ki=>{"use strict";Object.defineProperty(Ki,"__esModule",{value:!0});Ki.attemptInRepetitionRecovery=Ki.Recoverable=Ki.InRuleRecoveryException=Ki.IN_RULE_RECOVERY_EXCEPTION=Ki.EOF_FOLLOW_KEY=void 0;var gy=NA(),gs=Gt(),$Ie=ef(),eye=Jv(),tye=Gn();Ki.EOF_FOLLOW_KEY={};Ki.IN_RULE_RECOVERY_EXCEPTION="InRuleRecoveryException";function nx(r){this.name=Ki.IN_RULE_RECOVERY_EXCEPTION,this.message=r}Ki.InRuleRecoveryException=nx;nx.prototype=Error.prototype;var rye=function(){function r(){}return r.prototype.initRecoverable=function(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=(0,gs.has)(e,"recoveryEnabled")?e.recoveryEnabled:tye.DEFAULT_PARSER_CONFIG.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=mq)},r.prototype.getTokenToInsert=function(e){var t=(0,gy.createTokenInstance)(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return t.isInsertedInRecovery=!0,t},r.prototype.canTokenTypeBeInsertedInRecovery=function(e){return!0},r.prototype.tryInRepetitionRecovery=function(e,t,i,n){for(var s=this,o=this.findReSyncTokenType(),a=this.exportLexerState(),l=[],c=!1,u=this.LA(1),g=this.LA(1),f=function(){var h=s.LA(0),p=s.errorMessageProvider.buildMismatchTokenMessage({expected:n,actual:u,previous:h,ruleName:s.getCurrRuleFullName()}),C=new $Ie.MismatchedTokenException(p,u,s.LA(0));C.resyncedTokens=(0,gs.dropRight)(l),s.SAVE_ERROR(C)};!c;)if(this.tokenMatcher(g,n)){f();return}else if(i.call(this)){f(),e.apply(this,t);return}else this.tokenMatcher(g,o)?c=!0:(g=this.SKIP_TOKEN(),this.addToResyncTokens(g,l));this.importLexerState(a)},r.prototype.shouldInRepetitionRecoveryBeTried=function(e,t,i){return!(i===!1||e===void 0||t===void 0||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t)))},r.prototype.getFollowsForInRuleRecovery=function(e,t){var i=this.getCurrentGrammarPath(e,t),n=this.getNextPossibleTokenTypes(i);return n},r.prototype.tryInRuleRecovery=function(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t)){var i=this.getTokenToInsert(e);return i}if(this.canRecoverWithSingleTokenDeletion(e)){var n=this.SKIP_TOKEN();return this.consumeToken(),n}throw new nx("sad sad panda")},r.prototype.canPerformInRuleRecovery=function(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)},r.prototype.canRecoverWithSingleTokenInsertion=function(e,t){var i=this;if(!this.canTokenTypeBeInsertedInRecovery(e)||(0,gs.isEmpty)(t))return!1;var n=this.LA(1),s=(0,gs.find)(t,function(o){return i.tokenMatcher(n,o)})!==void 0;return s},r.prototype.canRecoverWithSingleTokenDeletion=function(e){var t=this.tokenMatcher(this.LA(2),e);return t},r.prototype.isInCurrentRuleReSyncSet=function(e){var t=this.getCurrFollowKey(),i=this.getFollowSetFromFollowKey(t);return(0,gs.contains)(i,e)},r.prototype.findReSyncTokenType=function(){for(var e=this.flattenFollowSet(),t=this.LA(1),i=2;;){var n=t.tokenType;if((0,gs.contains)(e,n))return n;t=this.LA(i),i++}},r.prototype.getCurrFollowKey=function(){if(this.RULE_STACK.length===1)return Ki.EOF_FOLLOW_KEY;var e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),i=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(i)}},r.prototype.buildFullFollowKeyStack=function(){var e=this,t=this.RULE_STACK,i=this.RULE_OCCURRENCE_STACK;return(0,gs.map)(t,function(n,s){return s===0?Ki.EOF_FOLLOW_KEY:{ruleName:e.shortRuleNameToFullName(n),idxInCallingRule:i[s],inRule:e.shortRuleNameToFullName(t[s-1])}})},r.prototype.flattenFollowSet=function(){var e=this,t=(0,gs.map)(this.buildFullFollowKeyStack(),function(i){return e.getFollowSetFromFollowKey(i)});return(0,gs.flatten)(t)},r.prototype.getFollowSetFromFollowKey=function(e){if(e===Ki.EOF_FOLLOW_KEY)return[gy.EOF];var t=e.ruleName+e.idxInCallingRule+eye.IN+e.inRule;return this.resyncFollows[t]},r.prototype.addToResyncTokens=function(e,t){return this.tokenMatcher(e,gy.EOF)||t.push(e),t},r.prototype.reSyncTo=function(e){for(var t=[],i=this.LA(1);this.tokenMatcher(i,e)===!1;)i=this.SKIP_TOKEN(),this.addToResyncTokens(i,t);return(0,gs.dropRight)(t)},r.prototype.attemptInRepetitionRecovery=function(e,t,i,n,s,o,a){},r.prototype.getCurrentGrammarPath=function(e,t){var i=this.getHumanReadableRuleStack(),n=(0,gs.cloneArr)(this.RULE_OCCURRENCE_STACK),s={ruleStack:i,occurrenceStack:n,lastTok:e,lastTokOccurrence:t};return s},r.prototype.getHumanReadableRuleStack=function(){var e=this;return(0,gs.map)(this.RULE_STACK,function(t){return e.shortRuleNameToFullName(t)})},r}();Ki.Recoverable=rye;function mq(r,e,t,i,n,s,o){var a=this.getKeyForAutomaticLookahead(i,n),l=this.firstAfterRepMap[a];if(l===void 0){var c=this.getCurrRuleFullName(),u=this.getGAstProductions()[c],g=new s(u,n);l=g.startWalking(),this.firstAfterRepMap[a]=l}var f=l.token,h=l.occurrence,p=l.isEndOfRule;this.RULE_STACK.length===1&&p&&f===void 0&&(f=gy.EOF,h=1),this.shouldInRepetitionRecoveryBeTried(f,h,o)&&this.tryInRepetitionRecovery(r,e,t,f)}Ki.attemptInRepetitionRecovery=mq});var fy=w(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.getKeyForAutomaticLookahead=Jt.AT_LEAST_ONE_SEP_IDX=Jt.MANY_SEP_IDX=Jt.AT_LEAST_ONE_IDX=Jt.MANY_IDX=Jt.OPTION_IDX=Jt.OR_IDX=Jt.BITS_FOR_ALT_IDX=Jt.BITS_FOR_RULE_IDX=Jt.BITS_FOR_OCCURRENCE_IDX=Jt.BITS_FOR_METHOD_TYPE=void 0;Jt.BITS_FOR_METHOD_TYPE=4;Jt.BITS_FOR_OCCURRENCE_IDX=8;Jt.BITS_FOR_RULE_IDX=12;Jt.BITS_FOR_ALT_IDX=8;Jt.OR_IDX=1<{"use strict";Object.defineProperty(hy,"__esModule",{value:!0});hy.LooksAhead=void 0;var Pa=Pd(),eo=Gt(),Eq=Gn(),Da=fy(),pc=bd(),nye=function(){function r(){}return r.prototype.initLooksAhead=function(e){this.dynamicTokensEnabled=(0,eo.has)(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:Eq.DEFAULT_PARSER_CONFIG.dynamicTokensEnabled,this.maxLookahead=(0,eo.has)(e,"maxLookahead")?e.maxLookahead:Eq.DEFAULT_PARSER_CONFIG.maxLookahead,this.lookAheadFuncsCache=(0,eo.isES2015MapSupported)()?new Map:[],(0,eo.isES2015MapSupported)()?(this.getLaFuncFromCache=this.getLaFuncFromMap,this.setLaFuncCache=this.setLaFuncCacheUsingMap):(this.getLaFuncFromCache=this.getLaFuncFromObj,this.setLaFuncCache=this.setLaFuncUsingObj)},r.prototype.preComputeLookaheadFunctions=function(e){var t=this;(0,eo.forEach)(e,function(i){t.TRACE_INIT(i.name+" Rule Lookahead",function(){var n=(0,pc.collectMethods)(i),s=n.alternation,o=n.repetition,a=n.option,l=n.repetitionMandatory,c=n.repetitionMandatoryWithSeparator,u=n.repetitionWithSeparator;(0,eo.forEach)(s,function(g){var f=g.idx===0?"":g.idx;t.TRACE_INIT(""+(0,pc.getProductionDslName)(g)+f,function(){var h=(0,Pa.buildLookaheadFuncForOr)(g.idx,i,g.maxLookahead||t.maxLookahead,g.hasPredicates,t.dynamicTokensEnabled,t.lookAheadBuilderForAlternatives),p=(0,Da.getKeyForAutomaticLookahead)(t.fullRuleNameToShort[i.name],Da.OR_IDX,g.idx);t.setLaFuncCache(p,h)})}),(0,eo.forEach)(o,function(g){t.computeLookaheadFunc(i,g.idx,Da.MANY_IDX,Pa.PROD_TYPE.REPETITION,g.maxLookahead,(0,pc.getProductionDslName)(g))}),(0,eo.forEach)(a,function(g){t.computeLookaheadFunc(i,g.idx,Da.OPTION_IDX,Pa.PROD_TYPE.OPTION,g.maxLookahead,(0,pc.getProductionDslName)(g))}),(0,eo.forEach)(l,function(g){t.computeLookaheadFunc(i,g.idx,Da.AT_LEAST_ONE_IDX,Pa.PROD_TYPE.REPETITION_MANDATORY,g.maxLookahead,(0,pc.getProductionDslName)(g))}),(0,eo.forEach)(c,function(g){t.computeLookaheadFunc(i,g.idx,Da.AT_LEAST_ONE_SEP_IDX,Pa.PROD_TYPE.REPETITION_MANDATORY_WITH_SEPARATOR,g.maxLookahead,(0,pc.getProductionDslName)(g))}),(0,eo.forEach)(u,function(g){t.computeLookaheadFunc(i,g.idx,Da.MANY_SEP_IDX,Pa.PROD_TYPE.REPETITION_WITH_SEPARATOR,g.maxLookahead,(0,pc.getProductionDslName)(g))})})})},r.prototype.computeLookaheadFunc=function(e,t,i,n,s,o){var a=this;this.TRACE_INIT(""+o+(t===0?"":t),function(){var l=(0,Pa.buildLookaheadFuncForOptionalProd)(t,e,s||a.maxLookahead,a.dynamicTokensEnabled,n,a.lookAheadBuilderForOptional),c=(0,Da.getKeyForAutomaticLookahead)(a.fullRuleNameToShort[e.name],i,t);a.setLaFuncCache(c,l)})},r.prototype.lookAheadBuilderForOptional=function(e,t,i){return(0,Pa.buildSingleAlternativeLookaheadFunction)(e,t,i)},r.prototype.lookAheadBuilderForAlternatives=function(e,t,i,n){return(0,Pa.buildAlternativesLookAheadFunc)(e,t,i,n)},r.prototype.getKeyForAutomaticLookahead=function(e,t){var i=this.getLastExplicitRuleShortName();return(0,Da.getKeyForAutomaticLookahead)(i,e,t)},r.prototype.getLaFuncFromCache=function(e){},r.prototype.getLaFuncFromMap=function(e){return this.lookAheadFuncsCache.get(e)},r.prototype.getLaFuncFromObj=function(e){return this.lookAheadFuncsCache[e]},r.prototype.setLaFuncCache=function(e,t){},r.prototype.setLaFuncCacheUsingMap=function(e,t){this.lookAheadFuncsCache.set(e,t)},r.prototype.setLaFuncUsingObj=function(e,t){this.lookAheadFuncsCache[e]=t},r}();hy.LooksAhead=nye});var yq=w(Lo=>{"use strict";Object.defineProperty(Lo,"__esModule",{value:!0});Lo.addNoneTerminalToCst=Lo.addTerminalToCst=Lo.setNodeLocationFull=Lo.setNodeLocationOnlyOffset=void 0;function sye(r,e){isNaN(r.startOffset)===!0?(r.startOffset=e.startOffset,r.endOffset=e.endOffset):r.endOffset{"use strict";Object.defineProperty(OA,"__esModule",{value:!0});OA.defineNameProp=OA.functionName=OA.classNameFromInstance=void 0;var lye=Gt();function cye(r){return Bq(r.constructor)}OA.classNameFromInstance=cye;var wq="name";function Bq(r){var e=r.name;return e||"anonymous"}OA.functionName=Bq;function uye(r,e){var t=Object.getOwnPropertyDescriptor(r,wq);return(0,lye.isUndefined)(t)||t.configurable?(Object.defineProperty(r,wq,{enumerable:!1,configurable:!0,writable:!1,value:e}),!0):!1}OA.defineNameProp=uye});var xq=w(Si=>{"use strict";Object.defineProperty(Si,"__esModule",{value:!0});Si.validateRedundantMethods=Si.validateMissingCstMethods=Si.validateVisitor=Si.CstVisitorDefinitionError=Si.createBaseVisitorConstructorWithDefaults=Si.createBaseSemanticVisitorConstructor=Si.defaultVisit=void 0;var fs=Gt(),Rd=ox();function Qq(r,e){for(var t=(0,fs.keys)(r),i=t.length,n=0;n: + `+(""+s.join(` + +`).replace(/\n/g,` + `)))}}};return t.prototype=i,t.prototype.constructor=t,t._RULE_NAMES=e,t}Si.createBaseSemanticVisitorConstructor=gye;function fye(r,e,t){var i=function(){};(0,Rd.defineNameProp)(i,r+"BaseSemanticsWithDefaults");var n=Object.create(t.prototype);return(0,fs.forEach)(e,function(s){n[s]=Qq}),i.prototype=n,i.prototype.constructor=i,i}Si.createBaseVisitorConstructorWithDefaults=fye;var ax;(function(r){r[r.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",r[r.MISSING_METHOD=1]="MISSING_METHOD"})(ax=Si.CstVisitorDefinitionError||(Si.CstVisitorDefinitionError={}));function bq(r,e){var t=Sq(r,e),i=vq(r,e);return t.concat(i)}Si.validateVisitor=bq;function Sq(r,e){var t=(0,fs.map)(e,function(i){if(!(0,fs.isFunction)(r[i]))return{msg:"Missing visitor method: <"+i+"> on "+(0,Rd.functionName)(r.constructor)+" CST Visitor.",type:ax.MISSING_METHOD,methodName:i}});return(0,fs.compact)(t)}Si.validateMissingCstMethods=Sq;var hye=["constructor","visit","validateVisitor"];function vq(r,e){var t=[];for(var i in r)(0,fs.isFunction)(r[i])&&!(0,fs.contains)(hye,i)&&!(0,fs.contains)(e,i)&&t.push({msg:"Redundant visitor method: <"+i+"> on "+(0,Rd.functionName)(r.constructor)+` CST Visitor +There is no Grammar Rule corresponding to this method's name. +`,type:ax.REDUNDANT_METHOD,methodName:i});return t}Si.validateRedundantMethods=vq});var Dq=w(py=>{"use strict";Object.defineProperty(py,"__esModule",{value:!0});py.TreeBuilder=void 0;var tf=yq(),_r=Gt(),Pq=xq(),pye=Gn(),dye=function(){function r(){}return r.prototype.initTreeBuilder=function(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=(0,_r.has)(e,"nodeLocationTracking")?e.nodeLocationTracking:pye.DEFAULT_PARSER_CONFIG.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=_r.NOOP,this.cstFinallyStateUpdate=_r.NOOP,this.cstPostTerminal=_r.NOOP,this.cstPostNonTerminal=_r.NOOP,this.cstPostRule=_r.NOOP;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=tf.setNodeLocationFull,this.setNodeLocationFromNode=tf.setNodeLocationFull,this.cstPostRule=_r.NOOP,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=_r.NOOP,this.setNodeLocationFromNode=_r.NOOP,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=tf.setNodeLocationOnlyOffset,this.setNodeLocationFromNode=tf.setNodeLocationOnlyOffset,this.cstPostRule=_r.NOOP,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=_r.NOOP,this.setNodeLocationFromNode=_r.NOOP,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=_r.NOOP,this.setNodeLocationFromNode=_r.NOOP,this.cstPostRule=_r.NOOP,this.setInitialNodeLocation=_r.NOOP;else throw Error('Invalid config option: "'+e.nodeLocationTracking+'"')},r.prototype.setInitialNodeLocationOnlyOffsetRecovery=function(e){e.location={startOffset:NaN,endOffset:NaN}},r.prototype.setInitialNodeLocationOnlyOffsetRegular=function(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}},r.prototype.setInitialNodeLocationFullRecovery=function(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}},r.prototype.setInitialNodeLocationFullRegular=function(e){var t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}},r.prototype.cstInvocationStateUpdate=function(e,t){var i={name:e,children:{}};this.setInitialNodeLocation(i),this.CST_STACK.push(i)},r.prototype.cstFinallyStateUpdate=function(){this.CST_STACK.pop()},r.prototype.cstPostRuleFull=function(e){var t=this.LA(0),i=e.location;i.startOffset<=t.startOffset?(i.endOffset=t.endOffset,i.endLine=t.endLine,i.endColumn=t.endColumn):(i.startOffset=NaN,i.startLine=NaN,i.startColumn=NaN)},r.prototype.cstPostRuleOnlyOffset=function(e){var t=this.LA(0),i=e.location;i.startOffset<=t.startOffset?i.endOffset=t.endOffset:i.startOffset=NaN},r.prototype.cstPostTerminal=function(e,t){var i=this.CST_STACK[this.CST_STACK.length-1];(0,tf.addTerminalToCst)(i,t,e),this.setNodeLocationFromToken(i.location,t)},r.prototype.cstPostNonTerminal=function(e,t){var i=this.CST_STACK[this.CST_STACK.length-1];(0,tf.addNoneTerminalToCst)(i,t,e),this.setNodeLocationFromNode(i.location,e.location)},r.prototype.getBaseCstVisitorConstructor=function(){if((0,_r.isUndefined)(this.baseCstVisitorConstructor)){var e=(0,Pq.createBaseSemanticVisitorConstructor)(this.className,(0,_r.keys)(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor},r.prototype.getBaseCstVisitorConstructorWithDefaults=function(){if((0,_r.isUndefined)(this.baseCstVisitorWithDefaultsConstructor)){var e=(0,Pq.createBaseVisitorConstructorWithDefaults)(this.className,(0,_r.keys)(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor},r.prototype.getLastExplicitRuleShortName=function(){var e=this.RULE_STACK;return e[e.length-1]},r.prototype.getPreviousExplicitRuleShortName=function(){var e=this.RULE_STACK;return e[e.length-2]},r.prototype.getLastExplicitRuleOccurrenceIndex=function(){var e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]},r}();py.TreeBuilder=dye});var Rq=w(dy=>{"use strict";Object.defineProperty(dy,"__esModule",{value:!0});dy.LexerAdapter=void 0;var kq=Gn(),Cye=function(){function r(){}return r.prototype.initLexerAdapter=function(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1},Object.defineProperty(r.prototype,"input",{get:function(){return this.tokVector},set:function(e){if(this.selfAnalysisDone!==!0)throw Error("Missing invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length},enumerable:!1,configurable:!0}),r.prototype.SKIP_TOKEN=function(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):kq.END_OF_FILE},r.prototype.LA=function(e){var t=this.currIdx+e;return t<0||this.tokVectorLength<=t?kq.END_OF_FILE:this.tokVector[t]},r.prototype.consumeToken=function(){this.currIdx++},r.prototype.exportLexerState=function(){return this.currIdx},r.prototype.importLexerState=function(e){this.currIdx=e},r.prototype.resetLexerState=function(){this.currIdx=-1},r.prototype.moveToTerminatedState=function(){this.currIdx=this.tokVector.length-1},r.prototype.getLexerPosition=function(){return this.exportLexerState()},r}();dy.LexerAdapter=Cye});var Nq=w(Cy=>{"use strict";Object.defineProperty(Cy,"__esModule",{value:!0});Cy.RecognizerApi=void 0;var Fq=Gt(),mye=ef(),Ax=Gn(),Eye=Sd(),Iye=rx(),yye=dn(),wye=function(){function r(){}return r.prototype.ACTION=function(e){return e.call(this)},r.prototype.consume=function(e,t,i){return this.consumeInternal(t,e,i)},r.prototype.subrule=function(e,t,i){return this.subruleInternal(t,e,i)},r.prototype.option=function(e,t){return this.optionInternal(t,e)},r.prototype.or=function(e,t){return this.orInternal(t,e)},r.prototype.many=function(e,t){return this.manyInternal(e,t)},r.prototype.atLeastOne=function(e,t){return this.atLeastOneInternal(e,t)},r.prototype.CONSUME=function(e,t){return this.consumeInternal(e,0,t)},r.prototype.CONSUME1=function(e,t){return this.consumeInternal(e,1,t)},r.prototype.CONSUME2=function(e,t){return this.consumeInternal(e,2,t)},r.prototype.CONSUME3=function(e,t){return this.consumeInternal(e,3,t)},r.prototype.CONSUME4=function(e,t){return this.consumeInternal(e,4,t)},r.prototype.CONSUME5=function(e,t){return this.consumeInternal(e,5,t)},r.prototype.CONSUME6=function(e,t){return this.consumeInternal(e,6,t)},r.prototype.CONSUME7=function(e,t){return this.consumeInternal(e,7,t)},r.prototype.CONSUME8=function(e,t){return this.consumeInternal(e,8,t)},r.prototype.CONSUME9=function(e,t){return this.consumeInternal(e,9,t)},r.prototype.SUBRULE=function(e,t){return this.subruleInternal(e,0,t)},r.prototype.SUBRULE1=function(e,t){return this.subruleInternal(e,1,t)},r.prototype.SUBRULE2=function(e,t){return this.subruleInternal(e,2,t)},r.prototype.SUBRULE3=function(e,t){return this.subruleInternal(e,3,t)},r.prototype.SUBRULE4=function(e,t){return this.subruleInternal(e,4,t)},r.prototype.SUBRULE5=function(e,t){return this.subruleInternal(e,5,t)},r.prototype.SUBRULE6=function(e,t){return this.subruleInternal(e,6,t)},r.prototype.SUBRULE7=function(e,t){return this.subruleInternal(e,7,t)},r.prototype.SUBRULE8=function(e,t){return this.subruleInternal(e,8,t)},r.prototype.SUBRULE9=function(e,t){return this.subruleInternal(e,9,t)},r.prototype.OPTION=function(e){return this.optionInternal(e,0)},r.prototype.OPTION1=function(e){return this.optionInternal(e,1)},r.prototype.OPTION2=function(e){return this.optionInternal(e,2)},r.prototype.OPTION3=function(e){return this.optionInternal(e,3)},r.prototype.OPTION4=function(e){return this.optionInternal(e,4)},r.prototype.OPTION5=function(e){return this.optionInternal(e,5)},r.prototype.OPTION6=function(e){return this.optionInternal(e,6)},r.prototype.OPTION7=function(e){return this.optionInternal(e,7)},r.prototype.OPTION8=function(e){return this.optionInternal(e,8)},r.prototype.OPTION9=function(e){return this.optionInternal(e,9)},r.prototype.OR=function(e){return this.orInternal(e,0)},r.prototype.OR1=function(e){return this.orInternal(e,1)},r.prototype.OR2=function(e){return this.orInternal(e,2)},r.prototype.OR3=function(e){return this.orInternal(e,3)},r.prototype.OR4=function(e){return this.orInternal(e,4)},r.prototype.OR5=function(e){return this.orInternal(e,5)},r.prototype.OR6=function(e){return this.orInternal(e,6)},r.prototype.OR7=function(e){return this.orInternal(e,7)},r.prototype.OR8=function(e){return this.orInternal(e,8)},r.prototype.OR9=function(e){return this.orInternal(e,9)},r.prototype.MANY=function(e){this.manyInternal(0,e)},r.prototype.MANY1=function(e){this.manyInternal(1,e)},r.prototype.MANY2=function(e){this.manyInternal(2,e)},r.prototype.MANY3=function(e){this.manyInternal(3,e)},r.prototype.MANY4=function(e){this.manyInternal(4,e)},r.prototype.MANY5=function(e){this.manyInternal(5,e)},r.prototype.MANY6=function(e){this.manyInternal(6,e)},r.prototype.MANY7=function(e){this.manyInternal(7,e)},r.prototype.MANY8=function(e){this.manyInternal(8,e)},r.prototype.MANY9=function(e){this.manyInternal(9,e)},r.prototype.MANY_SEP=function(e){this.manySepFirstInternal(0,e)},r.prototype.MANY_SEP1=function(e){this.manySepFirstInternal(1,e)},r.prototype.MANY_SEP2=function(e){this.manySepFirstInternal(2,e)},r.prototype.MANY_SEP3=function(e){this.manySepFirstInternal(3,e)},r.prototype.MANY_SEP4=function(e){this.manySepFirstInternal(4,e)},r.prototype.MANY_SEP5=function(e){this.manySepFirstInternal(5,e)},r.prototype.MANY_SEP6=function(e){this.manySepFirstInternal(6,e)},r.prototype.MANY_SEP7=function(e){this.manySepFirstInternal(7,e)},r.prototype.MANY_SEP8=function(e){this.manySepFirstInternal(8,e)},r.prototype.MANY_SEP9=function(e){this.manySepFirstInternal(9,e)},r.prototype.AT_LEAST_ONE=function(e){this.atLeastOneInternal(0,e)},r.prototype.AT_LEAST_ONE1=function(e){return this.atLeastOneInternal(1,e)},r.prototype.AT_LEAST_ONE2=function(e){this.atLeastOneInternal(2,e)},r.prototype.AT_LEAST_ONE3=function(e){this.atLeastOneInternal(3,e)},r.prototype.AT_LEAST_ONE4=function(e){this.atLeastOneInternal(4,e)},r.prototype.AT_LEAST_ONE5=function(e){this.atLeastOneInternal(5,e)},r.prototype.AT_LEAST_ONE6=function(e){this.atLeastOneInternal(6,e)},r.prototype.AT_LEAST_ONE7=function(e){this.atLeastOneInternal(7,e)},r.prototype.AT_LEAST_ONE8=function(e){this.atLeastOneInternal(8,e)},r.prototype.AT_LEAST_ONE9=function(e){this.atLeastOneInternal(9,e)},r.prototype.AT_LEAST_ONE_SEP=function(e){this.atLeastOneSepFirstInternal(0,e)},r.prototype.AT_LEAST_ONE_SEP1=function(e){this.atLeastOneSepFirstInternal(1,e)},r.prototype.AT_LEAST_ONE_SEP2=function(e){this.atLeastOneSepFirstInternal(2,e)},r.prototype.AT_LEAST_ONE_SEP3=function(e){this.atLeastOneSepFirstInternal(3,e)},r.prototype.AT_LEAST_ONE_SEP4=function(e){this.atLeastOneSepFirstInternal(4,e)},r.prototype.AT_LEAST_ONE_SEP5=function(e){this.atLeastOneSepFirstInternal(5,e)},r.prototype.AT_LEAST_ONE_SEP6=function(e){this.atLeastOneSepFirstInternal(6,e)},r.prototype.AT_LEAST_ONE_SEP7=function(e){this.atLeastOneSepFirstInternal(7,e)},r.prototype.AT_LEAST_ONE_SEP8=function(e){this.atLeastOneSepFirstInternal(8,e)},r.prototype.AT_LEAST_ONE_SEP9=function(e){this.atLeastOneSepFirstInternal(9,e)},r.prototype.RULE=function(e,t,i){if(i===void 0&&(i=Ax.DEFAULT_RULE_CONFIG),(0,Fq.contains)(this.definedRulesNames,e)){var n=Eye.defaultGrammarValidatorErrorProvider.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),s={message:n,type:Ax.ParserDefinitionErrorType.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(s)}this.definedRulesNames.push(e);var o=this.defineRule(e,t,i);return this[e]=o,o},r.prototype.OVERRIDE_RULE=function(e,t,i){i===void 0&&(i=Ax.DEFAULT_RULE_CONFIG);var n=[];n=n.concat((0,Iye.validateRuleIsOverridden)(e,this.definedRulesNames,this.className)),this.definitionErrors=this.definitionErrors.concat(n);var s=this.defineRule(e,t,i);return this[e]=s,s},r.prototype.BACKTRACK=function(e,t){return function(){this.isBackTrackingStack.push(1);var i=this.saveRecogState();try{return e.apply(this,t),!0}catch(n){if((0,mye.isRecognitionException)(n))return!1;throw n}finally{this.reloadRecogState(i),this.isBackTrackingStack.pop()}}},r.prototype.getGAstProductions=function(){return this.gastProductionsCache},r.prototype.getSerializedGastProductions=function(){return(0,yye.serializeGrammar)((0,Fq.values)(this.gastProductionsCache))},r}();Cy.RecognizerApi=wye});var Mq=w(Ey=>{"use strict";Object.defineProperty(Ey,"__esModule",{value:!0});Ey.RecognizerEngine=void 0;var Pr=Gt(),Yn=fy(),my=ef(),Lq=Pd(),rf=xd(),Tq=Gn(),Bye=sx(),Oq=NA(),Fd=Vg(),Qye=ox(),bye=function(){function r(){}return r.prototype.initRecognizerEngine=function(e,t){if(this.className=(0,Qye.classNameFromInstance)(this),this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=Fd.tokenStructuredMatcherNoCategories,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},(0,Pr.has)(t,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a property. + See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0 + For Further details.`);if((0,Pr.isArray)(e)){if((0,Pr.isEmpty)(e))throw Error(`A Token Vocabulary cannot be empty. + Note that the first argument for the parser constructor + is no longer a Token vector (since v4.0).`);if(typeof e[0].startOffset=="number")throw Error(`The Parser constructor no longer accepts a token vector as the first argument. + See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0 + For Further details.`)}if((0,Pr.isArray)(e))this.tokensMap=(0,Pr.reduce)(e,function(o,a){return o[a.name]=a,o},{});else if((0,Pr.has)(e,"modes")&&(0,Pr.every)((0,Pr.flatten)((0,Pr.values)(e.modes)),Fd.isTokenType)){var i=(0,Pr.flatten)((0,Pr.values)(e.modes)),n=(0,Pr.uniq)(i);this.tokensMap=(0,Pr.reduce)(n,function(o,a){return o[a.name]=a,o},{})}else if((0,Pr.isObject)(e))this.tokensMap=(0,Pr.cloneObj)(e);else throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=Oq.EOF;var s=(0,Pr.every)((0,Pr.values)(e),function(o){return(0,Pr.isEmpty)(o.categoryMatches)});this.tokenMatcher=s?Fd.tokenStructuredMatcherNoCategories:Fd.tokenStructuredMatcher,(0,Fd.augmentTokenTypes)((0,Pr.values)(this.tokensMap))},r.prototype.defineRule=function(e,t,i){if(this.selfAnalysisDone)throw Error("Grammar rule <"+e+`> may not be defined after the 'performSelfAnalysis' method has been called' +Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);var n=(0,Pr.has)(i,"resyncEnabled")?i.resyncEnabled:Tq.DEFAULT_RULE_CONFIG.resyncEnabled,s=(0,Pr.has)(i,"recoveryValueFunc")?i.recoveryValueFunc:Tq.DEFAULT_RULE_CONFIG.recoveryValueFunc,o=this.ruleShortNameIdx<t},r.prototype.orInternal=function(e,t){var i=this.getKeyForAutomaticLookahead(Yn.OR_IDX,t),n=(0,Pr.isArray)(e)?e:e.DEF,s=this.getLaFuncFromCache(i),o=s.call(this,n);if(o!==void 0){var a=n[o];return a.ALT.call(this)}this.raiseNoAltException(t,e.ERR_MSG)},r.prototype.ruleFinallyStateUpdate=function(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){var e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new my.NotAllInputParsedException(t,e))}},r.prototype.subruleInternal=function(e,t,i){var n;try{var s=i!==void 0?i.ARGS:void 0;return n=e.call(this,t,s),this.cstPostNonTerminal(n,i!==void 0&&i.LABEL!==void 0?i.LABEL:e.ruleName),n}catch(o){this.subruleInternalError(o,i,e.ruleName)}},r.prototype.subruleInternalError=function(e,t,i){throw(0,my.isRecognitionException)(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,t!==void 0&&t.LABEL!==void 0?t.LABEL:i),delete e.partialCstResult),e},r.prototype.consumeInternal=function(e,t,i){var n;try{var s=this.LA(1);this.tokenMatcher(s,e)===!0?(this.consumeToken(),n=s):this.consumeInternalError(e,s,i)}catch(o){n=this.consumeInternalRecovery(e,t,o)}return this.cstPostTerminal(i!==void 0&&i.LABEL!==void 0?i.LABEL:e.name,n),n},r.prototype.consumeInternalError=function(e,t,i){var n,s=this.LA(0);throw i!==void 0&&i.ERR_MSG?n=i.ERR_MSG:n=this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:s,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new my.MismatchedTokenException(n,t,s))},r.prototype.consumeInternalRecovery=function(e,t,i){if(this.recoveryEnabled&&i.name==="MismatchedTokenException"&&!this.isBackTracking()){var n=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,n)}catch(s){throw s.name===Bye.IN_RULE_RECOVERY_EXCEPTION?i:s}}else throw i},r.prototype.saveRecogState=function(){var e=this.errors,t=(0,Pr.cloneArr)(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK}},r.prototype.reloadRecogState=function(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK},r.prototype.ruleInvocationStateUpdate=function(e,t,i){this.RULE_OCCURRENCE_STACK.push(i),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(t,e)},r.prototype.isBackTracking=function(){return this.isBackTrackingStack.length!==0},r.prototype.getCurrRuleFullName=function(){var e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]},r.prototype.shortRuleNameToFullName=function(e){return this.shortRuleNameToFull[e]},r.prototype.isAtEndOfInput=function(){return this.tokenMatcher(this.LA(1),Oq.EOF)},r.prototype.reset=function(){this.resetLexerState(),this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]},r}();Ey.RecognizerEngine=bye});var Uq=w(Iy=>{"use strict";Object.defineProperty(Iy,"__esModule",{value:!0});Iy.ErrorHandler=void 0;var lx=ef(),cx=Gt(),Kq=Pd(),Sye=Gn(),vye=function(){function r(){}return r.prototype.initErrorHandler=function(e){this._errors=[],this.errorMessageProvider=(0,cx.has)(e,"errorMessageProvider")?e.errorMessageProvider:Sye.DEFAULT_PARSER_CONFIG.errorMessageProvider},r.prototype.SAVE_ERROR=function(e){if((0,lx.isRecognitionException)(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:(0,cx.cloneArr)(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")},Object.defineProperty(r.prototype,"errors",{get:function(){return(0,cx.cloneArr)(this._errors)},set:function(e){this._errors=e},enumerable:!1,configurable:!0}),r.prototype.raiseEarlyExitException=function(e,t,i){for(var n=this.getCurrRuleFullName(),s=this.getGAstProductions()[n],o=(0,Kq.getLookaheadPathsForOptionalProd)(e,s,t,this.maxLookahead),a=o[0],l=[],c=1;c<=this.maxLookahead;c++)l.push(this.LA(c));var u=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:a,actual:l,previous:this.LA(0),customUserDescription:i,ruleName:n});throw this.SAVE_ERROR(new lx.EarlyExitException(u,this.LA(1),this.LA(0)))},r.prototype.raiseNoAltException=function(e,t){for(var i=this.getCurrRuleFullName(),n=this.getGAstProductions()[i],s=(0,Kq.getLookaheadPathsForOr)(e,n,this.maxLookahead),o=[],a=1;a<=this.maxLookahead;a++)o.push(this.LA(a));var l=this.LA(0),c=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:s,actual:o,previous:l,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new lx.NoViableAltException(c,this.LA(1),l))},r}();Iy.ErrorHandler=vye});var Yq=w(yy=>{"use strict";Object.defineProperty(yy,"__esModule",{value:!0});yy.ContentAssist=void 0;var Hq=xd(),Gq=Gt(),xye=function(){function r(){}return r.prototype.initContentAssist=function(){},r.prototype.computeContentAssist=function(e,t){var i=this.gastProductionsCache[e];if((0,Gq.isUndefined)(i))throw Error("Rule ->"+e+"<- does not exist in this grammar.");return(0,Hq.nextPossibleTokensAfter)([i],t,this.tokenMatcher,this.maxLookahead)},r.prototype.getNextPossibleTokenTypes=function(e){var t=(0,Gq.first)(e.ruleStack),i=this.getGAstProductions(),n=i[t],s=new Hq.NextAfterTokenWalker(n,e).startWalking();return s},r}();yy.ContentAssist=xye});var Zq=w(Qy=>{"use strict";Object.defineProperty(Qy,"__esModule",{value:!0});Qy.GastRecorder=void 0;var En=Gt(),To=dn(),Pye=yd(),Wq=Vg(),zq=NA(),Dye=Gn(),kye=fy(),By={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(By);var jq=!0,qq=Math.pow(2,kye.BITS_FOR_OCCURRENCE_IDX)-1,Vq=(0,zq.createToken)({name:"RECORDING_PHASE_TOKEN",pattern:Pye.Lexer.NA});(0,Wq.augmentTokenTypes)([Vq]);var Xq=(0,zq.createTokenInstance)(Vq,`This IToken indicates the Parser is in Recording Phase + See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(Xq);var Rye={name:`This CSTNode indicates the Parser is in Recording Phase + See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},Fye=function(){function r(){}return r.prototype.initGastRecorder=function(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1},r.prototype.enableRecording=function(){var e=this;this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",function(){for(var t=function(n){var s=n>0?n:"";e["CONSUME"+s]=function(o,a){return this.consumeInternalRecord(o,n,a)},e["SUBRULE"+s]=function(o,a){return this.subruleInternalRecord(o,n,a)},e["OPTION"+s]=function(o){return this.optionInternalRecord(o,n)},e["OR"+s]=function(o){return this.orInternalRecord(o,n)},e["MANY"+s]=function(o){this.manyInternalRecord(n,o)},e["MANY_SEP"+s]=function(o){this.manySepFirstInternalRecord(n,o)},e["AT_LEAST_ONE"+s]=function(o){this.atLeastOneInternalRecord(n,o)},e["AT_LEAST_ONE_SEP"+s]=function(o){this.atLeastOneSepFirstInternalRecord(n,o)}},i=0;i<10;i++)t(i);e.consume=function(n,s,o){return this.consumeInternalRecord(s,n,o)},e.subrule=function(n,s,o){return this.subruleInternalRecord(s,n,o)},e.option=function(n,s){return this.optionInternalRecord(s,n)},e.or=function(n,s){return this.orInternalRecord(s,n)},e.many=function(n,s){this.manyInternalRecord(n,s)},e.atLeastOne=function(n,s){this.atLeastOneInternalRecord(n,s)},e.ACTION=e.ACTION_RECORD,e.BACKTRACK=e.BACKTRACK_RECORD,e.LA=e.LA_RECORD})},r.prototype.disableRecording=function(){var e=this;this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",function(){for(var t=0;t<10;t++){var i=t>0?t:"";delete e["CONSUME"+i],delete e["SUBRULE"+i],delete e["OPTION"+i],delete e["OR"+i],delete e["MANY"+i],delete e["MANY_SEP"+i],delete e["AT_LEAST_ONE"+i],delete e["AT_LEAST_ONE_SEP"+i]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})},r.prototype.ACTION_RECORD=function(e){},r.prototype.BACKTRACK_RECORD=function(e,t){return function(){return!0}},r.prototype.LA_RECORD=function(e){return Dye.END_OF_FILE},r.prototype.topLevelRuleRecord=function(e,t){try{var i=new To.Rule({definition:[],name:e});return i.name=e,this.recordingProdStack.push(i),t.call(this),this.recordingProdStack.pop(),i}catch(n){if(n.KNOWN_RECORDER_ERROR!==!0)try{n.message=n.message+` + This error was thrown during the "grammar recording phase" For more info see: + https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw n}throw n}},r.prototype.optionInternalRecord=function(e,t){return Nd.call(this,To.Option,e,t)},r.prototype.atLeastOneInternalRecord=function(e,t){Nd.call(this,To.RepetitionMandatory,t,e)},r.prototype.atLeastOneSepFirstInternalRecord=function(e,t){Nd.call(this,To.RepetitionMandatoryWithSeparator,t,e,jq)},r.prototype.manyInternalRecord=function(e,t){Nd.call(this,To.Repetition,t,e)},r.prototype.manySepFirstInternalRecord=function(e,t){Nd.call(this,To.RepetitionWithSeparator,t,e,jq)},r.prototype.orInternalRecord=function(e,t){return Nye.call(this,e,t)},r.prototype.subruleInternalRecord=function(e,t,i){if(wy(t),!e||(0,En.has)(e,"ruleName")===!1){var n=new Error(" argument is invalid"+(" expecting a Parser method reference but got: <"+JSON.stringify(e)+">")+(` + inside top level rule: <`+this.recordingProdStack[0].name+">"));throw n.KNOWN_RECORDER_ERROR=!0,n}var s=(0,En.peek)(this.recordingProdStack),o=e.ruleName,a=new To.NonTerminal({idx:t,nonTerminalName:o,label:i==null?void 0:i.LABEL,referencedRule:void 0});return s.definition.push(a),this.outputCst?Rye:By},r.prototype.consumeInternalRecord=function(e,t,i){if(wy(t),!(0,Wq.hasShortKeyProperty)(e)){var n=new Error(" argument is invalid"+(" expecting a TokenType reference but got: <"+JSON.stringify(e)+">")+(` + inside top level rule: <`+this.recordingProdStack[0].name+">"));throw n.KNOWN_RECORDER_ERROR=!0,n}var s=(0,En.peek)(this.recordingProdStack),o=new To.Terminal({idx:t,terminalType:e,label:i==null?void 0:i.LABEL});return s.definition.push(o),Xq},r}();Qy.GastRecorder=Fye;function Nd(r,e,t,i){i===void 0&&(i=!1),wy(t);var n=(0,En.peek)(this.recordingProdStack),s=(0,En.isFunction)(e)?e:e.DEF,o=new r({definition:[],idx:t});return i&&(o.separator=e.SEP),(0,En.has)(e,"MAX_LOOKAHEAD")&&(o.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(o),s.call(this),n.definition.push(o),this.recordingProdStack.pop(),By}function Nye(r,e){var t=this;wy(e);var i=(0,En.peek)(this.recordingProdStack),n=(0,En.isArray)(r)===!1,s=n===!1?r:r.DEF,o=new To.Alternation({definition:[],idx:e,ignoreAmbiguities:n&&r.IGNORE_AMBIGUITIES===!0});(0,En.has)(r,"MAX_LOOKAHEAD")&&(o.maxLookahead=r.MAX_LOOKAHEAD);var a=(0,En.some)(s,function(l){return(0,En.isFunction)(l.GATE)});return o.hasPredicates=a,i.definition.push(o),(0,En.forEach)(s,function(l){var c=new To.Alternative({definition:[]});o.definition.push(c),(0,En.has)(l,"IGNORE_AMBIGUITIES")?c.ignoreAmbiguities=l.IGNORE_AMBIGUITIES:(0,En.has)(l,"GATE")&&(c.ignoreAmbiguities=!0),t.recordingProdStack.push(c),l.ALT.call(t),t.recordingProdStack.pop()}),By}function Jq(r){return r===0?"":""+r}function wy(r){if(r<0||r>qq){var e=new Error("Invalid DSL Method idx value: <"+r+`> + `+("Idx value must be a none negative value smaller than "+(qq+1)));throw e.KNOWN_RECORDER_ERROR=!0,e}}});var $q=w(by=>{"use strict";Object.defineProperty(by,"__esModule",{value:!0});by.PerformanceTracer=void 0;var _q=Gt(),Lye=Gn(),Tye=function(){function r(){}return r.prototype.initPerformanceTracer=function(e){if((0,_q.has)(e,"traceInitPerf")){var t=e.traceInitPerf,i=typeof t=="number";this.traceInitMaxIdent=i?t:1/0,this.traceInitPerf=i?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=Lye.DEFAULT_PARSER_CONFIG.traceInitPerf;this.traceInitIndent=-1},r.prototype.TRACE_INIT=function(e,t){if(this.traceInitPerf===!0){this.traceInitIndent++;var i=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <"+e+">");var n=(0,_q.timer)(t),s=n.time,o=n.value,a=s>10?console.warn:console.log;return this.traceInitIndent time: "+s+"ms"),this.traceInitIndent--,o}else return t()},r}();by.PerformanceTracer=Tye});var eJ=w(Sy=>{"use strict";Object.defineProperty(Sy,"__esModule",{value:!0});Sy.applyMixins=void 0;function Oye(r,e){e.forEach(function(t){var i=t.prototype;Object.getOwnPropertyNames(i).forEach(function(n){if(n!=="constructor"){var s=Object.getOwnPropertyDescriptor(i,n);s&&(s.get||s.set)?Object.defineProperty(r.prototype,n,s):r.prototype[n]=t.prototype[n]}})})}Sy.applyMixins=Oye});var Gn=w(dr=>{"use strict";var iJ=dr&&dr.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(dr,"__esModule",{value:!0});dr.EmbeddedActionsParser=dr.CstParser=dr.Parser=dr.EMPTY_ALT=dr.ParserDefinitionErrorType=dr.DEFAULT_RULE_CONFIG=dr.DEFAULT_PARSER_CONFIG=dr.END_OF_FILE=void 0;var _i=Gt(),Mye=Uj(),tJ=NA(),nJ=Sd(),rJ=gq(),Kye=sx(),Uye=Iq(),Hye=Dq(),Gye=Rq(),Yye=Nq(),jye=Mq(),qye=Uq(),Jye=Yq(),Wye=Zq(),zye=$q(),Vye=eJ();dr.END_OF_FILE=(0,tJ.createTokenInstance)(tJ.EOF,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(dr.END_OF_FILE);dr.DEFAULT_PARSER_CONFIG=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:nJ.defaultParserErrorProvider,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1});dr.DEFAULT_RULE_CONFIG=Object.freeze({recoveryValueFunc:function(){},resyncEnabled:!0});var Xye;(function(r){r[r.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",r[r.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",r[r.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",r[r.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",r[r.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",r[r.LEFT_RECURSION=5]="LEFT_RECURSION",r[r.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",r[r.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",r[r.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",r[r.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",r[r.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",r[r.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",r[r.TOO_MANY_ALTS=12]="TOO_MANY_ALTS"})(Xye=dr.ParserDefinitionErrorType||(dr.ParserDefinitionErrorType={}));function Zye(r){return r===void 0&&(r=void 0),function(){return r}}dr.EMPTY_ALT=Zye;var vy=function(){function r(e,t){this.definitionErrors=[],this.selfAnalysisDone=!1;var i=this;if(i.initErrorHandler(t),i.initLexerAdapter(),i.initLooksAhead(t),i.initRecognizerEngine(e,t),i.initRecoverable(t),i.initTreeBuilder(t),i.initContentAssist(),i.initGastRecorder(t),i.initPerformanceTracer(t),(0,_i.has)(t,"ignoredIssues"))throw new Error(`The IParserConfig property has been deprecated. + Please use the flag on the relevant DSL method instead. + See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES + For further details.`);this.skipValidations=(0,_i.has)(t,"skipValidations")?t.skipValidations:dr.DEFAULT_PARSER_CONFIG.skipValidations}return r.performSelfAnalysis=function(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")},r.prototype.performSelfAnalysis=function(){var e=this;this.TRACE_INIT("performSelfAnalysis",function(){var t;e.selfAnalysisDone=!0;var i=e.className;e.TRACE_INIT("toFastProps",function(){(0,_i.toFastProperties)(e)}),e.TRACE_INIT("Grammar Recording",function(){try{e.enableRecording(),(0,_i.forEach)(e.definedRulesNames,function(s){var o=e[s],a=o.originalGrammarAction,l=void 0;e.TRACE_INIT(s+" Rule",function(){l=e.topLevelRuleRecord(s,a)}),e.gastProductionsCache[s]=l})}finally{e.disableRecording()}});var n=[];if(e.TRACE_INIT("Grammar Resolving",function(){n=(0,rJ.resolveGrammar)({rules:(0,_i.values)(e.gastProductionsCache)}),e.definitionErrors=e.definitionErrors.concat(n)}),e.TRACE_INIT("Grammar Validations",function(){if((0,_i.isEmpty)(n)&&e.skipValidations===!1){var s=(0,rJ.validateGrammar)({rules:(0,_i.values)(e.gastProductionsCache),maxLookahead:e.maxLookahead,tokenTypes:(0,_i.values)(e.tokensMap),errMsgProvider:nJ.defaultGrammarValidatorErrorProvider,grammarName:i});e.definitionErrors=e.definitionErrors.concat(s)}}),(0,_i.isEmpty)(e.definitionErrors)&&(e.recoveryEnabled&&e.TRACE_INIT("computeAllProdsFollows",function(){var s=(0,Mye.computeAllProdsFollows)((0,_i.values)(e.gastProductionsCache));e.resyncFollows=s}),e.TRACE_INIT("ComputeLookaheadFunctions",function(){e.preComputeLookaheadFunctions((0,_i.values)(e.gastProductionsCache))})),!r.DEFER_DEFINITION_ERRORS_HANDLING&&!(0,_i.isEmpty)(e.definitionErrors))throw t=(0,_i.map)(e.definitionErrors,function(s){return s.message}),new Error(`Parser Definition Errors detected: + `+t.join(` +------------------------------- +`))})},r.DEFER_DEFINITION_ERRORS_HANDLING=!1,r}();dr.Parser=vy;(0,Vye.applyMixins)(vy,[Kye.Recoverable,Uye.LooksAhead,Hye.TreeBuilder,Gye.LexerAdapter,jye.RecognizerEngine,Yye.RecognizerApi,qye.ErrorHandler,Jye.ContentAssist,Wye.GastRecorder,zye.PerformanceTracer]);var _ye=function(r){iJ(e,r);function e(t,i){i===void 0&&(i=dr.DEFAULT_PARSER_CONFIG);var n=this,s=(0,_i.cloneObj)(i);return s.outputCst=!0,n=r.call(this,t,s)||this,n}return e}(vy);dr.CstParser=_ye;var $ye=function(r){iJ(e,r);function e(t,i){i===void 0&&(i=dr.DEFAULT_PARSER_CONFIG);var n=this,s=(0,_i.cloneObj)(i);return s.outputCst=!1,n=r.call(this,t,s)||this,n}return e}(vy);dr.EmbeddedActionsParser=$ye});var oJ=w(xy=>{"use strict";Object.defineProperty(xy,"__esModule",{value:!0});xy.createSyntaxDiagramsCode=void 0;var sJ=Dv();function ewe(r,e){var t=e===void 0?{}:e,i=t.resourceBase,n=i===void 0?"https://unpkg.com/chevrotain@"+sJ.VERSION+"/diagrams/":i,s=t.css,o=s===void 0?"https://unpkg.com/chevrotain@"+sJ.VERSION+"/diagrams/diagrams.css":s,a=` + + + + + +`,l=` + +`,c=` +